Browse Source

Merge branch '10.1' into MDEV-14144

pull/650/head
Jan Lindström 8 years ago
committed by GitHub
parent
commit
c7c52ef1e8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      configure.cmake
  2. 4
      debian/control
  3. 51
      mysql-test/r/func_date_add.result
  4. 24
      mysql-test/r/func_time.result
  5. 15
      mysql-test/r/subselect_mat.result
  6. 9
      mysql-test/suite/galera/disabled.def
  7. 9
      mysql-test/suite/galera/r/MW-336.result
  8. 23
      mysql-test/suite/galera/r/galera_bf_abort_for_update.result
  9. 1
      mysql-test/suite/galera/t/MW-286.test
  10. 19
      mysql-test/suite/galera/t/MW-336.test
  11. 45
      mysql-test/suite/galera/t/galera_bf_abort_for_update.test
  12. 23
      mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result
  13. 62
      mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test
  14. 37
      mysql-test/t/func_date_add.test
  15. 16
      mysql-test/t/func_time.test
  16. 13
      mysql-test/t/subselect_mat.test
  17. 39
      sql/handler.cc
  18. 14
      sql/item_timefunc.cc
  19. 2
      sql/log_event.cc
  20. 4
      sql/opt_subselect.cc
  21. 6
      sql/sql_parse.cc
  22. 7
      sql/sql_repl.cc
  23. 2
      sql/sql_time.cc
  24. 2
      sql/wsrep_mysqld.cc
  25. 23
      storage/innobase/fts/fts0fts.cc
  26. 10
      storage/innobase/srv/srv0srv.cc
  27. 23
      storage/xtradb/fts/fts0fts.cc
  28. 10
      storage/xtradb/srv/srv0srv.cc

3
configure.cmake

@ -1111,6 +1111,9 @@ CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
IF(NOT HAVE_UCONTEXT_H) IF(NOT HAVE_UCONTEXT_H)
CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H) CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
ENDIF() ENDIF()
IF(HAVE_UCONTEXT_H)
CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)
ENDIF()
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_sec "time.h" STRUCT_TIMESPEC_HAS_TV_SEC) CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_sec "time.h" STRUCT_TIMESPEC_HAS_TV_SEC)
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_nsec "time.h" STRUCT_TIMESPEC_HAS_TV_NSEC) CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_nsec "time.h" STRUCT_TIMESPEC_HAS_TV_NSEC)

4
debian/control

@ -27,8 +27,8 @@ Build-Depends: bison,
libjemalloc-dev (>= 3.0.0~) [linux-any] libjemalloc-dev (>= 3.0.0~) [linux-any]
Standards-Version: 3.8.2 Standards-Version: 3.8.2
Homepage: http://mariadb.org/ Homepage: http://mariadb.org/
Vcs-Git: https://github.com/MariaDB/server.git
Vcs-Browser: https://github.com/MariaDB/server/ Vcs-Browser: https://github.com/MariaDB/server/
Vcs-Git: https://github.com/MariaDB/server.git
Package: libmariadbclient18 Package: libmariadbclient18
Architecture: any Architecture: any
@ -450,4 +450,4 @@ Package: mariadb-backup-10.1
Section: database Section: database
Architecture: any Architecture: any
Depends: libarchive12 | libarchive13 Depends: libarchive12 | libarchive13
Description: Backup tool for MariaDB server
Description: Backup tool for MariaDB server

51
mysql-test/r/func_date_add.result

@ -102,3 +102,54 @@ select * from t1 where case a when adddate( '2012-12-12', 7 ) then true end;
a a
drop table t1; drop table t1;
End of 5.5 tests End of 5.5 tests
#
# Start of 10.1 tests
#
#
# MDEV-14452 Precision in INTERVAL xxx DAY_MICROSECOND parsed wrong?
#
SELECT
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5' DAY_MICROSECOND) c1,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50' DAY_MICROSECOND) c2,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500' DAY_MICROSECOND) c3,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000' DAY_MICROSECOND) c4,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000' DAY_MICROSECOND) c5,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000' DAY_MICROSECOND) c6,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000' DAY_MICROSECOND) c7,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000' DAY_MICROSECOND) c8,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000' DAY_MICROSECOND) c9,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000' DAY_MICROSECOND) c10,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000' DAY_MICROSECOND) c11,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000' DAY_MICROSECOND) c12,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000' DAY_MICROSECOND) c13,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000' DAY_MICROSECOND) c14,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000000' DAY_MICROSECOND) c15,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000000' DAY_MICROSECOND) c16,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000000' DAY_MICROSECOND) c17,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000000000' DAY_MICROSECOND) c18,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000000000' DAY_MICROSECOND) c19,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000000000' DAY_MICROSECOND) c20
;
c1 1000-01-01 00:00:01.500000
c2 1000-01-01 00:00:01.500000
c3 1000-01-01 00:00:01.500000
c4 1000-01-01 00:00:01.500000
c5 1000-01-01 00:00:01.500000
c6 1000-01-01 00:00:01.500000
c7 1000-01-01 00:00:01.500000
c8 1000-01-01 00:00:01.500000
c9 1000-01-01 00:00:01.500000
c10 1000-01-01 00:00:01.500000
c11 1000-01-01 00:00:01.500000
c12 1000-01-01 00:00:01.500000
c13 1000-01-01 00:00:01.500000
c14 1000-01-01 00:00:01.500000
c15 1000-01-01 00:00:01.500000
c16 1000-01-01 00:00:01.500000
c17 1000-01-01 00:00:01.500000
c18 1000-01-01 00:00:01.500000
c19 1000-01-01 00:00:01.500000
c20 NULL
#
# End of 10.1 tests
#

