summaryrefslogtreecommitdiff
path: root/sql/set_var.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-2/+0
| | | | Transaction tracker
* MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-0/+7
| | | | System variables tracking
* MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-1/+1
| | | | initial commit to test
* CleanupsMonty2016-04-281-0/+1
| | | | | | | | - Avoid some realloc() during startup - Ensure that file_key_management_plugin frees it's memory early, even if it's linked statically. - Fixed compiler warnings from unused variables and missing destructors - Fixed wrong indentation
* MDEV-9516 type error when setting session variableAlexander Barkov2016-03-221-2/+4
| | | | Allowing assigning of DECIMAL(N,0) values to INT-alike system variables.
* MDEV-8466 CAST works differently for DECIMAL/INT vs DOUBLE for empty stringsAlexander Barkov2015-09-171-1/+1
| | | | MDEV-8468 CAST and INSERT work differently for DECIMAL/INT vs DOUBLE for a string with trailing spaces
* MDEV-6066: Merge new defaults from 5.6 and 5.7Sergei Golubchik2015-09-041-6/+0
| | | | cosmetic fixes. test fixes.
* MDEV-6066: Merge new defaults from 5.6 and 5.7 (autoset)Oleksandr Byelkin2015-09-041-3/+16
| | | | --autoset- command line prefix added
* Stage 2 of MDEV-6152:Monty2015-08-211-17/+1
| | | | | | | | - Added mem_root to all calls to new Item - Added private method operator new(size_t size) to Item to ensure that we always use a mem_root when creating an item. This saves use once call to current_thd per Item creation
* MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)Sergey Vojtovich2015-08-211-2/+3
| | | | | | | Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
* SET STATEMENT timestamp=xxx ....Sergei Golubchik2015-04-091-3/+9
| | | | | | | | | | | fix sys_var->is_default() method (that was using default_val property in a global sys_var object to track per-session state): * move timestamp to a dedicated Sys_var_timestamp class (in fact, rename Sys_var_session_special_double to Sys_var_timestamp) * make session_is_default a virtual method with a special implementation for timestamps * other variables don't have a special behavior for default values and can have session_is_default() to be always false.
* MDEV-6960 Server crashes in check_alter_user on setting a default role via PSSergei Golubchik2015-02-281-1/+1
| | | | | | | | | | | | | | There were two issues: * set_var_default_role::user was overwritten with a new value, allocated in the thd->mem_root, which is reset between executions. That was causing the crash. Solved by introducing set_var_default_role::real_user * when privilege tables were opened on EXECUTE, the reprepare_observer would abort the statement (as privilege tables are opened using the local TABLE_LIST that doesn't preserve metadata from PREPARE, so reprepare_observer thought they're changed). This issue also applied to SET PASSWORD. Solved by disabling reprepare_observer.
* validate SET PASSWORDSergei Golubchik2014-12-041-3/+1
|
* MDEV-5231: Per query variables from Percona Server (rewritten)Oleksandr Byelkin2014-11-111-2/+9
|
* Merge 10.0.14 into 10.1Sergei Golubchik2014-10-151-3/+1
|\
| * Using more Item_string_sysAlexander Barkov2014-09-041-3/+1
| |
* | GLOBAL_VALUE_ORIGIN=AUTOSergei Golubchik2014-10-111-1/+9
| |
* | INFORMATION_SCHEMA.SYSTEM_VARIABLES.GLOBAL_VALUE_ORIGINSergei Golubchik2014-10-111-0/+2
| |
* | MDEV-6138 show sysvar's help in I_S tablesSergei Golubchik2014-10-111-0/+4
| | | | | | | | INFORMATION_SCHEMA.SYSTEM_VARIABLES
* | bugs in sys_var::val_* codeSergei Golubchik2014-10-101-2/+2
| | | | | | | | | | | | | | | | 1. @@boolean_var differs from SHOW VARIABLES 2. @@str_var ignored variable charset (which is wrong for path variables that use filesystem charset) 3. @@signed_int_var in the string context was printed as unsigned
* | cleanup: simplify sys_var::val* methods, introduce val_str_nolock()Sergei Golubchik2014-10-101-3/+4
| |
* | cleanup: more 'const' qualifiersSergei Golubchik2014-10-101-3/+3
| |
* | cleanup: sysvar, only one common check_update_type()Sergei Golubchik2014-10-101-1/+25
| |
* | cleanup: sysvar, SHOW_VALUE_IN_HELP->GETOPT_ONLY_HELPSergei Golubchik2014-10-101-4/+20
| | | | | | | | | | | | replace flag SHOW_VALUE_IN_HELP (that's not really an independendent flag, as it should only be used for NO_CMD_LINE sysvars) with a special getopt.id type.
* | cleanup: galera merge, simple changesSergei Golubchik2014-10-011-6/+0
| |
* | MDEV-6247: Merge 10.0-galera to 10.1.Jan Lindström2014-08-261-0/+6
| | | | | | | | | | | | | | | | | | Merged lp:maria/maria-10.0-galera up to revision 3879. Added a new functions to handler API to forcefully abort_transaction, producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These were added for future possiblity to add more storage engines that could use galera replication.
* | Added default role implementationVicentiu Ciorbaru2014-07-231-0/+12
|/
* MDEV-6027 RLIKE: "." no longer matching new line Alexander Barkov2014-04-231-0/+1
| | | | | | Added a new system variable: default_regex_flags='DOTALL,DUPNAMES,EXTENDED,EXTRA,MULTILINE,UNGREEDY'
* 10.0-base mergeSergei Golubchik2014-02-261-0/+1
|\
| * 5.5 mergeSergei Golubchik2014-02-251-0/+1
| |\
| | * MySQL-5.5.36 mergeSergei Golubchik2014-02-171-0/+1
| | |\ | | | | | | | | | | | | (without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
| | | * Updated/added copyright headersMurthy Narkedimilli2014-01-061-1/+1
| | | |
* | | | Automatic mergeMichael Widenius2014-02-051-3/+4
|\ \ \ \
| * | | | Fixes to get valgrind to work with jemallocMichael Widenius2014-01-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added MALLOC_LIBRARY variable to hold name of malloc library - Back ported valgrind related fixes from jemalloc 3.4.1 to the included jemalloc 3.3.1 - Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1 - Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc - Show version related variables in mysqld --help -- Added SHOW_VALUE_IN_HELP marker Increased back_log to 150 as the original value was a bit too small CMakeLists.txt: Added MALLOC_LIBRARY variable to hold name of malloc library cmake/jemalloc.cmake: Added MALLOC_LIBRARY variable to hold name of malloc library config.h.cmake: Added MALLOC_LIBRARY variable to hold name of malloc library extra/jemalloc/ChangeLog: Updates changelog extra/jemalloc/include/jemalloc/internal/arena.h: Backported valgrind fixes from jemalloc 3.4.1 extra/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in: Backported valgrind fixes from jemalloc 3.4.1 extra/jemalloc/include/jemalloc/internal/private_namespace.h: Backported valgrind fixes from jemalloc 3.4.1 extra/jemalloc/include/jemalloc/internal/tcache.h: Backported valgrind fixes from jemalloc 3.4.1 extra/jemalloc/src/arena.c: Backported valgrind fixes from jemalloc 3.4.1 include/my_bitmap.h: Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() to avoid clash with jemalloc 3.4.1 mysql-test/mysql-test-run.pl: Use option --soname-synonyms=somalloc=NON to valgrind when using jemalloc mysql-test/valgrind.supp: Supression of memory leak in OpenSuse 12.3 mysys/my_bitmap.c: Renamed bitmap_init() and bitmap_free() to my_bitmap_init() and my_bitmap_free() sql/ha_ndbcluster_binlog.cc: Renames sql/ha_ndbcluster_cond.h: Renames sql/ha_partition.cc: Renames sql/handler.cc: Renames sql/item_subselect.cc: Renames sql/log_event.cc: Renames sql/log_event_old.cc: Renames sql/mysqld.cc: Renames Show version related variables in mysqld --help sql/opt_range.cc: Renames sql/opt_table_elimination.cc: Renames sql/partition_info.cc: Renames sql/rpl_injector.h: Renames sql/set_var.h: Renames sql/slave.cc: Renames sql/sql_bitmap.h: Renames sql/sql_insert.cc: Renames sql/sql_lex.h: Renames sql/sql_parse.cc: Renames sql/sql_partition.cc: Renames sql/sql_select.cc: Renames sql/sql_show.cc: Renames sql/sql_update.cc: Renames sql/sys_vars.cc: Show version related variables in mysqld --help sql/sys_vars.h: Added SHOW_VALUE_IN_HELP marker for variables that should be shown in --help sql/table.cc: Renames sql/table.h: Removed not used bitmap_init_value storage/connect/ha_connect.cc: Removed compiler warning storage/maria/ma_open.c: Renames unittest/mysys/bitmap-t.c: Renames
* | | | | 10.0-base mergeSergei Golubchik2014-02-031-1/+2
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | 5.5 mergeSergei Golubchik2014-02-011-1/+2
| |\ \ \ \ | | |/ / / | |/| / / | | |/ /
| | * | MySQL-5.5.35 mergeSergei Golubchik2014-01-221-1/+2
| | |\ \ | | | |/
| | | * BUG#16032946 - PLEASE GIVE A MESSAGE FOR "THREAD_CONCURRENCY DOESN'TNisha Gopalakrishnan2013-09-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DO WHAT YOU EXPECT" Fix info: -------- Backport of the deprecation bug fix (WL#5265) for global variable 'THREAD_CONCURRENCY' from mysql-5.6 to mysql-5.5 Note: With this backport, certain additional deprecation warnings would be reported under error conditions while setting the global/session variables.
* | | | MDEV-5521 SET ROLE as prepared statement crashes the serverSergei Golubchik2014-01-281-3/+4
|/ / / | | | | | | | | | set_role::light_check() was incorrect
* | | Modified set_role_var to implement both a role check in the check() function,Vicențiu Ciorbaru2013-10-171-3/+3
| | | | | | | | | | | | | | | as well as only set privileges in the update() function.
* | | Created new set_var_role class to handle the SET ROLE commandVicențiu Ciorbaru2013-10-171-0/+11
| | |
* | | 5.5 mergeSergei Golubchik2013-07-171-1/+1
|\ \ \ | |/ /
| * | mysql-5.5.32 mergeSergei Golubchik2013-07-161-1/+1
| |\ \ | | |/
| | * Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADERMurthy Narkedimilli2013-03-191-1/+1
| | |
* | | 5.5 mergeSergei Golubchik2013-06-061-2/+8
|\ \ \ | |/ /
| * | mysql-5.5.31 mergeSergei Golubchik2013-05-071-2/+8
| |\ \ | | |/
| | * Bug #16044655 CRASH: SETTING DEFAULT VALUE FOR SOME VARIABLESAnnamalai Gurusami2013-02-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When a system variable is being set to the DEFAULT value, the server segfaults if there is no 'default' defined for that system variable. For example, for the following statements server segfaults. set session rand_seed1=DEFAULT; set session rand_seed2=DEFAULT; Analysis: The class sys_var represents one system variable. The class set_var represents one system variable that is to be updated. The class set_var contains two pieces of information, the system variable to object (set_var::var) member and the value to be updated (set_var::value). When the given value is 'default', the set_var::value will be NULL. To update a system variable the member set_var::update() will be called, which in turn will call sys_var::update() or sys_var::set_default() depending on whether a value has been provided or not. If the sys_var::set_default() is called, then the default value is obtained either from the session scope or the global scope. This default value is stored in a local temporary set_var object and then passed on to the sys_var::update() call. A local temporary set_var object is needed because sys_var::set_default() does not take set_var as an argument. In the given scenario, the set_var::update() called sys_var::set_default(). And this sys_var::set_default() obtains the default value and then calls sys_var::update(). To pass this value to sys_var::update() a local set_var object is being created. While creating this local set_var object, its member set_var::var was incorrectly left as 0. Solution: Instead of creating a local set_var object, the sys_var::set_default() can take the set_var object as an argument just like sys_var::update(). rb://1996 approved by Nirbhay and Ramil.
| | * Merge from mysql-5.1 to mysql-5.5Annamalai Gurusami2013-02-221-5/+15
| | |\
| | | * Bug #14211565 CRASH WHEN ATTEMPTING TO SET SYSTEM VARIABLE TO RESULT OF VALUES()Annamalai Gurusami2013-02-221-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When the VALUES() function is inappropriately used in the SET stmt the server exits. set port = values(v); This happens because the values(v) will be parsed as an Item_insert_value by the parser. Both Item_field and Item_insert_value return the type as FIELD_ITEM. But for Item_insert_value the field_name member is NULL. In set_var constructor, when the type of the item is FIELD_ITEM we try to access the non-existent field_name. The class hierarchy is as follows: Item -> Item_ident -> Item_field -> Item_insert_value The Item_ident::field_name is NULL for Item_insert_value. Solution: In the parsing stage, in the set_var constructor if the item type is FIELD_ITEM and if the field_name is non-existent, then it is probably the Item_insert_value. So leave it as it is for later evaluation. rb://2004 approved by Roy and Norvald.
* | | | create sys_var::val_str(), sys_var::val_int(), sys_var::val_real().Sergei Golubchik2013-04-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Item_func_get_system_var::val_xxx functions to use that. mysql-test/t/variables.test: @@GLOBAL.INIT_CONNECT is never NULL anymore. Nor it ever was. It was a bug that empty string system variables appeared as NULL in the *integer context* (but not in a string, real, or decimal context!)