summaryrefslogtreecommitdiff
path: root/plugin
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failedNikita Malyavin2021-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion failed in handler::ha_reset upon SELECT under READ UNCOMMITTED from table with index on virtual column. This was the debug-only failure, though the problem is mush wider: * MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw bitmap. * read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP * The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE * The pointers to the stored MY_BITMAPs, like orig_read_set etc, and sometimes all_set and tmp_set, are assigned to the pointers. * Sometimes tmp_use_all_columns is used to substitute the raw bitmap directly with all_set.bitmap * Sometimes even bitmaps are directly modified, like in TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called. The last three bullets in the list, when used together (which is mostly always) make the program flow cumbersome and impossible to follow, notwithstanding the errors they cause, like this MDEV-17556, where tmp_set pointer was assigned to read_set, write_set and vcol_set, then its bitmap was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call, and then bitmap_clear_all(&tmp_set) was applied to all this. To untangle this knot, the rule should be applied: * Never substitute bitmaps! This patch is about this. orig_*, all_set bitmaps are never substituted already. This patch changes the following function prototypes: * tmp_use_all_columns, dbug_tmp_use_all_columns to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map* * tmp_restore_column_map, dbug_tmp_restore_column_maps to accept MY_BITMAP* instead of my_bitmap_map* These functions now will substitute read_set/write_set/vcol_set directly, and won't touch underlying bitmaps.
* Merge 10.2 into 10.3 (except MDEV-17556)Marko Mäkelä2021-01-111-7/+15
|\ | | | | | | | | | | The fix of MDEV-17556 (commit e25623e78a3efde05e30070dc7362f8dc0d8c459 and commit 61a362c9493df63dc588fcb71409537ae56ab9c8) has been omitted due to conflicts and will have to be applied separately later.
| * MDEV-17556 Assertion `bitmap_is_set_all(&table->s->all_set)' failedNikita Malyavin2021-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion failed in handler::ha_reset upon SELECT under READ UNCOMMITTED from table with index on virtual column. This was the debug-only failure, though the problem is mush wider: * MY_BITMAP is a structure containing my_bitmap_map, the latter is a raw bitmap. * read_set, write_set and vcol_set of TABLE are the pointers to MY_BITMAP * The rest of MY_BITMAPs are stored in TABLE and TABLE_SHARE * The pointers to the stored MY_BITMAPs, like orig_read_set etc, and sometimes all_set and tmp_set, are assigned to the pointers. * Sometimes tmp_use_all_columns is used to substitute the raw bitmap directly with all_set.bitmap * Sometimes even bitmaps are directly modified, like in TABLE::update_virtual_field(): bitmap_clear_all(&tmp_set) is called. The last three bullets in the list, when used together (which is mostly always) make the program flow cumbersome and impossible to follow, notwithstanding the errors they cause, like this MDEV-17556, where tmp_set pointer was assigned to read_set, write_set and vcol_set, then its bitmap was substituted with all_set.bitmap by dbug_tmp_use_all_columns() call, and then bitmap_clear_all(&tmp_set) was applied to all this. To untangle this knot, the rule should be applied: * Never substitute bitmaps! This patch is about this. orig_*, all_set bitmaps are never substituted already. This patch changes the following function prototypes: * tmp_use_all_columns, dbug_tmp_use_all_columns to accept MY_BITMAP** and to return MY_BITMAP * instead of my_bitmap_map* * tmp_restore_column_map, dbug_tmp_restore_column_maps to accept MY_BITMAP* instead of my_bitmap_map* These functions now will substitute read_set/write_set/vcol_set directly, and won't touch underlying bitmaps.
| * MDEV-19442 add-onAndrei Elkin2021-01-071-1/+1
| | | | | | | | fixing windows build.
| * MDEV-19442 server_audit plugin doesn't consider proxy users in ↵Alexey Botchkov2020-12-281-7/+15
| | | | | | | | | | | | | | server_audit_excl_users/server_audit_incl_users. Check the proxy user just as the connection user against the incl_users_list and excl_users_list.
* | Merge 10.2 into 10.3Marko Mäkelä2020-12-231-4/+4
|\ \ | |/
| * MDEV-24318 server_audit doesn't respect filters for PROXY_CONNECTAlexey Botchkov2020-12-011-4/+4
| | | | | | | | | | | | events. The log line should be added behind the filters.
* | MDEV-24279 Segfault after 1 day and 5 minutes uptimeSergei Golubchik2020-12-111-0/+1
| | | | | | | | | | | | | | | | | | | | feedback plugin now fakes a SHOW command to force create_schema_table() to instantiate the table at once, not lazily. The test from plugins.feedback_plugin_send applies. Caused by e64084d5a3a7
* | Merge 10.2 into 10.3Marko Mäkelä2020-11-021-2/+6
|\ \ | |/
| * MDEV-22387: Do not violate __attribute__((nonnull))Marko Mäkelä2020-11-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | This follows up commit commit 94a520ddbe39ae97de1135d98699cf2674e6b77e and commit 7c5519c12d46ead947d341cbdcbb6fbbe4d4fe1b. After these changes, the default test suites on a cmake -DWITH_UBSAN=ON build no longer fail due to passing null pointers as parameters that are declared to never be null, but plenty of other runtime errors remain.
* | Fixed bug in detection of getgrouplist parameters.Monty2020-10-291-2/+2
| | | | | | | | | | On my system, OpenSuse, I got a compilation error that some arguments to getgrouplist() where not initialized
* | Merge 10.2 into 10.3Marko Mäkelä2020-10-285-23/+52
|\ \ | |/
| * MDEV-23926: Follow-up patchDmitry Shulga2020-10-231-4/+0
| | | | | | | | This patch removes unnecessary #ifdefs in cmake macros CHECK_C_SOURCE_COMPILES.
| * MDEV-23926: Follow-up patchDmitry Shulga2020-10-231-1/+1
| | | | | | | | | | | | This patch fixes incorrect argument type passed to the last parameter of getgrouplist() in cmake macros CHECK_C_SOURCE_COMPILES()
| * MDEV-23564: CMAKE failing due to deprecated Apple GSS methodDmitry Shulga2020-10-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | Some GSS-API functions like gss_import_name(), gss_release_buffer() used in plugin/auth_gssapi and libmariadb/plugins/auth are marked as deprecated in MacOS starting from version 10.14+. It results in extra warnings output on server building. To eliminate extra warnings the flag '-Wno-deprecated-declarations' has been added to compiler invocation string for those source files that invoke deprecated GSS-API functions.
| * MDEV-23926: Follow-up patch to add missed file plugin/auth_pam/config.h.cmakeDmitry Shulga2020-10-231-0/+5
| |
| * MDEV-23926: Follow-up patch to cleanup plugin/auth_pam/CMakeLists.txt codeDmitry Shulga2020-10-232-12/+1
| | | | | | | | | | | | | | This patch moves definitions of macros variables HAVE_PAM_SYSLOG, HAVE_PAM_EXT_H, HAVE_PAM_APPL_H, HAVE_STRNDUP from command line (in the form -Dmacros) to the auto-generated header file config_auth_pam.h
| * MDEV-23926: Fix warnings generated during compilation of ↵Dmitry Shulga2020-10-232-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin/auth_pam/mapper/pam_user_map.c on MacOS Compiler warnings like one listed below are generated during server build on MacOS: [88%] Building C object plugin/auth_pam/CMakeFiles/pam_user_map.dir/mapper/pam_user_map.c.o mariadb/server-10.2/plugin/auth_pam/mapper/pam_user_map.c:87:41: error: passing 'gid_t *' (aka 'unsigned int *') to parameter of type 'int *' converts between pointers to integer types with different sign [-Werror,-Wpointer-sign] if (getgrouplist(user, user_group_id, loc_groups, &ng) < 0) ^~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/unistd.h:650:43: note: passing argument to parameter here int getgrouplist(const char *, int, int *, int *); ^ In case MariaDB server is build with -DCMAKE_BUILD_TYPE=Debug it results in build error. The reason of compiler warnings is that declaration of the Posix C API function getgrouplist() on MacOS differs from declaration of getgrouplist() proposed by Posix. To suppress this compiler warning cmake configure was adapted to detect what kind of getgrouplist() function is declared on the build platform and set the macros HAVE_POSIX_GETGROUPLIST in case the building platform supports Posix compatible interface for the getgrouplist() function. Depending on whether this macros is set the compatible type of arguments is used to pass parameter values to the function.
| * MDEV-19443 server_audit plugin doesn't log proxy users.Alexey Botchkov2020-10-231-1/+61
| | | | | | | | PROXY_USER event added.
* | MDEV-19443 server_audit plugin doesn't log proxy users.Alexey Botchkov2020-10-231-1/+61
| | | | | | | | | | | | | | PROXY_USER event added. Conflicts: plugin/server_audit/server_audit.c
* | Merge 10.2 into 10.3Marko Mäkelä2020-08-131-28/+32
|\ \ | |/
| * Fix GCC 10.2.0 -Og -Wmaybe-uninitializedMarko Mäkelä2020-08-111-28/+32
| | | | | | | | | | | | For some reason, GCC emits more -Wmaybe-uninitialized warnings when using the flag -Og than when using -O2. Many of the warnings look genuine.
* | MDEV-22066: out-of-source build fails with WITHOUT_SERVER=ONAnel Husakovic2020-08-111-2/+3
| | | | | | | | | | | | | | | | Patch 4aaa38d26ed95127b842410 is replacing `my_config.h` with `my_global.h` which is included in in-source build, but not for out-of-source build tree. Closes #1466
* | Merge 10.2 into 10.3Marko Mäkelä2020-07-0229-31/+31
|\ \ | |/
| * Merge 10.1 into 10.2bb-10.2-mergeMarko Mäkelä2020-07-0129-31/+31
| |\
| | * mtr: use env for perlDaniel Black2020-06-2327-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | On FreeBSD, perl isn't in /usr/bin, its in /usr/local/bin or elsewhere in the path. Like storage/{maria/unittest/,}ma_test_* , we use /usr/bin/env to find perl and run it.
| | * Check for krb5_xfree instead of krb5_free_unparsed_nameVicențiu Ciorbaru2020-06-152-4/+4
| | | | | | | | | | | | | | | Use krb5_xfree if available, otherwise default to krb5_free_unparsed_name.
* | | Merge 10.2 into 10.3Marko Mäkelä2020-06-132-9/+10
|\ \ \ | |/ /
| * | Merge branch '10.1' into 10.2Vicențiu Ciorbaru2020-06-112-9/+10
| |\ \ | | |/
| | * MDEV-22834: Disks plugin - change datatype to bigintVicențiu Ciorbaru2020-06-102-9/+10
| | | | | | | | | | | | | | | | | | On large hard disks (> 2TB), the plugin won't function correctly, always showing 2 TB of available space due to integer overflow. Upgrade table fields to bigint to resolve this problem.
* | | MDEV-21886 MariaDB RPM upgrade overwrites PAM user mapSergei Golubchik2020-05-071-0/+1
| | | | | | | | | | | | %config(noreplace) /etc/security
* | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-042-1/+6
|\ \ \ | |/ /
| * | MDEV-20685: compile fixes for Solaris/OSX/AIXDaniel Black2020-04-292-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sig_return: Solaris/OSX returns different function ptr Move defination to my_alarm.h as its the only use. prevents compile warnings (copied from 10.3 branch) mysys/my_sync.c:136:19: error: 'cur_dir_name' defined but not used [-Werror=unused-const-variable=] 136 | static const char cur_dir_name[]= {FN_CURLIB, 0}; | ^~~~~~~~~~~~ fix compile error (DEPRECATED) leaked from ssl headers. In file included from /export/home/dan/mariadb-server-10.4/sql/sys_vars.cc:37: /export/home/dan/mariadb-server-10.4/sql/sys_vars.ic:69: error: "DEPRECATED" redefined [-Werror] 69 | #define DEPRECATED(X) X | In file included from /export/home/dan/mariadb-server-10.4/include/violite.h:150, from /export/home/dan/mariadb-server-10.4/sql/sql_class.h:38, from /export/home/dan/mariadb-server-10.4/sql/sys_vars.cc:36: /usr/include/openssl/ssl.h:2356: note: this is the location of the previous definition 2356 | # define DEPRECATED __attribute__((deprecated)) | Avoid Werror condition on non-Linux: plugin/server_audit/server_audit.c:2267:7: error: variable 'db_len_off' set but not used [-Werror=unused-but-set-variable] 2267 | int db_len_off; | ^~~~~~~~~~ plugin/server_audit/server_audit.c:2266:7: error: variable 'db_off' set but not used [-Werror=unused-but-set-variable] 2266 | int db_off; | ^~~~~~ auth_gssapi fix include path for Solaris Consistent with the upstream packaged patch: https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/database/mariadb-103/patches/06-gssapi.h.patch compile warnings on Solaris [ 91%] Building C object plugin/server_audit/CMakeFiles/server_audit.dir/server_audit.c.o /plugin/server_audit/server_audit.c: In function 'auditing_v8': /plugin/server_audit/server_audit.c:2194:20: error: unused variable 'db_len_off' [-Werror=unused-variable] 2194 | static const int db_len_off= 128; | ^~~~~~~~~~ /plugin/server_audit/server_audit.c:2193:20: error: unused variable 'db_off' [-Werror=unused-variable] 2193 | static const int db_off= 120; | ^~~~~~ /plugin/server_audit/server_audit.c:2192:20: error: unused variable 'cmd_off' [-Werror=unused-variable] 2192 | static const int cmd_off= 4432; | ^~~~~~~ At top level: /plugin/server_audit/server_audit.c:2192:20: error: 'cmd_off' defined but not used [-Werror=unused-const-variable=] /plugin/server_audit/server_audit.c:2193:20: error: 'db_off' defined but not used [-Werror=unused-const-variable=] 2193 | static const int db_off= 120; | ^~~~~~ /plugin/server_audit/server_audit.c:2194:20: error: 'db_len_off' defined but not used [-Werror=unused-const-variable=] 2194 | static const int db_len_off= 128; | ^~~~~~~~~~ cc1: all warnings being treated as errors tested on: $ uname -a SunOS openindiana 5.11 illumos-b97b1727bc i86pc i386 i86pc
* | | Merge 10.2 into 10.3Marko Mäkelä2020-04-281-2/+2
|\ \ \ | |/ /
| * | MDEV-21913 Add pam_user_map.so file to binary tarball packageSergei Golubchik2020-04-281-2/+2
| | |
* | | Merge 10.2 into 10.3Marko Mäkelä2020-04-151-2/+2
|\ \ \ | |/ /
| * | MDEV-20604: Duplicate key value is silently truncated to 64 characters in ↵Oleksandr Byelkin2020-04-011-2/+2
| | | | | | | | | | | | | | | | | | print_keydup_error Added indication of truncated string for "s" and "M" formats
* | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-03-062-6/+38
|\ \ \ | |/ /
| * | MENT-645 Undefined symbols for architecture x86_64: _pam_syslogAlexey Bychko2020-02-252-6/+38
| | | | | | | | | | | | | | | | | | | | | added cmake checks for pam_ext.h and pam_appl.h headers added check for pam_syslog() added pam_syslog() if doesn't exist all cmake checks performed from inside the plugin
* | | MDEV-16662: cmake remove empty INSTALL_DEBUG_TARGETDaniel Black2020-02-251-3/+0
| | | | | | | | | | | | | | | | | | | | | No adverse effects since this was made a null function in 6b53f9d781cc19cbec96c3eb048e6407021685a2. This function had the last remaining cmake CMP0026 violation.
* | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-01-242-0/+23
|\ \ \ | |/ /
| * | MDEV-17292 Package the pam_user_map moduleSergei Golubchik2020-01-212-0/+23
| | |
* | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-01-031-0/+2
|\ \ \ | |/ /
| * | MDEV-13569: wsrep_info.plugin failed in buildbot with "no nodes coming from ↵Jan Lindström2020-01-021-0/+2
| | | | | | | | | | | | | | | | | | | | | prim view Modify configuration so that all nodes are part of galera cluster i.e. wsrep_on=ON.
| * | Fixing tests according to MDEV-20655 maturity stable for user_variablesAlexander Barkov2019-09-241-1/+1
| | |
| * | MDEV-20655 maturity stable for user_variablesRasmus Johansson2019-09-241-1/+1
| | |
* | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-07-261-1/+1
|\ \ \ | |/ /
| * | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-07-261-2/+2
| |\ \ | | |/
| | * Merge branch '5.5' into 10.1Oleksandr Byelkin2019-07-251-2/+2
| | |\
| | | * Bug#27259654 - ISSUES FOUND BY PVS-STUDIO STATIC ANALYZERAnushree Prakash B2019-07-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DESCRIPTION =========== PVS-Studio static code analyzer found several suspicious fragments of code across various files. i) sizeof() is using the pointer ii) memcpy() doesn't copy the whole string. iii) enumeration constant 'wkb_multilinestring' is used as a variable of a Boolean-type. iv) 'throw' keyword is missing from std::runtime_error() FIX === i) Use sizeof({actual object/data type}) ii) Use strncpy() and set last char as '\0' iii) N/A (Issue has already been fixed) iv) Add 'throw' before the exception. RB: 21502