summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge bb-10.2-ext into 10.3Marko Mäkelä2017-10-041-2/+2
|\
| * Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-021-2/+2
| |\
| | * MDEV-13384 - misc Windows warnings fixedVladislav Vaintroub2017-09-281-2/+2
| | |
* | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-09-281-0/+6
|\ \ \ | |/ /
| * | A cleanup for MDEV-10577 and MDEV-13919: moving a few sp_rcontext methodsAlexander Barkov2017-09-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving a few methods from sp_rcontext to different classes: - Table_ident::resolve_table_rowtype_ref - Qualified_column_ident::resolve_type_ref - Row_definition_list::resolve_table_rowtype_ref - Row_definition_list::adjust_formal_params_to_actual_params It easier to reuse these methods this way in the future.
| * | MDEV-13907 compoind.test fails in build-bot for bb-10.2-extAlexander Barkov2017-09-261-0/+4
| | |
* | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-09-251-0/+23
|\ \ \ | |/ /
| * | Merge branch '10.2' into bb-10.2-extSergei Golubchik2017-09-231-0/+23
| |\ \ | | |/
| | * Merge branch '10.1' into 10.2Sergei Golubchik2017-09-221-0/+23
| | |\ | | | | | | | | | | | | | | | | But without f4f48e06215..f8a800bec81 - fixes for MDEV-12672 and related issues. 10.2 specific fix follows...
| | | * Merge branch '10.0' into 10.1Sergei Golubchik2017-09-211-0/+23
| | | |\
| | | | * MDEV-13861 Assertion `0' failed in Protocol::end_statementSergei Golubchik2017-09-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | followup for 378beed0a68 - only count WARN_LEVEL_ERROR, not warnings or notes.
| | | | * MDEV-13290: Assertion Assertion `!is_set() || (m_status == DA_OK_BULK && ↵Sergei Golubchik2017-09-201-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is_bulk_op())' or `! is_set()' failed followup for 97c2a7354b6 - don't use thd->is_error(), the error could've been set before TABLE_LIST::cleanup_items. Use the error handler to count errors. This fixes rpl.rpl_row_binlog_max_cache_size - it was failing when ER_STMT_CACHE_FULL happened duing multi-table update. Because multi_update::abort_result_set() calls do_updates() to update as much as possible, so one cannot rely on thd->is_error() after that.
* | | | | MDEV-13855 - Rename idle_readwrite_transaction_timeout toSergey Vojtovich2017-09-221-3/+3
| | | | | | | | | | | | | | | | | | | | idle_write_transaction_timeout
* | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-09-211-1/+0
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into bb-10.2-extMarko Mäkelä2017-09-201-1/+0
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.1' into 10.2Vicențiu Ciorbaru2017-09-191-1/+0
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-09-191-1/+1
| | | |\ \ | | | | |/
| | | | * Merge branch '5.5' into 10.0Vicențiu Ciorbaru2017-09-191-1/+1
| | | | |\
| | | | | * MDEV-13458: Wrong result for aggregate function with distinct clause when ↵Varun Gupta2017-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the value for tmp_table_size is small Fixed by making sure that the sort buffer would have atleast MERGEBUFF2 keys. Also fixed MDEV-13457 by making sure that an empty tree is never dumped to the disk
* | | | | | Cleanups and fixesMonty2017-09-081-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added missing delete thd in bootstrap() - Delete wrong 'delete thd' in start_wsrep_THD() - Added missing 'delete thd' in case of SCHEDULER_ONE_THREAD_PER_CONNECTION - Delete wrong dec_thread_running() in destroy_thd() as it caused thread_running to be wrong. - Moved reset_killed() to a normal function to make it easier to debug - Added check of mutex in wsrep_aborting_thd... functions
* | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-09-011-0/+7
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.2 into bb-10.2-extMarko Mäkelä2017-09-011-0/+7
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.1 into 10.2Marko Mäkelä2017-08-311-0/+2
| | |\ \ \ \ | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For running the Galera tests, the variable my_disable_leak_check was set to true in order to avoid assertions due to memory leaks at shutdown. Some adjustments due to MDEV-13625 (merge InnoDB tests from MySQL 5.6) were performed. The most notable behaviour changes from 10.0 and 10.1 are the following: * innodb.innodb-table-online: adjustments for the DROP COLUMN behaviour change (MDEV-11114, MDEV-13613) * innodb.innodb-index-online-fk: the removal of a (1,NULL) record from the result; originally removed in MySQL 5.7 in the Oracle Bug #16244691 fix https://github.com/mysql/mysql-server/commit/377774689bf6a16af74182753fe950d514c2c6dd * innodb.create-index-debug: disabled due to MDEV-13680 (the MySQL Bug #77497 fix was not merged from 5.6 to 5.7.10) * innodb.innodb-alter-autoinc: MariaDB 10.2 behaves like MySQL 5.6/5.7, while MariaDB 10.0 and 10.1 assign different values when auto_increment_increment or auto_increment_offset are used. Also MySQL 5.6/5.7 exhibit different behaviour between LGORITHM=INPLACE and ALGORITHM=COPY, so something needs to be tested and fixed in both MariaDB 10.0 and 10.2. * innodb.innodb-wl5980-alter: disabled because it would trigger an InnoDB assertion failure (MDEV-13668 may need additional effort in 10.2)
| | | * | | Merge remote-tracking branch 'origin/10.0-galera' into 10.1Jan Lindström2017-08-211-0/+2
| | | |\ \ \
| | | | * | | Refs: MW-360 * splitting DROP TABLE query in separate DROP commands for ↵sjaakola2017-08-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | temporary and real tables * not replicating temporary table DROP command * using wsrep_sidno GTID group only for innodb table drop command part all this follows more or less the logic of how mysql wants to split drop table list
| | | | * | | Merge tag 'mariadb-10.0.30' into bb-sachin-10.0-galera-mergeSachin Setiya2017-03-171-19/+0
| | | | |\ \ \ | | | | | |/ / | | | | | | | | | | | | | | Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
| | | | * | | Galera MTR Tests: fix variable output in ↵Sachin Setiya2017-03-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | galera_as_slave_gtid_replicate_do_db.result Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
| | | | * | | Merge tag 'mariadb-10.0.28' into 10.0-galeraNirbhay Choubey2016-10-281-1/+7
| | | | |\ \ \
| | * | | | | | Fix threadpool to report connections aborted due to wait timeout.Vladislav Vaintroub2017-08-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update wait_timeout.test to add test case for this.
* | | | | | | | MDEV-11371 - column compressionSergey Vojtovich2017-08-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 branch 'bb-10.2-ext' into 10.3Sergei Golubchik2017-08-261-13/+72
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge branch '10.2' into bb-10.2-extSergei Golubchik2017-08-251-13/+72
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-08-171-13/+72
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | MDEV-13179 main.errors fails with wrong errnoMonty2017-08-071-13/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the introduction of max-thread-mem-used can cause an allocation error very early, even before mysql_parse() is called. As mysql_parse() calls thd->reset_for_next_command(), which called clear_error(), the error number was lost. Fixed by adding an option to have unique messages for each KILL signal and change max-thread-mem-used to use this new feature. This removes a lot of problems with the original approach, where one could get errors signaled silenty almost any time. ixed by moving clear_error() from reset_for_next_command() to do_command(), before any memory allocation for the thread. Related changes: - reset_for_next_command() now have an optional parameter if we should call clear_error() or not. By default it's called, but not anymore from dispatch_command() which was the original problem. - Added optional paramater to clear_error() to force calling of reset_diagnostics_area(). Before clear_error() only called reset_diagnostics_area() if there was no error, so we normally called reset_diagnostics_area() twice. - This change removed several duplicated calls to clear_error() when starting a query. - Reset max_mem_used on COM_QUIT, to protect against kill during quit. - Use fatal_error() instead of setting is_fatal_error (cleanup) - Set fatal_error if max_thead_mem_used is signaled. (Same logic we use for other places where we are out of resources)
* | | | | | | | Optimize LEX_STRING comparisonsMichael Widenius2017-08-241-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added inline lex_string_cmp() to replace my_strcase_cmp(). - Added inline lex_string_eq to first compares lengths before comparing strings
* | | | | | | | New option for slow logging (log_slow_disable_statements)Monty2017-08-241-10/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes MDEV-7742 and MDEV-8305 (Allow user to specify if stored procedures should be logged in the slow and general log) New functionality: - Added new variables log_slow_disable_statements and log_disable_statements that can be used to disable logging of certain queries to slow and general log. Currently supported options are 'admin', 'call', 'slave' and 'sp'. Defaults are as before. Only 'sp' (stored procedure statements) is disabled for slow and general_log. - Slow log to files now includes the following new information: - When logging stored procedure statements the name of stored procedure is logged. - Number of created tmp_tables, tmp_disk_tables and the space used by temporary tables. - When logging 'call', the logged status now contains the sum of all included statements. Before only 'time' was correct. - Added filsort_priority_queue as an option for log_slow_filter (this variable existed before, but was not exposed) - Added support for BIT types in my_getopt() Mapped some old variables to bitmaps (old variables can still be used) - Variable 'log_queries_not_using_indexes' is mapped to log_slow_filter='not_using_index' - Variable 'log_slow_slave_statements' is mapped to log_slow_disabled_statements='slave' - Variable 'log_slow_admin_statements' is mapped to log_slow_disabled_statements='admin' - All the above variables are changed to session variables from global variables Other things: - Simplified LOGGER::log_command. We don't need to check for super if OPTION_LOG_OFF is set as this flag can only be set if one is a super user. - Removed some setting of enable_slow_log as it's guaranteed to be set by mysql_parse() - mysql_admin_table() now sets thd->enable_slow_log - Added prepare_logs_for_admin_command() to reset thd->enable_slow_log if needed. - Added new functions to store, restore and add slow query status - Added new functions to store and restore query start time - Reorganized Sub_statement_state according to types - Added code in dispatch_command() to ensure that thd->reset_for_next_command() is always called for a query. - Added thd->last_sql_command to simplify checking of what was the type of the last command. Needed when logging to slow log as lex->sql_command may have changed before slow logging is called. - Moved QPLAN_TMP_... to where status for tmp tables are updated - Added new THD variable, affected_rows, to be able to correctly log number of affected rows to slow log.
* | | | | | | | Added DBUG_ASSERT_AS_PRINTF compile flagMonty2017-08-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If compiling a non DBUG binary with -DDBUG_ASSERT_AS_PRINTF asserts will be changed to printf + stack trace (of stack trace are enabled). - Changed #ifndef DBUG_OFF to #ifdef DBUG_ASSERT_EXISTS for those DBUG_OFF that was just used to enable assert - Assert checking that could greatly impact performance where changed to DBUG_ASSERT_SLOW which is not affected by DBUG_ASSERT_AS_PRINTF - Added one extra option to my_print_stacktrace() to get more silent in case of stack trace printing as part of assert.
* | | | | | | | Optimize make_lex_string() to not call alloc_root twice.Michael Widenius2017-08-241-4/+18
| | | | | | | |
* | | | | | | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-08-151-2/+4
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | MDEV-13533 Remove the THD parameter from sp_head::init_sp_name()Alexander Barkov2017-08-151-2/+2
| | | | | | | |
| * | | | | | | MDEV-13531 Add Database_qualified_name::copy()Alexander Barkov2017-08-151-0/+2
| | | | | | | |
* | | | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2017-07-071-1/+10
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-07-071-1/+10
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-07-051-1/+10
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | MDEV-8075: DROP TEMPORARY TABLE not marked as ddl, causing optimistic ↵Kristian Nielsen2017-07-031-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parallel replication to fail CREATE/DROP TEMPORARY TABLE are not safe to optimistically replicate in parallel with other transactions, so they need to be marked as "ddl" in the binlog. This was already done for stand-alone CREATE/DROP TEMPORARY. But temporary tables can also be created and dropped inside a BEGIN...END transaction, and such transactions were not marked as ddl. Nor was the DROP TEMPORARY TABLE statement emitted implicitly when a client connection is closed. So this patch adds such ddl mark for the missing cases. The difference to Kristian's original patch is mainly a fix in mysql_trans_commit_alter_copy_data() to remember the unsafe_rollback_flags over the temporary commit.
* | | | | | | | Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3Alexander Barkov2017-07-051-8/+8
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | MDEV-13245 Add struct AUTHIDAlexander Barkov2017-07-051-7/+6
| | | | | | | |
| * | | | | | | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-07-041-1/+2
| |\ \ \ \ \ \ \ | | |/ / / / / /
| | * | | | | | Added tmp_disk_table_size to limit size of Aria temp tables in tmpdirMonty2017-06-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added variable tmp_disk_table_size - Added variable tmp_memory_table_size as an alias for tmp_table_size - Changed internal variable tmp_table_size to tmp_memory_table_size - create_info.data_file_length is now set with tmp_disk_table_size - Fixed that Aria doesn't reset max_data_file_length for internal tables - Added status flag if table is full so that we can detect this on next insert. This ensures that the table is always 'correct', but we get the error one row after the row that grow the table too big. - Removed some mutex lock for internal temporary tables