summaryrefslogtreecommitdiff
path: root/sql/tztime.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2020-08-101-9/+10
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-08-101-9/+10
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2020-08-101-9/+10
| | |\
| | | * MDEV-22626: mysql_tzinfo_to_sql not replicates timezone to galeranodes if ↵Jan Lindström2020-08-071-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | only 1 timezone will be loaded. Move alter to InnoDB earlier to more correct place to handle also if only a one timezone file is loaded.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-311-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-05-261-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-05-251-1/+1
| | |\ \ | | | |/
| | | * Fixed deadlock with LOCK TABLES and ALTER TABLEMonty2020-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-21398 Deadlock (server hang) or assertion failure in Diagnostics_area::set_error_status upon ALTER under lock This failure could only happen if one locked the same table multiple times and then did an ALTER TABLE on the table. Major change is to change all instances of table->m_needs_reopen= true; to table->mark_table_for_reopen(); The main fix for the problem was to ensure that we mark all instances of the table in the locked_table_list and when we reopen the tables, we first close all tables before reopening and locking them. Other things: - Don't call thd->locked_tables_list.reopen_tables if there are no tables marked for reopen. (performance)
* | | | Fixed access to undefined memory found by valgrind and MSANMonty2020-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When my_vsnprintf() is patched, the code protected disabled with 'WAITING_FOR_BUGFIX_TO_VSPRINTF' should be enabled again. Also all %b formats in this patch should be revert to %s again
* | | | Aria will now register it's transactionsMonty2020-05-231-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22531 Remove maria::implicit_commit() MDEV-22607 Assertion `ha_info->ht() != binlog_hton' failed in MYSQL_BIN_LOG::unlog_xa_prepare From the handler point of view, Aria now looks like a transactional engine. One effect of this is that we don't need to call maria::implicit_commit() anymore. This change also forces the server to call trans_commit_stmt() after doing any read or writes to system tables. This work will also make it easier to later allow users to have system tables in other engines than Aria. To handle the case that Aria doesn't support rollback, a new handlerton flag, HTON_NO_ROLLBACK, was added to engines that has transactions without rollback (for the moment only binlog and Aria). Other things - Moved freeing of MARIA_SHARE to a separate function as the MARIA_SHARE can be still part of a transaction even if the table has closed. - Changed Aria checkpoint to use the new MARIA_SHARE free function. This fixes a possible memory leak when using S3 tables - Changed testing of binlog_hton to instead test for HTON_NO_ROLLBACK - Removed checking of has_transaction_manager() in handler.cc as we can assume that as the transaction was started by the engine, it does support transactions. - Added new class 'start_new_trans' that can be used to start indepdendent sub transactions, for example while reading mysql.proc, using help or status tables etc. - open_system_tables...() and open_proc_table_for_Read() doesn't anymore take a Open_tables_backup list. This is now handled by 'start_new_trans'. - Split thd::has_transactions() to thd::has_transactions() and thd::has_transactions_and_rollback() - Added handlerton code to free cached transactions objects. Needed by InnoDB. squash! 2ed35999f2a2d84f1c786a21ade5db716b6f1bbc
* | | | cleanup: PSI key is *always* the first argumentSergei Golubchik2020-03-101-6/+4
| | | |
* | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-101-6/+18
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-12-271-5/+5
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-12-271-5/+5
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-12-271-5/+5
| | |\ \ | | | |/
| | | * Merge 10.1 into 10.2Marko Mäkelä2019-12-231-5/+5
| | | |\
| | | | * MDEV-21209 : mysql_tzinfo_to_sql's Galera checks do not workJan Lindström2019-12-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | wsrep_on parameter can be visible even when wsrep_on is set OFF so we need to check variable_value from I_S also.
| | * | | Merge 10.2 into 10.3Marko Mäkelä2019-08-211-9/+55
| | |\ \ \ | | | |/ /
| | | * | Merge 10.1 into 10.2Marko Mäkelä2019-08-201-9/+55
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For MDEV-15955, the fix in create_tmp_field_from_item() would cause a compilation error. After a discussion with Alexander Barkov, the fix was omitted and only the test case was kept. In 10.3 and later, MDEV-15955 is fixed properly by overriding create_tmp_field() in Item_func_user_var.
| | | | * MDEV-18778: mysql_tzinfo_to_sql does not work correctly in MariaDB GaleraJan Lindström2019-08-161-9/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two problems: (1) If user wanted same time zone information on all nodes in the Galera cluster all updates were not replicated as time zone information was stored on MyISAM tables. This is fixed on Galera by altering time zone tables to InnoDB while they are modified. (2) If user wanted different time zone information to nodes in the Galera cluster TRUNCATE TABLE for time zone tables was replicated by Galera destroying time zone information from other nodes. This is fixed on Galera by introducing new option for mysql_tzinfo_to_sql_symlink tool --skip-write-binlog to disable Galera replication while time zone tables are modified. Changes to be committed: modified: mysql-test/r/mysql_tzinfo_to_sql_symlink.result modified: mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result new file: mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result new file: mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test modified: sql/tztime.cc
* | | | | MDEV-12684 Show what config file a sysvar got a value fromSergei Golubchik2019-10-141-4/+3
|/ / / / | | | | | | | | | | | | | | | | change get_one_option() prototype to pass the filename and not to pass the redundant optid.
* | | | MDEV-18778: mysql_tzinfo_to_sql does not work correctly in MariaDB GaleraJan Lindström2019-08-161-9/+55
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two problems: (1) If user wanted same time zone information on all nodes in the Galera cluster all updates were not replicated as time zone information was stored on MyISAM tables. This is fixed on Galera by altering time zone tables to InnoDB while they are modified. (2) If user wanted different time zone information to nodes in the Galera cluster TRUNCATE TABLE for time zone tables was replicated by Galera destroying time zone information from other nodes. This is fixed on Galera by introducing new option for mysql_tzinfo_to_sql_symlink tool --skip-write-binlog to disable Galera replication while time zone tables are modified. Changes to be committed: modified: mysql-test/r/mysql_tzinfo_to_sql_symlink.result modified: mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result new file: mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result new file: mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test modified: sql/tztime.cc This is 10.4 version of commit fa74088838c12210d782aa6c69faa5acebc1d3bc
* | | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\ \ \ | |/ /
| * | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| |\ \ | | |/
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2019-03-171-6/+2
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2019-03-151-8/+3
| |\ \ \ | | |/ /
| | * | fix gcc 8 compiler warningsSergei Golubchik2019-03-141-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two newly enabled warnings: 1. cast for a function pointers. Affected sql_analyse.h, mi_write.c and ma_write.cc, mf_iocache-t.cc, mysqlbinlog.cc, encryption.cc, etc 2. memcpy/memset of nontrivial structures. Fixed as: * the warning disabled for InnoDB * TABLE, TABLE_SHARE, and TABLE_LIST got a new method reset() which does the bzero(), which is safe for these classes, but any other bzero() will still cause a warning * Table_scope_and_contents_source_st uses `TABLE_LIST *` (trivial) instead of `SQL_I_List<TABLE_LIST>` (not trivial) so it's safe to bzero now. * added casts in debug_sync.cc and sql_select.cc (for JOIN) * move assignment method for MDL_request instead of memcpy() * PARTIAL_INDEX_INTERSECT_INFO::init() instead of bzero() * remove constructor from READ_RECORD() to make it trivial * replace some memcpy() with c++ copy assignments
* | | | Merge 10.2 into 10.3Marko Mäkelä2018-08-031-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-1/+1
| |\ \ \ | | |/ /
| | * | Merge branch '10.0' into bb-10.1-merge-sanjaOleksandr Byelkin2018-07-251-1/+1
| | |\ \
| | | * | MDEV-13397 MariaDB upgrade fail when using default_time_zoneSergei Golubchik2018-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't try to set default time zone in --bootstrap, this generally cannot be done, as timezone tables aren't loaded. and bootstrap scripts don't need it anyway.
| | * | | MDEV-14265 - RPMLint warning: shared-lib-calls-exitSergey Vojtovich2018-03-161-3/+1
| | | | | | | | | | | | | | | | | | | | Eliminated last exit() call from libmysqld.
* | | | | Add likely/unlikely to speed up executionMonty2018-05-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added to: - if (error) - Lex - sql_yacc.yy and sql_yacc_ora.yy - In header files to alloc() calls - Added thd argument to thd_net_is_killed()
* | | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-03-281-3/+1
|\ \ \ \ \ | |/ / / /
| * | | | After-merge fix for commit 98eb9518db1da854048b09d94244a982a1d32f9aMarko Mäkelä2018-03-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merge only covered 10.1 up to commit 4d248974e00eb915a2fc433cc6b2fb5146281594. Actually merge the changes up to commit 0a534348c75cf435d2017959855de2efa798fd0b. Also, remove the unused InnoDB field trx_t::abort_type.
* | | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↵Vladislav Vaintroub2018-02-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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-4/+5
|\ \ \ \ \
| * | | | | Added name to MEM_ROOT for esier debuggingMonty2018-02-021-4/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Change C_STRING_WITH_LEN to STRING_WITH_LENMonty2018-01-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This preserves const str for constant strings Other things - A few variables where changed from LEX_STRING to LEX_CSTRING - Incident_log_event::Incident_log_event and record_incident where changed to take LEX_CSTRING* as an argument instead of LEX_STRING
* | | | | Changed database, tablename and alias to be LEX_CSTRINGMonty2018-01-301-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was done in, among other things: - thd->db and thd->db_length - TABLE_LIST tablename, db, alias and schema_name - Audit plugin database name - lex->db - All db and table names in Alter_table_ctx - st_select_lex db Other things: - Changed a lot of functions to take const LEX_CSTRING* as argument for db, table_name and alias. See init_one_table() as an example. - Changed some function arguments from LEX_CSTRING to const LEX_CSTRING - Changed some lists from LEX_STRING to LEX_CSTRING - threads_mysql.result changed because process list_db wasn't always correctly updated - New append_identifier() function that takes LEX_CSTRING* as arguments - Added new element tmp_buff to Alter_table_ctx to separate temp name handling from temporary space - Ensure we store the length after my_casedn_str() of table/db names - Removed not used version of rename_table_in_stat_tables() - Changed Natural_join_column::table_name and db_name() to never return NULL (used for print) - thd->get_db() now returns db as a printable string (thd->db.str or "")
* | | | | Enusure that my_global.h is included firstMichael Widenius2017-08-241-3/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | Reuse THD for new user connectionsMonty2016-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To ensure that mallocs are marked for the correct THD, even if it's allocated in another thread, I added the thread_id to the THD constructor - Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var - Moved things from THD::THD() to THD::init() - Moved some things to THD::cleanup() - Added THD::free_connection() and THD::reset_for_reuse() - Added THD to CONNECT::create_thd() - Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed to ensure that we have a constant thread_id used for debugging with a THD, even if it changes thread_id (=connection_id) - Set variables.pseudo_thread_id in constructor. Removed not needed sets.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-231-4/+4
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-4/+4
| |\ \ \ | | |/ /
| | * | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-4/+4
| | | |
| | * | MDEV-9088 Server crashes on shutdown after the second post of feedback reportSergei Golubchik2015-12-191-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On shutdown feedback was sending a short report without creating a THD. At that point current_thd was pointing to the already destroyed THD from the previous full report. backport from 10.1: commit bfe703a Author: Sergei Golubchik <serg@mariadb.org> Date: Tue Feb 3 18:19:56 2015 +0100 don't let current_thd to point to a destroyed THD
* | | | MDEV-8715 - Obsolete sql_alloc() in favor of THD::alloc() and thd_alloc()Sergey Vojtovich2015-11-261-2/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following left in semi-improved state to keep patch size reasonable: - Field operator new: left thd_alloc(current_thd) - Sql_alloc operator new: left thd_alloc(thd_get_current_thd()) - Item_args constructors: left thd_alloc(thd) - Item_func_interval::fix_length_and_dec(): no THD arg, have to call current_thd - Item_func_dyncol_exists::val_int(): same - Item_dyncol_get::val_str(): same - Item_dyncol_get::val_int(): same - Item_dyncol_get::val_real(): same - Item_dyncol_get::val_decimal(): same - Item_singlerow_subselect::fix_length_and_dec(): same
* | | Merge tag 'mariadb-10.0.20' into 10.1Sergei Golubchik2015-06-271-1/+2
|\ \ \ | |/ /