summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.h
Commit message (Collapse)AuthorAgeFilesLines
* Enusure that my_global.h is included firstMichael Widenius2017-08-241-1/+1
| | | | | | | | | | - Added sql/mariadb.h file that should be included first by files in sql directory, if sql_plugin.h is not used (sql_plugin.h adds SHOW variables that must be done before my_global.h is included) - Removed a lot of include my_global.h from include files - Removed include's of some files that my_global.h automatically includes - Removed duplicated include's of my_sys.h - Replaced include my_config.h with my_global.h
* Changing field::field_name and Item::name to LEX_CSTRINGMonty2017-04-231-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Benefits of this patch: - Removed a lot of calls to strlen(), especially for field_string - Strings generated by parser are now const strings, less chance of accidently changing a string - Removed a lot of calls with LEX_STRING as parameter (changed to pointer) - More uniform code - Item::name_length was not kept up to date. Now fixed - Several bugs found and fixed (Access to null pointers, access of freed memory, wrong arguments to printf like functions) - Removed a lot of casts from (const char*) to (char*) Changes: - This caused some ABI changes - lex_string_set now uses LEX_CSTRING - Some fucntions are now taking const char* instead of char* - Create_field::change and after changed to LEX_CSTRING - handler::connect_string, comment and engine_name() changed to LEX_CSTRING - Checked printf() related calls to find bugs. Found and fixed several errors in old code. - A lot of changes from LEX_STRING to LEX_CSTRING, especially related to parsing and events. - Some changes from LEX_STRING and LEX_STRING & to LEX_CSTRING* - Some changes for char* to const char* - Added printf argument checking for my_snprintf() - Introduced null_clex_str, star_clex_string, temp_lex_str to simplify code - Added item_empty_name and item_used_name to be able to distingush between items that was given an empty name and items that was not given a name This is used in sql_yacc.yy to know when to give an item a name. - select table_name."*' is not anymore same as table_name.* - removed not used function Item::rename() - Added comparision of item->name_length before some calls to my_strcasecmp() to speed up comparison - Moved Item_sp_variable::make_field() from item.h to item.cc - Some minimal code changes to avoid copying to const char * - Fixed wrong error message in wsrep_mysql_parse() - Fixed wrong code in find_field_in_natural_join() where real_item() was set when it shouldn't - ER_ERROR_ON_RENAME was used with extra arguments. - Removed some (wrong) ER_OUTOFMEMORY, as alloc_root will already give the error. TODO: - Check possible unsafe casts in plugin/auth_examples/qa_auth_interface.c - Change code to not modify LEX_CSTRING for database name (as part of lower_case_table_names)
* Fix many -Wconversion warnings.Marko Mäkelä2017-03-071-10/+10
| | | | | | | | | | | | | | | | | | | Define my_thread_id as an unsigned type, to avoid mismatch with ulonglong. Change some parameters to this type. Use size_t in a few more places. Declare many flag constants as unsigned to avoid sign mismatch when shifting bits or applying the unary ~ operator. When applying the unary ~ operator to enum constants, explictly cast the result to an unsigned type, because enum constants can be treated as signed. In InnoDB, change the source code line number parameters from ulint to unsigned type. Also, make some InnoDB functions return a narrower type (unsigned or uint32_t instead of ulint; bool instead of ibool).
* MDEV-9312: storage engine not enforced during galera cluster replicationNirbhay Choubey2016-11-071-0/+7
| | | | | | Perform a post initialization of plugin-related variables of wsrep threads after their global counterparts have been initialized.
* Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-0/+4
|\
| * Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-0/+2
| |\
| | * Merge branch '5.5' into 10.0Sergei Golubchik2016-08-101-0/+2
| | |\
| | | * MDEV-10010 - potential deadlock on windows due to recursiveVladislav Vaintroub2016-08-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | SRWLock acquisition Backport patch from 10.1
| * | | MDEV-10010 - Recursive call to mysql_rwlock_rdlock for ↵Sergey Vojtovich2016-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LOCK_system_variables_hash Avoid recursive LOCK_system_variables_hash acquisition in intern_sys_var_ptr() by pre-syncing dynamic session variables.
* | | | MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-0/+2
| | | | | | | | | | | | | | | | System variables tracking
* | | | MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-0/+2
|/ / / | | | | | | | | | initial commit to test
* | | Merge branch '10.0' into 10.1Sergei Golubchik2016-06-281-1/+1
|\ \ \ | |/ /
| * | Replace dynamic loading of mysqld.exe data for plugins, replace with ↵Vladislav Vaintroub2016-06-211-1/+1
| | | | | | | | | | | | MYSQL_PLUGIN_IMPORT
* | | Push for testing of encryptionMonty2015-02-101-2/+2
| | |
* | | MDEV-5231: Per query variables from Percona Server (rewritten)Oleksandr Byelkin2014-11-111-0/+1
| | |
* | | cleanup: option_type -> scopeSergei Golubchik2014-10-101-1/+0
|/ /
* | remove sys_var specific restore_pluginvar_names() function,Sergei Golubchik2013-12-091-0/+3
| | | | | | | | use generic restore_ptr_backup() approach
* | MDEV-4403 Attempting to use cassandra storage engine causes "service ↵Sergei Golubchik2013-12-091-1/+10
| | | | | | | | | | | | | | | | 'my_snprintf_service' interface version mismatch" When a DSO is loaded we rewrite service pointers to point to the actual service structures. But when a DSO is unloaded, we have to restore their original values, in case this DSO wasn't removed from memory on dlclose() and is later loaded again.
* | Fixing the problem with my_bool_t defined two times.Alexander Barkov2013-06-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (it worked fine with the modern gcc, but failed on some other compilers). modified: include/my_global.h include/mysql/plugin.h include/mysql/plugin_audit.h.pp include/mysql/plugin_auth.h.pp include/mysql/plugin_ftparser.h.pp include/mysql/service_thd_timezone.h sql/item_func.cc sql/mysqld.cc sql/set_var.cc sql/sql_plugin.cc sql/sql_plugin.h sql/sql_show.cc sql/sys_vars.cc storage/perfschema/ha_perfschema.cc
* | 10.0-base mergeSergei Golubchik2013-04-151-2/+6
|\ \
| * | MDEV-3807 show plugins soname 'xxx'Sergei Golubchik2013-04-091-0/+4
| | | | | | | | | | | | | | | | | | and INFORMATION_SCHEMA.ALL_PLUGINS table with condition pushdown for I_S.ALL_PLUGINS and a new status variable to cound successful dlopen's
| * | MDEV-4022 table attributes with sysvar as a default valueSergei Golubchik2013-04-091-0/+2
| | |
| * | remove long time obsolete xyz_ci() copies of xyz() macrosSergei Golubchik2013-04-071-2/+0
| |/
* | MDEV-3860 backport --plugin-load-add (and related mysql-test changes)Sergei Golubchik2012-12-151-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | revno: 3383 revision-id: georgi.kodinov@oracle.com-20110818083108-qa3h3ufqu4zne80a committer: Georgi Kodinov <Georgi.Kodinov@Oracle.com> timestamp: Thu 2011-08-18 11:31:08 +0300 message: Bug #11766001: 59026: ALLOW MULTIPLE --PLUGIN-LOAD OPTIONS Implemented support for a new command line option : --plugin-load-add=<comma-separated-name-equals-value-list> This option takes the same type of arguments that --plugin-load does and complements --plugin-load (that continues to operate as before) by appending its argument to the list specified by --plugin-load. So --plugin-load can be considered a composite option consisting of resetting the plugin load list and then calling --plugin-load-add to process the argument. Note that the order in which you specify --plugin-load and --plugin-load-add is important : "--plugin-load=x --plugin-load-add=y" will be equivalent to "--plugin-load=x,y" whereas "--plugin-load-add=y --plugin-load=x" will be equivalent to "plugin-load=x". Incompatible change : the --help --verbose command will no longer print the --plugin-load variable's values (as it doesn't have one). Otherwise both --plugin-load and --plugin-load-add are mentioned in it.
* merge with MySQL 5.5.27Sergei Golubchik2012-08-091-3/+3
|\ | | | | | | manually checked every change, reverted incorrect or stupid changes.
| * Bug#14238406 NEW COMPILATION WARNINGS WITH GCC 4.7 (-WERROR=NARROWING)Jon Olav Hauglid2012-06-291-2/+2
| |\ | | | | | | | | | Manual merge from mysql-5.1 to mysql-5.5
* | | mdev-224 plugin usage statistics in the feedback reportsSergei Golubchik2012-04-181-0/+1
| | |
* | | mdev-20: INSTALL PLUGIN SONAMESergei Golubchik2012-03-051-1/+2
| | |
* | | 5.3 mergeSergei Golubchik2012-01-131-1/+2
|\ \ \
| * \ \ Merge with MariaDB 5.1Michael Widenius2011-11-241-2/+4
| |\ \ \
| | * \ \ Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-211-2/+4
| | |\ \ \ | | | | |/ | | | |/| | | | | | Fixed up copyright messages.
| * | | | Merge with 5.1 to get in changes from MySQL 5.1.55Michael Widenius2011-02-281-0/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge with MySQL 5.1.55Michael Widenius2011-02-201-0/+1
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
* | | \ \ \ mysql-5.5.18 mergeSergei Golubchik2011-11-031-2/+2
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | Updated/added copyright headersKent Boortz2011-06-301-2/+2
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | | |_|/ | | |/| |
* | | | | 5.5-mergeSergei Golubchik2011-07-021-1/+9
|\ \ \ \ \ | |/ / / /
| * | | | Bug #58699 cannot build with gcc dbg on solarisTor Didriksen2010-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmake/os/SunOS.cmake: Remove TARGET_OS_SOLARIS config.h.cmake: Remove TARGET_OS_SOLARIS Add PTHREAD_ONCE_INITIALIZER configure.cmake: Add function for testing whether we need { PTHREAD_ONCE_INIT } rather than PTHREAD_ONCE_INIT include/my_pthread.h: Use PTHREAD_ONCE_INITIALIZER if set by cmake. include/mysql/psi/mysql_file.h: Include my_global.h first, to get correct platform definitions. mysys/ptr_cmp.c: Hide the unused static functions in #ifdef's on solaris. Use __sun (defined by both gcc and SunPro cc) rather than TARGET_OS_SOLARIS sql/my_decimal.cc: Include my_global.h first, to get correct platform definitions. sql/mysqld.cc: Fix signed/unsigned comparison warning. sql/sql_audit.h: Include my_global.h first, to get correct platform definitions. sql/sql_plugin.h: Include my_global.h first, to get correct platform definitions. sql/sql_show.cc: Fix: warning: cast from pointer to integer of different size sql/sys_vars.h: Use reinterpret_cast rather than c-style cast. storage/perfschema/pfs_instr.cc: Include my_global.h first, to get correct platform definitions.
| * | | | Merging patch for BUG#58246 into mysql-5.5-bugteam.Mats Kindahl2010-12-011-0/+1
| |\ \ \ \ | | |/ / /
| | * | | BUG#58246: INSTALL PLUGIN not secure & crashableMats Kindahl2010-12-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When installing plugins, there is a missing check for slash (/) in the path on Windows. Note that on Windows, both / and \ can be used to separate directories. This patch fixes the issue by: - Adding a FN_DIRSEP symbol for all platforms consisting of a string of legal directory separators. - Adding a charset-aware version of strcspn(). - Adding a check_valid_path() function that uses my_strcspn() to check if any FN_DIRSEP character is in the supplied string. - Using the check_valid_path() function in sql_plugin.cc and sql_udf.cc (which means replacing the existing test there). include/config-netware.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP include/config-win.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP include/m_ctype.h: Adding my_strspn() and my_strcspn(). ****** Adding my_strspn() and my_strcspn(). include/my_global.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP mysql-test/t/plugin_not_embedded.test: Adding test that file names containing / is disallowed on *all* platforms. ****** Adding test that file names containing / is disallowed on *all* platforms. sql/sql_plugin.cc: Introducing check_if_path() function for checking if filename is a path to include / on Windows. ****** Introducing check_if_path() function for checking if filename is a path to include / on Windows. sql/sql_udf.cc: Switching to use check_if_path() function. ****** Switching to use check_if_path() function. strings/my_strchr.c: Adding my_strspn() and my_strcspn(). ****** Adding my_strspn() and my_strcspn().
| * | | | WL#5341 - Sticky pluginsSergey Vojtovich2010-09-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements "permanent" load option for plugins as specified by WL#5341. mysql-test/r/plugin_load_option.result: A test case for WL#5341. mysql-test/t/plugin_load_option-master.opt: A test case for WL#5341. mysql-test/t/plugin_load_option.test: A test case for WL#5341. sql/share/errmsg-utf8.txt: An error message for WL#5341. sql/sql_plugin.cc: Added FORCE_PLUS_PERMANENT plugin load option. sql/sql_plugin.h: Expose and use plugin load option instead of is_mandatory flag. This is a requirement for to-be-implemented WL5496.
* | | | | lots of post-merge changesSergei Golubchik2011-04-251-3/+2
| | | | |
* | | | | merge.Sergei Golubchik2010-11-251-5/+14
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| | | | | | checkpoint. does not compile.
| * | | --plugin_maturity command-line optionSergei Golubchik2010-06-161-0/+3
| | | |
| * | | Maria WL#61unknown2010-04-011-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interface for maria extensions. Alternative plugin interface with additional info (maturity and string version). CMakeLists.txt: Maria plugin interface used. config/ac-macros/plugins.m4: Maria plugin interface used. configure.in: Maria plugin interface used. include/mysql/plugin.h: Maria plugin interface added. include/mysql/plugin_auth.h.pp: Maria plugin interface added. plugin/auth/auth_socket.c: Maria plugin interface added. plugin/auth/dialog.c: Maria plugin interface added. plugin/daemon_example/daemon_example.cc: Maria plugin interface added. plugin/fulltext/plugin_example.c: Maria plugin interface added. sql/ha_ndbcluster.cc: Maria plugin interface added. sql/ha_partition.cc: Maria plugin interface added. sql/log.cc: Maria plugin interface added. sql/sql_acl.cc: Maria plugin interface added. sql/sql_builtin.cc.in: Maria plugin interface used. sql/sql_plugin.cc: Maria plugin interface added. sql/sql_plugin.h: Maria plugin interface used. sql/sql_show.cc: Maria plugin interface added. storage/archive/ha_archive.cc: Maria plugin interface added. storage/blackhole/ha_blackhole.cc: Maria plugin interface added. storage/csv/ha_tina.cc: Maria plugin interface added. storage/example/ha_example.cc: Maria plugin interface added. storage/federated/ha_federated.cc: Maria plugin interface added. storage/federatedx/ha_federatedx.cc: Maria plugin interface added. storage/heap/ha_heap.cc: Maria plugin interface added. storage/ibmdb2i/ha_ibmdb2i.cc: Maria plugin interface added. storage/innobase/handler/ha_innodb.cc: Maria plugin interface added. storage/innodb_plugin/handler/i_s.cc: Maria plugin interface added. storage/maria/ha_maria.cc: Maria plugin interface added. storage/myisam/ha_myisam.cc: Maria plugin interface added. storage/myisammrg/ha_myisammrg.cc: Maria plugin interface added. storage/pbxt/src/ha_pbxt.cc: Maria plugin interface added. storage/xtradb/handler/ha_innodb.cc: Maria plugin interface added. storage/xtradb/handler/i_s.cc: Maria plugin interface added. storage/xtradb/handler/i_s.h: Maria plugin interface added.
| * | | mergedSergei Golubchik2010-03-151-2/+7
| |\ \ \ | | | |/ | | |/|
| | * | 1. don't crash on failing to load a plugin with newer ↵Sergei Golubchik2010-03-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | MYSQL_PLUGIN_INTERFACE_VERSION 2. don't copy st_mysql_plugin structure unnecessary (sizeof hasn't changed)
| | * | small code cleanup - "good ifdef is no ifdef"Sergei Golubchik2010-03-081-1/+5
| | |/
| * | mwl:98 - libservicesSergei Golubchik2010-03-031-10/+0
| |/
* | Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-081-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives. client/mysqldump.c: Pass my_free directly as its signature is compatible with the callback type -- which wasn't the case for free_table_ent.