Commit e9c1701e authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.3 into 10.4

parents 17794fb9 f3eb82f0
......@@ -22,6 +22,9 @@ ENDIF()
IF(POLICY CMP0054)
CMAKE_POLICY(SET CMP0054 NEW)
ENDIF()
IF(POLICY CMP0075)
CMAKE_POLICY(SET CMP0075 NEW)
ENDIF()
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
......
......@@ -1546,6 +1546,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
{
my_fwrite(result_file, (const uchar *) tmp_str.str, tmp_str.length,
MYF(MY_NABP));
fflush(result_file);
my_free(tmp_str.str);
}
}
......
......@@ -45,17 +45,8 @@ SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_PACKAGE_RELOCATABLE FALSE)
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY})
SET(CPACK_RPM_PACKAGE_URL ${CPACK_PACKAGE_URL})
SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_RPM_PACKAGE_SUMMARY}
It is GPL v2 licensed, which means you can use the it free of charge under the
conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
MariaDB documentation can be found at https://mariadb.com/kb
MariaDB bug reports should be submitted through https://jira.mariadb.org
")
SET(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
SET(CPACK_RPM_shared_PACKAGE_VENDOR "MariaDB Corporation Ab")
SET(CPACK_RPM_shared_PACKAGE_LICENSE "LGPLv2.1")
......
......@@ -11,3 +11,9 @@ ELSE()
SET(__msg1_${id} ${hash} CACHE INTERNAL "")
ENDFUNCTION()
ENDIF()
MACRO(SET_IF_UNSET VAR VAL)
IF(NOT DEFINED ${VAR})
SET(${VAR} ${VAL})
ENDIF()
ENDMACRO()
......@@ -75,24 +75,27 @@ string(TOUPPER ${SERVER_MATURITY} SERVER_MATURITY)
SET(SERVER_MATURITY_LEVEL MariaDB_PLUGIN_MATURITY_${SERVER_MATURITY})
SET(MYSQL_TCP_PORT_DEFAULT 0)
IF(NOT MYSQL_TCP_PORT)
SET(MYSQL_TCP_PORT 3306)
ENDIF()
SET_IF_UNSET(MYSQL_TCP_PORT 3306)
IF(NOT COMPILATION_COMMENT)
SET(COMPILATION_COMMENT "Source distribution")
ENDIF()
SET_IF_UNSET(COMPILATION_COMMENT "Source distribution")
INCLUDE(package_name)
IF(NOT CPACK_PACKAGE_FILE_NAME)
GET_PACKAGE_FILE_NAME(CPACK_PACKAGE_FILE_NAME)
ENDIF()
IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}")
ENDIF()
SET(CPACK_PACKAGE_CONTACT "MariaDB Developers <maria-developers@lists.launchpad.net>")
SET(CPACK_PACKAGE_VENDOR "MariaDB Foundation")
SET_IF_UNSET(CPACK_SOURCE_PACKAGE_FILE_NAME "mariadb-${VERSION}")
SET_IF_UNSET(CPACK_PACKAGE_CONTACT "MariaDB Developers <maria-developers@lists.launchpad.net>")
SET_IF_UNSET(CPACK_PACKAGE_VENDOR "MariaDB Foundation")
SET_IF_UNSET(CPACK_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}
It is GPL v2 licensed, which means you can use the it free of charge under the
conditions of the GNU General Public License Version 2 (http://www.gnu.org/licenses/).
MariaDB documentation can be found at https://mariadb.com/kb
MariaDB bug reports should be submitted through https://jira.mariadb.org
")
SET(CPACK_SOURCE_GENERATOR "TGZ")
# Definitions for windows version resources
......
......@@ -28,13 +28,9 @@ MACRO(CHECK_SYSTEMD)
ENDIF()
ENDIF()
IF(HAVE_DLOPEN)
SET(LIBSYSTEMD ${LIBSYSTEMD_LIBRARIES})
#SET(CMAKE_REQUIRED_FLAGS ${LIBSYSTEMD_CFLAGS})
SET(MYSQLD_LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${LIBSYSTEMD_LDFLAGS}")
SET(LIBSYSTEMD ${LIBSYSTEMD_LDFLAGS} ${LIBSYSTEMD_LIBRARIES})
ELSE()
SET(LIBSYSTEMD ${LIBSYSTEMD_STATIC_LIBRARIES})
#SET(CMAKE_REQUIRED_FLAGS ${LIBSYSTEMD_STATIC_CFLAGS})
SET(MYSQLD_LINK_FLAGS "${MYSQLD_LINK_FLAGS} ${LIBSYSTEMD_STATIC_LDFLAGS}")
SET(LIBSYSTEMD ${LIBSYSTEMD_STATIC_LDFLAGS} ${LIBSYSTEMD_STATIC_LIBRARIES})
ENDIF()
ELSE()
SET(LIBSYSTEMD systemd)
......
......@@ -234,7 +234,7 @@ Description: MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
Package: mariadb-client-core-10.4
Architecture: any
Depends: mariadb-common (>= ${source:Version}),
Depends: mariadb-common (>= ${source:Version}), libmariadb3,
${misc:Depends},
${shlibs:Depends}
Conflicts: mariadb-client-10.0,
......
Subproject commit c098613d289ed88fc53286e98add28ae9f2d8b46
Subproject commit 5fa9c4615e71b696b84b4c77aefa197466526a13
......@@ -49,9 +49,16 @@ connection default;
# We need to wait for the implicit DROP TEMPORARY TABLE to be logged after
# tmp_con disconnect, otherwise we get sporadic test failures.
# MDEV-20091: DROP TEMPORARY TABLE IF EXISTS statements will be written to
# binlog only if the corresponding temporary table exists. In row based
# replication temporary tables are not replicated hence their corresponding
# DROP TEMPORARY TABLE statement will be not be written to binary log upon
# session closure.
if (!`SELECT @@BINLOG_FORMAT = 'ROW'`) {
--let $wait_condition= SELECT variable_value > $before_drop_pos FROM information_schema.global_status WHERE variable_name = 'binlog_snapshot_position'
--source include/wait_condition.inc
}
--let $binlog_pos2=query_get_value(SHOW MASTER STATUS, Position, 1)
--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
......
# ==== Purpose ====
#
# Tell mtr that all servers must be restarted after the test has
# finished.
#
# ==== Usage ====
#
# --source include/force_restart.inc
#
--let $_force_restart_datadir= `SELECT @@datadir`
--append_file $_force_restart_datadir/mtr/force_restart
1
EOF
#
# suite.pm will make sure that all tests including this file
# will be skipped as needed
#
# include/wait_condition_with_debug.inc
#
# SUMMARY
#
# Waits until the passed statement returns true, or the operation
# times out. If the operation times out, the additional error
# statement will be executed.
#
# USAGE
#
# let $wait_condition=
# SELECT c = 3 FROM t;
# let $wait_condition_on_error_output= select count(*) from t;
# [let $explicit_default_wait_timeout= N] # to override the default reset
# --source include/wait_condition_with_debug.inc
#
# OR
#
# let $wait_timeout= 60; # Override default 30 seconds with 60.
# let $wait_condition=
# SELECT c = 3 FROM t;
# let $wait_condition_on_error_output= select count(*) from t;
# --source include/wait_condition_with_debug.inc
# --echo Executed the test condition $wait_condition_reps times
#
#
# EXAMPLE
# events_bugs.test, events_time_zone.test
#
let $wait_counter= 300;
if ($wait_timeout)
{
let $wait_counter= `SELECT $wait_timeout * 10`;
}
# Reset $wait_timeout so that its value won't be used on subsequent
# calls, and default will be used instead.
if ($explicit_default_wait_timeout)
{
--let $wait_timeout= $explicit_default_wait_timeout
}
if (!$explicit_default_wait_timeout)
{
--let $wait_timeout= 0
}
# Keep track of how many times the wait condition is tested
# This is used by some tests (e.g., main.status)
let $wait_condition_reps= 0;
while ($wait_counter)
{
--error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR,ER_LOCK_DEADLOCK
let $success= `$wait_condition`;
inc $wait_condition_reps;
if ($success)
{
let $wait_counter= 0;
}
if (!$success)
{
real_sleep 0.1;
dec $wait_counter;
}
}
if (!$success)
{
echo Timeout in wait_condition.inc for $wait_condition;
--eval $wait_condition_on_error_output
}
......@@ -338,6 +338,13 @@ sub new {
# Skip comment
next;
}
# Correctly process Replication Filter when they are defined
# with connection name.
elsif ( $line =~ /^([\w]+.[\w]+)\s*=\s*(.*)\s*/){
my $option= $1;
my $value= $2;
$self->insert($group_name, $option, $value);
}
else {
croak "Unexpected line '$line' found in '$path'";
}
......
......@@ -2752,6 +2752,25 @@ DROP USER dummy@localhost;
# End of 10.2 tests
#
#
# Start of 10.3 tests
#
#
# MDEV-19948 'show grants' return privileges individually
#
CREATE USER ten2;
GRANT ALL ON *.* TO ten2;
SHOW GRANTS FOR ten2;
Grants for ten2@%
GRANT ALL PRIVILEGES ON *.* TO 'ten2'@'%'
FLUSH PRIVILEGES;
SHOW GRANTS FOR ten2;
Grants for ten2@%
GRANT ALL PRIVILEGES ON *.* TO 'ten2'@'%'
DROP USER ten2;
#
# End of 10.3 tests
#
#
# MDEV-17932 : Assertion upon double RENAME USER
#
CREATE USER foo@localhost;
......
......@@ -2247,6 +2247,35 @@ DROP USER dummy@localhost;
--echo # End of 10.2 tests
--echo #
--echo #
--echo # Start of 10.3 tests
--echo #
--echo #
--echo # MDEV-19948 'show grants' return privileges individually
--echo #
# Let's cheat server that we are using `10.2` user table
# which doesn't have `Delete_history_priv` column
source include/switch_to_mysql_user.inc;
CREATE USER ten2;
GRANT ALL ON *.* TO ten2;
# Without any patching, this should show a lot of privileges,
# but without delete history. With patch it is showing `all privileges`
SHOW GRANTS FOR ten2;
FLUSH PRIVILEGES;
# Now should show `all privileges` with/without patch
SHOW GRANTS FOR ten2;
DROP USER ten2;
source include/switch_to_mysql_global_priv.inc;
--echo #
--echo # End of 10.3 tests
--echo #
--echo #
--echo # MDEV-17932 : Assertion upon double RENAME USER
--echo #
......
Windows bug: happens when a new line is exactly at the right offset.
Windows bug: new line disappears when it is exactly at the right offset.
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
......
......@@ -42,7 +42,7 @@ perl;
$re2=join('|', @plugins);
$skip=0;
open(F, '<', "$ENV{MYSQL_TMP_DIR}/mysqld--help.txt") or die;
print "Windows bug: happens when a new line is exactly at the right offset.\n";
print "Windows bug: new line disappears when it is exactly at the right offset.\n";
while (<F>) {
next if 1../The following groups are read/;
# formatting, skip line consisting entirely of dashes and blanks
......
create table t1 (a int) engine=myisam data directory='MYSQL_TMP_DIR';
insert t1 values (1);
# Some systems fail with errcode 40, when doing openat, while others
# don't have openat and fail with errcode 20.
# Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
# while others don't have openat and fail with errcode 20.
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair error 20 for record at pos 0
......
......@@ -9,9 +9,9 @@
eval create table t1 (a int) engine=myisam data directory='$MYSQL_TMP_DIR';
insert t1 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t1.TMD
--echo # Some systems fail with errcode 40, when doing openat, while others
--echo # don't have openat and fail with errcode 20.
--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /40/20/ /".*"/"<errmsg>"/
--echo # Some systems fail with errcode 40, or 90 (MIPS) when doing openat,
--echo # while others don't have openat and fail with errcode 20.
--replace_regex / '.*\/t1/ 'MYSQL_TMP_DIR\/t1/ /[49]0/20/ /".*"/"<errmsg>"/
repair table t1;
drop table t1;
......@@ -19,7 +19,7 @@ drop table t1;
eval create table t2 (a int) engine=aria data directory='$MYSQL_TMP_DIR';
insert t2 values (1);
--system ln -s $MYSQL_TMP_DIR/foobar5543 $MYSQL_TMP_DIR/t2.TMD
--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /40/20/ /".*"/"<errmsg>"/
--replace_regex / '.*\/t2/ 'MYSQL_TMP_DIR\/t2/ /[49]0/20/ /".*"/"<errmsg>"/
repair table t2;
drop table t2;
......
......@@ -8307,6 +8307,20 @@ UNION
SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;
#
# MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
# Assertion `field_handlers == 0 || field_pos < field_count'
#
CREATE TABLE t1 (ct time);
INSERT INTO t1 VALUES ('16:11:28');
CREATE FUNCTION f1 () RETURNS varchar(100)
BEGIN
DECLARE xxx varchar(100);
ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
RETURN xxx;
END|
ERROR 0A000: Not allowed to return a result set from a function
drop table t1;
#End of 10.1 tests
#
# MDEV-11081: CURSOR for query with GROUP BY
......
......@@ -9823,6 +9823,26 @@ SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.PARAMETERS;
DROP FUNCTION f;
DROP VIEW v;
--echo #
--echo # MDEV-17963: Assertion `field_pos < field_count' failed in Protocol_text::store,
--echo # Assertion `field_handlers == 0 || field_pos < field_count'
--echo #
CREATE TABLE t1 (ct time);
INSERT INTO t1 VALUES ('16:11:28');
DELIMITER |;
--error ER_SP_NO_RETSET
CREATE FUNCTION f1 () RETURNS varchar(100)
BEGIN
DECLARE xxx varchar(100);
ANALYZE SELECT sum(ct) FROM t1 INTO xxx ;
RETURN xxx;
END|
DELIMITER ;|
drop table t1;
--echo #End of 10.1 tests
--echo #
......
......@@ -1146,6 +1146,16 @@ a
00:01:00
DROP TABLE t1;
#
# MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
#
CREATE TABLE t1 (i INT, d DATETIME);
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
ExtractValue('foo','bar') i MIN(d)
NULL 1981-09-24 01:04:47
3 1976-12-14 13:21:07
DROP TABLE t1;
#
# End of 10.1 tests
#
#
......
......@@ -700,6 +700,16 @@ SELECT 1 FROM t1 WHERE 20160101 > SOME (SELECT CAST(a AS DATETIME) FROM t1);
SELECT * FROM t1 WHERE 20160101 > CAST(a AS DATETIME);
DROP TABLE t1;
--echo #
--echo # MDEV-17857 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY
--echo #
CREATE TABLE t1 (i INT, d DATETIME);
INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
DROP TABLE t1;
--echo #
--echo # End of 10.1 tests
--echo #
......
......@@ -1008,6 +1008,8 @@ sub run_test_server ($$$) {
next if (defined $t->{reserved} and $t->{reserved} != $wid);
if (! defined $t->{reserved})
{
# Force-restart not relevant when comparing *next* test
$t->{criteria} =~ s/force-restart$/no-restart/;
my $criteria= $t->{criteria};
# Reserve similar tests for this worker, but not too many
my $maxres= (@$tests - $i) / $opt_parallel + 1;
......@@ -2046,7 +2048,10 @@ sub collect_mysqld_features {
if (/Copyright/ .. /^-{30,}/) {
# here we want to detect all not mandatory plugins
# they are listed in the --help output as
# --archive[=name] Enable or disable ARCHIVE plugin. Possible values are ON, OFF, FORCE (don't start if the plugin fails to load).
# --archive[=name]
# Enable or disable ARCHIVE plugin. Possible values are ON, OFF,
# FORCE (don't start if the plugin fails to load),
# FORCE_PLUS_PERMANENT (like FORCE, but the plugin can not be uninstalled).
push @optional_plugins, $1
if /^ --([-a-z0-9]+)\[=name\] +Enable or disable \w+ plugin. One of: ON, OFF, FORCE/;
next;
......@@ -3899,6 +3904,25 @@ sub find_analyze_request
return $analyze;
}
# The test can leave a file in var/tmp/ to signal
# that all servers should be restarted
sub restart_forced_by_test($)
{
my $file = shift;
my $restart = 0;
foreach my $mysqld ( mysqlds() )
{
my $datadir = $mysqld->value('datadir');
my $force_restart_file = "$datadir/mtr/$file";
if ( -f $force_restart_file )
{
mtr_verbose("Restart of servers forced by test");
$restart = 1;
last;
}
}
return $restart;
}
# Return timezone value of tinfo or default value
sub timezone {
......@@ -4259,8 +4283,12 @@ sub run_testcase ($$) {
if ( $res == 0 )
{
my $check_res;
if ( $opt_check_testcases and
$check_res= check_testcase($tinfo, "after"))
if ( restart_forced_by_test('force_restart') )
{
stop_all_servers($opt_shutdown_timeout);
}
elsif ( $opt_check_testcases and
$check_res= check_testcase($tinfo, "after"))
{
if ($check_res == 1) {
# Test case had sideeffects, not fatal error, just continue
......@@ -4295,7 +4323,8 @@ sub run_testcase ($$) {
find_testcase_skipped_reason($tinfo);
mtr_report_test_skipped($tinfo);
# Restart if skipped due to missing perl, it may have had side effects
if ( $tinfo->{'comment'} =~ /^perl not found/ )
if ( restart_forced_by_test('force_restart_if_skipped') ||
$tinfo->{'comment'} =~ /^perl not found/ )
{
stop_all_servers($opt_shutdown_timeout);
}
......@@ -5447,6 +5476,11 @@ sub server_need_restart {
return 0;
}
if ( $tinfo->{'force_restart'} ) {
mtr_verbose_restart($server, "forced in .opt file");
return 1;
}
if ( $opt_force_restart ) {
mtr_verbose_restart($server, "forced restart turned on");
return 1;
......@@ -6541,6 +6575,7 @@ Misc options
servers to exit before finishing the process
fast Run as fast as possible, don't wait for servers
to shutdown etc.
force-restart Always restart servers between tests
parallel=N Run tests in N parallel threads (default 1)
Use parallel=auto for auto-setting of N
repeat=N Run each test N number of times
......
-----BEGIN CERTIFICATE-----
MIIDWTCCAkGgAwIBAgIJAIlW4JmZGnU4MA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwIBcNMTQxMDI0MDc1MTU1WhgPMzAxNDAyMjQwNzUxNTVaMEIx
CzAJBgNVBAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
ZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQDDzU6xLZDD5rZENsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2Qa
MyTkvyjzf7bSFsDt9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BW
B3lcoKXXJgMnWw0WGrt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5
kdcIbDRVw81J4eAZ6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrM
mhOeL8kuQV0fI8v2xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWX
Qo98swTu7mb89qVYmR71d3L3AgMBAAGjUDBOMB0GA1UdDgQWBBRdWet/kGNTyvXK
wuBdP/eSldOgWjAfBgNVHSMEGDAWgBRdWet/kGNTyvXKwuBdP/eSldOgWjAMBgNV
HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCcJpP+DR4AJxVelNTSZa+V38c+
jgrMD2Ku2eU8NQlsjgMfNEU5Md/g7FpP8aCFzVf0kAAT7DxZmSE3uWXQbMXyVJmy
bF+qXinf71QzdWULm6sASoshC6wbHnXL9ZjWQ3gh1nqVgo3MmLQYrb3eJfKaaLoc
wpjhYxVxGFOx1ITN3jED64lUfoLHvR6NFbESYKAuAAzSNqX4HOQ3uGk2THM8JocZ
oH2+38d81Kd4HQ7DDDKS/isG0+rR60Ti1cMgu7OT7p1dZCwT/KQuI5eGjE9lubkc
yAJjaod4rVLdBri3XVvtySfS2+/75qUgv2TF7d/s7mxMq4DDt29yeKSUhZCs
-----END CERTIFICATE-----
-----BEGIN DH PARAMETERS-----
MIGHAoGBAJWyvKjE+s7OP4Lj1jXKGlJGWT4Vd5YaxPljihTsRe1aXkWAgsuwISXk
/TQ8Rx5Zmze7rtwtU0PoYxvuam9FMXYqhw2dVe4qRdeSX78DSiL/YBkQzaxlfWVy
RE9+9dzHbCtRVDlN7K1kA+mGWH4/r7NAu4Qm/003V0NTtMwQSqebAgEC
-----END DH PARAMETERS-----
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDDzU6xLZDD5rZE
NsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2QaMyTkvyjzf7bSFsDt
9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BWB3lcoKXXJgMnWw0W
Grt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5kdcIbDRVw81J4eAZ
6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrMmhOeL8kuQV0fI8v2
xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWXQo98swTu7mb89qVY
mR71d3L3AgMBAAECggEBAIMT0UdZSp1quL/nrYqNGa9kuSuDz4uCM3+3jNcGZVU4
vCYHxpmINLi0UK8W5ROJA3zC4AZKjDgOlW93NXK5iKyyiUTIN3hiJi4jiVDuGbh2
DZtH7mmAKAU1zCx2y2osLLmurfbe8qOJF7ShhrZfgWsHFujFhhUdU92dsTkhZ7EU
2NF8ScxCo4PbOJoHC3j0ApfwCMxUMAKZF5+08EeKYqK7OAXI79HeIvEbHn3cUDGm
bvg6ykwlz2UUO4sg+xdCmn1Bt36HF/4e973Y5fkE/vd9mryHIlu9t7GJgWyUiPr8
BGEoAWDSpPOMd/b9ivtxh9Gd+LW/uitMuBIfrRPgz9kCgYEA+JqeeD2xqF2IzZyq
i1UqgKe3su2U2zhkgbu1h/1M/reNIZGylF0wFs3P+kNIB2NavmHjXcgSjdJzqRL9
XEWfFJRmeARo9RTEQEVd8zp1Eo8ISeiksGgvbL4rrNIRR5V5MZytfISRiGCWN6jx
ulJ6EieQk5EcvknGlWpJY/bBsQ0CgYEAyaCLqrR38gVl2Z0t6YlhW/HWAwGt+lf4
apN1AS4uykx7wRW2B0y9QUDfsrYeVlbbeRPP4UzPmJez+J2cweoIIeFFyo3KP2L7
79E3EVYywjXhPg52F7OjFA4Bp970XclIC5Al7kDufSgwZmWdceSx4Jjc5ixyQEC8
Ad0ThgP6yxMCgYAvC4OFmZcvF1Q2JLmZWGqMojB/KbqLqaZLbqwxqduSMEYC3kF/
FgttpVEAOQ8+ZqzbbkbKjnwEXpkIm9FaTsqF6HdjquH5zw48Y2QeDSfudSbKZb4U
rAKdf3dgYvhmJYEjxFSIRcYMmsqSieQEsGrtWJNheYqI8AkmaVCuHBoXWQKBgQCj
daelNffD2wJuQNI28axfiRjSiSsNuQHpDTCfS1ydnxH5QGu5UUphO4HfdWv03SfC
6f/vDIGEmQBLvyOVxfDf3qzhAMCFUO8kxj1ZrcMq1dmMoNa2cmj0WkKXYNZFrmfd
D/jgRf3Ss6FBcoIJErnudp8nb8MUOibxb9RjIpjQxwKBgEliKaGN+/QkPTNJ4vXz
609CIilxpE+YVTzlv3YeZP5HqsJTJPS2ARIUr/Pjpbl3LHfYNeeGDCwgkJIK0JJH
iA1M51q6t3zG2y9gKmC15FF0jShoZkRgqBxqrSHAnrCo5t2C48ElxJ3FEU8T75sz
dlGTbkmR0Wm43Kh++dWICJ3g
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDWTCCAkGgAwIBAgIJAIlW4JmZGnU4MA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwIBcNMTQxMDI0MDc1MTU1WhgPMzAxNDAyMjQwNzUxNTVaMEIx
CzAJBgNVBAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
ZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQDDzU6xLZDD5rZENsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2Qa
MyTkvyjzf7bSFsDt9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BW
B3lcoKXXJgMnWw0WGrt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5
kdcIbDRVw81J4eAZ6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrM
mhOeL8kuQV0fI8v2xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWX
Qo98swTu7mb89qVYmR71d3L3AgMBAAGjUDBOMB0GA1UdDgQWBBRdWet/kGNTyvXK
wuBdP/eSldOgWjAfBgNVHSMEGDAWgBRdWet/kGNTyvXKwuBdP/eSldOgWjAMBgNV
HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCcJpP+DR4AJxVelNTSZa+V38c+
jgrMD2Ku2eU8NQlsjgMfNEU5Md/g7FpP8aCFzVf0kAAT7DxZmSE3uWXQbMXyVJmy
bF+qXinf71QzdWULm6sASoshC6wbHnXL9ZjWQ3gh1nqVgo3MmLQYrb3eJfKaaLoc
wpjhYxVxGFOx1ITN3jED64lUfoLHvR6NFbESYKAuAAzSNqX4HOQ3uGk2THM8JocZ
oH2+38d81Kd4HQ7DDDKS/isG0+rR60Ti1cMgu7OT7p1dZCwT/KQuI5eGjE9lubkc
yAJjaod4rVLdBri3XVvtySfS2+/75qUgv2TF7d/s7mxMq4DDt29yeKSUhZCs
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwNjI2MDcxMjQ1WhcNMjUwNTA0MDcxMjQ1WjBCMQsw
CQYDVQQGEwJGSTEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
1DlcztIzSngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwNjI2MDcxMjQ1WhcNMjUwNTA0MDcxMjQ1WjBCMQsw
CQYDVQQGEwJGSTEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
1DlcztIzSngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDUOVzO0jNKeAZ5
NQWJuP0Znhk7vwBKmBjJJm/8NEhWf/eFsXjVlEP/q4mVvmt/VHt+kWy6ttc0MPF5
qntv8bPZdJDL3oNubRJuwVJm21X9HZa2VPVZ/mf2LHpEuqEpJuCc/IvZ+wNrG1mH
a7LAYkReHBcW13Hd14ij+1iK8N+XlNyy/Q2dljxWDRugFE/4USdF4k51Jrksuf5A
k3Zdr7C61ssd7SEjqG4pRdTZhR4F+DKTWdaiXnbjVlQMKAOyhpbyvZh4k0eY0id3
fARFuoWAUexHg3X4C1zKt+f+5BKP3OtM878+nnUqmNZ/+CPGNc9uK7kN7nSpnj5T
iejbQQg7AgMBAAECggEBAJ4m7VG3db+uOGzFJY5fzEX1+qn6ibYNKJNmUJfrQmkr
zgLUoc7QQehbJhnwoN1v0OQebZ+rOC7NtnZLpNdkkPmhk3JKLTnykIT3DnhWRftt
vG2+XGUnYMQkmy1ywz0Omt6CmZnlJMQByrNPgBM8Z+SWHGLKRTHkOBCz82T/YjDr
wqug1Yv6W0wMNM/cikgoBldVG7hABCJuShjffIbUgVysK3dEPNywNAC78neoGECm
evPZOaIkWEr86SpAlwA6Yh+zTQZ03CXATcGonJdWJ015DvlKRv6QyRR0Q/Y1ONwb
f115kll15MJBEspFdSyhlMcVJlwO8WMaZ2qIzlQZmdECgYEA//P469QzX00L/urK
7IRvtSVu5CP/A/Wui90U4KoP7XgXIeExnEtzLVs1K7vjuzdpTyq+68XuC40gPcJW
RvoX229m6gRV8nC53UiV71jM8IvkyEqFYT/gfZC9KQCMSRJLtVnDMpZ3gMxAY6/5
p20o616Au8DKFFetQV0aD4Hj1/MCgYEA1ENV1WkgvN6yItB77E9kN/vbKLRh0hrg
9xj0SmMXGYyDM9NpjbgbgJIZo3ukkBtp3kEY8P9JQZRcd1EcnnSrwTB7ChdInWkR
m/LpIZBEMqNQbeu4QSzZYYS6z4tcGGx43aHqzzNBZdnQnqhYL1CvlLwhkgX6oQCo
woXqyfMNKJkCgYEA63gD1NGPwWkcVBSlQxpDup8JeZE0Fux6++kUP+u0Y39LqLuH
7IXtHBkAvY9JXv8HPvHQWw/og2/97VNQFFQYhqPiRgBfIX9bPpx8c4l6YQISI8GL
G4CsglgZ7hK2/LJ8PAascWnD3xYJVqyaPNFMB90VCaW/Qx+2IKAKTaHtfskCgYBu
1f5C4pMqrCpeTXj4Cvis1wE4PwB5QnnH7SrakOVl/N4huLn8O2948lEa8Zwbd4UP
ffR1Gwh4iuzBjQQhpZBt30/QFBphv5RnVy7uzLMfsfF0hEqBFdcoubMGXqGnSzTN
nhfLO9thQJxTzFnH0xzr0FTDOAYH/h0g/eZ8r0JmuQKBgQDjhXM+hJ3Pkwua+Fnl
nZfY5MeSzkJki/9iwVo8rSDwmZS9Nsc83oZnddM7c2x63t+zYOAcMxsVCiByMDzo
5IB781HWRBGcU8TnW1b0bAnZimjKp/qsZ/Szr38rvImqG8TjzbcSD7w0SpyRQ/Ot
A7SZFkWYfem8/q/VImjU/CNbOQ==
-----END PRIVATE KEY-----
......@@ -14,12 +14,8 @@ CREATE TEMPORARY TABLE `table:name` (a INT);
CREATE TEMPORARY TABLE shortn2 (a INT);
##############################################################################
# BUG#46572 DROP TEMPORARY table IF EXISTS does not have a consistent behavior
# in ROW mode
#
# In RBR, 'DROP TEMPORARY TABLE ...' statement should never be binlogged no
# matter if the tables exist or not. In contrast, both in SBR and MBR, the
# statement should be always binlogged no matter if the tables exist or not.
# MDEV-20091: DROP TEMPORARY TABLE IF EXISTS statements will be written
# to binlog only if the corresponding temporary table exists.
##############################################################################
CREATE TEMPORARY TABLE tmp(c1 int);
CREATE TEMPORARY TABLE tmp1(c1 int);
......@@ -30,12 +26,12 @@ CREATE TABLE t(c1 int);
DROP TEMPORARY TABLE IF EXISTS tmp;
--disable_warnings
# Before fixing BUG#46572, 'DROP TEMPORARY TABLE IF EXISTS...' statement was
# binlogged when the table did not exist in RBR.
# Post MDEV-20091: Following DROP TEMPORARY TABLE statement should not be
# logged as the table is already dropped above.
DROP TEMPORARY TABLE IF EXISTS tmp;
# In RBR, 'DROP TEMPORARY TABLE ...' statement is never binlogged no matter if
# the tables exist or not.
# Post MDEV-20091: Only DROP TEMPORARY TABLE statement should be written only
# for 'tmp1' table.
DROP TEMPORARY TABLE IF EXISTS tmp, tmp1;
DROP TEMPORARY TABLE tmp3;
......@@ -79,6 +75,12 @@ DROP DATABASE `drop-temp+table-test`;
# if there are open temporary tables. As such the implicit drop
# for temporary tables on session closing must be logged.
#
# MDEV-20091: DROP TEMPORARY TABLE IF EXISTS statements will be written to
# binlog only if the corresponding temporary table exists. In row based
# replication temporary tables are not replicated hence their corresponding
# DROP TEMPORARY TABLE statement will be not be written to binary log upon
# session closure.
#
RESET MASTER;
......@@ -92,8 +94,10 @@ SELECT @@session.binlog_format;
--disconnect con1
-- connection default
if (!`SELECT @@BINLOG_FORMAT = 'ROW'`) {
--let $wait_binlog_event= DROP
--source include/wait_for_binlog_event.inc
}
-- source include/show_binlog_events.inc
RESET MASTER;
......
RESET MASTER;
include/stop_dump_threads.inc
# Step-1: Execute some dummy statements.
CREATE TABLE t1(i int);
INSERT INTO t1 values (1);
# Step-2: Disable binary log temporarily and drop the table 't1'.
set @@SESSION.SQL_LOG_BIN = 0;
DROP TABLE t1;
set @@SESSION.SQL_LOG_BIN = 1;
# Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client.
# Step-4: Wait till dump thread transfer is completed.
# Step-5: Check that the data is there.
# Step-6: Cleanup
# kill the dump thread serving the mysqlbinlog --stop-never process
include/stop_dump_threads.inc
DROP TABLE t1;
......@@ -105,6 +105,4 @@ BEGIN
# server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number #
# server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F
COMMIT/*!*/;
# server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl
DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t5`
DROP TABLE t1;
......@@ -35,15 +35,9 @@ master-bin.000001 # Query # # CREATE DATABASE `drop-temp+table-test`
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; CREATE TABLE t(c1 int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; DROP TABLE IF EXISTS `t` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; DROP TABLE IF EXISTS `tmp2`,`t` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `shortn2`,`table:name`,`shortn1`
DROP DATABASE `drop-temp+table-test`;
RESET MASTER;
CREATE TABLE t1 ( i text );
......@@ -65,7 +59,5 @@ master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES ('1')
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `ttmp1`
RESET MASTER;
DROP TABLE t1;
......@@ -348,8 +348,6 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `t1`,`ti`
do release_lock("lock1");
drop table t0,t2;
set autocommit=0;
......
......@@ -51,12 +51,8 @@ master-bin.000001 # Query # # use `drop-temp+table-test`; CREATE TABLE t(c1 int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp1` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `drop-temp+table-test`; DROP TEMPORARY TABLE `tmp3` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `drop-temp+table-test`.`tmp2` /* generated by server */
......
# ==== Purpose ====
#
# Test verifies that continuous streaming of binary log content using the
# "mysqlbinlog --stop-never" option and sourcing it to mysql client works
# fine.
#
# ==== Implementation ====
#
# Steps:
# 1 - Create a table on a server on which binary log is enabled and insert
# a row.
# 2 - Disable the binary log on the server and drop the table.
# 3 - Capture the binary log output using "mysqlbinlog --stop_never" option
# and source it to mysql client.
# 4 - Query the PROCESSLIST table to ensure that the dump thread which is
# serving "stop_never" option has read entire binlog.
# 5 - Verify that the table is populated on the server.
# 6 - Cleanup.
#
# ==== References ====
#
# MDEV-11154: Write_on_release_cache(log_event.cc) function will not write
# "COMMIT", if use "mysqlbinlog ... | mysql ..."
--source include/not_windows.inc
# Test is not specific to any binlog format. Hence Running only for 'row'.
--source include/have_binlog_format_row.inc
# binlog file name is needed in the test. To use master-bin.000001,
# RESET MASTER is needed.
RESET MASTER;
# kill the dump threads if there any dump threads (may be from previous test)
--source include/stop_dump_threads.inc
--echo # Step-1: Execute some dummy statements.
CREATE TABLE t1(i int);
INSERT INTO t1 values (1);
--echo # Step-2: Disable binary log temporarily and drop the table 't1'.
set @@SESSION.SQL_LOG_BIN = 0;
DROP TABLE t1;
set @@SESSION.SQL_LOG_BIN = 1;
--echo # Step-3: Execute MYSQL_BINLOG with --stop-never and source it to mysql client.
--write_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
(`$MYSQL_BINLOG --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 | $MYSQL --user=root --protocol=tcp --host=127.0.0.1 --port=$MASTER_MYPORT`) < /dev/null > /dev/null 2>&1 &
EOF
--exec /bin/bash $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
--echo # Step-4: Wait till dump thread transfer is completed.
let $wait_condition= SELECT id from information_schema.processlist where processlist.command like '%Binlog%' and state like '%Master has sent%';
--source include/wait_condition.inc
--echo # Step-5: Check that the data is there.
let $count= 1;
let $table= test.t1;
source include/wait_until_rows_count.inc;
--echo # Step-6: Cleanup
--echo # kill the dump thread serving the mysqlbinlog --stop-never process
--source include/stop_dump_threads.inc
DROP TABLE t1;
--remove_file $MYSQL_TMP_DIR/mysqlbinlog_stop_never.sh
......@@ -10,35 +10,30 @@
#
##############################################################################
GAL-419 : MDEV-13549 Galera test failures
MW-286 : MDEV-19992 Galera test failure on MW-286
GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
MW-328A : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-328B : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-328C : MDEV-17847 Galera test failure on MW-328[A|B|C]
MW-329 : wsrep_local_replays not stable
MW-336 : MDEV-13549 incorrect wait_condition for wsrep_slave_threads changes
MW-329 : MDEV-19962 Galera test failure on MW-329
MW-360 : needs rewrite to be MariaDB gtid compatible
MW-336 : MDEV-19746 Galera test failures because of wsrep_slave_threads identification
MW-388: MDEV-19803 Long semaphore wait error on galera.MW-388
MW-416 : MDEV-13549 Galera test failures
MW-44 : MDEV-15809 Test failure on galera.MW-44
galera_account_management : MariaDB 10.0 does not support ALTER USER
galera_as_master_gtid : Requires MySQL GTID
galera_as_master_gtid_change_master : Requires MySQL GTID
galera_as_slave_gtid_replicate_do_db_cc : Requires MySQL GTID
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
galera_autoinc_sst_mariabackup : MDEV-18177 Galera test failure on galera_autoinc_sst_mariabackup
galera_autoinc_sst_mariabackup : MDEV-19926 Galera SST tests fail
galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
galera_binlog_stmt_autoinc: MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc
galera_concurrent_ctas : MDEV-18180 Galera test failure on galera.galera_concurrent_ctas
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_flush : MariaDB does not have global.thread_statistics
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
galera_ist_mariabackup : MDEV-18829 test leaves port open
galera_ist_progress: MDEV-15236 fails when trying to read transfer status
galera_kill_applier : race condition at the start of the test
galera_kill_ddl : MDEV-17108 Test failure on galera.galera_kill_ddl
galera_ist_progress : MDEV-15236 fails when trying to read transfer status
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
galera_many_tables_nopk : MDEV-18182 Galera test failure on galera.galera_many_tables_nopk
......@@ -51,9 +46,7 @@ galera_var_node_address : MDEV-17151 Galera test failure
galera_var_notify_cmd : MDEV-13549 Galera test failures
galera_var_reject_queries : assertion in inline_mysql_socket_send
galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
galera_var_slave_threads : MDEV-19746 Galera test failures because of wsrep_slave_threads identification
galera_sst_mariabackup_encrypt_with_key : MDEV-19926 Galera SST tests fail
galera_wan : MDEV-17259: Test failure on galera.galera_wan
mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed.
partition : MDEV-13549 regularly showing auto_increment mismatch
pxc-421: Lock timeout exceeded
query_cache : MDEV-18137: Galera test failure on query_cache
partition : MDEV-19958 Galera test failure on galera.partition
connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*");
call mtr.add_suppression("Aborting");
connection node_2;
SET SESSION wsrep_sync_wait = 0;
Killing server ...
connection node_1;
SET SESSION wsrep_sync_wait = 0;
Killing server ...
connection node_1;
connection node_2;
connection node_2;
connection node_1;
CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*");
CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
INSERT INTO t1 (f1) VALUES (1),(65535);
......@@ -7,13 +9,11 @@ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
SET SESSION wsrep_sync_wait = 0;
WHILE 1 DO
INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
SELECT SLEEP(0.1);
END WHILE;
END|
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1b;
CALL proc_insert();;
wsrep_local_replays
1
connection node_1;
connection node_1b;
connection node_1;
......
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
INSERT INTO t1 values(0);
connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
# Set slave threads to 10 step 1
SET GLOBAL wsrep_slave_threads = 1;
# Wait 10 slave threads to start 1
connection node_2;
SET SESSION wsrep_sync_wait=15;
# Generate 100 replication events
INSERT INTO t1 VALUES (1);
connection node_1;
SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM t1;
COUNT(*)
101
# Wait 9 slave threads to exit 1
1
SET GLOBAL wsrep_slave_threads = 10;
# Wait 10 slave threads to start 2
# Set slave threads to 10 step 2
SET GLOBAL wsrep_slave_threads = 20;
# Wait 20 slave threads to start 3
# Set slave threads to 20
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
# Generate 100 replication events
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
connection node_1;
SET GLOBAL wsrep_slave_threads = 10;
SELECT COUNT(*) FROM t1;
COUNT(*)
201
# Wait 10 slave threads to exit 3
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1;
# Wait 10 slave threads to start 3
11
# Set slave threads to 10 step 3
connection node_2;
# Generate 100 replication events
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (13);
INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (15);
INSERT INTO t1 VALUES (16);
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20);
connection node_1;
SELECT COUNT(*) FROM t1;
COUNT(*)
301
# Wait 10 slave threads to exit 4
connection node_1;
21
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
connection node_2;
connection node_1;
CREATE USER 'userMW416'@'localhost';
GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost';
SHOW GLOBAL STATUS LIKE 'wsrep_replicated';
Variable_name Value
wsrep_replicated 2
connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1;
connection userMW416;
ALTER DATABASE db CHARACTER SET = utf8;
ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'db'
ALTER EVENT ev1 RENAME TO ev2;
......@@ -101,6 +102,7 @@ INSTALL PLUGIN plg SONAME 'plg.so';
Got one of the listed errors
UNINSTALL PLUGIN plg;
Got one of the listed errors
connection node_1;
DROP USER 'userMW416'@'localhost';
SHOW DATABASES;
Database
......@@ -109,5 +111,3 @@ mtr
mysql
performance_schema
test
wsrep_replicated_after_diff
1
......@@ -24,3 +24,14 @@ connection node_1;
connection node_2;
STOP SLAVE;
RESET SLAVE ALL;
#cleanup
connection node_1;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_3;
reset master;
RESET MASTER;
connection node_2;
connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_1;
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
connection node_3;
RESET MASTER;
connection node_2;
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
......
connection node_2;
connection node_1;
connection node_2;
SET GLOBAL wsrep_slave_threads=2;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
SET GLOBAL wsrep_slave_threads=1;
connection node_1;
create table t1(a int not null primary key) engine=innodb;
insert into t1 values (1);
insert into t1 values (2);
connection node_2;
set global wsrep_sync_wait=15;
select count(*) from t1;
count(*)
2
connection node_1;
drop table t1;
connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
connection node_1;
connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
Killing server ...
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
connection node_2;
connection node_2a;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
COUNT(*) = 2
1
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
COUNT(*)
2
connection node_1;
DROP TABLE t1;
connection node_2;
connection node_1;
connection node_1;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
......@@ -14,60 +22,64 @@ COUNT(*) = 2
1
connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
FLUSH LOGS;
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,21;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000002 # Gtid # # GTID 0-1-1
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-2
mysqld-bin.000002 # Annotate_rows # # INSERT INTO t1 VALUES (1)
mysqld-bin.000002 # Table_map # # table_id: # (test.t1)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # GTID 0-1-3
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-4
mysqld-bin.000002 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-5
mysqld-bin.000002 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # GTID 0-1-6
mysqld-bin.000002 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
connection node_2;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2
1
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,21;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000003 # Gtid # # GTID 0-1-1
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-2
mysqld-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES (1)
mysqld-bin.000003 # Table_map # # table_id: # (test.t1)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # GTID 0-1-3
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-4
mysqld-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-5
mysqld-bin.000003 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # GTID 0-1-6
mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
DROP TABLE t1;
DROP TABLE t2;
#cleanup
connection node_1;
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
connection node_2;
SET GLOBAL wsrep_on=OFF;
reset master;
SET GLOBAL wsrep_on=ON;
......@@ -20,3 +20,5 @@ COUNT(*) = 1
1
connection node_1;
DROP TABLE t1;
truncate table mysql.slow_log;
truncate table mysql.general_log;
--- r/galera_sst_mysqldump_with_key.result 2018-11-19 09:56:30.081976558 +0200
+++ r/galera_sst_mysqldump_with_key.reject 2018-11-19 10:47:41.609299365 +0200
@@ -183,6 +183,103 @@
--- r/galera_sst_mysqldump_with_key.result 2019-07-04 09:39:54.993971174 +0300
+++ r/galera_sst_mysqldump_with_key.reject 2019-07-04 09:55:34.171175305 +0300
@@ -204,6 +204,114 @@
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
+Performing State Transfer on a server that has been killed and restarted
+while a DDL was in progress on it
+connection node_1;
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
......@@ -14,6 +15,7 @@
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+INSERT INTO t1 VALUES ('node1_committed_before');
+connection node_2;
+START TRANSACTION;
+INSERT INTO t1 VALUES ('node2_committed_before');
+INSERT INTO t1 VALUES ('node2_committed_before');
......@@ -22,9 +24,12 @@
+INSERT INTO t1 VALUES ('node2_committed_before');
+COMMIT;
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
+connection node_1;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+connection node_2;
+SET wsrep_sync_wait = 0;
+Killing server ...
+connection node_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
......@@ -39,6 +44,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
+SET AUTOCOMMIT=OFF;
+START TRANSACTION;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
......@@ -46,7 +52,9 @@
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+connection node_2;
+Performing --wsrep-recover ...
+connection node_2;
+Starting server ...
+Using --wsrep-start-position when starting mysqld ...
+SET AUTOCOMMIT=OFF;
......@@ -57,6 +65,7 @@
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
+COMMIT;
+connection node_1;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
......@@ -71,6 +80,7 @@
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
+COMMIT;
+connection node_1a_galera_st_kill_slave_ddl;
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
......@@ -88,6 +98,7 @@
+1
+COMMIT;
+SET AUTOCOMMIT=ON;
+connection node_1;
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
+COUNT(*) = 2
+1
......@@ -101,6 +112,6 @@
+COMMIT;
+SET AUTOCOMMIT=ON;
+SET GLOBAL debug_dbug = $debug_orig;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
......@@ -205,17 +205,6 @@ DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
connection node_1;
connection node_2;
connection node_1;
connection node_2;
connection node_1;
connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_2;
connection node_2;
connection node_1;
connection node_1a_galera_st_kill_slave_ddl;
connection node_1;
connection node_1;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
connection node_2;
......
......@@ -49,8 +49,6 @@ tr1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE
DROP TABLE t1;
connection node_1;
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connection node_2;
SHOW CREATE EVENT event1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
......
connection node_2;
connection node_1;
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE parent (
id INT PRIMARY KEY AUTO_INCREMENT,
f2 INTEGER,
KEY (id)
f2 INTEGER
) ENGINE=InnoDB;
CREATE TABLE child (
id INT PRIMARY KEY AUTO_INCREMENT,
......@@ -25,19 +24,21 @@ connection node_1b;
connection node_2;
connection node_2a;
connection node_1;
SELECT COUNT(*) = 20001 FROM parent;
COUNT(*) = 20001
1
SELECT COUNT(*) = 10000 FROM child;
COUNT(*) = 10000
1
SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM parent;
COUNT(*)
20001
SELECT COUNT(*) FROM child;
COUNT(*)
10000
connection node_2;
SELECT COUNT(*) = 20001 FROM parent;
COUNT(*) = 20001
1
SELECT COUNT(*) = 10000 FROM child;
COUNT(*) = 10000
1
SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM parent;
COUNT(*)
20001
SELECT COUNT(*) FROM child;
COUNT(*)
10000
DROP TABLE child;
DROP TABLE parent;
DROP TABLE ten;
......@@ -80,6 +80,15 @@ wsrep_gtid_mode 1
# On node_1
connection node_1;
DROP TABLE t1, t2;
#cleanup
connection node_1;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
disconnect node_2;
disconnect node_1;
# End of test
......@@ -8,4 +8,3 @@ MAX(size) = 2
SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status;
COUNT(DISTINCT idx) = 2
1
DROP SCHEMA mtr_wsrep_notify;
......@@ -17,67 +17,44 @@ SELECT @@wsrep_slave_threads = 1;
@@wsrep_slave_threads = 1
1
SET GLOBAL wsrep_slave_threads = 1;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
COUNT(*)
3
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 64;
connection node_1;
INSERT INTO t1 VALUES (1);
connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 64;
SET GLOBAL wsrep_slave_threads = 1;
connection node_1;
connection node_2;
SELECT COUNT(*) FROM t2;
COUNT(*)
64
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
COUNT(*)
1
SET GLOBAL wsrep_slave_threads = 5;
70
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
Shutting down server ...
DROP TABLE t1;
DROP TABLE t2;
#
# lp:1372840 - Changing wsrep_slave_threads causes future connections to hang
#
connection node_1;
show status like 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 1
SET GLOBAL wsrep_slave_threads = 6;
SET GLOBAL wsrep_slave_threads = 1;
SET GLOBAL wsrep_cluster_address='';
SET GLOBAL wsrep_cluster_address='gcomm://';
SET GLOBAL wsrep_slave_threads = 10;
CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=INNODB;
connection node_2;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
COUNT(*)
3
connection node_1;
SET GLOBAL wsrep_slave_threads = 4;
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
SET GLOBAL wsrep_slave_threads = 1;
connection node_1;
connection node_2;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT COUNT(*) FROM t2;
COUNT(*)
192
connection node_1;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SELECT COUNT(*) FROM t2;
COUNT(*)
192
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
DROP TABLE t1;
DROP TABLE t2;
connection node_2;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
NAME
# End of tests
......@@ -80,6 +80,15 @@ wsrep_gtid_mode 1
# On node_1
connection node_1;
DROP TABLE t1, t2;
#cleanup
connection node_1;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_2;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
disconnect node_2;
disconnect node_1;
# End of test
......@@ -5,11 +5,14 @@
--source include/galera_cluster.inc
--source include/big_test.inc
--connection node_1
call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*");
call mtr.add_suppression("Aborting");
--connection node_2
SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
--connection node_2
--connection node_1
SET SESSION wsrep_sync_wait = 0;
--source include/kill_galera.inc
......
......@@ -22,6 +22,7 @@ BEGIN
SET SESSION wsrep_sync_wait = 0;
WHILE 1 DO
INSERT INTO t1 (f1) VALUES (FLOOR( 1 + RAND( ) * 65535 ));
SELECT SLEEP(0.1);
END WHILE;
END|
DELIMITER ;|
......@@ -29,6 +30,8 @@ DELIMITER ;|
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1b
--let $connection_id = `SELECT CONNECTION_ID()`
--disable_query_log
--disable_result_log
--send CALL proc_insert();
#
......@@ -88,6 +91,8 @@ while ($count)
--connection node_1b
--error 0,2013,1317
--reap
--enable_query_log
--enable_result_log
--connection node_1
DROP PROCEDURE proc_insert;
......
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep-debug=SERVER
[mysqld.2]
wsrep-debug=SERVER
......@@ -4,110 +4,77 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
INSERT INTO t1 values(0);
--source include/force_restart.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1;
--echo # Wait 10 slave threads to start 1
--let $wait_timeout=600
--let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
# ensure that the threads have actually started running
--echo # Set slave threads to 10 step 1
--let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
SET SESSION wsrep_sync_wait=15;
# Wait until inserts are replicated
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
--echo # Generate 100 replication events
--disable_query_log
--disable_result_log
--let $count = 100
while ($count)
{
INSERT INTO t1 VALUES (1);
--dec $count
}
--enable_result_log
--enable_query_log
INSERT INTO t1 VALUES (1);
--connection node_1
SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM t1;
--echo # Wait 9 slave threads to exit 1
# Wait until appliers exit
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 10;
--echo # Wait 10 slave threads to start 2
--let $wait_condition = SELECT COUNT(*) = 12 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
--echo # Set slave threads to 10 step 2
--let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
SET GLOBAL wsrep_slave_threads = 20;
--echo # Wait 20 slave threads to start 3
--let $wait_condition = SELECT COUNT(*) = 22 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
--echo # Set slave threads to 20
--let $wait_condition = SELECT COUNT(*) = 20 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
--let $wait_condition_on_error_output = SELECT COUNT(*), 20 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
--echo # Generate 100 replication events
--disable_query_log
--disable_result_log
--let $count = 100
while ($count)
{
INSERT INTO t1 VALUES (1);
--dec $count
}
--enable_query_log
--enable_result_log
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
--connection node_1
SELECT COUNT(*) FROM t1;
--echo # Wait 10 slave threads to exit 3
# Wait until appliers exit
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1;
--echo # Wait 10 slave threads to start 3
--let $wait_timeout=600
--let $wait_condition = SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
SELECT COUNT(*) FROM t1;
--echo # Set slave threads to 10 step 3
--let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
--connection node_2
--echo # Generate 100 replication events
--disable_query_log
--disable_result_log
--let $count = 100
while ($count)
{
INSERT INTO t1 VALUES (1);
--dec $count
}
--enable_result_log
--enable_query_log
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (13);
INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (15);
INSERT INTO t1 VALUES (16);
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20);
--connection node_1
SELECT COUNT(*) FROM t1;
--echo # Wait 10 slave threads to exit 4
# Wait until appliers exit
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--source include/wait_condition.inc
--connection node_1
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
......@@ -2,11 +2,10 @@
--source include/have_innodb.inc
--source include/wait_until_ready.inc
CREATE USER 'userMW416'@'localhost';
GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost';
--let $wsrep_replicated_before = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_replicated'`
--connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1
--connection userMW416
......@@ -130,7 +129,4 @@ UNINSTALL PLUGIN plg;
--connection node_1
DROP USER 'userMW416'@'localhost';
SHOW DATABASES;
--let $wsrep_replicated_after = `SELECT variable_value FROM information_schema.global_status WHERE variable_name = 'wsrep_replicated'`
--disable_query_log
--eval SELECT $wsrep_replicated_after - $wsrep_replicated_before AS wsrep_replicated_after_diff
--enable_query_log
......@@ -70,3 +70,17 @@ DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
--echo #cleanup
--connection node_1
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--connection node_2
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--connection node_3
reset master;
......@@ -18,9 +18,7 @@ SET GLOBAL wsrep_on=ON;
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
SET global wsrep_on=OFF;
RESET MASTER;
SET global wsrep_on=ON;
--connection node_2
SET global wsrep_on=OFF;
......
......@@ -91,6 +91,5 @@ CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
--connection node_4
RESET MASTER;
......@@ -66,6 +66,8 @@ show variables like 'binlog_format';
SET GLOBAL wsrep_auto_increment_control='OFF';
let $increment_node1 = `SELECT @@session.auto_increment_increment`;
let $offset_node1 = `SELECT @@session.auto_increment_offset`;
SET SESSION auto_increment_increment = 3;
SET SESSION auto_increment_offset = 1;
......
......@@ -4,9 +4,16 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/force_restart.inc
--connection node_1
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE IS NULL LIMIT 1`
--connection node_2
SET GLOBAL wsrep_slave_threads=2;
--let $wait_condition = SELECT COUNT(*) >= 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle';
--let $wait_condition_on_error_output = SELECT COUNT(*), 2 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle' LIMIT 1`
--disable_query_log
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
......@@ -23,3 +30,17 @@
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL QUERY $aborter_thread
--enable_query_log
SET GLOBAL wsrep_slave_threads=1;
--connection node_1
create table t1(a int not null primary key) engine=innodb;
insert into t1 values (1);
insert into t1 values (2);
--connection node_2
set global wsrep_sync_wait=15;
select count(*) from t1;
--connection node_1
drop table t1;
......@@ -5,16 +5,20 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_1
call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*");
# Enable the master to continue running during the split-brain situation that
# occurs when the slave is killed
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
--source include/kill_galera.inc
......@@ -36,7 +40,10 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
--connection node_1
--disable_query_log
......
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--connection node_2
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
#
# Test Galera with --log-bin --log-slave-updates .
# This way the actual MySQL binary log is used,
......@@ -20,22 +29,23 @@ SELECT COUNT(*) = 2 FROM t2;
--connection node_1
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
FLUSH LOGS;
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,21;
--let $MASTER_MYPORT=$NODE_MYPORT_1
--source include/show_binlog_events.inc
--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,21;
--let $MASTER_MYPORT=$NODE_MYPORT_2
--source include/show_binlog_events.inc
DROP TABLE t1;
DROP TABLE t2;
--echo #cleanup
--connection node_1
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
--connection node_2
SET GLOBAL wsrep_on=OFF;
reset master;
SET GLOBAL wsrep_on=ON;
......@@ -22,3 +22,5 @@ SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';
--connection node_1
DROP TABLE t1;
truncate table mysql.slow_log;
truncate table mysql.general_log;
......@@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
--source include/force_restart.inc
# Create a second connection to node1 so that we can run transactions concurrently
--let $galera_connection_name = node_1a
......@@ -20,8 +21,9 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoD
--connection node_2
set session wsrep_sync_wait=15;
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
SET GLOBAL wsrep_slave_threads = 4;
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
--connection node_1
......
......@@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
--source include/force_restart.inc
--connection node_1
CREATE TABLE ten (f1 INTEGER) Engine=InnoDB;
......@@ -24,8 +25,9 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoD
--connection node_2
set session wsrep_sync_wait=15;
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
SET GLOBAL wsrep_slave_threads = 4;
--let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND (STATE IS NULL OR STATE NOT LIKE 'InnoDB%');
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
--connection node_1
......
......@@ -64,7 +64,9 @@ DROP TABLE t1;
--connection node_1
--disable_warnings
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
--enable_warnings
--connection node_2
SHOW CREATE EVENT event1;
......
......@@ -6,13 +6,12 @@
# This test creates a new FK constraint while concurrent INSERTS are running
#
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE parent (
id INT PRIMARY KEY AUTO_INCREMENT,
f2 INTEGER,
KEY (id)
f2 INTEGER
) ENGINE=InnoDB;
CREATE TABLE child (
......@@ -41,7 +40,6 @@ INSERT INTO parent VALUES (1, 0);
--let $galera_server_number = 1
--source include/galera_connect.inc
--connection node_1b
--sleep 2
--send ALTER TABLE child ADD FOREIGN KEY (parent_id) REFERENCES parent(id);
--connection node_1a
......@@ -57,14 +55,15 @@ INSERT INTO parent VALUES (1, 0);
--reap
--connection node_1
SELECT COUNT(*) = 20001 FROM parent;
SELECT COUNT(*) = 10000 FROM child;
SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM parent;
SELECT COUNT(*) FROM child;
--connection node_2
SELECT COUNT(*) = 20001 FROM parent;
SELECT COUNT(*) = 10000 FROM child;
SET SESSION wsrep_sync_wait=15;
SELECT COUNT(*) FROM parent;
SELECT COUNT(*) FROM child;
DROP TABLE child;
DROP TABLE parent;
DROP TABLE ten;
......@@ -48,6 +48,17 @@ source include/print_gtid.inc;
# Cleanup
DROP TABLE t1, t2;
--echo #cleanup
--connection node_1
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--connection node_2
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--source include/galera_end.inc
--echo # End of test
......@@ -10,5 +10,3 @@
SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership;
SELECT MAX(size) = 2 FROM mtr_wsrep_notify.status;
SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status;
DROP SCHEMA mtr_wsrep_notify;
......@@ -6,7 +6,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
--source include/force_restart.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
......@@ -14,6 +14,7 @@
--source include/auto_increment_offset_save.inc
--connection node_1
--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads`
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB;
......@@ -26,28 +27,25 @@ SELECT @@wsrep_slave_threads = 1;
SET GLOBAL wsrep_slave_threads = 1;
# There is a separate wsrep_aborter thread at all times
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
#
# Increase the number of slave threads. The change takes effect immediately
#
SET GLOBAL wsrep_slave_threads = 64;
--connection node_1
INSERT INTO t1 VALUES (1);
--connection node_2
--let $wait_timeout=600
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(*) FROM t1;
#
# note, in wsrep API #26, we have 2 rollbacker threads, counted as system user's
# Increase the number of slave threads. The change takes effect immediately
#
SET GLOBAL wsrep_slave_threads = 64;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--let $wait_condition = SELECT VARIABLE_VALUE = 64 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
#
......@@ -60,8 +58,8 @@ SET GLOBAL wsrep_slave_threads = 1;
--disable_result_log
--disable_query_log
# Generate 64 replication events
--let $count = 64
# Generate 70 replication events
--let $count = 70
while ($count)
{
INSERT INTO t2 VALUES (DEFAULT);
......@@ -73,120 +71,49 @@ while ($count)
--connection node_2
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%wsrep aborter%';
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--source include/wait_condition.inc
--let $wsrep_cluster_address_node2 = `SELECT @@wsrep_cluster_address`
--let $wsrep_provider_node2 = `SELECT @@wsrep_provider`
SET GLOBAL wsrep_slave_threads = 5;
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
SET GLOBAL wsrep_slave_threads = 1;
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
#
# test phase for bug https://github.com/codership/mysql-wsrep/issues/319
#
DROP TABLE t1;
DROP TABLE t2;
# shutdown node 2
--connection node_2
--echo Shutting down server ...
--source include/shutdown_mysqld.inc
--echo #
--echo # lp:1372840 - Changing wsrep_slave_threads causes future connections to hang
--echo #
# wait until node_1 is ready as one node cluster
--connection node_1
CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=INNODB;
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--source include/wait_condition.inc
show status like 'wsrep_cluster_size';
# step up slave threads to 6, and make sure all appliers and rollbacker thread are running
SET GLOBAL wsrep_slave_threads = 6;
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--connection node_2
SET GLOBAL wsrep_slave_threads = 4;
--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
# change to invalid cluster address
SET GLOBAL wsrep_slave_threads = 1;
SET GLOBAL wsrep_cluster_address='';
# join back to single node cluster
SET GLOBAL wsrep_cluster_address='gcomm://';
--source include/wait_until_connected_again.inc
# we should have 1 applier thread now
--let $wait_condition = SELECT COUNT(*) = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon'
--source include/wait_condition.inc
# test if we can increase applier count now (fails in bug #319)
SET GLOBAL wsrep_slave_threads = 10;
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--source include/wait_condition.inc
--connection node_1
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
DROP TABLE t1;
# restart node 2
--connection node_2
--source include/start_mysqld.inc
--source include/wait_until_connected_again.inc
SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND COMMAND != 'Daemon';
#
# Wait until above DDL is replicated
#
# cleanup to original state
# make sure that we are left with exactly one applier thread before we leaving the test
#
--connection node_1
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
--connection node_2
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig
--disable_result_log
--disable_query_log
# Generate 64 replication events, to help node 1 to purge excessive applier threads
--let $count = 64
while ($count)
{
INSERT INTO t2 VALUES (DEFAULT);
--dec $count
}
--enable_query_log
--enable_result_log
--connection node_1
--disable_result_log
--disable_query_log
# Generate 64 replication events, to help node 2 to purge excessive applier threads
--let $count = 64
while ($count)
{
INSERT INTO t2 VALUES (DEFAULT);
--dec $count
}
--enable_query_log
--enable_result_log
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--source include/wait_condition.inc
--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = @@wsrep_slave_threads + 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t2;
--connection node_1
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t2;
DROP TABLE t1;
DROP TABLE t2;
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t%';
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
......
......@@ -48,6 +48,17 @@ source include/print_gtid.inc;
# Cleanup
DROP TABLE t1, t2;
--echo #cleanup
--connection node_1
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--connection node_2
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--source include/galera_end.inc
--echo # End of test
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_3;
connection node_1;
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
connection node_2;
SELECT COUNT(*) = 10 FROM t1;
COUNT(*) = 10
1
Killing server ...
connection node_1;
INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
# restart
SELECT COUNT(*) = 20 FROM t1;
COUNT(*) = 20
1
DROP TABLE t1;
......@@ -20,5 +20,6 @@ DROP TABLE t1;
connection node_1;
include/assert_grep.inc [Streaming the backup to joiner at \[::1\]]
include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:]
connection node_2;
include/assert_grep.inc [IST receiver addr using tcp://\[::1\]]
include/assert_grep.inc [Prepared IST receiver for 3-6, listening at: tcp://\[::1\]]
#
# This test uses innobackupex to take a backup on node #2 and then restores that node from backup
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_mariabackup.inc
--let $galera_connection_name = node_3
--let $galera_server_number = 3
--source include/galera_connect.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--let $node_3=node_3
--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
--connection node_2
SELECT COUNT(*) = 10 FROM t1;
--exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup
--exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-backup.log
--exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --apply-log --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-apply.log
--source ../galera/include/kill_galera.inc
--sleep 1
--connection node_1
INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/*
--exec mariabackup --innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --copy-back --port=$NODE_MYPORT_2 --host=127.0.0.1 $MYSQL_TMP_DIR/innobackupex_backup &> $MYSQL_TMP_DIR/innobackupex-restore.log
#
# Convert the xtrabackup_galera_info into a grastate.dat file
#
--perl
use strict;
my $xtrabackup_galera_info_file = $ENV{'MYSQL_TMP_DIR'}.'/innobackupex_backup/xtrabackup_galera_info';
open(XTRABACKUP_GALERA_INFO, $xtrabackup_galera_info_file) or die "Can not open $xtrabackup_galera_info_file: $!";
my $xtrabackup_galera_info = <XTRABACKUP_GALERA_INFO>;
my ($uuid, $seqno) = split(':', $xtrabackup_galera_info);
my $grastate_dat_file = $ENV{'MYSQLTEST_VARDIR'}.'/mysqld.2/data/grastate.dat';
die "grastate.dat already exists" if -e $grastate_dat_file;
open(GRASTATE_DAT, ">$grastate_dat_file") or die "Can not write to $grastate_dat_file: $!";
print GRASTATE_DAT "version: 2.1\n";
print GRASTATE_DAT "uuid: $uuid\n";
print GRASTATE_DAT "seqno: $seqno\n";
print GRASTATE_DAT "cert_index:\n";
exit(0);
EOF
--source include/start_mysqld.inc
--sleep 5
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
SELECT COUNT(*) = 20 FROM t1;
DROP TABLE t1;
--sleep 10
--let $galera_connection_name = node_2a
--let $galera_server_number = 2
--source include/galera_connect.inc
--let $node_2=node_2a
# Restore original auto_increment_offset values.
--source ../galera/include/auto_increment_offset_restore.inc
......@@ -53,7 +53,9 @@ DROP TABLE t1;
--let $assert_select = async IST sender starting to serve tcp://\[::1\]:
--source include/assert_grep.inc
--connection node_2
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
--let $assert_only_after = CURRENT_TEST
# There are two ISTs on joiner, the first at the initial startup, the second
# during the actual test.
......
CREATE TABLE t1(f1 char(200), f2 char(200), f3 char(200),
f4 char(200), f5 char(200), f6 char(200),
f7 char(200), f8 char(200))ENGINE=InnoDB;
INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
SET DEBUG_SYNC = 'inplace_after_index_build SIGNAL rebuilt WAIT_FOR dml_pause';
SET DEBUG_SYNC = 'alter_table_inplace_before_lock_upgrade SIGNAL dml_restart WAIT_FOR dml_done';
SET DEBUG_SYNC = 'row_log_table_apply2_before SIGNAL ddl_start';
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
connect con1,localhost,root,,test;
SET DEBUG_SYNC = 'now WAIT_FOR rebuilt';
BEGIN;
INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
SET DEBUG_SYNC = 'now SIGNAL dml_pause';
SET DEBUG_SYNC = 'now WAIT_FOR dml_restart';
ROLLBACK;
BEGIN;
INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
INSERT INTO t1 SELECT '','','','','','','','' FROM seq_1_to_16384;
ROLLBACK;
BEGIN;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
ROLLBACK;
SET DEBUG_SYNC = 'now SIGNAL dml_done';
connect con2, localhost,root,,test;
SET DEBUG_SYNC = 'now WAIT_FOR ddl_start';
CREATE TABLE t2(f1 INT NOT NULL)ENGINE=InnoDB;
connection default;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` char(200) DEFAULT NULL,
`f2` char(200) DEFAULT NULL,
`f3` char(200) DEFAULT NULL,
`f4` char(200) DEFAULT NULL,
`f5` char(200) DEFAULT NULL,
`f6` char(200) DEFAULT NULL,
`f7` char(200) DEFAULT NULL,
`f8` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM t1;
COUNT(*)
16384
SET DEBUG_SYNC = 'RESET';
DROP TABLE t1, t2;
--- check_ibd_filesize.result
+++ check_ibd_filesize.result,32k
@@ -3,18 +3,12 @@
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 196608
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
-# bytes: 9437184
+# bytes: 786432
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 196608
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 4194304
-DROP TABLE t1;
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-# bytes: 65536
-INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 65536
+# bytes: 786432
DROP TABLE t1;
--- check_ibd_filesize.result
+++ check_ibd_filesize.result,4k
@@ -3,18 +3,18 @@
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 24576
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
# bytes: 9437184
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 24576
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
# bytes: 4194304
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-# bytes: 65536
+# bytes: 16384
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 65536
+# bytes: 25600
DROP TABLE t1;
--- check_ibd_filesize.result
+++ check_ibd_filesize.result,64k
@@ -3,18 +3,12 @@
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 393216
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
-# bytes: 9437184
+# bytes: 983040
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 393216
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 4194304
-DROP TABLE t1;
-CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
-ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-# bytes: 65536
-INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 65536
+# bytes: 1572864
DROP TABLE t1;
--- check_ibd_filesize.result
+++ check_ibd_filesize.result,8k
@@ -3,18 +3,18 @@
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 49152
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
# bytes: 9437184
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
-# bytes: 98304
+# bytes: 49152
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
# bytes: 4194304
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
-# bytes: 65536
+# bytes: 32768
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
-# bytes: 65536
+# bytes: 32768
DROP TABLE t1;
#
# Bug #21950389 SMALL TABLESPACES WITH BLOBS TAKE UP TO 80 TIMES MORE
# SPACE IN 5.7 THAN IN 5.6
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
# bytes: 98304
INSERT INTO t1 SELECT * FROM seq_1_to_25000;
# bytes: 9437184
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB) ENGINE=InnoDB;
# bytes: 98304
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
# bytes: 4194304
DROP TABLE t1;
CREATE TABLE t1 (a INT PRIMARY KEY, b BLOB)
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
# bytes: 65536
INSERT INTO t1 SELECT seq,REPEAT('a',30000) FROM seq_1_to_20;
# bytes: 65536
DROP TABLE t1;
connect con1, localhost, root,,;
connection default;
CREATE TABLE t1 ENGINE=InnoDB SELECT * FROM seq_1_to_100000000;
connection con1;
KILL QUERY @id;
disconnect con1;
connection default;
ERROR 70100: Query execution was interrupted
CREATE TABLE t1 (a SERIAL) ENGINE=InnoDB;
DROP TABLE t1;
This diff is collapsed.
call mtr.add_suppression("Cannot add field `u` in table `test`.`t2` because after adding it, the row size is");
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
......@@ -7,6 +8,7 @@ ha blob,ia blob,ja blob,ka blob,la blob,ma blob,na blob,
oa blob,pa blob,qa blob,ra blob,sa blob,ta blob,ua blob,
va blob, wa blob, xa blob, ya blob, za blob)
ENGINE=InnoDB ROW_FORMAT=dynamic;
SET innodb_strict_mode=OFF;
CREATE TABLE t2(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
......@@ -16,6 +18,9 @@ ha blob,ia blob,ja blob,ka blob,la blob,ma blob,na blob,
oa blob,pa blob,qa blob,ra blob,sa blob,ta blob,ua blob,
va blob, wa blob, xa blob, ya blob, za blob)
ENGINE=InnoDB ROW_FORMAT=compact;
Warnings:
Warning 139 Row size too large (> 16318). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
SET innodb_strict_mode=ON;
SET @a = repeat('a', 767);
SET @b = repeat('b', 767);
SET @c = repeat('c', 767);
......
......@@ -27,129 +27,9 @@ c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(121)
) ROW_FORMAT=redundant;
DROP TABLE t1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(122)
) ROW_FORMAT=redundant;
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(200), c82 char(82)
) ROW_FORMAT=compact;
DROP TABLE t1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(200), c82 char(83)
) ROW_FORMAT=compact;
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(63)
) ROW_FORMAT=compressed;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(200), c82 char(82)
) ROW_FORMAT=dynamic;
DROP TABLE t1;
CREATE TABLE t1 (
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
c16 char(200), c17 char(200), c18 char(200), c19 char(200), c20 char(200),
c21 char(200), c22 char(200), c23 char(200), c24 char(200), c25 char(200),
c26 char(200), c27 char(200), c28 char(200), c29 char(200), c30 char(200),
c31 char(200), c32 char(200), c33 char(200), c34 char(200), c35 char(200),
c36 char(200), c37 char(200), c38 char(200), c39 char(200), c40 char(200),
c41 char(200), c42 char(200), c43 char(200), c44 char(200), c45 char(200),
c46 char(200), c47 char(200), c48 char(200), c49 char(200), c50 char(200),
c51 char(200), c52 char(200), c53 char(200), c54 char(200), c55 char(200),
c56 char(200), c57 char(200), c58 char(200), c59 char(200), c60 char(200),
c61 char(200), c62 char(200), c63 char(200), c64 char(200), c65 char(200),
c66 char(200), c67 char(200), c68 char(200), c69 char(200), c70 char(200),
c71 char(200), c72 char(200), c73 char(200), c74 char(200), c75 char(200),
c76 char(200), c77 char(200), c78 char(200), c79 char(200), c80 char(200),
c81 char(200), c82 char(83)
) ROW_FORMAT=dynamic;
ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
CREATE TABLE t1 (a varchar(255) character set utf8,
b varchar(255) character set utf8,
c varchar(255) character set utf8,
......
call mtr.add_suppression("Cannot add field `pa` in table `test`.`t2` because after adding it, the row size is");
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
......@@ -15,6 +16,7 @@ hc blob, ic blob, jc blob, kc blob, lc blob,mc blob,nc blob,
oc blob, pc blob, qc blob, rc blob, sc blob,tc blob,uc blob,
vc blob, wc blob, xc blob, yc blob, zc blob
) ENGINE=InnoDB ROW_FORMAT=dynamic;
SET innodb_strict_mode=OFF;
CREATE TABLE t2(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
......@@ -32,6 +34,9 @@ hc blob, ic blob, jc blob, kc blob, lc blob,mc blob,nc blob,
oc blob, pc blob, qc blob, rc blob, sc blob,tc blob,uc blob,
vc blob, wc blob, xc blob, yc blob, zc blob
) ENGINE=InnoDB ROW_FORMAT=compact;
Warnings:
Warning 139 Row size too large (> 32702). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
SET innodb_strict_mode=ON;
SET @a = repeat('a', 767);
SET @b = repeat('b', 767);
SET @c = repeat('c', 767);
......
SELECT table_id INTO @table_stats_id FROM information_schema.innodb_sys_tables
WHERE name = 'mysql/innodb_table_stats';
SELECT table_id INTO @index_stats_id FROM information_schema.innodb_sys_tables
WHERE name = 'mysql/innodb_index_stats';
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE table_id NOT IN (@table_stats_id, @index_stats_id) ORDER BY table_id;
TABLE_ID NAME FLAG N_COLS SPACE ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
11 SYS_FOREIGN 0 7 0 Redundant 0 System
12 SYS_FOREIGN_COLS 0 7 0 Redundant 0 System
13 SYS_TABLESPACES 0 6 0 Redundant 0 System
14 SYS_DATAFILES 0 5 0 Redundant 0 System
15 SYS_VIRTUAL 0 6 0 Redundant 0 System
18 mysql/transaction_registry 33 8 3 Dynamic 0 Single
SELECT table_id,pos,mtype,prtype,len,name
FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
WHERE table_id NOT IN (@table_stats_id, @index_stats_id)
ORDER BY table_id, pos;
table_id pos mtype prtype len name
11 0 1 524292 0 ID
11 1 1 524292 0 FOR_NAME
11 2 1 524292 0 REF_NAME
11 3 6 0 4 N_COLS
12 0 1 524292 0 ID
12 1 6 0 4 POS
12 2 1 524292 0 FOR_COL_NAME
12 3 1 524292 0 REF_COL_NAME
13 0 6 0 4 SPACE
13 1 1 524292 0 NAME
13 2 6 0 4 FLAGS
14 0 6 0 4 SPACE
14 1 1 524292 0 PATH
15 0 6 0 8 TABLE_ID
15 1 6 0 4 POS
15 2 6 0 4 BASE_POS
18 0 6 1800 8 transaction_id
18 1 6 1800 8 commit_id
18 2 3 526087 7 begin_timestamp
18 3 3 526087 7 commit_timestamp
18 4 6 1022 1 isolation_level
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES
WHERE table_id NOT IN (@table_stats_id, @index_stats_id) ORDER BY index_id;
INDEX_ID NAME TABLE_ID TYPE N_FIELDS PAGE_NO SPACE MERGE_THRESHOLD
# ID_IND # 3 1 # # 50
# FOR_IND # 0 1 # # 50
# REF_IND # 0 1 # # 50
# ID_IND # 3 2 # # 50
# SYS_TABLESPACES_SPACE # 3 1 # # 50
# SYS_DATAFILES_SPACE # 3 1 # # 50
# BASE_IDX # 3 3 # # 50
# PRIMARY # 3 1 # # 50
# commit_id # 2 1 # # 50
# begin_timestamp # 0 1 # # 50
# commit_timestamp # 0 2 # # 50
SELECT index_id,pos,name FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS
WHERE name NOT IN ('database_name', 'table_name', 'index_name', 'stat_name')
ORDER BY index_id, pos;
index_id pos name
11 0 ID
12 0 FOR_NAME
13 0 REF_NAME
14 0 ID
14 1 POS
15 0 SPACE
16 0 SPACE
17 0 TABLE_ID
17 1 POS
17 2 BASE_POS
20 0 transaction_id
21 0 commit_id
22 0 begin_timestamp
23 0 commit_timestamp
23 1 transaction_id
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
ID FOR_NAME REF_NAME N_COLS TYPE
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
ID FOR_COL_NAME REF_COL_NAME POS
CREATE TABLE t_redundant (a INT KEY, b TEXT) ROW_FORMAT=REDUNDANT ENGINE=innodb;
CREATE TABLE t_compact (a INT KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=innodb;
CREATE TABLE t_compressed (a INT KEY, b TEXT) ROW_FORMAT=COMPRESSED ENGINE=innodb KEY_BLOCK_SIZE=2;
CREATE TABLE t_dynamic (a INT KEY, b TEXT) ROW_FORMAT=DYNAMIC ENGINE=innodb;
=== information_schema.innodb_sys_tables and innodb_sys_tablespaces ===
Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
test/t_compact test/t_compact 1 5 Compact 0 Single
test/t_compressed test/t_compressed 37 5 Compressed 2048 Single
test/t_dynamic test/t_dynamic 33 5 Dynamic 0 Single
test/t_redundant test/t_redundant 0 5 Redundant 0 Single
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
Space_Name Space_Type Page_Size Zip_Size Path
test/t_redundant Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_redundant.ibd
test/t_compact Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_compact.ibd
test/t_compressed Single DEFAULT 2048 MYSQLD_DATADIR/test/t_compressed.ibd
test/t_dynamic Single DEFAULT DEFAULT MYSQLD_DATADIR/test/t_dynamic.ibd
DROP TABLE t_redundant, t_compact, t_compressed, t_dynamic;
SELECT count(*) FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
count(*)
8
CREATE TABLE parent (id INT NOT NULL,
PRIMARY KEY (id)) ENGINE=INNODB;
CREATE TABLE child (id INT, parent_id INT,
INDEX par_ind (parent_id),
CONSTRAINT constraint_test
FOREIGN KEY (parent_id) REFERENCES parent(id)
ON DELETE CASCADE) ENGINE=INNODB;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
ID FOR_NAME REF_NAME N_COLS TYPE
test/constraint_test test/child test/parent 1 1
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
ID FOR_COL_NAME REF_COL_NAME POS
test/constraint_test parent_id id 0
INSERT INTO parent VALUES(1);
SELECT name, num_rows, ref_count
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name LIKE "%parent";
name num_rows ref_count
test/parent 1 1
SELECT NAME, FLAG, N_COLS FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE name NOT LIKE 'sys/%';
NAME FLAG N_COLS
SYS_DATAFILES 0 5
SYS_FOREIGN 0 7
SYS_FOREIGN_COLS 0 7
SYS_TABLESPACES 0 6
SYS_VIRTUAL 0 6
mysql/innodb_index_stats 33 11
mysql/innodb_table_stats 33 9
mysql/transaction_registry 33 8
test/child 33 5
test/parent 33 4
SELECT name, n_fields
from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
WHERE table_id In (SELECT table_id from
INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE name LIKE "%parent%");
name n_fields
PRIMARY 1
SELECT name, n_fields
from INFORMATION_SCHEMA.INNODB_SYS_INDEXES
WHERE table_id In (SELECT table_id from
INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE name LIKE "%child%");
name n_fields
GEN_CLUST_INDEX 0
par_ind 1
SELECT name, pos, mtype, len
from INFORMATION_SCHEMA.INNODB_SYS_COLUMNS
WHERE table_id In (SELECT table_id from
INFORMATION_SCHEMA.INNODB_SYS_TABLES
WHERE name LIKE "%child%");
name pos mtype len
id 0 6 4
parent_id 1 6 4
DROP TABLE child;
DROP TABLE parent;
CREATE TABLE parent (id INT NOT NULL, newid INT NOT NULL,
PRIMARY KEY (id, newid)) ENGINE=INNODB;
CREATE TABLE child (id INT, parent_id INT,
INDEX par_ind (parent_id),
CONSTRAINT constraint_test
FOREIGN KEY (id, parent_id) REFERENCES parent(id, newid)
ON DELETE CASCADE) ENGINE=INNODB;
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
ID FOR_NAME REF_NAME N_COLS TYPE
test/constraint_test test/child test/parent 2 1
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
ID FOR_COL_NAME REF_COL_NAME POS
test/constraint_test id id 0
test/constraint_test parent_id newid 1
INSERT INTO parent VALUES(1, 9);
SELECT * FROM parent WHERE id IN (SELECT id FROM parent);
id newid
1 9
SELECT name, num_rows, ref_count
FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS
WHERE name LIKE "%parent";
name num_rows ref_count
test/parent 1 2
DROP TABLE child;
DROP TABLE parent;
CREATE TABLE t1 (a INT, b INT AS (a), KEY(b)) ENGINE=InnoDB;
INSERT INTO t1 () VALUES (),();
connect con1,localhost,root,,test;
ALTER TABLE t1 ADD COLUMN x INT as (a), add key(x), ALGORITHM=COPY;
SET debug_sync= "ib_open_after_dict_open SIGNAL delete_open WAIT_FOR another_open";
DELETE FROM t1;
connection default;
SET debug_sync= "now WAIT_FOR delete_open";
SET debug_sync= "ib_open_after_dict_open SIGNAL another_open";
SELECT a FROM t1;
a
NULL
NULL
connection con1;
disconnect con1;
connection default;
SET debug_sync= "RESET";
DROP TABLE t1;
call mtr.add_suppression("Cannot find space id [0-9]+ in the tablespace memory cache");
call mtr.add_suppression("Cannot rename table 'test/t1' to 'test/t2' since the dictionary cache already contains 'test/t2'.");
#
# WL5980 Remote tablespace debug error injection tests.
#
CREATE TABLE t1 (a int KEY, b text) ENGINE=Innodb DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir' ;
INSERT INTO t1 VALUES (1, 'tablespace');
SELECT * FROM t1;
a b
1 tablespace
#
# Test the second injection point in fil_rename_tablespace().
# Make sure the table is useable after this failure.
#
SET @save_dbug=@@debug_dbug;
SET debug_dbug="+d,fil_rename_tablespace_failure_2";
RENAME TABLE t1 TO t2;
SET debug_dbug=@save_dbug;
INSERT INTO t1 VALUES (2, 'tablespace');
SELECT * FROM t1;
a b
1 tablespace
2 tablespace
#
# Cleanup
#
DROP TABLE t1;
......@@ -14,53 +14,6 @@ col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255)
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
ENGINE = innodb ROW_FORMAT= COMPACT;
ERROR 42000: Row size too large (> 16318). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
ENGINE = innodb ROW_FORMAT= DYNAMIC;
ERROR 42000: Row size too large (> 16318). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
show warnings;
Level Code Message
Error 1118 Row size too large (> 16318). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
Warning 1030 Got error 139 "Too big row" from storage engine InnoDB
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
ENGINE = innodb ROW_FORMAT=REDUNDANT;
ERROR 42000: Row size too large (> 16315). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
show warnings;
Level Code Message
Error 1118 Row size too large (> 16315). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 1030 Got error 139 "Too big row" from storage engine InnoDB
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
ENGINE = innodb ROW_FORMAT=FIXED;
ERROR HY000: Can't create table `test`.`tab5` (errno: 140 "Wrong create options")
show warnings;
......@@ -133,6 +86,8 @@ col48 VARCHAR(255),col49 VARCHAR(255),col50 VARCHAR(255),col51 VARCHAR(255),col5
col54 VARCHAR(255),col55 VARCHAR(255),col56 VARCHAR(255),col57 VARCHAR(255),col58 VARCHAR(255), col59 VARCHAR(255),
col60 VARCHAR(255),col61 VARCHAR(255),col62 VARCHAR(255),col63 VARCHAR(255),col64 VARCHAR(255), col65 VARCHAR(255))
ENGINE = innodb ROW_FORMAT=COMPACT;
Warnings:
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
......@@ -191,6 +146,8 @@ col48 VARCHAR(255),col49 VARCHAR(255),col50 VARCHAR(255),col51 VARCHAR(255),col5
col54 VARCHAR(255),col55 VARCHAR(255),col56 VARCHAR(255),col57 VARCHAR(255),col58 VARCHAR(255), col59 VARCHAR(255),
col60 VARCHAR(255),col61 VARCHAR(255),col62 VARCHAR(255),col63 VARCHAR(255),col64 VARCHAR(255), col65 VARCHAR(255))
ENGINE = innodb ROW_FORMAT=DYNAMIC;
Warnings:
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
......@@ -265,6 +222,8 @@ col48 VARCHAR(255),col49 VARCHAR(255),col50 VARCHAR(255),col51 VARCHAR(255),col5
col54 VARCHAR(255),col55 VARCHAR(255),col56 VARCHAR(255),col57 VARCHAR(255),col58 VARCHAR(255), col59 VARCHAR(255),
col60 VARCHAR(255),col61 VARCHAR(255),col62 VARCHAR(255),col63 VARCHAR(255),col64 VARCHAR(255), col65 VARCHAR(255))
ENGINE = innodb ROW_FORMAT=REDUNDANT;
Warnings:
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
......@@ -310,6 +269,7 @@ col60 VARCHAR(255),col61 VARCHAR(255),col62 VARCHAR(255),col63 VARCHAR(255),col6
ENGINE = innodb ROW_FORMAT=COMPRESSED;
Warnings:
Warning 1478 InnoDB: Cannot create a COMPRESSED table when innodb_page_size > NNNNk. Assuming ROW_FORMAT=DYNAMIC.
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
DROP TABLE tab5;
CREATE TABLE t(col BLOB) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
SHOW WARNINGS;
......
......@@ -13,73 +13,6 @@ col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255)
col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255),
ccol1 CHAR(255),ccol2 CHAR(255),ccol3 CHAR(255),ccol4 CHAR(255),ccol5 CHAR(255),
ccol6 CHAR(255),ccol7 CHAR(255),ccol8 CHAR(255),ccol9 CHAR(255),ccol10 CHAR(255), ccol11 CHAR(255),
ccol12 CHAR(255),ccol13 CHAR(255),ccol14 CHAR(255),ccol15 CHAR(255),ccol16 CHAR(255), ccol17 CHAR(255),
ccol18 CHAR(255),ccol19 CHAR(255),ccol20 CHAR(255),ccol21 CHAR(255),ccol22 CHAR(255), ccol23 CHAR(255),
ccol24 CHAR(255),ccol25 CHAR(255),ccol26 CHAR(255),ccol27 CHAR(255),ccol28 CHAR(255), ccol29 CHAR(255),
ccol30 CHAR(255),ccol31 CHAR(255),ccol32 CHAR(255),ccol33 CHAR(255),ccol34 CHAR(255), ccol35 CHAR(255),
ccol36 CHAR(255),ccol37 CHAR(255),ccol38 CHAR(255),ccol39 CHAR(255),ccol40 CHAR(255), ccol41 CHAR(255),
ccol42 CHAR(255),ccol43 CHAR(255),ccol44 CHAR(255),ccol45 CHAR(255),ccol46 CHAR(255), ccol47 CHAR(255),
ccol48 CHAR(255),ccol49 CHAR(255),ccol50 CHAR(255),ccol51 CHAR(255),ccol52 CHAR(255), ccol53 CHAR(255),
ccol54 CHAR(255),ccol55 CHAR(255),ccol56 CHAR(255),ccol57 CHAR(255),ccol58 CHAR(255), ccol59 CHAR(255),
ccol60 CHAR(255),ccol61 CHAR(255),ccol62 CHAR(255),ccol63 CHAR(255),ccol64 CHAR(255), ccol65 CHAR(255)
)
ENGINE = innodb ROW_FORMAT= COMPACT;
ERROR 42000: Row size too large (> 16383). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255),
ccol1 CHAR(255),ccol2 CHAR(255),ccol3 CHAR(255),ccol4 CHAR(255),ccol5 CHAR(255),
ccol6 CHAR(255),ccol7 CHAR(255),ccol8 CHAR(255),ccol9 CHAR(255),ccol10 CHAR(255), ccol11 CHAR(255),
ccol12 CHAR(255),ccol13 CHAR(255),ccol14 CHAR(255),ccol15 CHAR(255),ccol16 CHAR(255), ccol17 CHAR(255),
ccol18 CHAR(255),ccol19 CHAR(255),ccol20 CHAR(255),ccol21 CHAR(255),ccol22 CHAR(255), ccol23 CHAR(255),
ccol24 CHAR(255),ccol25 CHAR(255),ccol26 CHAR(255),ccol27 CHAR(255),ccol28 CHAR(255), ccol29 CHAR(255),
ccol30 CHAR(255),ccol31 CHAR(255),ccol32 CHAR(255),ccol33 CHAR(255),ccol34 CHAR(255), ccol35 CHAR(255),
ccol36 CHAR(255),ccol37 CHAR(255),ccol38 CHAR(255),ccol39 CHAR(255),ccol40 CHAR(255), ccol41 CHAR(255),
ccol42 CHAR(255),ccol43 CHAR(255),ccol44 CHAR(255),ccol45 CHAR(255),ccol46 CHAR(255), ccol47 CHAR(255),
ccol48 CHAR(255),ccol49 CHAR(255),ccol50 CHAR(255),ccol51 CHAR(255),ccol52 CHAR(255), ccol53 CHAR(255),
ccol54 CHAR(255),ccol55 CHAR(255),ccol56 CHAR(255),ccol57 CHAR(255),ccol58 CHAR(255), ccol59 CHAR(255),
ccol60 CHAR(255),ccol61 CHAR(255),ccol62 CHAR(255),ccol63 CHAR(255),ccol64 CHAR(255), ccol65 CHAR(255)
)
ENGINE = innodb ROW_FORMAT= DYNAMIC;
ERROR 42000: Row size too large (> 16383). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
ENGINE = innodb ROW_FORMAT=REDUNDANT;
ERROR 42000: Row size too large (> 16382). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
show warnings;
Level Code Message
Error 1118 Row size too large (> 16382). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
Warning 1030 Got error 139 "Too big row" from storage engine InnoDB
CREATE TABLE tab5(col1 CHAR (255), col2 CHAR (255), col3 CHAR(255),col4 CHAR(255), col5 CHAR(255),
col6 CHAR(255), col7 CHAR(255), col8 CHAR(255), col9 CHAR(255),col10 CHAR(255), col11 CHAR(255),
col12 CHAR(255), col13 CHAR(255),col14 CHAR(255),col15 CHAR(255),col16 CHAR(255), col17 CHAR(255),
col18 CHAR(255),col19 CHAR(255),col20 CHAR(255),col21 CHAR(255),col22 CHAR(255), col23 CHAR(255),
col24 CHAR(255),col25 CHAR(255),col26 CHAR(255),col27 CHAR(255),col28 CHAR(255), col29 CHAR(255),
col30 CHAR(255),col31 CHAR(255),col32 CHAR(255),col33 CHAR(255),col34 CHAR(255), col35 CHAR(255),
col36 CHAR(255),col37 CHAR(255),col38 CHAR(255),col39 CHAR(255),col40 CHAR(255), col41 CHAR(255),
col42 CHAR(255),col43 CHAR(255),col44 CHAR(255),col45 CHAR(255),col46 CHAR(255), col47 CHAR(255),
col48 CHAR(255),col49 CHAR(255),col50 CHAR(255),col51 CHAR(255),col52 CHAR(255), col53 CHAR(255),
col54 CHAR(255),col55 CHAR(255),col56 CHAR(255),col57 CHAR(255),col58 CHAR(255), col59 CHAR(255),
col60 CHAR(255),col61 CHAR(255),col62 CHAR(255),col63 CHAR(255),col64 CHAR(255), col65 CHAR(255))
ENGINE = innodb ROW_FORMAT=FIXED;
ERROR HY000: Can't create table `test`.`tab5` (errno: 140 "Wrong create options")
......@@ -190,6 +123,8 @@ ccol54 VARCHAR(255),ccol55 VARCHAR(255),ccol56 VARCHAR(255),ccol57 VARCHAR(255),
ccol60 VARCHAR(255),ccol61 VARCHAR(255),ccol62 VARCHAR(255),ccol63 VARCHAR(255),ccol64 VARCHAR(255), ccol65 VARCHAR(255)
)
ENGINE = innodb ROW_FORMAT=COMPACT;
Warnings:
Warning 139 Row size too large (> 32702). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
......@@ -300,6 +235,8 @@ ccol54 VARCHAR(255),ccol55 VARCHAR(255),ccol56 VARCHAR(255),ccol57 VARCHAR(255),
ccol60 VARCHAR(255),ccol61 VARCHAR(255),ccol62 VARCHAR(255),ccol63 VARCHAR(255),ccol64 VARCHAR(255), ccol65 VARCHAR(255)
)
ENGINE = innodb ROW_FORMAT=DYNAMIC;
Warnings:
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
......@@ -440,6 +377,8 @@ ccol54 VARCHAR(255),ccol55 VARCHAR(255),ccol56 VARCHAR(255),ccol57 VARCHAR(255),
ccol60 VARCHAR(255),ccol61 VARCHAR(255),ccol62 VARCHAR(255),ccol63 VARCHAR(255),ccol64 VARCHAR(255), ccol65 VARCHAR(255)
)
ENGINE = innodb ROW_FORMAT=REDUNDANT;
Warnings:
Warning 139 Row size too large (> NNNN). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
INSERT INTO tab5 values(repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),repeat('a',255),
......
#
# MDEV-11369: Instant ADD COLUMN for InnoDB
#
call mtr.add_suppression("Cannot add field `.*` in table `test`.`.*` because after adding it, the row size is");
CREATE TABLE t(a INT UNIQUE)ENGINE=InnoDB ROW_FORMAT=COMPACT;
ALTER TABLE t ADD e INT, ROW_FORMAT=COMPRESSED;
INSERT INTO t SET a=1;
......@@ -332,6 +333,8 @@ affected rows: 1
Warnings:
Note 1265 Data truncated for column 'c7' at row 1
Note 1265 Data truncated for column 'c8' at row 1
SET innodb_strict_mode = OFF;
affected rows: 0
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
affected rows: 4
......@@ -350,6 +353,8 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
ALTER TABLE t3 DROP c3, DROP c7;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SET innodb_strict_mode = OFF;
affected rows: 0
SELECT * FROM t3;
id c2 c4 c5 c6 c8 phrase b
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
......@@ -1156,6 +1161,8 @@ affected rows: 1
Warnings:
Note 1265 Data truncated for column 'c7' at row 1
Note 1265 Data truncated for column 'c8' at row 1
SET innodb_strict_mode = OFF;
affected rows: 0
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
affected rows: 4
......@@ -1174,6 +1181,8 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
ALTER TABLE t3 DROP c3, DROP c7;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SET innodb_strict_mode = OFF;
affected rows: 0
SELECT * FROM t3;
id c2 c4 c5 c6 c8 phrase b
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
......@@ -1980,6 +1989,8 @@ affected rows: 1
Warnings:
Note 1265 Data truncated for column 'c7' at row 1
Note 1265 Data truncated for column 'c8' at row 1
SET innodb_strict_mode = OFF;
affected rows: 0
ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448,
CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business';
affected rows: 4
......@@ -1998,6 +2009,8 @@ id c2 c3 c4 c5 c6 c7 c8 phrase b
ALTER TABLE t3 DROP c3, DROP c7;
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
SET innodb_strict_mode = OFF;
affected rows: 0
SELECT * FROM t3;
id c2 c4 c5 c6 c8 phrase b
1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog
......
......@@ -128,6 +128,32 @@ HANDLER h READ `PRIMARY` PREV WHERE 0;
pk f1 f2 f3 f4 f5 f6 f7 f8 filler
HANDLER h CLOSE;
DROP TABLE t1;
CREATE TABLE t1(f1 int not null, primary key(f1))engine=innodb;
CREATE TABLE t2(f1 INT AUTO_INCREMENT NOT NULL, f2 INT NOT NULL,
status ENUM ('a', 'b', 'c'), INDEX idx1(f2),
PRIMARY KEY(f1),
FOREIGN KEY (f2) REFERENCES t1(f1))ENGINE=InnoDB;
ALTER TABLE t1 CHANGE f1 f1_id INT NOT NULL, ADD f3 VARCHAR(255) DEFAULT NULL;
ALTER TABLE t1 CHANGE f1_id f1 INT NOT NULL;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f3` varchar(255) DEFAULT NULL,
PRIMARY KEY (`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f1` int(11) NOT NULL AUTO_INCREMENT,
`f2` int(11) NOT NULL,
`status` enum('a','b','c') DEFAULT NULL,
PRIMARY KEY (`f1`),
KEY `idx1` (`f2`),
CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t2 CHANGE status status VARCHAR(20) DEFAULT NULL;
DROP TABLE t2, t1;
create table t (
a varchar(9),
b int,
......
--- max_record_size.result 2019-07-03 11:54:44.591421526 +0300
+++ max_record_size.reject 2019-07-03 12:51:26.070418078 +0300
@@ -3,45 +3,65 @@
c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255)
+c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
+c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
+c29 CHAR(255), c30 CHAR(255), c31 CHAR(255)
) ENGINE=INNODB;
DROP TABLE t1;
CREATE TABLE t1 (
c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255),
c5 CHAR(255), c6 CHAR(255), c7 CHAR(255), c8 CHAR(255),
c9 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
-c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255)
+c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
+c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
+c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
+c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
+c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
) ENGINE=INNODB;
-ERROR 42000: Row size too large (> 4027). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
CREATE TABLE t1 (
c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255)
+c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255)
) ENGINE=INNODB;
DROP TABLE t1;
CREATE TABLE t1 (
c1 VARCHAR(255), c2 VARCHAR(255), c3 VARCHAR(255), c4 VARCHAR(255),
c5 VARCHAR(255), c6 VARCHAR(255), c7 VARCHAR(255), c8 VARCHAR(255),
c9 VARCHAR(255), c10 VARCHAR(255), c11 VARCHAR(255), c12 VARCHAR(255),
-c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255)
+c13 VARCHAR(255), c14 VARCHAR(255), c15 VARCHAR(255), c16 VARCHAR(255),
+c17 VARCHAR(255), c18 VARCHAR(255), c19 VARCHAR(255), c20 VARCHAR(255),
+c21 VARCHAR(255), c22 VARCHAR(255), c23 VARCHAR(255), c24 VARCHAR(255),
+c25 VARCHAR(255), c26 VARCHAR(255), c27 VARCHAR(255), c28 VARCHAR(255),
+c29 VARCHAR(255), c30 VARCHAR(255), c31 VARCHAR(255), c32 VARCHAR(255)
) ENGINE=INNODB;
-ERROR 42000: Row size too large (> 4027). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
CREATE TABLE t1 (
c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
-c5 VARCHAR(788)
+c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+c9 VARCHAR(788), c10 VARCHAR(788)
) ENGINE=INNODB;
DROP TABLE t1;
CREATE TABLE t1 (
c1 VARCHAR(788), c2 VARCHAR(788), c3 VARCHAR(788), c4 VARCHAR(788),
-c5 VARCHAR(788), c6 VARCHAR(788)
+c5 VARCHAR(788), c6 VARCHAR(788), c7 VARCHAR(788), c8 VARCHAR(788),
+c9 VARCHAR(788), c10 VARCHAR(788), c11 VARCHAR(788)
) ENGINE=INNODB;
-ERROR 42000: Row size too large (> 4027). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
CREATE TABLE t1 (
-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT
+c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+c8 TEXT, c9 TEXT, c10 TEXT
) ENGINE=INNODB;
DROP TABLE t1;
CREATE TABLE t1 (
-c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT
+c1 TEXT, c2 TEXT, c3 TEXT, c4 TEXT, c5 TEXT, c6 TEXT, c7 TEXT,
+c8 TEXT, c9 TEXT, c10 TEXT, c11 TEXT
) ENGINE=INNODB;
-ERROR 42000: Row size too large (> 4027). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
+ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment