summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.11 into 11.0Marko Mäkelä2023-02-161-20/+31
|\
| * Merge branch '10.6' into 10.7Oleksandr Byelkin2023-01-311-20/+31
| |\
| | * Merge branch '10.5' into 10.6Oleksandr Byelkin2023-01-311-20/+31
| | |\
| | | * Merge branch '10.4' into 10.5Oleksandr Byelkin2023-01-271-20/+31
| | | |\
| | | | * MDEV-27631 Assertion `global_status_var.global_memory_used == 0' failed in ↵Sergei Golubchik2023-01-201-20/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqld_exit plugin_vars_free_values() was walking plugin sysvars and thus did not free memory of plugin PLUGIN_VAR_NOSYSVAR vars. * change it to walk all plugin vars * add the pluginname_ prefix to NOSYSVARS var names too, so that plugin_vars_free_values() would be able to find their bookmarks
* | | | | Set thd->query() for internal (startup) transactionsMonty2023-02-031-0/+3
|/ / / / | | | | | | | | | | | | | | | | This helps with debugging as 'Query: ' in DBUG traces will show something useful, for internal transactions, instead of just "".
* | | | Merge 10.6 into 10.7Jan Lindström2022-09-051-0/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.5 into 10.6Jan Lindström2022-09-051-0/+1
| |\ \ \ | | |/ /
| | * | Merge 10.4 into 10.5Jan Lindström2022-09-051-0/+1
| | |\ \ | | | |/
| | | * Reduce compilation dependencies on wsrep_mysqld.hDaniele Sciascia2022-08-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Making changes to wsrep_mysqld.h causes large parts of server code to be recompiled. The reason is that wsrep_mysqld.h is included by sql_class.h, even tough very little of wsrep_mysqld.h is needed in sql_class.h. This commit introduces a new header file, wsrep_on.h, which is meant to be included from sql_class.h, and contains only macros and variable declarations used to determine whether wsrep is enabled. Also, header wsrep.h should only contain definitions that are also used outside of sql/. Therefore, move WSREP_TO_ISOLATION* and WSREP_SYNC_WAIT macros to wsrep_mysqld.h. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-08-081-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.5' into bb-10.6-releaseOleksandr Byelkin2022-08-031-1/+1
| |\ \ \ | | |/ /
| | * | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-08-031-1/+1
| | |\ \ | | | |/
| | | * Merge branch '10.3' into 10.4Oleksandr Byelkin2022-08-021-1/+1
| | | |\
| | | | * in INFORMATION_SCHEMA.ALL_PLUGINS match installed plugins betterSergei Golubchik2022-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | look for an installed plugin with the same name _and the same type_ (in case there are many plugins with the same name and different type, which is, technically, possible for built-in plugins).
* | | | | Merge branch '10.6' into 10.7Sergei Golubchik2022-05-111-1/+2
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.5' into 10.6Sergei Golubchik2022-05-101-1/+2
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.4' into 10.5Sergei Golubchik2022-05-091-1/+2
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.3' into 10.4Sergei Golubchik2022-05-081-1/+2
| | | |\ \ | | | | |/
| | | | * Merge branch '10.2' into 10.3Sergei Golubchik2022-04-211-1/+2
| | | | |\
| | | | | * MDEV-26323 use-after-poison issue of MariaDB serverAlexander Barkov2022-04-141-1/+2
| | | | | |
* | | | | | Merge 10.6 into 10.7Marko Mäkelä2022-02-221-4/+6
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.5 into 10.6Marko Mäkelä2022-02-221-4/+6
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.4 into 10.5Vlad Lesin2022-02-221-4/+6
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge 10.3 into 10.4Vlad Lesin2022-02-211-4/+6
| | | |\ \ \ | | | | |/ /
| | | | * | MDEV-27730 Add PLUGIN_VAR_DEPRECATED flag to plugin variablesNayuta Yanagisawa2022-02-181-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sys_var class has the deprecation_substitute member to mark the deprecated variables. As it's set, the server produces warnings when these variables are used. However, the plugin has no means to utilize that functionality. So, the PLUGIN_VAR_DEPRECATED flag is introduced to set the deprecation_substitute with the empty string. A non-empty string can make the warning more informative, but there's no nice way seen to specify it, and not that needed at the moment.
* | | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-02-041-1/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2022-02-031-1/+1
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-02-011-1/+1
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-01-301-1/+1
| | | |\ \ \ | | | | |/ /
| | | | * | Merge branch '10.2' into 10.3mariadb-10.3.33Oleksandr Byelkin2022-01-291-1/+1
| | | | |\ \ | | | | | |/
| | | | | * MDEV-27494 Rename .ic files to .inlVladislav Vaintroub2022-01-171-1/+1
| | | | | |
* | | | | | MDEV-26774 Compression provider unloading at runtime has no effect but ↵Sergei Golubchik2021-10-271-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | doesn't produce a warning
* | | | | | plugin can signal that it cannot be unloaded by failing deinit()Sergei Golubchik2021-10-271-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if plugin->deinit() returns a failure, it is no longer ignored, it means that the plugin isn't ready to be unloaded from memory yet. So it's marked "dying", deinitialized as much as possible, but stays in memory until shutdown. also: * increment MARIA_PLUGIN_INTERFACE_VERSION * rewrite ha_rocksdb to use the new approach, update the test
* | | | | | cleanup: plugin unloadSergei Golubchik2021-10-271-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | * reduce code duplication
* | | | | | MDEV-26221: DYNAMIC_ARRAY use size_t for sizesEric Herman2021-10-191-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://jira.mariadb.org/browse/MDEV-26221 my_sys DYNAMIC_ARRAY and DYNAMIC_STRING inconsistancy The DYNAMIC_STRING uses size_t for sizes, but DYNAMIC_ARRAY used uint. This patch adjusts DYNAMIC_ARRAY to use size_t like DYNAMIC_STRING. As the MY_DIR member number_of_files is copied from a DYNAMIC_ARRAY, this is changed to be size_t. As MY_TMPDIR members 'cur' and 'max' are copied from a DYNAMIC_ARRAY, these are also changed to be size_t. The lists of plugins and stored procedures use DYNAMIC_ARRAY, but their APIs assume a size of 'uint'; these are unchanged.
* | | | | | MDEV-26637: (plugin) ASAN: main.metadata and user_variables.basic MTR ↵Oleksandr Byelkin2021-10-121-0/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failures after MDEV-26572 Get rid of locking "empty" plugin. This problem present in our tests in case of malformed frm-file, for example.
* | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2021-08-021-13/+11
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2021-07-311-13/+11
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2021-07-311-13/+11
| | |\ \ \ | | | |/ /
| | | * | add const qualifiers to sys_var::value_ptr functions and fix const castsNikita Malyavin2021-07-271-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is important since Sys_var_typelib and its descendants return pointers to constant symbols from *_value_ptr, which are situated in write-protected-memory. * functions const-qualified: - value_ptr - session_value_ptr - global_value_ptr - default_value_ptr - Sys_var_vers_asof::value_ptr - other minor private ones * remove C-style typecasts when it discards qualifiers
* | | | | MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
* | | | | MDEV-18465 Logging of DDL statements during backupMonty2021-05-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Many of the changes was needed to be able to collect and print engine name and table version id's in the ddl log.
* | | | | Optimize usage of c_ptr(), c_ptr_quick() and String::alloc()Monty2021-05-191-2/+6
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that when one used String::alloc() to allocate a string, the String ensures that there is space for an extra NULL byte in the buffer and if not, reallocates the string. This is a problem with the String::set_int() that calls alloc(21), which forces extra malloc/free calls to happen. - We do not anymore re-allocate String if alloc() is called with the Allocated_length. This reduces number of malloc() allocations, especially one big re-allocation in Protocol::send_result_Set_metadata() for almost every query that produced a result to the connnected client. - Avoid extra mallocs when using LONGLONG_BUFFER_SIZE This can now be done as alloc() doesn't increase buffers if new length is not bigger than old one. - c_ptr() is redesigned to be safer (but a bit longer) than before. - Remove wrong usage of c_ptr_quick() c_ptr_quick() was used in many cases to get the pointer to the used buffer, even when it didn't need to be \0 terminated. In this case ptr() is a better substitute. Another problem with c_ptr_quick() is that it did not guarantee that the string would be \0 terminated. - item_val_str(), an API function not used currently by the server, now always returns a null terminated string (before it didn't always do that). - Ensure that all String allocations uses STRING_PSI_MEMORY_KEY. The old mixed usage of performance keys caused assert's when String buffers where shrunk. - Binary_string::shrink() is simplifed - Fixed bug in String(const char *str, size_t len, CHARSET_INFO *cs) that used Binary_string((char *) str, len) instead of Binary_string(str,len). - Changed argument to String() creations and String.set() functions to use 'const char*' instead of 'char*'. This ensures that Alloced_length is not set, which gives safety against someone trying to change the original string. This also would allow us to use !Alloced_length in c_ptr() if needed. - Changed string_ptr_cmp() to use memcmp() instead of c_ptr() to avoid a possible malloc during string comparision.
* | | | Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One should not change the program arguments! This change also reduces warnings from the icc compiler. Almost all changes are just syntax changes (adding const to 'get_one_option function' declarations). Other changes: - Added a few cast of 'argument' from 'const char*' to 'char *'. This was mainly in calls to 'external' functions we don't have control of. - Ensure that all reset of 'password command line argument' are similar. (In almost all cases it was just adding a comment and a cast) - In mysqlbinlog.cc and mysqld.cc there was a few cases that changed the command line argument. These places where changed to instead allocate the option in a MEM_ROOT to avoid changing the argument. Some of this code was changed to ensure that different programs did parsing the same way. Added a test case for the changes in mysqlbinlog.cc - Changed a few variables that took their value from command line options from 'char *' to 'const char *'.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-08-011-19/+55
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-07-311-19/+28
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-07-311-17/+26
| | |\ \ | | | |/
| | | * MDEV-21258: Can't uninstall plugin if the library file doesn't existOleksandr Byelkin2020-07-291-17/+26
| | | | | | | | | | | | | | | | Removing plugin from the mysql.plugin even if the plugin is not loaded
| * | | MDEV-19918 Server hangs or crashes while trying to lock mutex when theAlexey Botchkov2020-07-261-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mutex was already locked upon startup with server_audit and orphan records in mysql.plugin. Preaquire auditing plugins before LOCK_plugin to awoid double locking.