1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge bb-10.2-ext into 10.3

This commit is contained in:
Marko Mäkelä
2017-09-25 22:05:56 +03:00
140 changed files with 858 additions and 323 deletions

1
.gitignore vendored
View File

@ -69,6 +69,7 @@ include/sql_state.h
include/probes_mysql.d include/probes_mysql.d
include/probes_mysql_dtrace.h include/probes_mysql_dtrace.h
include/probes_mysql_nodtrace.h include/probes_mysql_nodtrace.h
include/source_revision.h
info_macros.cmake info_macros.cmake
libmysql*/libmysql*_exports_file.cc libmysql*/libmysql*_exports_file.cc
libmysql*/merge_archives_mysql*.cmake libmysql*/merge_archives_mysql*.cmake

View File

@ -115,12 +115,14 @@ FOREACH(_base
ENDIF() ENDIF()
ENDFOREACH() ENDFOREACH()
FOREACH(tool gtar tar git) FOREACH(tool gtar tar)
STRING(TOUPPER ${tool} TOOL) STRING(TOUPPER ${tool} TOOL)
FIND_PROGRAM(${TOOL}_EXECUTABLE ${tool} DOC "path to the executable") FIND_PROGRAM(${TOOL}_EXECUTABLE ${tool} DOC "path to the executable")
MARK_AS_ADVANCED(${TOOL}_EXECUTABLE) MARK_AS_ADVANCED(${TOOL}_EXECUTABLE)
ENDFOREACH() ENDFOREACH()
FIND_PACKAGE(Git)
# Following autotools tradition, add preprocessor definitions # Following autotools tradition, add preprocessor definitions
# specified in environment variable CPPFLAGS # specified in environment variable CPPFLAGS
IF(DEFINED ENV{CPPFLAGS}) IF(DEFINED ENV{CPPFLAGS})
@ -443,7 +445,6 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
${CMAKE_BINARY_DIR}/sql/sql_builtin.cc) ${CMAKE_BINARY_DIR}/sql/sql_builtin.cc)
FIND_PACKAGE(Git)
IF(GIT_EXECUTABLE) IF(GIT_EXECUTABLE)
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD COMMAND ${GIT_EXECUTABLE} rev-parse HEAD

View File

@ -17,7 +17,7 @@ see the Credits appendix. You can also run 'SHOW authors' to get a
list of active contributors. list of active contributors.
A description of the MariaDB project and a manual can be found at: 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/
https://mariadb.com/kb/en/mariadb-vs-mysql-features/ https://mariadb.com/kb/en/mariadb-vs-mysql-features/
https://mariadb.com/kb/en/mariadb-versus-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 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: The code for MariaDB, including all revision history, can be found at:
https://github.com/MariaDB/server https://github.com/MariaDB/server

View File

View File

@ -13,11 +13,10 @@
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # 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) MACRO(CHECK_SYSTEMD)
IF(UNIX) 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") SET(WITH_SYSTEMD "auto" CACHE STRING "Enable systemd scripts and notification support")
IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto") IF(WITH_SYSTEMD STREQUAL "yes" OR WITH_SYSTEMD STREQUAL "auto")
IF(PKG_CONFIG_FOUND) IF(PKG_CONFIG_FOUND)

View File

@ -18,8 +18,8 @@
# and replication is started from it. # and replication is started from it.
# #
--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--connection slave --connection slave
# Make sure the slave is stopped while we are messing with master. # Make sure the slave is stopped while we are messing with master.

View File

@ -7,9 +7,9 @@
# WL2540 replication events checksum # WL2540 replication events checksum
# Testing configuration parameters # Testing configuration parameters
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_binlog_format_mixed.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('Slave can not handle replication events with the checksum that master is configured to log');
call mtr.add_suppression('Replication event checksum verification failed'); call mtr.add_suppression('Replication event checksum verification failed');

View File

@ -35,8 +35,8 @@
# Configuring the Environment # Configuring the Environment
###################################################################### ######################################################################
source include/have_debug.inc; source include/have_debug.inc;
source include/master-slave.inc;
source include/have_log_bin.inc; source include/have_log_bin.inc;
source include/master-slave.inc;
connection slave; connection slave;

