summaryrefslogtreecommitdiff
path: root/include/mysql.h.pp
Commit message (Collapse)AuthorAgeFilesLines
* remove MYSQL_SERVER requirementSergei Golubchik2021-10-191-5/+0
|
* Added support to MEM_ROOT for write protected memoryMonty2021-07-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | This is useful for thing like Item_true and Item_false that we allocated and initalize once and want to ensure that nothing can change them Main changes: - Memory protection is achived by allocating memory with mmap() and protect it from write with mprotect() - init_alloc_root(...,MY_ROOT_USE_MPROTECT) will create a memroot that one can later use with protect_root() to turn it read only or turn it back to read-write. All allocations to this memroot is done with mmap() to ensure page alligned allocations. - alloc_root() code was rearranged to combine normal and valgrind code. - init_alloc_root() now changes block size to be power of 2's, to get less memory fragmentation. - Changed MEM_ROOT structure to make it smaller. Also renamed MEM_ROOT m_psi_key to psi_key. - Moved MY_THREAD_SPECIFIC marker in MEM_ROOT from block size (old hack) to flags. - Added global variable my_system_page_size. This is initialized at startup.
* Merge 10.5 into 10.6Marko Mäkelä2021-02-111-1/+2
|\
| * Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 *'.
* | MDEV-21612 - remove COM_MULTI from server and C/CVladislav Vaintroub2020-07-141-1/+1
|/ | | | | | | The COM_MULTI did not take off. No connector is using it. Remove related code from server, and client. If anything it is a step simplification of already-bloated dispatch_command(), and related code.
* MDEV-16470: switch off user variables (and fixes of its support)bb-10.5-MDEV-22550Oleksandr Byelkin2020-06-121-1/+0
|
* perfschema memory related instrumentation changesSergei Golubchik2020-03-101-2/+7
|
* MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRYAlexander Barkov2020-03-101-0/+9
|
* MDEV-16470 - Session user variables trackerSergey Vojtovich2019-09-241-0/+1
| | | | Based on contribution by Dapeng Huang.
* Adding -D__cplusplus into the ABI check command lineAlexander Barkov2019-07-111-0/+10
| | | | | | | | | | | | | This will allow to check ABI for C++ plugins defined in include/mysql/plugin.h e.g. like this: struct st_mysql_xxx { int interface_version; const class XXX *xxx; }; Discussed with Serg.
* MDEV-19863 Add const to TYPELIB pointersAlexander Barkov2019-06-261-1/+1
|
* dirty mergeOleksandr Byelkin2019-02-071-1/+1
|\
| * Merge 10.1 into 10.2Marko Mäkelä2019-02-031-1/+1
| |\ | | | | | | | | | | | | | | | Temporarily disable a test for commit 2175bfce3e9da8332f10ab0e0286dc93915533a2 because fixing it in 10.2 requires updating libmariadb.
| | * Merge 10.1 into 10.1Marko Mäkelä2019-02-021-1/+1
| | |\ | | | | | | | | | | | | This is joint work with Oleksandr Byelkin.
| | | * Merge branch '5.5' into 10.0Oleksandr Byelkin2019-01-281-1/+1
| | | |\
| | | | * Crude "auto-load-data-local-infile" modemariadb-5.5.63Sergei Golubchik2019-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable LOAD DATA LOCAL INFILE suport by default and auto-enable it for the duration of one query, if the query string starts with the word "load". In all other cases the application should enable LOAD DATA LOCAL INFILE support explicitly.
* | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2018-02-041-0/+1
|\ \ \ \ \
| * | | | | Added name to MEM_ROOT for esier debuggingMonty2018-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will make it easier to how memory allocation is done when debugging with either DBUG or gdb. Will especially help when debugging stored procedures Main change is a name argument as second argument to init_alloc_root() init_sql_alloc() Other things: - Added DBUG_ENTER/EXIT to some Virtual_tmp_table functions
* | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-01-041-2/+0
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extMonty2018-01-011-2/+0
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/make_dist.cmake.in mysql-test/r/func_json.result mysql-test/r/ps.result mysql-test/t/func_json.test mysql-test/t/ps.test sql/item_cmpfunc.h
| | * | | | Merge remote-tracking branch 'origin/10.1' into 10.2Vicențiu Ciorbaru2017-12-221-2/+0
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2017-12-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find_type_or_exit() client helper did exit(1) on error, exit(1) moved to clients. mysql_read_default_options() did exit(1) on error, error is passed through and handled now. my_str_malloc_default() did exit(1) on error, replaced my_str_ allocator functions with normal my_malloc()/my_realloc()/my_free(). sql_connect.cc did many exit(1) on hash initialisation failure. Removed error check since my_hash_init() never fails. my_malloc() did exit(1) on error. Replaced with abort(). my_load_defaults() did exit(1) on error, replaced with return 2. my_load_defaults() still does exit(0) when invoked with --print-defaults.
* | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-11-101-0/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Reducing memory when using information schemaMonty2017-11-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The background is that one user had a lot of views and using some complex queries on information schema temporary memory of more than 2G was used. - Added new element 'total_alloc' to MEM_ROOT for easier debugging. - Added MAX_MEMORY_USED to information_schema.processlist. - Added new status variable "Memory_used_initial" that shows how much MariaDB uses at startup. This gives the base value for "Memory_used". - Reuse memory continuously for information schema queries instead of only freeing memory at query end. Other things - Removed some not needed set_notnull() calls for not null columns.
* | | | | | MDEV-11371 - column compressionSergey Vojtovich2017-08-311-0/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Storage engine independent support for column compression. TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, VARCHAR and VARBINARY columns can be compressed. New COMPRESSED column attribute added: COMPRESSED[=<compression_method>] System variables added: column_compression_threshold column_compression_zlib_level column_compression_zlib_strategy column_compression_zlib_wrap Status variables added: Column_compressions Column_decompressions Limitations: - the only supported method currently is zlib - CSV storage engine stores data uncompressed on-disk even if COMPRESSED attribute is present - it is not possible to create indexes over compressed columns.
* | | | | Merge 10.2 into bb-10.2-ext; also, fix MDEV-13015 After restart, InnoDB ↵Marko Mäkelä2017-06-151-1/+2
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wrongly thinks that a SEQUENCE is a TABLE sql_sequence.read_only: Show that the sequence can be read in both read-only and read-write mode, and that the sequence remains accessible after a server restart.
| * | | | MDEV-12471: BULK CommandOleksandr Byelkin2017-06-141-1/+2
| | | | | | | | | | | | | | | | | | | | BULK execution moved to a new command.
* | | | | Changing field::field_name and Item::name to LEX_CSTRINGMonty2017-04-231-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | MDEV-10340: support COM_RESET_CONNECTIONOleksandr Byelkin2017-02-101-0/+2
| | | |
* | | | MDEV-11359 Implement IGNORE for bulk operationOleksandr Byelkin2016-11-291-1/+2
| | | |
* | | | MDEV-9114: Bulk operations (Array binding)Oleksandr Byelkin2016-11-021-5/+11
| | | | | | | | | | | | | | | | (+ default values)
* | | | MDEV-11187: Server does not compile on labradorKristian Nielsen2016-10-311-2/+2
| | | |
* | | | fix the ABI checkvinchen2016-10-211-0/+2
| | | |
* | | | fix the ABI and stop slave hang problemvinchen2016-10-211-1/+0
| | | |
* | | | fix common test suitevinchen2016-10-191-0/+1
| | | |
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-09-091-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-1/+1
| |\ \ \ | | |/ /
| | * | Fixed "Packets out of order" warning message on stdout in clients,Monty2016-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compiled for debugging, when the server goes down This happens in the following scenario: - Server gets a shutdown message - Servers sends error ER_CONNECTION_KILLED to the clients connection - The client sends a query to the server, before the server has time to close the connection to the client - Client reads the ER_CONNECTION_KILLED error message In the above case, the packet number for the reply is one less than what the client expected and the client prints "Packets out of order". Fixed the following way: - The client accepts now error packages with a packet number one less than expected. - To ensure that this issue can be detected early in my_real_read(), error messages sent to the client are not compressed, even when compressed protocol is used.
* | | | MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | Postreview fixes. New MySQL tests fixes.
* | | | MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-1/+2
| | | | | | | | | | | | | | | | Transaction tracker
* | | | MDEV-8931: (server part of) session state trackingOleksandr Byelkin2016-08-311-0/+9
| | | | | | | | | | | | | | | | initial commit to test
* | | | Better SHOW PROCESSLIST for replicationMonty2016-08-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When waiting for events, start time is now counted from start of wait - Instead of having "Connect" as "Command" for all replication threads we now have: - Slave_IO for Slave thread reading relay log - Slave_SQL for slave executing SQL commands or distribution queries to Slave workers - Slave_worker for slave threads executin SQL commands in parallel replication
* | | | MDEV-9058: protocol: COM_MULTI command (part 1)Oleksandr Byelkin2016-03-181-0/+3
|/ / / | | | | | | | | | Adding a command from the end of avaliable commands numering space (254)
* | | A clean-up after the patch for MDEV-8747 and MDEV-8749:Alexander Barkov2015-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | removing IMPOSSIBLE_RESULT from Item_result, as it's not needed any more. The fact that an Item is not in a comparison context is now always designated by IDENTITY_SUBST in Subst_constraint. Previously IMPOSSIBLE_RESULT and IDENTITY_SUBST co-existed but actually meant the same thing.
* | | MDEV-6152: Remove calls to current_thd while creating ItemMonty2015-09-011-2/+2
| | | | | | | | | | | | | | | Part 5: Removing calls to current_thd in net_read calls, creating fields, query_cache, acl and some other places where thd was available
* | | Merge tag 'mariadb-10.0.20' into 10.1Sergei Golubchik2015-06-271-7/+0
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-06-111-7/+0
| |\ \ | | |/
| | * MDEV-8052 abi detection incorrect with clangSergei Golubchik2015-06-031-7/+0
| | | | | | | | | | | | don't include #include directives into .pp files
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-03-071-2/+2
|\ \ \ | |/ /