24
mysql-test/r/func_time.result

@ -2904,6 +2904,30 @@ NULL
Warnings: Warnings:
Warning 1441 Datetime function: datetime field overflow Warning 1441 Datetime function: datetime field overflow
# #
# MDEV-13202 Assertion `ltime->neg == 0' failed in date_to_datetime
#
CREATE TABLE t1 (i INT, d DATE);
INSERT INTO t1 VALUES (1, '1970-01-01');
SELECT MAX(NULLIF(i,1)) FROM t1 ORDER BY DATE_SUB(d,INTERVAL 17300000 HOUR);
MAX(NULLIF(i,1))
NULL
Warnings:
Warning 1441 Datetime function: datetime field overflow
DROP TABLE t1;
CREATE TABLE t1 (i INT, d DATE);
INSERT INTO t1 VALUES (1, '1970-01-01');
SELECT CONCAT(DATE_SUB(d, INTERVAL 17300000 HOUR)) FROM t1;
CONCAT(DATE_SUB(d, INTERVAL 17300000 HOUR))
NULL
Warnings:
Warning 1441 Datetime function: datetime field overflow
DROP TABLE t1;
SELECT CONCAT(DATE_SUB(TIMESTAMP'1970-01-01 00:00:00', INTERVAL 17300000 HOUR));
CONCAT(DATE_SUB(TIMESTAMP'1970-01-01 00:00:00', INTERVAL 17300000 HOUR))
NULL
Warnings:
Warning 1441 Datetime function: datetime field overflow
#
# End of 10.0 tests # End of 10.0 tests
# #
# #

15
mysql-test/r/subselect_mat.result

@ -2757,6 +2757,21 @@ a b sq
4 2 1 4 2 1
drop table t1, t2; drop table t1, t2;
# #
# MDEV-15235: Assertion `length > 0' failed in create_ref_for_key
#
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (f CHAR(1));
INSERT INTO t2 VALUES ('a'),('b');
explain
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
f
DROP TABLE t1, t2;
#
# MDEV-9489: Assertion `0' failed in Protocol::end_statement() on # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
# UNION ALL # UNION ALL
# #

9
mysql-test/suite/galera/disabled.def

