revision-id: 8ffee1bf32818c1b1ec77bf1ea0811c8cea8c383 (mariadb-10.3.6-203-g8ffee1bf328) parent(s): 577f4dc06d3b0b3e4d873be5b836cd4bcae222da 555921a9c3ddcd638e7f08ea117738640e300875 author: Jan Lindström committer: Jan Lindström timestamp: 2018-11-28 09:36:04 +0200 message: Merge remote-tracking branch 'origin/10.4' into bb-10.4-galera4 .travis.compiler.sh | 2 +- .travis.yml | 2 +- client/mysqlbinlog.cc | 2 +- extra/yassl/src/ssl.cpp | 16 +- include/my_time.h | 55 +- libmariadb | 2 +- libmysqld/libmysql.c | 7 +- .../include/have_aria_used_for_temp_tables.inc | 4 + .../include/innodb_encrypt_tables.combinations | 14 + mysql-test/include/innodb_encrypt_tables.inc | 4 + mysql-test/main/bigint.result | 11 + mysql-test/main/bigint.test | 9 + mysql-test/main/derived_cond_pushdown.result | 93 ++ mysql-test/main/derived_cond_pushdown.test | 27 + mysql-test/main/distinct.result | 20 + mysql-test/main/distinct.test | 18 + mysql-test/main/func_default.result | 10 +- mysql-test/main/func_default.test | 5 + mysql-test/main/func_extract.result | 592 +++++++++ mysql-test/main/func_extract.test | 257 ++++ mysql-test/main/func_json.result | 20 + mysql-test/main/func_json.test | 18 + mysql-test/main/func_time.result | 66 +- mysql-test/main/func_time.test | 31 +- mysql-test/main/func_time_round.result | 1374 ++++++++++++++++++++ mysql-test/main/func_time_round.test | 461 +++++++ mysql-test/main/group_by.result | 10 + mysql-test/main/group_by.test | 13 + mysql-test/main/information_schema.result | 2 +- mysql-test/main/information_schema.test | 4 + mysql-test/main/invisible_field_debug.result | 2 + mysql-test/main/invisible_field_debug.test | 2 + mysql-test/main/mysqld--help.result | 3 +- mysql-test/main/parser.result | 65 + mysql-test/main/parser.test | 74 ++ mysql-test/main/partition_innodb.result | 40 + mysql-test/main/partition_innodb.test | 42 + mysql-test/main/session_tracker_last_gtid.result | 6 - mysql-test/main/sp-code.result | 12 +- mysql-test/main/sp-cursor.result | 24 + mysql-test/main/sp-cursor.test | 21 + mysql-test/main/sp-for-loop.result | 2 +- mysql-test/main/sp-for-loop.test | 2 +- mysql-test/main/sql_mode.result | 8 +- mysql-test/main/sql_mode.test | 4 +- mysql-test/main/str_to_datetime_457.result | 5 +- mysql-test/main/system_mysql_db.result | 4 +- mysql-test/main/system_mysql_db_fix40123.result | 4 +- mysql-test/main/system_mysql_db_fix50030.result | 4 +- mysql-test/main/system_mysql_db_fix50117.result | 4 +- mysql-test/main/type_date_round.result | 174 +++ mysql-test/main/type_date_round.test | 113 ++ mysql-test/main/type_datetime_round.result | 205 +++ mysql-test/main/type_datetime_round.test | 147 +++ mysql-test/main/type_interval.result | 83 ++ mysql-test/main/type_interval.test | 54 + mysql-test/main/type_time_round.result | 260 ++++ mysql-test/main/type_time_round.test | 184 +++ mysql-test/main/type_timestamp_round.result | 164 +++ mysql-test/main/type_timestamp_round.test | 138 ++ mysql-test/main/udf.result | 105 ++ mysql-test/main/udf.test | 66 + mysql-test/main/win.result | 96 ++ mysql-test/main/win.test | 97 ++ mysql-test/suite/archive/rnd_pos.result | 56 + mysql-test/suite/archive/rnd_pos.test | 27 + mysql-test/suite/compat/oracle/r/parser.result | 110 ++ mysql-test/suite/compat/oracle/r/sp-code.result | 42 +- .../suite/compat/oracle/r/sp-cursor-rowtype.result | 25 + mysql-test/suite/compat/oracle/r/sp-cursor.result | 28 + mysql-test/suite/compat/oracle/r/sp-package.result | 48 + mysql-test/suite/compat/oracle/r/sp.result | 60 +- mysql-test/suite/compat/oracle/t/parser.test | 154 +++ mysql-test/suite/compat/oracle/t/sp-code.test | 2 +- .../suite/compat/oracle/t/sp-cursor-rowtype.test | 23 + mysql-test/suite/compat/oracle/t/sp-cursor.test | 35 + mysql-test/suite/compat/oracle/t/sp-package.test | 57 + mysql-test/suite/compat/oracle/t/sp.test | 45 +- .../suite/engines/iuds/r/insert_number.result | 100 ++ .../engines/iuds/r/update_delete_number.result | 17 + mysql-test/suite/funcs_1/r/is_columns_mysql.result | 8 +- .../funcs_1/r/is_columns_mysql_embedded.result | 8 +- mysql-test/suite/galera/disabled.def | 10 +- .../suite/galera/include/have_xtrabackup.inc | 4 - .../galera/r/galera_autoinc_sst_mariabackup.result | 47 + .../galera/r/galera_ist_mariabackup,debug.rdiff | 114 ++ .../suite/galera/r/galera_ist_mariabackup.result | 287 ++++ ...a_ist_mariabackup_innodb_flush_logs,debug.rdiff | 114 ++ ...galera_ist_mariabackup_innodb_flush_logs.result | 96 ++ .../galera/r/galera_ist_mysqldump,debug.rdiff | 19 +- .../galera/r/galera_sst_mariabackup,debug.rdiff | 4 +- .../galera_sst_mariabackup_encrypt_with_key.result | 3 + .../r/galera_sst_mariabackup_table_options.result | 997 ++++++++++++++ .../r/galera_sst_mysqldump_with_key,debug.rdiff | 106 ++ .../galera/r/galera_sst_mysqldump_with_key.result | 97 -- .../galera_sst_xtrabackup-v2_data_dir,debug.rdiff | 103 ++ mysql-test/suite/galera/r/partition.result | 18 +- mysql-test/suite/galera/suite.pm | 4 - .../galera/t/galera_autoinc_sst_mariabackup.cnf | 12 + .../galera/t/galera_autoinc_sst_mariabackup.test | 96 ++ .../suite/galera/t/galera_ist_mariabackup.cnf | 12 + .../suite/galera/t/galera_ist_mariabackup.test | 16 + .../t/galera_ist_mariabackup_innodb_flush_logs.cnf | 14 + .../galera_ist_mariabackup_innodb_flush_logs.test | 12 + .../t/galera_sst_mariabackup_encrypt_with_key.cnf | 12 + .../t/galera_sst_mariabackup_encrypt_with_key.test | 14 + .../t/galera_sst_mariabackup_table_options.cnf | 16 + .../t/galera_sst_mariabackup_table_options.test | 228 ++++ .../suite/galera/t/galera_var_reject_queries.test | 2 +- mysql-test/suite/galera/t/partition.test | 14 +- mysql-test/suite/galera_3nodes/disabled.def | 3 +- mysql-test/suite/innodb/include/alter_instant.inc | 33 - .../suite/innodb/r/innodb-wl5522-debug.result | 6 - .../innodb/r/innodb_skip_innodb_is_tables.result | 1 - mysql-test/suite/innodb/r/instant_alter.result | 107 +- .../innodb/r/instant_alter_purge,release.rdiff | 18 + .../suite/innodb/r/instant_alter_purge.result | 46 + mysql-test/suite/innodb/r/instant_drop.result | 13 +- mysql-test/suite/innodb/r/monitor.result | 1 - mysql-test/suite/innodb/r/truncate.result | 21 + mysql-test/suite/innodb/t/innodb-index.test | 5 + mysql-test/suite/innodb/t/innodb-wl5522-debug.test | 14 - mysql-test/suite/innodb/t/instant_alter.test | 40 + mysql-test/suite/innodb/t/instant_alter_purge.test | 75 ++ mysql-test/suite/innodb/t/instant_drop.test | 3 +- mysql-test/suite/innodb/t/log_file_name_debug.test | 4 +- mysql-test/suite/innodb/t/truncate.test | 21 + .../suite/innodb_zip/r/wl5522_debug_zip.result | 6 - .../suite/innodb_zip/t/wl5522_debug_zip.test | 14 - .../suite/mariabackup/xb_aws_key_management.result | 2 - mysql-test/suite/rpl/r/rpl_temporal_round.result | 50 + mysql-test/suite/rpl/t/rpl_temporal_round.test | 35 + mysql-test/suite/sys_vars/r/sql_mode_basic.result | 10 +- .../sys_vars/r/sysvars_server_embedded.result | 2 +- .../sys_vars/r/sysvars_server_notembedded.result | 2 +- .../t/aria_used_for_temp_tables_basic.test | 1 + mysql-test/suite/sys_vars/t/sql_mode_basic.test | 8 +- mysql-test/suite/sys_vars/t/sysvars_aria.test | 1 + .../suite/sys_vars/t/tmp_disk_table_size_func.test | 2 + mysql-test/suite/versioning/r/sysvars.result | 11 + mysql-test/suite/versioning/t/sysvars.test | 10 + scripts/galera_new_cluster.sh | 2 +- scripts/mysql_system_tables.sql | 4 +- scripts/mysql_system_tables_fix.sql | 6 +- sql-common/my_time.c | 515 +++++--- sql/CMakeLists.txt | 4 +- sql/event_data_objects.cc | 22 +- sql/event_parse_data.cc | 14 +- sql/field.cc | 304 +++-- sql/field.h | 35 +- sql/field_conv.cc | 33 +- sql/filesort.cc | 84 +- sql/filesort.h | 3 + sql/gen_lex_token.cc | 8 +- sql/ha_partition.cc | 5 +- sql/ha_partition.h | 4 - sql/handler.h | 20 +- sql/item.cc | 72 +- sql/item.h | 30 +- sql/item_cmpfunc.cc | 28 +- sql/item_cmpfunc.h | 2 +- sql/item_func.cc | 4 +- sql/item_jsonfunc.cc | 1 + sql/item_strfunc.cc | 2 +- sql/item_subselect.cc | 4 +- sql/item_sum.cc | 19 + sql/item_sum.h | 14 +- sql/item_timefunc.cc | 176 +-- sql/item_timefunc.h | 54 +- sql/item_vers.cc | 4 +- sql/lex.h | 40 +- sql/my_decimal.cc | 4 +- sql/my_decimal.h | 3 +- sql/mysql_upgrade_service.cc | 189 ++- sql/semisync_master_ack_receiver.cc | 58 +- sql/semisync_master_ack_receiver.h | 147 ++- sql/sp.cc | 3 +- sql/sp_head.cc | 28 +- sql/sp_pcontext.cc | 13 + sql/sp_pcontext.h | 8 +- sql/sp_rcontext.cc | 27 - sql/sql_basic_types.h | 265 +++- sql/sql_class.h | 48 +- sql/sql_cursor.cc | 5 + sql/sql_lex.cc | 83 +- sql/sql_lex.h | 18 +- sql/sql_parse.cc | 8 +- sql/sql_partition.cc | 2 + sql/sql_prepare.cc | 12 + sql/sql_select.cc | 36 +- sql/sql_show.cc | 18 +- sql/sql_sort.h | 1 - sql/sql_table.cc | 6 +- sql/sql_time.cc | 47 +- sql/sql_time.h | 15 +- sql/sql_type.cc | 327 ++++- sql/sql_type.h | 870 +++++++++++-- sql/sql_type_int.h | 28 + sql/sql_udf.cc | 3 + sql/sql_udf.h | 15 + sql/sql_update.cc | 2 +- sql/sql_yacc.yy | 580 +++++++-- sql/sql_yacc_ora.yy | 583 +++++---- sql/structs.h | 34 +- sql/sys_vars.cc | 1 + sql/sys_vars.ic | 7 +- sql/table.cc | 1 + sql/udf_example.c | 139 ++ sql/udf_example.def | 7 + sql/upgrade_conf_file.cc | 177 +++ sql/wsrep_mysqld.cc | 4 +- storage/archive/ha_archive.h | 2 +- storage/connect/mysql-test/connect/r/jdbc.result | 13 + .../mysql-test/connect/r/jdbc_postgresql.result | 8 + storage/csv/ha_tina.h | 2 +- storage/innobase/btr/btr0btr.cc | 59 +- storage/innobase/btr/btr0bulk.cc | 6 +- storage/innobase/btr/btr0cur.cc | 78 +- storage/innobase/btr/btr0defragment.cc | 10 +- storage/innobase/btr/btr0scrub.cc | 8 +- storage/innobase/btr/btr0sea.cc | 8 +- storage/innobase/buf/buf0buf.cc | 4 - storage/innobase/buf/buf0dblwr.cc | 1 - storage/innobase/buf/buf0flu.cc | 4 +- storage/innobase/buf/buf0lru.cc | 1 - storage/innobase/buf/buf0rea.cc | 2 +- storage/innobase/data/data0data.cc | 2 - storage/innobase/data/data0type.cc | 2 - storage/innobase/dict/dict0boot.cc | 44 +- storage/innobase/dict/dict0crea.cc | 28 +- storage/innobase/dict/dict0defrag_bg.cc | 5 +- storage/innobase/dict/dict0dict.cc | 89 +- storage/innobase/dict/dict0load.cc | 5 +- storage/innobase/dict/dict0mem.cc | 16 +- storage/innobase/dict/dict0stats.cc | 5 +- storage/innobase/dict/dict0stats_bg.cc | 1 - storage/innobase/fil/fil0crypt.cc | 1 - storage/innobase/fil/fil0fil.cc | 10 +- storage/innobase/fil/fil0pagecompress.cc | 1 - storage/innobase/fsp/fsp0file.cc | 5 - storage/innobase/fsp/fsp0fsp.cc | 3 - storage/innobase/fsp/fsp0space.cc | 3 - storage/innobase/fsp/fsp0sysspace.cc | 3 - storage/innobase/fts/fts0ast.cc | 2 - storage/innobase/fts/fts0fts.cc | 83 +- storage/innobase/fts/fts0opt.cc | 2 - storage/innobase/fts/fts0que.cc | 3 - storage/innobase/gis/gis0rtree.cc | 6 +- storage/innobase/gis/gis0sea.cc | 8 +- storage/innobase/ha/ha0storage.cc | 1 - storage/innobase/handler/ha_innodb.cc | 78 +- storage/innobase/handler/handler0alter.cc | 148 ++- storage/innobase/handler/i_s.cc | 5 +- storage/innobase/ibuf/ibuf0ibuf.cc | 5 +- storage/innobase/include/btr0bulk.h | 1 - storage/innobase/include/buf0buf.ic | 2 - storage/innobase/include/dict0boot.h | 16 +- storage/innobase/include/dict0crea.h | 9 - storage/innobase/include/dict0dict.h | 136 +- storage/innobase/include/dict0dict.ic | 114 +- storage/innobase/include/dict0load.h | 2 - storage/innobase/include/dict0mem.h | 68 +- storage/innobase/include/dict0priv.h | 12 - storage/innobase/include/dict0priv.ic | 35 - storage/innobase/include/fsp0file.h | 5 +- storage/innobase/include/fsp0fsp.h | 1 - storage/innobase/include/fsp0space.h | 2 - storage/innobase/include/fsp0sysspace.h | 1 - storage/innobase/include/fts0ast.h | 1 - storage/innobase/include/fts0fts.h | 16 +- storage/innobase/include/fts0plugin.h | 2 +- storage/innobase/include/fts0types.ic | 3 - storage/innobase/include/gis0type.h | 3 - storage/innobase/include/log0recv.h | 2 - storage/innobase/include/mem0mem.ic | 2 - storage/innobase/include/page0types.h | 1 - storage/innobase/include/rem0cmp.h | 7 +- storage/innobase/include/rem0cmp.ic | 1 + storage/innobase/include/rem0rec.ic | 1 + storage/innobase/include/row0mysql.h | 21 +- storage/innobase/include/row0row.h | 2 +- storage/innobase/include/row0row.ic | 8 +- storage/innobase/include/row0undo.h | 15 +- storage/innobase/include/row0upd.h | 25 - storage/innobase/include/row0upd.ic | 8 +- storage/innobase/include/srv0mon.h | 1 - storage/innobase/include/srv0srv.h | 4 +- storage/innobase/include/trx0purge.h | 2 + storage/innobase/include/trx0roll.h | 10 - storage/innobase/include/trx0trx.h | 8 +- storage/innobase/include/trx0types.h | 2 - storage/innobase/include/trx0undo.h | 39 +- storage/innobase/include/trx0undo.ic | 31 - storage/innobase/include/ut0counter.h | 6 +- storage/innobase/include/ut0mutex.h | 4 - storage/innobase/include/ut0new.h | 4 +- storage/innobase/include/ut0vec.ic | 2 - storage/innobase/lock/lock0lock.cc | 98 +- storage/innobase/lock/lock0prdt.cc | 9 - storage/innobase/lock/lock0wait.cc | 2 +- storage/innobase/log/log0log.cc | 2 +- storage/innobase/log/log0recv.cc | 31 +- storage/innobase/mem/mem0mem.cc | 2 - storage/innobase/os/os0event.cc | 2 - storage/innobase/os/os0file.cc | 25 +- storage/innobase/os/os0proc.cc | 7 +- storage/innobase/os/os0thread.cc | 8 +- storage/innobase/page/page0cur.cc | 14 +- storage/innobase/page/page0page.cc | 2 +- storage/innobase/page/page0zip.cc | 23 +- storage/innobase/pars/pars0opt.cc | 1 - storage/innobase/pars/pars0pars.cc | 3 - storage/innobase/que/que0que.cc | 5 - storage/innobase/rem/rem0cmp.cc | 11 +- storage/innobase/rem/rem0rec.cc | 20 +- storage/innobase/row/row0ftsort.cc | 15 +- storage/innobase/row/row0import.cc | 71 +- storage/innobase/row/row0ins.cc | 45 +- storage/innobase/row/row0log.cc | 16 +- storage/innobase/row/row0merge.cc | 18 +- storage/innobase/row/row0mysql.cc | 47 +- storage/innobase/row/row0purge.cc | 33 +- storage/innobase/row/row0quiesce.cc | 11 +- storage/innobase/row/row0row.cc | 6 +- storage/innobase/row/row0sel.cc | 62 +- storage/innobase/row/row0uins.cc | 173 +-- storage/innobase/row/row0umod.cc | 68 +- storage/innobase/row/row0undo.cc | 189 ++- storage/innobase/row/row0upd.cc | 90 +- storage/innobase/row/row0vers.cc | 2 - storage/innobase/srv/srv0conc.cc | 4 +- storage/innobase/srv/srv0mon.cc | 5 - storage/innobase/srv/srv0srv.cc | 3 - storage/innobase/srv/srv0start.cc | 4 - storage/innobase/sync/sync0arr.cc | 6 - storage/innobase/sync/sync0debug.cc | 3 - storage/innobase/sync/sync0rw.cc | 9 - storage/innobase/trx/trx0i_s.cc | 7 +- storage/innobase/trx/trx0purge.cc | 5 +- storage/innobase/trx/trx0rec.cc | 17 +- storage/innobase/trx/trx0roll.cc | 179 +-- storage/innobase/trx/trx0rseg.cc | 1 - storage/innobase/trx/trx0sys.cc | 7 +- storage/innobase/trx/trx0trx.cc | 4 - storage/innobase/trx/trx0undo.cc | 56 +- storage/innobase/ut/ut0dbg.cc | 3 +- storage/innobase/ut/ut0new.cc | 2 - storage/innobase/ut/ut0rbt.cc | 3 - storage/maria/ha_maria.cc | 3 +- storage/maria/ma_init.c | 2 + storage/maria/ma_recovery.c | 8 +- storage/maria/unittest/ma_test_recovery.pl | 23 +- storage/mroonga/ha_mroonga.cpp | 22 +- storage/mroonga/lib/mrn_condition_converter.cpp | 11 +- storage/spider/ha_spider.cc | 4 +- storage/spider/spd_db_mysql.cc | 9 + storage/tokudb/tokudb_sysvars.cc | 4 +- strings/json_lib.c | 2 +- win/upgrade_wizard/upgradeDlg.cpp | 27 +- 359 files changed, 14191 insertions(+), 3337 deletions(-) diff --cc mysql-test/suite/galera/r/partition.result index 774d5ce8f83,bdf6df25589..e34028ab04f --- a/mysql-test/suite/galera/r/partition.result +++ b/mysql-test/suite/galera/r/partition.result @@@ -121,11 -119,11 +121,11 @@@ SET GLOBAL wsrep_load_data_splitting = CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; connection node_2; - SELECT COUNT(*) = 20002 FROM t1; - COUNT(*) = 20002 - 1 + SELECT COUNT(*) FROM t1; + COUNT(*) + 20002 wsrep_last_committed_diff -1 +AS_EXPECTED_3_or_5 DROP TABLE t1; # Case 2: wsrep_load_data_splitting = ON & LOAD DATA with 101 entries. connection node_1; @@@ -146,11 -144,11 +146,11 @@@ SET GLOBAL wsrep_load_data_splitting = CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2; connection node_2; - SELECT COUNT(*) = 20002 FROM t1; - COUNT(*) = 20002 - 1 + SELECT COUNT(*) FROM t1; + COUNT(*) + 20002 wsrep_last_committed_diff -1 +AS_EXPECTED_1_or_2 DROP TABLE t1; connection node_1; SET GLOBAL wsrep_load_data_splitting = 1;; diff --cc mysql-test/suite/galera/t/partition.test index 7fa6b9e800c,0159ef8f607..13e09a4e3e6 --- a/mysql-test/suite/galera/t/partition.test +++ b/mysql-test/suite/galera/t/partition.test @@@ -129,14 -129,14 +129,17 @@@ CREATE TABLE t1 (pk INT PRIMARY KEY --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` --connection node_2 - SELECT COUNT(*) = 20002 FROM t1; + --let $wait_condition = SELECT COUNT(*) = 20002 FROM t1; + --source include/wait_condition.inc + + SELECT COUNT(*) FROM t1; -# LOAD-ing 20002 rows causes 3 commits to be registered +# LOAD-ing 20002 rows causes +# 3 commits to be registered when the Galera library does not support streaming replication and +# 5 commits to be registered when the Galera library supports streaming replication --disable_query_log ---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 3 AS wsrep_last_committed_diff; +--replace_result 3 AS_EXPECTED_3_or_5 5 AS_EXPECTED_3_or_5 +--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff; --enable_query_log DROP TABLE t1; @@@ -189,14 -192,13 +195,16 @@@ CREATE TABLE t1 (pk INT PRIMARY KEY --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` --connection node_2 - SELECT COUNT(*) = 20002 FROM t1; + --let $wait_condition = SELECT COUNT(*) = 20002 FROM t1; + --source include/wait_condition.inc + SELECT COUNT(*) FROM t1; -# LOAD-ing 20002 rows causes 1 commit to be registered +# LOAD-ing 20002 rows causes +# 1 commit to be registered when the Galera library does not support streaming replication and +# 2 commits to be registered when the Galera library supports streaming replication --disable_query_log ---eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff; +--replace_result 1 AS_EXPECTED_1_or_2 2 AS_EXPECTED_1_or_2 +--eval SELECT $wsrep_last_committed_after - $wsrep_last_committed_before AS wsrep_last_committed_diff; --enable_query_log DROP TABLE t1; diff --cc sql/sql_parse.cc index 0567cec72b4,3b2e57abcf5..57bdacc96ba --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@@ -2404,12 -2384,9 +2404,10 @@@ com_multi_end || thd->get_stmt_da()->is_disabled()); /* wsrep BF abort in query exec phase */ mysql_mutex_lock(&thd->LOCK_thd_data); - do_end_of_statement= thd->wsrep_conflict_state != REPLAYING && - thd->wsrep_conflict_state != RETRY_AUTOCOMMIT && - !thd->killed; + do_end_of_statement= - thd->wsrep_trx().state() != wsrep::transaction::s_replaying; - #ifdef TODO - thd->wsrep_conflict_state != REPLAYING && - thd->wsrep_conflict_state != RETRY_AUTOCOMMIT; - #endif ++ thd->wsrep_trx().state() != wsrep::transaction::s_replaying ++ && !thd->killed; ++ mysql_mutex_unlock(&thd->LOCK_thd_data); } else diff --cc storage/innobase/row/row0ins.cc index 69a73e8284c,27df0a9249d..340d158222e --- a/storage/innobase/row/row0ins.cc +++ b/storage/innobase/row/row0ins.cc @@@ -48,12 -44,6 +44,10 @@@ Created 4/20/1996 Heikki Tuur #include "buf0lru.h" #include "fts0fts.h" #include "fts0types.h" - #include "m_string.h" - #include "gis0geo.h" +#include "wsrep_api.h" +#include "mysql/service_wsrep.h" +#include "wsrep_mysqld.h" +#include "mysql/service_wsrep.h" /************************************************************************* IMPORTANT NOTE: Any operation that generates redo MUST check that there diff --cc storage/innobase/row/row0sel.cc index 83ee7cb53ee,5e7894d3ca7..c88912dc94f --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@@ -53,16 -53,7 +53,14 @@@ Created 12/19/1997 Heikki Tuur #include "row0mysql.h" #include "buf0lru.h" #include "srv0srv.h" - #include "ha_prototypes.h" #include "srv0mon.h" - #include "ut0new.h" +#include "m_string.h" /* for my_sys.h */ +#include "my_sys.h" /* DEBUG_SYNC_C */ + +#include "my_compare.h" /* enum icp_result */ +#include "thr_lock.h" +#include "handler.h" +#include "ha_innodb.h" /* Maximum number of rows to prefetch; MySQL interface has another parameter */ #define SEL_MAX_N_PREFETCH 16