View File

@ -11,8 +11,8 @@
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and # 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) # 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/have_innodb.inc;
source include/master-slave.inc;
--disable_query_log --disable_query_log
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -15,8 +15,9 @@
# BUG#55322: SHOW BINLOG EVENTS increases @@SESSION.MAX_ALLOWED_PACKET # BUG#55322: SHOW BINLOG EVENTS increases @@SESSION.MAX_ALLOWED_PACKET
# max-out size db name # max-out size db name
source include/master-slave.inc;
source include/have_binlog_format_row.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("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"); 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_____________________; let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;

View File

@ -16,8 +16,8 @@
# so if it is needed, it should be set explicitly before each call. # so if it is needed, it should be set explicitly before each call.
# #
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
connection slave; connection slave;
# Test that SUPER is required to change @@replicate_events_marked_for_skip. # Test that SUPER is required to change @@replicate_events_marked_for_skip.

View File

@ -25,8 +25,8 @@
# IO thread does not do it in an uncontrolled manner. # IO thread does not do it in an uncontrolled manner.
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--disable_query_log --disable_query_log
CREATE TABLE t1 (c1 TEXT) engine=InnoDB; CREATE TABLE t1 (c1 TEXT) engine=InnoDB;

View File

@ -32,12 +32,12 @@
# Configuring the environment # Configuring the environment
######################################################################################## ########################################################################################
--echo =====Configuring the enviroment=======; --echo =====Configuring the enviroment=======;
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_valgrind.inc --source include/not_valgrind.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/not_crashrep.inc --source include/not_crashrep.inc
--source include/master-slave.inc
call mtr.add_suppression('Attempting backtrace'); call mtr.add_suppression('Attempting backtrace');
call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001"); call mtr.add_suppression("Recovery from master pos .* and file master-bin.000001");

View File

@ -1525,12 +1525,12 @@ ANALYZE
"key_length": "5", "key_length": "5",
"used_key_parts": ["a"], "used_key_parts": ["a"],
"ref": ["test.t3.a"], "ref": ["test.t3.a"],
"r_loops": 0, "r_loops": 1,
"rows": 1, "rows": 1,
"r_rows": null, "r_rows": 10,
"r_total_time_ms": "REPLACED", "r_total_time_ms": "REPLACED",
"filtered": 100, "filtered": 100,
"r_filtered": null, "r_filtered": 100,
"index_condition_bka": "t4.b + 1 <= t3.b + 1" "index_condition_bka": "t4.b + 1 <= t3.b + 1"
}, },
"buffer_type": "flat", "buffer_type": "flat",

View File

@ -745,3 +745,9 @@ f1 f2
drop view v1; drop view v1;
drop table t1; drop table t1;
SET @@sql_mode= @save_mode; 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 22007: Truncated incorrect DOUBLE value: 'foo'
DROP VIEW v1;
DROP TABLE t1;

View File

@ -229,15 +229,80 @@ SET lc_time_names=@old_50915_lc_time_names;
# End of 10.1 tests # End of 10.1 tests
# #
create view v1 as select 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) as b,
format(123456789,2,'rm_CH') as b1; format(123456789,2,'rm_CH') as b1;
select * from v1; select * from v1;
b b1 a a1 b b1
123,456,789.00 123'456'789,00 10 Oct October 10 Окт Октября 123,456,789.00 123'456'789,00
show create view v1; show create view v1;
View Create View character_set_client collation_connection 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; drop view v1;
# #
# End of 10.2 tests # 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

View File

@ -2569,6 +2569,14 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 optimize status OK test.t1 optimize status OK
DROP TABLE t1; 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'; show variables like 'myisam_block_size';
Variable_name Value Variable_name Value
myisam_block_size 1024 myisam_block_size 1024

View File

@ -127,3 +127,56 @@ Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'b' at row 1 Warning 1264 Out of range value for column 'b' at row 1
DROP TABLE t1; DROP TABLE t1;
SET @@global.mysql56_temporal_format=DEFAULT; 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);
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;
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;