@ -9,11 +9,9 @@
# Do not use any TAB characters for whitespace. # Do not use any TAB characters for whitespace.
# #
############################################################################## ##############################################################################
MW-336 : MDEV-13549 Galera test failures
galera_gra_log : MDEV-13549 Galera test failures galera_gra_log : MDEV-13549 Galera test failures
galera_flush_local : MDEV-13549 Galera test failures galera_flush_local : MDEV-13549 Galera test failures
galera_flush : MDEV-13549 Galera test failures galera_flush : MDEV-13549 Galera test failures
MW-329 : MDEV-13549 Galera test failures
galera_account_management : MariaDB 10.0 does not support ALTER USER galera_account_management : MariaDB 10.0 does not support ALTER USER
galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
@ -34,7 +32,6 @@ galera_ist_mysqldump : MDEV-13549 Galera test failures
mysql-wsrep#31 : MDEV-13549 Galera test failures mysql-wsrep#31 : MDEV-13549 Galera test failures
galera_migrate : MariaDB 10.0 does not support START SLAVE USER galera_migrate : MariaDB 10.0 does not support START SLAVE USER
galera_concurrent_ctas : MDEV-13549 Galera test failures galera_concurrent_ctas : MDEV-13549 Galera test failures
galera_bf_abort_for_update : MDEV-13549 Galera test failures
galera_wsrep_desync_wsrep_on : MDEV-13549 Galera test failures galera_wsrep_desync_wsrep_on : MDEV-13549 Galera test failures
galera_ssl_upgrade : MDEV-13549 Galera test failures galera_ssl_upgrade : MDEV-13549 Galera test failures
mysql-wsrep#33 : MDEV-13549 Galera test failures mysql-wsrep#33 : MDEV-13549 Galera test failures
@ -47,16 +44,10 @@ lp1376747 : MDEV-13549 Galera test failures
galera_toi_ddl_nonconflicting : MDEV-13549 Galera test failures galera_toi_ddl_nonconflicting : MDEV-13549 Galera test failures
galera_parallel_simple : MDEV-13549 Galera test failures galera_parallel_simple : MDEV-13549 Galera test failures
galera_admin : MDEV-13549 Galera test failures galera_admin : MDEV-13549 Galera test failures
galera_var_max_ws_rows : MDEV-13549 Galera test failures 10.1
MW-286 : MDEV-13549 Galera test failures 10.1
galera_as_master: MDEV-13549 Galera test failures 10.1 galera_as_master: MDEV-13549 Galera test failures 10.1
galera_pc_ignore_sb : MDEV-13549 Galera test failures 10.1 galera_pc_ignore_sb : MDEV-13549 Galera test failures 10.1
galera_lock_table : MDEV-13549 Galera test failures 10.1 galera_lock_table : MDEV-13549 Galera test failures 10.1
MW-284 : MDEV-13549 Galera test failures 10.1 MW-284 : MDEV-13549 Galera test failures 10.1
MW-328C : MDEV-13549 Galera test failures 10.1
MW-328A : MDEV-13549 Galera test failures 10.1
MW-328B : MDEV-13549 Galera test failures 10.1
MW-328 : MDEV-13549 Galera test failures 10.1
galera_suspend_slave : MDEV-13549 Galera test failures 10.1 galera_suspend_slave : MDEV-13549 Galera test failures 10.1
galera_gtid : MDEV-13549 Galera test failures 10.1 galera_gtid : MDEV-13549 Galera test failures 10.1
galera_gtid_slave : MDEV-13549 Galera test failures 10.1 galera_gtid_slave : MDEV-13549 Galera test failures 10.1

9
mysql-test/suite/galera/r/MW-336.result

@ -3,13 +3,7 @@ SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1; SET GLOBAL wsrep_slave_threads = 1;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 10;
SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
COUNT(*) = 11
1
SET GLOBAL wsrep_slave_threads = 20; SET GLOBAL wsrep_slave_threads = 20;
SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
COUNT(*) = 21
1
SET GLOBAL wsrep_slave_threads = 1; SET GLOBAL wsrep_slave_threads = 1;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (2);
@ -35,8 +29,5 @@ INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18); INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19); INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20); INSERT INTO t1 VALUES (20);
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
COUNT(*) = 2
1
SET GLOBAL wsrep_slave_threads = 1; SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1; DROP TABLE t1;

23
mysql-test/suite/galera/r/galera_bf_abort_for_update.result

@ -1,10 +1,21 @@
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 10);
BEGIN;
SELECT * FROM t1 FOR UPDATE; SELECT * FROM t1 FOR UPDATE;
f1 f2
1 10
UPDATE t1 SET f1 = 2;
COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment
wsrep_local_bf_aborts_diff
1
BEGIN;
SELECT * FROM t1 FOR UPDATE;
f1 f2
2 10
UPDATE t1 SET f2 = 20;
COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_bf_aborts_diff
1 1
DROP TABLE t1; DROP TABLE t1;

1
mysql-test/suite/galera/t/MW-286.test

@ -25,7 +25,6 @@ SET wsrep_on = FALSE;
--error ER_QUERY_INTERRUPTED --error ER_QUERY_INTERRUPTED
ALTER TABLE t1 ADD PRIMARY KEY (f1); ALTER TABLE t1 ADD PRIMARY KEY (f1);
SET SESSION wsrep_sync_wait = 0;
SET wsrep_on = TRUE; SET wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE; SET GLOBAL wsrep_desync = FALSE;

19
mysql-test/suite/galera/t/MW-336.test

@ -10,20 +10,20 @@ CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
--connection node_1 --connection node_1
SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1; SET GLOBAL wsrep_slave_threads = 1;
--let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
--connection node_2 --connection node_2
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
--connection node_1 --connection node_1
--sleep 0.5
SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 10;
--sleep 0.5
SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 20; SET GLOBAL wsrep_slave_threads = 20;
--sleep 0.5
SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--let $wait_condition = SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 1; SET GLOBAL wsrep_slave_threads = 1;
@ -40,6 +40,9 @@ INSERT INTO t1 VALUES (9);
--connection node_1 --connection node_1
--let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 10; SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 0; SET GLOBAL wsrep_slave_threads = 0;
@ -57,8 +60,8 @@ INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20); INSERT INTO t1 VALUES (20);
--connection node_1 --connection node_1
--sleep 0.5
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 1; SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1; DROP TABLE t1;

45
mysql-test/suite/galera/t/galera_bf_abort_for_update.test

