summaryrefslogtreecommitdiff
path: root/plugin
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-26742 Assertion `field->type_handler() == this' failed in ↵bb-10.5-bar-MDEV-26742Alexander Barkov2021-10-144-0/+76
| | | | FixedBinTypeBundle<NATIVE_LEN, MAX_CHAR_LEN>::Type_handler_fbt::stored_field_cmp_to_item
* Merge 10.4 into 10.5Marko Mäkelä2021-09-301-5/+7
|\ | | | | | | | | FIXME: Part of the MDEV-20699 test is disabled due to nonderterministic result.
| * Merge 10.3 into 10.4Marko Mäkelä2021-09-291-5/+7
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2021-09-291-5/+7
| | |\
| | | * MDEV-24454 Crash at change_item_treebb-10.2-MDEV-24454Oleksandr Byelkin2021-09-271-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use in_sum_func (and so nest_level) only in LEX to which SELECT lex belong to Reduce usage of current_select (because it does not always point on the correct SELECT_LEX, for example with prepare. Change context for all classes inherited from Item_ident (was only for Item_field) in case of pushing down it to HAVING. Now name resolution context have to have SELECT_LEX reference if the context is present. Fixed feedback plugin stack usage.
* | | | Merge branch '10.4' into 10.5Monty2021-09-152-0/+5
|\ \ \ \ | |/ / / | | | | | | | | Fixed also an error in suite/perfschema/t/transaction_nested_events-master.opt
* | | | Merge remote-tracking branch 'upstream/10.4' into 10.5Vicențiu Ciorbaru2021-09-101-2/+2
|\ \ \ \ | |/ / /
| * | | MDEV-26487 cpack rpm failed to build packages with cmake < 3.7.0Sergei Golubchik2021-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buggy regexp in old CPackRPM.cmake: string(REGEX REPLACE "%[A-Za-z0-9\(\),-]* " "" F_PATH ${F}) string(REGEX MATCH "%[A-Za-z0-9\(\),-]*" F_PREFIX ${F}) it treats everything after the first space as a path
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-08-261-9/+5
|\ \ \ \ | |/ / /
| * | | MDEV-26380 auth_pam_tool has incorrect permissions on CentOS 7Sergei Golubchik2021-08-251-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buggy sepdebugcrcfix in CentOS 7 (rpm-4.11.3) does not restore SUID bit after editing the binary. This is fixed in rpm-4.12. Still let's not set SUID bit when installing auth_pam_tool and use rpm spec %attr directive instead.
* | | | MDEV-26380 auth_pam_tool has incorrect permissions on CentOS 7Alexey Bychko2021-08-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | splitted permission setting to the 2 separate calls. according to execute_process() doc, output from first command will be piped to second which led to race and randomly lost suid bit from auth_pam_tool.
* | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2021-07-313-1/+5
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2021-07-313-1/+5
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-07-223-2/+9
| | |\ \ | | | |/
| | | * Add feature summary at the end of cmake.Heinz Wiesinger2021-07-213-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives a short overview over found/missing dependencies as well as enabled/disabled features. Initial author Heinz Wiesinger <heinz@m2mobi.com> Additions by Vicențiu Ciorbaru <vicentiu@mariadb.org> * Report all plugins enabled via MYSQL_ADD_PLUGIN * Simplify code. Eliminate duplication by making use of WITH_xxx variable values to set feature "ON" / "OFF" state. Reviewed by: wlad@mariadb.com (code details) serg@mariadb.com (the idea)
* | | | MDEV-26226 Change Maturity of plugins inet6 and s3 to stableSergei Golubchik2021-07-282-2/+2
| | | | | | | | | | | | | | | | from gamma
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-05-261-3/+3
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-05-251-3/+3
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-05-241-4/+4
| | |\ \ | | | |/
| | | * MDEV-25641 max_password_errors not working with ed25519 auth pluginSergei Golubchik2021-05-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | report correct error codes in ed25519. Invalid value stored in the user table or an OpenSSL error is CR_ERROR. When a user provided incorrect password when logging in - it's CR_AUTH_USER_CREDENTIALS.
* | | | Merge branch bb-10.4-release into bb-10.5-releasemariadb-10.5.10Nikita Malyavin2021-05-051-0/+1
|\ \ \ \ | |/ / /
| * | | Merge branch bb-10.3-release into bb-10.4-releaseNikita Malyavin2021-05-051-0/+1
| |\ \ \ | | |/ /
| | * | MDEV-20842 Crash using versioning plugin functions after plugin was removed ↵Aleksey Midenkov2021-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | from server Remove plugin functions via item_create_remove() at deinit time.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-04-211-0/+4
|\ \ \ \ | |/ / /
| * | | Fix all warnings given by UBSANMonty2021-04-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The easiest way to compile and test the server with UBSAN is to run: ./BUILD/compile-pentium64-ubsan and then run mysql-test-run. After this commit, one should be able to run this without any UBSAN warnings. There is still a few compiler warnings that should be fixed at some point, but these do not expose any real bugs. The 'special' cases where we disable, suppress or circumvent UBSAN are: - ref10 source (as here we intentionally do some shifts that UBSAN complains about. - x86 version of optimized int#korr() methods. UBSAN do not like unaligned memory access of integers. Fixed by using byte_order_generic.h when compiling with UBSAN - We use smaller thread stack with ASAN and UBSAN, which forced me to disable a few tests that prints the thread stack size. - Verifying class types does not work for shared libraries. I added suppression in mysql-test-run.pl for this case. - Added '#ifdef WITH_UBSAN' when using integer arithmetic where it is safe to have overflows (two cases, in item_func.cc). Things fixed: - Don't left shift signed values (byte_order_generic.h, mysqltest.c, item_sum.cc and many more) - Don't assign not non existing values to enum variables. - Ensure that bool and enum values are properly initialized in constructors. This was needed as UBSAN checks that these types has correct values when one copies an object. (gcalc_tools.h, ha_partition.cc, item_sum.cc, partition_element.h ...) - Ensure we do not called handler functions on unallocated objects or deleted objects. (events.cc, sql_acl.cc). - Fixed bugs in Item_sp::Item_sp() where we did not call constructor on Query_arena object. - Fixed several cast of objects to an incompatible class! (Item.cc, Item_buff.cc, item_timefunc.cc, opt_subselect.cc, sql_acl.cc, sql_select.cc ...) - Ensure we do not do integer arithmetic that causes over or underflows. This includes also ++ and -- of integers. (Item_func.cc, Item_strfunc.cc, item_timefunc.cc, sql_base.cc ...) - Added JSON_VALUE_UNITIALIZED to json_value_types and ensure that value_type is initialized to this instead of to -1, which is not a valid enum value for json_value_types. - Ensure we do not call memcpy() when second argument could be null. - Fixed that Item_func_str::make_empty_result() creates an empty string instead of a null string (safer as it ensures we do not do arithmetic on null strings). Other things: - Changed struct st_position to an OBJECT and added an initialization function to it to ensure that we do not copy or use uninitialized members. The change to a class was also motived that we used "struct st_position" and POSITION randomly trough the code which was confusing. - Notably big rewrite in sql_acl.cc to avoid using deleted objects. - Changed in sql_partition to use '^' instead of '-'. This is safe as the operator is either 0 or 0x8000000000000000ULL. - Added check for select_nr < INT_MAX in JOIN::build_explain() to avoid bug when get_select() could return NULL. - Reordered elements in POSITION for better alignment. - Changed sql_test.cc::print_plan() to use pointers instead of objects. - Fixed bug in find_set() where could could execute '1 << -1'. - Added variable have_sanitizer, used by mtr. (This variable was before only in 10.5 and up). It can now have one of two values: ASAN or UBSAN. - Moved ~Archive_share() from ha_archive.cc to ha_archive.h and marked it virtual. This was an effort to get UBSAN to work with loaded storage engines. I kept the change as the new place is better. - Added in CONNECT engine COLBLK::SetName(), to get around a wrong cast in tabutil.cpp. - Added HAVE_REPLICATION around usage of rgi_slave, to get embedded server to compile with UBSAN. (Patch from Marko). - Added #ifdef for powerpc64 to avoid a bug in old gcc versions related to integer arithmetic. Changes that should not be needed but had to be done to suppress warnings from UBSAN: - Added static_cast<<uint16_t>> around shift to get rid of a LOT of compiler warnings when using UBSAN. - Had to change some '/' of 2 base integers to shift to get rid of some compile time warnings. Reviewed by: - Json changes: Alexey Botchkov - Charset changes in ctype-uca.c: Alexander Barkov - InnoDB changes & Embedded server: Marko Mäkelä - sql_acl.cc changes: Vicențiu Ciorbaru - build_explain() changes: Sergey Petrunia
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-04-141-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-04-141-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-04-091-1/+1
| | |\ \ | | | |/
| | | * MDEV-25242 Server crashes in check_grant upon invoking function with ↵Sergei Golubchik2021-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | userstat enabled also fix index_stats table. followup for 5a798071199
| | | * MDEV-25457 CREATE / DROP PROCEDURE not logged with audit plugin.Alexey Botchkov2021-03-291-5/+1
| | | | | | | | | | | | | | | | CREATE/DROP PROCEDIRE/FUNCTION is now treated as DDL.
* | | | MDEV-22775: Merge 10.4 into 10.5Marko Mäkelä2021-04-081-5/+7
|\ \ \ \ | |/ / /
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-311-5/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-311-5/+1
| |\ \ \ | | |/ /
| | * | MDEV-25457 CREATE / DROP PROCEDURE not logged with audit plugin.Alexey Botchkov2021-03-271-5/+1
| | | | | | | | | | | | | | | | CREATE/DROP PROCEDIRE/FUNCTION is now treated as DDL.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-272-5/+5
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-272-5/+5
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-03-272-5/+5
| | |\ \ | | | |/
| | | * MDEV-25242 Server crashes in check_grant upon invoking function with ↵Sergei Golubchik2021-03-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | userstat enabled use check_grant(..., number_of_tables=1, ...) if you only need to check privileges for one table
| | | * MDEV-25195: pam check getgrouplist functionDaniel Black2021-03-221-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | AIX doesn't have getgrouplist so ensure function is checked. The HAVE_POSIX_GETGROUPLIST check was insufficient.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-051-41/+66
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-051-41/+66
| |\ \ \ | | |/ /
| | * | MDEV-24965 With ALTER USER ...IDENTIFIED BY command, password doesn't ↵Alexey Botchkov2021-02-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | replaced by asterisks in audit log. Check for the ALTER USER command added.
| | * | MENT-1098 Crash during update on 10.4.17 after upgrade from 10.4.10Monty2021-02-251-41/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for the crash was that there was not a write lock to protect against file rotations in the server_audit plugin after an audit plugin patch to changed audit mutexes to read & write locks. The fixes are: * Moving server_audit.c to use read & write locks (which improves performance). * Added functionality in file_logger.c to not do file rotations until it is allowed by the caller (done without any interface changes for the logging service). * Move checking of file size limit to server_audit.c and if it is time to do a rotation change the read lock to a write lock and tell file_logger that it is now allowed to rotate the log files.
* | | | Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-153-3/+3
|\ \ \ \ | |/ / /
| * | | Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-121-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | * | 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.4 into 10.5Marko Mäkelä2021-01-252-2/+2
|\ \ \ \ | |/ / /
| * | | MDEV-24577: Fix warnings generated during compilation of ↵Dmitry Shulga2021-01-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin/auth_pam/testing/pam_mariadb_mtr.c on FreeBSD Compiler warnings generated on building MariaDB server for BSD has the same reason as in case building is performed on MacOS. Both platforms do use clang as a C/C++ compiler. So, fix the compiler warnings in case the compiler is clang doesn't matter what kind of building platform do we use for building. This is a follow-up patch for the following bug reports: MDEV-23564: CMAKE failing due to deprecated Apple GSS method MDEV-23935: Fix warnings generated during compilation of plugin/auth_pam/testing/pam_mariadb_mtr.c on MacOS
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-01-111-7/+15
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-01-111-7/+15
| |\ \ \ | | |/ /