View File

@ -2,9 +2,9 @@
--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog --echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
--echo # --echo #
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/master-slave.inc
--disable_warnings --disable_warnings
CREATE SCHEMA IF NOT EXISTS mysqlslap; CREATE SCHEMA IF NOT EXISTS mysqlslap;

View File

@ -167,7 +167,8 @@ ROLLBACK;
connection con1; connection con1;
KILL QUERY @id; KILL QUERY @id;
ERROR 70100: Query execution was interrupted 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; ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
# session default # session default
connection default; connection default;
@ -180,6 +181,10 @@ ddl_online_create_index 1
ddl_pending_alter_table 1 ddl_pending_alter_table 1
ddl_sort_file_alter_table 0 ddl_sort_file_alter_table 0
ddl_log_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; KILL QUERY @id;
SET DEBUG_SYNC = 'now SIGNAL kill_done'; SET DEBUG_SYNC = 'now SIGNAL kill_done';
# session con1 # session con1
@ -227,6 +232,7 @@ t1 CREATE TABLE `t1` (
`c3` char(255) NOT NULL, `c3` char(255) NOT NULL,
PRIMARY KEY (`c1`) PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT ) 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 DEBUG_SYNC = 'row_log_table_apply1_before SIGNAL rebuilt2 WAIT_FOR dml2_done';
SET lock_wait_timeout = 10; SET lock_wait_timeout = 10;
ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE; ALTER TABLE t1 ROW_FORMAT=COMPACT, ALGORITHM = INPLACE;

View File

@ -1,6 +1,9 @@
# #
# Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS # 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 Test_1 :- Check if DDL operations are possible on
table being truncated. Also check if table being truncated. Also check if
DDL operations on other tables succeed. DDL operations on other tables succeed.
@ -81,6 +84,5 @@ connection con2;
disconnect con2; disconnect con2;
connection default; connection default;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
SET session lock_wait_timeout=default; SET GLOBAL innodb_adaptive_hash_index=@ahi;
set global innodb_adaptive_hash_index=on;
drop table t1,t2,t3; drop table t1,t2,t3;

View File

@ -1,5 +1,6 @@
--source include/innodb_page_size_small.inc --source include/innodb_page_size_small.inc
--source include/innodb_encrypt_log.inc --source include/innodb_encrypt_log.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
let $innodb_metrics_select= let $innodb_metrics_select=

View File