@ -5,25 +5,52 @@
# Test a local transaction being aborted by a slave one while it is running a SELECT FOR UPDATE # Test a local transaction being aborted by a slave one while it is running a SELECT FOR UPDATE
# #
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INT) ENGINE=InnoDB;
--connection node_2
--let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (1, 10);
# Test updating the PK
--connection node_1 --connection node_1
INSERT INTO t1 VALUES (1);
--let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'`
BEGIN;
SELECT * FROM t1 FOR UPDATE;
--connection node_2 --connection node_2
UPDATE t1 SET f1 = 2;
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--let $wait_condition = SELECT COUNT(*) FROM t1 WHERE f1 = 2
--source include/wait_condition.inc
--connection node_1
--error ER_LOCK_DEADLOCK --error ER_LOCK_DEADLOCK
COMMIT;
--disable_query_log
--eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'
--enable_query_log
# Test updating non-indexed column
--connection node_1
--let $wsrep_local_bf_aborts_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'`
BEGIN;
SELECT * FROM t1 FOR UPDATE; SELECT * FROM t1 FOR UPDATE;
--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
--connection node_2
UPDATE t1 SET f2 = 20;
--connection node_1a
--let $wait_condition = SELECT COUNT(*) FROM t1 WHERE f2 = 20
--source include/wait_condition.inc
--connection node_1
--error ER_LOCK_DEADLOCK
COMMIT;
--disable_query_log --disable_query_log
--eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment;
--eval SELECT variable_value - $wsrep_local_bf_aborts_before AS wsrep_local_bf_aborts_diff FROM information_schema.global_status WHERE variable_name = 'wsrep_local_bf_aborts'
--enable_query_log --enable_query_log
DROP TABLE t1; DROP TABLE t1;

23
mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result

@ -0,0 +1,23 @@
include/master-slave.inc
[connection master]
call mtr.add_suppression("Timeout waiting for reply of binlog");
SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
SET @@GLOBAL.rpl_semi_sync_master_timeout=100;
include/stop_slave.inc
SET @@GLOBAL.replicate_events_marked_for_skip=FILTER_ON_MASTER;
SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1;
include/start_slave.inc
CREATE TABLE t1 (a INT) ENGINE=innodb;
SET @@GLOBAL.debug_dbug= "d,dbug_master_binlog_over_2GB";
SET @@SESSION.skip_replication=1;
INSERT INTO t1 SET a=1;
SET @@SESSION.skip_replication=0;
INSERT INTO t1 SET a=0;
SET @@GLOBAL.debug_dbug="";
SET @@GLOBAL. rpl_semi_sync_master_timeout = 10000;
SET @@GLOBAL. rpl_semi_sync_master_enabled = 0;
DROP TABLE t1;
include/stop_slave.inc
SET @@GLOBAL. rpl_semi_sync_slave_enabled = 0;
SET @@GLOBAL.replicate_events_marked_for_skip = REPLICATE;
include/rpl_end.inc

62
mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test

