From d3976cf72a41ddd660167473d3a86def881f88b6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 20 Sep 2017 15:59:40 +0200 Subject: remove an empty file with a wrong name --- cmake/CMakeLis.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 cmake/CMakeLis.txt diff --git a/cmake/CMakeLis.txt b/cmake/CMakeLis.txt deleted file mode 100644 index e69de29bb2d..00000000000 -- cgit v1.2.1 From 8f3fd98d25da483efd2ce8eb2300d842b4f5e21f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 20 Sep 2017 17:07:05 +0200 Subject: connect fixes after-merge disable Mongo in 10.0, compiler warnings. --- storage/connect/CMakeLists.txt | 2 +- storage/connect/preparse.h | 2 +- storage/connect/tabmysql.h | 2 +- storage/connect/tabutil.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index f0f34c8eefc..1f687c3c8d8 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -247,7 +247,7 @@ ENDIF(CONNECT_WITH_ODBC) # # JDBC with MongoDB Java Driver included but disabled # -OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON) +#OPTION(CONNECT_WITH_MONGO "Compile CONNECT storage engine with MONGO support" ON) OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON) IF(CONNECT_WITH_JDBC) diff --git a/storage/connect/preparse.h b/storage/connect/preparse.h index f16624548fb..3db7a2af1cd 100644 --- a/storage/connect/preparse.h +++ b/storage/connect/preparse.h @@ -8,7 +8,7 @@ /***********************************************************************/ typedef struct _datpar { const char *Format; // Points to format to decode - char *Curp; // Points to current parsing position + const char *Curp; // Points to current parsing position char *InFmt; // Start of input format char *OutFmt; // Start of output format int Index[8]; // Indexes of date values diff --git a/storage/connect/tabmysql.h b/storage/connect/tabmysql.h index 39fba87bcc9..4b61c7eb762 100644 --- a/storage/connect/tabmysql.h +++ b/storage/connect/tabmysql.h @@ -135,7 +135,7 @@ class TDBMYSQL : public TDBEXT { int m_Rc; // Return code from command //int AftRows; // The number of affected rows int N; // The current table index - int Port; // MySQL port number (0 = default) + unsigned Port; // MySQL port number (0 = default) //int Nparm; // The number of statement parameters //int Quoted; // The identifier quoting level }; // end of class TDBMYSQL diff --git a/storage/connect/tabutil.cpp b/storage/connect/tabutil.cpp index a2c04e2cf62..af77c87ef8d 100644 --- a/storage/connect/tabutil.cpp +++ b/storage/connect/tabutil.cpp @@ -120,7 +120,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, FLD_REM, FLD_NO, FLD_CHARSET}; unsigned int length[] = {0, 4, 16, 4, 4, 4, 4, 4, 0, 32, 32}; PCSZ fmt; - char *pn, *tn, *fld, *colname, *chset, v; + char *pn, *tn, *fld, *colname, v; //, *chset; int i, n, ncol = sizeof(buftyp) / sizeof(int); int prec, len, type, scale; int zconv = GetConvSize(); @@ -185,7 +185,7 @@ PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, colname = (char *)fp->field_name; crp->Kdata->SetValue(colname, i); - chset = (char *)fp->charset()->name; +// chset = (char *)fp->charset()->name; // v = (!strcmp(chset, "binary")) ? 'B' : 0; v = 0; -- cgit v1.2.1 From b7434bacbdd99d9c60499415f8be10aa59234dbf Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 20 Sep 2017 17:51:43 +0200 Subject: include/master-slave.inc must always be included last --- mysql-test/extra/rpl_tests/rpl_loaddata.test | 2 +- mysql-test/suite/engines/funcs/t/rpl_insert.test | 2 +- mysql-test/suite/parts/t/rpl_partition.test | 2 +- mysql-test/suite/roles/rpl_grant_revoke_current_role-8638.test | 2 +- mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test | 2 +- mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test | 2 +- mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test | 2 +- mysql-test/suite/rpl/t/rpl_blackhole.test | 2 +- mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test | 2 +- mysql-test/suite/rpl/t/rpl_checksum.test | 2 +- mysql-test/suite/rpl/t/rpl_concurrency_error.test | 2 +- mysql-test/suite/rpl/t/rpl_conditional_comments.test | 2 +- mysql-test/suite/rpl/t/rpl_empty_master_host.test | 2 +- mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test | 2 +- mysql-test/suite/rpl/t/rpl_flush_logs.test | 2 +- mysql-test/suite/rpl/t/rpl_geometry.test | 2 +- mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test | 2 +- mysql-test/suite/rpl/t/rpl_grant.test | 2 +- mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test | 2 +- mysql-test/suite/rpl/t/rpl_heartbeat_debug.test | 2 +- mysql-test/suite/rpl/t/rpl_incident.test | 2 +- mysql-test/suite/rpl/t/rpl_init_slave_errors.test | 2 +- mysql-test/suite/rpl/t/rpl_innodb_bug68220.test | 2 +- mysql-test/suite/rpl/t/rpl_insert.test | 2 +- mysql-test/suite/rpl/t/rpl_invoked_features.test | 2 +- mysql-test/suite/rpl/t/rpl_loaddata_symlink.test | 2 +- mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test | 2 +- mysql-test/suite/rpl/t/rpl_mdev-11092.test | 2 +- mysql-test/suite/rpl/t/rpl_mdev8193.test | 2 +- mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test | 2 +- mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test | 2 +- mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test | 2 +- mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test | 2 +- mysql-test/suite/rpl/t/rpl_not_null_innodb.test | 2 +- mysql-test/suite/rpl/t/rpl_not_null_myisam.test | 2 +- mysql-test/suite/rpl/t/rpl_packet.test | 2 +- mysql-test/suite/rpl/t/rpl_performance_schema.test | 2 +- mysql-test/suite/rpl/t/rpl_read_only.test | 2 +- mysql-test/suite/rpl/t/rpl_report_port.test | 2 +- mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test | 2 +- mysql-test/suite/rpl/t/rpl_row_colSize.test | 2 +- mysql-test/suite/rpl/t/rpl_row_corruption.test | 2 +- mysql-test/suite/rpl/t/rpl_row_create_table.test | 2 +- mysql-test/suite/rpl/t/rpl_row_find_row.test | 2 +- mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test | 2 +- mysql-test/suite/rpl/t/rpl_row_index_choice.test | 2 +- mysql-test/suite/rpl/t/rpl_row_merge_engine.test | 2 +- mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test | 2 +- mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test | 2 +- mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test | 2 +- mysql-test/suite/rpl/t/rpl_row_trunc_temp.test | 2 +- mysql-test/suite/rpl/t/rpl_row_utf16.test | 2 +- mysql-test/suite/rpl/t/rpl_row_wide_table.test | 2 +- mysql-test/suite/rpl/t/rpl_savepoint.test | 2 +- mysql-test/suite/rpl/t/rpl_server_id_ignore.test | 2 +- mysql-test/suite/rpl/t/rpl_set_null_innodb.test | 2 +- mysql-test/suite/rpl/t/rpl_skip_error.test | 2 +- mysql-test/suite/rpl/t/rpl_skip_incident.test | 2 +- mysql-test/suite/rpl/t/rpl_skip_replication.test | 2 +- mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test | 2 +- mysql-test/suite/rpl/t/rpl_slave_skip.test | 2 +- mysql-test/suite/rpl/t/rpl_slow_query_log.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_loadfile.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test | 2 +- mysql-test/suite/rpl/t/rpl_stm_user_variables.test | 2 +- mysql-test/suite/rpl/t/rpl_sync.test | 2 +- mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test | 2 +- mysql-test/suite/rpl/t/rpl_temporary_errors.test | 2 +- mysql-test/suite/rpl/t/sec_behind_master-5114.test | 2 +- mysql-test/t/create_or_replace2.test | 2 +- mysql-test/t/stat_tables_repl.test | 2 +- 75 files changed, 75 insertions(+), 75 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index 67eb137bdf4..d04cefd175a 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -11,8 +11,8 @@ # check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and # Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986) --- source include/master-slave.inc source include/have_innodb.inc; +source include/master-slave.inc; --disable_query_log CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/engines/funcs/t/rpl_insert.test b/mysql-test/suite/engines/funcs/t/rpl_insert.test index 763a484ea5d..f57a6e226d1 100644 --- a/mysql-test/suite/engines/funcs/t/rpl_insert.test +++ b/mysql-test/suite/engines/funcs/t/rpl_insert.test @@ -2,9 +2,9 @@ --echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog --echo # ---source include/master-slave.inc --source include/not_embedded.inc --source include/not_windows.inc +--source include/master-slave.inc --disable_warnings CREATE SCHEMA IF NOT EXISTS mysqlslap; diff --git a/mysql-test/suite/parts/t/rpl_partition.test b/mysql-test/suite/parts/t/rpl_partition.test index e278b236f7b..cb6f84bbc71 100644 --- a/mysql-test/suite/parts/t/rpl_partition.test +++ b/mysql-test/suite/parts/t/rpl_partition.test @@ -1,7 +1,7 @@ --source include/have_partition.inc --source include/have_innodb.inc ---source include/master-slave.inc --source include/big_test.inc +--source include/master-slave.inc --vertical_results diff --git a/mysql-test/suite/roles/rpl_grant_revoke_current_role-8638.test b/mysql-test/suite/roles/rpl_grant_revoke_current_role-8638.test index 6a6c4f2a756..10e5e938884 100644 --- a/mysql-test/suite/roles/rpl_grant_revoke_current_role-8638.test +++ b/mysql-test/suite/roles/rpl_grant_revoke_current_role-8638.test @@ -1,5 +1,5 @@ ---source include/master-slave.inc --source include/have_binlog_format_mixed.inc +--source include/master-slave.inc --enable_connect_log diff --git a/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test b/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test index 3b2fff1cb13..4e604787c70 100644 --- a/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test +++ b/mysql-test/suite/rpl/t/rpl_alter_extra_persistent.test @@ -1,5 +1,5 @@ ---source include/master-slave.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc --enable_connect_log --connection master diff --git a/mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test b/mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test index 6996e1c73c7..32f08be7c4d 100644 --- a/mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test +++ b/mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test @@ -5,9 +5,9 @@ # is replication unsafe. # -source include/master-slave.inc; source include/have_binlog_format_mixed.inc; source include/have_innodb.inc; +source include/master-slave.inc; call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.'); diff --git a/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test index b4798691ca3..49fbe9af570 100644 --- a/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test +++ b/mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test @@ -1,6 +1,6 @@ -source include/master-slave.inc; source include/have_innodb.inc; source include/have_binlog_format_statement.inc; +source include/master-slave.inc; connection slave; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_blackhole.test b/mysql-test/suite/rpl/t/rpl_blackhole.test index 5f9b955aaa4..76b2e2421c9 100644 --- a/mysql-test/suite/rpl/t/rpl_blackhole.test +++ b/mysql-test/suite/rpl/t/rpl_blackhole.test @@ -15,8 +15,8 @@ # primary key lookup), and index/key with multiple matches (forcing an # index search). -source include/master-slave.inc; source include/have_blackhole.inc; +source include/master-slave.inc; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test index a97801f9ab0..88b4f8fbba5 100644 --- a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test +++ b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test @@ -12,8 +12,8 @@ # and replication is started from it. # ---source include/master-slave.inc --source include/have_binlog_format_mixed.inc +--source include/master-slave.inc --connection slave # Make sure the slave is stopped while we are messing with master. diff --git a/mysql-test/suite/rpl/t/rpl_checksum.test b/mysql-test/suite/rpl/t/rpl_checksum.test index 1cf9091033e..93b108cbd19 100644 --- a/mysql-test/suite/rpl/t/rpl_checksum.test +++ b/mysql-test/suite/rpl/t/rpl_checksum.test @@ -1,9 +1,9 @@ # WL2540 replication events checksum # Testing configuration parameters ---source include/master-slave.inc --source include/have_debug.inc --source include/have_binlog_format_mixed.inc +--source include/master-slave.inc call mtr.add_suppression('Slave can not handle replication events with the checksum that master is configured to log'); call mtr.add_suppression('Replication event checksum verification failed'); diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test index 15d5d5502a1..c5cebb953e4 100644 --- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test +++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test @@ -17,9 +17,9 @@ # log, the error is ignored and only the non-transactional tables are changed. ############################################################################### ---source include/master-slave.inc --source include/have_innodb.inc --source include/have_binlog_format_statement.inc +--source include/master-slave.inc call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_conditional_comments.test b/mysql-test/suite/rpl/t/rpl_conditional_comments.test index 0e2c108bf6e..bcc964a92c7 100644 --- a/mysql-test/suite/rpl/t/rpl_conditional_comments.test +++ b/mysql-test/suite/rpl/t/rpl_conditional_comments.test @@ -8,8 +8,8 @@ # will be binlogged as # 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'. ############################################################################### -source include/master-slave.inc; source include/have_binlog_format_statement.inc; +source include/master-slave.inc; CREATE TABLE t1(c1 INT); source include/show_binlog_events.inc; diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_host.test b/mysql-test/suite/rpl/t/rpl_empty_master_host.test index 66d30375a59..0fc2d11a29d 100644 --- a/mysql-test/suite/rpl/t/rpl_empty_master_host.test +++ b/mysql-test/suite/rpl/t/rpl_empty_master_host.test @@ -16,8 +16,8 @@ # along the way if error/no error is thrown and/or if replication starts # working when expected. ---source include/master-slave.inc --source include/have_binlog_format_mixed.inc +--source include/master-slave.inc connection slave; STOP SLAVE; diff --git a/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test b/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test index f48880b5dfa..201392346be 100644 --- a/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test @@ -2,8 +2,8 @@ # Purpose: To test having extra columns on the master WL#3915 ############################################################# -- source include/have_binlog_format_row.inc --- source include/master-slave.inc -- source include/have_innodb.inc +-- source include/master-slave.inc let $engine_type = 'InnoDB'; --source extra/rpl_tests/rpl_extra_col_master.test diff --git a/mysql-test/suite/rpl/t/rpl_flush_logs.test b/mysql-test/suite/rpl/t/rpl_flush_logs.test index 1d19576d47c..6dad588f217 100644 --- a/mysql-test/suite/rpl/t/rpl_flush_logs.test +++ b/mysql-test/suite/rpl/t/rpl_flush_logs.test @@ -4,8 +4,8 @@ # works fine. # ---source include/master-slave.inc --source include/have_binlog_format_statement.inc +--source include/master-slave.inc connection master; # Test 'flush error logs' statement. diff --git a/mysql-test/suite/rpl/t/rpl_geometry.test b/mysql-test/suite/rpl/t/rpl_geometry.test index 769c49c96b1..415732a0228 100644 --- a/mysql-test/suite/rpl/t/rpl_geometry.test +++ b/mysql-test/suite/rpl/t/rpl_geometry.test @@ -1,5 +1,5 @@ -source include/master-slave.inc; source include/have_binlog_format_row.inc; +source include/master-slave.inc; # # Bug#48776, Bug#43784 diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test index 17417a55b8c..dca32c30a94 100644 --- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test +++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test @@ -8,9 +8,9 @@ # Finish the following tests by calling its common test script: # extra/rpl_tests/rpl_get_master_version_and_clock.test. -source include/master-slave.inc; source include/have_debug.inc; source include/have_debug_sync.inc; +source include/master-slave.inc; # # The test is not supposed to have any binglog affairs. diff --git a/mysql-test/suite/rpl/t/rpl_grant.test b/mysql-test/suite/rpl/t/rpl_grant.test index 1091e5aab0d..b40d400afbd 100644 --- a/mysql-test/suite/rpl/t/rpl_grant.test +++ b/mysql-test/suite/rpl/t/rpl_grant.test @@ -1,7 +1,7 @@ # Tests of grants and users -source include/master-slave.inc; source include/not_embedded.inc; +source include/master-slave.inc; --echo **** On Master **** connection master; diff --git a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test index 43634ec1528..5b13a5e1fc1 100644 --- a/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test +++ b/mysql-test/suite/rpl/t/rpl_gtid_mdev4484.test @@ -1,6 +1,6 @@ ---source include/master-slave.inc --source include/have_innodb.inc --source include/have_debug.inc +--source include/master-slave.inc CREATE TABLE t1 (i int) ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test index 7cdf67d6532..6a426ed1e9f 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test @@ -1,7 +1,7 @@ # Testing master to slave heartbeat protocol, test cases that need debug build. ---source include/master-slave.inc --source include/have_debug.inc +--source include/master-slave.inc connection slave; --source include/stop_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_incident.test b/mysql-test/suite/rpl/t/rpl_incident.test index adf20953b0f..60ffd43bf52 100644 --- a/mysql-test/suite/rpl/t/rpl_incident.test +++ b/mysql-test/suite/rpl/t/rpl_incident.test @@ -1,5 +1,5 @@ ---source include/master-slave.inc --source include/have_debug.inc +--source include/master-slave.inc --echo **** On Master **** CREATE TABLE t1 (a INT); diff --git a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test index 067d21a4e46..f08832e7e72 100644 --- a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test +++ b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test @@ -29,8 +29,8 @@ # Configuring the Environment ###################################################################### source include/have_debug.inc; -source include/master-slave.inc; source include/have_log_bin.inc; +source include/master-slave.inc; connection slave; diff --git a/mysql-test/suite/rpl/t/rpl_innodb_bug68220.test b/mysql-test/suite/rpl/t/rpl_innodb_bug68220.test index 76e7c60fd59..1e4f40a0019 100644 --- a/mysql-test/suite/rpl/t/rpl_innodb_bug68220.test +++ b/mysql-test/suite/rpl/t/rpl_innodb_bug68220.test @@ -1,6 +1,6 @@ --source include/have_innodb.inc ---source include/master-slave.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc # # Bug#68220: innodb_rows_updated is misleading on slave when *info_repository=TABLE diff --git a/mysql-test/suite/rpl/t/rpl_insert.test b/mysql-test/suite/rpl/t/rpl_insert.test index 2a29139ac48..48814508818 100644 --- a/mysql-test/suite/rpl/t/rpl_insert.test +++ b/mysql-test/suite/rpl/t/rpl_insert.test @@ -2,9 +2,9 @@ --echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog --echo # ---source include/master-slave.inc --source include/not_embedded.inc --source include/not_windows.inc +--source include/master-slave.inc disable_query_log; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features.test b/mysql-test/suite/rpl/t/rpl_invoked_features.test index 7770c36c397..91391cf8372 100644 --- a/mysql-test/suite/rpl/t/rpl_invoked_features.test +++ b/mysql-test/suite/rpl/t/rpl_invoked_features.test @@ -5,8 +5,8 @@ # Features for Replication. ######################################### ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc disable_query_log; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test index c73fa2897f3..e5ee400d231 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_symlink.test @@ -4,8 +4,8 @@ # if the path of the load data file is a symbolic link. # --source include/not_windows.inc ---source include/master-slave.inc --source include/have_binlog_format_statement.inc +--source include/master-slave.inc create table t1(a int not null auto_increment, b int, primary key(a) ); load data infile '../../std_data/rpl_loaddata.dat' into table t1; diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test index 0e6608fd848..2761f169e83 100644 --- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test +++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test @@ -1,8 +1,8 @@ ---source include/master-slave.inc --source include/have_debug.inc --source include/have_debug_sync.inc --source include/have_binlog_format_row.inc --source include/have_innodb.inc +--source include/master-slave.inc connection master; diff --git a/mysql-test/suite/rpl/t/rpl_mdev-11092.test b/mysql-test/suite/rpl/t/rpl_mdev-11092.test index c8b2b7f2ad1..31a385b40e6 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev-11092.test +++ b/mysql-test/suite/rpl/t/rpl_mdev-11092.test @@ -1,8 +1,8 @@ --source include/have_innodb.inc ---source include/master-slave.inc --source include/not_embedded.inc --source include/not_windows.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc ######################################################################################## call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_mdev8193.test b/mysql-test/suite/rpl/t/rpl_mdev8193.test index 29c26bb3da4..dcad3e5f9b0 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev8193.test +++ b/mysql-test/suite/rpl/t/rpl_mdev8193.test @@ -1,5 +1,5 @@ ---source include/master-slave.inc --source include/have_binlog_format_statement.inc +--source include/master-slave.inc --connection slave diff --git a/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test index 3850a84cbf1..81b01cc9140 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_binlog_max_cache_size.test @@ -1,8 +1,8 @@ --source include/have_innodb.inc ---source include/master-slave.inc --source include/not_embedded.inc --source include/not_windows.inc --source include/have_binlog_format_mixed.inc +--source include/master-slave.inc --source extra/rpl_tests/rpl_binlog_max_cache_size.test --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test index b2e8308b34d..fa948f8f5fe 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_implicit_commit_binlog.test @@ -3,8 +3,8 @@ ################################################################################ --source include/have_udf.inc --source include/have_binlog_format_mixed.inc ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc --let $engine=Innodb set session storage_engine=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test index 747374b89c2..a9c8f6fe3e1 100644 --- a/mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_mixed_mixing_engines.test @@ -3,8 +3,8 @@ # tables. For further details, please, read WL#2687 and WL#5072. ################################################################################### --source include/have_binlog_format_mixed.inc ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc let $engine_type=Innodb; let $database_name=test; diff --git a/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test b/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test index 8092ff141db..93ec9acf5ea 100644 --- a/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test +++ b/mysql-test/suite/rpl/t/rpl_non_direct_mixed_mixing_engines.test @@ -3,8 +3,8 @@ # tables. For further details, please, read WL#2687 and WL#5072. ################################################################################### --source include/have_binlog_format_mixed.inc ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc --disable_query_log SET SESSION binlog_direct_non_transactional_updates = OFF; diff --git a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test index 1e67ba4eda1..6a1cc341060 100644 --- a/mysql-test/suite/rpl/t/rpl_not_null_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_not_null_innodb.test @@ -11,9 +11,9 @@ # 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) # ################################################################################# ---source include/master-slave.inc --source include/have_innodb.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc let $engine=Innodb; --source extra/rpl_tests/rpl_not_null.test diff --git a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test index dcfaf006dad..6ef0b65d5ff 100644 --- a/mysql-test/suite/rpl/t/rpl_not_null_myisam.test +++ b/mysql-test/suite/rpl/t/rpl_not_null_myisam.test @@ -11,8 +11,8 @@ # 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) # ################################################################################# ---source include/master-slave.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc let $engine=MyISAM; --source extra/rpl_tests/rpl_not_null.test diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test index 0e74481bb61..e850ae36700 100644 --- a/mysql-test/suite/rpl/t/rpl_packet.test +++ b/mysql-test/suite/rpl/t/rpl_packet.test @@ -9,8 +9,8 @@ # BUG#55322: SHOW BINLOG EVENTS increases @@SESSION.MAX_ALLOWED_PACKET # max-out size db name -source include/master-slave.inc; source include/have_binlog_format_row.inc; +source include/master-slave.inc; call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153"); call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet"); let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; diff --git a/mysql-test/suite/rpl/t/rpl_performance_schema.test b/mysql-test/suite/rpl/t/rpl_performance_schema.test index 0562b0ea658..18aabe5272d 100644 --- a/mysql-test/suite/rpl/t/rpl_performance_schema.test +++ b/mysql-test/suite/rpl/t/rpl_performance_schema.test @@ -1,6 +1,6 @@ ---source include/master-slave.inc --source include/have_perfschema.inc --source include/have_binlog_format_mixed.inc +--source include/master-slave.inc UPDATE performance_schema.setup_instruments SET ENABLED="NO"; diff --git a/mysql-test/suite/rpl/t/rpl_read_only.test b/mysql-test/suite/rpl/t/rpl_read_only.test index fb92803847a..c4781bbbb3b 100644 --- a/mysql-test/suite/rpl/t/rpl_read_only.test +++ b/mysql-test/suite/rpl/t/rpl_read_only.test @@ -1,6 +1,6 @@ # Test case for BUG #11733 --- source include/master-slave.inc -- source include/have_innodb.inc +-- source include/master-slave.inc call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_report_port.test b/mysql-test/suite/rpl/t/rpl_report_port.test index 6e728a678ad..2a14d278d48 100644 --- a/mysql-test/suite/rpl/t/rpl_report_port.test +++ b/mysql-test/suite/rpl/t/rpl_report_port.test @@ -17,8 +17,8 @@ # case on doing SHOW SLAVE HOSTS on the master, we get the actual port number # of the slave (ie. SLAVE_PORT). -source include/master-slave.inc; source include/have_binlog_format_mixed.inc; +source include/master-slave.inc; connection master; diff --git a/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test index 9c8489658f8..cc031d382e0 100644 --- a/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/t/rpl_row_binlog_max_cache_size.test @@ -1,8 +1,8 @@ --source include/have_innodb.inc ---source include/master-slave.inc --source include/not_embedded.inc --source include/not_windows.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc --source extra/rpl_tests/rpl_binlog_max_cache_size.test --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_colSize.test b/mysql-test/suite/rpl/t/rpl_row_colSize.test index cdffe2e333b..21c68b55e92 100644 --- a/mysql-test/suite/rpl/t/rpl_row_colSize.test +++ b/mysql-test/suite/rpl/t/rpl_row_colSize.test @@ -6,8 +6,8 @@ # having columns that are smaller (shorter) than the slave. # ################################################################## --- source include/master-slave.inc -- source include/have_binlog_format_row.inc +-- source include/master-slave.inc --disable_warnings DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl/t/rpl_row_corruption.test b/mysql-test/suite/rpl/t/rpl_row_corruption.test index e05273a2f9c..acf3964f0c5 100644 --- a/mysql-test/suite/rpl/t/rpl_row_corruption.test +++ b/mysql-test/suite/rpl/t/rpl_row_corruption.test @@ -1,7 +1,7 @@ # ---source include/master-slave.inc --source include/have_debug.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc # BUG#11753004: 44360: REPLICATION FAILED diff --git a/mysql-test/suite/rpl/t/rpl_row_create_table.test b/mysql-test/suite/rpl/t/rpl_row_create_table.test index da73d753dcd..03f9d6a953b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -1,8 +1,8 @@ # Testing table creations for row-based replication. --source include/have_binlog_format_row.inc ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc connection slave; --source include/have_innodb.inc connection master; diff --git a/mysql-test/suite/rpl/t/rpl_row_find_row.test b/mysql-test/suite/rpl/t/rpl_row_find_row.test index 7f633c5aa97..444706aca7f 100644 --- a/mysql-test/suite/rpl/t/rpl_row_find_row.test +++ b/mysql-test/suite/rpl/t/rpl_row_find_row.test @@ -16,8 +16,8 @@ # has been fixed. # --- source include/master-slave.inc -- source include/have_binlog_format_row.inc +-- source include/master-slave.inc # # Case #1: master has key, but slave has not. diff --git a/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test index 2b35f68ff63..6fdcd885930 100644 --- a/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test +++ b/mysql-test/suite/rpl/t/rpl_row_implicit_commit_binlog.test @@ -3,8 +3,8 @@ ################################################################################ --source include/have_udf.inc --source include/have_binlog_format_row.inc ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc --let $engine=Innodb set session storage_engine=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_row_index_choice.test b/mysql-test/suite/rpl/t/rpl_row_index_choice.test index 6d4053f9737..0ad9b315d66 100644 --- a/mysql-test/suite/rpl/t/rpl_row_index_choice.test +++ b/mysql-test/suite/rpl/t/rpl_row_index_choice.test @@ -1,7 +1,7 @@ --source include/have_binlog_format_row.inc ---source include/master-slave.inc --source include/have_debug.inc --source include/have_innodb.inc +--source include/master-slave.inc # Bug#58997: Row-based replication breaks on table with only fulltext index: connection master; diff --git a/mysql-test/suite/rpl/t/rpl_row_merge_engine.test b/mysql-test/suite/rpl/t/rpl_row_merge_engine.test index dcbb8b891d8..c28d4a89651 100644 --- a/mysql-test/suite/rpl/t/rpl_row_merge_engine.test +++ b/mysql-test/suite/rpl/t/rpl_row_merge_engine.test @@ -12,8 +12,8 @@ # deletes their contents through the merge table. Finally, the slave # is synchronized with the master and (after the fix) it won't crash. # ---source include/master-slave.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc --connection master CREATE TABLE t1 (a int) ENGINE=MyISAM; diff --git a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test index 57d67c5c71b..b3808680db2 100644 --- a/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test @@ -1,6 +1,6 @@ -- source include/have_binlog_format_row.inc --- source include/master-slave.inc -- source include/have_innodb.inc +-- source include/master-slave.inc # # BUG#52868 Wrong handling of NULL value during update, replication out of sync diff --git a/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test b/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test index a78f7ad4271..0882d603203 100644 --- a/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test +++ b/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test @@ -12,8 +12,8 @@ # This test issues SHOW [BINLOG|RELAYLOG] EVENTS both on master and slave after # some statements have been issued. --- source include/master-slave.inc -- source include/have_binlog_format_row.inc +-- source include/master-slave.inc -- source extra/rpl_tests/rpl_show_relaylog_events.inc --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test index e8ac74f0125..5bdd1ff8b6b 100644 --- a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test +++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test @@ -26,9 +26,9 @@ # with mysqlbinlog reporting that it was unable to succeed in # reading the event. --- source include/master-slave.inc -- source include/have_innodb.inc -- source include/have_binlog_format_row.inc +-- source include/master-slave.inc -- disable_warnings DROP TABLE IF EXISTS `t1`; diff --git a/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test index 394bf949f72..a8d7f77d930 100644 --- a/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test +++ b/mysql-test/suite/rpl/t/rpl_row_trunc_temp.test @@ -6,8 +6,8 @@ # table was binlogged in RBR. # ---source include/master-slave.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc #This statement is not binlogged in RBR. CREATE TEMPORARY TABLE t1(c1 INTEGER); diff --git a/mysql-test/suite/rpl/t/rpl_row_utf16.test b/mysql-test/suite/rpl/t/rpl_row_utf16.test index e3e7a51c002..595a149e5e6 100644 --- a/mysql-test/suite/rpl/t/rpl_row_utf16.test +++ b/mysql-test/suite/rpl/t/rpl_row_utf16.test @@ -1,6 +1,6 @@ --- source include/master-slave.inc -- source include/have_binlog_format_row.inc -- source include/have_utf16.inc +-- source include/master-slave.inc # # BUG#51716: Char column with utf16 character set gives wrong padding on slave diff --git a/mysql-test/suite/rpl/t/rpl_row_wide_table.test b/mysql-test/suite/rpl/t/rpl_row_wide_table.test index b1d16133096..01473f991bf 100644 --- a/mysql-test/suite/rpl/t/rpl_row_wide_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_wide_table.test @@ -8,8 +8,8 @@ # in corrupt binlog ################################################################## --- source include/master-slave.inc -- source include/have_binlog_format_row.inc +-- source include/master-slave.inc --disable_warnings DROP TABLE IF EXISTS t300; diff --git a/mysql-test/suite/rpl/t/rpl_savepoint.test b/mysql-test/suite/rpl/t/rpl_savepoint.test index 2aacd1fa81e..a61c506f12f 100644 --- a/mysql-test/suite/rpl/t/rpl_savepoint.test +++ b/mysql-test/suite/rpl/t/rpl_savepoint.test @@ -1,5 +1,5 @@ ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc --echo # --echo # Bug#50124 Rpl failure on DROP table with concurrent txn/non-txn diff --git a/mysql-test/suite/rpl/t/rpl_server_id_ignore.test b/mysql-test/suite/rpl/t/rpl_server_id_ignore.test index 1e6d46c9d40..537978f1701 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id_ignore.test +++ b/mysql-test/suite/rpl/t/rpl_server_id_ignore.test @@ -17,8 +17,8 @@ # b. nullifying the list and resuming of taking binlog from the very beginning with # executing events this time -source include/master-slave.inc; source include/have_binlog_format_mixed.inc; +source include/master-slave.inc; connection slave; diff --git a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test index 2d0c34e1d0a..5ef10263498 100644 --- a/mysql-test/suite/rpl/t/rpl_set_null_innodb.test +++ b/mysql-test/suite/rpl/t/rpl_set_null_innodb.test @@ -1,6 +1,6 @@ -- source include/have_binlog_format_mixed_or_row.inc --- source include/master-slave.inc -- source include/have_innodb.inc +-- source include/master-slave.inc -- let $engine= InnoDB -- source extra/rpl_tests/rpl_set_null.test diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test index 142cd53b9dd..a3c430ef009 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_error.test +++ b/mysql-test/suite/rpl/t/rpl_skip_error.test @@ -23,8 +23,8 @@ # bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic: # BUG#39393: slave-skip-errors does not work when using ROW based replication -source include/master-slave.inc; source include/have_innodb.inc; +source include/master-slave.inc; --echo ==== Test Without sql_mode=strict_trans_tables ==== diff --git a/mysql-test/suite/rpl/t/rpl_skip_incident.test b/mysql-test/suite/rpl/t/rpl_skip_incident.test index 959fde9374e..50e466b1329 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_incident.test +++ b/mysql-test/suite/rpl/t/rpl_skip_incident.test @@ -1,5 +1,5 @@ ---source include/master-slave.inc --source include/have_debug.inc +--source include/master-slave.inc --echo **** On Master **** CREATE TABLE t1 (a INT); diff --git a/mysql-test/suite/rpl/t/rpl_skip_replication.test b/mysql-test/suite/rpl/t/rpl_skip_replication.test index f815554d4af..806f19b9e86 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_replication.test +++ b/mysql-test/suite/rpl/t/rpl_skip_replication.test @@ -1,5 +1,5 @@ ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc connection slave; # Test that SUPER is required to change @@replicate_events_marked_for_skip. diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index b1af6e92c29..69319bad4a0 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -20,9 +20,9 @@ --source include/have_binlog_format_statement.inc --source include/have_innodb.inc --source include/have_debug.inc ---source include/master-slave.inc --source include/not_embedded.inc --source include/not_var_link.inc +--source include/master-slave.inc ########################################################################## # Loading data diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index f2129bd7f18..d64f394055c 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -4,8 +4,8 @@ # test for MIXED mode. source include/have_binlog_format_mixed.inc; -source include/master-slave.inc; source include/have_innodb.inc; +source include/master-slave.inc; --echo **** On Slave **** connection slave; diff --git a/mysql-test/suite/rpl/t/rpl_slow_query_log.test b/mysql-test/suite/rpl/t/rpl_slow_query_log.test index faf037a9dff..6b2886bbd8d 100644 --- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test +++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test @@ -25,8 +25,8 @@ # Note that due to the sleep() command the insert is written to the binary # log in row format. -source include/master-slave.inc; source include/have_binlog_format_statement.inc; +source include/master-slave.inc; CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); diff --git a/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test b/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test index 352213304b6..93cc06111e4 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test +++ b/mysql-test/suite/rpl/t/rpl_stm_binlog_max_cache_size.test @@ -1,8 +1,8 @@ --source include/have_innodb.inc ---source include/master-slave.inc --source include/not_embedded.inc --source include/not_windows.inc --source include/have_binlog_format_statement.inc +--source include/master-slave.inc --source extra/rpl_tests/rpl_binlog_max_cache_size.test --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test b/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test index 7770fc77748..b395654a714 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test +++ b/mysql-test/suite/rpl/t/rpl_stm_drop_create_temp_table.test @@ -5,8 +5,8 @@ ################################################################################### --source include/big_test.inc --source include/have_binlog_format_statement.inc ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc --source extra/rpl_tests/rpl_drop_create_temp_table.test --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test b/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test index 1e66b76abc8..774c87f551e 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test +++ b/mysql-test/suite/rpl/t/rpl_stm_implicit_commit_binlog.test @@ -3,8 +3,8 @@ ################################################################################ --source include/have_udf.inc --source include/have_binlog_format_statement.inc ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc --let $engine=Innodb set session storage_engine=innodb; diff --git a/mysql-test/suite/rpl/t/rpl_stm_loadfile.test b/mysql-test/suite/rpl/t/rpl_stm_loadfile.test index 5d2c85b2cb6..bb8c39ca873 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_loadfile.test +++ b/mysql-test/suite/rpl/t/rpl_stm_loadfile.test @@ -13,8 +13,8 @@ ########## # Includes --- source include/master-slave.inc -- source include/have_binlog_format_statement.inc +-- source include/master-slave.inc disable_query_log; call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); diff --git a/mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test b/mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test index db6e6bd14bf..5e982644cd9 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test +++ b/mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test @@ -19,8 +19,8 @@ # IO thread does not do it in an uncontrolled manner. --source include/have_binlog_format_statement.inc ---source include/master-slave.inc --source include/have_innodb.inc +--source include/master-slave.inc --disable_query_log CREATE TABLE t1 (c1 TEXT) engine=InnoDB; diff --git a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test index dfe2e49bb90..76b2aed3f24 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test @@ -1,9 +1,9 @@ ################################################################################ # Please, check ./extra/rpl_tests/rpl_start_stop_slave.test ################################################################################ ---source include/master-slave.inc --source include/have_binlog_format_statement.inc --source include/have_innodb.inc +--source include/master-slave.inc # make innodb updates run fast --connection slave diff --git a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test index 64691a1b634..22a6600105e 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test +++ b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test @@ -2,8 +2,8 @@ # BUG#49562: SBR out of sync when using numeric data types + user variable # --- source include/master-slave.inc -- source include/have_binlog_format_statement.inc +-- source include/master-slave.inc ## Setup user variables for several numeric types, so that we get ## coverage on the User_var_log_event different val types diff --git a/mysql-test/suite/rpl/t/rpl_sync.test b/mysql-test/suite/rpl/t/rpl_sync.test index 820ec19925f..20b82930aea 100644 --- a/mysql-test/suite/rpl/t/rpl_sync.test +++ b/mysql-test/suite/rpl/t/rpl_sync.test @@ -26,12 +26,12 @@ # Configuring the environment ######################################################################################## --echo =====Configuring the enviroment=======; ---source include/master-slave.inc --source include/not_embedded.inc --source include/not_valgrind.inc --source include/have_debug.inc --source include/have_innodb.inc --source include/not_crashrep.inc +--source include/master-slave.inc call mtr.add_suppression('Attempting backtrace'); call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001"); diff --git a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test index 70a2063c23c..786600c480f 100644 --- a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test +++ b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test @@ -9,9 +9,9 @@ # 4: sync to slave and check the number of temp tables on slave. # -source include/master-slave.inc; source include/have_binlog_format_mixed.inc; source include/have_innodb.inc; +source include/master-slave.inc; --echo ==== Initialize ==== diff --git a/mysql-test/suite/rpl/t/rpl_temporary_errors.test b/mysql-test/suite/rpl/t/rpl_temporary_errors.test index 250ccf4c1cd..4a532976787 100644 --- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test +++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test @@ -1,6 +1,6 @@ source include/have_binlog_format_row.inc; -source include/master-slave.inc; source include/have_innodb.inc; +source include/master-slave.inc; call mtr.add_suppression("Deadlock found"); call mtr.add_suppression("Can't find record in 't.'"); diff --git a/mysql-test/suite/rpl/t/sec_behind_master-5114.test b/mysql-test/suite/rpl/t/sec_behind_master-5114.test index ff8cab54c4f..d1d21bfa766 100644 --- a/mysql-test/suite/rpl/t/sec_behind_master-5114.test +++ b/mysql-test/suite/rpl/t/sec_behind_master-5114.test @@ -1,5 +1,5 @@ -source include/master-slave.inc; source include/have_binlog_format_statement.inc; +source include/master-slave.inc; call mtr.add_suppression("Unsafe statement written to the binary log"); diff --git a/mysql-test/t/create_or_replace2.test b/mysql-test/t/create_or_replace2.test index be1bd9a3d81..da451796e12 100644 --- a/mysql-test/t/create_or_replace2.test +++ b/mysql-test/t/create_or_replace2.test @@ -3,9 +3,9 @@ # --source include/have_debug.inc ---source include/master-slave.inc --source include/have_binlog_format_row.inc --source include/have_xtradb.inc +--source include/master-slave.inc --disable_warnings drop table if exists t1; diff --git a/mysql-test/t/stat_tables_repl.test b/mysql-test/t/stat_tables_repl.test index 999c49d37cf..ac24c9dcbd7 100644 --- a/mysql-test/t/stat_tables_repl.test +++ b/mysql-test/t/stat_tables_repl.test @@ -1,6 +1,6 @@ --source include/have_stat_tables.inc ---source include/master-slave.inc --source include/have_binlog_format_row.inc +--source include/master-slave.inc --echo # --echo # Bug mdev-485: unexpected failure with replication of DROP/ALTER table -- cgit v1.2.1 From 378beed0a680172d6570117c853d803e30983199 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 20 Sep 2017 20:02:01 +0200 Subject: MDEV-13290: Assertion Assertion `!is_set() || (m_status == DA_OK_BULK && 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. --- sql/sql_class.h | 22 ++++++++++++++++++++++ sql/table.cc | 11 +++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/sql/sql_class.h b/sql/sql_class.h index 57ff65cb416..7429ac586ea 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1468,6 +1468,28 @@ public: }; +/** + Implements the trivial error handler which counts errors as they happen. +*/ + +class Counting_error_handler : public Internal_error_handler +{ +public: + int errors; + bool handle_condition(THD *thd, + uint sql_errno, + const char* sqlstate, + Sql_condition::enum_warning_level level, + const char* msg, + Sql_condition ** cond_hdl) + { + errors++; + return false; + } + Counting_error_handler() : errors(0) {} +}; + + /** This class is an internal error handler implementation for DROP TABLE statements. The thing is that there may be warnings during diff --git a/sql/table.cc b/sql/table.cc index ff9c4217b7d..36ed9be8084 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -4628,7 +4628,13 @@ void TABLE_LIST::cleanup_items() int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure) { - if (check_option && check_option->val_int() == 0) + Counting_error_handler ceh; + thd->push_internal_handler(&ceh); + bool res= check_option && check_option->val_int() == 0; + thd->pop_internal_handler(); + if (ceh.errors) + return(VIEW_CHECK_ERROR); + if (res) { TABLE_LIST *main_view= top_table(); if (ignore_failure) @@ -4642,9 +4648,6 @@ int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure) main_view->view_name.str); return(VIEW_CHECK_ERROR); } - /* We check thd->error() because it can be set by conversion problem. */ - if (thd->is_error()) - return(VIEW_CHECK_ERROR); return(VIEW_CHECK_OK); } -- cgit v1.2.1 From c9c1adc649524c8365c31f8f2df5cbf9c2b60ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 21 Sep 2017 08:21:06 +0300 Subject: Avoid comparison of unsigned to signed --- storage/innobase/rem/rem0rec.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc index d4d1a2bab14..245dde45bb3 100644 --- a/storage/innobase/rem/rem0rec.cc +++ b/storage/innobase/rem/rem0rec.cc @@ -1570,7 +1570,7 @@ rec_copy_prefix_to_dtuple_func( ulint* offsets = offsets_; rec_offs_init(offsets_); - ut_ad(is_leaf || n_fields <= index->n_uniq + 1); + ut_ad(is_leaf || n_fields <= unsigned(index->n_uniq + 1)); offsets = rec_get_offsets(rec, index, offsets, is_leaf, n_fields, &heap); -- cgit v1.2.1 From bb7a70c9551c1756b1d1736ca4f6a0a965795873 Mon Sep 17 00:00:00 2001 From: sachin Date: Mon, 11 Sep 2017 17:46:56 +0530 Subject: MDEV-10767 /tmp/wsrep_recovery.${RANDOM} file created in unallowed SELinux context Problem:- To create file in /tmp dir mysqld require permission initrc_tmp_t. And mysqld does not have his permission. Solution:- Instead of giving mysqld permission of initrc_tmp_t , we redirected log to file in /tmp dir through shell. I also removed a earlier workarround in mysqld_safe.sh , which create tmp log file in datadir. --- scripts/galera_recovery.sh | 2 +- scripts/mysqld_safe.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/galera_recovery.sh b/scripts/galera_recovery.sh index d734ceb7ac7..de2e653c497 100644 --- a/scripts/galera_recovery.sh +++ b/scripts/galera_recovery.sh @@ -69,7 +69,7 @@ parse_arguments() { wsrep_recover_position() { # Redirect server's error log to the log file. eval /usr/sbin/mysqld $cmdline_args --user=$user --wsrep_recover \ - --log-error="$log_file" + --disable-log-error 2> "$log_file" ret=$? if [ $ret -ne 0 ]; then # Something went wrong, let us also print the error log so that it diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index e5708b51be5..5564f92a27c 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -246,7 +246,7 @@ wsrep_recover_position() { local euid=$(id -u) local ret=0 - local wr_logfile=$(mktemp $DATADIR/wsrep_recovery.XXXXXX) + local wr_logfile=$(mktemp wsrep_recovery.XXXXXX) # safety checks if [ -z $wr_logfile ]; then @@ -264,11 +264,11 @@ wsrep_recover_position() { local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid" - local wr_options="--log_error='$wr_logfile' --pid-file='$wr_pidfile'" + local wr_options="--disable-log-error --pid-file='$wr_pidfile'" log_notice "WSREP: Running position recovery with $wr_options" - eval_log_error "$mysqld_cmd --wsrep_recover $wr_options" + eval_log_error "$mysqld_cmd --wsrep_recover $wr_options 2> $wr_logfile" local rp="$(grep 'WSREP: Recovered position:' $wr_logfile)" if [ -z "$rp" ]; then -- cgit v1.2.1 From 9c373d4d1d4595eac9f493cac18a884876d6753c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 21 Sep 2017 10:07:28 +0300 Subject: Fix bogus rec_get_offsets() debug assertion failures for ROW_FORMAT=REDUNDANT When the debug parameter 'bool leaf' was added to rec_get_offsets(), also some debug assertions for reading the heap_no of ROW_FORMAT=REDUNDANT records were added. However, the heap number is uninitialized when offsets are being computed for to-be-inserted records. For debug builds, initialize the heap number to a dummy value, so that the record will be interpreted as 'user record'. The infimum and supremum pseudo-records are never copied from the page frame and never inserted; they are part of the page creation. rec_convert_dtuple_to_rec_old(): Remove a bogus memset() in debug builds. --- storage/innobase/page/page0cur.cc | 6 ++++++ storage/innobase/rem/rem0rec.cc | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc index 23a11fcfaa3..113c31e44ae 100644 --- a/storage/innobase/page/page0cur.cc +++ b/storage/innobase/page/page0cur.cc @@ -1176,9 +1176,15 @@ page_cur_parse_insert_rec( ut_memcpy(buf + mismatch_index, ptr, end_seg_len); if (page_is_comp(page)) { + /* Make rec_get_offsets() and rec_offs_make_valid() happy. */ + ut_d(rec_set_heap_no_new(buf + origin_offset, + PAGE_HEAP_NO_USER_LOW)); rec_set_info_and_status_bits(buf + origin_offset, info_and_status_bits); } else { + /* Make rec_get_offsets() and rec_offs_make_valid() happy. */ + ut_d(rec_set_heap_no_old(buf + origin_offset, + PAGE_HEAP_NO_USER_LOW)); rec_set_info_bits_old(buf + origin_offset, info_and_status_bits); } diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc index 245dde45bb3..8bb0f0187cb 100644 --- a/storage/innobase/rem/rem0rec.cc +++ b/storage/innobase/rem/rem0rec.cc @@ -1130,17 +1130,14 @@ rec_convert_dtuple_to_rec_old( /* Calculate the offset of the origin in the physical record */ rec = buf + rec_get_converted_extra_size(data_size, n_fields, n_ext); -#ifdef UNIV_DEBUG - /* Suppress Valgrind warnings of ut_ad() - in mach_write_to_1(), mach_write_to_2() et al. */ - memset(buf, 0xff, rec - buf + data_size); -#endif /* UNIV_DEBUG */ /* Store the number of fields */ rec_set_n_fields_old(rec, n_fields); /* Set the info bits of the record */ rec_set_info_bits_old(rec, dtuple_get_info_bits(dtuple) & REC_INFO_BITS_MASK); + /* Make rec_get_offsets() and rec_offs_make_valid() happy. */ + ut_d(rec_set_heap_no_old(rec, PAGE_HEAP_NO_USER_LOW)); /* Store the data and the offsets */ @@ -1254,6 +1251,8 @@ rec_convert_dtuple_to_rec_comp( temp = false; } } else { + /* Make rec_get_offsets() and rec_offs_make_valid() happy. */ + ut_d(rec_set_heap_no_new(rec, PAGE_HEAP_NO_USER_LOW)); nulls = rec - (REC_N_NEW_EXTRA_BYTES + 1); switch (UNIV_EXPECT(status, REC_STATUS_ORDINARY)) { -- cgit v1.2.1 From 02de2385a2d89fdac74524efea1a76c4d314f5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 21 Sep 2017 10:15:27 +0300 Subject: page_rec_is_leaf(): Fix sign mismatch warnings --- storage/innobase/include/page0page.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/include/page0page.h b/storage/innobase/include/page0page.h index 3b6a0215249..53a58de229d 100644 --- a/storage/innobase/include/page0page.h +++ b/storage/innobase/include/page0page.h @@ -328,10 +328,10 @@ bool page_rec_is_leaf(const page_t* rec) { const page_t* page = page_align(rec); - ut_ad(rec - page >= page_get_infimum_offset(page)); + ut_ad(ulint(rec - page) >= page_get_infimum_offset(page)); bool leaf = page_is_leaf(page); ut_ad(!page_rec_is_comp(rec) - || !page_rec_is_user_rec_low(rec - page) + || !page_rec_is_user_rec_low(ulint(rec - page)) || leaf == !rec_get_node_ptr_flag(rec)); return leaf; } -- cgit v1.2.1 From e84f5356c3b99633142e0e8b0dfa9919b75649c3 Mon Sep 17 00:00:00 2001 From: Sachin Setiya Date: Thu, 21 Sep 2017 13:22:49 +0530 Subject: MDEV-12290 Wrong timestamps in binary log causes replication issues Binlog_background_thread does not make a call to set_time(), And when we call binlog_checkpoint_log_event->write() , we write the wrong timestamp. In this patch we correct this by calling thd->set_time(). --- sql/log.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/log.cc b/sql/log.cc index 7a24e3743c0..3d6b0cbbc4a 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -9278,7 +9278,9 @@ binlog_background_thread(void *arg __attribute__((unused))) while (queue) { THD_STAGE_INFO(thd, stage_binlog_processing_checkpoint_notify); - DEBUG_SYNC(current_thd, "binlog_background_thread_before_mark_xid_done"); + DEBUG_SYNC(thd, "binlog_background_thread_before_mark_xid_done"); + /* Set the thread start time */ + thd->set_time(); /* Grab next pointer first, as mark_xid_done() may free the element. */ next= queue->next_in_queue; mysql_bin_log.mark_xid_done(queue->binlog_id, true); -- cgit v1.2.1 From 1015196e0a9013e93158eaef2a690cd921660e57 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 21 Sep 2017 10:03:40 +0200 Subject: cleanup: TABLE_LIST::view_check_option don't prepare for checking view's CHECK OPTION, if there is no CHECK OPTION in the first place. --- sql/table.cc | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/sql/table.cc b/sql/table.cc index 36ed9be8084..54f7bc7b473 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -4628,25 +4628,28 @@ void TABLE_LIST::cleanup_items() int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure) { - Counting_error_handler ceh; - thd->push_internal_handler(&ceh); - bool res= check_option && check_option->val_int() == 0; - thd->pop_internal_handler(); - if (ceh.errors) - return(VIEW_CHECK_ERROR); - if (res) - { - TABLE_LIST *main_view= top_table(); - if (ignore_failure) + if (check_option) + { + Counting_error_handler ceh; + thd->push_internal_handler(&ceh); + bool res= check_option->val_int() == 0; + thd->pop_internal_handler(); + if (ceh.errors) + return(VIEW_CHECK_ERROR); + if (res) { - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_VIEW_CHECK_FAILED, ER(ER_VIEW_CHECK_FAILED), - main_view->view_db.str, main_view->view_name.str); - return(VIEW_CHECK_SKIP); + TABLE_LIST *main_view= top_table(); + if (ignore_failure) + { + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, + ER_VIEW_CHECK_FAILED, ER(ER_VIEW_CHECK_FAILED), + main_view->view_db.str, main_view->view_name.str); + return(VIEW_CHECK_SKIP); + } + my_error(ER_VIEW_CHECK_FAILED, MYF(0), main_view->view_db.str, + main_view->view_name.str); + return(VIEW_CHECK_ERROR); } - my_error(ER_VIEW_CHECK_FAILED, MYF(0), main_view->view_db.str, - main_view->view_name.str); - return(VIEW_CHECK_ERROR); } return(VIEW_CHECK_OK); } -- cgit v1.2.1 From 05da63f0483e2e1d2389e9c6829f269db014dfbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 21 Sep 2017 12:05:21 +0300 Subject: Correct debug assertions Node pointer recors contain dict_index_get_n_unique_in_tree_nonleaf(index)+1 instead of index->n_uniq+1 fields. rec_get_offsets_func(): Remove the incorrect assertion. Later in the function there are assertion for checking the exact field count. --- storage/innobase/rem/rem0rec.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc index 8bb0f0187cb..c26614d5eae 100644 --- a/storage/innobase/rem/rem0rec.cc +++ b/storage/innobase/rem/rem0rec.cc @@ -589,8 +589,6 @@ rec_get_offsets_func( infimum and supremum record based on the heap number. */ ut_d(const bool is_user_rec = rec_get_heap_no_old(rec) >= PAGE_HEAP_NO_USER_LOW); - ut_ad(n <= ulint(index->n_fields + !leaf) || index->is_dummy - || dict_index_is_ibuf(index)); /* The infimum and supremum records carry 1 field. */ ut_ad(is_user_rec || n == 1); ut_ad(!is_user_rec || leaf || index->is_dummy @@ -1569,7 +1567,8 @@ rec_copy_prefix_to_dtuple_func( ulint* offsets = offsets_; rec_offs_init(offsets_); - ut_ad(is_leaf || n_fields <= unsigned(index->n_uniq + 1)); + ut_ad(is_leaf || n_fields + <= dict_index_get_n_unique_in_tree_nonleaf(index) + 1); offsets = rec_get_offsets(rec, index, offsets, is_leaf, n_fields, &heap); -- cgit v1.2.1 From db7fd021fed180f1cae6d4274ff31658c9cf7b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 21 Sep 2017 12:31:30 +0300 Subject: Add have_debug.inc to skip the test faster in non-debug builds --- mysql-test/suite/innodb/t/innodb-index-online.test | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/innodb/t/innodb-index-online.test b/mysql-test/suite/innodb/t/innodb-index-online.test index 24e3cd1ba22..e09a65a878a 100644 --- a/mysql-test/suite/innodb/t/innodb-index-online.test +++ b/mysql-test/suite/innodb/t/innodb-index-online.test @@ -1,4 +1,5 @@ --source include/innodb_page_size_small.inc +--source include/have_debug.inc --source include/have_debug_sync.inc let $innodb_metrics_select= -- cgit v1.2.1 From 0a44ae6528d1fdb2d4a9dab1be7e36931eac8236 Mon Sep 17 00:00:00 2001 From: Monty Date: Thu, 21 Sep 2017 16:30:24 +0300 Subject: Fix that FLUSH TABLES FOR EXPORT also works for Aria tables. - Added missing test case for MyISAM --- mysql-test/r/myisam.result | 8 ++++++++ mysql-test/suite/maria/maria.result | 8 ++++++++ mysql-test/suite/maria/maria.test | 13 +++++++++++++ mysql-test/t/myisam.test | 13 +++++++++++++ storage/maria/ha_maria.cc | 2 +- 5 files changed, 43 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 5b41b35c1ba..78eb374b142 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -2569,6 +2569,14 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK DROP TABLE t1; +CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b)) engine=myisam; +INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'), +(6,'0'),(7,'0'); +flush tables test.t1 for export; +insert into t1 values (8,'0'); +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +unlock tables; +drop table t1; show variables like 'myisam_block_size'; Variable_name Value myisam_block_size 1024 diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index 88f39827f27..b5fbcbe113d 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -2790,3 +2790,11 @@ test.t1 check status OK SET aria_repair_threads=@@global.aria_repair_threads; SET aria_sort_buffer_size=@@global.aria_sort_buffer_size; DROP TABLE t1; +CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b)); +INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'), +(6,'0'),(7,'0'); +flush tables test.t1 for export; +insert into t1 values (8,'0'); +ERROR HY000: Table 't1' was locked with a READ lock and can't be updated +unlock tables; +drop table t1; diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index 1b930a22c35..e710f32ef80 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -2018,6 +2018,19 @@ SET aria_repair_threads=@@global.aria_repair_threads; SET aria_sort_buffer_size=@@global.aria_sort_buffer_size; DROP TABLE t1; +# +# Check FLUSH FOR EXPORT +# + +CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b)); +INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'), + (6,'0'),(7,'0'); +flush tables test.t1 for export; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +insert into t1 values (8,'0'); +unlock tables; +drop table t1; + # # End of test # diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 572fa55e70f..0da542e499e 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1769,6 +1769,19 @@ ALTER TABLE t1 DISABLE KEYS; OPTIMIZE TABLE t1; DROP TABLE t1; +# +# Check FLUSH FOR EXPORT +# + +CREATE TABLE t1(a INT, b CHAR(10), KEY(a), KEY(b)) engine=myisam; +INSERT INTO t1 VALUES(1,'0'),(2,'0'),(3,'0'),(4,'0'),(5,'0'), + (6,'0'),(7,'0'); +flush tables test.t1 for export; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +insert into t1 values (8,'0'); +unlock tables; +drop table t1; + # # Check some variables # diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc index 119a002a11a..868281be572 100644 --- a/storage/maria/ha_maria.cc +++ b/storage/maria/ha_maria.cc @@ -989,7 +989,7 @@ int_table_flags(HA_NULL_IN_KEY | HA_CAN_FULLTEXT | HA_CAN_SQL_HANDLER | HA_DUPLICATE_POS | HA_CAN_INDEX_BLOBS | HA_AUTO_PART_KEY | HA_FILE_BASED | HA_CAN_GEOMETRY | CANNOT_ROLLBACK_FLAG | HA_CAN_BIT_FIELD | HA_CAN_RTREEKEYS | HA_CAN_REPAIR | - HA_CAN_VIRTUAL_COLUMNS | + HA_CAN_VIRTUAL_COLUMNS | HA_CAN_EXPORT | HA_HAS_RECORDS | HA_STATS_RECORDS_IS_EXACT), can_enable_indexes(1), bulk_insert_single_undo(BULK_INSERT_NONE) {} -- cgit v1.2.1 From 3fbd4aa03208833001296e63847c7922ff0bdd8b Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 21 Sep 2017 16:05:39 +0000 Subject: CMake : Do not use FindPkgConfig on Windows Even if cmake can find pkg-config (e.g the one supplied with strawberry perl ), we cannot link with pkg-config-found libraries or use the headers -they are mingw, 32bit-only. --- cmake/systemd.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake index 6986cb748ce..f7365066ef6 100644 --- a/cmake/systemd.cmake +++ b/cmake/systemd.cmake @@ -13,11 +13,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -INCLUDE(FindPkgConfig) -# http://www.cmake.org/cmake/help/v3.0/module/FindPkgConfig.html - MACRO(CHECK_SYSTEMD) IF(UNIX) + INCLUDE(FindPkgConfig) + # http://www.cmake.org/cmake/help/v3.0/module/FindPkgConfig.html SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support") IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto") IF(PKG_CONFIG_FOUND) -- cgit v1.2.1 From cb1b466c0c3fa72a058fe6462261f70b11d45c53 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 16 Aug 2017 13:26:53 +0200 Subject: CONNECT: compilation fix tabtyp was defined under ODBC_SUPPORT, but used outside of it too (under JDBC_SUPPORT). --- storage/connect/ha_connect.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 0278211c620..692c7674eb6 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -5379,10 +5379,10 @@ static int connect_assisted_discovery(handlerton *, THD* thd, #endif // __WIN__ //int hdr, mxe; int port = 0, mxr = 0, rc = 0, mul = 0, lrecl = 0; + PCSZ tabtyp = NULL; #if defined(ODBC_SUPPORT) POPARM sop= NULL; PCSZ ucnc= NULL; - PCSZ tabtyp = NULL; bool cnc= false; int cto= -1, qto= -1; #endif // ODBC_SUPPORT -- cgit v1.2.1 From 8d0448d5075fe822e37f81b740e83f03ab318448 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 21 Sep 2017 18:05:07 +0200 Subject: MDEV-13861 Assertion `0' failed in Protocol::end_statement followup for 378beed0a68 - only count WARN_LEVEL_ERROR, not warnings or notes. --- mysql-test/r/insert.result | 6 ++++++ mysql-test/t/insert.test | 10 ++++++++++ sql/sql_class.h | 3 ++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 8b03a3363de..39cb4cac85d 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -745,3 +745,9 @@ f1 f2 drop view v1; drop table t1; SET @@sql_mode= @save_mode; +CREATE TABLE t1 (f INT); +CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION; +REPLACE INTO v1 SET f = NULL; +ERROR HY000: CHECK OPTION failed 'test.v1' +DROP VIEW v1; +DROP TABLE t1; diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index e28eeb9f876..9e84bf3ee5f 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -602,3 +602,13 @@ remove_file $MYSQLD_DATADIR/test/t1.txt; drop view v1; drop table t1; SET @@sql_mode= @save_mode; + +# +# MDEV-13861 Assertion `0' failed in Protocol::end_statement +# +CREATE TABLE t1 (f INT); +CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION; +--error ER_VIEW_CHECK_FAILED +REPLACE INTO v1 SET f = NULL; +DROP VIEW v1; +DROP TABLE t1; diff --git a/sql/sql_class.h b/sql/sql_class.h index 7429ac586ea..3aeb8127030 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1483,7 +1483,8 @@ public: const char* msg, Sql_condition ** cond_hdl) { - errors++; + if (level == Sql_condition::WARN_LEVEL_ERROR) + errors++; return false; } Counting_error_handler() : errors(0) {} -- cgit v1.2.1 From 46a2917c0fd287755d9e357a98d04ed2c8b1ba0a Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 20 Sep 2017 00:02:06 +0200 Subject: MDEV-13208 Cannot import libmariadbclient.so.18 from python libmariadbclient_18 version nodes, specially for debian builds --- libmysql/CMakeLists.txt | 11 +++++++++++ libmysql/libmysql_versions.ld.in | 2 ++ 2 files changed, 13 insertions(+) diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index 8e60d267521..acbd80b4875 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -391,6 +391,10 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux") *; }; + libmariadbclient_18 { + /* empty here. aliases are added above */ + }; + libmysqlclient_16 { /* empty here. aliases are added above */ }; @@ -399,16 +403,23 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux") SET (CLIENT_API_5_1_LIST) SET (CLIENT_API_5_1_ALIASES) + SET (DEBIAN9_ALIASES) FOREACH (f ${CLIENT_API_FUNCTIONS_5_1} ${CLIENT_API_5_1_EXTRA}) SET(CLIENT_API_5_1_LIST "${CLIENT_API_5_1_LIST}\t${f};\n") SET(CLIENT_API_5_1_ALIASES "${CLIENT_API_5_1_ALIASES}\"${f}@libmysqlclient_16\" = ${f};\n") + SET(DEBIAN9_ALIASES "${DEBIAN9_ALIASES}\"${f}@libmariadbclient_18\" = ${f};\n") ENDFOREACH() SET (CLIENT_API_5_5_LIST) FOREACH (f ${CLIENT_API_FUNCTIONS_5_5} ${CLIENT_API_5_5_EXTRA}) SET(CLIENT_API_5_5_LIST "${CLIENT_API_5_5_LIST}\t${f};\n") + SET(DEBIAN9_ALIASES "${DEBIAN9_ALIASES}\"${f}@libmariadbclient_18\" = ${f};\n") ENDFOREACH() + IF(NOT DEB) + SET (DEBIAN9_ALIASES) + ENDIF() + ELSE (NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING) SET (CLIENT_API_5_1_ALIASES "/* Versioning disabled per user request. MDEV-5982 */") ENDIF (NOT DISABLE_LIBMYSQLCLIENT_SYMBOL_VERSIONING) diff --git a/libmysql/libmysql_versions.ld.in b/libmysql/libmysql_versions.ld.in index 0cf5b45cc18..f3b27e1cd1f 100644 --- a/libmysql/libmysql_versions.ld.in +++ b/libmysql/libmysql_versions.ld.in @@ -16,6 +16,8 @@ @CLIENT_API_5_1_ALIASES@ +@DEBIAN9_ALIASES@ + /* On Fedora the following symbols are exported, but renamed into a mysql_ namespace. We export them as aliases, but keep original symbols too. See -- cgit v1.2.1 From f4f48e06215fe6717865ccbe27ddc388a2cb86b8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 19 Sep 2017 11:18:45 +0200 Subject: MDEV-12672 Replicated TIMESTAMP fields given wrong value near DST change Implement a special Copy_field method for timestamps, that copies timestamps without converting them to MYSQL_TIME (the conversion is lossy around DST change dates). --- mysql-test/r/old-mode.result | 23 ++++++++++++++ ...temporal_format_mariadb53_to_mysql56_dst.result | 28 ++++++++++++++++ ...l_temporal_format_mariadb53_to_mysql56_dst.test | 37 ++++++++++++++++++++++ mysql-test/t/old-mode.test | 17 ++++++++++ sql/field_conv.cc | 16 +++++++++- 5 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56_dst.result create mode 100644 mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mysql56_dst.test diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result index c2ee3324ede..398e719cf02 100644 --- a/mysql-test/r/old-mode.result +++ b/mysql-test/r/old-mode.result @@ -127,3 +127,26 @@ Warning 1264 Out of range value for column 'a' at row 1 Warning 1264 Out of range value for column 'b' at row 1 DROP TABLE t1; SET @@global.mysql56_temporal_format=DEFAULT; +set time_zone='Europe/Moscow'; +set global mysql56_temporal_format=false; +create table t1 (a timestamp); +set timestamp=1288477526; +insert t1 values (null); +set timestamp=1288481126; +insert t1 values (null); +select a, unix_timestamp(a) from t1; +a unix_timestamp(a) +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 +set global mysql56_temporal_format=true; +select a, unix_timestamp(a) from t1; +a unix_timestamp(a) +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 +alter table t1 modify a timestamp; +select a, unix_timestamp(a) from t1; +a unix_timestamp(a) +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 +drop table t1; +set time_zone=DEFAULT; diff --git a/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56_dst.result b/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56_dst.result new file mode 100644 index 00000000000..352101cb8cd --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56_dst.result @@ -0,0 +1,28 @@ +include/master-slave.inc +[connection master] +set global time_zone='Europe/Moscow'; +set time_zone='UTC'; +stop slave; +start slave; +set global mysql56_temporal_format=false; +set global time_zone='Europe/Moscow'; +set time_zone='UTC'; +create table t1 (pk int primary key, t timestamp not null); +set timestamp = 1288477526; +insert into t1 values (1,null); +set timestamp = 1288481126; +insert into t1 values (2,null); +select pk, t, unix_timestamp(t) from t1; +pk t unix_timestamp(t) +1 2010-10-30 22:25:26 1288477526 +2 2010-10-30 23:25:26 1288481126 +set time_zone=default; +select pk, t, unix_timestamp(t) from t1; +pk t unix_timestamp(t) +1 2010-10-31 02:25:26 1288477526 +2 2010-10-31 02:25:26 1288481126 +set global time_zone=default; +drop table t1; +set global time_zone=default; +set global mysql56_temporal_format=default; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mysql56_dst.test b/mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mysql56_dst.test new file mode 100644 index 00000000000..511bdc15184 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_temporal_format_mariadb53_to_mysql56_dst.test @@ -0,0 +1,37 @@ +# +# MDEV-12672 Replicated TIMESTAMP fields given wrong value near DST change +# +source include/have_binlog_format_row.inc; +source include/master-slave.inc; + +connection slave; +set global time_zone='Europe/Moscow'; +set time_zone='UTC'; +stop slave; +start slave; + +connection master; +set global mysql56_temporal_format=false; +set global time_zone='Europe/Moscow'; +set time_zone='UTC'; + +create table t1 (pk int primary key, t timestamp not null); +set timestamp = 1288477526; +insert into t1 values (1,null); +set timestamp = 1288481126; +insert into t1 values (2,null); + +sync_slave_with_master; + +select pk, t, unix_timestamp(t) from t1; +set time_zone=default; +select pk, t, unix_timestamp(t) from t1; + +set global time_zone=default; + +connection master; +drop table t1; +set global time_zone=default; +set global mysql56_temporal_format=default; + +source include/rpl_end.inc; diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test index 0572570d122..99c92f8093d 100644 --- a/mysql-test/t/old-mode.test +++ b/mysql-test/t/old-mode.test @@ -83,3 +83,20 @@ SELECT TO_DAYS(a), TO_DAYS(b) FROM t1; DROP TABLE t1; SET @@global.mysql56_temporal_format=DEFAULT; +# +# MDEV-12672 Replicated TIMESTAMP fields given wrong value near DST change +# +set time_zone='Europe/Moscow'; +set global mysql56_temporal_format=false; +create table t1 (a timestamp); +set timestamp=1288477526; +insert t1 values (null); +set timestamp=1288481126; +insert t1 values (null); +select a, unix_timestamp(a) from t1; +set global mysql56_temporal_format=true; +select a, unix_timestamp(a) from t1; +alter table t1 modify a timestamp; +select a, unix_timestamp(a) from t1; +drop table t1; +set time_zone=DEFAULT; diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 7b57c7da104..74c5fb5b502 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -417,6 +417,18 @@ static void do_field_decimal(Copy_field *copy) } +static void do_field_timestamp(Copy_field *copy) +{ + DBUG_ASSERT(copy->from_field->type() == MYSQL_TYPE_TIMESTAMP); + DBUG_ASSERT(copy->to_field->type() == MYSQL_TYPE_TIMESTAMP); + ulong sec_part; + Field_timestamp *f= static_cast(copy->from_field); + Field_timestamp *t= static_cast(copy->to_field); + my_time_t ts= f->get_timestamp(&sec_part); + t->store_TIME(ts, sec_part); +} + + static void do_field_temporal(Copy_field *copy) { MYSQL_TIME ltime; @@ -724,7 +736,9 @@ Copy_field::get_copy_func(Field *to,Field *from) ((to->table->in_use->variables.sql_mode & (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE)) && mysql_type_to_time_type(to->type()) != MYSQL_TIMESTAMP_TIME)) - return do_field_temporal; + return (from->type() == MYSQL_TYPE_TIMESTAMP && + to->type() == MYSQL_TYPE_TIMESTAMP) + ? do_field_timestamp : do_field_temporal; /* Do binary copy */ } // Check if identical fields -- cgit v1.2.1 From f8a800bec81983910a96a5dc38f3aeb9b7528bce Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 19 Sep 2017 23:50:32 +0200 Subject: bugfix: copy timestamps correctly in INSERT...SELECT don't do it via MYSQL_TIME, that conversion is lossy around DST change dates. --- mysql-test/r/old-mode.result | 22 ++++++++++++++++++++++ mysql-test/t/old-mode.test | 17 +++++++++++++++++ sql/field.cc | 17 +++++++++++++++++ sql/field.h | 1 + sql/field_conv.cc | 19 ++++++++++++------- 5 files changed, 69 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result index 398e719cf02..b9a3edd4e94 100644 --- a/mysql-test/r/old-mode.result +++ b/mysql-test/r/old-mode.result @@ -149,4 +149,26 @@ a unix_timestamp(a) 2010-10-31 02:25:26 1288477526 2010-10-31 02:25:26 1288481126 drop table t1; +set global mysql56_temporal_format=false; +create table t1 (a timestamp); +set timestamp=1288477526; +insert t1 values (null); +set timestamp=1288481126; +insert t1 values (null); +select a, unix_timestamp(a) from t1; +a unix_timestamp(a) +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 +set global mysql56_temporal_format=true; +select a, unix_timestamp(a) from t1; +a unix_timestamp(a) +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 +create table t2 (a timestamp); +insert t2 select a from t1; +select a, unix_timestamp(a) from t2; +a unix_timestamp(a) +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 +drop table t1, t2; set time_zone=DEFAULT; diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test index 99c92f8093d..ed33da523c7 100644 --- a/mysql-test/t/old-mode.test +++ b/mysql-test/t/old-mode.test @@ -86,6 +86,8 @@ SET @@global.mysql56_temporal_format=DEFAULT; # # MDEV-12672 Replicated TIMESTAMP fields given wrong value near DST change # + +# Copy_field set time_zone='Europe/Moscow'; set global mysql56_temporal_format=false; create table t1 (a timestamp); @@ -99,4 +101,19 @@ select a, unix_timestamp(a) from t1; alter table t1 modify a timestamp; select a, unix_timestamp(a) from t1; drop table t1; + +# field_conv_incompatible() +set global mysql56_temporal_format=false; +create table t1 (a timestamp); +set timestamp=1288477526; +insert t1 values (null); +set timestamp=1288481126; +insert t1 values (null); +select a, unix_timestamp(a) from t1; +set global mysql56_temporal_format=true; +select a, unix_timestamp(a) from t1; +create table t2 (a timestamp); +insert t2 select a from t1; +select a, unix_timestamp(a) from t2; +drop table t1, t2; set time_zone=DEFAULT; diff --git a/sql/field.cc b/sql/field.cc index 8eb37c56c7e..6a28b38a612 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5064,6 +5064,23 @@ int Field_timestamp::store(longlong nr, bool unsigned_val) } +int Field_timestamp::store_timestamp(Field_timestamp *from) +{ + ulong sec_part; + my_time_t ts= from->get_timestamp(&sec_part); + store_TIME(ts, sec_part); + if (!ts && !sec_part && get_thd()->variables.sql_mode & MODE_NO_ZERO_DATE) + { + ErrConvString s( + STRING_WITH_LEN("0000-00-00 00:00:00.000000") - (decimals() ? 6 - decimals() : 7), + system_charset_info); + set_datetime_warning(WARN_DATA_TRUNCATED, &s, MYSQL_TIMESTAMP_DATETIME, 1); + return 1; + } + return 0; +} + + double Field_timestamp::val_real(void) { return (double) Field_timestamp::val_int(); diff --git a/sql/field.h b/sql/field.h index 30f24ecc1bb..154037df767 100644 --- a/sql/field.h +++ b/sql/field.h @@ -2186,6 +2186,7 @@ public: int store(longlong nr, bool unsigned_val); int store_time_dec(MYSQL_TIME *ltime, uint dec); int store_decimal(const my_decimal *); + int store_timestamp(Field_timestamp *from); double val_real(void); longlong val_int(void); String *val_str(String*,String *); diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 74c5fb5b502..850403afb97 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -219,6 +219,13 @@ set_field_to_null_with_conversions(Field *field, bool no_conversions) } +static int copy_timestamp_fields(Field *from, Field *to) +{ + DBUG_ASSERT(from->type() == MYSQL_TYPE_TIMESTAMP); + DBUG_ASSERT(to->type() == MYSQL_TYPE_TIMESTAMP); + return ((Field_timestamp*)to)->store_timestamp((Field_timestamp*)from); +} + static void do_skip(Copy_field *copy __attribute__((unused))) { } @@ -419,13 +426,7 @@ static void do_field_decimal(Copy_field *copy) static void do_field_timestamp(Copy_field *copy) { - DBUG_ASSERT(copy->from_field->type() == MYSQL_TYPE_TIMESTAMP); - DBUG_ASSERT(copy->to_field->type() == MYSQL_TYPE_TIMESTAMP); - ulong sec_part; - Field_timestamp *f= static_cast(copy->from_field); - Field_timestamp *t= static_cast(copy->to_field); - my_time_t ts= f->get_timestamp(&sec_part); - t->store_TIME(ts, sec_part); + copy_timestamp_fields(copy->from_field, copy->to_field); } @@ -938,6 +939,10 @@ int field_conv_incompatible(Field *to, Field *from) my_decimal buff; return to->store_decimal(from->val_decimal(&buff)); } + if (from->type() == MYSQL_TYPE_TIMESTAMP && to->type() == MYSQL_TYPE_TIMESTAMP) + { + return copy_timestamp_fields(from, to); + } if (from->cmp_type() == TIME_RESULT) { MYSQL_TIME ltime; -- cgit v1.2.1 From f6cb4f0a19487879171b2374ebcb71f34cee3024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 22 Sep 2017 10:28:14 +0300 Subject: MDEV-13814 Extra logging when innodb_log_archive=ON log_group_read_log_seg(): Only display the message during recovery, not during normal operation. When the XtraDB configuration parameter innodb_log_archive is set, this function will be called during normal operation. --- storage/xtradb/log/log0log.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc index a3b08eb6730..b8eaa08638f 100644 --- a/storage/xtradb/log/log0log.cc +++ b/storage/xtradb/log/log0log.cc @@ -2537,7 +2537,7 @@ loop: start_lsn += len; buf += len; - if (recv_sys->report(ut_time())) { + if (recv_recovery_is_on() && recv_sys->report(ut_time())) { ib_logf(IB_LOG_LEVEL_INFO, "Read redo log up to LSN=" LSN_PF, start_lsn); } -- cgit v1.2.1 From a753caf13556a92b70c5baaa2a77a6e50f4dc94b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 22 Sep 2017 13:40:04 +0200 Subject: update rdiff after merge --- mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff index dc9a5fd05e6..6aa4e32e95e 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff @@ -662,7 +662,7 @@ VARIABLE_NAME INNODB_VERSION SESSION_VALUE NULL -GLOBAL_VALUE 5.6.37 -+GLOBAL_VALUE 5.6.36-82.1 ++GLOBAL_VALUE 5.6.36-82.2 GLOBAL_VALUE_ORIGIN COMPILE-TIME DEFAULT_VALUE NULL VARIABLE_SCOPE GLOBAL -- cgit v1.2.1 From bc4409ab4ee3729f09151a4d7bdc6d95fdcaa3a1 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 22 Sep 2017 01:12:00 +0200 Subject: MDEV-13868 cannot insert 1288481126 in a timestamp column in Europe/Moscow make insert NULL into a timestamp mark the field as having an explicit value. So that the field won't be assigned the value again in TABLE::update_default_field() make Item_func_now_local::save_in_field(timestamp_field) not to go through MYSQL_TIME - this conversion is lossy around DST change times. This fixes inserting a default value into a timestamp field. --- mysql-test/r/old-mode.result | 8 ++++++++ mysql-test/t/old-mode.test | 2 ++ sql/field.cc | 30 ------------------------------ sql/field.h | 3 +-- sql/item_timefunc.cc | 19 +++++++++++++++++++ sql/item_timefunc.h | 1 + 6 files changed, 31 insertions(+), 32 deletions(-) diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result index 61987c398b9..73ad613048a 100644 --- a/mysql-test/r/old-mode.result +++ b/mysql-test/r/old-mode.result @@ -132,21 +132,29 @@ set global mysql56_temporal_format=false; create table t1 (a timestamp); set timestamp=1288477526; insert t1 values (null); +insert t1 values (); set timestamp=1288481126; insert t1 values (null); +insert t1 values (); select a, unix_timestamp(a) from t1; a unix_timestamp(a) 2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 2010-10-31 02:25:26 1288481126 set global mysql56_temporal_format=true; select a, unix_timestamp(a) from t1; a unix_timestamp(a) 2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 2010-10-31 02:25:26 1288481126 alter table t1 modify a timestamp; select a, unix_timestamp(a) from t1; a unix_timestamp(a) 2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288477526 +2010-10-31 02:25:26 1288481126 2010-10-31 02:25:26 1288481126 drop table t1; set global mysql56_temporal_format=false; diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test index 3b763ae5158..d7e8ce8ee55 100644 --- a/mysql-test/t/old-mode.test +++ b/mysql-test/t/old-mode.test @@ -93,8 +93,10 @@ set global mysql56_temporal_format=false; create table t1 (a timestamp); set timestamp=1288477526; insert t1 values (null); +insert t1 values (); set timestamp=1288481126; insert t1 values (null); +insert t1 values (); select a, unix_timestamp(a) from t1; set global mysql56_temporal_format=true; select a, unix_timestamp(a) from t1; diff --git a/sql/field.cc b/sql/field.cc index a872fab2520..f4775ef7128 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5260,36 +5260,6 @@ int Field_timestamp::set_time() return 0; } -/** - Mark the field as having an explicit default value. - - @param value if available, the value that the field is being set to - @returns whether the explicit default bit was set - - @note - Fields that have an explicit default value should not be updated - automatically via the DEFAULT or ON UPDATE functions. The functions - that deal with data change functionality (INSERT/UPDATE/LOAD), - determine if there is an explicit value for each field before performing - the data change, and call this method to mark the field. - - For timestamp columns, the only case where a column is not marked - as been given a value are: - - It's explicitly assigned with DEFAULT - - We assign NULL to a timestamp field that is defined as NOT NULL. - This is how MySQL has worked since it's start. -*/ - -bool Field_timestamp::set_explicit_default(Item *value) -{ - if (((value->type() == Item::DEFAULT_VALUE_ITEM && - !((Item_default_value*)value)->arg) || - (!maybe_null() && value->null_value))) - return false; - set_has_explicit_value(); - return true; -} - #ifdef NOT_USED static void store_native(ulonglong num, uchar *to, uint bytes) { diff --git a/sql/field.h b/sql/field.h index 91c24327b28..13d43201c6a 100644 --- a/sql/field.h +++ b/sql/field.h @@ -975,7 +975,7 @@ public: { return bitmap_is_set(&table->has_value_set, field_index); } - virtual bool set_explicit_default(Item *value); + bool set_explicit_default(Item *value); /** Evaluates the @c UPDATE default function, if one exists, and stores the @@ -2403,7 +2403,6 @@ public: void sql_type(String &str) const; bool zero_pack() const { return 0; } int set_time(); - bool set_explicit_default(Item *value); int evaluate_update_default_function() { int res= 0; diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 6e476dfa746..8dbd47444f2 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -1734,6 +1734,25 @@ void Item_func_now::print(String *str, enum_query_type query_type) str->append(')'); } + +int Item_func_now_local::save_in_field(Field *field, bool no_conversions) +{ + if (field->type() == MYSQL_TYPE_TIMESTAMP) + { + THD *thd= field->get_thd(); + my_time_t ts= thd->query_start(); + uint dec= MY_MIN(decimals, field->decimals()); + ulong sec_part= dec ? thd->query_start_sec_part() : 0; + sec_part-= my_time_fraction_remainder(sec_part, dec); + field->set_notnull(); + ((Field_timestamp*)field)->store_TIME(ts, sec_part); + return 0; + } + else + return Item_temporal_func::save_in_field(field, no_conversions); +} + + /** Converts current time in my_time_t to MYSQL_TIME represenatation for local time zone. Defines time zone (local) used for whole NOW function. diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index b0a083bf24f..dccccc479ef 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -748,6 +748,7 @@ class Item_func_now_local :public Item_func_now public: Item_func_now_local(THD *thd, uint dec): Item_func_now(thd, dec) {} const char *func_name() const { return "current_timestamp"; } + int save_in_field(Field *field, bool no_conversions); virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time); virtual enum Functype functype() const { return NOW_FUNC; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) -- cgit v1.2.1 From a5e1f60b3167e0057e64166df06424f1fb96bec3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 21 Sep 2017 20:08:59 +0200 Subject: bugfix: ALTER TABLE and TIMESTAMPs around DST change time Implement a special Copy_func function for timestamps, that copies timestamps without converting them to MYSQL_TIME (the conversion is lossy around DST change time). This fixes ALTER TABLE part of main.old-mode test. This is 10.2 version of f4f48e06215 --- sql/field.h | 2 ++ sql/field_conv.cc | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/sql/field.h b/sql/field.h index 13d43201c6a..cd65cb9c580 100644 --- a/sql/field.h +++ b/sql/field.h @@ -699,6 +699,7 @@ protected: static void do_field_real(Copy_field *copy); static void do_field_string(Copy_field *copy); static void do_field_temporal(Copy_field *copy); + static void do_field_timestamp(Copy_field *copy); static void do_field_decimal(Copy_field *copy); public: static void *operator new(size_t size, MEM_ROOT *mem_root) throw () @@ -2388,6 +2389,7 @@ public: TABLE_SHARE *share); enum_field_types type() const { return MYSQL_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } + Copy_func *get_copy_func(const Field *from) const; int store(const char *to,uint length,CHARSET_INFO *charset); int store(double nr); int store(longlong nr, bool unsigned_val); diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 85101fd5f0a..15df2c398a3 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -417,6 +417,16 @@ void Field::do_field_decimal(Copy_field *copy) } +void Field::do_field_timestamp(Copy_field *copy) +{ + Field_timestamp *f= static_cast(copy->from_field); + Field_timestamp *t= static_cast(copy->to_field); + ulong sec_part; + my_time_t ts= f->get_timestamp(&sec_part); + t->store_TIME(ts, sec_part); +} + + void Field::do_field_temporal(Copy_field *copy) { MYSQL_TIME ltime; @@ -706,6 +716,16 @@ void Copy_field::set(Field *to,Field *from,bool save) } +Field::Copy_func *Field_timestamp::get_copy_func(const Field *from) const +{ + Field::Copy_func *copy= Field_temporal::get_copy_func(from); + if (copy == do_field_temporal && from->type() == MYSQL_TYPE_TIMESTAMP) + return do_field_timestamp; + else + return copy; +} + + Field::Copy_func *Field_temporal::get_copy_func(const Field *from) const { /* If types are not 100 % identical then convert trough get_date() */ -- cgit v1.2.1 From 68d1a598bcda36d375fd295e3e65cdf8aef027f1 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 21 Sep 2017 21:21:36 +0200 Subject: bugfix: copy timestamps correctly in INSERT...SELECT Implement Field_timestamp::save_in_field(timestamp_field) that stores timestamp values without converting them to MYSQL_TIME and back, because this conversion is lossy around DST change time. This fixes main.old-mode test. This is 10.2 version of f8a800bec81 --- sql/field.cc | 67 ++++++++++++++++++++++++++++++++++++++++++------------- sql/field.h | 3 +++ sql/field_conv.cc | 7 ++---- 3 files changed, 57 insertions(+), 20 deletions(-) diff --git a/sql/field.cc b/sql/field.cc index f4775ef7128..a18bb808573 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1808,6 +1808,33 @@ int Field::store(const char *to, uint length, CHARSET_INFO *cs, } +static int timestamp_to_TIME(THD *thd, MYSQL_TIME *ltime, my_time_t ts, + ulong sec_part, ulonglong fuzzydate) +{ + thd->time_zone_used= 1; + if (ts == 0 && sec_part == 0) + { + if (fuzzydate & TIME_NO_ZERO_DATE) + return 1; + set_zero_time(ltime, MYSQL_TIMESTAMP_DATETIME); + } + else + { + thd->variables.time_zone->gmt_sec_to_TIME(ltime, ts); + ltime->second_part= sec_part; + } + return 0; +} + + +int Field::store_timestamp(my_time_t ts, ulong sec_part) +{ + MYSQL_TIME ltime; + THD *thd= get_thd(); + timestamp_to_TIME(thd, <ime, ts, sec_part, 0); + return store_time_dec(<ime, decimals()); +} + /** Pack the field into a format suitable for storage and transfer. @@ -4966,6 +4993,13 @@ Field_timestamp::Field_timestamp(uchar *ptr_arg, uint32 len_arg, } +int Field_timestamp::save_in_field(Field *to) +{ + ulong sec_part; + my_time_t ts= get_timestamp(&sec_part); + return to->store_timestamp(ts, sec_part); +} + my_time_t Field_timestamp::get_timestamp(const uchar *pos, ulong *sec_part) const { @@ -5092,6 +5126,22 @@ int Field_timestamp::store(longlong nr, bool unsigned_val) } +int Field_timestamp::store_timestamp(my_time_t ts, ulong sec_part) +{ + store_TIME(ts, sec_part); + if (ts == 0 && sec_part == 0 && + get_thd()->variables.sql_mode & TIME_NO_ZERO_DATE) + { + ErrConvString s( + STRING_WITH_LEN("0000-00-00 00:00:00.000000") - (decimals() ? 6 - decimals() : 7), + system_charset_info); + set_datetime_warning(WARN_DATA_TRUNCATED, &s, MYSQL_TIMESTAMP_DATETIME, 1); + return 1; + } + return 0; +} + + double Field_timestamp::val_real(void) { return (double) Field_timestamp::val_int(); @@ -5195,22 +5245,9 @@ Field_timestamp::validate_value_in_record(THD *thd, const uchar *record) const bool Field_timestamp::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) { - THD *thd= get_thd(); - thd->time_zone_used= 1; ulong sec_part; - my_time_t temp= get_timestamp(&sec_part); - if (temp == 0 && sec_part == 0) - { /* Zero time is "000000" */ - if (fuzzydate & TIME_NO_ZERO_DATE) - return 1; - set_zero_time(ltime, MYSQL_TIMESTAMP_DATETIME); - } - else - { - thd->variables.time_zone->gmt_sec_to_TIME(ltime, (my_time_t)temp); - ltime->second_part= sec_part; - } - return 0; + my_time_t ts= get_timestamp(&sec_part); + return timestamp_to_TIME(get_thd(), ltime, ts, sec_part, fuzzydate); } diff --git a/sql/field.h b/sql/field.h index cd65cb9c580..2167b90e26c 100644 --- a/sql/field.h +++ b/sql/field.h @@ -842,6 +842,7 @@ public: virtual int store(longlong nr, bool unsigned_val)=0; virtual int store_decimal(const my_decimal *d)=0; virtual int store_time_dec(MYSQL_TIME *ltime, uint dec); + virtual int store_timestamp(my_time_t timestamp, ulong sec_part); int store_time(MYSQL_TIME *ltime) { return store_time_dec(ltime, TIME_SECOND_PART_DIGITS); } int store(const char *to, uint length, CHARSET_INFO *cs, @@ -2395,6 +2396,8 @@ public: int store(longlong nr, bool unsigned_val); int store_time_dec(MYSQL_TIME *ltime, uint dec); int store_decimal(const my_decimal *); + int store_timestamp(my_time_t timestamp, ulong sec_part); + int save_in_field(Field *to); double val_real(void); longlong val_int(void); String *val_str(String*,String *); diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 15df2c398a3..c3ad0c878b5 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -419,11 +419,8 @@ void Field::do_field_decimal(Copy_field *copy) void Field::do_field_timestamp(Copy_field *copy) { - Field_timestamp *f= static_cast(copy->from_field); - Field_timestamp *t= static_cast(copy->to_field); - ulong sec_part; - my_time_t ts= f->get_timestamp(&sec_part); - t->store_TIME(ts, sec_part); + // XXX why couldn't we do it everywhere? + copy->from_field->save_in_field(copy->to_field); } -- cgit v1.2.1 From ca3c8d9b58fdc267b7c4df1ce3afde5ec6599344 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 22 Sep 2017 13:57:25 +0200 Subject: shut out Connect cmake-time warning about missing Findlibmondgodoc.cmake --- storage/connect/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt index 6dc06843535..d422b076fc2 100644 --- a/storage/connect/CMakeLists.txt +++ b/storage/connect/CMakeLists.txt @@ -303,7 +303,7 @@ IF(CONNECT_WITH_MONGO) C:/mongo-c-driver/lib D:/mongo-c-driver/lib) ENDIF(WIN32) - FIND_PACKAGE(libmongoc-1.0 1.7) + FIND_PACKAGE(libmongoc-1.0 1.7 QUIET) IF (libmongoc-1.0_FOUND) INCLUDE_DIRECTORIES(${MONGOC_INCLUDE_DIRS}) SET(MONGOC_LIBRARY ${MONGOC_LIBRARIES}) -- cgit v1.2.1 From d8fe5fa131936794a4acff2be899fe18f6a42985 Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Fri, 22 Sep 2017 17:54:23 +0300 Subject: Updated list of unstable tests for 10.1.27 release --- mysql-test/unstable-tests | 174 ++++++++++++++++++++++++++++------------------ 1 file changed, 107 insertions(+), 67 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index 5ec491171b1..cf99f822dfc 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,23 +23,22 @@ # ############################################################################## +main.alter_table : Modified in 10.1.27 main.alter_table_trans : MDEV-12084 - timeout main.analyze_format_json : MDEV-11866 - Wrong result main.analyze_stmt_orderby : MDEV-11866 - Wrong result main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result main.binary_to_hex : Added in 10.1.26 -main.bootstrap : Modified in 10.1.25 -main.count_distinct : Modified in 10.1.26 +main.count_distinct : Modified in 10.1.27 main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : Modified in 10.1.26 -main.ctype_ucs : Modified in 10.1.25 main.ctype_utf16le : MDEV-10675: timeout or extra warnings +main.ctype_utf8 : Modified in 10.1.27 main.drop-no_root : MDEV-12633 - Valgrind warnings main.errors : Modified in 10.1.26 main.events_bugs : MDEV-12892 - Crash in fill_schema_processlist main.events_restart : MDEV-12236 - Server shutdown problem -main.func_concat : Modified in 10.1.25 -main.func_crypt : Modified in 10.1.25 +main.func_misc : Modified in 10.1.27 main.func_regexp_pcre : MDEV-13412 - Crash; modified in 10.1.26 main.gis : Modified in 10.1.26 main.gis-rt-precise : Modified in 10.1.26 @@ -48,28 +47,26 @@ main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - Wrong execution plan, timeout with valgrind main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure -main.join_outer : Modified in 10.1.25 +main.insert : Modified in 10.1.27 main.kill_processlist-6619 : MDEV-10793 - wrong result in processlist main.loadxml : Data file modified in 10.1.26 +main.log_tables-big : Modified in 10.1.27 main.mdev-504 : MDEV-10607 - sporadic "can't connect" main.mdev375 : MDEV-10607 - sporadic "can't connect" -main.mdl_sync : Modified in 10.1.25 main.merge : MDEV-10607 - sporadic "can't connect" -main.mysql : Modified in 10.1.25 main.mysqlcheck : MDEV-12633 - Valgrind warnings -main.mysqld--help : Modified in 10.1.25 main.mysqlslap : MDEV-11801 - timeout -main.mysqltest : MDEV-9269 - fails on Alpha; modified in 10.1.25 +main.mysqltest : MDEV-9269 - fails on Alpha main.mysql_client_test : MDEV-12633 - Valgrind warnings main.mysql_client_test_comp : MDEV-12633 - Valgrind warnings main.mysql_client_test_nonblock : MDEV-12633 - Valgrind warnings main.mysql_upgrade : Modified in 10.1.26 +main.old-mode : Modified in 10.1.27 main.openssl_1 : Modified in 10.1.26 main.openssl_6975 : Modified in 10.1.26 -main.order_by : MOdified in 10.1.25 main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan -main.partition_alter : Modified in 10.1.25 main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings +main.partition_symlink : Modified in 10.1.27 main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count main.query_cache : MDEV-12895 - Wrong result main.range_vs_index_merge_innodb : MDEV-12637 - Timeout @@ -78,20 +75,20 @@ main.repair_symlink-5543 : MDEV-12215 - Wrong error codes main.set_statement : MDEV-13183 - Wrong result main.show_check : MDEV-12633 - Valgrind warnings main.show_explain : MDEV-10674 - sporadic failure +main.sp : Modified in 10.1.27 main.sp-security : MDEV-10607 - sporadic "can't connect" main.ssl : Modified in 10.1.26 main.status : MDEV-8510 - sporadic wrong result main.subselect : Modified in 10.1.26 main.subselect_innodb : MDEV-10614 - sporadic wrong results -main.subselect_mat_cost_bugs : Modified in 10.1.25 main.subselect_nulls : Modified in 10.1.26 -main.subselect_sj_mat : Modified in 10.1.25 -main.subselect_sj2_mat : Modified in 10.1.25 +main.symlink : Modified in 10.1.27 main.symlink-aria-11902 : MDEV-12215 - Unexpected errors main.symlink-myisam-11902 : MDEV-12215 - Unexpected errors +main.tc_heuristic_recover : Added in 10.1.27 main.type_datetime_hires : MDEV-10687 - timeout main.union : Modified in 10.1.26 -main.view : Modified in 10.1.26 +main.view : Modified in 10.1.27 #---------------------------------------------------------------- @@ -115,23 +112,56 @@ binlog_encryption.rpl_semi_sync : MDEV-11220 - Wrong result, MDEV-11673 - Val #---------------------------------------------------------------- -connect.tbl : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results +connect.alter_xml : Modified in 10.1.27 +connect.alter_xml2 : Added in 10.1.27 +connect.infoschema-9739 : Modified in 10.1.27 +connect.infoschema2-9739 : Added in 10.1.27 +connect.jdbc_new : Modified in 10.1.27 +connect.json : Modified in 10.1.27 +connect.json_java_2 : Added in 10.1.27 +connect.json_java_3 : Added in 10.1.27 +connect.json_mongo_c : Added in 10.1.27 +connect.json_udf : Modified in 10.1.27 +connect.json_udf_bin : Modified in 10.1.27 +connect.mongo_c : Added in 10.1.27 +connect.mongo_java_2 : Added in 10.1.27 +connect.mongo_java_3 : Added in 10.1.27 +connect.mul_new : Added in 10.1.27 +connect.mysql_exec : Modified in 10.1.27 +connect.mysql_new : Modified in 10.1.27 +connect.tbl : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results; modified in 10.1.27 +connect.tbl_thread : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results; added in 10.1.27 +connect.unsigned : Modified in 10.1.27 +connect.upd : Modified in 10.1.27 +connect.xml : Modified in 10.1.27 +connect.xml2 : Added in 10.1.27 +connect.xml2_grant : Added in 10.1.27 +connect.xml2_html : Added in 10.1.27 +connect.xml2_mdev5261 : Added in 10.1.27 +connect.xml2_mult : Added in 10.1.27 +connect.xml2_zip : Added in 10.1.27 +connect.xml_grant : Modified in 10.1.27 +connect.xml_html : Modified in 10.1.27 +connect.xml_mdev5261 : Modified in 10.1.27 +connect.xml_mult : Modified in 10.1.27 +connect.xml_zip : Modified in 10.1.27 +connect.zip : MDEV-13884 - Wrong result; modified in 10.1.27 #---------------------------------------------------------------- -encryption.create_or_replace : MDEV-9359 - Assertion failure +encryption.create_or_replace : MDEV-9359 - Assertion failure, MDEV-13516 - Assertion failure +encryption.encrypt_and_grep : MDEV-13765 - Wrong result encryption.innodb-bad-key-change2 : MDEV-12632 - Valgrind warnings encryption.innochecksum : Modified in 10.1.26 -encryption.innodb-checksum-algorithm : MDEV-13167 - Assertion failure; added in 10.1.25 -encryption.innodb-compressed-blob : Modified in 10.1.25 encryption.innodb-discard-import-change : MDEV-12632 - Valgrind warnings +encryption.innodb_encryption : Modified in 10.1.27 encryption.innodb_encryption_discard_import : MDEV-12903 - Wrong result encryption.innodb_encryption_filekeys : MDEV-9962 - timeouts encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure encryption.innodb_encryption_tables : MDEV-9359 - Assertion failure encryption.innodb_first_page : MDEV-10689 - crashes -encryption.innodb-first-page-read : MDEV-13181 - Signal 8; added in 10.1.25 -encryption.innodb_lotoftables : MDEV-11531 - InnoDB error +encryption.innodb-first-page-read : MDEV-13181 - Signal 8; modified in 10.1.27 +encryption.innodb_lotoftables : MDEV-11531 - InnoDB error; modified in 10.1.27 encryption.innodb-missing-key : MDEV-9359 - assertion failure encryption.innodb-page_encryption : MDEV-10641 - mutex problem encryption.innodb-redo-badkey : MDEV-12898 - Server hang on startup @@ -164,63 +194,69 @@ funcs_2.myisam_charset : MDEV-11535 - Timeout #---------------------------------------------------------------- -galera.galera_defaults : Modified in 10.1.25 -galera.MW-369 : Added in 10.1.25 +galera.* : The suite was enabled in 10.1.27 and is still unstable +galera_3nodes.* : The suite has not been stabilized yet + +galera.galera_applier_ftwrl_table_alter : MDEV-13738 - MySQL server has gone away +galera.galera_gcs_fc_limit : MDEV-13877 - Timeout +galera.galera_suspend_slave : MDEV-13873 - Wrong error code +galera.galera_toi_truncate : MDEV-13743 - query 'reap' succeeded +galera.galera_unicode_identifiers : MDEV-13871 - Unknown database +galera.galera_var_node_address : MDEV-13880 - Failed to start mysqld +galera.galera_wan : MDEV-13879 - Stray state UUID msg warnings +galera.galera_wsrep_log_conficts : MDEV-13874 - check-testcase failed +galera.partition : MDEV-13881 - Wrong result +galera.query_cache : MDEV-13883 - Wrong result +galera.MW-328A : MDEV-13876 - Wrong result #---------------------------------------------------------------- innodb.101_compatibility : Modified in 10.1.26 +innodb.alter_rename_existing : Added in 10.1.27 innodb.binlog_consistent : MDEV-10618 - Server fails to start -innodb.doublewrite : MDEV-12905 - Lost connection to MySQL server; modified in 10.1.25 +innodb.create-index-debug : Added in 10.1.27 +innodb.doublewrite : MDEV-12905 - Lost connection to MySQL server +innodb.index_tree_operation : Added in 10.1.27 innodb.innodb-32k : Option file modified in 10.1.26 innodb.innodb-32k-crash : Option file modified in 10.1.26 innodb.innodb-64k : Modified in 10.1.26 -innodb.innodb-64k-crash : Option file modified in 10.1.26 -innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS; modified in 10.1.25 -innodb.innodb-alter-discard : Modified in 10.1.25 -innodb.innodb-alter-nullable : Modified in 10.1.25 -innodb.innodb-alter-table : MDEV-10619 - Testcase timeout; modified in 10.1.25 -innodb.innodb-alter-tempfile : Modified in 10.1.25 +innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup +innodb.innodb-alter : Added in 10.1.27 +innodb.innodb-alter-autoinc : Added in 10.1.27 +innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS +innodb.innodb-alter-table : MDEV-10619 - Testcase timeout innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb_bug14147491 : MDEV-11808 - wrong error codes innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan -innodb.innodb_bug53290 : MDEV-12634 - Valgrind warnings -innodb.innodb-enlarge-blob : Added in 10.1.26 +innodb.innodb-enlarge-blob : Modified in 10.1.27 +innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown +innodb.innodb-index-debug : Added in 10.1.27 +innodb.innodb-index-online : Added in 10.1.27 +innodb.innodb-index-online-delete : Added in 10.1.27 +innodb.innodb-index-online-fk : Added in 10.1.27 +innodb.innodb-index-online-purge : Added in 10.1.27 innodb.innodb_max_recordsize_32k : Added in 10.1.26 innodb.innodb_max_recordsize_64k : Added in 10.1.26 innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem -innodb.innodb_prefix_index_restart_server : MDEV-12899 - Server crash on shutdown innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_sys_semaphore_waits : MDEV-10331 - wrong result +innodb.innodb-table-online : Added in 10.1.27 +innodb.innodb-wl5980-alter : Added in 10.1.27 innodb.innodb_zip_innochecksum : Added in 10.1.26 -innodb.innodb_zip_innochecksum2 : Added in 10.1.26 +innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks innodb.innodb_zip_innochecksum3 : Added in 10.1.26 -innodb.log_data_file_size : MDEV-12893 - Database page corruption; modified in 10.1.25 -innodb.log_file_size : Modified in 10.1.25 -innodb.row_format_redundant : Added in 10.1.25 -innodb.table_flags : Added in 10.1.25 +innodb.log_data_file_size : Modified in 10.1.27 +innodb.xa_recovery : Modified in 10.1.27 innodb_fts.fulltext_misc : MDEV-12636 - Valgrind warnings -innodb_zip.innodb_bug36169 : Modified in 10.1.25 -innodb_zip.innodb_bug36172 : Modified in 10.1.25 -innodb_zip.innodb_bug52745 : Modified in 10.1.25 -innodb_zip.innodb_bug53591 : Modified in 10.1.25 -innodb_zip.innodb_bug56680 : Modified in 10.1.25 -innodb_zip.innodb-create-options : Modified in 10.1.25 -innodb_zip.innodb-zip : Modified in 10.1.25 #---------------------------------------------------------------- -mariabackup.full_backup : Modified in 10.1.25 -mariabackup.incremental_backup : Uses include file modified in 10.1.25 -mariabackup.incremental_encrypted : Modified in 10.1.25 -mariabackup.xb_aws_key_management : Uses include file modified in 10.1.25 -mariabackup.xb_compressed_encrypted : Modified in 10.1.25 -mariabackup.xb_file_key_management : Modified in 10.1.25 -mariabackup.xb_fulltext_encrypted : Uses include file modified in 10.1.25 -mariabackup.xb_partition : Uses include file modified in 10.1.25 -mariabackup.xbstream : Uses include file modified in 10.1.25 +mariabackup.apply-log-only : Added in 10.1.27 +mariabackup.apply-log-only-incr : Added in 10.1.27 +mariabackup.auth_plugin_win : Added in 10.1.27 +mariabackup.xb_aws_key_management : Modified in 10.1.27 #---------------------------------------------------------------- @@ -237,7 +273,6 @@ mroonga/storage.repair_table_no_index_file : MDEV-9364 - multi_source.gtid : MDEV-10417 - Fails on Mips multi_source.info_logs : MDEV-10042 - Wrong result, MDEV-12629 - Valgrind warnings -multi_source.mdev-9544 : Added in 10.1.25 multi_source.multisource : MDEV-10417 - Fails on Mips multi_source.reset_slave : MDEV-10690 - wrong result multi_source.simple : MDEV-4633 - Wrong slave status output @@ -246,12 +281,19 @@ multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_h #---------------------------------------------------------------- parts.longname : Added in 10.1.26 +parts.partition_exch_myisam_innodb : Modified in 10.1.27 +parts.partition_exch_qa_10 : Include files modified in 10.1.27 +parts.partition_exch_qa_11 : Include files modified in 10.1.27 +parts.partition_exch_qa_12 : Include files modified in 10.1.27 +parts.partition_exch_qa_14 : Modified in 10.1.27 +parts.partition_exch_qa_15 : Modified in 10.1.27 +parts.partition_exch_qa_2 : Modified in 10.1.27 +parts.partition_exch_qa_3 : Modified in 10.1.27 +parts.partition_exch_qa_6 : Modified in 10.1.27 parts.partition_innodb_status_file : MDEV-12901 - Valgrind -parts.quoting : Modified in 10.1.25 #---------------------------------------------------------------- -perfschema.bad_option_2 : Modified in 10.1.25 perfschema.func_file_io : MDEV-5708 - fails for s390x perfschema.func_mutex : MDEV-5708 - fails for s390x perfschema.privilege_table_io : MDEV-13184 - Extra lines; modified in 10.1.26 @@ -269,11 +311,6 @@ plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc #---------------------------------------------------------------- -roles.current_role_view-12666 : Added in 10.1.25 -roles.show_create_database-10463 : Added in 10.1.25 - -#---------------------------------------------------------------- - rpl.circular_serverid0 : Added in 10.1.26 rpl.last_insert_id : MDEV-10625 - warnings in error log rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips @@ -315,12 +352,12 @@ rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings rpl.rpl_reset_slave_fail : Added in 10.1.26 rpl.rpl_rotate_logs : Include file modified in 10.1.26 rpl.rpl_row_binlog_max_cache_size : Include file modified in 10.1.26 +rpl.rpl_row_img_eng_min : MDEV-13875 - command "diff_files" failed rpl.rpl_row_loaddata_concurrent : Include file modified in 10.1.26 rpl.rpl_row_log_innodb : MDEV-10688 - Wrong result rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x rpl.rpl_row_tabledefs_2myisam : Include file modified in 10.1.26 rpl.rpl_row_tabledefs_3innodb : Include file modified in 10.1.26 -rpl.rpl_row_utf32 : One-time server startup timeout on ppc64le in 10.1.25 rpl.rpl_semi_sync : MDEV-11220 - Wrong result rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status, MDEV-10892 - Assertion failure @@ -328,11 +365,14 @@ rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock +rpl.rpl_sp_variables : Added in 10.1.27 rpl.rpl_stm_000001 : Include file modified in 10.1.26 rpl.rpl_stm_binlog_max_cache_size : Include file modified in 10.1.26 rpl.rpl_stm_loaddata_concurrent : Include file modified in 10.1.26 rpl.rpl_sync : MDEV-10633 - Database page corruption +rpl.rpl_temporal_format_mariadb53_to_mysql56_dst : Added in 10.1.27 rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries +rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result #---------------------------------------------------------------- @@ -371,7 +411,6 @@ sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s39 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout sys_vars.innodb_buffer_pool_dump_pct_basic : MDEV-10651 - sporadic failure on file_exists sys_vars.innodb_fatal_semaphore_wait_threshold : MDEV-10513 - crashes -sys_vars.innodb_sched_priority_cleaner_basic : Modified in 10.1.25 sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash sys_vars.rpl_init_slave_func : MDEV-10149 - wrong results sys_vars.sysvars_innodb : MDEV-6958 - error-prone rdiffs @@ -388,7 +427,7 @@ tokudb.change_column_char : MDEV-12822 - Lost connection to MySQL ser tokudb.cluster_filter : MDEV-10678 - Wrong execution plan tokudb.cluster_filter_hidden : MDEV-10678 - Wrong execution plan tokudb.cluster_filter_unpack_varchar : MDEV-10636 - Wrong execution plan -tokudb.dir_per_db : MDEV-11537 - Wrong result +tokudb.dir_per_db : MDEV-11537 - Wrong result; modified in 10.1.27 tokudb.hotindex-insert-bigchar : MDEV-12640 - Crash tokudb.hotindex-update-1 : MDEV-12640 - Crash tokudb.kill_query_blocked_in_lt : Added in 10.1.26 @@ -451,7 +490,8 @@ vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout #---------------------------------------------------------------- wsrep.binlog_format : MDEV-11532 - WSREP has not yet prepared node +wsrep.mdev_6832 : Option file changed in 10.1.27 +wsrep.mdev_7798 : Option file changed in 10.1.27 wsrep.pool_of_threads : MDEV-12234 - Library problem on Power -wsrep.variables : Include file modified in 10.1.25 wsrep_info.plugin : MDEV-12909 - Wrong result -- cgit v1.2.1 From cd2a85e763671dfe9f91fbc5a00aa6f747d8860d Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Fri, 22 Sep 2017 21:47:38 +0300 Subject: Updated list of unstable tests for 10.2.9 --- mysql-test/unstable-tests | 261 ++++++++++++++++++++-------------------------- 1 file changed, 115 insertions(+), 146 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index a03628bdea6..62a3d493288 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -24,44 +24,39 @@ ############################################################################## -main.alter_table : Modified in 10.2.8 +main.alter_table : Modified in 10.2.9 main.alter_table_online : Modified in 10.2.8 main.analyze_format_json : MDEV-11866 - Mismatch; modified in 10.2.8 main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result main.analyze_stmt_orderby : MDEV-11866 - Mismatch main.binary_to_hex : Added in 10.2.8 -main.bootstrap : Modified in 10.2.7 -main.check_constraint : Modified in 10.2.8 -main.client_xml : Modified in 10.2.7 -main.count_distinct : Modified in 10.2.8 +main.check_constraint : Modified in 10.2.9 +main.connect2 : MDEV-13885 - Server crash +main.count_distinct : Modified in 10.2.9 main.create_drop_event : Modified in 10.2.8 -main.cte_nonrecursive : Modified in 10.2.7 -main.ctype_ucs : Modified in 10.2.7 -main.derived_cond_pushdown : Modified in 10.2.7 -main.derived_view : Modified in 10.2.7 +main.ctype_utf8 : Modified in 10.2.9 +main.date_formats : Modified in 10.2.9 +main.default : Modified in 10.2.9 main.drop-no_root : MDEV-12633 - Valgrind main.errors : Modified in 10.2.8 main.events_2 : MDEV-13277 - Crash -main.func_concat : Modified in 10.2.7 -main.func_crypt : Modified in 10.2.7 -main.func_group : Modified in 10.2.7 -main.func_json : MDEV-11648 - Crash, valgrind; modified in 10.2.8 +main.func_json : MDEV-11648 - Crash, valgrind; modified in 10.2.9 +main.func_math : Modified in 10.2.9 +main.func_misc : Modified in 10.2.9 main.func_regexp_pcre : MDEV-13412 - Crash; modified in 10.2.8 main.gis : Modified in 10.2.8 main.gis-json : Modified in 10.2.8 main.group_by : Modified in 10.2.8 main.index_merge_innodb : MDEV-7142 - Plan mismatch; include file modified in 10.2.8 main.index_merge_myisam : Include file modified in 10.2.8 -main.innodb_ext_key : Modified in 10.2.7 main.innodb_mysql_lock : MDEV-7861 - Wrong result -main.join_outer : Modified in 10.2.7 +main.insert : Modified in 10.2.9 main.kill-2 : MDEV-13257 - Wrong result main.loadxml : Data file modified in 10.2.8 +main.locale : Modified in 10.2.9 main.log_slow : MDEV-13263 - Wrong result -main.mdl : Added in 10.2.7 -main.mdl_sync : Modified in 10.2.7 -main.myisam_debug : Modified in 10.2.7 -main.mysql : Modified in 10.2.7 +main.log_tables-big : Modified in 10.2.9 +main.myisam : Modified in 10.2.9 main.mysql_client_test : MDEV-12633 - Valgrind main.mysql_client_test_comp : MDEV-12633 - Valgrind main.mysql_client_test_nonblock : MDEV-12633 - Valgrind, CONC-208 - Error on Power @@ -71,51 +66,51 @@ main.mysqlcheck : MDEV-12633 - Valgrind main.mysqld--help : Modified in 10.2.8 main.mysqld_option_err : MDEV-12747 - Timeout main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug -main.mysqltest : Modified in 10.2.7 +main.mysqltest : MDEV-13887 - Wrong result +main.old-mode : Modified in 10.2.9 main.openssl_1 : MDEV-13492 - Unknown SSL error -main.order_by : Modified in 10.2.7 -main.partition_alter : Modified in 10.2.7 +main.partition_symlink : Modified in 10.2.9 +main.range_interrupted-13751 : Added in 10.2.9 main.read_only : Modified in 10.2.8 main.shm : MDEV-12727 - Mismatch, ERROR 2013 main.show_check : MDEV-12633 - Valgrind -main.sp : MDEV-7866 - Mismatch; modified in 10.2.8 +main.sp : MDEV-7866 - Mismatch; modified in 10.2.9 main.sp-destruct : Modified in 10.2.8 main.sp-security : Modified in 10.2.8 main.ssl_7937 : MDEV-11546 - Timeout on Windows main.ssl_ca : MDEV-10895 - SSL connection error on Power +main.ssl_cert_verify : MDEV-13735 - Server crash main.ssl_connect : MDEV-13492 - Unknown SSL error main.ssl_timeout : MDEV-11244 - Crash main.stat_tables_par : MDEV-13266 - Wrong result main.statistics : Modified in 10.2.8 main.status : MDEV-13255 - Wrong result main.subselect : Modified in 10.2.8 -main.subselect_innodb : Modified in 10.2.7 -main.subselect_mat_cost_bugs : Modified in 10.2.7 main.subselect_nulls : Modified in 10.2.8 -main.subselect_sj : Modified in 10.2.7 -main.subselect_sj_mat : Modified in 10.2.7 -main.subselect_sj2_mat : Modified in 10.2.7 -main.trigger : Modified in 10.2.7 +main.symlink : Modified in 10.2.9 +main.tc_heuristic_recover : Added in 10.2.9 main.type_json : Modified in 10.2.8 main.type_num : Modified in 10.2.8 main.union : Modified in 10.2.8 -main.view : Modified in 10.2.8 -main.win : Modified in 10.2.8 -main.win_insert_select : Added in 10.2.7 +main.userstat : MDEV-12904 - SSL errors +main.view : Modified in 10.2.9 +main.wait_timeout : Modified in 10.2.9 +main.wait_timeout_not_windows : Modified in 10.2.9 +main.win : Modified in 10.2.9 +main.win_as_arg_to_aggregate_func : Added in 10.2.9 +main.win_insert_select : Modified in 10.2.9 #---------------------------------------------------------------- +archive.archive-big : MDEV-10615 - Table marked as crashed archive.mysqlhotcopy_archive : MDEV-10995 - Hang on debug #---------------------------------------------------------------- binlog.binlog_commit_wait : MDEV-10150 - Mismatch binlog.binlog_innodb : Modified in 10.2.8 -binlog.binlog_parallel_replication_marks_row : Added in 10.2.7 -binlog.binlog_parallel_replication_marks_stm_mix : Added in 10.2.7 binlog.binlog_unsafe : Modified in 10.2.8 -binlog.flashback : Modified in 10.2.7 -binlog.mysqladmin : Added in 10.2.7 +binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint #---------------------------------------------------------------- @@ -146,7 +141,7 @@ connect.mongo_java_3 : Added in 10.2.8 connect.mul_new : Added in 10.2.8 connect.mysql_exec : Modified in 10.2.8 connect.tbl : MDEV-10179 - Mismatch, MDEV-9844 - Valgrind, crash; modified in 10.2.8 -connect.tbl_thread : MDEV-10179 - Mismatch, MDEV-9844 - Valgrind, crash; added in 10.2.8 +connect.tbl_thread : MDEV-10179 - Mismatch, MDEV-9844 - Valgrind, crash; modified in 10.2.9 connect.vcol : MDEV-12374 - Fails on Windows connect.xml : Modified in 10.2.8 connect.xml2 : Added in 10.2.8 @@ -164,24 +159,21 @@ connect.zip : Modified in 10.2.8 #---------------------------------------------------------------- -csv.read_only : Added in 10.2.7 - -#---------------------------------------------------------------- - encryption.create_or_replace : MDEV-9359, MDEV-13516 - Assertion failure, MDEV-12694 - Timeout -encryption.innochecksum : Modified in 10.2.8 -encryption.innodb-checksum-algorithm : Added in 10.2.7 -encryption.innodb-compressed-blob : Modified in 10.2.7 +encryption.debug_key_management : MDEV-13841 - Timeout +encryption.encrypt_and_grep : MDEV-13765 - Wrong result +encryption.innochecksum : MDEV-13644 - Assertion failure; modified in 10.2.8 encryption.innodb-discard-import-change : MDEV-12632 - Valgrind +encryption.innodb_encryption : Modified in 10.2.9 encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout encryption.innodb_encryption_discard_import : MDEV-12903 - Wrong result encryption.innodb_encryption_filekeys : MDEV-9962 - Timeout -encryption.innodb_encrypt_log : MDEV-13253 - Wrong result; modified in 10.2.8 -encryption.innodb_encrypt_log_corruption : MDEV-13253 - Wrong result -encryption.innodb_encryption-page-compression : Re-enabled in 10.2.7 +encryption.innodb_encrypt_log : Modified in 10.2.9 encryption.innodb_encryption_tables : MDEV-9359 - Assertion failure -encryption.innodb-first-page-read : Added in 10.2.7 -encryption.innodb-key-rotation-disable : Modified in 10.2.7 +encryption.innodb-first-page-read : Modified in 10.2.9 +encryption.innodb_lotoftables : Modified in 10.2.9 +encryption.innodb-redo-badkey : MDEV-13893 - page cannot be decrypted; modified in 10.2.9 +encryption.innodb-spatial-index : MDEV-13746 - Wrong result; modified in 10.2.9 encryption.second_plugin-12863 : Added in 10.2.8 #---------------------------------------------------------------- @@ -190,11 +182,11 @@ engines/rr_trx.* : MDEV-10998 - Not maintained #---------------------------------------------------------------- -federated.assisted_discovery : Modified in 10.2.7 federated.federated_innodb : MDEV-10617 - Wrong checksum federated.federated_transactions : MDEV-10617 - Wrong checksum federated.federatedx : MDEV-10617 - Wrong checksum federated.net_thd_crash-12725 : Added in 10.2.8 +federated.net_thd_crash-12951 : Added in 10.2.9 #---------------------------------------------------------------- @@ -216,123 +208,107 @@ funcs_2/charset.* : MDEV-10999 - Not maintained #---------------------------------------------------------------- -galera.galera_defaults : Modified in 10.2.7 -galera.MW-309 : Added in 10.2.7 -galera.MW-369 : Added in 10.2.7 +galera.* : Suite is not stable yet +galera_3nodes.* : Suite is not stable yet #---------------------------------------------------------------- gcol.gcol_bugfixes : Modified in 10.2.8 gcol.gcol_keys_innodb : Modified in 10.2.8 gcol.gcol_keys_myisam : Include file modified in 10.2.8 -gcol.gcol_rollback : Modified in 10.2.8 +gcol.gcol_rollback : Modified in 10.2.9 +gcol.gcol_update : Modified in 10.2.9 gcol.innodb_virtual_basic : Modified in 10.2.8 gcol.innodb_virtual_debug_purge : MDEV-13568 - Wrong result; modified in 10.2.8 gcol.innodb_virtual_purge : Modified in 10.2.8 #---------------------------------------------------------------- -innodb.101_compatibility : MDEV-13570 - Crash; perl file modified in 10.2.7 -innodb.alter_missing_tablespace : Modified in 10.2.7 +innodb.101_compatibility : MDEV-13891 - Wrong result +innodb.alter_crash : Added in 10.2.9 +innodb.alter_rename_existing : Added in 10.2.9 +innodb.create-index-debug : Added in 10.2.9 innodb.deadlock_detect : MDEV-13262 - Wrong error code innodb.defrag_mdl-9155 : MDEV-11336 - Timeout -innodb.doublewrite : Modified in 10.2.7 -innodb.drop_table_background : Added in 10.2.7 innodb.foreign_key : Modified in 10.2.8 -innodb.group_commit_binlog_pos : Modified in 10.2.7 -innodb.group_commit_binlog_pos_no_optimize_thread : Modified in 10.2.7 -innodb.ibuf_not_empty : MDEV-12741 - Tablespace error +innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure innodb.index_merge_threshold : Modified in 10.2.8 +innodb.index_tree_operation : Added in 10.2.9 innodb.innodb-32k : Opt file modified in 10.2.8 innodb.innodb-32k-crash : Opt file modified in 10.2.8 innodb.innodb-64k : Modified in 10.2.8 innodb.innodb-64k-crash : Opt file modified in 10.2.8 -innodb.innodb-alter-debug : Modified in 10.2.7 -innodb.innodb-alter-nullable : Modified in 10.2.7 -innodb.innodb-alter-table : Modified in 10.2.7 -innodb.innodb-alter-tempfile : Modified in 10.2.7 -innodb.innodb-alter-timestamp : Modified in 10.2.7 innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt -innodb.innodb_bug53290 : MDEV-12634 - Valgrind +innodb.innodb-alter : Added in 10.2.9 +innodb.innodb-alter-autoinc : Added in 10.2.9 innodb.innodb_defragment : MDEV-11336 - Mismatch innodb.innodb_defragment_fill_factor : Modified in 10.2.8 innodb.innodb_defragment_small : MDEV-11336 - Mismatch innodb.innodb_defrag_binlog : MDEV-11336 - Mismatch innodb.innodb_defrag_concurrent : MDEV-11336 - Assertion failure, mismatch innodb.innodb_defrag_stats : MDEV-11336 - Mismatch -innodb.innodb-enlarge-blob : Added in 10.2.8 -innodb.innodb_force_recovery : Modified in 10.2.7 +innodb.innodb-enlarge-blob : Modified in 10.2.9 innodb.innodb-get-fk : MDEV-13276 - Server crash +innodb.innodb-index : Modified in 10.2.9 +innodb.innodb-index-debug : Added in 10.2.9 +innodb.innodb-index-online : Added in 10.2.9 +innodb.innodb-index-online-delete : Added in 10.2.9 +innodb.innodb-index-online-fk : Added in 10.2.9 +innodb.innodb-index-online-purge : Added in 10.2.9 innodb.innodb_information_schema : MDEV-8851 - Wrong result innodb.innodb_max_recordsize_32k : Added in 10.2.8 innodb.innodb_max_recordsize_64k : Added in 10.2.8 -innodb.innodb-page_compression_default : Modified in 10.2.7 -innodb.innodb-page_compression_snappy : Modified in 10.2.7 -innodb.innodb_stats_persistent : Added in 10.2.7 +innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure +innodb.innodb-table-online : MDEV-13894 - Wrong result; modified in 10.2.9 +innodb.innodb_stats_persistent_debug : Added in 10.2.9 innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait +innodb.innodb-wl5522-debug : Modified in 10.2.9 +innodb.innodb-wl5980-alter : Added in 10.2.9 innodb.innodb_zip_innochecksum : Added in 10.2.8 innodb.innodb_zip_innochecksum2 : Added in 10.2.8 innodb.innodb_zip_innochecksum3 : Added in 10.2.8 innodb.log_corruption : MDEV-13251 - Wrong result -innodb.log_data_file_size : Modified in 10.2.7 -innodb.log_file : Modified in 10.2.7 -innodb.log_file_name : Modified in 10.2.7 -innodb.log_file_size : MDEV-13471 - Crash; modified in 10.2.7 -innodb.purge_thread_shutdown : Added in 10.2.8 -innodb.read_only_recovery : Modified in 10.2.8 +innodb.log_data_file_size : Modified in 10.2.9 +innodb.purge_thread_shutdown : MDEV-13792 - Wrong result; added in 10.2.8 +innodb.read_only_recovery : MDEV-13886 - Server crash, modified in 10.2.8 innodb.rename_table : Added in 10.2.8 -innodb.row_format_redundant : Added in 10.2.7 -innodb.table_flags : MDEV-13572 - Wrong result; added in 10.2.7 -innodb.temporary_table : MDEV-13265 - Wrong result; modified in 10.2.7 +innodb.table_flags : MDEV-13572 - Wrong result; modified in 10.2.9 +innodb.temporary_table : MDEV-13265 - Wrong result innodb.truncate_debug : MDEV-13256 - Timeout -innodb.truncate_purge_debug : Modified in 10.2.7 +innodb.xa_recovery : Modified in 10.2.9 innodb_fts.fulltext_misc : MDEV-12636 - Valgrind -innodb_fts.innodb_fts_plugin : Modified in 10.2.7 +innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed innodb_gis.1 : Modified in 10.2.8 +innodb_gis.alter_spatial_index : Modified in 10.2.9 innodb_gis.gis : Modified in 10.2.8 -innodb_zip.bug36169 : Modified in 10.2.7 -innodb_zip.bug36172 : Modified in 10.2.7 -innodb_zip.bug52745 : Modified in 10.2.7 -innodb_zip.bug53591 : Modified in 10.2.7 -innodb_zip.bug56680 : Modified in 10.2.7 -innodb_zip.cmp_drop_table : Modified in 10.2.7 -innodb_zip.create_options : Modified in 10.2.7 -innodb_zip.innochecksum : Modified in 10.2.7 -innodb_zip.innochecksum_2 : Modified in 10.2.7 +innodb_zip.create_options : Modified in 10.2.9 innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings; modified in 10.2.8 -innodb_zip.innodb-zip : Modified in 10.2.7 -innodb_zip.recover : Modified in 10.2.7 -innodb_zip.restart : Modified in 10.2.7 innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket -innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.2.7 -innodb_zip.wl5522_zip : Modified in 10.2.7 -innodb_zip.wl6344_compress_level : Modified in 10.2.7 +innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.2.9 innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout #---------------------------------------------------------------- maria.insert_select : MDEV-12757 - Timeout +maria.maria : Modified in 10.2.9 #---------------------------------------------------------------- -mariabackup.* : suite.pm and .opt modified in 10.2.7 - -mariabackup.full_backup : Modified in 10.2.7 +mariabackup.apply-log-only : Added in 10.2.9 +mariabackup.apply-log-only-incr : Added in 10.2.9 +mariabackup.auth_plugin_win : Added in 10.2.9 +mariabackup.full_backup : MDEV-13889 - Timeout mariabackup.huge_lsn : Added in 10.2.8 mariabackup.incremental_backup : Modified in 10.2.8 -mariabackup.incremental_encrypted : Modified in 10.2.7 -mariabackup.partial : Modified in 10.2.7 -mariabackup.partial_exclude : Modified in 10.2.7 -mariabackup.small_ibd : Modified in 10.2.7 -mariabackup.xb_aws_key_management : Modified in 10.2.7 -mariabackup.xb_compressed_encrypted : Modified in 10.2.7 -mariabackup.xb_file_key_management : Modified in 10.2.7 -mariabackup.xb_partition : Modified in 10.2.7 -mariabackup.xbstream : Modified in 10.2.7 +mariabackup.lock_ddl_per_table : Added in 10.2.9 +mariabackup.partial : Modified in 10.2.9 +mariabackup.xb_aws_key_management : Modified in 10.2.9 +mariabackup.xb_compressed_encrypted : MDEV-13890 - Assertion failure +mariabackup.xb_page_compress : Modified in 10.2.9 #---------------------------------------------------------------- @@ -341,15 +317,21 @@ mroonga/storage.index_multiple_column_unique_datetime_index_read : MDEV-8643 - V #---------------------------------------------------------------- multi_source.info_logs : MDEV-12629 - Valgrind -multi_source.mdev-9544 : Added in 10.2.7 multi_source.reset_slave : MDEV-10690 - Wrong result multi_source.simple : MDEV-4633 - Wrong result #---------------------------------------------------------------- -parts.longname : Added in 10.2.7 parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket -parts.quoting : Added in 10.2.7 +parts.partition_exch_myisam_innodb : Modified in 10.2.9 +parts.partition_exch_qa_10 : Include files modified in 10.2.9 +parts.partition_exch_qa_11 : Include files modified in 10.2.9 +parts.partition_exch_qa_12 : Include files modified in 10.2.9 +parts.partition_exch_qa_14 : Modified in 10.2.9 +parts.partition_exch_qa_15 : Modified in 10.2.9 +parts.partition_exch_qa_2 : Modified in 10.2.9 +parts.partition_exch_qa_3 : Modified in 10.2.9 +parts.partition_exch_qa_6 : Modified in 10.2.9 #---------------------------------------------------------------- @@ -357,7 +339,7 @@ percona.* : MDEV-10997 - Not maintained #---------------------------------------------------------------- -perfschema.bad_option_2 : Modified in 10.2.7 +perfschema.bad_option_1 : MDEV-13892 - Timeout perfschema.bad_option_3 : MDEV-12728 - Timeout on Power perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash @@ -366,7 +348,6 @@ perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash perfschema.privilege_table_io : Modified in 10.2.8 perfschema.setup_actors : MDEV-10679 - Crash perfschema.stage_mdl_procedure : MDEV-11545 - Missing row -perfschema.start_server_1_digest : Added in 10.2.7 #---------------------------------------------------------------- @@ -382,24 +363,16 @@ rocksdb.* : MyRocks is alpha-quality and tests are uns #---------------------------------------------------------------- -roles.current_role_view-12666 : Added in 10.2.7 -roles.show_create_database-10463 : Added in 10.2.7 - -#---------------------------------------------------------------- - -rpl.circular_serverid0 : Added in 10.2.7 rpl.rpl_binlog_errors : MDEV-12742 - Crash rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master -rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file +rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result -rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master -rpl.rpl_gtid_errorhandling : MDEV-13261 - Crash +rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection +rpl.rpl_gtid_errorhandling : MDEV-13261 - Crash; modified in 10.2.9 rpl.rpl_gtid_stop_start : MDEV-11621 - Table marked as crashed, MDEV-12731 - Valgrind rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog -rpl.rpl_mdev-11092 : Added in 10.2.7 rpl.rpl_parallel : MDEV-12730 - Assertion failure rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure -rpl.rpl_parallel_optimistic : Modified in 10.2.7 rpl.rpl_parallel_optimistic_nobinlog : MDEV-12746 - Timeouts, mismatch rpl.rpl_parallel_retry : MDEV-11119 - Crash rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master @@ -410,8 +383,11 @@ rpl.rpl_skip_replication : MDEV-13258 - Extra warning rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock rpl.rpl_slow_query_log : MDEV-13250 - Test abort rpl.rpl_sp_effects : MDEV-13249 - Crash +rpl.rpl_sp_variables : Added in 10.2.9 rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master +rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash +rpl.rpl_temporal_format_mariadb53_to_mysql56_dst : Added in 10.2.9 rpl.rpl_upgrade_master_info : MDEV-11620 - Table marked as crashed rpl/extra/rpl_tests.* : MDEV-10994 - Not maintained @@ -420,6 +396,9 @@ rpl/extra/rpl_tests.* : MDEV-10994 - Not maintained spider.basic_sql : MDEV-11186 - Internal check fails +spider/bg.direct_aggregate : MDEV-7098 - Packets out of order +spider/bg.spider3_fixes : MDEV-12639 - Syntax error + spider/handler.* : MDEV-10990 - Not maintained #---------------------------------------------------------------- @@ -434,21 +413,14 @@ storage_engine.* : Not always timely maintained #---------------------------------------------------------------- sys_vars.back_log_basic : Modified in 10.2.8 -sys_vars.delay_key_write_func : Modified in 10.2.7 -sys_vars.innodb_sched_priority_cleaner_basic : Modified in 10.2.7 sys_vars.rpl_init_slave_func : MDEV-10149 - Test assertion -sys_vars.tmp_disk_table_size_basic : Added in 10.2.7 -sys_vars.tmp_disk_table_size_func : Added in 10.2.7 -sys_vars.tmp_memory_table_size_basic : Added in 10.2.7 #---------------------------------------------------------------- -tokudb.background_job_manager : Modified in 10.2.7 -tokudb.bug-1657908 : Added in 10.2.7 tokudb.change_column_all_1000_10 : MDEV-12640 - Lost connection tokudb.change_column_bin : MDEV-12640 - Lost connection tokudb.change_column_char : MDEV-12822 - Lost connection -tokudb.dir_cmd : Added in 10.2.7 +tokudb.dir_per_db : MDEV-11537 - Wrong result; modified in 10.2.9 tokudb.hotindex-insert-bigchar : MDEV-12640 - Crash tokudb.hotindex-update-1 : MDEV-12640 - Crash tokudb.kill_query_blocked_in_lt : Added in 10.2.8 @@ -459,19 +431,11 @@ tokudb.rows-32m-seq-insert : MDEV-12640 - Crash tokudb_mariadb.mdev12972 : Modified in 10.2.8 tokudb_mariadb.mdev6657 : MDEV-12737 - Mismatch or valgrind -tokudb_backup.* : MDEV-11001 - Missing include file; suite.pm modified in 10.2.7 +tokudb_backup.* : MDEV-11001 - Missing include file tokudb_sys_vars.* : MDEV-11001 - Missing include file tokudb_rpl.* : MDEV-11001 - Missing include file -tokudb_backup.backup_master_info : Added in 10.2.7 -tokudb_backup.backup_master_state : Added in 10.2.7 -tokudb_backup.empty_slave_info_file : Added in 10.2.7 -tokudb_backup.innodb_use_native_aio_enabled : Added in 10.2.7 tokudb_backup.rpl_safe_slave : Include file modified in 10.2.8 -tokudb_backup.rpl_tokudb_commit_sync : Added in 10.2.7 - -tokudb_bugs.db233 : Modified in 10.2.7 -tokudb_bugs.leak172 : Modified in 10.2.7 tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection @@ -511,12 +475,17 @@ unit.conc_ps_bugs : MDEV-13252 - not ok 44 test_bug4236 #---------------------------------------------------------------- -vcol.cross_db : Added in 10.2.7 -vcol.upgrade : Added in 10.2.7 +vcol.innodb_virtual_fk : Added in 10.2.9 +vcol.update : Modified in 10.2.9 +vcol.vcol_supported_sql_funcs : Include file modified in 10.2.9 #---------------------------------------------------------------- -wsrep.pool_of_threads : MDEV-12234 - GLIBCXX_3.4.20 not found; modified in 10.2.7 +wsrep.binlog_format : MDEV-11532 - Could not execute check-testcase +wsrep.foreign_key : Re-enabled in 10.2.9 +wsrep.mdev_6832 : Option file changed in 10.2.9 +wsrep.mdev_7798 : Option file changed in 10.2.9 +wsrep.pool_of_threads : MDEV-12234 - GLIBCXX_3.4.20 not found wsrep_info.plugin : MDEV-13569 - No nodes coming from prim view -- cgit v1.2.1 From 840f1310cb6ee15cffdac5a4d2a95551575b2c3b Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sat, 23 Sep 2017 15:48:47 +0400 Subject: Fixing a few -Wconversion warnings --- sql/field.h | 34 ++++++++++++++++++++++++---------- sql/item.h | 11 ++++++----- sql/item_func.h | 10 +++++++--- sql/item_strfunc.h | 4 ++-- sql/sql_error.h | 5 ++++- sql/sql_lex.h | 8 ++++++-- sql/sql_list.h | 6 ++++-- sql/sql_string.h | 28 ++++++++++++++++++++++------ sql/sql_time.h | 2 +- sql/sql_type.cc | 33 +++++++++++++++++---------------- sql/sql_type.h | 5 +++-- 11 files changed, 96 insertions(+), 50 deletions(-) diff --git a/sql/field.h b/sql/field.h index 7367e3139a2..f3f9c9a30ac 100644 --- a/sql/field.h +++ b/sql/field.h @@ -212,7 +212,8 @@ protected: CHARSET_INFO *cs, const char *str, size_t length, my_decimal *buf) { - m_error= str2my_decimal(mask, str, length, cs, + DBUG_ASSERT(length < UINT_MAX32); + m_error= str2my_decimal(mask, str, (uint) length, cs, buf, (const char **) &m_end_of_num); // E_DEC_TRUNCATED means a very minor truncation: '1e-100' -> 0 m_edom= m_error && m_error != E_DEC_TRUNCATED; @@ -661,7 +662,10 @@ public: static void *operator new(size_t size, MEM_ROOT *mem_root) throw () { return alloc_root(mem_root, size); } static void *operator new(size_t size) throw () - { return thd_alloc(current_thd, size); } + { + DBUG_ASSERT(size < UINT_MAX32); + return thd_alloc(current_thd, (uint) size); + } static void operator delete(void *ptr_arg, size_t size) { TRASH(ptr_arg, size); } static void operator delete(void *ptr, MEM_ROOT *mem_root) { DBUG_ASSERT(0); } @@ -815,11 +819,20 @@ public: int store(const char *to, uint length, CHARSET_INFO *cs, enum_check_fields check_level); int store(const LEX_STRING *ls, CHARSET_INFO *cs) - { return store(ls->str, ls->length, cs); } + { + DBUG_ASSERT(ls->length < UINT_MAX32); + return store(ls->str, (uint) ls->length, cs); + } int store(const LEX_CSTRING *ls, CHARSET_INFO *cs) - { return store(ls->str, ls->length, cs); } + { + DBUG_ASSERT(ls->length < UINT_MAX32); + return store(ls->str, (uint) ls->length, cs); + } int store(const LEX_CSTRING &ls, CHARSET_INFO *cs) - { return store(ls.str, ls.length, cs); } + { + DBUG_ASSERT(ls.length < UINT_MAX32); + return store(ls.str, (uint) ls.length, cs); + } virtual double val_real(void)=0; virtual longlong val_int(void)=0; virtual bool val_bool(void)= 0; @@ -2500,7 +2513,7 @@ public: class Field_timestampf :public Field_timestamp_with_dec { int do_save_field_metadata(uchar *metadata_ptr) { - *metadata_ptr= decimals(); + *metadata_ptr= (uchar) decimals(); return 1; } public: @@ -2768,7 +2781,7 @@ class Field_timef :public Field_time_with_dec { void store_TIME(MYSQL_TIME *ltime); int do_save_field_metadata(uchar *metadata_ptr) { - *metadata_ptr= decimals(); + *metadata_ptr= (uchar) decimals(); return 1; } public: @@ -2930,7 +2943,7 @@ class Field_datetimef :public Field_datetime_with_dec { bool get_TIME(MYSQL_TIME *ltime, const uchar *pos, ulonglong fuzzydate) const; int do_save_field_metadata(uchar *metadata_ptr) { - *metadata_ptr= decimals(); + *metadata_ptr= (uchar) decimals(); return 1; } public: @@ -3442,7 +3455,7 @@ public: enum storage_type { GEOM_STORAGE_WKB= 0, GEOM_STORAGE_BINARY= 1}; enum storage_type storage; - Field_geom(uchar *ptr_arg, uchar *null_ptr_arg, uint null_bit_arg, + Field_geom(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg, TABLE_SHARE *share, uint blob_pack_length, enum geometry_type geom_type_arg, uint field_srid) @@ -3848,7 +3861,8 @@ class Column_definition: public Sql_alloc, *pos ; pos++, len++) { size_t length= charset->cset->numchars(charset, *pos, *pos + *len); - *tot_length+= length; + DBUG_ASSERT(length < UINT_MAX32); + *tot_length+= (uint) length; set_if_bigger(*max_length, (uint32)length); } } diff --git a/sql/item.h b/sql/item.h index 5fb21858a7a..3f8ccb88392 100644 --- a/sql/item.h +++ b/sql/item.h @@ -3549,7 +3549,7 @@ public: { str_value.set_or_copy_aligned(str, length, cs); fix_from_value(dv, Metadata(&str_value)); - set_name(thd, name_par, safe_strlen(name_par), system_charset_info); + set_name(thd, name_par, (uint) safe_strlen(name_par), system_charset_info); } Item_string(THD *thd, const char *name_par, const char *str, uint length, CHARSET_INFO *cs, Derivation dv, uint repertoire): @@ -3557,7 +3557,7 @@ public: { str_value.set_or_copy_aligned(str, length, cs); fix_from_value(dv, Metadata(&str_value, repertoire)); - set_name(thd, name_par, safe_strlen(name_par), system_charset_info); + set_name(thd, name_par, (uint) safe_strlen(name_par), system_charset_info); } void print_value(String *to) const { @@ -3679,7 +3679,7 @@ public: Item_string(thd, str, length, system_charset_info) { } Item_string_sys(THD *thd, const char *str): - Item_string(thd, str, strlen(str), system_charset_info) + Item_string(thd, str, (uint) strlen(str), system_charset_info) { } }; @@ -3692,7 +3692,7 @@ public: DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII) { } Item_string_ascii(THD *thd, const char *str): - Item_string(thd, str, strlen(str), &my_charset_latin1, + Item_string(thd, str, (uint) strlen(str), &my_charset_latin1, DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII) { } }; @@ -3769,7 +3769,8 @@ class Item_blob :public Item_partition_func_safe_string { public: Item_blob(THD *thd, const char *name_arg, uint length): - Item_partition_func_safe_string(thd, name_arg, safe_strlen(name_arg), &my_charset_bin) + Item_partition_func_safe_string(thd, name_arg, (uint) safe_strlen(name_arg), + &my_charset_bin) { max_length= length; } enum Type type() const { return TYPE_HOLDER; } const Type_handler *type_handler() const diff --git a/sql/item_func.h b/sql/item_func.h index 9a6254438f0..1953441d93d 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -928,7 +928,8 @@ class Item_decimal_typecast :public Item_func { my_decimal decimal_value; public: - Item_decimal_typecast(THD *thd, Item *a, int len, int dec): Item_func(thd, a) + Item_decimal_typecast(THD *thd, Item *a, uint len, uint dec) + :Item_func(thd, a) { decimals= (uint8) dec; collation.set_numeric(); @@ -956,7 +957,7 @@ public: class Item_double_typecast :public Item_real_func { public: - Item_double_typecast(THD *thd, Item *a, int len, int dec): + Item_double_typecast(THD *thd, Item *a, uint len, uint dec): Item_real_func(thd, a) { decimals= (uint8) dec; @@ -2398,7 +2399,10 @@ class Item_user_var_as_out_param :public Item public: Item_user_var_as_out_param(THD *thd, const LEX_CSTRING *a) :Item(thd), name(*a) - { set_name(thd, a->str, a->length, system_charset_info); } + { + DBUG_ASSERT(a->length < UINT_MAX32); + set_name(thd, a->str, (uint) a->length, system_charset_info); + } /* We should return something different from FIELD_ITEM here */ enum Type type() const { return STRING_ITEM;} double val_real(); diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 685a64816be..a7cad234893 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -825,7 +825,7 @@ public: bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec() { - max_length= (username_char_length + + max_length= (uint32) (username_char_length + HOSTNAME_LENGTH + 1) * SYSTEM_CHARSET_MBMAXLEN; } const char *func_name() const { return "user"; } @@ -867,7 +867,7 @@ public: Item_func_sysconst(thd), context(context_arg) {} bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec() - { max_length= username_char_length * SYSTEM_CHARSET_MBMAXLEN; } + { max_length= (uint32) username_char_length * SYSTEM_CHARSET_MBMAXLEN; } int save_in_field(Field *field, bool no_conversions) { return save_str_value_in_field(field, &str_value); } const char *func_name() const { return "current_role"; } diff --git a/sql/sql_error.h b/sql/sql_error.h index f020b9cc789..263c5843a4a 100644 --- a/sql/sql_error.h +++ b/sql/sql_error.h @@ -837,7 +837,10 @@ public: ErrConvString(const String *s) : ErrConv(), str(s->ptr()), len(s->length()), cs(s->charset()) {} const char *ptr() const - { return err_conv(err_buffer, sizeof(err_buffer), str, len, cs); } + { + DBUG_ASSERT(len < UINT_MAX32); + return err_conv(err_buffer, (uint) sizeof(err_buffer), str, (uint) len, cs); + } }; class ErrConvInteger : public ErrConv diff --git a/sql/sql_lex.h b/sql/sql_lex.h index e7bb084d134..38ce41e43dd 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -3443,9 +3443,13 @@ public: Item_param *add_placeholder(THD *thd, const LEX_CSTRING *name, uint pos_in_query, uint len_in_query); Item_param *add_placeholder(THD *thd, const LEX_CSTRING *name, - const char *pos, const char *end) + const char *start, const char *end) { - return add_placeholder(thd, name, pos - substatement_query(thd), end - pos); + size_t pos= start - substatement_query(thd); + size_t len= end - start; + DBUG_ASSERT(pos < UINT_MAX32); + DBUG_ASSERT(len < UINT_MAX32); + return add_placeholder(thd, name, (uint) pos, (uint) len); } /* Integer range FOR LOOP methods */ diff --git a/sql/sql_list.h b/sql/sql_list.h index e1307f1daa0..111826495f7 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -32,11 +32,13 @@ class Sql_alloc public: static void *operator new(size_t size) throw () { - return thd_alloc(thd_get_current_thd(), size); + DBUG_ASSERT(size < UINT_MAX32); + return thd_alloc(thd_get_current_thd(), (uint) size); } static void *operator new[](size_t size) throw () { - return thd_alloc(thd_get_current_thd(), size); + DBUG_ASSERT(size < UINT_MAX32); + return thd_alloc(thd_get_current_thd(), (uint) size); } static void *operator new[](size_t size, MEM_ROOT *mem_root) throw () { return alloc_root(mem_root, size); } diff --git a/sql/sql_string.h b/sql/sql_string.h index adaef04fee4..9111d0b5792 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -469,9 +469,21 @@ public: } bool append(const String &s); bool append(const char *s); - bool append(const LEX_STRING *ls) { return append(ls->str, ls->length); } - bool append(const LEX_CSTRING *ls) { return append(ls->str, ls->length); } - bool append(const LEX_CSTRING &ls) { return append(ls.str, ls.length); } + bool append(const LEX_STRING *ls) + { + DBUG_ASSERT(ls->length < UINT_MAX32); + return append(ls->str, (uint32) ls->length); + } + bool append(const LEX_CSTRING *ls) + { + DBUG_ASSERT(ls->length < UINT_MAX32); + return append(ls->str, (uint32) ls->length); + } + bool append(const LEX_CSTRING &ls) + { + DBUG_ASSERT(ls.length < UINT_MAX32); + return append(ls.str, (uint32) ls.length); + } bool append(const char *s, uint32 arg_length); bool append(const char *s, uint32 arg_length, CHARSET_INFO *cs); bool append_ulonglong(ulonglong val); @@ -563,7 +575,8 @@ public: } void q_append(const LEX_CSTRING *ls) { - q_append(ls->str, ls->length); + DBUG_ASSERT(ls->length < UINT_MAX32); + q_append(ls->str, (uint32) ls->length); } void write_at_position(int position, uint32 value) @@ -643,7 +656,9 @@ public: } bool append_for_single_quote(const char *st) { - return append_for_single_quote(st, strlen(st)); + size_t len= strlen(st); + DBUG_ASSERT(len < UINT_MAX32); + return append_for_single_quote(st, (uint32) len); } /* Swap two string objects. Efficient way to exchange data without memcpy. */ @@ -687,10 +702,11 @@ public: } void q_net_store_data(const uchar *from, size_t length) { + DBUG_ASSERT(length < UINT_MAX32); DBUG_ASSERT(Alloced_length >= (str_length + length + net_length_size(length))); q_net_store_length(length); - q_append((const char *)from, length); + q_append((const char *)from, (uint32) length); } }; diff --git a/sql/sql_time.h b/sql/sql_time.h index 03e38c158f6..43c19f7c451 100644 --- a/sql/sql_time.h +++ b/sql/sql_time.h @@ -106,7 +106,7 @@ inline void datetime_to_date(MYSQL_TIME *ltime) DBUG_ASSERT(ltime->time_type == MYSQL_TIMESTAMP_DATE || ltime->time_type == MYSQL_TIMESTAMP_DATETIME); DBUG_ASSERT(ltime->neg == 0); - ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0; + ltime->second_part= ltime->hour= ltime->minute= ltime->second= 0; ltime->time_type= MYSQL_TIMESTAMP_DATE; } inline void date_to_datetime(MYSQL_TIME *ltime) diff --git a/sql/sql_type.cc b/sql/sql_type.cc index 906bc5d0acf..d9b3d53465e 100644 --- a/sql/sql_type.cc +++ b/sql/sql_type.cc @@ -157,7 +157,7 @@ void Type_std_attributes::count_decimal_length(Item **item, uint nitems) } int precision= MY_MIN(max_int_part + decimals, DECIMAL_MAX_PRECISION); fix_char_length(my_decimal_precision_to_length_no_truncation(precision, - decimals, + (uint8) decimals, unsigned_flag)); } @@ -990,7 +990,8 @@ Type_handler::make_num_distinct_aggregator_field(MEM_ROOT *mem_root, Field_double(NULL, item->max_length, (uchar *) (item->maybe_null ? "" : 0), item->maybe_null ? 1 : 0, Field::NONE, - &item->name, item->decimals, 0, item->unsigned_flag); + &item->name, (uint8) item->decimals, + 0, item->unsigned_flag); } @@ -1003,7 +1004,8 @@ Type_handler_float::make_num_distinct_aggregator_field(MEM_ROOT *mem_root, Field_float(NULL, item->max_length, (uchar *) (item->maybe_null ? "" : 0), item->maybe_null ? 1 : 0, Field::NONE, - &item->name, item->decimals, 0, item->unsigned_flag); + &item->name, (uint8) item->decimals, + 0, item->unsigned_flag); } @@ -1018,7 +1020,8 @@ Type_handler_decimal_result::make_num_distinct_aggregator_field( Field_new_decimal(NULL, item->max_length, (uchar *) (item->maybe_null ? "" : 0), item->maybe_null ? 1 : 0, Field::NONE, - &item->name, item->decimals, 0, item->unsigned_flag); + &item->name, (uint8) item->decimals, + 0, item->unsigned_flag); } @@ -1135,7 +1138,7 @@ Field *Type_handler_newdecimal::make_conversion_table_field(TABLE *table, const { int precision= metadata >> 8; - uint decimals= metadata & 0x00ff; + uint8 decimals= metadata & 0x00ff; uint32 max_length= my_decimal_precision_to_length(precision, decimals, false); DBUG_ASSERT(decimals <= DECIMAL_MAX_SCALE); return new (table->in_use->mem_root) @@ -2021,7 +2024,7 @@ Field *Type_handler_float::make_table_field(const LEX_CSTRING *name, Field_float(addr.ptr, attr.max_char_length(), addr.null_ptr, addr.null_bit, Field::NONE, name, - attr.decimals, 0/*zerofill*/, attr.unsigned_flag); + (uint8) attr.decimals, 0/*zerofill*/, attr.unsigned_flag); } @@ -2034,7 +2037,7 @@ Field *Type_handler_double::make_table_field(const LEX_CSTRING *name, Field_double(addr.ptr, attr.max_char_length(), addr.null_ptr, addr.null_bit, Field::NONE, name, - attr.decimals, 0/*zerofill*/, attr.unsigned_flag); + (uint8) attr.decimals, 0/*zerofill*/, attr.unsigned_flag); } @@ -2054,7 +2057,7 @@ Type_handler_olddecimal::make_table_field(const LEX_CSTRING *name, DBUG_ASSERT(0); return new (table->in_use->mem_root) Field_decimal(addr.ptr, attr.max_length, addr.null_ptr, addr.null_bit, - Field::NONE, name, attr.decimals, + Field::NONE, name, (uint8) attr.decimals, 0/*zerofill*/,attr.unsigned_flag); } @@ -2065,8 +2068,8 @@ Type_handler_newdecimal::make_table_field(const LEX_CSTRING *name, const Type_all_attributes &attr, TABLE *table) const { - uint8 dec= attr.decimals; - uint8 intg= attr.decimal_precision() - dec; + uint8 dec= (uint8) attr.decimals; + uint8 intg= (uint8) (attr.decimal_precision() - dec); uint32 len= attr.max_char_length(); /* @@ -5276,7 +5279,7 @@ static void wrong_precision_error(uint errcode, Item *a, */ bool get_length_and_scale(ulonglong length, ulonglong decimals, - ulong *out_length, uint *out_decimals, + uint *out_length, uint *out_decimals, uint max_precision, uint max_scale, Item *a) { @@ -5293,7 +5296,7 @@ bool get_length_and_scale(ulonglong length, ulonglong decimals, *out_decimals= (uint) decimals; my_decimal_trim(&length, out_decimals); - *out_length= (ulong) length; + *out_length= (uint) length; if (*out_length < *out_decimals) { @@ -5359,8 +5362,7 @@ Item *Type_handler_decimal_result:: create_typecast_item(THD *thd, Item *item, const Type_cast_attributes &attr) const { - ulong len; - uint dec; + uint len, dec; if (get_length_and_scale(attr.length(), attr.decimals(), &len, &dec, DECIMAL_MAX_PRECISION, DECIMAL_MAX_SCALE, item)) return NULL; @@ -5372,8 +5374,7 @@ Item *Type_handler_double:: create_typecast_item(THD *thd, Item *item, const Type_cast_attributes &attr) const { - ulong len; - uint dec; + uint len, dec; if (!attr.length_specified()) return new (thd->mem_root) Item_double_typecast(thd, item, DBL_DIG + 7, diff --git a/sql/sql_type.h b/sql/sql_type.h index e6a1d8f31ff..528ba005850 100644 --- a/sql/sql_type.h +++ b/sql/sql_type.h @@ -227,7 +227,7 @@ static inline uint32 char_to_byte_length_safe(size_t char_length_arg, uint32 mbmaxlen_arg) { ulonglong tmp= ((ulonglong) char_length_arg) * mbmaxlen_arg; - return tmp > UINT_MAX32 ? UINT_MAX32 : static_cast(tmp); + return tmp > UINT_MAX32 ? (uint32) UINT_MAX32 : static_cast(tmp); } /** @@ -531,11 +531,12 @@ class Name: private LEX_CSTRING public: Name(const char *str_arg, uint length_arg) { + DBUG_ASSERT(length_arg < UINT_MAX32); LEX_CSTRING::str= str_arg; LEX_CSTRING::length= length_arg; } const char *ptr() const { return LEX_CSTRING::str; } - uint length() const { return LEX_CSTRING::length; } + uint length() const { return (uint) LEX_CSTRING::length; } }; -- cgit v1.2.1 From d1d3aff985a942e53e3fc11bbd34751bfec3eddd Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 22 Sep 2017 20:24:32 +0200 Subject: ignore generated file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c4109b63dc2..255759e76dd 100644 --- a/.gitignore +++ b/.gitignore @@ -69,6 +69,7 @@ include/sql_state.h include/probes_mysql.d include/probes_mysql_dtrace.h include/probes_mysql_nodtrace.h +include/source_revision.h info_macros.cmake libmysql*/libmysql*_exports_file.cc libmysql*/merge_archives_mysql*.cmake -- cgit v1.2.1 From b75ca7e08683c5e6fff6f7fa56e08beb0be6bf8f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 23 Sep 2017 11:40:12 +0200 Subject: cleanup: remove a duplicate check for GIT_EXECUTABLE --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a0b498b27e3..e3a53d76eac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,12 +115,14 @@ FOREACH(_base ENDIF() ENDFOREACH() -FOREACH(tool gtar tar git) +FOREACH(tool gtar tar) STRING(TOUPPER ${tool} TOOL) FIND_PROGRAM(${TOOL}_EXECUTABLE ${tool} DOC "path to the executable") MARK_AS_ADVANCED(${TOOL}_EXECUTABLE) ENDFOREACH() +FIND_PACKAGE(Git) + # Following autotools tradition, add preprocessor definitions # specified in environment variable CPPFLAGS IF(DEFINED ENV{CPPFLAGS}) @@ -433,7 +435,6 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in ${CMAKE_BINARY_DIR}/sql/sql_builtin.cc) -FIND_PACKAGE(Git) IF(GIT_EXECUTABLE) EXECUTE_PROCESS( COMMAND ${GIT_EXECUTABLE} rev-parse HEAD -- cgit v1.2.1 From 88adfd0cea34b93b50d6cc1128df45bae2124bc2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 22 Sep 2017 20:12:15 +0200 Subject: compiler warning --- plugin/cracklib_password_check/cracklib_password_check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c index 94587a6d659..fedd7bf08f6 100644 --- a/plugin/cracklib_password_check/cracklib_password_check.c +++ b/plugin/cracklib_password_check/cracklib_password_check.c @@ -23,7 +23,7 @@ static char *dictionary; -static int crackme(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password) +static int crackme(MYSQL_CONST_LEX_STRING *username, MYSQL_CONST_LEX_STRING *password) { char *user= alloca(username->length + 1); char *host; -- cgit v1.2.1 From 80b9ce359312c1520623531bf173ee048317fee3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 22 Sep 2017 20:22:55 +0200 Subject: MDEV-11553 Can't restore a PERSISTENT column that uses DATE_FORMAT() 3-argument form of DATE_FORMAT --- mysql-test/r/locale.result | 71 +++++++++++++++++++++- .../suite/vcol/r/vcol_blocked_sql_funcs.result | 2 + .../suite/vcol/r/vcol_supported_sql_funcs.result | 15 +++++ .../suite/vcol/t/vcol_blocked_sql_funcs_main.inc | 3 + .../suite/vcol/t/vcol_supported_sql_funcs_main.inc | 6 ++ mysql-test/t/locale.test | 28 +++++++++ sql/item.cc | 19 ++++++ sql/item.h | 4 ++ sql/item_create.cc | 27 +------- sql/item_strfunc.cc | 24 +------- sql/item_strfunc.h | 5 +- sql/item_timefunc.cc | 25 ++++++-- sql/item_timefunc.h | 27 +++++--- sql/lex.h | 1 + sql/sql_yacc.yy | 16 ++++- sql/sql_yacc_ora.yy | 16 ++++- 16 files changed, 222 insertions(+), 67 deletions(-) diff --git a/mysql-test/r/locale.result b/mysql-test/r/locale.result index a02e80ed21e..b750d038205 100644 --- a/mysql-test/r/locale.result +++ b/mysql-test/r/locale.result @@ -229,15 +229,80 @@ SET lc_time_names=@old_50915_lc_time_names; # End of 10.1 tests # create view v1 as select +date_format('2001-10-02', '%c %b %M') as a, +date_format('2001-10-02', '%c %b %M', 'ru_RU') as a1, format(123456789,2) as b, format(123456789,2,'rm_CH') as b1; select * from v1; -b b1 -123,456,789.00 123'456'789,00 +a a1 b b1 +10 Oct October 10 Окт Октября 123,456,789.00 123'456'789,00 show create view v1; View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select format(123456789,2) AS `b`,format(123456789,2,'rm_CH') AS `b1` utf8 utf8_general_ci +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select date_format('2001-10-02','%c %b %M') AS `a`,date_format('2001-10-02','%c %b %M','ru_RU') AS `a1`,format(123456789,2) AS `b`,format(123456789,2,'rm_CH') AS `b1` utf8 utf8_general_ci drop view v1; # # End of 10.2 tests # +select date_format('2001-01-01', '%w %a %W', 'ro_RO'); +date_format('2001-01-01', '%w %a %W', 'ro_RO') +1 Lu Luni +select date_format('2001-01-03', '%w %a %W', 'ro_RO'); +date_format('2001-01-03', '%w %a %W', 'ro_RO') +3 Mi Miercuri +select date_format('2001-01-05', '%w %a %W', 'ro_RO'); +date_format('2001-01-05', '%w %a %W', 'ro_RO') +5 Vi Vineri +select date_format('2001-01-07', '%w %a %W', 'ro_RO'); +date_format('2001-01-07', '%w %a %W', 'ro_RO') +0 Du Duminică +select date_format('2001-01-01', '%w %a %W', 'de_AT'); +date_format('2001-01-01', '%w %a %W', 'de_AT') +1 Mon Montag +select date_format('2001-02-01', '%w %a %W', 'de_AT'); +date_format('2001-02-01', '%w %a %W', 'de_AT') +4 Don Donnerstag +select date_format('2001-03-01', '%w %a %W', 'de_AT'); +date_format('2001-03-01', '%w %a %W', 'de_AT') +4 Don Donnerstag +select date_format('2001-01-01', '%w %a %W', 'en_US'); +date_format('2001-01-01', '%w %a %W', 'en_US') +1 Mon Monday +select date_format('2001-03-01', '%c %b %M', 'en_US'); +date_format('2001-03-01', '%c %b %M', 'en_US') +3 Mar March +select date_format('2001-01-01', '%w %a %W', 'rm_CH'); +date_format('2001-01-01', '%w %a %W', 'rm_CH') +1 gli glindesdi +select date_format('2001-01-03', '%w %a %W', 'rm_CH'); +date_format('2001-01-03', '%w %a %W', 'rm_CH') +3 me mesemna +select date_format('2001-01-05', '%w %a %W', 'rm_CH'); +date_format('2001-01-05', '%w %a %W', 'rm_CH') +5 ve venderdi +select date_format('2001-01-07', '%w %a %W', 'rm_CH'); +date_format('2001-01-07', '%w %a %W', 'rm_CH') +0 du dumengia +select date_format('2001-02-01', '%c %b %M', 'rm_CH'); +date_format('2001-02-01', '%c %b %M', 'rm_CH') +2 favr favrer +select date_format('2001-04-01', '%c %b %M', 'rm_CH'); +date_format('2001-04-01', '%c %b %M', 'rm_CH') +4 avr avrigl +select date_format('2001-06-01', '%c %b %M', 'rm_CH'); +date_format('2001-06-01', '%c %b %M', 'rm_CH') +6 zercl zercladur +select date_format('2001-08-01', '%c %b %M', 'rm_CH'); +date_format('2001-08-01', '%c %b %M', 'rm_CH') +8 avust avust +select date_format('2001-10-01', '%c %b %M', 'rm_CH'); +date_format('2001-10-01', '%c %b %M', 'rm_CH') +10 oct october +select date_format('2001-12-01', '%c %b %M', 'rm_CH'); +date_format('2001-12-01', '%c %b %M', 'rm_CH') +12 dec december +select date_format('2001-01-06', '%w %a %W', 'de_CH'); +date_format('2001-01-06', '%w %a %W', 'de_CH') +6 Sa Samstag +select date_format('2001-09-01', '%c %b %M', 'de_CH'); +date_format('2001-09-01', '%c %b %M', 'de_CH') +9 Sep September diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result index 6605f7c99b4..2d5bcfe553d 100644 --- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result +++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result @@ -247,3 +247,5 @@ ERROR HY000: Expression in the GENERATED ALWAYS AS clause is too big # Constant expression create or replace table t1 (a int as (PI()) PERSISTENT); drop table if exists t1; +create table t1 (a timestamp, b varchar(255) as (date_format(a, '%w %a %m %b')) stored); +ERROR HY000: Function or expression 'date_format()' cannot be used in the GENERATED ALWAYS AS clause of `b` diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result index 3fa4f6e1431..10ab32f9486 100644 --- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result +++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result @@ -2894,6 +2894,21 @@ a b 2012-12-12 Wednesday Wed December Dec drop table t1; set sql_warnings = 0; +# DATE_FORMAT() STORED +set sql_warnings = 1; +create table t1 (a date, b varchar(100) as (date_format(a, '%W %a %M %b', 'de_DE')) STORED); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` date DEFAULT NULL, + `b` varchar(100) GENERATED ALWAYS AS (date_format(`a`,'%W %a %M %b','de_DE')) STORED +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +insert into t1 values ('2012-12-12',default); +select * from t1; +a b +2012-12-12 Mittwoch Mi Dezember Dez +drop table t1; +set sql_warnings = 0; # CURRENT_USER() set sql_warnings = 1; create table t1 (a char, b varchar(32) as (current_user())); diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc index 766d0c7410c..37de02a2b29 100644 --- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc +++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc @@ -354,3 +354,6 @@ eval create or replace table t1 (a int, b varchar(16384) as (concat(a,'$tmp_long create or replace table t1 (a int as (PI()) PERSISTENT); drop table if exists t1; + +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +create table t1 (a timestamp, b varchar(255) as (date_format(a, '%w %a %m %b')) stored); diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc index dafc42098dd..fa2162e5981 100644 --- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc +++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc @@ -1197,6 +1197,12 @@ let $values1 = '2012-12-12',default; let $rows = 1; --source suite/vcol/inc/vcol_supported_sql_funcs.inc +--echo # DATE_FORMAT() STORED +let $cols = a date, b varchar(100) as (date_format(a, '%W %a %M %b', 'de_DE')) STORED; +let $values1 = '2012-12-12',default; +let $rows = 1; +--source suite/vcol/inc/vcol_supported_sql_funcs.inc + --echo # CURRENT_USER() let $cols = a char, b varchar(32) as (current_user()); let $values1 = 'a', default; diff --git a/mysql-test/t/locale.test b/mysql-test/t/locale.test index 4570b968ecf..a9a507bc387 100644 --- a/mysql-test/t/locale.test +++ b/mysql-test/t/locale.test @@ -144,6 +144,8 @@ SET lc_time_names=@old_50915_lc_time_names; # Item::print create view v1 as select + date_format('2001-10-02', '%c %b %M') as a, + date_format('2001-10-02', '%c %b %M', 'ru_RU') as a1, format(123456789,2) as b, format(123456789,2,'rm_CH') as b1; select * from v1; @@ -153,3 +155,29 @@ drop view v1; --echo # --echo # End of 10.2 tests --echo # + +# +# MDEV-11553 Can't restore a PERSISTENT column that uses DATE_FORMAT() +# +# 3-argument syntax for DATE_FORMAT() +select date_format('2001-01-01', '%w %a %W', 'ro_RO'); +select date_format('2001-01-03', '%w %a %W', 'ro_RO'); +select date_format('2001-01-05', '%w %a %W', 'ro_RO'); +select date_format('2001-01-07', '%w %a %W', 'ro_RO'); +select date_format('2001-01-01', '%w %a %W', 'de_AT'); +select date_format('2001-02-01', '%w %a %W', 'de_AT'); +select date_format('2001-03-01', '%w %a %W', 'de_AT'); +select date_format('2001-01-01', '%w %a %W', 'en_US'); +select date_format('2001-03-01', '%c %b %M', 'en_US'); +select date_format('2001-01-01', '%w %a %W', 'rm_CH'); +select date_format('2001-01-03', '%w %a %W', 'rm_CH'); +select date_format('2001-01-05', '%w %a %W', 'rm_CH'); +select date_format('2001-01-07', '%w %a %W', 'rm_CH'); +select date_format('2001-02-01', '%c %b %M', 'rm_CH'); +select date_format('2001-04-01', '%c %b %M', 'rm_CH'); +select date_format('2001-06-01', '%c %b %M', 'rm_CH'); +select date_format('2001-08-01', '%c %b %M', 'rm_CH'); +select date_format('2001-10-01', '%c %b %M', 'rm_CH'); +select date_format('2001-12-01', '%c %b %M', 'rm_CH'); +select date_format('2001-01-06', '%w %a %W', 'de_CH'); +select date_format('2001-09-01', '%c %b %M', 'de_CH'); diff --git a/sql/item.cc b/sql/item.cc index 4a3847f800e..9dcc81bbae7 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1451,6 +1451,25 @@ bool Item::get_seconds(ulonglong *sec, ulong *sec_part) return my_decimal2seconds(dec, sec, sec_part); } +const MY_LOCALE *Item::locale_from_val_str() +{ + StringBuffer tmp; + String *locale_name= val_str_ascii(&tmp); + const MY_LOCALE *lc; + if (!locale_name || + !(lc= my_locale_by_name(locale_name->c_ptr_safe()))) + { + THD *thd= current_thd; + push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, + ER_UNKNOWN_LOCALE, + ER_THD(thd, ER_UNKNOWN_LOCALE), + locale_name ? locale_name->c_ptr_safe() : "NULL"); + lc= &my_locale_en_US; + } + return lc; +} + + CHARSET_INFO *Item::default_charset() { return current_thd->variables.collation_connection; diff --git a/sql/item.h b/sql/item.h index 3f8ccb88392..04dad5265d3 100644 --- a/sql/item.h +++ b/sql/item.h @@ -491,6 +491,8 @@ struct find_selective_predicates_list_processor_data List list; }; +class MY_LOCALE; + class Item_equal; class COND_EQUAL; @@ -644,6 +646,8 @@ public: */ String *val_str() { return val_str(&str_value); } + const MY_LOCALE *locale_from_val_str(); + LEX_CSTRING name; /* Name of item */ /* Original item name (if it was renamed)*/ const char *orig_name; diff --git a/sql/item_create.cc b/sql/item_create.cc index b0b33041383..5f1485a1336 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -783,19 +783,6 @@ protected: #endif -class Create_func_date_format : public Create_func_arg2 -{ -public: - virtual Item *create_2_arg(THD *thd, Item *arg1, Item *arg2); - - static Create_func_date_format s_singleton; - -protected: - Create_func_date_format() {} - virtual ~Create_func_date_format() {} -}; - - class Create_func_datediff : public Create_func_arg2 { public: @@ -4051,15 +4038,6 @@ Create_func_crosses::create_2_arg(THD *thd, Item *arg1, Item *arg2) #endif -Create_func_date_format Create_func_date_format::s_singleton; - -Item* -Create_func_date_format::create_2_arg(THD *thd, Item *arg1, Item *arg2) -{ - return new (thd->mem_root) Item_func_date_format(thd, arg1, arg2, 0); -} - - Create_func_datediff Create_func_datediff::s_singleton; Item* @@ -4558,7 +4536,7 @@ Create_func_from_unixtime::create_native(THD *thd, LEX_CSTRING *name, Item *param_1= item_list->pop(); Item *param_2= item_list->pop(); Item *ut= new (thd->mem_root) Item_func_from_unixtime(thd, param_1); - func= new (thd->mem_root) Item_func_date_format(thd, ut, param_2, 0); + func= new (thd->mem_root) Item_func_date_format(thd, ut, param_2); break; } default: @@ -6511,7 +6489,7 @@ Create_func_time_format Create_func_time_format::s_singleton; Item* Create_func_time_format::create_2_arg(THD *thd, Item *arg1, Item *arg2) { - return new (thd->mem_root) Item_func_date_format(thd, arg1, arg2, 1); + return new (thd->mem_root) Item_func_time_format(thd, arg1, arg2); } @@ -6872,7 +6850,6 @@ static Native_func_registry func_array[] = { { C_STRING_WITH_LEN("CRC32") }, BUILDER(Create_func_crc32)}, { { C_STRING_WITH_LEN("CROSSES") }, GEOM_BUILDER(Create_func_crosses)}, { { C_STRING_WITH_LEN("DATEDIFF") }, BUILDER(Create_func_datediff)}, - { { C_STRING_WITH_LEN("DATE_FORMAT") }, BUILDER(Create_func_date_format)}, { { C_STRING_WITH_LEN("DAYNAME") }, BUILDER(Create_func_dayname)}, { { C_STRING_WITH_LEN("DAYOFMONTH") }, BUILDER(Create_func_dayofmonth)}, { { C_STRING_WITH_LEN("DAYOFWEEK") }, BUILDER(Create_func_dayofweek)}, diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 83432f95612..d29e579bcd9 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2668,24 +2668,6 @@ String *Item_func_soundex::val_str(String *str) const int FORMAT_MAX_DECIMALS= 30; -MY_LOCALE *Item_func_format::get_locale(Item *item) -{ - DBUG_ASSERT(arg_count == 3); - String tmp, *locale_name= args[2]->val_str_ascii(&tmp); - MY_LOCALE *lc; - if (!locale_name || - !(lc= my_locale_by_name(locale_name->c_ptr_safe()))) - { - THD *thd= current_thd; - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_UNKNOWN_LOCALE, - ER_THD(thd, ER_UNKNOWN_LOCALE), - locale_name ? locale_name->c_ptr_safe() : "NULL"); - lc= &my_locale_en_US; - } - return lc; -} - void Item_func_format::fix_length_and_dec() { uint32 char_length= args[0]->max_char_length(); @@ -2693,7 +2675,7 @@ void Item_func_format::fix_length_and_dec() collation.set(default_charset()); fix_char_length(char_length + max_sep_count + decimals); if (arg_count == 3) - locale= args[2]->basic_const_item() ? get_locale(args[2]) : NULL; + locale= args[2]->basic_const_item() ? args[2]->locale_from_val_str() : NULL; else locale= &my_locale_en_US; /* Two arguments */ } @@ -2712,7 +2694,7 @@ String *Item_func_format::val_str_ascii(String *str) int dec; /* Number of characters used to represent the decimals, including '.' */ uint32 dec_length; - MY_LOCALE *lc; + const MY_LOCALE *lc; DBUG_ASSERT(fixed == 1); dec= (int) args[1]->val_int(); @@ -2722,7 +2704,7 @@ String *Item_func_format::val_str_ascii(String *str) return NULL; } - lc= locale ? locale : get_locale(args[2]); + lc= locale ? locale : args[2]->locale_from_val_str(); dec= set_zone(dec, 0, FORMAT_MAX_DECIMALS); dec_length= dec ? dec+1 : 0; diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index a7cad234893..d73bd0b76d7 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -27,8 +27,6 @@ extern size_t username_char_length; -class MY_LOCALE; - class Item_str_func :public Item_func { protected: @@ -932,14 +930,13 @@ public: class Item_func_format :public Item_str_ascii_func { - MY_LOCALE *locale; + const MY_LOCALE *locale; public: Item_func_format(THD *thd, Item *org, Item *dec): Item_str_ascii_func(thd, org, dec) {} Item_func_format(THD *thd, Item *org, Item *dec, Item *lang): Item_str_ascii_func(thd, org, dec, lang) {} - MY_LOCALE *get_locale(Item *item); String *val_str_ascii(String *); void fix_length_and_dec(); const char *func_name() const { return "format"; } diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 86bde00cced..189addc767b 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -455,7 +455,8 @@ err: */ static bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time, - timestamp_type type, MY_LOCALE *locale, String *str) + timestamp_type type, const MY_LOCALE *locale, + String *str) { char intbuff[15]; uint hours_i; @@ -1833,7 +1834,14 @@ overflow: void Item_func_date_format::fix_length_and_dec() { THD* thd= current_thd; - locale= thd->variables.lc_time_names; + if (!is_time_format) + { + if (arg_count < 3) + locale= thd->variables.lc_time_names; + else + if (args[2]->basic_const_item()) + locale= args[2]->locale_from_val_str(); + } /* Must use this_item() in case it's a local SP variable @@ -1875,6 +1883,8 @@ bool Item_func_date_format::eq(const Item *item, bool binary_cmp) const if (this == item) return 1; item_func= (Item_func_date_format*) item; + if (arg_count != item_func->arg_count) + return 0; if (!args[0]->eq(item_func->args[0], binary_cmp)) return 0; /* @@ -1884,6 +1894,8 @@ bool Item_func_date_format::eq(const Item *item, bool binary_cmp) const */ if (!args[1]->eq(item_func->args[1], 1)) return 0; + if (arg_count > 2 && !args[2]->eq(item_func->args[2], 1)) + return 0; return 1; } @@ -1967,15 +1979,18 @@ String *Item_func_date_format::val_str(String *str) String *format; MYSQL_TIME l_time; uint size; - int is_time_flag = is_time_format ? TIME_TIME_ONLY : 0; + const MY_LOCALE *lc= 0; DBUG_ASSERT(fixed == 1); - if (get_arg0_date(&l_time, is_time_flag)) + if (get_arg0_date(&l_time, is_time_format ? TIME_TIME_ONLY : 0)) return 0; if (!(format = args[1]->val_str(str)) || !format->length()) goto null_date; + if (!is_time_format && !(lc= locale) && !(lc= args[2]->locale_from_val_str())) + goto null_date; // invalid locale + if (fixed_length) size=max_length; else @@ -1998,7 +2013,7 @@ String *Item_func_date_format::val_str(String *str) if (!make_date_time(&date_time_format, &l_time, is_time_format ? MYSQL_TIMESTAMP_TIME : MYSQL_TIMESTAMP_DATE, - locale, str)) + lc, str)) return str; null_date: diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 7d2fe46b644..20ecb4774b3 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -797,22 +797,24 @@ public: class Item_func_date_format :public Item_str_func { - MY_LOCALE *locale; + const MY_LOCALE *locale; int fixed_length; - const bool is_time_format; String value; +protected: + bool is_time_format; public: - Item_func_date_format(THD *thd, Item *a, Item *b, bool is_time_format_arg): - Item_str_func(thd, a, b), is_time_format(is_time_format_arg) {} + Item_func_date_format(THD *thd, Item *a, Item *b): + Item_str_func(thd, a, b), locale(0), is_time_format(false) {} + Item_func_date_format(THD *thd, Item *a, Item *b, Item *c): + Item_str_func(thd, a, b, c), locale(0), is_time_format(false) {} String *val_str(String *str); - const char *func_name() const - { return is_time_format ? "time_format" : "date_format"; } + const char *func_name() const { return "date_format"; } void fix_length_and_dec(); uint format_length(const String *format); bool eq(const Item *item, bool binary_cmp) const; bool check_vcol_func_processor(void *arg) { - if (is_time_format) + if (arg_count > 2) return false; return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } @@ -820,6 +822,17 @@ public: { return get_item_copy(thd, mem_root, this); } }; +class Item_func_time_format: public Item_func_date_format +{ +public: + Item_func_time_format(THD *thd, Item *a, Item *b): + Item_func_date_format(thd, a, b) { is_time_format= true; } + const char *func_name() const { return "time_format"; } + bool check_vcol_func_processor(void *arg) { return false; } + Item *get_copy(THD *thd, MEM_ROOT *mem_root) + { return get_item_copy(thd, mem_root, this); } +}; + class Item_func_from_unixtime :public Item_datetimefunc { diff --git a/sql/lex.h b/sql/lex.h index f2dac95fce5..67c3bc8620d 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -726,6 +726,7 @@ static SYMBOL sql_functions[] = { { "CURTIME", SYM(CURTIME)}, { "DATE_ADD", SYM(DATE_ADD_INTERVAL)}, { "DATE_SUB", SYM(DATE_SUB_INTERVAL)}, + { "DATE_FORMAT", SYM(DATE_FORMAT_SYM)}, { "DECODE", SYM(DECODE_SYM)}, { "DENSE_RANK", SYM(DENSE_RANK_SYM)}, { "EXTRACT", SYM(EXTRACT_SYM)}, diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 7e89ad91a17..17d6f016b2c 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -875,7 +875,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); Comments for TOKENS. For each token, please include in the same line a comment that contains the following tags: - SQL-2011-N : Non Reserved keywird as per SQL-2011 + SQL-2011-N : Non Reserved keyword as per SQL-2011 SQL-2003-R : Reserved keyword as per SQL-2003 SQL-2003-N : Non Reserved keyword as per SQL-2003 SQL-1999-R : Reserved keyword as per SQL-1999 @@ -1010,6 +1010,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token DATA_SYM /* SQL-2003-N */ %token DATETIME %token DATE_ADD_INTERVAL /* MYSQL-FUNC */ +%token DATE_FORMAT_SYM /* MYSQL-FUNC */ %token DATE_SUB_INTERVAL /* MYSQL-FUNC */ %token DATE_SYM /* SQL-2003-R */ %token DAY_HOUR_SYM @@ -9806,6 +9807,18 @@ function_call_nonkeyword: if ($$ == NULL) MYSQL_YYABORT; } + | DATE_FORMAT_SYM '(' expr ',' expr ')' + { + $$= new (thd->mem_root) Item_func_date_format(thd, $3, $5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | DATE_FORMAT_SYM '(' expr ',' expr ',' expr ')' + { + $$= new (thd->mem_root) Item_func_date_format(thd, $3, $5, $7); + if ($$ == NULL) + MYSQL_YYABORT; + } | DECODE_SYM '(' expr ',' expr ')' { $$= new (thd->mem_root) Item_func_decode(thd, $3, $5); @@ -14719,6 +14732,7 @@ keyword_sp_not_data_type: | CYCLE_SYM {} | DATA_SYM {} | DATAFILE_SYM {} + | DATE_FORMAT_SYM {} | DAY_SYM {} | DECODE_SYM {} | DEFINER_SYM {} diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy index 8d250abd994..052c219a7a4 100644 --- a/sql/sql_yacc_ora.yy +++ b/sql/sql_yacc_ora.yy @@ -284,7 +284,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); Comments for TOKENS. For each token, please include in the same line a comment that contains the following tags: - SQL-2011-N : Non Reserved keywird as per SQL-2011 + SQL-2011-N : Non Reserved keyword as per SQL-2011 SQL-2003-R : Reserved keyword as per SQL-2003 SQL-2003-N : Non Reserved keyword as per SQL-2003 SQL-1999-R : Reserved keyword as per SQL-1999 @@ -419,6 +419,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token DATA_SYM /* SQL-2003-N */ %token DATETIME %token DATE_ADD_INTERVAL /* MYSQL-FUNC */ +%token DATE_FORMAT_SYM /* MYSQL-FUNC */ %token DATE_SUB_INTERVAL /* MYSQL-FUNC */ %token DATE_SYM /* SQL-2003-R */ %token DAY_HOUR_SYM @@ -9462,6 +9463,18 @@ column_default_non_parenthesized_expr: if ($$ == NULL) MYSQL_YYABORT; } + | DATE_FORMAT_SYM '(' expr ',' expr ')' + { + $$= new (thd->mem_root) Item_func_date_format(thd, $3, $5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | DATE_FORMAT_SYM '(' expr ',' expr ',' expr ')' + { + $$= new (thd->mem_root) Item_func_date_format(thd, $3, $5, $7); + if ($$ == NULL) + MYSQL_YYABORT; + } | DECODE_SYM '(' expr ',' decode_when_list ')' { $5->push_front($3, thd->mem_root); @@ -14893,6 +14906,7 @@ keyword_sp_not_data_type: | CYCLE_SYM {} | DATA_SYM {} | DATAFILE_SYM {} + | DATE_FORMAT_SYM {} | DAY_SYM {} | DECODE_SYM {} | DEFINER_SYM {} -- cgit v1.2.1 From 7128fefa4ce4746ad04158846242f0aec6cf8271 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sat, 23 Sep 2017 23:23:05 +0200 Subject: Fix compile with -DWITHOUT_DYNAMIC_PLUGINS on Unix --- sql/CMakeLists.txt | 13 ++----------- storage/mroonga/CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 846df00498f..2e63dac6f02 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -322,18 +322,9 @@ ADD_CUSTOM_TARGET( SET_TARGET_PROPERTIES(GenServerSource PROPERTIES EXCLUDE_FROM_ALL TRUE) IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED) - ADD_LIBRARY(udf_example MODULE udf_example.c) + ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def) SET_TARGET_PROPERTIES(udf_example PROPERTIES PREFIX "") - # udf_example depends on strings - IF(WIN32) - IF(MSVC) - SET_TARGET_PROPERTIES(udf_example PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_SOURCE_DIR}/udf_example.def") - ENDIF() - TARGET_LINK_LIBRARIES(udf_example strings) - ELSE() - # udf_example is using safemutex exported by mysqld - TARGET_LINK_LIBRARIES(udf_example mysqld) - ENDIF() + TARGET_LINK_LIBRARIES(udf_example strings) ENDIF() FOREACH(tool glibtoolize libtoolize aclocal autoconf autoheader automake gtar diff --git a/storage/mroonga/CMakeLists.txt b/storage/mroonga/CMakeLists.txt index f728c944bbf..dc88be51184 100644 --- a/storage/mroonga/CMakeLists.txt +++ b/storage/mroonga/CMakeLists.txt @@ -326,6 +326,9 @@ if(MRN_BUNDLED) STORAGE_ENGINE MODULE_ONLY RECOMPILE_FOR_EMBEDDED LINK_LIBRARIES ${MRN_LIBRARIES}) + if(NOT TARGET mroonga) + return() + endif() else() add_library(mroonga MODULE ${MRN_ALL_SOURCES}) -- cgit v1.2.1 From 78b63425a3f17214b67891f44399fa5f084965e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sun, 24 Sep 2017 10:11:16 +0300 Subject: MDEV-13899 IMPORT TABLESPACE may corrupt ROW_FORMAT=REDUNDANT tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ALTER TABLE…IMPORT TABLESPACE adjustment code that was introduced by WL#5522 in MySQL 5.6 is incorrectly invoking rec_get_status() on a ROW_FORMAT=REDUNDANT record to determine if a record is a leaf page record. The function rec_get_status(rec) is only to be called on ROW_FORMAT=COMPACT, DYNAMIC or COMPRESSED records. --- storage/innobase/row/row0import.cc | 12 ++++-------- storage/xtradb/row/row0import.cc | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 1337496b897..ca287b2d0d9 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -1819,16 +1819,12 @@ PageConverter::update_records( m_rec_iter.open(block); - while (!m_rec_iter.end()) { + if (!page_is_leaf(block->frame)) { + return DB_SUCCESS; + } + while (!m_rec_iter.end()) { rec_t* rec = m_rec_iter.current(); - - /* FIXME: Move out of the loop */ - - if (rec_get_status(rec) == REC_STATUS_NODE_PTR) { - break; - } - ibool deleted = rec_get_deleted_flag(rec, comp); /* For the clustered index we have to adjust the BLOB diff --git a/storage/xtradb/row/row0import.cc b/storage/xtradb/row/row0import.cc index bc7b5206a64..572892172c4 100644 --- a/storage/xtradb/row/row0import.cc +++ b/storage/xtradb/row/row0import.cc @@ -1819,16 +1819,12 @@ PageConverter::update_records( m_rec_iter.open(block); - while (!m_rec_iter.end()) { + if (!page_is_leaf(block->frame)) { + return DB_SUCCESS; + } + while (!m_rec_iter.end()) { rec_t* rec = m_rec_iter.current(); - - /* FIXME: Move out of the loop */ - - if (rec_get_status(rec) == REC_STATUS_NODE_PTR) { - break; - } - ibool deleted = rec_get_deleted_flag(rec, comp); /* For the clustered index we have to adjust the BLOB -- cgit v1.2.1 From ea2162b6aae020117bc5e0422b8e4629498163bf Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Sun, 24 Sep 2017 23:33:44 +0530 Subject: MDEV-11846: ERROR 1114 (HY000) table full when performing GROUP BY The problem is there is an overflow for the key_file_length. Added the maximum limit for the key_file_length --- storage/maria/ma_create.c | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/storage/maria/ma_create.c b/storage/maria/ma_create.c index 0ddd8b226e2..ba4a70a4c51 100644 --- a/storage/maria/ma_create.c +++ b/storage/maria/ma_create.c @@ -660,11 +660,24 @@ int maria_create(const char *name, enum data_file_type datafile_type, if (length > max_key_length) max_key_length= length; - tot_length+= ((max_rows/(ulong) (((uint) maria_block_size - + + if (tot_length == ULLONG_MAX) + continue; + + ulonglong tot_length_part= (max_rows/(ulong) (((uint) maria_block_size - MAX_KEYPAGE_HEADER_SIZE - KEYPAGE_CHECKSUM_SIZE)/ - (length*2))) * - maria_block_size); + (length*2))); + if (tot_length_part >= (ULLONG_MAX / maria_block_size + + ULLONG_MAX % maria_block_size)) + tot_length= ULLONG_MAX; + else + { + if (tot_length > ULLONG_MAX - tot_length_part * maria_block_size) + tot_length= ULLONG_MAX; + else + tot_length+= tot_length_part * maria_block_size; + } } unique_key_parts=0; @@ -673,11 +686,24 @@ int maria_create(const char *name, enum data_file_type datafile_type, uniquedef->key=keys+i; unique_key_parts+=uniquedef->keysegs; share.state.key_root[keys+i]= HA_OFFSET_ERROR; - tot_length+= (max_rows/(ulong) (((uint) maria_block_size - + + if (tot_length == ULLONG_MAX) + continue; + ulonglong tot_length_part= (max_rows/(ulong) (((uint) maria_block_size - MAX_KEYPAGE_HEADER_SIZE - KEYPAGE_CHECKSUM_SIZE) / - ((MARIA_UNIQUE_HASH_LENGTH + pointer)*2)))* - (ulong) maria_block_size; + ((MARIA_UNIQUE_HASH_LENGTH + pointer)*2))); + + if (tot_length_part >= (ULLONG_MAX / maria_block_size + + ULLONG_MAX % maria_block_size)) + tot_length= ULLONG_MAX; + else + { + if (tot_length > ULLONG_MAX - tot_length_part * maria_block_size) + tot_length= ULLONG_MAX; + else + tot_length+= tot_length_part * maria_block_size; + } } keys+=uniques; /* Each unique has 1 key */ key_segs+=uniques; /* Each unique has 1 key seg */ @@ -746,8 +772,7 @@ int maria_create(const char *name, enum data_file_type datafile_type, Get estimate for index file length (this may be wrong for FT keys) This is used for pointers to other key pages. */ - tmp= (tot_length + maria_block_size * keys * - MARIA_INDEX_BLOCK_MARGIN) / maria_block_size; + tmp= (tot_length / maria_block_size + keys * MARIA_INDEX_BLOCK_MARGIN); /* use maximum of key_file_length we calculated and key_file_length value we -- cgit v1.2.1 From f91eb71e1cfaac56aa1c14b3681dbff3edc7eb0c Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Sun, 24 Sep 2017 23:37:57 +0530 Subject: MDEV-8840: ANALYZE FORMAT=JSON produces wrong data with BKA The issue was that r_loops, r_rows and r_filtered in ANALYZE FORMAT= JSON were not calculated for the table on which we were performing the MRR scan in the BKA join Fixed this by adding respective counter in the JOIN_TAB_SCAN_MRR::open and JOIN_TAB_SCAN_MRR::next --- mysql-test/r/explain_json.result | 6 +++--- sql/sql_join_cache.cc | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/explain_json.result b/mysql-test/r/explain_json.result index a46a3bcefa5..9e5515f3cfa 100644 --- a/mysql-test/r/explain_json.result +++ b/mysql-test/r/explain_json.result @@ -1524,12 +1524,12 @@ ANALYZE "key_length": "5", "used_key_parts": ["a"], "ref": ["test.t3.a"], - "r_loops": 0, + "r_loops": 1, "rows": 1, - "r_rows": null, + "r_rows": 10, "r_total_time_ms": "REPLACED", "filtered": 100, - "r_filtered": null, + "r_filtered": 100, "index_condition_bka": "((t4.b + 1) <= (t3.b + 1))" }, "buffer_type": "flat", diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc index 1023aea4cd4..75e69298809 100644 --- a/sql/sql_join_cache.cc +++ b/sql/sql_join_cache.cc @@ -3877,6 +3877,7 @@ int JOIN_TAB_SCAN_MRR::open() /* Dynamic range access is never used with BKA */ DBUG_ASSERT(join_tab->use_quick != 2); + join_tab->tracker->r_scans++; save_or_restore_used_tabs(join_tab, FALSE); init_mrr_buff(); @@ -3920,6 +3921,8 @@ int JOIN_TAB_SCAN_MRR::next() int rc= join_tab->table->file->multi_range_read_next((range_id_t*)ptr) ? -1 : 0; if (!rc) { + join_tab->tracker->r_rows++; + join_tab->tracker->r_rows_after_where++; /* If a record in in an incremental cache contains no fields then the association for the last record in cache will be equal to cache->end_pos -- cgit v1.2.1 From 21614f4a85deaaa771e3333ef003882c17677674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 25 Sep 2017 09:29:27 +0300 Subject: MDEV-13898 Corruption during online table-rebuilding ALTER of ROW_FORMAT=REDUNDANT tables This bug is a regression caused by the code refactoring in commit f5a833c3e085524585d1ae5b8303c168f075dab3. It was not present in any release of the MariaDB server. The bug affects table-rebuilding ALTER TABLE when the source table is in ROW_FORMAT=REDUNDANT and contains no virtual columns. row_log_table_low_redundant(): Log virtual column data only if virtual columns are present. --- mysql-test/suite/innodb/r/innodb-table-online.result | 8 +++++++- mysql-test/suite/innodb/t/innodb-table-online.test | 8 +++++++- storage/innobase/row/row0log.cc | 8 +++----- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result index ec5199e4f52..d6a0d4785f5 100644 --- a/mysql-test/suite/innodb/r/innodb-table-online.result +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -167,7 +167,8 @@ ROLLBACK; connection con1; KILL QUERY @id; ERROR 70100: Query execution was interrupted -SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR kill_done'; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done'; +SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done'; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; # session default connection default; @@ -180,6 +181,10 @@ ddl_online_create_index 1 ddl_pending_alter_table 1 ddl_sort_file_alter_table 0 ddl_log_file_alter_table 0 +BEGIN; +INSERT INTO t1 VALUES(7,4,2); +ROLLBACK; +SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied'; KILL QUERY @id; SET DEBUG_SYNC = 'now SIGNAL kill_done'; # session con1 @@ -227,6 +232,7 @@ t1 CREATE TABLE `t1` ( `c3` char(255) NOT NULL, PRIMARY KEY (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done'; SET lock_wait_timeout = 10; ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE; diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test index 51f5445693e..d3fbeffd19f 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online.test +++ b/mysql-test/suite/innodb/t/innodb-table-online.test @@ -158,7 +158,8 @@ let $ID= `SELECT @id := CONNECTION_ID()`; --error ER_QUERY_INTERRUPTED KILL QUERY @id; -SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR kill_done'; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done'; +SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done'; --send ALTER TABLE t1 ROW_FORMAT=REDUNDANT; @@ -166,6 +167,10 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT; connection default; SET DEBUG_SYNC = 'now WAIT_FOR rebuilt'; eval $innodb_metrics_select; +BEGIN; +INSERT INTO t1 VALUES(7,4,2); +ROLLBACK; +SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied'; let $ignore= `SELECT @id := $ID`; KILL QUERY @id; SET DEBUG_SYNC = 'now SIGNAL kill_done'; @@ -201,6 +206,7 @@ WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted'); --echo # session con1 connection con1; SHOW CREATE TABLE t1; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; # Exceed the configured innodb_online_alter_log_max_size. # The actual limit is a multiple of innodb_sort_buf_size, diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc index 1385238f560..747959fcde5 100644 --- a/storage/innobase/row/row0log.cc +++ b/storage/innobase/row/row0log.cc @@ -853,7 +853,7 @@ row_log_table_low_redundant( size = rec_get_converted_size_temp( index, tuple->fields, tuple->n_fields, &extra_size); - ulint v_size = ventry + ulint v_size = num_v ? rec_get_converted_size_temp_v(index, ventry) : 0; mrec_size = ROW_LOG_HEADER_SIZE + size + v_size + (extra_size >= 0x80); @@ -909,12 +909,10 @@ row_log_table_low_redundant( rec_convert_dtuple_to_temp( b + extra_size, index, tuple->fields, tuple->n_fields); b += size; - if (ventry) { + ut_ad(!num_v == !v_size); + if (num_v) { rec_convert_dtuple_to_temp_v(b, new_index, ventry); b += v_size; - } - - if (num_v) { if (o_ventry) { rec_convert_dtuple_to_temp_v( b, new_index, o_ventry); -- cgit v1.2.1 From 19d21b9366c1eb5c1c1e822a09969e9a23bfe2c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 25 Sep 2017 09:29:27 +0300 Subject: Cherry-pick the MDEV-13898 test changes from 10.2 to 10.0 --- mysql-test/suite/innodb/r/innodb-table-online.result | 8 +++++++- mysql-test/suite/innodb/t/innodb-table-online.test | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-table-online.result b/mysql-test/suite/innodb/r/innodb-table-online.result index 5440df0bb9c..eb55ba57e36 100644 --- a/mysql-test/suite/innodb/r/innodb-table-online.result +++ b/mysql-test/suite/innodb/r/innodb-table-online.result @@ -143,7 +143,8 @@ ROLLBACK; # session con1 KILL QUERY @id; ERROR 70100: Query execution was interrupted -SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR kill_done'; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done'; +SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done'; ALTER TABLE t1 ROW_FORMAT=REDUNDANT; # session default SET DEBUG_SYNC = 'now WAIT_FOR rebuilt'; @@ -153,6 +154,10 @@ ddl_background_drop_indexes 0 ddl_background_drop_tables 0 ddl_online_create_index 1 ddl_pending_alter_table 1 +BEGIN; +INSERT INTO t1 VALUES(7,4,2); +ROLLBACK; +SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied'; KILL QUERY @id; SET DEBUG_SYNC = 'now SIGNAL kill_done'; # session con1 @@ -186,6 +191,7 @@ t1 CREATE TABLE `t1` ( `c3` text NOT NULL, PRIMARY KEY (`c1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done'; SET lock_wait_timeout = 10; ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE; diff --git a/mysql-test/suite/innodb/t/innodb-table-online.test b/mysql-test/suite/innodb/t/innodb-table-online.test index 4dce8e4d65f..4e9f2f13344 100644 --- a/mysql-test/suite/innodb/t/innodb-table-online.test +++ b/mysql-test/suite/innodb/t/innodb-table-online.test @@ -157,7 +157,8 @@ let $ID= `SELECT @id := CONNECTION_ID()`; --error ER_QUERY_INTERRUPTED KILL QUERY @id; -SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR kill_done'; +SET DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt WAIT_FOR dml_done'; +SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL applied WAIT_FOR kill_done'; --send ALTER TABLE t1 ROW_FORMAT=REDUNDANT; @@ -165,6 +166,10 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT; connection default; SET DEBUG_SYNC = 'now WAIT_FOR rebuilt'; eval $innodb_metrics_select; +BEGIN; +INSERT INTO t1 VALUES(7,4,2); +ROLLBACK; +SET DEBUG_SYNC = 'now SIGNAL dml_done WAIT_FOR applied'; let $ignore= `SELECT @id := $ID`; KILL QUERY @id; SET DEBUG_SYNC = 'now SIGNAL kill_done'; @@ -190,6 +195,7 @@ ANALYZE TABLE t1; --echo # session con1 connection con1; SHOW CREATE TABLE t1; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; # Exceed the configured innodb_online_alter_log_max_size. # The actual limit is a multiple of innodb_sort_buf_size, -- cgit v1.2.1 From 8acb2b7b28d58689071d8adec4e41074a17d6c0f Mon Sep 17 00:00:00 2001 From: Will Date: Fri, 22 Sep 2017 23:20:28 -0400 Subject: README.md - Secure (HTTPS) Links Made a few links in README.md secure (https). --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 58e08f89ca0..f46888e4b2f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ see the Credits appendix. You can also run 'SHOW authors' to get a list of active contributors. A description of the MariaDB project and a manual can be found at: -http://mariadb.org/ +https://mariadb.org/ https://mariadb.com/kb/en/ https://mariadb.com/kb/en/mariadb-vs-mysql-features/ https://mariadb.com/kb/en/mariadb-versus-mysql-features/ @@ -55,9 +55,9 @@ Bug Reports: ------------ Bug and/or error reports regarding MariaDB should be submitted at -http://mariadb.org/jira +https://mariadb.org/jira -Bugs in the MySQL code can also be submitted at http://bugs.mysql.com +Bugs in the MySQL code can also be submitted at https://bugs.mysql.com The code for MariaDB, including all revision history, can be found at: https://github.com/MariaDB/server -- cgit v1.2.1 From 742263df4f43ac8ffb611de607fb8337296ae949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 25 Sep 2017 17:24:52 +0300 Subject: MDEV-13256 innodb.truncate_debug fails in buildbot Ensure that no adaptive hash index exists for any system tables, so that the blocked TRUNCATE TABLE t1 will not block the concurrent TRUNCATE TABLE t2. --- mysql-test/suite/innodb/r/truncate_debug.result | 6 ++++-- mysql-test/suite/innodb/t/truncate_debug.test | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/innodb/r/truncate_debug.result b/mysql-test/suite/innodb/r/truncate_debug.result index eb4e9cfbc85..c04b83dbbe8 100644 --- a/mysql-test/suite/innodb/r/truncate_debug.result +++ b/mysql-test/suite/innodb/r/truncate_debug.result @@ -1,6 +1,9 @@ # # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS # +SET @ahi= @@global.innodb_adaptive_hash_index; +SET GLOBAL innodb_adaptive_hash_index=OFF; +SET GLOBAL innodb_adaptive_hash_index=ON; Test_1 :- Check if DDL operations are possible on table being truncated. Also check if DDL operations on other tables succeed. @@ -81,6 +84,5 @@ connection con2; disconnect con2; connection default; SET DEBUG_SYNC= 'RESET'; -SET session lock_wait_timeout=default; -set global innodb_adaptive_hash_index=on; +SET GLOBAL innodb_adaptive_hash_index=@ahi; drop table t1,t2,t3; diff --git a/mysql-test/suite/innodb/t/truncate_debug.test b/mysql-test/suite/innodb/t/truncate_debug.test index 915688ed354..5fee9174d98 100644 --- a/mysql-test/suite/innodb/t/truncate_debug.test +++ b/mysql-test/suite/innodb/t/truncate_debug.test @@ -8,6 +8,12 @@ --echo # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS --echo # +SET @ahi= @@global.innodb_adaptive_hash_index; +# Ensure that there is no adaptive hash index on any system tables, +# or any other tables than the ones that we are creating below. +SET GLOBAL innodb_adaptive_hash_index=OFF; +SET GLOBAL innodb_adaptive_hash_index=ON; + --echo Test_1 :- Check if DDL operations are possible on --echo table being truncated. Also check if --echo DDL operations on other tables succeed. @@ -115,8 +121,7 @@ disconnect con2; connection default; SET DEBUG_SYNC= 'RESET'; -SET session lock_wait_timeout=default; -set global innodb_adaptive_hash_index=on; +SET GLOBAL innodb_adaptive_hash_index=@ahi; drop table t1,t2,t3; --source include/wait_until_count_sessions.inc -- cgit v1.2.1