@ -158,7 +158,8 @@ let $ID= `SELECT @id := CONNECTION_ID()`;
--error ER_QUERY_INTERRUPTED --error ER_QUERY_INTERRUPTED
KILL QUERY @id; 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 --send
ALTER TABLE t1 ROW_FORMAT=REDUNDANT; ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
@ -166,6 +167,10 @@ ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
connection default; connection default;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt'; SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
eval $innodb_metrics_select; 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`; let $ignore= `SELECT @id := $ID`;
KILL QUERY @id; KILL QUERY @id;
SET DEBUG_SYNC = 'now SIGNAL kill_done'; SET DEBUG_SYNC = 'now SIGNAL kill_done';
@ -201,6 +206,7 @@ WHERE variable_name = 'innodb_encryption_n_rowlog_blocks_encrypted');
--echo # session con1 --echo # session con1
connection con1; connection con1;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
ALTER TABLE t1 ROW_FORMAT=REDUNDANT;
# Exceed the configured innodb_online_alter_log_max_size. # Exceed the configured innodb_online_alter_log_max_size.
# The actual limit is a multiple of innodb_sort_buf_size, # The actual limit is a multiple of innodb_sort_buf_size,

View File

@ -8,6 +8,12 @@
--echo # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS --echo # Bug #23070734 CONCURRENT TRUNCATE TABLES CAUSE STALLS
--echo # --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 Test_1 :- Check if DDL operations are possible on
--echo table being truncated. Also check if --echo table being truncated. Also check if
--echo DDL operations on other tables succeed. --echo DDL operations on other tables succeed.
@ -115,8 +121,7 @@ disconnect con2;
connection default; connection default;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
SET session lock_wait_timeout=default; SET GLOBAL innodb_adaptive_hash_index=@ahi;
set global innodb_adaptive_hash_index=on;
drop table t1,t2,t3; drop table t1,t2,t3;
--source include/wait_until_count_sessions.inc --source include/wait_until_count_sessions.inc

View File

@ -2790,3 +2790,11 @@ test.t1 check status OK
SET aria_repair_threads=@@global.aria_repair_threads; SET aria_repair_threads=@@global.aria_repair_threads;
SET aria_sort_buffer_size=@@global.aria_sort_buffer_size; SET aria_sort_buffer_size=@@global.aria_sort_buffer_size;
DROP TABLE t1; 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;

View File

@ -2018,6 +2018,19 @@ SET aria_repair_threads=@@global.aria_repair_threads;
SET aria_sort_buffer_size=@@global.aria_sort_buffer_size; SET aria_sort_buffer_size=@@global.aria_sort_buffer_size;
DROP TABLE t1; 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 # End of test
# #

View File

@ -1,7 +1,7 @@
--source include/have_partition.inc --source include/have_partition.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/big_test.inc --source include/big_test.inc
--source include/master-slave.inc
--vertical_results --vertical_results

View File

@ -1,5 +1,5 @@
--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--enable_connect_log --enable_connect_log

View File

@ -0,0 +1,32 @@
include/master-slave.inc
[connection master]
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);
connection slave;
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;
connection master;
drop table t1;
set global time_zone=default;
set global mysql56_temporal_format=default;
include/rpl_end.inc

View File

@ -1,5 +1,5 @@
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--enable_connect_log --enable_connect_log
--connection master --connection master

View File

@ -5,9 +5,9 @@
# is replication unsafe. # is replication unsafe.
# #
source include/master-slave.inc;
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/have_innodb.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.'); call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');

View File

@ -1,6 +1,6 @@
source include/master-slave.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
source include/master-slave.inc;
connection slave; connection slave;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -15,8 +15,8 @@
# primary key lookup), and index/key with multiple matches (forcing an # primary key lookup), and index/key with multiple matches (forcing an
# index search). # index search).
source include/master-slave.inc;
source include/have_blackhole.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"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -17,9 +17,9 @@
# log, the error is ignored and only the non-transactional tables are changed. # 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_innodb.inc
--source include/have_binlog_format_statement.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("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -8,8 +8,8 @@
# will be binlogged as # will be binlogged as
# 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'. # 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'.
############################################################################### ###############################################################################
source include/master-slave.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
source include/master-slave.inc;
CREATE TABLE t1(c1 INT); CREATE TABLE t1(c1 INT);
source include/show_binlog_events.inc; source include/show_binlog_events.inc;

View File

@ -16,8 +16,8 @@
# along the way if error/no error is thrown and/or if replication starts # along the way if error/no error is thrown and/or if replication starts
# working when expected. # working when expected.
--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
connection slave; connection slave;
STOP SLAVE; STOP SLAVE;

View File

@ -2,8 +2,8 @@
# Purpose: To test having extra columns on the master WL#3915 # Purpose: To test having extra columns on the master WL#3915
############################################################# #############################################################
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/master-slave.inc
let $engine_type = 'InnoDB'; let $engine_type = 'InnoDB';
--source extra/rpl_tests/rpl_extra_col_master.test --source extra/rpl_tests/rpl_extra_col_master.test

View File

@ -4,8 +4,8 @@
# works fine. # works fine.
# #
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
connection master; connection master;
# Test 'flush error logs' statement. # Test 'flush error logs' statement.

View File

@ -1,5 +1,5 @@
source include/master-slave.inc;
source include/have_binlog_format_row.inc; source include/have_binlog_format_row.inc;
source include/master-slave.inc;
# #
# Bug#48776, Bug#43784 # Bug#48776, Bug#43784

View File

@ -8,9 +8,9 @@
# Finish the following tests by calling its common test script: # Finish the following tests by calling its common test script:
# extra/rpl_tests/rpl_get_master_version_and_clock.test. # extra/rpl_tests/rpl_get_master_version_and_clock.test.
source include/master-slave.inc;
source include/have_debug.inc; source include/have_debug.inc;
source include/have_debug_sync.inc; source include/have_debug_sync.inc;
source include/master-slave.inc;
# #
# The test is not supposed to have any binglog affairs. # The test is not supposed to have any binglog affairs.

View File

@ -1,7 +1,7 @@
# Tests of grants and users # Tests of grants and users
source include/master-slave.inc;
source include/not_embedded.inc; source include/not_embedded.inc;
source include/master-slave.inc;
connection master; connection master;

View File

@ -1,6 +1,6 @@
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
--connection slave --connection slave
--source include/stop_slave.inc --source include/stop_slave.inc

View File

@ -1,7 +1,7 @@
# Testing master to slave heartbeat protocol, test cases that need debug build. # Testing master to slave heartbeat protocol, test cases that need debug build.
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
connection slave; connection slave;
--source include/stop_slave.inc --source include/stop_slave.inc

View File

@ -1,6 +1,6 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/have_binlog_format_row.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 # Bug#68220: innodb_rows_updated is misleading on slave when *info_repository=TABLE

View File

@ -2,9 +2,9 @@
--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog --echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
--echo # --echo #
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/master-slave.inc
disable_query_log; disable_query_log;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -5,8 +5,8 @@
# Features for Replication. # Features for Replication.
######################################### #########################################
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
disable_query_log; disable_query_log;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -4,8 +4,8 @@
# if the path of the load data file is a symbolic link. # if the path of the load data file is a symbolic link.
# #
--source include/not_windows.inc --source include/not_windows.inc
--source include/master-slave.inc
--source include/have_binlog_format_statement.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) ); 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; load data infile '../../std_data/rpl_loaddata.dat' into table t1;

View File

@ -1,8 +1,8 @@
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
connection master; connection master;

View File

@ -1,8 +1,8 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_binlog_format_row.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"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -1,5 +1,5 @@
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--connection slave --connection slave

View File

@ -1,8 +1,8 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source extra/rpl_tests/rpl_binlog_max_cache_size.test --source extra/rpl_tests/rpl_binlog_max_cache_size.test
--source include/rpl_end.inc --source include/rpl_end.inc

View File

@ -3,8 +3,8 @@
################################################################################ ################################################################################
--source include/have_udf.inc --source include/have_udf.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--let $engine=Innodb --let $engine=Innodb
set session storage_engine=innodb; set session storage_engine=innodb;

View File

@ -3,8 +3,8 @@
# tables. For further details, please, read WL#2687 and WL#5072. # tables. For further details, please, read WL#2687 and WL#5072.
################################################################################### ###################################################################################
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
let $engine_type=Innodb; let $engine_type=Innodb;
let $database_name=test; let $database_name=test;

View File

@ -3,8 +3,8 @@
# tables. For further details, please, read WL#2687 and WL#5072. # tables. For further details, please, read WL#2687 and WL#5072.
################################################################################### ###################################################################################
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--disable_query_log --disable_query_log
SET SESSION binlog_direct_non_transactional_updates = OFF; SET SESSION binlog_direct_non_transactional_updates = OFF;

View File

@ -11,9 +11,9 @@
# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) # 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures)
# #
################################################################################# #################################################################################
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
let $engine=Innodb; let $engine=Innodb;
--source extra/rpl_tests/rpl_not_null.test --source extra/rpl_tests/rpl_not_null.test

View File

@ -11,8 +11,8 @@
# 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures) # 3 - NULL --> NOT NULL ( sql-mode != STRICT and no failures)
# #
################################################################################# #################################################################################
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
let $engine=MyISAM; let $engine=MyISAM;
--source extra/rpl_tests/rpl_not_null.test --source extra/rpl_tests/rpl_not_null.test

View File

@ -1,6 +1,6 @@
--source include/master-slave.inc
--source include/have_perfschema.inc --source include/have_perfschema.inc
--source include/have_binlog_format_mixed.inc --source include/have_binlog_format_mixed.inc
--source include/master-slave.inc
UPDATE performance_schema.setup_instruments SET ENABLED="NO"; UPDATE performance_schema.setup_instruments SET ENABLED="NO";

View File

@ -1,6 +1,6 @@
# Test case for BUG #11733 # Test case for BUG #11733
-- source include/master-slave.inc
-- source include/have_innodb.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"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -17,8 +17,8 @@
# case on doing SHOW SLAVE HOSTS on the master, we get the actual port number # case on doing SHOW SLAVE HOSTS on the master, we get the actual port number
# of the slave (ie. SLAVE_PORT). # of the slave (ie. SLAVE_PORT).
source include/master-slave.inc;
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/master-slave.inc;
connection master; connection master;

View File

@ -1,8 +1,8 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source extra/rpl_tests/rpl_binlog_max_cache_size.test --source extra/rpl_tests/rpl_binlog_max_cache_size.test
--source include/rpl_end.inc --source include/rpl_end.inc

View File

@ -6,8 +6,8 @@
# having columns that are smaller (shorter) than the slave. # # having columns that are smaller (shorter) than the slave. #
################################################################## ##################################################################
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;

View File

@ -1,7 +1,7 @@
# #
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
# BUG#11753004: 44360: REPLICATION FAILED # BUG#11753004: 44360: REPLICATION FAILED

View File

@ -1,8 +1,8 @@
# Testing table creations for row-based replication. # Testing table creations for row-based replication.
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
connection slave; connection slave;
--source include/have_innodb.inc --source include/have_innodb.inc
connection master; connection master;

View File

@ -16,8 +16,8 @@
# has been fixed. # has been fixed.
# #
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
# #
# Case #1: master has key, but slave has not. # Case #1: master has key, but slave has not.

View File

@ -3,8 +3,8 @@
################################################################################ ################################################################################
--source include/have_udf.inc --source include/have_udf.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--let $engine=Innodb --let $engine=Innodb
set session storage_engine=innodb; set session storage_engine=innodb;

View File

@ -1,7 +1,7 @@
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
# Bug#58997: Row-based replication breaks on table with only fulltext index: # Bug#58997: Row-based replication breaks on table with only fulltext index:
connection master; connection master;

View File

@ -12,8 +12,8 @@
# deletes their contents through the merge table. Finally, the slave # deletes their contents through the merge table. Finally, the slave
# is synchronized with the master and (after the fix) it won't crash. # 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/have_binlog_format_row.inc
--source include/master-slave.inc
--connection master --connection master
CREATE TABLE t1 (a int) ENGINE=MyISAM; CREATE TABLE t1 (a int) ENGINE=MyISAM;

View File

@ -1,6 +1,6 @@
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/master-slave.inc
# #
# BUG#52868 Wrong handling of NULL value during update, replication out of sync # BUG#52868 Wrong handling of NULL value during update, replication out of sync

View File

@ -12,8 +12,8 @@
# This test issues SHOW [BINLOG|RELAYLOG] EVENTS both on master and slave after # This test issues SHOW [BINLOG|RELAYLOG] EVENTS both on master and slave after
# some statements have been issued. # some statements have been issued.
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
-- source extra/rpl_tests/rpl_show_relaylog_events.inc -- source extra/rpl_tests/rpl_show_relaylog_events.inc
--source include/rpl_end.inc --source include/rpl_end.inc

View File

@ -26,9 +26,9 @@
# with mysqlbinlog reporting that it was unable to succeed in # with mysqlbinlog reporting that it was unable to succeed in
# reading the event. # reading the event.
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
-- disable_warnings -- disable_warnings
DROP TABLE IF EXISTS `t1`; DROP TABLE IF EXISTS `t1`;

View File

@ -6,8 +6,8 @@
# table was binlogged in RBR. # table was binlogged in RBR.
# #
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/master-slave.inc
#This statement is not binlogged in RBR. #This statement is not binlogged in RBR.
CREATE TEMPORARY TABLE t1(c1 INTEGER); CREATE TEMPORARY TABLE t1(c1 INTEGER);

View File

@ -1,6 +1,6 @@
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/have_utf16.inc -- source include/have_utf16.inc
-- source include/master-slave.inc
# #
# BUG#51716: Char column with utf16 character set gives wrong padding on slave # BUG#51716: Char column with utf16 character set gives wrong padding on slave

View File

@ -8,8 +8,8 @@
# in corrupt binlog # in corrupt binlog
################################################################## ##################################################################
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc -- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t300; DROP TABLE IF EXISTS t300;

View File

@ -1,5 +1,5 @@
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--echo # --echo #
--echo # Bug#50124 Rpl failure on DROP table with concurrent txn/non-txn --echo # Bug#50124 Rpl failure on DROP table with concurrent txn/non-txn

View File

@ -17,8 +17,8 @@
# b. nullifying the list and resuming of taking binlog from the very beginning with # b. nullifying the list and resuming of taking binlog from the very beginning with
# executing events this time # executing events this time
source include/master-slave.inc;
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/master-slave.inc;
connection slave; connection slave;

View File

@ -1,6 +1,6 @@
-- source include/have_binlog_format_mixed_or_row.inc -- source include/have_binlog_format_mixed_or_row.inc
-- source include/master-slave.inc
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/master-slave.inc
-- let $engine= InnoDB -- let $engine= InnoDB
-- source extra/rpl_tests/rpl_set_null.test -- source extra/rpl_tests/rpl_set_null.test

View File

@ -23,8 +23,8 @@
# bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic: # 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 # 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/have_innodb.inc;
source include/master-slave.inc;
--echo ==== Test Without sql_mode=strict_trans_tables ==== --echo ==== Test Without sql_mode=strict_trans_tables ====

View File

@ -1,5 +1,5 @@
--source include/master-slave.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
connection master; connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE; SET GLOBAL BINLOG_CHECKSUM=NONE;

View File

@ -20,9 +20,9 @@
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_var_link.inc --source include/not_var_link.inc
--source include/master-slave.inc
########################################################################## ##########################################################################
# Loading data # Loading data

View File

@ -4,8 +4,8 @@
# test for MIXED mode. # test for MIXED mode.
source include/have_binlog_format_mixed.inc; source include/have_binlog_format_mixed.inc;
source include/master-slave.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
connection slave; connection slave;
source include/have_innodb.inc; source include/have_innodb.inc;

View File

@ -25,8 +25,8 @@
# Note that due to the sleep() command the insert is written to the binary # Note that due to the sleep() command the insert is written to the binary
# log in row format. # log in row format.
source include/master-slave.inc;
source include/have_binlog_format_statement.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("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"); 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");

View File

@ -1,8 +1,8 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/not_windows.inc --source include/not_windows.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source extra/rpl_tests/rpl_binlog_max_cache_size.test --source extra/rpl_tests/rpl_binlog_max_cache_size.test
--source include/rpl_end.inc --source include/rpl_end.inc

View File

@ -5,8 +5,8 @@
################################################################################### ###################################################################################
--source include/big_test.inc --source include/big_test.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--source extra/rpl_tests/rpl_drop_create_temp_table.test --source extra/rpl_tests/rpl_drop_create_temp_table.test
--source include/rpl_end.inc --source include/rpl_end.inc

View File

@ -3,8 +3,8 @@
################################################################################ ################################################################################
--source include/have_udf.inc --source include/have_udf.inc
--source include/have_binlog_format_statement.inc --source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--let $engine=Innodb --let $engine=Innodb
set session storage_engine=innodb; set session storage_engine=innodb;

View File

@ -12,8 +12,8 @@
########## ##########
# Includes # Includes
-- source include/master-slave.inc
-- source include/have_binlog_format_statement.inc -- source include/have_binlog_format_statement.inc
-- source include/master-slave.inc
disable_query_log; disable_query_log;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

View File

@ -1,9 +1,9 @@
################################################################################ ################################################################################
# Please, check ./extra/rpl_tests/rpl_start_stop_slave.test # 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_binlog_format_statement.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
# make innodb updates run fast # make innodb updates run fast
--connection slave --connection slave

View File

@ -2,8 +2,8 @@
# BUG#49562: SBR out of sync when using numeric data types + user variable # 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/have_binlog_format_statement.inc
-- source include/master-slave.inc
## Setup user variables for several numeric types, so that we get ## Setup user variables for several numeric types, so that we get
## coverage on the User_var_log_event different val types ## coverage on the User_var_log_event different val types

View File

@ -9,9 +9,9 @@
# 4: sync to slave and check the number of temp tables on slave. # 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_binlog_format_mixed.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
--echo ==== Initialize ==== --echo ==== Initialize ====

View File

@ -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;

View File

@ -1,6 +1,6 @@
source include/have_binlog_format_row.inc; source include/have_binlog_format_row.inc;
source include/master-slave.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
source include/master-slave.inc;
call mtr.add_suppression("Deadlock found"); call mtr.add_suppression("Deadlock found");
call mtr.add_suppression("Can't find record in 't.'"); call mtr.add_suppression("Can't find record in 't.'");

View File

@ -1,5 +1,5 @@
source include/master-slave.inc;
source include/have_binlog_format_statement.inc; source include/have_binlog_format_statement.inc;
source include/master-slave.inc;
call mtr.add_suppression("Unsafe statement written to the binary log"); call mtr.add_suppression("Unsafe statement written to the binary log");

View File

@ -247,3 +247,5 @@ ERROR HY000: Expression in the GENERATED ALWAYS AS clause is too big
# Constant expression # Constant expression
create or replace table t1 (a int as (PI()) PERSISTENT); create or replace table t1 (a int as (PI()) PERSISTENT);
drop table if exists t1; 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`