@ -0,0 +1,62 @@
# MDEV-14721 Big transaction events get lost on semisync master when
# replicate_events_marked_for_skip=FILTER_ON_MASTER
#
# When events of a big transaction are binlogged offsetting over 2GB from
# the beginning of the log the semisync master's dump thread
# lost such events.
# The test verifies the fixes' correctness simulating the 2GB offset.
source include/have_semisync.inc;
source include/not_embedded.inc;
source include/have_innodb.inc;
source include/have_debug.inc;
source include/master-slave.inc;
--connection master
# Suppress warnings that might be generated during the test
call mtr.add_suppression("Timeout waiting for reply of binlog");
--let $sav_enabled_master=`SELECT @@GLOBAL.rpl_semi_sync_master_enabled `
--let $sav_timeout_master=`SELECT @@GLOBAL.rpl_semi_sync_master_timeout `
SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
SET @@GLOBAL.rpl_semi_sync_master_timeout=100;
--connection slave
source include/stop_slave.inc;
--let $sav_skip_marked_slave=`SELECT @@GLOBAL.replicate_events_marked_for_skip `
SET @@GLOBAL.replicate_events_marked_for_skip=FILTER_ON_MASTER;
--let $sav_enabled_slave=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled `
SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1;
source include/start_slave.inc;
--connection master
CREATE TABLE t1 (a INT) ENGINE=innodb;
# Make the following events as if they offset over 2GB from the beginning of binlog
SET @@GLOBAL.debug_dbug= "d,dbug_master_binlog_over_2GB";
SET @@SESSION.skip_replication=1;
INSERT INTO t1 SET a=1;
SET @@SESSION.skip_replication=0;
INSERT INTO t1 SET a=0;
--sync_slave_with_master
#
# Clean up
#
--connection master
SET @@GLOBAL.debug_dbug="";
--eval SET @@GLOBAL. rpl_semi_sync_master_timeout = $sav_timeout_master
--eval SET @@GLOBAL. rpl_semi_sync_master_enabled = $sav_enabled_master
--connection master
DROP TABLE t1;
--sync_slave_with_master
source include/stop_slave.inc;
--eval SET @@GLOBAL. rpl_semi_sync_slave_enabled = $sav_enabled_slave
--eval SET @@GLOBAL.replicate_events_marked_for_skip = $sav_skip_marked_slave
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc

37
mysql-test/t/func_date_add.test

@ -100,3 +100,40 @@ drop table t1;
--echo End of 5.5 tests --echo End of 5.5 tests
--echo #
--echo # Start of 10.1 tests
--echo #
--echo #
--echo # MDEV-14452 Precision in INTERVAL xxx DAY_MICROSECOND parsed wrong?
--echo #
--vertical_results
SELECT
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5' DAY_MICROSECOND) c1,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50' DAY_MICROSECOND) c2,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500' DAY_MICROSECOND) c3,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000' DAY_MICROSECOND) c4,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000' DAY_MICROSECOND) c5,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000' DAY_MICROSECOND) c6,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000' DAY_MICROSECOND) c7,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000' DAY_MICROSECOND) c8,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000' DAY_MICROSECOND) c9,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000' DAY_MICROSECOND) c10,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000' DAY_MICROSECOND) c11,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000' DAY_MICROSECOND) c12,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000' DAY_MICROSECOND) c13,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000' DAY_MICROSECOND) c14,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000000' DAY_MICROSECOND) c15,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000000' DAY_MICROSECOND) c16,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000000' DAY_MICROSECOND) c17,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.500000000000000000' DAY_MICROSECOND) c18,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.5000000000000000000' DAY_MICROSECOND) c19,
DATE_ADD('1000-01-01 00:00:00', INTERVAL '0 00:00:01.50000000000000000000' DAY_MICROSECOND) c20
;
--horizontal_results
--echo #
--echo # End of 10.1 tests
--echo #

16
mysql-test/t/func_time.test

@ -1762,6 +1762,22 @@ SELECT ADDDATE(DATE'0000-01-01', INTERVAL '3652423:0:0:315569433559' DAY_SECOND)
SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:87658175:0:315569433559' DAY_SECOND); SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:87658175:0:315569433559' DAY_SECOND);
SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:0:5259490559:315569433599' DAY_SECOND); SELECT ADDDATE(DATE'0000-01-01', INTERVAL '0:0:5259490559:315569433599' DAY_SECOND);
--echo #
--echo # MDEV-13202 Assertion `ltime->neg == 0' failed in date_to_datetime
--echo #
CREATE TABLE t1 (i INT, d DATE);
INSERT INTO t1 VALUES (1, '1970-01-01');
SELECT MAX(NULLIF(i,1)) FROM t1 ORDER BY DATE_SUB(d,INTERVAL 17300000 HOUR);
DROP TABLE t1;
CREATE TABLE t1 (i INT, d DATE);
INSERT INTO t1 VALUES (1, '1970-01-01');
SELECT CONCAT(DATE_SUB(d, INTERVAL 17300000 HOUR)) FROM t1;
DROP TABLE t1;
SELECT CONCAT(DATE_SUB(TIMESTAMP'1970-01-01 00:00:00', INTERVAL 17300000 HOUR));
--echo # --echo #
--echo # End of 10.0 tests --echo # End of 10.0 tests

13
mysql-test/t/subselect_mat.test

@ -255,6 +255,19 @@ FROM t1;
drop table t1, t2; drop table t1, t2;
--echo #
--echo # MDEV-15235: Assertion `length > 0' failed in create_ref_for_key
--echo #
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (f CHAR(1));
INSERT INTO t2 VALUES ('a'),('b');
explain
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
SELECT * FROM t2 WHERE f IN ( SELECT LEFT('foo',0) FROM t1 ORDER BY 1 );
DROP TABLE t1, t2;
--echo # --echo #
--echo # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on --echo # MDEV-9489: Assertion `0' failed in Protocol::end_statement() on
--echo # UNION ALL --echo # UNION ALL

39
sql/handler.cc

@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. /* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2009, 2016, MariaDB
Copyright (c) 2009, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -794,7 +794,9 @@ static my_bool closecon_handlerton(THD *thd, plugin_ref plugin,
*/ */
void ha_close_connection(THD* thd) void ha_close_connection(THD* thd)
{ {
plugin_foreach(thd, closecon_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, 0);
plugin_foreach_with_mask(thd, closecon_handlerton,
MYSQL_STORAGE_ENGINE_PLUGIN,
PLUGIN_IS_DELETED|PLUGIN_IS_READY, 0);
} }
static my_bool kill_handlerton(THD *thd, plugin_ref plugin, static my_bool kill_handlerton(THD *thd, plugin_ref plugin,
@ -5769,8 +5771,6 @@ static int write_locked_table_maps(THD *thd)
typedef bool Log_func(THD*, TABLE*, bool, const uchar*, const uchar*); typedef bool Log_func(THD*, TABLE*, bool, const uchar*, const uchar*);
static int check_wsrep_max_ws_rows();
static int binlog_log_row(TABLE* table, static int binlog_log_row(TABLE* table,
const uchar *before_record, const uchar *before_record,
const uchar *after_record, const uchar *after_record,
@ -5824,13 +5824,6 @@ static int binlog_log_row(TABLE* table,
bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE || bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
table->file->has_transactions(); table->file->has_transactions();
error= (*log_func)(thd, table, has_trans, before_record, after_record); error= (*log_func)(thd, table, has_trans, before_record, after_record);
/*
Now that the record has been logged, increment wsrep_affected_rows and
also check whether its within the allowable limits (wsrep_max_ws_rows).
*/
if (error == 0)
error= check_wsrep_max_ws_rows();
} }
} }
return error ? HA_ERR_RBR_LOGGING_FAILED : 0; return error ? HA_ERR_RBR_LOGGING_FAILED : 0;
@ -5941,30 +5934,6 @@ int handler::ha_reset()
} }
static int check_wsrep_max_ws_rows()
{
#ifdef WITH_WSREP
if (wsrep_max_ws_rows)
{
THD *thd= current_thd;
if (!WSREP(thd))
return 0;
thd->wsrep_affected_rows++;
if (thd->wsrep_exec_mode != REPL_RECV &&
thd->wsrep_affected_rows > wsrep_max_ws_rows)
{
trans_rollback_stmt(thd) || trans_rollback(thd);
my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0));
return ER_ERROR_DURING_COMMIT;
}
}
#endif /* WITH_WSREP */
return 0;
}
int handler::ha_write_row(uchar *buf) int handler::ha_write_row(uchar *buf)
{ {
int error; int error;

14
sql/item_timefunc.cc

@ -702,7 +702,7 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs,
{ {
const char *end=str+length; const char *end=str+length;
uint i; uint i;
long msec_length= 0;
long field_length= 0;
while (str != end && !my_isdigit(cs,*str)) while (str != end && !my_isdigit(cs,*str))
str++; str++;
@ -713,7 +713,8 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs,
const char *start= str; const char *start= str;
for (value= 0; str != end && my_isdigit(cs, *str); str++) for (value= 0; str != end && my_isdigit(cs, *str); str++)
value= value*10 + *str - '0'; value= value*10 + *str - '0';
msec_length= 6 - (str - start);
if ((field_length= str - start) >= 20)
return true;
values[i]= value; values[i]= value;
while (str != end && !my_isdigit(cs,*str)) while (str != end && !my_isdigit(cs,*str))
str++; str++;
@ -728,8 +729,13 @@ static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs,
} }
} }
if (transform_msec && msec_length > 0)
values[count - 1] *= (long) log_10_int[msec_length];
if (transform_msec && field_length > 0)
{
if (field_length < 6)
values[count - 1] *= log_10_int[6 - field_length];
else if (field_length > 6)
values[count - 1] /= log_10_int[field_length - 6];
}
return (str != end); return (str != end);
} }

2
sql/log_event.cc

@ -1311,6 +1311,8 @@ bool Log_event::write_header(ulong event_data_length)
*/ */
log_pos= writer->pos() + data_written; log_pos= writer->pos() + data_written;
DBUG_EXECUTE_IF("dbug_master_binlog_over_2GB", log_pos += (1ULL <<31););
} }
now= get_time(); // Query start time now= get_time(); // Query start time

4
sql/opt_subselect.cc

@ -875,8 +875,10 @@ bool subquery_types_allow_materialization(Item_in_subselect *in_subs)
Make sure that create_tmp_table will not fail due to too long keys. Make sure that create_tmp_table will not fail due to too long keys.
See MDEV-7122. This check is performed inside create_tmp_table also and See MDEV-7122. This check is performed inside create_tmp_table also and
we must do it so that we know the table has keys created. we must do it so that we know the table has keys created.
Make sure that the length of the key for the temp_table is atleast
greater than 0.
*/ */
if (total_key_length > tmp_table_max_key_length() ||
if (!total_key_length || total_key_length > tmp_table_max_key_length() ||
elements > tmp_table_max_key_parts()) elements > tmp_table_max_key_parts())
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);

6
sql/sql_parse.cc

