mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.11 into 11.0
This commit is contained in:
12
mysql-test/suite/binlog/r/binlog_gis_user_var_stm.result
Normal file
12
mysql-test/suite/binlog/r/binlog_gis_user_var_stm.result
Normal file
@@ -0,0 +1,12 @@
|
||||
SET @g0= POINT(1,1);
|
||||
SET @g1= Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)));
|
||||
CREATE TABLE t1 AS SELECT @g0 AS g0, @g1 AS g1;
|
||||
DROP TABLE t1;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # User var # # @`g0`=/*point*/_binary X'000000000101000000000000000000F03F000000000000F03F' COLLATE binary
|
||||
master-bin.000001 # User var # # @`g1`=/*polygon*/_binary X'0000000001030000000100000004000000000000000000000000000000000000000000000000003E4000000000000000000000000000003E400000000000003E4000000000000000000000000000000000' COLLATE binary
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 AS SELECT @g0 AS g0, @g1 AS g1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
|
15
mysql-test/suite/binlog/t/binlog_gis_user_var_stm.test
Normal file
15
mysql-test/suite/binlog/t/binlog_gis_user_var_stm.test
Normal file
@@ -0,0 +1,15 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_binlog_format_statement.inc
|
||||
--source include/have_geometry.inc
|
||||
|
||||
--disable_query_log
|
||||
reset master; # get rid of previous tests binlog
|
||||
--enable_query_log
|
||||
|
||||
SET @g0= POINT(1,1);
|
||||
SET @g1= Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)));
|
||||
CREATE TABLE t1 AS SELECT @g0 AS g0, @g1 AS g1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--let $binlog_file = LAST
|
||||
source include/show_binlog_events.inc;
|
@@ -1,6 +1,6 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_csv.inc
|
||||
--source include/have_normal_bzip.inc
|
||||
--source include/have_normal_zlib.inc
|
||||
|
||||
SET sql_mode=ORACLE;
|
||||
|
||||
|
36
mysql-test/suite/federated/update.result
Normal file
36
mysql-test/suite/federated/update.result
Normal file
@@ -0,0 +1,36 @@
|
||||
connect master,127.0.0.1,root,,test,$MASTER_MYPORT,;
|
||||
connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
|
||||
connection master;
|
||||
CREATE DATABASE federated;
|
||||
connection slave;
|
||||
CREATE DATABASE federated;
|
||||
#
|
||||
# MDEV-32984 Update federated table and column privileges
|
||||
#
|
||||
connection slave;
|
||||
create database db1;
|
||||
create user my@localhost identified by '1qaz2wsx';
|
||||
create table db1.t1 (
|
||||
f1 int auto_increment primary key,
|
||||
f2 varchar(50),
|
||||
f3 varchar(50),
|
||||
unique (f2)
|
||||
);
|
||||
grant insert, select (f1, f2, f3), update (f3) on db1.t1 to my@localhost;
|
||||
connection master;
|
||||
create table tt1 engine=federated connection='mysql://my:1qaz2wsx@localhost:$SLAVE_MYPORT/db1/t1';
|
||||
insert into tt1 (f2,f3) values ('test','123');
|
||||
select * from tt1;
|
||||
f1 f2 f3
|
||||
1 test 123
|
||||
update tt1 set f3='123456' where f2='test';
|
||||
drop table tt1;
|
||||
connection slave;
|
||||
drop database db1;
|
||||
drop user my@localhost;
|
||||
connection master;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
connection slave;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
32
mysql-test/suite/federated/update.test
Normal file
32
mysql-test/suite/federated/update.test
Normal file
@@ -0,0 +1,32 @@
|
||||
source include/federated.inc;
|
||||
source have_federatedx.inc;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32984 Update federated table and column privileges
|
||||
--echo #
|
||||
connection slave;
|
||||
create database db1;
|
||||
create user my@localhost identified by '1qaz2wsx';
|
||||
create table db1.t1 (
|
||||
f1 int auto_increment primary key,
|
||||
f2 varchar(50),
|
||||
f3 varchar(50),
|
||||
unique (f2)
|
||||
);
|
||||
grant insert, select (f1, f2, f3), update (f3) on db1.t1 to my@localhost;
|
||||
|
||||
connection master;
|
||||
evalp create table tt1 engine=federated connection='mysql://my:1qaz2wsx@localhost:$SLAVE_MYPORT/db1/t1';
|
||||
insert into tt1 (f2,f3) values ('test','123');
|
||||
select * from tt1;
|
||||
update tt1 set f3='123456' where f2='test';
|
||||
|
||||
drop table tt1;
|
||||
|
||||
connection slave;
|
||||
drop database db1;
|
||||
drop user my@localhost;
|
||||
|
||||
source include/federated_cleanup.inc;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# MDEV-32242 innodb.doublewrite test case always is skipped
|
||||
#
|
||||
create table t1 (f1 int primary key, f2 blob) engine=innodb stats_persistent=0;
|
||||
create table t1 (f1 int primary key, f2 blob) stats_persistent=0, engine=innodb;
|
||||
start transaction;
|
||||
insert into t1 values(1, repeat('#',12));
|
||||
insert into t1 values(2, repeat('+',12));
|
||||
@@ -19,6 +19,7 @@ XA PREPARE 'x';
|
||||
disconnect dml;
|
||||
connection default;
|
||||
flush table t1 for export;
|
||||
# Kill the server
|
||||
# restart
|
||||
FOUND 1 /InnoDB: Restoring page \[page id: space=[1-9][0-9]*, page number=0\] of datafile/ in mysqld.1.err
|
||||
FOUND 1 /InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page number=3\]/ in mysqld.1.err
|
||||
@@ -33,5 +34,27 @@ f1 f2
|
||||
3 ////////////
|
||||
4 ------------
|
||||
5 ............
|
||||
connect dml,localhost,root,,;
|
||||
XA START 'x';
|
||||
insert into t1 values (6, repeat('%', @@innodb_page_size/2));
|
||||
XA END 'x';
|
||||
XA PREPARE 'x';
|
||||
disconnect dml;
|
||||
connection default;
|
||||
flush table t1 for export;
|
||||
# Kill the server
|
||||
# restart
|
||||
FOUND 1 /InnoDB: Restoring page \[page id: space=[1-9][0-9]*, page number=0\] of datafile/ in mysqld.1.err
|
||||
XA ROLLBACK 'x';
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
select f1, f2 from t1;
|
||||
f1 f2
|
||||
1 ############
|
||||
2 ++++++++++++
|
||||
3 ////////////
|
||||
4 ------------
|
||||
5 ............
|
||||
drop table t1;
|
||||
# End of 10.5 tests
|
||||
|
@@ -1,4 +1,5 @@
|
||||
CREATE TABLE t (pk int PRIMARY KEY, c varchar(10)) ENGINE=InnoDB;
|
||||
CREATE TABLE t (pk int PRIMARY KEY, c varchar(10))
|
||||
STATS_PERSISTENT=0 ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES (10, "0123456789");
|
||||
connection default;
|
||||
BEGIN;
|
||||
|
@@ -1,3 +1,4 @@
|
||||
call mtr.add_suppression("InnoDB: Header page consists of zero bytes in datafile:");
|
||||
FLUSH TABLES;
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
# restart
|
||||
|
@@ -17,6 +17,7 @@ call mtr.add_suppression("InnoDB: A bad Space ID was found in datafile");
|
||||
call mtr.add_suppression("InnoDB: Checksum mismatch in datafile: ");
|
||||
call mtr.add_suppression("InnoDB: Inconsistent tablespace ID in .*t1\\.ibd");
|
||||
call mtr.add_suppression("\\[Warning\\] Found 1 prepared XA transactions");
|
||||
call mtr.add_suppression("InnoDB: Header page consists of zero bytes in datafile:");
|
||||
--enable_query_log
|
||||
|
||||
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
|
||||
@@ -24,7 +25,7 @@ let MYSQLD_DATADIR=`select @@datadir`;
|
||||
let ALGO=`select @@innodb_checksum_algorithm`;
|
||||
let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||
|
||||
create table t1 (f1 int primary key, f2 blob) engine=innodb stats_persistent=0;
|
||||
create table t1 (f1 int primary key, f2 blob) stats_persistent=0, engine=innodb;
|
||||
|
||||
start transaction;
|
||||
insert into t1 values(1, repeat('#',12));
|
||||
@@ -38,7 +39,7 @@ commit work;
|
||||
SET GLOBAL innodb_fast_shutdown = 0;
|
||||
let $shutdown_timeout=;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--source ../include/no_checkpoint_start.inc
|
||||
connect (dml,localhost,root,,);
|
||||
XA START 'x';
|
||||
insert into t1 values (6, repeat('%', @@innodb_page_size/2));
|
||||
@@ -50,8 +51,8 @@ connection default;
|
||||
flush table t1 for export;
|
||||
|
||||
let $restart_parameters=;
|
||||
let $shutdown_timeout=0;
|
||||
--source include/shutdown_mysqld.inc
|
||||
--let CLEANUP_IF_CHECKPOINT=drop table t1, unexpected_checkpoint;
|
||||
--source ../include/no_checkpoint_end.inc
|
||||
|
||||
perl;
|
||||
use IO::Handle;
|
||||
@@ -119,6 +120,35 @@ let SEARCH_PATTERN=InnoDB: Recovered page \[page id: space=[1-9][0-9]*, page num
|
||||
XA ROLLBACK 'x';
|
||||
check table t1;
|
||||
select f1, f2 from t1;
|
||||
|
||||
--source ../include/no_checkpoint_start.inc
|
||||
connect (dml,localhost,root,,);
|
||||
XA START 'x';
|
||||
insert into t1 values (6, repeat('%', @@innodb_page_size/2));
|
||||
XA END 'x';
|
||||
XA PREPARE 'x';
|
||||
disconnect dml;
|
||||
connection default;
|
||||
|
||||
flush table t1 for export;
|
||||
|
||||
let $restart_parameters=;
|
||||
--source ../include/no_checkpoint_end.inc
|
||||
|
||||
# Zero out the first page in file and try to recover from dblwr
|
||||
perl;
|
||||
use IO::Handle;
|
||||
open(FILE, "+<", "$ENV{'MYSQLD_DATADIR'}test/t1.ibd") or die;
|
||||
syswrite(FILE, chr(0) x $ENV{INNODB_PAGE_SIZE});
|
||||
close FILE;
|
||||
EOF
|
||||
|
||||
--source include/start_mysqld.inc
|
||||
let SEARCH_PATTERN=InnoDB: Restoring page \[page id: space=[1-9][0-9]*, page number=0\] of datafile;
|
||||
--source include/search_pattern_in_file.inc
|
||||
XA ROLLBACK 'x';
|
||||
check table t1;
|
||||
select f1, f2 from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo # End of 10.5 tests
|
||||
|
@@ -17,6 +17,7 @@ call mtr.add_suppression("Plugin 'InnoDB' (init function returned error|registra
|
||||
call mtr.add_suppression("InnoDB: A bad Space ID was found in datafile");
|
||||
call mtr.add_suppression("InnoDB: Checksum mismatch in datafile: ");
|
||||
call mtr.add_suppression("InnoDB: Inconsistent tablespace ID in .*t1\\.ibd");
|
||||
call mtr.add_suppression("InnoDB: Header page consists of zero bytes in datafile:");
|
||||
--enable_query_log
|
||||
|
||||
let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
|
||||
|
@@ -3,7 +3,8 @@
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
CREATE TABLE t (pk int PRIMARY KEY, c varchar(10)) ENGINE=InnoDB;
|
||||
CREATE TABLE t (pk int PRIMARY KEY, c varchar(10))
|
||||
STATS_PERSISTENT=0 ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES (10, "0123456789");
|
||||
|
||||
--connection default
|
||||
|
@@ -7,6 +7,7 @@
|
||||
# Embedded server does not support crashing
|
||||
--source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Header page consists of zero bytes in datafile:");
|
||||
FLUSH TABLES;
|
||||
|
||||
CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
@@ -172,6 +173,7 @@ call mtr.add_suppression("InnoDB: Table test/u[123] in the InnoDB data dictionar
|
||||
call mtr.add_suppression("InnoDB: Cannot replay rename of tablespace.*");
|
||||
call mtr.add_suppression("InnoDB: Attempted to open a previously opened tablespace");
|
||||
call mtr.add_suppression("InnoDB: Recovery cannot access file");
|
||||
call mtr.add_suppression("InnoDB: Cannot read first page in datafile:");
|
||||
FLUSH TABLES;
|
||||
--enable_query_log
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_sequence.inc
|
||||
--source include/innodb_page_size_small.inc
|
||||
--source include/have_normal_bzip.inc
|
||||
--source include/have_normal_zlib.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
|
||||
|
21
mysql-test/suite/rpl/r/rpl_gis_user_var.result
Normal file
21
mysql-test/suite/rpl/r/rpl_gis_user_var.result
Normal file
@@ -0,0 +1,21 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
#
|
||||
#
|
||||
#
|
||||
connection master;
|
||||
SET @p=POINT(1,1);
|
||||
CREATE TABLE t1 AS SELECT @p AS p;
|
||||
connection slave;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`p` point DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||
SELECT ST_AsWKT(p) FROM t1;
|
||||
ST_AsWKT(p)
|
||||
POINT(1 1)
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
connection slave;
|
||||
include/rpl_end.inc
|
18
mysql-test/suite/rpl/t/rpl_gis_user_var.test
Normal file
18
mysql-test/suite/rpl/t/rpl_gis_user_var.test
Normal file
@@ -0,0 +1,18 @@
|
||||
--source include/have_geometry.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
--echo #
|
||||
--echo #
|
||||
--echo #
|
||||
|
||||
connection master;
|
||||
SET @p=POINT(1,1);
|
||||
CREATE TABLE t1 AS SELECT @p AS p;
|
||||
sync_slave_with_master;
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT ST_AsWKT(p) FROM t1;
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
--source include/rpl_end.inc
|
@@ -253,6 +253,55 @@ NEXTVAL(s)
|
||||
1
|
||||
DROP SEQUENCE s;
|
||||
#
|
||||
# MDEV-33169 Alter sequence 2nd ps fails while alter sequence 2nd time (no ps) succeeds
|
||||
#
|
||||
create sequence s;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
alter sequence s maxvalue 123;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 123 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
alter sequence s maxvalue 123;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 123 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
drop sequence s;
|
||||
create sequence s;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
prepare stmt from 'alter sequence s maxvalue 123';
|
||||
execute stmt;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 123 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
execute stmt;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 123 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
deallocate prepare stmt;
|
||||
drop sequence s;
|
||||
create sequence s;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
create procedure p() alter sequence s maxvalue 123;
|
||||
call p;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 123 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
call p;
|
||||
show create sequence s;
|
||||
Table Create Table
|
||||
s CREATE SEQUENCE `s` start with 1 minvalue 1 maxvalue 123 increment by 1 cache 1000 nocycle ENGINE=MyISAM
|
||||
drop procedure p;
|
||||
drop sequence s;
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-31607 ER_DUP_KEY in mysql.table_stats upon REANME on sequence
|
||||
#
|
||||
CREATE SEQUENCE s1 ENGINE=InnoDB;
|
||||
@@ -266,3 +315,6 @@ s2 CREATE SEQUENCE `s2` start with 1 minvalue 1 maxvalue 9223372036854775806 inc
|
||||
DROP SEQUENCE s2;
|
||||
RENAME TABLE s1 TO s2;
|
||||
DROP SEQUENCE s2;
|
||||
#
|
||||
# End of 10.6 tests
|
||||
#
|
||||
|
@@ -167,6 +167,41 @@ ALTER TABLE s ORDER BY cache_size;
|
||||
SELECT NEXTVAL(s);
|
||||
DROP SEQUENCE s;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-33169 Alter sequence 2nd ps fails while alter sequence 2nd time (no ps) succeeds
|
||||
--echo #
|
||||
create sequence s;
|
||||
show create sequence s;
|
||||
alter sequence s maxvalue 123;
|
||||
show create sequence s;
|
||||
alter sequence s maxvalue 123;
|
||||
show create sequence s;
|
||||
drop sequence s;
|
||||
|
||||
create sequence s;
|
||||
show create sequence s;
|
||||
prepare stmt from 'alter sequence s maxvalue 123';
|
||||
execute stmt;
|
||||
show create sequence s;
|
||||
execute stmt;
|
||||
show create sequence s;
|
||||
deallocate prepare stmt;
|
||||
drop sequence s;
|
||||
|
||||
create sequence s;
|
||||
show create sequence s;
|
||||
create procedure p() alter sequence s maxvalue 123;
|
||||
call p;
|
||||
show create sequence s;
|
||||
call p;
|
||||
show create sequence s;
|
||||
drop procedure p;
|
||||
drop sequence s;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31607 ER_DUP_KEY in mysql.table_stats upon REANME on sequence
|
||||
--echo #
|
||||
@@ -180,3 +215,7 @@ RENAME TABLE s1 TO s2;
|
||||
DROP SEQUENCE s2;
|
||||
|
||||
--enable_ps2_protocol
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.6 tests
|
||||
--echo #
|
||||
|
Reference in New Issue
Block a user