View File

@ -2894,6 +2894,21 @@ a b
2012-12-12 Wednesday Wed December Dec 2012-12-12 Wednesday Wed December Dec
drop table t1; drop table t1;
set sql_warnings = 0; 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() # CURRENT_USER()
set sql_warnings = 1; set sql_warnings = 1;
create table t1 (a char, b varchar(32) as (current_user())); create table t1 (a char, b varchar(32) as (current_user()));

View File

@ -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); create or replace table t1 (a int as (PI()) PERSISTENT);
drop table if exists t1; 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);

View File

@ -1197,6 +1197,12 @@ let $values1 = '2012-12-12',default;
let $rows = 1; let $rows = 1;
--source suite/vcol/inc/vcol_supported_sql_funcs.inc --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() --echo # CURRENT_USER()
let $cols = a char, b varchar(32) as (current_user()); let $cols = a char, b varchar(32) as (current_user());
let $values1 = 'a', default; let $values1 = 'a', default;

View File

@ -3,9 +3,9 @@
# #
--source include/have_debug.inc --source include/have_debug.inc
--source include/master-slave.inc
--source include/have_binlog_format_row.inc --source include/have_binlog_format_row.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/master-slave.inc
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;

View File

@ -602,3 +602,13 @@ remove_file $MYSQLD_DATADIR/test/t1.txt;
drop view v1; drop view v1;
drop table t1; drop table t1;
SET @@sql_mode= @save_mode; 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_TRUNCATED_WRONG_VALUE
REPLACE INTO v1 SET f = NULL;
DROP VIEW v1;
DROP TABLE t1;

View File

@ -144,6 +144,8 @@ SET lc_time_names=@old_50915_lc_time_names;
# Item::print # Item::print
create view v1 as select 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) as b,
format(123456789,2,'rm_CH') as b1; format(123456789,2,'rm_CH') as b1;
select * from v1; select * from v1;
@ -153,3 +155,29 @@ drop view v1;
--echo # --echo #
--echo # End of 10.2 tests --echo # End of 10.2 tests
--echo # --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');

View File

@ -1769,6 +1769,19 @@ ALTER TABLE t1 DISABLE KEYS;
OPTIMIZE TABLE t1; OPTIMIZE TABLE t1;
DROP 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 # Check some variables
# #

View File

@ -83,3 +83,39 @@ SELECT TO_DAYS(a), TO_DAYS(b) FROM t1;
DROP TABLE t1; DROP TABLE t1;
SET @@global.mysql56_temporal_format=DEFAULT; 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);
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;
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;

Some files were not shown because too many files have changed in this diff Show More