@ -7193,7 +7193,6 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
thd->wsrep_conflict_state == CERT_FAILURE) thd->wsrep_conflict_state == CERT_FAILURE)
{ {
thd->reset_for_next_command(); thd->reset_for_next_command();
thd->reset_killed();
if (is_autocommit && if (is_autocommit &&
thd->lex->sql_command != SQLCOM_SELECT && thd->lex->sql_command != SQLCOM_SELECT &&
(thd->wsrep_retry_counter < thd->variables.wsrep_retry_autocommit)) (thd->wsrep_retry_counter < thd->variables.wsrep_retry_autocommit))
@ -7221,17 +7220,18 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
thd->thread_id, is_autocommit, thd->wsrep_retry_counter, thd->thread_id, is_autocommit, thd->wsrep_retry_counter,
thd->variables.wsrep_retry_autocommit, thd->query()); thd->variables.wsrep_retry_autocommit, thd->query());
my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction"); my_error(ER_LOCK_DEADLOCK, MYF(0), "wsrep aborted transaction");
thd->reset_killed();
thd->wsrep_conflict_state= NO_CONFLICT; thd->wsrep_conflict_state= NO_CONFLICT;
if (thd->wsrep_conflict_state != REPLAYING) if (thd->wsrep_conflict_state != REPLAYING)
thd->wsrep_retry_counter= 0; // reset thd->wsrep_retry_counter= 0; // reset
} }
mysql_mutex_unlock(&thd->LOCK_wsrep_thd);
thd->reset_killed();
} }
else else
{ {
set_if_smaller(thd->wsrep_retry_counter, 0); // reset; eventually ok set_if_smaller(thd->wsrep_retry_counter, 0); // reset; eventually ok
mysql_mutex_unlock(&thd->LOCK_wsrep_thd);
} }
mysql_mutex_unlock(&thd->LOCK_wsrep_thd);
} }
/* If retry is requested clean up explain structure */ /* If retry is requested clean up explain structure */

7
sql/sql_repl.cc

@ -1904,11 +1904,8 @@ send_event_to_slave(binlog_send_info *info, Log_event_type event_type,
*/ */
if (info->thd->variables.option_bits & OPTION_SKIP_REPLICATION) if (info->thd->variables.option_bits & OPTION_SKIP_REPLICATION)
{ {
/*
The first byte of the packet is a '\0' to distinguish it from an error
packet. So the actual event starts at offset +1.
*/
uint16 event_flags= uint2korr(&((*packet)[FLAGS_OFFSET+1]));
uint16 event_flags= uint2korr(&((*packet)[FLAGS_OFFSET + ev_offset]));
if (event_flags & LOG_EVENT_SKIP_REPLICATION_F) if (event_flags & LOG_EVENT_SKIP_REPLICATION_F)
return NULL; return NULL;
} }

2
sql/sql_time.cc

@ -959,6 +959,8 @@ bool date_add_interval(MYSQL_TIME *ltime, interval_type int_type,
ltime->day= 0; ltime->day= 0;
return 0; return 0;
} }
else if (ltime->neg)
goto invalid_date;
if (int_type != INTERVAL_DAY) if (int_type != INTERVAL_DAY)
ltime->time_type= MYSQL_TIMESTAMP_DATETIME; // Return full date ltime->time_type= MYSQL_TIMESTAMP_DATETIME; // Return full date

2
sql/wsrep_mysqld.cc

@ -2336,7 +2336,7 @@ extern "C" void wsrep_thd_set_query_state(
void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state) void wsrep_thd_set_conflict_state(THD *thd, enum wsrep_conflict_state state)
{ {
thd->wsrep_conflict_state= state;
if (WSREP(thd)) thd->wsrep_conflict_state= state;
} }

23
storage/innobase/fts/fts0fts.cc

@ -1,7 +1,7 @@
/***************************************************************************** /*****************************************************************************
Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 2017, MariaDB Corporation.
Copyright (c) 2016, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
@ -4628,6 +4628,7 @@ begin_sync:
ib_vector_get(cache->indexes, i)); ib_vector_get(cache->indexes, i));
if (index_cache->index->to_be_dropped if (index_cache->index->to_be_dropped
|| index_cache->index->table->to_be_dropped
|| fts_sync_index_check(index_cache)) { || fts_sync_index_check(index_cache)) {
continue; continue;
} }
@ -4638,17 +4639,6 @@ begin_sync:
end_sync: end_sync:
if (error == DB_SUCCESS && !sync->interrupted) { if (error == DB_SUCCESS && !sync->interrupted) {
error = fts_sync_commit(sync); error = fts_sync_commit(sync);
if (error == DB_SUCCESS) {
for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache;
index_cache = static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i));
if (index_cache->index->index_fts_syncing) {
index_cache->index->index_fts_syncing
= false;
}
}
}
} else { } else {
fts_sync_rollback(sync); fts_sync_rollback(sync);
} }
@ -4657,12 +4647,9 @@ end_sync:
/* Clear fts syncing flags of any indexes incase sync is /* Clear fts syncing flags of any indexes incase sync is
interrupeted */ interrupeted */
for (i = 0; i < ib_vector_size(cache->indexes); ++i) { for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache;
index_cache = static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i));
if (index_cache->index->index_fts_syncing == true) {
index_cache->index->index_fts_syncing = false;
}
static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i))
->index->index_fts_syncing = false;
} }
sync->interrupted = false; sync->interrupted = false;

10
storage/innobase/srv/srv0srv.cc

@ -421,16 +421,6 @@ static ulint srv_n_system_rows_read_old = 0;
UNIV_INTERN ulint srv_truncated_status_writes = 0; UNIV_INTERN ulint srv_truncated_status_writes = 0;
UNIV_INTERN ulint srv_available_undo_logs = 0; UNIV_INTERN ulint srv_available_undo_logs = 0;
UNIV_INTERN ib_uint64_t srv_page_compression_saved = 0;
UNIV_INTERN ib_uint64_t srv_page_compression_trim_sect512 = 0;
UNIV_INTERN ib_uint64_t srv_page_compression_trim_sect4096 = 0;
UNIV_INTERN ib_uint64_t srv_index_pages_written = 0;
UNIV_INTERN ib_uint64_t srv_non_index_pages_written = 0;
UNIV_INTERN ib_uint64_t srv_pages_page_compressed = 0;
UNIV_INTERN ib_uint64_t srv_page_compressed_trim_op = 0;
UNIV_INTERN ib_uint64_t srv_page_compressed_trim_op_saved = 0;
UNIV_INTERN ib_uint64_t srv_index_page_decompressed = 0;
/* Defragmentation */ /* Defragmentation */
UNIV_INTERN my_bool srv_defragment = FALSE; UNIV_INTERN my_bool srv_defragment = FALSE;
UNIV_INTERN uint srv_defragment_n_pages = 7; UNIV_INTERN uint srv_defragment_n_pages = 7;

23
storage/xtradb/fts/fts0fts.cc

@ -1,7 +1,7 @@
/***************************************************************************** /*****************************************************************************
Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2011, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 2017, MariaDB Corporation.
Copyright (c) 2016, 2018, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
@ -4627,6 +4627,7 @@ begin_sync:
ib_vector_get(cache->indexes, i)); ib_vector_get(cache->indexes, i));
if (index_cache->index->to_be_dropped if (index_cache->index->to_be_dropped
|| index_cache->index->table->to_be_dropped
|| fts_sync_index_check(index_cache)) { || fts_sync_index_check(index_cache)) {
continue; continue;
} }
@ -4637,17 +4638,6 @@ begin_sync:
end_sync: end_sync:
if (error == DB_SUCCESS && !sync->interrupted) { if (error == DB_SUCCESS && !sync->interrupted) {
error = fts_sync_commit(sync); error = fts_sync_commit(sync);
if (error == DB_SUCCESS) {
for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache;
index_cache = static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i));
if (index_cache->index->index_fts_syncing) {
index_cache->index->index_fts_syncing
= false;
}
}
}
} else { } else {
fts_sync_rollback(sync); fts_sync_rollback(sync);
} }
@ -4656,12 +4646,9 @@ end_sync:
/* Clear fts syncing flags of any indexes incase sync is /* Clear fts syncing flags of any indexes incase sync is
interrupeted */ interrupeted */
for (i = 0; i < ib_vector_size(cache->indexes); ++i) { for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache;
index_cache = static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i));
if (index_cache->index->index_fts_syncing == true) {
index_cache->index->index_fts_syncing = false;
}
static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i))
->index->index_fts_syncing = false;
} }
sync->interrupted = false; sync->interrupted = false;

10
storage/xtradb/srv/srv0srv.cc

@ -565,16 +565,6 @@ static ulint srv_n_system_rows_read_old = 0;
UNIV_INTERN ulint srv_truncated_status_writes = 0; UNIV_INTERN ulint srv_truncated_status_writes = 0;
UNIV_INTERN ulint srv_available_undo_logs = 0; UNIV_INTERN ulint srv_available_undo_logs = 0;
UNIV_INTERN ib_uint64_t srv_page_compression_saved = 0;
UNIV_INTERN ib_uint64_t srv_page_compression_trim_sect512 = 0;
UNIV_INTERN ib_uint64_t srv_page_compression_trim_sect4096 = 0;
UNIV_INTERN ib_uint64_t srv_index_pages_written = 0;
UNIV_INTERN ib_uint64_t srv_non_index_pages_written = 0;
UNIV_INTERN ib_uint64_t srv_pages_page_compressed = 0;
UNIV_INTERN ib_uint64_t srv_page_compressed_trim_op = 0;
UNIV_INTERN ib_uint64_t srv_page_compressed_trim_op_saved = 0;
UNIV_INTERN ib_uint64_t srv_index_page_decompressed = 0;
/* Ensure status variables are on separate cache lines */ /* Ensure status variables are on separate cache lines */
#ifdef __powerpc__ #ifdef __powerpc__

Loading…
Cancel
Save