Merge 10.4 into 10.5

This commit is contained in:
Oleksandr Byelkin 2019-11-05 16:15:20 +01:00 committed by Marko Mäkelä
commit 3ad37ed0eb
208 changed files with 6500 additions and 1979 deletions

View File

@ -198,7 +198,7 @@ IF(MSVC)
# Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning), # Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning),
# removed in VS2017 # removed in VS2017
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800")
ELSE() ELSEIF (NOT (CMAKE_CXX_COMPILER_ID MATCHES Clang))
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /d2OptimizeHugeFunctions") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /d2OptimizeHugeFunctions")
ENDIF() ENDIF()
ENDIF() ENDIF()

View File

@ -225,11 +225,8 @@ typedef struct _db_code_state_ {
const char *file; /* Name of current user file */ const char *file; /* Name of current user file */
struct _db_stack_frame_ *framep; /* Pointer to current frame */ struct _db_stack_frame_ *framep; /* Pointer to current frame */
struct settings *stack; /* debugging settings */ struct settings *stack; /* debugging settings */
const char *jmpfunc; /* Remember current function for setjmp */
const char *jmpfile; /* Remember current file for setjmp */
int lineno; /* Current debugger output line number */ int lineno; /* Current debugger output line number */
uint level; /* Current function nesting level */ uint level; /* Current function nesting level */
int jmplevel; /* Remember nesting level at setjmp() */
/* /*
* The following variables are used to hold the state information * The following variables are used to hold the state information

View File

@ -131,8 +131,6 @@ max_binlog_size = 100M
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many! # Read the manual for more InnoDB related options. There are many!
default_storage_engine = InnoDB default_storage_engine = InnoDB
# you can't just change log file size, requires special procedure
#innodb_log_file_size = 50M
innodb_buffer_pool_size = 256M innodb_buffer_pool_size = 256M
innodb_log_buffer_size = 8M innodb_log_buffer_size = 8M
innodb_file_per_table = 1 innodb_file_per_table = 1

@ -1 +1 @@
Subproject commit 261a5c435581c8d6c6341afac95bcc5c96d1435c Subproject commit 980f2dbea6586091333057bb2994b18747466942

View File

@ -202,7 +202,6 @@ main.function_defaults_innodb
main.gcc296 main.gcc296
main.get_diagnostics main.get_diagnostics
main.gis main.gis
main.gis2
main.gis-alter_table_online main.gis-alter_table_online
main.gis-precise main.gis-precise
main.gis-rt-precise main.gis-rt-precise

View File

@ -1695,6 +1695,7 @@ DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
AS BINARY(0)) USING utf8); AS BINARY(0)) USING utf8);
Warnings: Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'Zpq' Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
Warning 1292 Truncated incorrect DOUBLE value: '' Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect BINARY(0) value: '1.' Warning 1292 Truncated incorrect BINARY(0) value: '1.'
# #

View File

@ -225,9 +225,11 @@ DROP TABLE t1;
--echo # Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function --echo # Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
--echo # --echo #
--disable_ps_protocol
SET NAMES latin1; SET NAMES latin1;
DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1) DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
AS BINARY(0)) USING utf8); AS BINARY(0)) USING utf8);
--enable_ps_protocol
--echo # --echo #
--echo # End of 5.1 tests --echo # End of 5.1 tests
--echo # --echo #

View File

@ -1588,7 +1588,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`format(123,2,'no_NO')` varchar(45) CHARACTER SET utf32 DEFAULT NULL `format(123,2,'no_NO')` varchar(17) CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1; SELECT * FROM t1;
format(123,2,'no_NO') format(123,2,'no_NO')

File diff suppressed because it is too large Load Diff

View File

@ -627,6 +627,31 @@ SHOW CREATE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # Bug #29723340: MYSQL SERVER CRASH AFTER SQL QUERY WITH DATA ?AST
--echo #
create table t1(a int);
insert ignore t1 values("1e-214748364");
insert ignore t1 values("1e-2147483648");
insert ignore t1 values("1e-21474836480");
insert ignore t1 values("1e+214748364");
insert ignore t1 values("1e+2147483647");
insert ignore t1 values("1e+21474836470");
# if max max_allowed_packet will ever be increased beyond 2GB, this could
# break again:
set global max_allowed_packet= cast(2*1024*1024*1024+1024 as unsigned);
connect foo,localhost,root;
set @a=2147483647;
insert ignore t1 values (concat('1', repeat('0', @a+18), 'e-', @a-1, '0'));
disconnect foo;
connection default;
set global max_allowed_packet=default;
select * from t1;
drop table t1;
--echo # --echo #
--echo # End of 5.5 tests --echo # End of 5.5 tests
--echo # --echo #
@ -1001,3 +1026,713 @@ DROP TABLE t1;
--echo # --echo #
--echo # End of 10.3 tests --echo # End of 10.3 tests
--echo # --echo #
--echo #
--echo # Start of 10.4 tests
--echo #
--echo #
--echo # MDEV-20732 max_char_length() doesn't account for FORMAT() with doubles in scientific notation
--echo #
CREATE OR REPLACE TABLE t1 AS SELECT FORMAT(-1e308,2);
SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE OR REPLACE TABLE t1 AS SELECT FORMAT('-1e308',2);
SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE OR REPLACE TABLE t1 AS SELECT FORMAT(DATE'20191231',0),FORMAT(TIME'99:05:00',0),FORMAT(TIMESTAMP'2019-12-31 23:59:59.123456',0);
SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE OR REPLACE TABLE t1 (y YEAR);
INSERT INTO t1 VALUES ('2099'),('99');
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(y,0) FROM t1;
SELECT * FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1, t2;
CREATE OR REPLACE TABLE t1 (bi BIGINT UNSIGNED, bis BIGINT);
INSERT INTO t1 VALUES (18446744073709551615,-9223372036854775808),(0,0);
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(bi,0),FORMAT(bis,0) FROM t1;
SELECT * FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (d DECIMAL(65,0));
INSERT INTO t1 VALUES (99999999999999999999999999999999999999999999999999999999999999999),(-99999999999999999999999999999999999999999999999999999999999999999),(0);
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(d,0) FROM t1;
SELECT * FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 AS SELECT -99999999999999999999999999999999999999999999999999999999999999999 as c1;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
CREATE OR REPLACE TABLE t1 (b1 BIT(1),
b2 BIT(2),
b3 BIT(3),
b4 BIT(4),
b5 BIT(5),
b6 BIT(6),
b7 BIT(7),
b8 BIT(8),
b9 BIT(9),
b10 BIT(10),
b11 BIT(11),
b12 BIT(12),
b13 BIT(13),
b14 BIT(14),
b15 BIT(15),
b16 BIT(16),
b17 BIT(17),
b18 BIT(18),
b19 BIT(19),
b20 BIT(20),
b21 BIT(21),
b22 BIT(22),
b23 BIT(23),
b24 BIT(24),
b25 BIT(25),
b26 BIT(26),
b27 BIT(27),
b28 BIT(28),
b29 BIT(29),
b30 BIT(30),
b31 BIT(31),
b32 BIT(32),
b33 BIT(33),
b34 BIT(34),
b35 BIT(35),
b36 BIT(36),
b37 BIT(37),
b38 BIT(38),
b39 BIT(39),
b40 BIT(40),
b41 BIT(41),
b42 BIT(42),
b43 BIT(43),
b44 BIT(44),
b45 BIT(45),
b46 BIT(46),
b47 BIT(47),
b48 BIT(48),
b49 BIT(49),
b50 BIT(50),
b51 BIT(51),
b52 BIT(52),
b53 BIT(53),
b54 BIT(54),
b55 BIT(55),
b56 BIT(56),
b57 BIT(57),
b58 BIT(58),
b59 BIT(59),
b60 BIT(60),
b61 BIT(61),
b62 BIT(62),
b63 BIT(63),
b64 BIT(64));
INSERT INTO t1 VALUES(1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,
32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215,
33554431,67108863,134217727,268435455,536870911,1073741823,2147483647,
4294967295,8589934591,17179869183,34359738367,68719476735,137438953471,
274877906943,549755813887,1099511627775,2199023255551,4398046511103,
8796093022207,17592186044415,35184372088831,70368744177663,140737488355327,
281474976710655,562949953421311,1125899906842623,2251799813685247,
4503599627370495,9007199254740991,18014398509481983,36028797018963967,
72057594037927935,144115188075855871,288230376151711743,576460752303423487,
1152921504606846975,2305843009213693951,4611686018427387903,
9223372036854775807,18446744073709551615);
--vertical_results
SELECT FORMAT(b1,0),
FORMAT(b2,0),
FORMAT(b3,0),
FORMAT(b4,0),
FORMAT(b5,0),
FORMAT(b6,0),
FORMAT(b7,0),
FORMAT(b8,0),
FORMAT(b9,0),
FORMAT(b10,0),
FORMAT(b11,0),
FORMAT(b12,0),
FORMAT(b13,0),
FORMAT(b14,0),
FORMAT(b15,0),
FORMAT(b16,0),
FORMAT(b17,0),
FORMAT(b18,0),
FORMAT(b19,0),
FORMAT(b20,0),
FORMAT(b21,0),
FORMAT(b22,0),
FORMAT(b23,0),
FORMAT(b24,0),
FORMAT(b25,0),
FORMAT(b26,0),
FORMAT(b27,0),
FORMAT(b28,0),
FORMAT(b29,0),
FORMAT(b30,0),
FORMAT(b31,0),
FORMAT(b32,0),
FORMAT(b33,0),
FORMAT(b34,0),
FORMAT(b35,0),
FORMAT(b36,0),
FORMAT(b37,0),
FORMAT(b38,0),
FORMAT(b39,0),
FORMAT(b40,0),
FORMAT(b41,0),
FORMAT(b42,0),
FORMAT(b43,0),
FORMAT(b44,0),
FORMAT(b45,0),
FORMAT(b46,0),
FORMAT(b47,0),
FORMAT(b48,0),
FORMAT(b49,0),
FORMAT(b50,0),
FORMAT(b51,0),
FORMAT(b52,0),
FORMAT(b53,0),
FORMAT(b54,0),
FORMAT(b55,0),
FORMAT(b56,0),
FORMAT(b57,0),
FORMAT(b58,0),
FORMAT(b59,0),
FORMAT(b60,0),
FORMAT(b61,0),
FORMAT(b62,0),
FORMAT(b63,0),
FORMAT(b64,0)
FROM t1;
--horizontal_results
DROP TABLE t1;
CREATE OR REPLACE TABLE t1 (c1 BIT(1));
INSERT INTO t1 VALUES (b'1');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(2));
INSERT INTO t1 VALUES (b'11');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(3));
INSERT INTO t1 VALUES (b'111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(4));
INSERT INTO t1 VALUES (b'1111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(5));
INSERT INTO t1 VALUES (b'11111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(6));
INSERT INTO t1 VALUES (b'111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(7));
INSERT INTO t1 VALUES (b'1111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(8));
INSERT INTO t1 VALUES (b'11111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(9));
INSERT INTO t1 VALUES (b'111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(10));
INSERT INTO t1 VALUES (b'1111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(11));
INSERT INTO t1 VALUES (b'11111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(12));
INSERT INTO t1 VALUES (b'111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(13));
INSERT INTO t1 VALUES (b'1111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(14));
INSERT INTO t1 VALUES (b'11111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(15));
INSERT INTO t1 VALUES (b'111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(16));
INSERT INTO t1 VALUES (b'1111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(17));
INSERT INTO t1 VALUES (b'11111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(18));
INSERT INTO t1 VALUES (b'111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(19));
INSERT INTO t1 VALUES (b'1111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(20));
INSERT INTO t1 VALUES (b'11111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(21));
INSERT INTO t1 VALUES (b'111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(22));
INSERT INTO t1 VALUES (b'1111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(23));
INSERT INTO t1 VALUES (b'11111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(24));
INSERT INTO t1 VALUES (b'111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(25));
INSERT INTO t1 VALUES (b'1111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(26));
INSERT INTO t1 VALUES (b'11111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(27));
INSERT INTO t1 VALUES (b'111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(28));
INSERT INTO t1 VALUES (b'1111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(29));
INSERT INTO t1 VALUES (b'11111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(30));
INSERT INTO t1 VALUES (b'111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(31));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(32));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(33));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(34));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(35));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(36));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(37));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(38));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(39));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(40));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(41));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(42));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(43));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(44));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(45));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(46));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(47));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(48));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(49));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(50));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(51));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(52));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(53));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(54));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(55));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(56));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(57));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(58));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(59));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(60));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(61));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(62));
INSERT INTO t1 VALUES (b'11111111111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(63));
INSERT INTO t1 VALUES (b'111111111111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
CREATE OR REPLACE TABLE t1 (c1 BIT(64));
INSERT INTO t1 VALUES (b'1111111111111111111111111111111111111111111111111111111111111111');
SELECT HEX(c1) FROM t1;
CREATE OR REPLACE TABLE t2 AS SELECT FORMAT(c1,0) as c1 FROM t1;
SELECT HEX(c1) FROM t2;
SHOW CREATE TABLE t2;
DROP TABLE t1,t2;
--echo #
--echo # End of 10.4 tests
--echo #

View File

@ -745,7 +745,7 @@ t1 CREATE TABLE `t1` (
`conv(130,16,10)` varchar(64) DEFAULT NULL, `conv(130,16,10)` varchar(64) DEFAULT NULL,
`hex(130)` varchar(6) DEFAULT NULL, `hex(130)` varchar(6) DEFAULT NULL,
`char(130)` varbinary(4) DEFAULT NULL, `char(130)` varbinary(4) DEFAULT NULL,
`format(130,10)` varchar(45) DEFAULT NULL, `format(130,10)` varchar(25) DEFAULT NULL,
`left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL, `left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
`right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL, `right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
`lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 DEFAULT NULL, `lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
@ -2708,7 +2708,7 @@ create table t1(a float);
insert into t1 values (1.33); insert into t1 values (1.33);
select format(a, 2) from t1; select format(a, 2) from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def format(a, 2) 253 57 4 Y 0 39 8 def format(a, 2) 253 4 4 Y 0 39 8
format(a, 2) format(a, 2)
1.33 1.33
drop table t1; drop table t1;
@ -3042,7 +3042,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`format(123,2,'no_NO')` varchar(45) DEFAULT NULL `format(123,2,'no_NO')` varchar(17) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1; SELECT * FROM t1;
format(123,2,'no_NO') format(123,2,'no_NO')

View File

@ -246,3 +246,82 @@ connection user1;
disconnect user1; disconnect user1;
connection default; connection default;
set global sql_mode=default; set global sql_mode=default;
create user foo@localhost;
grant select on test.* to foo@localhost;
create procedure rootonly() select 1;
create sql security definer view v1d as select current_user(),user from information_schema.processlist;
create sql security invoker view v1i as select current_user(),user from information_schema.processlist;
create sql security definer view v2d as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
create sql security invoker view v2i as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
create sql security definer view v3d as select schema_name from information_schema.schemata where schema_name like '%mysql%';
create sql security invoker view v3i as select schema_name from information_schema.schemata where schema_name like '%mysql%';
create sql security definer view v4d as select routine_name from information_schema.routines where routine_schema='test';
create sql security invoker view v4i as select routine_name from information_schema.routines where routine_schema='test';
create sql security definer view v5d as select view_definition > '' from information_schema.views where table_name='v1d';
create sql security invoker view v5i as select view_definition > '' from information_schema.views where table_name='v1d';
connect foo,localhost,foo;
select * from v1d;
current_user() user
root@localhost root
root@localhost root
select * from v1i;
current_user() user
foo@localhost foo
select * from v2d;
table_name
user
select * from v2i;
table_name
select * from v3d;
schema_name
mysql
select * from v3i;
schema_name
select * from v4d;
routine_name
rootonly
select * from v4i;
routine_name
select * from v5d;
view_definition > ''
1
select * from v5i;
view_definition > ''
0
connection default;
select * from v1d;
current_user() user
root@localhost foo
root@localhost root
select * from v1i;
current_user() user
root@localhost foo
root@localhost root
select * from v2d;
table_name
user
select * from v2i;
table_name
user
select * from v3d;
schema_name
mysql
select * from v3i;
schema_name
mysql
select * from v4d;
routine_name
rootonly
select * from v4i;
routine_name
rootonly
select * from v5d;
view_definition > ''
1
select * from v5i;
view_definition > ''
1
disconnect foo;
drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i;
drop user foo@localhost;
drop procedure rootonly;

View File

@ -255,3 +255,47 @@ disconnect user1;
connection default; connection default;
set global sql_mode=default; set global sql_mode=default;
#
# MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables
#
create user foo@localhost;
grant select on test.* to foo@localhost;
create procedure rootonly() select 1;
create sql security definer view v1d as select current_user(),user from information_schema.processlist;
create sql security invoker view v1i as select current_user(),user from information_schema.processlist;
create sql security definer view v2d as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
create sql security invoker view v2i as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
create sql security definer view v3d as select schema_name from information_schema.schemata where schema_name like '%mysql%';
create sql security invoker view v3i as select schema_name from information_schema.schemata where schema_name like '%mysql%';
create sql security definer view v4d as select routine_name from information_schema.routines where routine_schema='test';
create sql security invoker view v4i as select routine_name from information_schema.routines where routine_schema='test';
create sql security definer view v5d as select view_definition > '' from information_schema.views where table_name='v1d';
create sql security invoker view v5i as select view_definition > '' from information_schema.views where table_name='v1d';
connect foo,localhost,foo;
select * from v1d;
select * from v1i;
select * from v2d;
select * from v2i;
select * from v3d;
select * from v3i;
select * from v4d;
select * from v4i;
select * from v5d;
select * from v5i;
connection default;
select * from v1d;
select * from v1i;
select * from v2d;
select * from v2i;
select * from v3d;
select * from v3i;
select * from v4d;
select * from v4i;
select * from v5d;
select * from v5i;
disconnect foo;
drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i;
drop user foo@localhost;
drop procedure rootonly;

View File

@ -1069,5 +1069,29 @@ COUNT(*)
2 2
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-18244 Server crashes in ha_innobase::update_thd / ... / ha_partition::update_next_auto_inc_val
#
CREATE TABLE t1 (a INT)
ENGINE=InnoDB
PARTITION BY RANGE (a) (
PARTITION p0 VALUES LESS THAN (6),
PARTITION pn VALUES LESS THAN MAXVALUE
);
INSERT INTO t1 VALUES (4),(5),(6);
ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY;
UPDATE t1 PARTITION (p0) SET a = 3 WHERE a = 5;
INSERT INTO t1 PARTITION(p0) VALUES ();
ERROR HY000: Found a row not matching the given partition set
INSERT INTO t1 PARTITION(p0) VALUES (-1);
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
a
-1
1
3
4
6
DROP TABLE t1;
#
# End of 10.3 tests # End of 10.3 tests
# #

View File

@ -1139,6 +1139,26 @@ INSERT INTO t1 VALUES (1, 7, 8, 9), (2, NULL, NULL, NULL), (3, NULL, NULL, NULL)
SELECT COUNT(*) FROM t1 WHERE x IS NULL AND y IS NULL AND z IS NULL; SELECT COUNT(*) FROM t1 WHERE x IS NULL AND y IS NULL AND z IS NULL;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-18244 Server crashes in ha_innobase::update_thd / ... / ha_partition::update_next_auto_inc_val
--echo #
CREATE TABLE t1 (a INT)
ENGINE=InnoDB
PARTITION BY RANGE (a) (
PARTITION p0 VALUES LESS THAN (6),
PARTITION pn VALUES LESS THAN MAXVALUE
);
INSERT INTO t1 VALUES (4),(5),(6);
ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY;
UPDATE t1 PARTITION (p0) SET a = 3 WHERE a = 5;
--error ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET
INSERT INTO t1 PARTITION(p0) VALUES ();
INSERT INTO t1 PARTITION(p0) VALUES (-1);
INSERT INTO t1 VALUES ();
SELECT * FROM t1;
DROP TABLE t1;
--echo # --echo #
--echo # End of 10.3 tests --echo # End of 10.3 tests
--echo # --echo #

View File

@ -0,0 +1,13 @@
#
# Start of 10.3 tests
#
#
# MDEV-20855 Crash with PARTITION BY LIST and extended characters
#
SET NAMES utf8;
CREATE OR REPLACE TABLE t1 (a TIME)
PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_ucs2 0x0411));
ERROR HY000: This partition function is not allowed
#
# End of 10.3 tests
#

View File

@ -0,0 +1,19 @@
--source include/have_partition.inc
--source include/have_ucs2.inc
--echo #
--echo # Start of 10.3 tests
--echo #
--echo #
--echo # MDEV-20855 Crash with PARTITION BY LIST and extended characters
--echo #
SET NAMES utf8;
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
CREATE OR REPLACE TABLE t1 (a TIME)
PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_ucs2 0x0411));
--echo #
--echo # End of 10.3 tests
--echo #

View File

@ -52,6 +52,22 @@ insert into t1 values ('');
insert into t1 values (_ucs2 0x2020); insert into t1 values (_ucs2 0x2020);
drop table t1; drop table t1;
# #
# Start of 10.3 tests
#
#
# MDEV-20855 Crash with PARTITION BY LIST and extended characters
#
SET NAMES utf8;
CREATE OR REPLACE TABLE t1 (a CHAR(10)) CHARACTER SET latin1
PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Б'));
ERROR HY000: This partition function is not allowed
CREATE OR REPLACE TABLE t1 (a TIME)
PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Б'));
ERROR HY000: This partition function is not allowed
#
# End of 10.3 tests
#
#
# Start of 10.5 tests # Start of 10.5 tests
# #
# #

View File

@ -41,6 +41,28 @@ insert into t1 values ('');
insert into t1 values (_ucs2 0x2020); insert into t1 values (_ucs2 0x2020);
drop table t1; drop table t1;
--echo #
--echo # Start of 10.3 tests
--echo #
--echo #
--echo # MDEV-20855 Crash with PARTITION BY LIST and extended characters
--echo #
SET NAMES utf8;
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
CREATE OR REPLACE TABLE t1 (a CHAR(10)) CHARACTER SET latin1
PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Б'));
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
CREATE OR REPLACE TABLE t1 (a TIME)
PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Б'));
--echo #
--echo # End of 10.3 tests
--echo #
--echo # --echo #
--echo # Start of 10.5 tests --echo # Start of 10.5 tests
--echo # --echo #

View File

@ -23,8 +23,9 @@ select command, time < 5 from information_schema.processlist where id != connect
command time < 5 command time < 5
Sleep 1 Sleep 1
disconnect con1; disconnect con1;
set debug_sync='reset';
connection default; connection default;
set debug_sync='reset';
End of 5.5 tests
# #
# 10.1 tests # 10.1 tests
# #

View File

@ -49,10 +49,10 @@ SET DEBUG_SYNC = 'now WAIT_FOR query_done';
select command, time < 5 from information_schema.processlist where id != connection_id(); select command, time < 5 from information_schema.processlist where id != connection_id();
disconnect con1; disconnect con1;
connection default;
set debug_sync='reset'; set debug_sync='reset';
connection default; --echo End of 5.5 tests
--echo # --echo #
--echo # 10.1 tests --echo # 10.1 tests

View File

@ -0,0 +1,12 @@
#
# MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
#
connect con1,localhost,root,,;
connection con1;
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync';
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
FOUND 1 /sleep \(30\)/ in MDEV-20466.text
disconnect con1;
SET DEBUG_SYNC = 'RESET';
End of 5.5 tests

View File

@ -0,0 +1,34 @@
source include/have_debug.inc;
source include/have_debug_sync.inc;
source include/not_embedded.inc;
--echo #
--echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes
--echo #
connect (con1,localhost,root,,);
connection con1;
let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "' or sleep (30)")`;
SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync';
--disable_query_log
--send_eval $q;
--enable_query_log
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
exec $MYSQL test -e "SHOW PROCESSLIST" > $MYSQLTEST_VARDIR/tmp/MDEV-20466.text;
let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-20466.text;
let SEARCH_PATTERN=sleep \(30\);
source include/search_pattern_in_file.inc;
remove_file $MYSQLTEST_VARDIR/tmp/MDEV-20466.text;
disconnect con1;
SET DEBUG_SYNC = 'RESET';
--echo End of 5.5 tests

View File

@ -3268,6 +3268,32 @@ create table t1 (a1 varchar(25));
create table t2 (a2 varchar(25)) ; create table t2 (a2 varchar(25)) ;
insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2); insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
drop table t1,t2; drop table t1,t2;
#
# MDEV-13172: Wrong result / SELECT ... WHERE EXISTS ... (with UNIQUE Key)
#
CREATE TABLE `t1` (
`Id` int(11) NOT NULL,
PRIMARY KEY (`Id`)
);
INSERT INTO `t1` (`Id`) VALUES (1);
CREATE TABLE `t2` (
`t1_Id` int(11) NOT NULL DEFAULT 0,
`col1` int(11) DEFAULT NULL,
UNIQUE KEY `col1` (`col1`)
);
INSERT INTO `t2` (`t1_Id`, `col1`) VALUES (1, NULL), (1, NULL);
SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL);
Id
1
explain extended
SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 100.00
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED t2 ref col1 col1 5 const 2 100.00 Using index condition; Using where
Warnings:
Note 1003 select 1 AS `Id` from (`test`.`t2`) where `test`.`t2`.`t1_Id` = 1 and `test`.`t2`.`col1` is null
DROP TABLE t1, t2;
# End of 5.5 test # End of 5.5 test
# #
# MDEV-20109: Optimizer ignores distinct key created for materialized # MDEV-20109: Optimizer ignores distinct key created for materialized

View File

@ -2942,6 +2942,32 @@ insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
drop table t1,t2; drop table t1,t2;
--echo #
--echo # MDEV-13172: Wrong result / SELECT ... WHERE EXISTS ... (with UNIQUE Key)
--echo #
CREATE TABLE `t1` (
`Id` int(11) NOT NULL,
PRIMARY KEY (`Id`)
);
INSERT INTO `t1` (`Id`) VALUES (1);
CREATE TABLE `t2` (
`t1_Id` int(11) NOT NULL DEFAULT 0,
`col1` int(11) DEFAULT NULL,
UNIQUE KEY `col1` (`col1`)
);
INSERT INTO `t2` (`t1_Id`, `col1`) VALUES (1, NULL), (1, NULL);
SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL);
explain extended
SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL);
DROP TABLE t1, t2;
--echo # End of 5.5 test --echo # End of 5.5 test
--echo # --echo #

View File

@ -3279,6 +3279,32 @@ create table t1 (a1 varchar(25));
create table t2 (a2 varchar(25)) ; create table t2 (a2 varchar(25)) ;
insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2); insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2);
drop table t1,t2; drop table t1,t2;
#
# MDEV-13172: Wrong result / SELECT ... WHERE EXISTS ... (with UNIQUE Key)
#
CREATE TABLE `t1` (
`Id` int(11) NOT NULL,
PRIMARY KEY (`Id`)
);
INSERT INTO `t1` (`Id`) VALUES (1);
CREATE TABLE `t2` (
`t1_Id` int(11) NOT NULL DEFAULT 0,
`col1` int(11) DEFAULT NULL,
UNIQUE KEY `col1` (`col1`)
);
INSERT INTO `t2` (`t1_Id`, `col1`) VALUES (1, NULL), (1, NULL);
SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL);
Id
1
explain extended
SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 100.00
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 100.00
2 MATERIALIZED t2 ref col1 col1 5 const 2 100.00 Using index condition; Using where
Warnings:
Note 1003 select 1 AS `Id` from (`test`.`t2`) where `test`.`t2`.`t1_Id` = 1 and `test`.`t2`.`col1` is null
DROP TABLE t1, t2;
# End of 5.5 test # End of 5.5 test
# #
# MDEV-20109: Optimizer ignores distinct key created for materialized # MDEV-20109: Optimizer ignores distinct key created for materialized

View File

@ -0,0 +1,21 @@
#
# Test BACKUP STAGES BLOCK_COMMIT with binary logging on
#
SET BINLOG_FORMAT=MIXED;
RESET MASTER;
create table t1 (a int) engine=aria;
insert into t1 values (1);
BACKUP STAGE START;
BACKUP STAGE BLOCK_COMMIT;
SELECT @@gtid_binlog_pos;
@@gtid_binlog_pos
0-1-2
BACKUP STAGE END;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table t1 (a int) engine=aria
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert into t1 values (1)
master-bin.000001 # Query # # COMMIT
drop table t1;

View File

@ -0,0 +1,129 @@
#
# MDEV-17863 DROP TEMPORARY TABLE creates a transaction in
# binary log on read only server
# MDEV-19074 Improved read_only mode for slaves with
# gtid_strict_mode enabled
#
create user test@localhost;
grant CREATE, DROP, INSERT, SELECT on *.* to test@localhost;
create table t1 (a int) engine=myisam;
insert into t1 values (1),(2);
reset master;
set global read_only=1;
# Ensure that optimize and analyze doesn't log to binary log
connect con1,localhost,test,,test;
insert into t1 values(3);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair Error The MariaDB server is running with the --read-only option so it cannot execute this statement
test.t1 repair error Corrupt
optimize table t1;
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
# Ensure that using temporary tables is not logged
create temporary table tmp1 (a int) engine=myisam;
insert into tmp1 values (1),(2);
update tmp1 set a=10 where a=2;
delete from tmp1 where a=1;
create temporary table tmp2 select * from t1;
select * from tmp1;
a
10
select * from tmp2;
a
1
2
create temporary table tmp3 like t1;
create or replace temporary table tmp3 like t1;
alter table tmp2 add column (b int);
select * from tmp2;
a b
1 NULL
2 NULL
insert into t1 select a+100 from tmp2;
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
drop table tmp1,tmp2,tmp3;
# Clean up test connection
disconnect con1;
connection default;
# Execute some commands as root that should not be logged
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status Table is already up to date
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
# Changes to temporary tables created under readonly should not
# be logged
create temporary table tmp4 (a int) engine=myisam;
insert into tmp4 values (1),(2);
create temporary table tmp5 (a int) engine=myisam;
insert into tmp5 select * from tmp4;
alter table tmp5 add column (b int);
set global read_only=0;
insert into tmp4 values (3),(4);
insert into tmp5 values (10,3),(11,4);
select * from tmp4;
a
1
2
3
4
select * from tmp5;
a b
1 NULL
2 NULL
10 3
11 4
update tmp4 set a=10 where a=2;
delete from tmp4 where a=1;
create table t2 select * from tmp4;
alter table tmp5 add column (c int);
insert into tmp5 values (20,5,1),(21,5,2);
select * from tmp5;
a b c
1 NULL NULL
2 NULL NULL
10 3 NULL
11 4 NULL
20 5 1
21 5 2
insert into t1 select a+200 from tmp5;
select * from t1;
a
1
2
201
202
210
211
220
221
drop table tmp4,tmp5;
# Check what is logged. Only last create select and the insert...select's should be
# row-logged
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
)
master-bin.000001 # Annotate_rows # # create table t2 select * from tmp4
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # insert into t1 select a+200 from tmp5
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
# Clean up
drop user test@localhost;
drop table t1,t2;

View File

@ -0,0 +1,129 @@
#
# MDEV-17863 DROP TEMPORARY TABLE creates a transaction in
# binary log on read only server
# MDEV-19074 Improved read_only mode for slaves with
# gtid_strict_mode enabled
#
create user test@localhost;
grant CREATE, DROP, INSERT, SELECT on *.* to test@localhost;
create table t1 (a int) engine=myisam;
insert into t1 values (1),(2);
reset master;
set global read_only=1;
# Ensure that optimize and analyze doesn't log to binary log
connect con1,localhost,test,,test;
insert into t1 values(3);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair Error The MariaDB server is running with the --read-only option so it cannot execute this statement
test.t1 repair error Corrupt
optimize table t1;
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
# Ensure that using temporary tables is not logged
create temporary table tmp1 (a int) engine=myisam;
insert into tmp1 values (1),(2);
update tmp1 set a=10 where a=2;
delete from tmp1 where a=1;
create temporary table tmp2 select * from t1;
select * from tmp1;
a
10
select * from tmp2;
a
1
2
create temporary table tmp3 like t1;
create or replace temporary table tmp3 like t1;
alter table tmp2 add column (b int);
select * from tmp2;
a b
1 NULL
2 NULL
insert into t1 select a+100 from tmp2;
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
drop table tmp1,tmp2,tmp3;
# Clean up test connection
disconnect con1;
connection default;
# Execute some commands as root that should not be logged
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status Table is already up to date
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
# Changes to temporary tables created under readonly should not
# be logged
create temporary table tmp4 (a int) engine=myisam;
insert into tmp4 values (1),(2);
create temporary table tmp5 (a int) engine=myisam;
insert into tmp5 select * from tmp4;
alter table tmp5 add column (b int);
set global read_only=0;
insert into tmp4 values (3),(4);
insert into tmp5 values (10,3),(11,4);
select * from tmp4;
a
1
2
3
4
select * from tmp5;
a b
1 NULL
2 NULL
10 3
11 4
update tmp4 set a=10 where a=2;
delete from tmp4 where a=1;
create table t2 select * from tmp4;
alter table tmp5 add column (c int);
insert into tmp5 values (20,5,1),(21,5,2);
select * from tmp5;
a b c
1 NULL NULL
2 NULL NULL
10 3 NULL
11 4 NULL
20 5 1
21 5 2
insert into t1 select a+200 from tmp5;
select * from t1;
a
1
2
201
202
210
211
220
221
drop table tmp4,tmp5;
# Check what is logged. Only last create select and the insert...select's should be
# row-logged
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL
)
master-bin.000001 # Annotate_rows # # create table t2 select * from tmp4
master-bin.000001 # Table_map # # table_id: # (test.t2)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Annotate_rows # # insert into t1 select a+200 from tmp5
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
# Clean up
drop user test@localhost;
drop table t1,t2;

View File

@ -0,0 +1,19 @@
--source include/have_log_bin.inc
--source include/have_binlog_format_mixed.inc
--echo #
--echo # Test BACKUP STAGES BLOCK_COMMIT with binary logging on
--echo #
SET BINLOG_FORMAT=MIXED;
RESET MASTER;
create table t1 (a int) engine=aria;
insert into t1 values (1);
BACKUP STAGE START;
BACKUP STAGE BLOCK_COMMIT;
SELECT @@gtid_binlog_pos;
BACKUP STAGE END;
source include/show_binlog_events.inc;
drop table t1;

View File

@ -0,0 +1,79 @@
--echo #
--echo # MDEV-17863 DROP TEMPORARY TABLE creates a transaction in
--echo # binary log on read only server
--echo # MDEV-19074 Improved read_only mode for slaves with
--echo # gtid_strict_mode enabled
--echo #
create user test@localhost;
grant CREATE, DROP, INSERT, SELECT on *.* to test@localhost;
create table t1 (a int) engine=myisam;
insert into t1 values (1),(2);
reset master;
set global read_only=1;
--echo # Ensure that optimize and analyze doesn't log to binary log
connect (con1,localhost,test,,test);
--error ER_OPTION_PREVENTS_STATEMENT
insert into t1 values(3);
analyze table t1;
check table t1;
repair table t1;
--error ER_OPTION_PREVENTS_STATEMENT
optimize table t1;
--echo # Ensure that using temporary tables is not logged
create temporary table tmp1 (a int) engine=myisam;
insert into tmp1 values (1),(2);
update tmp1 set a=10 where a=2;
delete from tmp1 where a=1;
create temporary table tmp2 select * from t1;
select * from tmp1;
select * from tmp2;
create temporary table tmp3 like t1;
create or replace temporary table tmp3 like t1;
alter table tmp2 add column (b int);
select * from tmp2;
--error ER_OPTION_PREVENTS_STATEMENT
insert into t1 select a+100 from tmp2;
drop table tmp1,tmp2,tmp3;
--echo # Clean up test connection
disconnect con1;
connection default;
--echo # Execute some commands as root that should not be logged
optimize table t1;
repair table t1;
--echo # Changes to temporary tables created under readonly should not
--echo # be logged
create temporary table tmp4 (a int) engine=myisam;
insert into tmp4 values (1),(2);
create temporary table tmp5 (a int) engine=myisam;
insert into tmp5 select * from tmp4;
alter table tmp5 add column (b int);
set global read_only=0;
insert into tmp4 values (3),(4);
insert into tmp5 values (10,3),(11,4);
select * from tmp4;
select * from tmp5;
update tmp4 set a=10 where a=2;
delete from tmp4 where a=1;
create table t2 select * from tmp4;
alter table tmp5 add column (c int);
insert into tmp5 values (20,5,1),(21,5,2);
select * from tmp5;
insert into t1 select a+200 from tmp5;
select * from t1;
drop table tmp4,tmp5;
--echo # Check what is logged. Only last create select and the insert...select's should be
--echo # row-logged
source include/show_binlog_events.inc;
--echo # Clean up
drop user test@localhost;
drop table t1,t2;

View File

@ -0,0 +1,2 @@
--source include/have_binlog_format_mixed_or_row.inc
--source read_only.inc

View File

@ -0,0 +1,2 @@
--source include/have_binlog_format_statement.inc
--source read_only.inc

View File

@ -337,7 +337,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
SELECT * FROM information_schema.schema_privileges SELECT * FROM information_schema.schema_privileges
WHERE table_schema = 'information_schema'; WHERE table_schema = 'information_schema';
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
CREATE VIEW db_datadict.v2 AS CREATE SQL SECURITY INVOKER VIEW db_datadict.v2 AS
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM information_schema.tables WHERE table_schema = 'db_datadict'; FROM information_schema.tables WHERE table_schema = 'db_datadict';
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE

View File

@ -281,8 +281,9 @@ WHERE table_schema = 'information_schema';
# 2. This user (testuser1) is also able to GRANT the SELECT privilege # 2. This user (testuser1) is also able to GRANT the SELECT privilege
# on this VIEW to another user (testuser2). # on this VIEW to another user (testuser2).
# 3. The other user (testuser2) must be able to SELECT on this VIEW # 3. The other user (testuser2) must be able to SELECT on this VIEW
# but gets a different result set than testuser1. # but gets a different result set than testuser1, if the view
CREATE VIEW db_datadict.v2 AS # has SQL SECURITY INVOKER.
CREATE SQL SECURITY INVOKER VIEW db_datadict.v2 AS
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM information_schema.tables WHERE table_schema = 'db_datadict'; FROM information_schema.tables WHERE table_schema = 'db_datadict';
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE

View File

@ -1,6 +1,6 @@
--- alter_algorithm.result --- alter_algorithm.result
+++ alter_algorithm.reject +++ alter_algorithm.reject
@@ -7,44 +7,44 @@ @@ -7,40 +7,40 @@
INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1);
SELECT @@alter_algorithm; SELECT @@alter_algorithm;
@@alter_algorithm @@alter_algorithm
@ -18,12 +18,6 @@
-affected rows: 1 -affected rows: 1
-info: Records: 1 Duplicates: 0 Warnings: 0 -info: Records: 1 Duplicates: 0 Warnings: 0
+affected rows: 0 +affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0
# Make existing column NON-NULLABLE
ALTER TABLE t1 MODIFY f3 INT NOT NULL;
-affected rows: 1
-info: Records: 1 Duplicates: 0 Warnings: 0
+affected rows: 0
+info: Records: 0 Duplicates: 0 Warnings: 0 +info: Records: 0 Duplicates: 0 Warnings: 0
# Drop Stored Column # Drop Stored Column
ALTER TABLE t1 DROP COLUMN f5; ALTER TABLE t1 DROP COLUMN f5;
@ -64,7 +58,7 @@
DROP TABLE t1; DROP TABLE t1;
affected rows: 0 affected rows: 0
CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL,
@@ -57,22 +57,22 @@ @@ -53,22 +53,22 @@
FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB;
INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4);
ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1;
@ -97,7 +91,7 @@
DROP TABLE t2, t1; DROP TABLE t2, t1;
affected rows: 0 affected rows: 0
CREATE TABLE t1(f1 INT NOT NULL, CREATE TABLE t1(f1 INT NOT NULL,
@@ -85,27 +85,27 @@ @@ -81,27 +81,27 @@
INSERT INTO t1(f1, f2) VALUES(1, 1); INSERT INTO t1(f1, f2) VALUES(1, 1);
# Add column at the end of the table # Add column at the end of the table
ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL';
@ -135,7 +129,7 @@
# Column length varies # Column length varies
ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20);
affected rows: 0 affected rows: 0
@@ -113,12 +113,12 @@ @@ -109,12 +109,12 @@
SET foreign_key_checks = 0; SET foreign_key_checks = 0;
affected rows: 0 affected rows: 0
ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1);

View File

@ -1,6 +1,6 @@
--- alter_algorithm.result --- alter_algorithm.result
+++ alter_algorithm.reject +++ alter_algorithm.reject
@@ -7,44 +7,35 @@ @@ -7,40 +7,32 @@
INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1);
SELECT @@alter_algorithm; SELECT @@alter_algorithm;
@@alter_algorithm @@alter_algorithm
@ -16,11 +16,6 @@
ALTER TABLE t1 MODIFY f2 INT; ALTER TABLE t1 MODIFY f2 INT;
-affected rows: 1 -affected rows: 1
-info: Records: 1 Duplicates: 0 Warnings: 0 -info: Records: 1 Duplicates: 0 Warnings: 0
+Got one of the listed errors
# Make existing column NON-NULLABLE
ALTER TABLE t1 MODIFY f3 INT NOT NULL;
-affected rows: 1
-info: Records: 1 Duplicates: 0 Warnings: 0
+Got one of the listed errors +Got one of the listed errors
# Drop Stored Column # Drop Stored Column
ALTER TABLE t1 DROP COLUMN f5; ALTER TABLE t1 DROP COLUMN f5;
@ -55,7 +50,7 @@
DROP TABLE t1; DROP TABLE t1;
affected rows: 0 affected rows: 0
CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL,
@@ -57,22 +48,17 @@ @@ -53,22 +45,17 @@
FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB;
INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4);
ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1;
@ -83,7 +78,7 @@
DROP TABLE t2, t1; DROP TABLE t2, t1;
affected rows: 0 affected rows: 0
CREATE TABLE t1(f1 INT NOT NULL, CREATE TABLE t1(f1 INT NOT NULL,
@@ -85,27 +71,27 @@ @@ -81,27 +68,27 @@
INSERT INTO t1(f1, f2) VALUES(1, 1); INSERT INTO t1(f1, f2) VALUES(1, 1);
# Add column at the end of the table # Add column at the end of the table
ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL';
@ -121,7 +116,7 @@
# Column length varies # Column length varies
ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20);
affected rows: 0 affected rows: 0
@@ -113,12 +99,12 @@ @@ -109,12 +96,12 @@
SET foreign_key_checks = 0; SET foreign_key_checks = 0;
affected rows: 0 affected rows: 0
ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1);

View File

@ -1,6 +1,6 @@
--- alter_algorithm.result --- alter_algorithm.result
+++ alter_algorithm.reject +++ alter_algorithm.reject
@@ -7,44 +7,35 @@ @@ -7,40 +7,32 @@
INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1);
SELECT @@alter_algorithm; SELECT @@alter_algorithm;
@@alter_algorithm @@alter_algorithm
@ -16,11 +16,6 @@
ALTER TABLE t1 MODIFY f2 INT; ALTER TABLE t1 MODIFY f2 INT;
-affected rows: 1 -affected rows: 1
-info: Records: 1 Duplicates: 0 Warnings: 0 -info: Records: 1 Duplicates: 0 Warnings: 0
+Got one of the listed errors
# Make existing column NON-NULLABLE
ALTER TABLE t1 MODIFY f3 INT NOT NULL;
-affected rows: 1
-info: Records: 1 Duplicates: 0 Warnings: 0
+Got one of the listed errors +Got one of the listed errors
# Drop Stored Column # Drop Stored Column
ALTER TABLE t1 DROP COLUMN f5; ALTER TABLE t1 DROP COLUMN f5;
@ -55,7 +50,7 @@
DROP TABLE t1; DROP TABLE t1;
affected rows: 0 affected rows: 0
CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL,
@@ -57,22 +48,22 @@ @@ -53,22 +45,22 @@
FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB;
INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4);
ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1;
@ -88,7 +83,7 @@
DROP TABLE t2, t1; DROP TABLE t2, t1;
affected rows: 0 affected rows: 0
CREATE TABLE t1(f1 INT NOT NULL, CREATE TABLE t1(f1 INT NOT NULL,
@@ -85,27 +76,27 @@ @@ -81,27 +73,27 @@
INSERT INTO t1(f1, f2) VALUES(1, 1); INSERT INTO t1(f1, f2) VALUES(1, 1);
# Add column at the end of the table # Add column at the end of the table
ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL';
@ -126,7 +121,7 @@
# Column length varies # Column length varies
ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20);
affected rows: 0 affected rows: 0
@@ -113,12 +104,12 @@ @@ -109,12 +101,12 @@
SET foreign_key_checks = 0; SET foreign_key_checks = 0;
affected rows: 0 affected rows: 0
ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1);

View File

@ -17,10 +17,6 @@ info: Records: 1 Duplicates: 0 Warnings: 0
ALTER TABLE t1 MODIFY f2 INT; ALTER TABLE t1 MODIFY f2 INT;
affected rows: 1 affected rows: 1
info: Records: 1 Duplicates: 0 Warnings: 0 info: Records: 1 Duplicates: 0 Warnings: 0
# Make existing column NON-NULLABLE
ALTER TABLE t1 MODIFY f3 INT NOT NULL;
affected rows: 1
info: Records: 1 Duplicates: 0 Warnings: 0
# Drop Stored Column # Drop Stored Column
ALTER TABLE t1 DROP COLUMN f5; ALTER TABLE t1 DROP COLUMN f5;
affected rows: 1 affected rows: 1

View File

@ -18,7 +18,7 @@ INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1;
# restart: --innodb-force-recovery=6 # restart: --innodb-force-recovery=6 --innodb-change-buffer-dump
check table t1; check table t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK

View File

@ -0,0 +1,304 @@
select plugin_name,plugin_status as 'Must be ACTIVE' from information_schema.plugins where plugin_name like 'inno%' and plugin_status!='ACTIVE';
plugin_name Must be ACTIVE
create user select_only@localhost;
grant select on *.* to select_only@localhost;
connect select_only,localhost,select_only;
connection default;
create sql security invoker view i_buffer_page as select * from information_schema.innodb_buffer_page;
create sql security definer view d_buffer_page as select * from information_schema.innodb_buffer_page;
create sql security invoker view i_buffer_page_lru as select * from information_schema.innodb_buffer_page_lru;
create sql security definer view d_buffer_page_lru as select * from information_schema.innodb_buffer_page_lru;
create sql security invoker view i_buffer_pool_stats as select * from information_schema.innodb_buffer_pool_stats;
create sql security definer view d_buffer_pool_stats as select * from information_schema.innodb_buffer_pool_stats;
create sql security invoker view i_cmp as select * from information_schema.innodb_cmp;
create sql security definer view d_cmp as select * from information_schema.innodb_cmp;
create sql security invoker view i_cmp_per_index as select * from information_schema.innodb_cmp_per_index;
create sql security definer view d_cmp_per_index as select * from information_schema.innodb_cmp_per_index;
create sql security invoker view i_cmp_per_index_reset as select * from information_schema.innodb_cmp_per_index_reset;
create sql security definer view d_cmp_per_index_reset as select * from information_schema.innodb_cmp_per_index_reset;
create sql security invoker view i_cmp_reset as select * from information_schema.innodb_cmp_reset;
create sql security definer view d_cmp_reset as select * from information_schema.innodb_cmp_reset;
create sql security invoker view i_cmpmem as select * from information_schema.innodb_cmpmem;
create sql security definer view d_cmpmem as select * from information_schema.innodb_cmpmem;
create sql security invoker view i_cmpmem_reset as select * from information_schema.innodb_cmpmem_reset;
create sql security definer view d_cmpmem_reset as select * from information_schema.innodb_cmpmem_reset;
create sql security invoker view i_ft_being_deleted as select * from information_schema.innodb_ft_being_deleted;
create sql security definer view d_ft_being_deleted as select * from information_schema.innodb_ft_being_deleted;
create sql security invoker view i_ft_config as select * from information_schema.innodb_ft_config;
create sql security definer view d_ft_config as select * from information_schema.innodb_ft_config;
create sql security invoker view i_ft_default_stopword as select * from information_schema.innodb_ft_default_stopword;
create sql security definer view d_ft_default_stopword as select * from information_schema.innodb_ft_default_stopword;
create sql security invoker view i_ft_deleted as select * from information_schema.innodb_ft_deleted;
create sql security definer view d_ft_deleted as select * from information_schema.innodb_ft_deleted;
create sql security invoker view i_ft_index_cache as select * from information_schema.innodb_ft_index_cache;
create sql security definer view d_ft_index_cache as select * from information_schema.innodb_ft_index_cache;
create sql security invoker view i_ft_index_table as select * from information_schema.innodb_ft_index_table;
create sql security definer view d_ft_index_table as select * from information_schema.innodb_ft_index_table;
create sql security invoker view i_lock_waits as select * from information_schema.innodb_lock_waits;
create sql security definer view d_lock_waits as select * from information_schema.innodb_lock_waits;
create sql security invoker view i_locks as select * from information_schema.innodb_locks;
create sql security definer view d_locks as select * from information_schema.innodb_locks;
create sql security invoker view i_metrics as select * from information_schema.innodb_metrics;
create sql security definer view d_metrics as select * from information_schema.innodb_metrics;
create sql security invoker view i_mutexes as select * from information_schema.innodb_mutexes;
create sql security definer view d_mutexes as select * from information_schema.innodb_mutexes;
create sql security invoker view i_sys_columns as select * from information_schema.innodb_sys_columns;
create sql security definer view d_sys_columns as select * from information_schema.innodb_sys_columns;
create sql security invoker view i_sys_datafiles as select * from information_schema.innodb_sys_datafiles;
create sql security definer view d_sys_datafiles as select * from information_schema.innodb_sys_datafiles;
create sql security invoker view i_sys_fields as select * from information_schema.innodb_sys_fields;
create sql security definer view d_sys_fields as select * from information_schema.innodb_sys_fields;
create sql security invoker view i_sys_foreign as select * from information_schema.innodb_sys_foreign;
create sql security definer view d_sys_foreign as select * from information_schema.innodb_sys_foreign;
create sql security invoker view i_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols;
create sql security definer view d_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols;
create sql security invoker view i_sys_indexes as select * from information_schema.innodb_sys_indexes;
create sql security definer view d_sys_indexes as select * from information_schema.innodb_sys_indexes;
create sql security invoker view i_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits;
create sql security definer view d_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits;
create sql security invoker view i_sys_tables as select * from information_schema.innodb_sys_tables;
create sql security definer view d_sys_tables as select * from information_schema.innodb_sys_tables;
create sql security invoker view i_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces;
create sql security definer view d_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces;
create sql security invoker view i_sys_tablestats as select * from information_schema.innodb_sys_tablestats;
create sql security definer view d_sys_tablestats as select * from information_schema.innodb_sys_tablestats;
create sql security invoker view i_sys_virtual as select * from information_schema.innodb_sys_virtual;
create sql security definer view d_sys_virtual as select * from information_schema.innodb_sys_virtual;
create sql security invoker view i_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption;
create sql security definer view d_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption;
create sql security invoker view i_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing;
create sql security definer view d_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing;
create sql security invoker view i_trx as select * from information_schema.innodb_trx;
create sql security definer view d_trx as select * from information_schema.innodb_trx;
connection select_only;
select count(*) > -1 from information_schema.innodb_buffer_page;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_buffer_page;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_buffer_page;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_buffer_page_lru;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_buffer_page_lru;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_buffer_page_lru;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_buffer_pool_stats;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_buffer_pool_stats;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_buffer_pool_stats;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_cmp;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_cmp;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_cmp;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_cmp_per_index;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_cmp_per_index;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_cmp_per_index;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_cmp_per_index_reset;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_cmp_per_index_reset;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_cmp_per_index_reset;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_cmp_reset;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_cmp_reset;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_cmp_reset;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_cmpmem;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_cmpmem;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_cmpmem;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_cmpmem_reset;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_cmpmem_reset;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_cmpmem_reset;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_ft_being_deleted;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_ft_being_deleted;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_ft_being_deleted;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_ft_config;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_ft_config;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_ft_config;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_ft_default_stopword;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_ft_deleted;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_ft_deleted;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_ft_deleted;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_ft_index_cache;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_ft_index_cache;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_ft_index_cache;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_ft_index_table;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_ft_index_table;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_ft_index_table;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_lock_waits;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_lock_waits;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_lock_waits;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_locks;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_locks;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_locks;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_metrics;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_metrics;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_metrics;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_mutexes;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_mutexes;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_mutexes;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_columns;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_columns;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_columns;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_datafiles;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_datafiles;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_datafiles;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_fields;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_fields;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_fields;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_foreign;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_foreign;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_foreign;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_foreign_cols;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_foreign_cols;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_foreign_cols;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_indexes;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_indexes;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_indexes;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_semaphore_waits;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_semaphore_waits;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_semaphore_waits;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_tables;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_tables;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_tables;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_tablespaces;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_tablespaces;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_tablespaces;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_tablestats;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_tablestats;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_tablestats;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_sys_virtual;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_sys_virtual;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_sys_virtual;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_tablespaces_encryption;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
select count(*) > -1 from i_tablespaces_encryption;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
select count(*) > -1 from d_tablespaces_encryption;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_tablespaces_scrubbing;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
select count(*) > -1 from i_tablespaces_scrubbing;
ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
select count(*) > -1 from d_tablespaces_scrubbing;
count(*) > -1
1
select count(*) > -1 from information_schema.innodb_trx;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from i_trx;
ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
select count(*) > -1 from d_trx;
count(*) > -1
1
connection default;
drop database test;
create database test;
drop user select_only@localhost;

View File

@ -96,8 +96,8 @@ INSERT INTO t3 SET c=NULL;
SET @old_sql_mode = @@sql_mode; SET @old_sql_mode = @@sql_mode;
SET sql_mode = ''; SET sql_mode = '';
ALTER TABLE t1 MODIFY c INT NOT NULL; ALTER TABLE t1 MODIFY c INT NOT NULL;
affected rows: 0 affected rows: 1
info: Records: 0 Duplicates: 0 Warnings: 1 info: Records: 1 Duplicates: 0 Warnings: 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'c' at row 1
ALTER TABLE t2 MODIFY c INT NOT NULL; ALTER TABLE t2 MODIFY c INT NOT NULL;
@ -111,10 +111,9 @@ info: Records: 1 Duplicates: 0 Warnings: 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'c' at row 1
SET sql_mode = @old_sql_mode; SET sql_mode = @old_sql_mode;
# MDEV-18819 FIXME: Wrong result g=NULL
SELECT * FROM t1; SELECT * FROM t1;
c g c g
0 NULL 0 0
SELECT * FROM t2; SELECT * FROM t2;
c v c v
0 0 0 0
@ -137,8 +136,8 @@ INSERT INTO t1 SET c=NULL;
INSERT INTO t2 SET c=NULL; INSERT INTO t2 SET c=NULL;
INSERT INTO t3 SET c=NULL; INSERT INTO t3 SET c=NULL;
ALTER IGNORE TABLE t1 MODIFY c INT NOT NULL; ALTER IGNORE TABLE t1 MODIFY c INT NOT NULL;
affected rows: 0 affected rows: 1
info: Records: 0 Duplicates: 0 Warnings: 1 info: Records: 1 Duplicates: 0 Warnings: 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'c' at row 1
ALTER IGNORE TABLE t2 MODIFY c INT NOT NULL; ALTER IGNORE TABLE t2 MODIFY c INT NOT NULL;
@ -151,10 +150,9 @@ affected rows: 1
info: Records: 1 Duplicates: 0 Warnings: 1 info: Records: 1 Duplicates: 0 Warnings: 1
Warnings: Warnings:
Warning 1265 Data truncated for column 'c' at row 1 Warning 1265 Data truncated for column 'c' at row 1
# MDEV-18819 FIXME: Wrong result g=NULL
SELECT * FROM t1; SELECT * FROM t1;
c g c g
0 NULL 0 0
SELECT * FROM t2; SELECT * FROM t2;
c v c v
0 0 0 0
@ -186,12 +184,11 @@ UPDATE t1 SET c=0;
UPDATE t2 SET c=0; UPDATE t2 SET c=0;
UPDATE t3 SET c=0; UPDATE t3 SET c=0;
ALTER TABLE t1 MODIFY c INT NOT NULL; ALTER TABLE t1 MODIFY c INT NOT NULL;
affected rows: 0 affected rows: 1
info: Records: 0 Duplicates: 0 Warnings: 0 info: Records: 1 Duplicates: 0 Warnings: 0
ALTER TABLE t2 MODIFY c INT NOT NULL; ALTER TABLE t2 MODIFY c INT NOT NULL;
affected rows: 0 affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0 info: Records: 0 Duplicates: 0 Warnings: 0
# MDEV-18819 FIXME: This should not require ALGORITHM=COPY.
ALTER TABLE t3 MODIFY c INT NOT NULL; ALTER TABLE t3 MODIFY c INT NOT NULL;
affected rows: 1 affected rows: 1
info: Records: 1 Duplicates: 0 Warnings: 0 info: Records: 1 Duplicates: 0 Warnings: 0

View File

@ -567,7 +567,7 @@ Variable_name Value
auto_increment_increment 65535 auto_increment_increment 65535
auto_increment_offset 65535 auto_increment_offset 65535
INSERT INTO t1 VALUES (NULL),(NULL); INSERT INTO t1 VALUES (NULL),(NULL);
ERROR HY000: Failed to read auto-increment value from storage engine ERROR 22003: Out of range value for column 'c1' at row 1
SELECT * FROM t1; SELECT * FROM t1;
c1 c1
1 1
@ -677,7 +677,7 @@ SELECT a,b FROM t;
a b a b
1 S1 1 S1
3 S2 3 S2
4 S2 5 S2
disconnect con1; disconnect con1;
connection default; connection default;
# Client 1: Insert a record with auto_increment_increment=1 # Client 1: Insert a record with auto_increment_increment=1
@ -688,14 +688,14 @@ t CREATE TABLE `t` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`b` varchar(200) DEFAULT NULL, `b` varchar(200) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1
INSERT INTO t(b) VALUES('S1'); INSERT INTO t(b) VALUES('S1');
SELECT a,b FROM t; SELECT a,b FROM t;
a b a b
1 S1 1 S1
3 S2 3 S2
4 S2 5 S2
5 S1 6 S1
DROP TABLE t; DROP TABLE t;
# Autoincrement behaviour with mixed insert. # Autoincrement behaviour with mixed insert.
CREATE TABLE t( CREATE TABLE t(
@ -733,22 +733,22 @@ t CREATE TABLE `t` (
`a` tinyint(4) NOT NULL AUTO_INCREMENT, `a` tinyint(4) NOT NULL AUTO_INCREMENT,
`b` varchar(200) DEFAULT NULL, `b` varchar(200) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1 ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1
INSERT INTO t(b) VALUES('S4'); INSERT INTO t(b) VALUES('S4');
SELECT * FROM t; SELECT * FROM t;
a b a b
1 S0 1 S0
11 S1 11 S1
22 S3
23 S4
28 S2 28 S2
31 S3
32 S4
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`a` tinyint(4) NOT NULL AUTO_INCREMENT, `a` tinyint(4) NOT NULL AUTO_INCREMENT,
`b` varchar(200) DEFAULT NULL, `b` varchar(200) DEFAULT NULL,
PRIMARY KEY (`a`) PRIMARY KEY (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1
DROP TABLE t; DROP TABLE t;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=5; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=5;
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
@ -789,7 +789,7 @@ t2 CREATE TABLE `t2` (
`n` int(10) unsigned NOT NULL, `n` int(10) unsigned NOT NULL,
`o` enum('FALSE','TRUE') DEFAULT NULL, `o` enum('FALSE','TRUE') DEFAULT NULL,
PRIMARY KEY (`m`) PRIMARY KEY (`m`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1 ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1
INSERT INTO t1 (b,c) SELECT n,o FROM t2 ; INSERT INTO t1 (b,c) SELECT n,o FROM t2 ;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
@ -1475,13 +1475,13 @@ SELECT * FROM t;
i i
1 1
301 301
351 601
SHOW CREATE TABLE t; SHOW CREATE TABLE t;
Table Create Table Table Create Table
t CREATE TABLE `t` ( t CREATE TABLE `t` (
`i` int(11) NOT NULL AUTO_INCREMENT, `i` int(11) NOT NULL AUTO_INCREMENT,
KEY `i` (`i`) KEY `i` (`i`)
) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1 ) ENGINE=InnoDB AUTO_INCREMENT=651 DEFAULT CHARSET=latin1
DROP TABLE t; DROP TABLE t;
SET auto_increment_increment = DEFAULT; SET auto_increment_increment = DEFAULT;
# #

View File

@ -1,22 +1,15 @@
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET @saved_include_delete_marked = @@GLOBAL.innodb_stats_include_delete_marked; SET @saved_include_delete_marked = @@GLOBAL.innodb_stats_include_delete_marked;
SET GLOBAL innodb_stats_include_delete_marked = ON; SET GLOBAL innodb_stats_include_delete_marked = ON;
SET @saved_traditional = @@GLOBAL.innodb_stats_traditional; SET @saved_traditional = @@GLOBAL.innodb_stats_traditional;
SET GLOBAL innodb_stats_traditional=false; SET GLOBAL innodb_stats_traditional=false;
SET @saved_modified_counter = @@GLOBAL.innodb_stats_modified_counter; SET @saved_modified_counter = @@GLOBAL.innodb_stats_modified_counter;
SET GLOBAL innodb_stats_modified_counter=1; SET GLOBAL innodb_stats_modified_counter=1;
CREATE TABLE t0 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val)) CREATE TABLE t1 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val))
ENGINE=INNODB STATS_PERSISTENT=1,STATS_AUTO_RECALC=1; ENGINE=INNODB STATS_PERSISTENT=1,STATS_AUTO_RECALC=1;
CREATE TABLE t1 LIKE t0; CREATE TABLE t2 LIKE t1;
CREATE TABLE t2 LIKE t0; INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16;
INSERT INTO t0 (val) VALUES (4);
INSERT INTO t0 (val) SELECT 4 FROM t0;
INSERT INTO t0 (val) SELECT 4 FROM t0;
INSERT INTO t0 (val) SELECT 4 FROM t0;
INSERT INTO t0 (val) SELECT 4 FROM t0;
INSERT INTO t1 SELECT * FROM t0;
SELECT COUNT(*) FROM t1;
COUNT(*)
16
ANALYZE TABLE t1; ANALYZE TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected test.t1 analyze status Engine-independent statistics collected
@ -49,7 +42,7 @@ COUNT(*)
0 0
connection default; connection default;
BEGIN; BEGIN;
INSERT INTO t2 SELECT * FROM t0; INSERT INTO t2 (val) SELECT 4 FROM seq_1_to_16;
# The INSERT will show up before COMMIT. # The INSERT will show up before COMMIT.
EXPLAIN SELECT * FROM t2 WHERE val=4; EXPLAIN SELECT * FROM t2 WHERE val=4;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
@ -66,17 +59,14 @@ connection con1;
EXPLAIN SELECT * FROM t2 WHERE val=4; EXPLAIN SELECT * FROM t2 WHERE val=4;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref val val 4 const 1 Using index 1 SIMPLE t2 ref val val 4 const 1 Using index
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
InnoDB 0 transactions not purged InnoDB 0 transactions not purged
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
# After COMMIT and purge, the DELETE must show up. # After COMMIT and purge, the DELETE must show up.
EXPLAIN SELECT * FROM t1 WHERE val=4; EXPLAIN SELECT * FROM t1 WHERE val=4;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref val val 4 const 1 Using index 1 SIMPLE t1 ref val val 4 const 1 Using index
SET GLOBAL innodb_stats_include_delete_marked = OFF; SET GLOBAL innodb_stats_include_delete_marked = OFF;
BEGIN; BEGIN;
INSERT INTO t1 SELECT * FROM t0; INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16;
EXPLAIN SELECT * FROM t1 WHERE val=4; EXPLAIN SELECT * FROM t1 WHERE val=4;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref val val 4 const 16 Using index 1 SIMPLE t1 ref val val 4 const 16 Using index
@ -85,7 +75,7 @@ EXPLAIN SELECT * FROM t1 WHERE val=4;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref val val 4 const 1 Using index 1 SIMPLE t1 ref val val 4 const 1 Using index
BEGIN; BEGIN;
INSERT INTO t1 SELECT * FROM t0; INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16;
COMMIT; COMMIT;
EXPLAIN SELECT * FROM t1 WHERE val=4; EXPLAIN SELECT * FROM t1 WHERE val=4;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
@ -111,7 +101,8 @@ COUNT(*)
16 16
disconnect con1; disconnect con1;
connection default; connection default;
DROP TABLE t0,t1,t2; DROP TABLE t1,t2;
SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked; SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked;
SET GLOBAL innodb_stats_traditional = @saved_traditional; SET GLOBAL innodb_stats_traditional = @saved_traditional;
SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter; SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;

View File

@ -130,6 +130,10 @@ HANDLER h READ `PRIMARY` PREV WHERE 0;
pk f1 f2 f3 f4 f5 f6 f7 f8 filler pk f1 f2 f3 f4 f5 f6 f7 f8 filler
HANDLER h CLOSE; HANDLER h CLOSE;
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-19630 ALTER TABLE ... ADD COLUMN damages foreign keys
# which are pointed to the table being altered
#
CREATE TABLE t1(f1 int not null, primary key(f1))engine=innodb; 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, CREATE TABLE t2(f1 INT AUTO_INCREMENT NOT NULL, f2 INT NOT NULL,
status ENUM ('a', 'b', 'c'), INDEX idx1(f2), status ENUM ('a', 'b', 'c'), INDEX idx1(f2),
@ -156,6 +160,17 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t2 CHANGE status status VARCHAR(20) DEFAULT NULL; ALTER TABLE t2 CHANGE status status VARCHAR(20) DEFAULT NULL;
DROP TABLE t2, t1; DROP TABLE t2, t1;
#
# MDEV-20938 Double free of dict_foreign_t during instant ALTER TABLE
#
CREATE TABLE t1 (id INT UNSIGNED PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (a INT UNSIGNED PRIMARY KEY, b INT UNSIGNED UNIQUE,
FOREIGN KEY fk1 (b) REFERENCES t1 (id)) ENGINE=InnoDB;
ALTER TABLE t2
DROP FOREIGN KEY fk1,
CHANGE b d INT UNSIGNED,
ADD c INT;
DROP TABLE t2, t1;
create table t ( create table t (
a varchar(9), a varchar(9),
b int, b int,

View File

@ -0,0 +1,15 @@
rename table mysql.table_stats to mysql.table_stats_save;
flush tables;
set use_stat_tables= PREFERABLY;
create table t1 (a int) engine=InnoDB;
start transaction;
insert t1 values (1);
insert t1 values (2);
commit;
select * from t1;
a
1
2
drop table t1;
rename table mysql.table_stats_save to mysql.table_stats;
flush tables;

View File

@ -31,10 +31,6 @@ ALTER TABLE t1 ADD COLUMN col1 INT NOT NULL,DROP PRIMARY KEY,ADD PRIMARY KEY(col
--error $error_code --error $error_code
ALTER TABLE t1 MODIFY f2 INT; ALTER TABLE t1 MODIFY f2 INT;
--echo # Make existing column NON-NULLABLE
--error $error_code
ALTER TABLE t1 MODIFY f3 INT NOT NULL;
--echo # Drop Stored Column --echo # Drop Stored Column
--error $error_code --error $error_code
ALTER TABLE t1 DROP COLUMN f5; ALTER TABLE t1 DROP COLUMN f5;

View File

@ -43,7 +43,7 @@ INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1;
INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1;
--let $restart_parameters= --innodb-force-recovery=6 --let $restart_parameters= --innodb-force-recovery=6 --innodb-change-buffer-dump
--source include/restart_mysqld.inc --source include/restart_mysqld.inc
--replace_regex /contains \d+ entries/contains #### entries/ --replace_regex /contains \d+ entries/contains #### entries/

View File

@ -0,0 +1,33 @@
--enable-plugin-innodb-trx
--enable-plugin-innodb-locks
--enable-plugin-innodb-lock-waits
--enable-plugin-innodb-cmp
--enable-plugin-innodb-cmp-reset
--enable-plugin-innodb-cmpmem
--enable-plugin-innodb-cmpmem-reset
--enable-plugin-innodb-cmp-per-index
--enable-plugin-innodb-cmp-per-index-reset
--enable-plugin-innodb-buffer-page
--enable-plugin-innodb-buffer-page-lru
--enable-plugin-innodb-buffer-pool-stats
--enable-plugin-innodb-metrics
--enable-plugin-innodb-ft-default-stopword
--enable-plugin-innodb-ft-deleted
--enable-plugin-innodb-ft-being-deleted
--enable-plugin-innodb-ft-config
--enable-plugin-innodb-ft-index-cache
--enable-plugin-innodb-ft-index-table
--enable-plugin-innodb-sys-tables
--enable-plugin-innodb-sys-tablestats
--enable-plugin-innodb-sys-indexes
--enable-plugin-innodb-sys-columns
--enable-plugin-innodb-sys-fields
--enable-plugin-innodb-sys-foreign
--enable-plugin-innodb-sys-foreign-cols
--enable-plugin-innodb-sys-tablespaces
--enable-plugin-innodb-sys-datafiles
--enable-plugin-innodb-sys-virtual
--enable-plugin-innodb-mutexes
--enable-plugin-innodb-sys-semaphore-waits
--enable-plugin-innodb-tablespaces-encryption
--enable-plugin-innodb-tablespaces-scrubbing

View File

@ -0,0 +1,311 @@
source include/have_innodb.inc;
source include/not_embedded.inc;
# make sure we've enabled everything:
select plugin_name,plugin_status as 'Must be ACTIVE' from information_schema.plugins where plugin_name like 'inno%' and plugin_status!='ACTIVE';
create user select_only@localhost;
grant select on *.* to select_only@localhost;
connect select_only,localhost,select_only;
connection default;
create sql security invoker view i_buffer_page as select * from information_schema.innodb_buffer_page;
create sql security definer view d_buffer_page as select * from information_schema.innodb_buffer_page;
create sql security invoker view i_buffer_page_lru as select * from information_schema.innodb_buffer_page_lru;
create sql security definer view d_buffer_page_lru as select * from information_schema.innodb_buffer_page_lru;
create sql security invoker view i_buffer_pool_stats as select * from information_schema.innodb_buffer_pool_stats;
create sql security definer view d_buffer_pool_stats as select * from information_schema.innodb_buffer_pool_stats;
create sql security invoker view i_cmp as select * from information_schema.innodb_cmp;
create sql security definer view d_cmp as select * from information_schema.innodb_cmp;
create sql security invoker view i_cmp_per_index as select * from information_schema.innodb_cmp_per_index;
create sql security definer view d_cmp_per_index as select * from information_schema.innodb_cmp_per_index;
create sql security invoker view i_cmp_per_index_reset as select * from information_schema.innodb_cmp_per_index_reset;
create sql security definer view d_cmp_per_index_reset as select * from information_schema.innodb_cmp_per_index_reset;
create sql security invoker view i_cmp_reset as select * from information_schema.innodb_cmp_reset;
create sql security definer view d_cmp_reset as select * from information_schema.innodb_cmp_reset;
create sql security invoker view i_cmpmem as select * from information_schema.innodb_cmpmem;
create sql security definer view d_cmpmem as select * from information_schema.innodb_cmpmem;
create sql security invoker view i_cmpmem_reset as select * from information_schema.innodb_cmpmem_reset;
create sql security definer view d_cmpmem_reset as select * from information_schema.innodb_cmpmem_reset;
create sql security invoker view i_ft_being_deleted as select * from information_schema.innodb_ft_being_deleted;
create sql security definer view d_ft_being_deleted as select * from information_schema.innodb_ft_being_deleted;
create sql security invoker view i_ft_config as select * from information_schema.innodb_ft_config;
create sql security definer view d_ft_config as select * from information_schema.innodb_ft_config;
create sql security invoker view i_ft_default_stopword as select * from information_schema.innodb_ft_default_stopword;
create sql security definer view d_ft_default_stopword as select * from information_schema.innodb_ft_default_stopword;
create sql security invoker view i_ft_deleted as select * from information_schema.innodb_ft_deleted;
create sql security definer view d_ft_deleted as select * from information_schema.innodb_ft_deleted;
create sql security invoker view i_ft_index_cache as select * from information_schema.innodb_ft_index_cache;
create sql security definer view d_ft_index_cache as select * from information_schema.innodb_ft_index_cache;
create sql security invoker view i_ft_index_table as select * from information_schema.innodb_ft_index_table;
create sql security definer view d_ft_index_table as select * from information_schema.innodb_ft_index_table;
create sql security invoker view i_lock_waits as select * from information_schema.innodb_lock_waits;
create sql security definer view d_lock_waits as select * from information_schema.innodb_lock_waits;
create sql security invoker view i_locks as select * from information_schema.innodb_locks;
create sql security definer view d_locks as select * from information_schema.innodb_locks;
create sql security invoker view i_metrics as select * from information_schema.innodb_metrics;
create sql security definer view d_metrics as select * from information_schema.innodb_metrics;
create sql security invoker view i_mutexes as select * from information_schema.innodb_mutexes;
create sql security definer view d_mutexes as select * from information_schema.innodb_mutexes;
create sql security invoker view i_sys_columns as select * from information_schema.innodb_sys_columns;
create sql security definer view d_sys_columns as select * from information_schema.innodb_sys_columns;
create sql security invoker view i_sys_datafiles as select * from information_schema.innodb_sys_datafiles;
create sql security definer view d_sys_datafiles as select * from information_schema.innodb_sys_datafiles;
create sql security invoker view i_sys_fields as select * from information_schema.innodb_sys_fields;
create sql security definer view d_sys_fields as select * from information_schema.innodb_sys_fields;
create sql security invoker view i_sys_foreign as select * from information_schema.innodb_sys_foreign;
create sql security definer view d_sys_foreign as select * from information_schema.innodb_sys_foreign;
create sql security invoker view i_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols;
create sql security definer view d_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols;
create sql security invoker view i_sys_indexes as select * from information_schema.innodb_sys_indexes;
create sql security definer view d_sys_indexes as select * from information_schema.innodb_sys_indexes;
create sql security invoker view i_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits;
create sql security definer view d_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits;
create sql security invoker view i_sys_tables as select * from information_schema.innodb_sys_tables;
create sql security definer view d_sys_tables as select * from information_schema.innodb_sys_tables;
create sql security invoker view i_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces;
create sql security definer view d_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces;
create sql security invoker view i_sys_tablestats as select * from information_schema.innodb_sys_tablestats;
create sql security definer view d_sys_tablestats as select * from information_schema.innodb_sys_tablestats;
create sql security invoker view i_sys_virtual as select * from information_schema.innodb_sys_virtual;
create sql security definer view d_sys_virtual as select * from information_schema.innodb_sys_virtual;
create sql security invoker view i_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption;
create sql security definer view d_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption;
create sql security invoker view i_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing;
create sql security definer view d_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing;
create sql security invoker view i_trx as select * from information_schema.innodb_trx;
create sql security definer view d_trx as select * from information_schema.innodb_trx;
connection select_only;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_buffer_page;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_buffer_page;
select count(*) > -1 from d_buffer_page;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_buffer_page_lru;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_buffer_page_lru;
select count(*) > -1 from d_buffer_page_lru;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_buffer_pool_stats;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_buffer_pool_stats;
select count(*) > -1 from d_buffer_pool_stats;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_cmp;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_cmp;
select count(*) > -1 from d_cmp;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_cmp_per_index;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_cmp_per_index;
select count(*) > -1 from d_cmp_per_index;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_cmp_per_index_reset;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_cmp_per_index_reset;
select count(*) > -1 from d_cmp_per_index_reset;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_cmp_reset;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_cmp_reset;
select count(*) > -1 from d_cmp_reset;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_cmpmem;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_cmpmem;
select count(*) > -1 from d_cmpmem;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_cmpmem_reset;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_cmpmem_reset;
select count(*) > -1 from d_cmpmem_reset;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_ft_being_deleted;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_ft_being_deleted;
select count(*) > -1 from d_ft_being_deleted;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_ft_config;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_ft_config;
select count(*) > -1 from d_ft_config;
# non-privileged table
select count(*) > -1 from information_schema.innodb_ft_default_stopword;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_ft_deleted;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_ft_deleted;
select count(*) > -1 from d_ft_deleted;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_ft_index_cache;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_ft_index_cache;
select count(*) > -1 from d_ft_index_cache;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_ft_index_table;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_ft_index_table;
select count(*) > -1 from d_ft_index_table;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_lock_waits;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_lock_waits;
select count(*) > -1 from d_lock_waits;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_locks;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_locks;
select count(*) > -1 from d_locks;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_metrics;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_metrics;
select count(*) > -1 from d_metrics;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_mutexes;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_mutexes;
select count(*) > -1 from d_mutexes;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_columns;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_columns;
select count(*) > -1 from d_sys_columns;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_datafiles;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_datafiles;
select count(*) > -1 from d_sys_datafiles;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_fields;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_fields;
select count(*) > -1 from d_sys_fields;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_foreign;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_foreign;
select count(*) > -1 from d_sys_foreign;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_foreign_cols;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_foreign_cols;
select count(*) > -1 from d_sys_foreign_cols;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_indexes;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_indexes;
select count(*) > -1 from d_sys_indexes;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_semaphore_waits;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_semaphore_waits;
select count(*) > -1 from d_sys_semaphore_waits;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_tables;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_tables;
select count(*) > -1 from d_sys_tables;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_tablespaces;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_tablespaces;
select count(*) > -1 from d_sys_tablespaces;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_tablestats;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_tablestats;
select count(*) > -1 from d_sys_tablestats;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_sys_virtual;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_sys_virtual;
select count(*) > -1 from d_sys_virtual;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_tablespaces_encryption;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_tablespaces_encryption;
select count(*) > -1 from d_tablespaces_encryption;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_tablespaces_scrubbing;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_tablespaces_scrubbing;
select count(*) > -1 from d_tablespaces_scrubbing;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from information_schema.innodb_trx;
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
select count(*) > -1 from i_trx;
select count(*) > -1 from d_trx;
connection default;
drop database test;
create database test;
drop user select_only@localhost;

View File

@ -104,7 +104,6 @@ ALTER TABLE t2 MODIFY c INT NOT NULL;
ALTER TABLE t3 MODIFY c INT NOT NULL; ALTER TABLE t3 MODIFY c INT NOT NULL;
--disable_info --disable_info
SET sql_mode = @old_sql_mode; SET sql_mode = @old_sql_mode;
--echo # MDEV-18819 FIXME: Wrong result g=NULL
SELECT * FROM t1; SELECT * FROM t1;
SELECT * FROM t2; SELECT * FROM t2;
SELECT * FROM t3; SELECT * FROM t3;
@ -123,7 +122,6 @@ ALTER IGNORE TABLE t1 MODIFY c INT NOT NULL;
ALTER IGNORE TABLE t2 MODIFY c INT NOT NULL; ALTER IGNORE TABLE t2 MODIFY c INT NOT NULL;
ALTER IGNORE TABLE t3 MODIFY c INT NOT NULL; ALTER IGNORE TABLE t3 MODIFY c INT NOT NULL;
--disable_info --disable_info
--echo # MDEV-18819 FIXME: Wrong result g=NULL
SELECT * FROM t1; SELECT * FROM t1;
SELECT * FROM t2; SELECT * FROM t2;
SELECT * FROM t3; SELECT * FROM t3;
@ -151,7 +149,6 @@ UPDATE t3 SET c=0;
--enable_info --enable_info
ALTER TABLE t1 MODIFY c INT NOT NULL; ALTER TABLE t1 MODIFY c INT NOT NULL;
ALTER TABLE t2 MODIFY c INT NOT NULL; ALTER TABLE t2 MODIFY c INT NOT NULL;
--echo # MDEV-18819 FIXME: This should not require ALGORITHM=COPY.
ALTER TABLE t3 MODIFY c INT NOT NULL; ALTER TABLE t3 MODIFY c INT NOT NULL;
--disable_info --disable_info
SELECT * FROM t1; SELECT * FROM t1;

View File

@ -349,7 +349,7 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2
SELECT * FROM t1; SELECT * FROM t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976;
SHOW VARIABLES LIKE "auto_inc%"; SHOW VARIABLES LIKE "auto_inc%";
--error 1467 --error HA_ERR_AUTOINC_ERANGE
INSERT INTO t1 VALUES (NULL),(NULL); INSERT INTO t1 VALUES (NULL),(NULL);
SELECT * FROM t1; SELECT * FROM t1;
DROP TABLE t1; DROP TABLE t1;

View File

@ -1,6 +1,8 @@
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/big_test.inc --source include/have_sequence.inc
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
SET @saved_include_delete_marked = @@GLOBAL.innodb_stats_include_delete_marked; SET @saved_include_delete_marked = @@GLOBAL.innodb_stats_include_delete_marked;
SET GLOBAL innodb_stats_include_delete_marked = ON; SET GLOBAL innodb_stats_include_delete_marked = ON;
SET @saved_traditional = @@GLOBAL.innodb_stats_traditional; SET @saved_traditional = @@GLOBAL.innodb_stats_traditional;
@ -8,19 +10,11 @@ SET GLOBAL innodb_stats_traditional=false;
SET @saved_modified_counter = @@GLOBAL.innodb_stats_modified_counter; SET @saved_modified_counter = @@GLOBAL.innodb_stats_modified_counter;
SET GLOBAL innodb_stats_modified_counter=1; SET GLOBAL innodb_stats_modified_counter=1;
CREATE TABLE t0 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val)) CREATE TABLE t1 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val))
ENGINE=INNODB STATS_PERSISTENT=1,STATS_AUTO_RECALC=1; ENGINE=INNODB STATS_PERSISTENT=1,STATS_AUTO_RECALC=1;
CREATE TABLE t1 LIKE t0; CREATE TABLE t2 LIKE t1;
CREATE TABLE t2 LIKE t0;
INSERT INTO t0 (val) VALUES (4); INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16;
INSERT INTO t0 (val) SELECT 4 FROM t0;
INSERT INTO t0 (val) SELECT 4 FROM t0;
INSERT INTO t0 (val) SELECT 4 FROM t0;
INSERT INTO t0 (val) SELECT 4 FROM t0;
INSERT INTO t1 SELECT * FROM t0;
SELECT COUNT(*) FROM t1;
ANALYZE TABLE t1; ANALYZE TABLE t1;
connect(con1, localhost, root,,); connect(con1, localhost, root,,);
@ -46,7 +40,7 @@ SELECT COUNT(*) FROM t1;
connection default; connection default;
BEGIN; BEGIN;
INSERT INTO t2 SELECT * FROM t0; INSERT INTO t2 (val) SELECT 4 FROM seq_1_to_16;
--echo # The INSERT will show up before COMMIT. --echo # The INSERT will show up before COMMIT.
EXPLAIN SELECT * FROM t2 WHERE val=4; EXPLAIN SELECT * FROM t2 WHERE val=4;
@ -57,21 +51,18 @@ SELECT COUNT(*) FROM t2;
connection con1; connection con1;
EXPLAIN SELECT * FROM t2 WHERE val=4; EXPLAIN SELECT * FROM t2 WHERE val=4;
SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency;
SET GLOBAL innodb_purge_rseg_truncate_frequency = 1;
--source include/wait_all_purged.inc --source include/wait_all_purged.inc
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;
--echo # After COMMIT and purge, the DELETE must show up. --echo # After COMMIT and purge, the DELETE must show up.
EXPLAIN SELECT * FROM t1 WHERE val=4; EXPLAIN SELECT * FROM t1 WHERE val=4;
SET GLOBAL innodb_stats_include_delete_marked = OFF; SET GLOBAL innodb_stats_include_delete_marked = OFF;
BEGIN; BEGIN;
INSERT INTO t1 SELECT * FROM t0; INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16;
EXPLAIN SELECT * FROM t1 WHERE val=4; EXPLAIN SELECT * FROM t1 WHERE val=4;
ROLLBACK; ROLLBACK;
EXPLAIN SELECT * FROM t1 WHERE val=4; EXPLAIN SELECT * FROM t1 WHERE val=4;
BEGIN; BEGIN;
INSERT INTO t1 SELECT * FROM t0; INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16;
COMMIT; COMMIT;
EXPLAIN SELECT * FROM t1 WHERE val=4; EXPLAIN SELECT * FROM t1 WHERE val=4;
BEGIN; BEGIN;
@ -89,7 +80,8 @@ disconnect con1;
connection default; connection default;
DROP TABLE t0,t1,t2; DROP TABLE t1,t2;
SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked; SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked;
SET GLOBAL innodb_stats_traditional = @saved_traditional; SET GLOBAL innodb_stats_traditional = @saved_traditional;
SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter; SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter;
SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency;

View File

@ -138,8 +138,10 @@ HANDLER h READ `PRIMARY` PREV WHERE 0;
HANDLER h CLOSE; HANDLER h CLOSE;
DROP TABLE t1; DROP TABLE t1;
# MDEV-19630 ALTER TABLE ... ADD COLUMN damages foreign keys which are pointed --echo #
# to the table being altered --echo # MDEV-19630 ALTER TABLE ... ADD COLUMN damages foreign keys
--echo # which are pointed to the table being altered
--echo #
CREATE TABLE t1(f1 int not null, primary key(f1))engine=innodb; 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, CREATE TABLE t2(f1 INT AUTO_INCREMENT NOT NULL, f2 INT NOT NULL,
status ENUM ('a', 'b', 'c'), INDEX idx1(f2), status ENUM ('a', 'b', 'c'), INDEX idx1(f2),
@ -158,6 +160,19 @@ DROP TABLE t2, t1;
--let $datadir= `select @@datadir` --let $datadir= `select @@datadir`
--remove_file $datadir/test/load.data --remove_file $datadir/test/load.data
--echo #
--echo # MDEV-20938 Double free of dict_foreign_t during instant ALTER TABLE
--echo #
CREATE TABLE t1 (id INT UNSIGNED PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (a INT UNSIGNED PRIMARY KEY, b INT UNSIGNED UNIQUE,
FOREIGN KEY fk1 (b) REFERENCES t1 (id)) ENGINE=InnoDB;
ALTER TABLE t2
DROP FOREIGN KEY fk1,
CHANGE b d INT UNSIGNED,
ADD c INT;
DROP TABLE t2, t1;
create table t ( create table t (
a varchar(9), a varchar(9),

View File

@ -0,0 +1,17 @@
source include/have_innodb.inc;
#
# MDEV-20354 All but last insert ignored in InnoDB tables when table locked
#
rename table mysql.table_stats to mysql.table_stats_save;
flush tables;
set use_stat_tables= PREFERABLY;
create table t1 (a int) engine=InnoDB;
start transaction;
insert t1 values (1);
insert t1 values (2);
commit;
select * from t1;
drop table t1;
rename table mysql.table_stats_save to mysql.table_stats;
flush tables;

View File

@ -42,9 +42,11 @@ INSERT INTO articles (title,body) VALUES
('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'), ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
('MySQL vs. YourSQL','In the following database comparison ...'), ('MySQL vs. YourSQL','In the following database comparison ...'),
('MySQL Security','When configured properly, MySQL ...'); ('MySQL Security','When configured properly, MySQL ...');
connect dml, localhost, root,,;
BEGIN; BEGIN;
INSERT INTO articles (title,body) VALUES INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'); ('MySQL Tutorial','DBMS stands for DataBase ...');
connection default;
# Make durable the AUTO_INCREMENT in the above incomplete transaction. # Make durable the AUTO_INCREMENT in the above incomplete transaction.
connect flush_redo_log,localhost,root,,; connect flush_redo_log,localhost,root,,;
SET GLOBAL innodb_flush_log_at_trx_commit=1; SET GLOBAL innodb_flush_log_at_trx_commit=1;
@ -54,6 +56,7 @@ ROLLBACK;
disconnect flush_redo_log; disconnect flush_redo_log;
connection default; connection default;
# restart # restart
disconnect dml;
INSERT INTO articles (title,body) VALUES INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'); ('MySQL Tutorial','DBMS stands for DataBase ...');
SELECT * FROM articles SELECT * FROM articles
@ -81,10 +84,40 @@ INSERT INTO articles VALUES
(4, 11, '1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'), (4, 11, '1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
(5, 6, 'MySQL vs. YourSQL','In the following database comparison ...'), (5, 6, 'MySQL vs. YourSQL','In the following database comparison ...'),
(7, 4, 'MySQL Security','When configured properly, MySQL ...'); (7, 4, 'MySQL Security','When configured properly, MySQL ...');
connect dml, localhost, root,,;
BEGIN; BEGIN;
INSERT INTO articles VALUES INSERT INTO articles VALUES
(100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...');
connect dml2, localhost, root,,;
#
# MDEV-19073 FTS row mismatch after crash recovery
#
CREATE TABLE mdev19073(id SERIAL, title VARCHAR(200), body TEXT,
FULLTEXT(title,body)) ENGINE=InnoDB;
INSERT INTO mdev19073 (title, body) VALUES
('MySQL Tutorial', 'DBMS stands for Database...');
CREATE FULLTEXT INDEX idx ON mdev19073(title, body);
CREATE TABLE mdev19073_2 LIKE mdev19073;
INSERT INTO mdev19073_2 (title, body) VALUES
('MySQL Tutorial', 'DBMS stands for Database...');
INSERT INTO mdev19073 (title, body) VALUES
('MariaDB Tutorial', 'DB means Database ...');
INSERT INTO mdev19073_2 (title, body) VALUES
('MariaDB Tutorial', 'DB means Database ...');
SELECT * FROM mdev19073 WHERE MATCH (title, body)
AGAINST ('Database' IN NATURAL LANGUAGE MODE);
id title body
1 MySQL Tutorial DBMS stands for Database...
2 MariaDB Tutorial DB means Database ...
SELECT * FROM mdev19073_2 WHERE MATCH (title, body)
AGAINST ('Database' IN NATURAL LANGUAGE MODE);
id title body
1 MySQL Tutorial DBMS stands for Database...
2 MariaDB Tutorial DB means Database ...
connection default;
# restart # restart
disconnect dml;
disconnect dml2;
INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...'); INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...');
SELECT * FROM articles WHERE MATCH (title, body) SELECT * FROM articles WHERE MATCH (title, body)
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE); AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
@ -93,3 +126,14 @@ id FTS_DOC_ID title body
1 10 MySQL Tutorial DBMS stands for DataBase ... 1 10 MySQL Tutorial DBMS stands for DataBase ...
8 12 MySQL Tutorial DBMS stands for DataBase ... 8 12 MySQL Tutorial DBMS stands for DataBase ...
DROP TABLE articles; DROP TABLE articles;
SELECT * FROM mdev19073 WHERE MATCH (title, body)
AGAINST ('Database' IN NATURAL LANGUAGE MODE);
id title body
1 MySQL Tutorial DBMS stands for Database...
2 MariaDB Tutorial DB means Database ...
SELECT * FROM mdev19073_2 WHERE MATCH (title, body)
AGAINST ('Database' IN NATURAL LANGUAGE MODE);
id title body
1 MySQL Tutorial DBMS stands for Database...
2 MariaDB Tutorial DB means Database ...
DROP TABLE mdev19073, mdev19073_2;

View File

@ -6,6 +6,7 @@
--source include/have_innodb.inc --source include/have_innodb.inc
# The embedded server tests do not support restarting. # The embedded server tests do not support restarting.
--source include/not_embedded.inc --source include/not_embedded.inc
--source include/maybe_debug.inc
FLUSH TABLES; FLUSH TABLES;
# Following are test for crash recovery on FTS index, the first scenario # Following are test for crash recovery on FTS index, the first scenario
@ -73,10 +74,12 @@ INSERT INTO articles (title,body) VALUES
('MySQL vs. YourSQL','In the following database comparison ...'), ('MySQL vs. YourSQL','In the following database comparison ...'),
('MySQL Security','When configured properly, MySQL ...'); ('MySQL Security','When configured properly, MySQL ...');
connect(dml, localhost, root,,);
BEGIN; BEGIN;
INSERT INTO articles (title,body) VALUES INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'); ('MySQL Tutorial','DBMS stands for DataBase ...');
connection default;
--echo # Make durable the AUTO_INCREMENT in the above incomplete transaction. --echo # Make durable the AUTO_INCREMENT in the above incomplete transaction.
--connect (flush_redo_log,localhost,root,,) --connect (flush_redo_log,localhost,root,,)
@ -89,6 +92,8 @@ ROLLBACK;
--source include/restart_mysqld.inc --source include/restart_mysqld.inc
disconnect dml;
# This insert will re-initialize the Doc ID counter, it should not crash # This insert will re-initialize the Doc ID counter, it should not crash
INSERT INTO articles (title,body) VALUES INSERT INTO articles (title,body) VALUES
('MySQL Tutorial','DBMS stands for DataBase ...'); ('MySQL Tutorial','DBMS stands for DataBase ...');
@ -121,6 +126,7 @@ INSERT INTO articles VALUES
(5, 6, 'MySQL vs. YourSQL','In the following database comparison ...'), (5, 6, 'MySQL vs. YourSQL','In the following database comparison ...'),
(7, 4, 'MySQL Security','When configured properly, MySQL ...'); (7, 4, 'MySQL Security','When configured properly, MySQL ...');
connect(dml, localhost, root,,);
BEGIN; BEGIN;
# Below we do not depend on the durability of the AUTO_INCREMENT sequence, # Below we do not depend on the durability of the AUTO_INCREMENT sequence,
@ -128,7 +134,49 @@ BEGIN;
INSERT INTO articles VALUES INSERT INTO articles VALUES
(100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...');
connect(dml2, localhost, root,,);
--echo #
--echo # MDEV-19073 FTS row mismatch after crash recovery
--echo #
CREATE TABLE mdev19073(id SERIAL, title VARCHAR(200), body TEXT,
FULLTEXT(title,body)) ENGINE=InnoDB;
INSERT INTO mdev19073 (title, body) VALUES
('MySQL Tutorial', 'DBMS stands for Database...');
CREATE FULLTEXT INDEX idx ON mdev19073(title, body);
CREATE TABLE mdev19073_2 LIKE mdev19073;
if ($have_debug)
{
--disable_query_log
SET @saved_dbug = @@debug_dbug;
SET DEBUG_DBUG = '+d,fts_instrument_sync_debug';
--enable_query_log
}
INSERT INTO mdev19073_2 (title, body) VALUES
('MySQL Tutorial', 'DBMS stands for Database...');
if ($have_debug)
{
--disable_query_log
SET DEBUG_DBUG = @saved_dbug;
--enable_query_log
}
INSERT INTO mdev19073 (title, body) VALUES
('MariaDB Tutorial', 'DB means Database ...');
INSERT INTO mdev19073_2 (title, body) VALUES
('MariaDB Tutorial', 'DB means Database ...');
# Should return 2 rows
SELECT * FROM mdev19073 WHERE MATCH (title, body)
AGAINST ('Database' IN NATURAL LANGUAGE MODE);
SELECT * FROM mdev19073_2 WHERE MATCH (title, body)
AGAINST ('Database' IN NATURAL LANGUAGE MODE);
connection default;
--source include/restart_mysqld.inc --source include/restart_mysqld.inc
disconnect dml;
disconnect dml2;
# This would re-initialize the FTS index and do the re-tokenization # This would re-initialize the FTS index and do the re-tokenization
# of above records # of above records
@ -138,3 +186,10 @@ SELECT * FROM articles WHERE MATCH (title, body)
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE); AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
DROP TABLE articles; DROP TABLE articles;
# Should return 2 rows
SELECT * FROM mdev19073 WHERE MATCH (title, body)
AGAINST ('Database' IN NATURAL LANGUAGE MODE);
SELECT * FROM mdev19073_2 WHERE MATCH (title, body)
AGAINST ('Database' IN NATURAL LANGUAGE MODE);
DROP TABLE mdev19073, mdev19073_2;

View File

@ -109,6 +109,39 @@ ALTER TABLE t1 ADD UNIQUE KEY (f1);
ERROR 23000: Duplicate entry 'foo' for key 'f1' ERROR 23000: Duplicate entry 'foo' for key 'f1'
ALTER TABLE t1 ADD KEY (f2); ALTER TABLE t1 ADD KEY (f2);
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-10748 Server crashes in ha_maria::implicit_commit upon ALTER TABLE
#
CREATE TABLE t1 (a INT, b INT) ENGINE=Aria;
SELECT * FROM t1;
a b
CREATE TABLE t2 (c INT) ENGINE=Aria;
LOCK TABLE t2 READ, t1 WRITE;
ALTER TABLE t1 CHANGE b a INT;
ERROR 42S21: Duplicate column name 'a'
UNLOCK TABLES;
DROP TABLE t1, t2;
#
# MDEV-10748 Server crashes in ha_maria::implicit_commit upon ALTER TABLE
#
CREATE TABLE t1 (a INT) ENGINE=Aria;
CREATE TABLE t2 (b INT) ENGINE=Aria;
LOCK TABLES t1 WRITE, t2 AS t2a WRITE, t2 WRITE;
ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=COPY;
UNLOCK TABLES;
DROP TABLE t1, t2;
# More complex test, from RQG
CREATE TABLE t1 (a INT) ENGINE=Aria;
CREATE TABLE t2 (b INT) ENGINE=Aria;
CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2 ;
LOCK TABLES t1 WRITE, t2 AS t2a WRITE, v2 WRITE CONCURRENT, t2 WRITE;
ALTER TABLE t1 FORCE;
ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=INPLACE;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=COPY;
UNLOCK TABLES;
DROP VIEW v2;
DROP TABLE t1, t2;
# End of 10.2 tests # End of 10.2 tests
# #
# MDEV-14669 Assertion `file->trn == trn' failed in ha_maria::start_stmt # MDEV-14669 Assertion `file->trn == trn' failed in ha_maria::start_stmt

View File

@ -118,6 +118,52 @@ ALTER TABLE t1 ADD UNIQUE KEY (f1);
ALTER TABLE t1 ADD KEY (f2); ALTER TABLE t1 ADD KEY (f2);
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-10748 Server crashes in ha_maria::implicit_commit upon ALTER TABLE
--echo #
CREATE TABLE t1 (a INT, b INT) ENGINE=Aria;
SELECT * FROM t1;
CREATE TABLE t2 (c INT) ENGINE=Aria;
LOCK TABLE t2 READ, t1 WRITE;
--error ER_DUP_FIELDNAME
ALTER TABLE t1 CHANGE b a INT;
# Cleanup
UNLOCK TABLES;
DROP TABLE t1, t2;
--echo #
--echo # MDEV-10748 Server crashes in ha_maria::implicit_commit upon ALTER TABLE
--echo #
CREATE TABLE t1 (a INT) ENGINE=Aria;
CREATE TABLE t2 (b INT) ENGINE=Aria;
LOCK TABLES t1 WRITE, t2 AS t2a WRITE, t2 WRITE;
ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=COPY;
UNLOCK TABLES;
DROP TABLE t1, t2;
--echo # More complex test, from RQG
CREATE TABLE t1 (a INT) ENGINE=Aria;
CREATE TABLE t2 (b INT) ENGINE=Aria;
CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2 ;
LOCK TABLES t1 WRITE, t2 AS t2a WRITE, v2 WRITE CONCURRENT, t2 WRITE;
ALTER TABLE t1 FORCE;
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=INPLACE;
ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=COPY;
UNLOCK TABLES;
DROP VIEW v2;
DROP TABLE t1, t2;
--echo # End of 10.2 tests --echo # End of 10.2 tests
--echo # --echo #

View File

@ -0,0 +1,54 @@
include/master-slave.inc
[connection master]
#
# Ensure that read-only slave logs temporary table statements under statement based
# replication. This is related to MDEV-17863.
#
connection slave;
set global read_only=1;
connection master;
create table t1(a int) engine=MyISAM;
create temporary table tmp1 (a int) engine=MyISAM;
insert into t1 values(1);
insert into tmp1 values (2);
insert into t1 select * from tmp1;
insert into t1 values(3);
select * from t1;
a
1
2
3
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
drop table t1;
drop temporary table tmp1;
connection slave;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; create table t1(a int) engine=MyISAM
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; create temporary table tmp1 (a int) engine=MyISAM
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
slave-bin.000001 # Query # # use `test`; insert into t1 values(1)
slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
slave-bin.000001 # Query # # use `test`; insert into tmp1 values (2)
slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
slave-bin.000001 # Query # # use `test`; insert into t1 select * from tmp1
slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Gtid # # BEGIN GTID #-#-#
slave-bin.000001 # Query # # use `test`; insert into t1 values(3)
slave-bin.000001 # Query # # COMMIT
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; analyze table t1
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tmp1` /* generated by server */
set global read_only=0;
connection master;
include/rpl_end.inc

View File

@ -0,0 +1,30 @@
--source include/have_binlog_format_statement.inc
--source include/master-slave.inc
--echo #
--echo # Ensure that read-only slave logs temporary table statements under statement based
--echo # replication. This is related to MDEV-17863.
--echo #
connection slave;
set global read_only=1;
connection master;
create table t1(a int) engine=MyISAM;
create temporary table tmp1 (a int) engine=MyISAM;
insert into t1 values(1);
insert into tmp1 values (2);
insert into t1 select * from tmp1;
insert into t1 values(3);
select * from t1;
analyze table t1;
drop table t1;
drop temporary table tmp1;
sync_slave_with_master;
--source include/show_binlog_events.inc
set global read_only=0;
connection master;
--source include/rpl_end.inc

View File

@ -209,4 +209,95 @@ delete s,t1 from t1,s;
ERROR HY000: Storage engine SEQUENCE of the table `test`.`s` doesn't have this option ERROR HY000: Storage engine SEQUENCE of the table `test`.`s` doesn't have this option
DROP SEQUENCE s; DROP SEQUENCE s;
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-20074: Lost connection on update trigger
#
# INSERT & table
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
INSERT INTO t2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name);
END;
$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop sequence s1;
drop table t1,t2;
# INSERT & view
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
create view v2 as select * from t2;
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
INSERT INTO v2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name);
END;
$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop view v2;
drop table t1,t2;
drop sequence s1;
# INSERT SELECT & view
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
create view v2 as select * from t2;
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
INSERT INTO v2(a_p_name, a_p_first_name) SELECT old.p_name, old.p_first_name;
END;
$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop view v2;
drop table t1,t2;
drop sequence s1;
# REPLACE & view
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
create view v2 as select * from t2;
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
REPLACE INTO v2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name);
END;
$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop view v2;
drop table t1,t2;
drop sequence s1;
# REPLACE SELECT & view
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
create view v2 as select * from t2;
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
REPLACE INTO v2(a_p_name, a_p_first_name) SELECT old.p_name, old.p_first_name;
END;
$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop view v2;
drop table t1,t2;
drop sequence s1;
# End of 10.3 tests # End of 10.3 tests

View File

@ -179,4 +179,140 @@ DROP SEQUENCE s;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-20074: Lost connection on update trigger
--echo #
--echo # INSERT & table
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
DELIMITER $$;
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
INSERT INTO t2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name);
END;
$$
DELIMITER ;$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop sequence s1;
drop table t1,t2;
--echo # INSERT & view
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
create view v2 as select * from t2;
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
DELIMITER $$;
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
INSERT INTO v2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name);
END;
$$
DELIMITER ;$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop view v2;
drop table t1,t2;
drop sequence s1;
--echo # INSERT SELECT & view
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
create view v2 as select * from t2;
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
DELIMITER $$;
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
INSERT INTO v2(a_p_name, a_p_first_name) SELECT old.p_name, old.p_first_name;
END;
$$
DELIMITER ;$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop view v2;
drop table t1,t2;
drop sequence s1;
--echo # REPLACE & view
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
create view v2 as select * from t2;
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
DELIMITER $$;
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
REPLACE INTO v2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name);
END;
$$
DELIMITER ;$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop view v2;
drop table t1,t2;
drop sequence s1;
--echo # REPLACE SELECT & view
create sequence s1 increment by 1 start with 1;
create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128));
create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp);
create view v2 as select * from t2;
insert into t1 values
(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa');
DELIMITER $$;
CREATE TRIGGER tr_upd
BEFORE UPDATE on t1
FOR EACH ROW
BEGIN
REPLACE INTO v2(a_p_name, a_p_first_name) SELECT old.p_name, old.p_first_name;
END;
$$
DELIMITER ;$$
update t1 set p_first_name='Yunxi' where p_id=1;
drop view v2;
drop table t1,t2;
drop sequence s1;
--echo # End of 10.3 tests --echo # End of 10.3 tests

View File

@ -333,6 +333,18 @@ NUMERIC_BLOCK_SIZE 0
ENUM_VALUE_LIST NULL ENUM_VALUE_LIST NULL
READ_ONLY NO READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_CHANGE_BUFFER_DUMP
SESSION_VALUE NULL
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT Dump the change buffer at startup.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_CHANGE_BUFFER_MAX_SIZE VARIABLE_NAME INNODB_CHANGE_BUFFER_MAX_SIZE
SESSION_VALUE NULL SESSION_VALUE NULL
DEFAULT_VALUE 25 DEFAULT_VALUE 25

View File

@ -269,3 +269,18 @@ index(col_char,vcol_blob(64))
insert ignore into t1 (pk) values (1),(2); insert ignore into t1 (pk) values (1),(2);
update t1 set col_char = 'foo' where pk = 1; update t1 set col_char = 'foo' where pk = 1;
drop table t1; drop table t1;
create table t1 (
id int not null primary key,
a varchar(200),
b varchar(200),
c int,
va char(200) generated always as (ucase(a)) virtual,
vb char(200) generated always as (ucase(b)) virtual,
key (c,va,vb)
) engine=innodb;
insert t1 (id,a,c) select seq,seq,seq from seq_1_to_330;
select IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE') from t1;
IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE')
GOOD
alter table t1 drop column va;
drop table t1;

View File

@ -0,0 +1 @@
--innodb-sort-buffer-size=64k

View File

@ -117,3 +117,21 @@ create table t1 (
insert ignore into t1 (pk) values (1),(2); insert ignore into t1 (pk) values (1),(2);
update t1 set col_char = 'foo' where pk = 1; update t1 set col_char = 'foo' where pk = 1;
drop table t1; drop table t1;
#
# MDEV-20799 DROP Virtual Column crashes MariaDB
#
--source include/have_sequence.inc
create table t1 (
id int not null primary key,
a varchar(200),
b varchar(200),
c int,
va char(200) generated always as (ucase(a)) virtual,
vb char(200) generated always as (ucase(b)) virtual,
key (c,va,vb)
) engine=innodb;
insert t1 (id,a,c) select seq,seq,seq from seq_1_to_330;
select IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE') from t1;
alter table t1 drop column va;
drop table t1;

View File

@ -400,3 +400,32 @@ Warning 1265 Data truncated for column 'f12' at row 7
SET timestamp = 9; SET timestamp = 9;
REPLACE INTO t2 SELECT * FROM t2; REPLACE INTO t2 SELECT * FROM t2;
DROP TABLE t1, t2; DROP TABLE t1, t2;
#
# MDEV-16210 FK constraints on versioned tables use historical rows, which may cause constraint violation
#
create or replace table t1 (a int, key(a)) engine innodb with system versioning;
create or replace table t2 (b int, foreign key (b) references t1(a)) engine innodb;
insert into t1 values (1),(2);
insert into t2 values (1);
# DELETE from referenced table is not allowed
delete from t1 where a = 1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`a`))
drop tables t2, t1;
#
# MDEV-20812 Unexpected ER_ROW_IS_REFERENCED_2 or server crash in row_ins_foreign_report_err upon DELETE from versioned table with FK
#
create or replace table t1 (x int primary key) engine innodb;
create or replace table t2 (x int, foreign key (x) references t1(x)) engine innodb with system versioning;
set foreign_key_checks= off;
insert into t2 values (1), (1);
set foreign_key_checks= on;
# DELETE from foreign table is allowed
delete from t2;
drop tables t2, t1;
create or replace table t1 (a int, key(a)) engine innodb;
insert into t1 values (1);
create or replace table t2 (b int, foreign key (b) references t1(a)) engine innodb with system versioning;
insert into t2 values (1), (1);
# DELETE from foreign table is allowed
delete from t2;
drop tables t2, t1;

View File

@ -426,4 +426,36 @@ DROP TABLE t1, t2;
--remove_file $datadir/test/t1.data.2 --remove_file $datadir/test/t1.data.2
--remove_file $datadir/test/t2.data --remove_file $datadir/test/t2.data
--echo #
--echo # MDEV-16210 FK constraints on versioned tables use historical rows, which may cause constraint violation
--echo #
create or replace table t1 (a int, key(a)) engine innodb with system versioning;
create or replace table t2 (b int, foreign key (b) references t1(a)) engine innodb;
insert into t1 values (1),(2);
insert into t2 values (1);
--echo # DELETE from referenced table is not allowed
--error ER_ROW_IS_REFERENCED_2
delete from t1 where a = 1;
drop tables t2, t1;
--echo #
--echo # MDEV-20812 Unexpected ER_ROW_IS_REFERENCED_2 or server crash in row_ins_foreign_report_err upon DELETE from versioned table with FK
--echo #
create or replace table t1 (x int primary key) engine innodb;
create or replace table t2 (x int, foreign key (x) references t1(x)) engine innodb with system versioning;
set foreign_key_checks= off;
insert into t2 values (1), (1);
set foreign_key_checks= on;
--echo # DELETE from foreign table is allowed
delete from t2;
drop tables t2, t1;
create or replace table t1 (a int, key(a)) engine innodb;
insert into t1 values (1);
create or replace table t2 (b int, foreign key (b) references t1(a)) engine innodb with system versioning;
insert into t2 values (1), (1);
--echo # DELETE from foreign table is allowed
delete from t2;
drop tables t2, t1;
--source suite/versioning/common_finish.inc --source suite/versioning/common_finish.inc

View File

@ -190,14 +190,15 @@ wsrep_thread_count 0
# applier/rollbacker threads. # applier/rollbacker threads.
SET GLOBAL wsrep_cluster_address= 'gcomm://'; SET GLOBAL wsrep_cluster_address= 'gcomm://';
# Wait for applier thread to get created 1. # Wait for applier thread to get created 1.
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; # Wait for applier thread to get created 2.
VARIABLE_VALUE SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
EXPECT_1
1 1
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
VARIABLE_VALUE EXPECT_1
1 1
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
VARIABLE_VALUE EXPECT_2
2 2
SELECT @@global.wsrep_provider; SELECT @@global.wsrep_provider;
@@global.wsrep_provider @@global.wsrep_provider
@ -215,14 +216,14 @@ wsrep_thread_count 2
SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads; SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads;
SET GLOBAL wsrep_slave_threads= 10; SET GLOBAL wsrep_slave_threads= 10;
# Wait for 9 applier threads to get created. # Wait for 9 applier threads to get created.
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
VARIABLE_VALUE EXPECT_10
10 10
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
VARIABLE_VALUE EXPECT_1
1 1
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
VARIABLE_VALUE EXPECT_11
11 11
SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'threads_connected';
Variable_name Value Variable_name Value

View File

@ -102,10 +102,13 @@ SET GLOBAL wsrep_cluster_address= 'gcomm://';
--echo # Wait for applier thread to get created 1. --echo # Wait for applier thread to get created 1.
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_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 --source include/wait_condition.inc
--echo # Wait for applier thread to get created 2.
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
--source include/wait_condition.inc
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
--replace_regex /.*libgalera_smm.*/libgalera_smm.so/ --replace_regex /.*libgalera_smm.*/libgalera_smm.so/
SELECT @@global.wsrep_provider; SELECT @@global.wsrep_provider;
@ -121,9 +124,9 @@ SET GLOBAL wsrep_slave_threads= 10;
--let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; --let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
--source include/wait_condition.inc --source include/wait_condition.inc
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count';
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; SELECT VARIABLE_VALUE AS EXPECT_11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count';
SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'threads_connected';

View File

@ -23,7 +23,7 @@
# #
############################################################################## ##############################################################################
# #
# Based on bb-10.4-release 8885e7ba7814b5721bcf1a6c5241aea815a80eb9 # Based on 10.4 903f5fea30cb236c5980a07b7fa63450b0f8067d
main.alter_table : Modified in 10.4.8 main.alter_table : Modified in 10.4.8
main.alter_table_mdev539_maria : Include file modified in 10.4.8 main.alter_table_mdev539_maria : Include file modified in 10.4.8
@ -36,34 +36,39 @@ main.analyze_stmt_orderby : Modified in 10.4.8
main.analyze_stmt_privileges2 : Modified in 10.4.8 main.analyze_stmt_privileges2 : Modified in 10.4.8
main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result
main.auth_named_pipe : MDEV-14724 - System error 2 main.auth_named_pipe : MDEV-14724 - System error 2
main.auto_increment_ranges_innodb : Include file modified in 10.4.9
main.auto_increment_ranges_myisam : Include file modified in 10.4.9
main.backup_interaction : Modified in 10.4.9
main.binary_to_hex : MDEV-20211 - Wrong result main.binary_to_hex : MDEV-20211 - Wrong result
main.bootstrap : Modified in 10.3.18 main.bootstrap : Modified in 10.3.18
main.brackets : Modified in 10.4.9
main.bug13633383 : Modified in 10.4.8 main.bug13633383 : Modified in 10.4.8
main.cast : Modified in 10.2.27 main.cast : Modified in 10.2.27
main.charset_client_win : Added in 10.4.7 main.compare : Modified in 10.4.9
main.column_compression : Modified in 10.4.7
main.compound : Modified in 10.4.8 main.compound : Modified in 10.4.8
main.compress : Include file modified in 10.4.8 main.compress : Include file modified in 10.4.8
main.connect : MDEV-17282 - Wrong result; include file modified in 10.4.8 main.connect : MDEV-17282 - Wrong result; include file modified in 10.4.8
main.connect-abstract : MDEV-20162 - Could not execute 'check-testcase' main.connect-abstract : MDEV-20162 - Could not execute 'check-testcase'
main.connect2 : MDEV-13885 - Server crash main.connect2 : MDEV-13885 - Server crash
main.connect_debug : Modified in 10.4.7
main.constraints : Modified in 10.4.8 main.constraints : Modified in 10.4.8
main.count_distinct2 : MDEV-11768 - timeout main.count_distinct2 : MDEV-11768 - timeout
main.create : Modified in 10.4.8 main.create : Modified in 10.4.8
main.create_delayed : MDEV-10605 - failed with timeout main.create_delayed : MDEV-10605 - failed with timeout
main.create_drop_event : MDEV-16271 - Wrong result main.create_drop_event : MDEV-16271 - Wrong result
main.cte_nonrecursive : Modified in 10.4.8 main.cte_nonrecursive : Modified in 10.4.9
main.cte_recursive : Modified in 10.4.8 main.cte_recursive : Modified in 10.4.8
main.ctype_cp932_binlog_stm : MDEV-20534 - Wrong result main.ctype_cp932_binlog_stm : MDEV-20534 - Wrong result
main.ctype_create : Modified in 10.2.27 main.ctype_create : Modified in 10.2.27
main.ctype_latin1_de : Modified in 10.2.27 main.ctype_latin1_de : Modified in 10.2.27
main.ctype_many : Modified in 10.4.9
main.ctype_uca : Include file modified in 10.4.9
main.ctype_uca_innodb : Include file modified in 10.4.9
main.ctype_ucs : MDEV-17681 - Data too long for column main.ctype_ucs : MDEV-17681 - Data too long for column
main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade
main.ctype_utf16 : MDEV-10675: timeout or extra warnings main.ctype_utf16 : MDEV-10675: timeout or extra warnings
main.ctype_utf16_def : Configuration modified in 10.4.8 main.ctype_utf16_def : Configuration modified in 10.4.8
main.ctype_utf16le : MDEV-10675: timeout or extra warnings main.ctype_utf16le : MDEV-10675: timeout or extra warnings
main.ctype_utf8 : Modified in 10.4.8 main.ctype_utf8 : Include file modified in 10.4.9
main.ctype_utf8mb4 : Modified in 10.4.8 main.ctype_utf8mb4 : Modified in 10.4.8
main.ctype_utf8mb4_heap : Include file modified in 10.4.8 main.ctype_utf8mb4_heap : Include file modified in 10.4.8
main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison; include file modified in 10.4.8 main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison; include file modified in 10.4.8
@ -71,6 +76,7 @@ main.ctype_utf8mb4_myisam : Include file modified in 10.4.8
main.custom_aggregates_i_s : Modified in 10.4.8 main.custom_aggregates_i_s : Modified in 10.4.8
main.debug_sync : MDEV-10607 - internal error main.debug_sync : MDEV-10607 - internal error
main.default : Modified in 10.4.8 main.default : Modified in 10.4.8
main.delayed : MDEV-20961 - Assertion failure
main.derived : Modified in 10.4.8 main.derived : Modified in 10.4.8
main.derived_cond_pushdown : Modified in 10.4.8 main.derived_cond_pushdown : Modified in 10.4.8
main.derived_opt : MDEV-11768 - timeout main.derived_opt : MDEV-11768 - timeout
@ -78,7 +84,8 @@ main.derived_split_innodb : Modified in 10.4.8
main.derived_view : Modified in 10.4.8 main.derived_view : Modified in 10.4.8
main.dirty_close : MDEV-19368 - mysqltest failed but provided no output main.dirty_close : MDEV-19368 - mysqltest failed but provided no output
main.distinct : MDEV-14194 - Crash; modified in 10.4.8 main.distinct : MDEV-14194 - Crash; modified in 10.4.8
main.drop_bad_db_type : MDEV-15676 - Wrong result main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.4.9
main.drop_debug : Modified in 10.1.42
main.dyncol : MDEV-19455 - Extra warning; modified in 10.4.8 main.dyncol : MDEV-19455 - Extra warning; modified in 10.4.8
main.empty_user_table : Include file modified in 10.4.8 main.empty_user_table : Include file modified in 10.4.8
main.events_1 : Modified in 10.4.8 main.events_1 : Modified in 10.4.8
@ -93,12 +100,12 @@ main.flush : MDEV-19368 - mysqltest failed but provid
main.flush2 : Modified in 10.2.27 main.flush2 : Modified in 10.2.27
main.func_hybrid_type : Modified in 10.4.8 main.func_hybrid_type : Modified in 10.4.8
main.func_isnull : Modified in 10.4.8 main.func_isnull : Modified in 10.4.8
main.func_math : Modified in 10.4.8 main.func_json : Modified in 10.4.9
main.func_misc : Modified in 10.4.8 main.func_math : MDEV-20966 - Wrong error code; modified in 10.4.9
main.func_misc : Modified in 10.4.9
main.func_str : Modified in 10.4.8 main.func_str : Modified in 10.4.8
main.func_time : Modified in 10.4.7
main.function_defaults : Modified in 10.4.8 main.function_defaults : Modified in 10.4.8
main.gis : MDEV-13411 - wrong result on P8; modified in 10.4.7 main.gis : MDEV-13411 - wrong result on P8
main.grant : Configuration added in 10.4.8 main.grant : Configuration added in 10.4.8
main.grant2 : Configuration added in 10.4.8 main.grant2 : Configuration added in 10.4.8
main.grant4 : Configuration added in 10.4.8 main.grant4 : Configuration added in 10.4.8
@ -110,13 +117,14 @@ main.greedy_optimizer : Modified in 10.4.8
main.group_by : Modified in 10.4.8 main.group_by : Modified in 10.4.8
main.group_min_max : Modified in 10.4.8 main.group_min_max : Modified in 10.4.8
main.handlersocket : Configuration added in 10.4.8 main.handlersocket : Configuration added in 10.4.8
main.having : Modified in 10.4.7
main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown
main.index_intersect : Modified in 10.4.8 main.index_intersect : Modified in 10.4.8
main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_intersect_innodb : MDEV-10643 - failed with timeout
main.index_merge_innodb : MDEV-7142 - Plan mismatch main.index_merge_innodb : MDEV-7142 - Plan mismatch; modified in 10.4.9
main.index_merge_myisam : Modified in 10.4.9
main.information_schema : Modified in 10.4.8 main.information_schema : Modified in 10.4.8
main.information_schema-big : Modified in 10.4.8 main.information_schema-big : Modified in 10.4.8
main.information_schema_db : Modified in 10.4.9
main.information_schema_parameters : Modified in 10.4.8 main.information_schema_parameters : Modified in 10.4.8
main.information_schema_routines : Modified in 10.4.8 main.information_schema_routines : Modified in 10.4.8
main.innodb_ext_key : Modified in 10.4.8 main.innodb_ext_key : Modified in 10.4.8
@ -124,13 +132,14 @@ main.innodb_icp : MDEV-20168 - Wrong execution plans; modi
main.innodb_mysql_lock : MDEV-7861 - Wrong result main.innodb_mysql_lock : MDEV-7861 - Wrong result
main.intersect : Modified in 10.4.8 main.intersect : Modified in 10.4.8
main.invisible_field_debug : Modified in 10.4.8 main.invisible_field_debug : Modified in 10.4.8
main.ipv4_and_ipv6 : MDEV-20964 - Wrong result
main.ipv6 : MDEV-20964 - Wrong result
main.join : Modified in 10.4.8 main.join : Modified in 10.4.8
main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.4.8 main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.4.8
main.join_nested_jcl6 : Modified in 10.4.8 main.join_nested_jcl6 : Modified in 10.4.8
main.join_outer : Modified in 10.4.7 main.join_outer : Modified in 10.2.27
main.join_outer_innodb : Modified in 10.4.8 main.join_outer_innodb : Modified in 10.4.8
main.join_outer_jcl6 : Modified in 10.4.8 main.join_outer_jcl6 : Modified in 10.4.8
main.keywords : Modified in 10.4.7
main.kill : Modified in 10.4.8 main.kill : Modified in 10.4.8
main.kill-2 : MDEV-13257 - Wrong result main.kill-2 : MDEV-13257 - Wrong result
main.kill_processlist-6619 : MDEV-10793 - Wrong result main.kill_processlist-6619 : MDEV-10793 - Wrong result
@ -138,7 +147,9 @@ main.limit_rows_examined : Modified in 10.4.8
main.loaddata : MDEV-19368 - mysqltest failed but provided no output main.loaddata : MDEV-19368 - mysqltest failed but provided no output
main.locale : MDEV-20521 - Missing warning main.locale : MDEV-20521 - Missing warning
main.log_slow : MDEV-13263 - Wrong result; modified in 10.4.8 main.log_slow : MDEV-13263 - Wrong result; modified in 10.4.8
main.log_slow_debug : Modified in 10.4.9
main.log_tables-big : MDEV-13408 - wrong result main.log_tables-big : MDEV-13408 - wrong result
main.log_tables_upgrade : MDEV-20962 - Wrong result
main.long_unique : Modified in 10.4.8 main.long_unique : Modified in 10.4.8
main.mdev-504 : MDEV-15171 - warning main.mdev-504 : MDEV-15171 - warning
main.mdev13607 : Modified in 10.4.8 main.mdev13607 : Modified in 10.4.8
@ -147,7 +158,7 @@ main.merge : MDEV-10607 - sporadic "can't connect"; m
main.mrr_icp_extra : Modified in 10.4.8 main.mrr_icp_extra : Modified in 10.4.8
main.multi_update : Modified in 10.4.8 main.multi_update : Modified in 10.4.8
main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out
main.myisam : Modified in 10.4.8 main.myisam : Modified in 10.4.9
main.myisam_explain_non_select_all : Modified in 10.4.8 main.myisam_explain_non_select_all : Modified in 10.4.8
main.myisam_icp : Modified in 10.4.8 main.myisam_icp : Modified in 10.4.8
main.myisam_mrr : Modified in 10.4.8 main.myisam_mrr : Modified in 10.4.8
@ -157,20 +168,20 @@ main.mysql_client_test_comp : MDEV-16641 - Error in exec
main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed
main.mysql_comments : Modified in 10.4.8 main.mysql_comments : Modified in 10.4.8
main.mysql_upgrade : MDEV-20161 - Wrong result; MDEV-20166 - FATAL ERROR: Upgrade failed; include file modified in 10.4.8 main.mysql_upgrade : MDEV-20161 - Wrong result; MDEV-20166 - FATAL ERROR: Upgrade failed; include file modified in 10.4.8
main.mysql_upgrade-20228 : Added in 10.4.9
main.mysql_upgrade_no_innodb : MDEV-20537 - Wrong result main.mysql_upgrade_no_innodb : MDEV-20537 - Wrong result
main.mysql_upgrade_noengine : MDEV-14355 - Wrong result; include file modified in 10.4.8 main.mysql_upgrade_noengine : MDEV-14355 - Wrong result; include file modified in 10.4.8
main.mysql_upgrade_ssl : MDEV-13492 - Unknown SSL error main.mysql_upgrade_ssl : MDEV-13492 - Unknown SSL error
main.mysql_upgrade_view : MDEV-20161 - Wrong result main.mysql_upgrade_view : MDEV-20161 - Wrong result
main.mysqladmin : MDEV-20535 - Wrong result main.mysqladmin : MDEV-20535 - Wrong result
main.mysqlcheck : MDEV-20164 - Wrong result; modified in 10.4.8 main.mysqlcheck : MDEV-20164 - Wrong result; modified in 10.4.8
main.mysqld--help : Modified in 10.4.7
main.mysqldump : MDEV-14800 - Stack smashing detected; modified in 10.4.8 main.mysqldump : MDEV-14800 - Stack smashing detected; modified in 10.4.8
main.mysqldump-compat-102 : Modified in 10.4.8 main.mysqldump-compat-102 : Modified in 10.4.8
main.mysqldump-max : Modified in 10.2.27 main.mysqldump-max : Modified in 10.2.27
main.mysqldump-nl : Modified in 10.4.8 main.mysqldump-nl : Modified in 10.4.8
main.mysqldump-utf8mb4 : Modified in 10.4.8 main.mysqldump-utf8mb4 : Modified in 10.4.8
main.mysqldump_restore : Modified in 10.4.7
main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug
main.mysqlshow : MDEV-20965 - Wrong result
main.mysqlslap : MDEV-11801 - timeout main.mysqlslap : MDEV-11801 - timeout
main.mysqltest : MDEV-13887 - Wrong result main.mysqltest : MDEV-13887 - Wrong result
main.named_pipe : Include file modified in 10.4.8 main.named_pipe : Include file modified in 10.4.8
@ -179,27 +190,31 @@ main.openssl_1 : MDEV-13492 - Unknown SSL error; modified
main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1
main.opt_trace : Modified in 10.4.8 main.opt_trace : Modified in 10.4.8
main.opt_tvc : Modified in 10.4.8 main.opt_tvc : Modified in 10.4.8
main.order_by_innodb : Modified in 10.4.9
main.order_by_optimizer_innodb : MDEV-10683 - Wrong result main.order_by_optimizer_innodb : MDEV-10683 - Wrong result
main.parser : Modified in 10.4.7 main.parser : Modified in 10.4.9
main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock; modified in 10.4.9
main.partition_example : Configuration added in 10.4.8 main.partition_example : Configuration added in 10.4.8
main.partition_innodb : MDEV-20169 - Wrong result; modified in 10.4.8 main.partition_innodb : MDEV-20169 - Wrong result; modified in 10.4.9
main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings
main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1
main.partition_key_cache : Modified in 10.2.27 main.partition_key_cache : Modified in 10.2.27
main.partition_pruning : Modified in 10.4.8 main.partition_pruning : Modified in 10.4.8
main.partition_range : Modified in 10.4.8 main.partition_range : Modified in 10.4.8
main.partition_ucs2 : Added in 10.4.9
main.partition_utf8 : Modified in 10.4.9
main.password_expiration : Include file modified in 10.4.8 main.password_expiration : Include file modified in 10.4.8
main.plugin : Configuration added in 10.4.8 main.plugin : Include file modified in 10.4.9
main.plugin_auth : Include file modified in 10.4.8 main.plugin_auth : MDEV-20957 - Upgrade file was not properly created; include file modified in 10.4.8
main.plugin_auth_qa_2 : MDEV-20165 - Wrong result main.plugin_auth_qa_2 : MDEV-20165 - Wrong result
main.plugin_innodb : Configuration added in 10.4.8 main.plugin_innodb : Configuration added in 10.4.8
main.plugin_load : Configuration modified in 10.4.8 main.plugin_load : Configuration modified in 10.4.8
main.plugin_load_option : Configuration modified in 10.4.8 main.plugin_load_option : Configuration modified in 10.4.8
main.plugin_not_embedded : Configuration added in 10.4.8 main.plugin_not_embedded : Configuration added in 10.4.8
main.pool_of_threads : MDEV-18135 - SSL error: key too small; modified in 10.4.8 main.pool_of_threads : MDEV-18135 - SSL error: key too small; modified in 10.4.8
main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; configuration modified in 10.4.8 main.processlist : Modified in 10.4.9
main.ps_innodb : Added in 10.4.7 main.processlist_notembedded : Added in 10.4.9
main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; modified in 10.4.9
main.query_cache : MDEV-16180 - Wrong result main.query_cache : MDEV-16180 - Wrong result
main.query_cache_debug : MDEV-15281 - Query cache is disabled; modified in 10.4.8 main.query_cache_debug : MDEV-15281 - Query cache is disabled; modified in 10.4.8
main.query_cache_notembedded : Modified in 10.4.8 main.query_cache_notembedded : Modified in 10.4.8
@ -210,13 +225,12 @@ main.range_mrr_icp : Modified in 10.4.8
main.range_vs_index_merge : Modified in 10.4.8 main.range_vs_index_merge : Modified in 10.4.8
main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away
main.repair : Modified in 10.4.8 main.repair : Modified in 10.4.8
main.repair_symlink-5543 : Modified in 10.4.7 main.rowid_filter_innodb : MDEV-20538 - Wrong result
main.rowid_filter_innodb : MDEV-20538 - Wrong result; modified in 10.4.7
main.schema : Modified in 10.4.8 main.schema : Modified in 10.4.8
main.select : Modified in 10.4.8 main.select : Modified in 10.4.8
main.select_jcl6 : MDEV-20532 - Floating point differences main.select_jcl6 : MDEV-20532 - Floating point differences
main.select_pkeycache : MDEV-20532 - Floating point differences main.select_pkeycache : MDEV-20532 - Floating point differences
main.selectivity : Modified in 10.4.8 main.selectivity : Modified in 10.4.9
main.selectivity_innodb : Modified in 10.4.8 main.selectivity_innodb : Modified in 10.4.8
main.selectivity_no_engine : Modified in 10.4.8 main.selectivity_no_engine : Modified in 10.4.8
main.set_password : Include file modified in 10.4.8 main.set_password : Include file modified in 10.4.8
@ -226,26 +240,29 @@ main.shm : MDEV-12727 - Mismatch, ERROR 2013
main.show_bad_definer-5553 : Modified in 10.4.8 main.show_bad_definer-5553 : Modified in 10.4.8
main.show_check : Modified in 10.4.8 main.show_check : Modified in 10.4.8
main.show_explain : MDEV-10674 - Wrong result code main.show_explain : MDEV-10674 - Wrong result code
main.sp : MDEV-7866 - Mismatch; modified in 10.4.8 main.sp : MDEV-7866 - Mismatch; modified in 10.4.9
main.sp-anchor-type : Modified in 10.4.8 main.sp-anchor-type : Modified in 10.4.8
main.sp-code : Modified in 10.4.9
main.sp-error : Modified in 10.4.8 main.sp-error : Modified in 10.4.8
main.sp-security : MDEV-10607 - sporadic "can't connect"; modified in 10.4.8 main.sp-security : MDEV-10607 - sporadic "can't connect"; modified in 10.4.8
main.sp_notembedded : MDEV-10607 - internal error; include file modified in 10.4.8 main.sp_notembedded : MDEV-10607 - internal error; include file modified in 10.4.8
main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1; modified in 10.4.8 main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1; modified in 10.4.8
main.ssl-big : Modified in 10.4.8 main.ssl-big : Modified in 10.4.8
main.ssl_7937 : MDEV-20958 - Wrong result
main.ssl_ca : MDEV-10895 - SSL connection error on Power main.ssl_ca : MDEV-10895 - SSL connection error on Power
main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1
main.ssl_compress : Modified in 10.4.8 main.ssl_compress : Modified in 10.4.8
main.ssl_connect : MDEV-13492 - Unknown SSL error main.ssl_connect : MDEV-13492 - Unknown SSL error
main.ssl_crl : MDEV-19119 - Wrong error code main.ssl_crl : MDEV-19119 - Wrong error code
main.ssl_timeout : MDEV-11244 - Crash main.ssl_timeout : MDEV-11244 - Crash
main.stat_tables : Modified in 10.4.8 main.stat_tables : Modified in 10.4.9
main.stat_tables-enospc : Modified in 10.4.8 main.stat_tables-enospc : Modified in 10.4.8
main.stat_tables_par : MDEV-13266 - Wrong result main.stat_tables_par : MDEV-13266 - Wrong result
main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding
main.statement-expr : Modified in 10.4.9
main.statistics : Modified in 10.4.8 main.statistics : Modified in 10.4.8
main.status : MDEV-13255 - Wrong result main.status : MDEV-13255 - Wrong result
main.subselect : Modified in 10.4.8 main.subselect : MDEV-20551 - Valgrind failure; modified in 10.4.9
main.subselect2 : Modified in 10.4.8 main.subselect2 : Modified in 10.4.8
main.subselect3 : Modified in 10.4.8 main.subselect3 : Modified in 10.4.8
main.subselect3_jcl6 : Modified in 10.4.8 main.subselect3_jcl6 : Modified in 10.4.8
@ -255,21 +272,24 @@ main.subselect_extra : Modified in 10.4.8
main.subselect_innodb : MDEV-10614 - Wrong result main.subselect_innodb : MDEV-10614 - Wrong result
main.subselect_mat_cost : Modified in 10.4.8 main.subselect_mat_cost : Modified in 10.4.8
main.subselect_mat_cost_bugs : Modified in 10.4.8 main.subselect_mat_cost_bugs : Modified in 10.4.8
main.subselect_sj : Modified in 10.4.8 main.subselect_notembedded : Modified in 10.4.9
main.subselect_sj : Modified in 10.4.9
main.subselect_sj2 : Modified in 10.4.8 main.subselect_sj2 : Modified in 10.4.8
main.subselect_sj2_jcl6 : Modified in 10.3.18 main.subselect_sj2_jcl6 : Modified in 10.3.18
main.subselect_sj2_mat : Modified in 10.4.8 main.subselect_sj2_mat : Modified in 10.4.8
main.subselect_sj_jcl6 : Modified in 10.4.8 main.subselect_sj_jcl6 : Modified in 10.4.8
main.subselect_sj_mat : Modified in 10.4.8 main.subselect_sj_mat : Modified in 10.4.8
main.subselect_sj_nonmerged : Modified in 10.4.8 main.subselect_sj_nonmerged : Modified in 10.4.8
main.sum_distinct-big : Modified in 10.4.9
main.system_mysql_db_507 : Include file modified in 10.4.8 main.system_mysql_db_507 : Include file modified in 10.4.8
main.system_mysql_db_fix50117 : Modified in 10.4.8 main.system_mysql_db_fix50117 : Modified in 10.4.8
main.system_time_debug : Added in 10.4.8 main.system_time_debug : Added in 10.4.8
main.table_options-5867 : Configuration added in 10.4.8 main.table_options-5867 : Configuration added in 10.4.8
main.table_value_constr : Modified in 10.4.9
main.tc_heuristic_recover : MDEV-14189 - Wrong result main.tc_heuristic_recover : MDEV-14189 - Wrong result
main.timezone2 : Modified in 10.4.8 main.timezone2 : Modified in 10.4.8
main.tls_version : MDEV-20170 - Unknown SSL error main.tls_version : MDEV-20170 - Unknown SSL error
main.tls_version1 : MDEV-20170 - Unknown SSL error; added in 10.4.7 main.tls_version1 : MDEV-20170 - Unknown SSL error
main.trigger : Modified in 10.4.8 main.trigger : Modified in 10.4.8
main.trigger-compat : Modified in 10.4.8 main.trigger-compat : Modified in 10.4.8
main.trigger_notembedded : Modified in 10.4.8 main.trigger_notembedded : Modified in 10.4.8
@ -280,7 +300,7 @@ main.type_datetime : Modified in 10.4.8
main.type_datetime_hires : MDEV-10687 - Timeout; modified in 10.4.8 main.type_datetime_hires : MDEV-10687 - Timeout; modified in 10.4.8
main.type_float : MDEV-20532 - Floating point differences main.type_float : MDEV-20532 - Floating point differences
main.type_int : Modified in 10.4.8 main.type_int : Modified in 10.4.8
main.type_newdecimal : MDEV-20532 - Floating point differences main.type_newdecimal : MDEV-20532 - Floating point differences; modified in 10.4.9
main.type_ranges : MDEV-20532 - Floating point differences main.type_ranges : MDEV-20532 - Floating point differences
main.type_temporal_innodb : Modified in 10.4.8 main.type_temporal_innodb : Modified in 10.4.8
main.type_time_6065 : Modified in 10.4.8 main.type_time_6065 : Modified in 10.4.8
@ -315,17 +335,17 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
binlog.backup : Added in 10.4.9
binlog.binlog_commit_wait : MDEV-10150 - Mismatch binlog.binlog_commit_wait : MDEV-10150 - Mismatch
binlog.binlog_innodb : Configuration added in 10.4.8 binlog.binlog_innodb : Configuration added in 10.4.8
binlog.binlog_killed : MDEV-12925 - Wrong result binlog.binlog_killed : MDEV-12925 - Wrong result
binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown; modified in 10.4.8 binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown; modified in 10.4.8
binlog.binlog_mixed_cache_stat : Configuration added in 10.4.8 binlog.binlog_mixed_cache_stat : Configuration added in 10.4.8
binlog.binlog_mysqlbinlog2 : Modified in 10.2.27 binlog.binlog_mysqlbinlog2 : Modified in 10.2.27
binlog.binlog_mysqlbinlog_row : Modified in 10.4.9
binlog.binlog_mysqlbinlog_row_innodb : MDEV-20530 - Binary files differ binlog.binlog_mysqlbinlog_row_innodb : MDEV-20530 - Binary files differ
binlog.binlog_mysqlbinlog_row_myisam : MDEV-20530 - Binary files differ binlog.binlog_mysqlbinlog_row_myisam : MDEV-20530 - Binary files differ
binlog.binlog_mysqlbinlog_stop_never : Added in 10.4.7 binlog.binlog_parallel_replication_marks_row : MDEV-20959 - Wrong result
binlog.binlog_parallel_replication_marks_row : Include file modified in 10.4.7
binlog.binlog_parallel_replication_marks_stm_mix : Include file modified in 10.4.7
binlog.binlog_row_cache_stat : Include file modified in 10.4.8 binlog.binlog_row_cache_stat : Include file modified in 10.4.8
binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.4.8 binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.4.8
binlog.binlog_stm_binlog : MDEV-20412 - Wrong result binlog.binlog_stm_binlog : MDEV-20412 - Wrong result
@ -334,26 +354,33 @@ binlog.binlog_stm_drop_tmp_tbl : Include file modified in 10.4
binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint
binlog.flashback-largebinlog : MDEV-19764 - Out of memory; modified in 10.4.8 binlog.flashback-largebinlog : MDEV-19764 - Out of memory; modified in 10.4.8
binlog.load_data_stm_view : MDEV-16948 - Wrong result binlog.load_data_stm_view : MDEV-16948 - Wrong result
binlog.read_only : Added in 10.4.9
binlog.read_only_statement : Added in 10.4.9
binlog.show_concurrent_rotate : MDEV-20215 - Wrong result binlog.show_concurrent_rotate : MDEV-20215 - Wrong result
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
binlog_encryption.binlog_incident : MDEV-20213 - Server crash binlog_encryption.binlog_incident : MDEV-20213 - Server crash
binlog_encryption.binlog_mdev_20574_old_binlog : Added in 10.4.9
binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint
binlog_encryption.encrypted_master : MDEV-14201 - Extra warnings binlog_encryption.encrypted_master : MDEV-14201 - Extra warnings
binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't init tc log binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't init tc log
binlog_encryption.encrypted_slave : MDEV-18135 - SSL error: key too small binlog_encryption.encrypted_slave : MDEV-18135 - SSL error: key too small
binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed
binlog_encryption.multisource : MDEV-20213 - Server crash binlog_encryption.multisource : MDEV-20213 - Server crash
binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash binlog_encryption.mysqlbinlog : Modified in 10.4.9
binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash; include file modified in 10.4.9
binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result
binlog_encryption.rpl_corruption : MDEV-20159 - Assertion failure binlog_encryption.rpl_corruption : MDEV-20159 - Assertion failure; MDEV-20953 - Wrong error code
binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start
binlog_encryption.rpl_init_slave_errors : MDEV-20213 - Server crash
binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include
binlog_encryption.rpl_mixed_binlog_max_cache_size : MDEV-20956 - Incorrect checksum for freed object
binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include
binlog_encryption.rpl_parallel_ignored_errors : Added in 10.4.9
binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout
binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind
binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning; MDEV-20573 - Wrong result
binlog_encryption.rpl_ssl : MDEV-14507 - Timeouts binlog_encryption.rpl_ssl : MDEV-14507 - Timeouts
binlog_encryption.rpl_stm_relay_ign_space : MDEV-19375 - Test assertion failed binlog_encryption.rpl_stm_relay_ign_space : MDEV-19375 - Test assertion failed
binlog_encryption.rpl_sync : MDEV-13830 - Assertion failure binlog_encryption.rpl_sync : MDEV-13830 - Assertion failure
@ -362,58 +389,63 @@ binlog_encryption.rpl_typeconv : MDEV-14362 - Lost c
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
compat/oracle.column_compression : Modified in 10.4.7 compat/oracle.plugin : Include file modified in 10.4.9
compat/oracle.keywords : Added in 10.4.7 compat/oracle.ps : Modified in 10.4.9
compat/oracle.mysqldump_restore : Added in 10.4.7
compat/oracle.sp : Modified in 10.4.8 compat/oracle.sp : Modified in 10.4.8
compat/oracle.sp-package : Modified in 10.4.8 compat/oracle.sp-package : Modified in 10.4.8
compat/oracle.sp-package-mysqldump : Modified in 10.4.8 compat/oracle.sp-package-mysqldump : Modified in 10.4.8
compat/oracle.sp-package-security : Modified in 10.4.8 compat/oracle.sp-package-security : Modified in 10.4.8
compat/oracle.statement-expr : Modified in 10.4.9
compat/oracle.type_blob : Modified in 10.4.8 compat/oracle.type_blob : Modified in 10.4.8
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
connect.alter : MDEV-18135 - SSL error: key too small connect.alter : MDEV-18135 - SSL error: key too small
connect.drop-open-error : MDEV-18135 - SSL error: key too small connect.drop-open-error : MDEV-18135 - SSL error: key too small
connect.grant : Modified in 10.4.9
connect.grant2 : Modified in 10.4.9
connect.ini_grant : Modified in 10.4.9
connect.json : MDEV-18135 - SSL error: key too small connect.json : MDEV-18135 - SSL error: key too small
connect.mysql_grant : Modified in 10.4.9
connect.part_file : MDEV-18135 - SSL error: key too small connect.part_file : MDEV-18135 - SSL error: key too small
connect.part_table : MDEV-18135 - SSL error: key too small connect.part_table : MDEV-18135 - SSL error: key too small
connect.pivot : MDEV-14803 - Failed to discover table connect.pivot : MDEV-14803 - Failed to discover table
connect.secure_file_priv : MDEV-18135 - SSL error: key too small connect.secure_file_priv : MDEV-18135 - SSL error: key too small
connect.vcol : MDEV-12374 - Fails on Windows connect.vcol : MDEV-12374 - Fails on Windows
connect.xml2_grant : Include file modified in 10.4.9
connect.xml_grant : Include file modified in 10.4.9
connect.zip : MDEV-13884 - Wrong result connect.zip : MDEV-13884 - Wrong result
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
disks.disks_notembedded : Added in 10.4.7
#-----------------------------------------------------------------------
encryption.corrupted_during_recovery : MDEV-20159 - Assertion failure encryption.corrupted_during_recovery : MDEV-20159 - Assertion failure
encryption.create_or_replace : MDEV-12694 - Timeout; MDEV-16115 - Trying to access tablespace; include file modified in 10.4.7 encryption.create_or_replace : MDEV-12694 - Timeout; MDEV-16115 - Trying to access tablespace
encryption.debug_key_management : MDEV-13841 - Timeout encryption.debug_key_management : MDEV-13841 - Timeout
encryption.encrypt_and_grep : MDEV-13765 - Wrong result encryption.encrypt_and_grep : MDEV-13765 - Wrong result
encryption.file_creation : Added in 10.4.8 encryption.file_creation : Added in 10.4.8
encryption.innochecksum : MDEV-13644 - Assertion failure; modified in 10.4.7 encryption.innochecksum : MDEV-13644 - Assertion failure
encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect to local MySQL server through socket encryption.innodb-bad-key-change : Combinations added in 10.4.9
encryption.innodb-checksum-algorithm : MDEV-12898 - Deadlock of threads; MDEV-16896 - Server crash encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect to local MySQL server through socket; combinations added in 10.4.9
encryption.innodb-bad-key-change3 : Combinations added in 10.4.9
encryption.innodb-bad-key-change4 : Modified in 10.4.9
encryption.innodb-checksum-algorithm : MDEV-16896 - Server crash
encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate
encryption.innodb-discard-import : MDEV-19113 - Timeout encryption.innodb-discard-import : MDEV-19113 - Timeout
encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout; modified in 10.4.7 encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout
encryption.innodb-first-page-read : MDEV-14356 - Timeout in wait condition encryption.innodb-first-page-read : MDEV-14356 - Timeout in wait condition
encryption.innodb-force-corrupt : MDEV-17286 - SSL error encryption.innodb-force-corrupt : MDEV-17286 - SSL error
encryption.innodb-missing-key : MDEV-14728 - SSL error encryption.innodb-missing-key : MDEV-14728 - SSL error
encryption.innodb-page_encryption : MDEV-10641 - mutex problem encryption.innodb-page_encryption : MDEV-10641 - mutex problem
encryption.innodb-page_encryption_log_encryption : MDEV-17339 - Crash on restart encryption.innodb-page_encryption_log_encryption : MDEV-17339 - Crash on restart
encryption.innodb-read-only : MDEV-16563 - Crash on startup encryption.innodb-read-only : MDEV-16563 - Crash on startup
encryption.innodb-redo-badkey : MDEV-12898 - Server hang on startup encryption.innodb-redo-badkey : MDEV-20839 - Extra warnings; re-enabled in 10.4.9; modified in 10.4.9
encryption.innodb-redo-nokeys : MDEV-20159 - Assertion failure encryption.innodb-redo-nokeys : MDEV-20159 - Assertion failure
encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait condition encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait condition
encryption.innodb-spatial-index : MDEV-13746 - Wrong result encryption.innodb-spatial-index : MDEV-13746 - Wrong result
encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout
encryption.innodb_encrypt_log : MDEV-13725 - Wrong result encryption.innodb_encrypt_log : MDEV-13725 - Wrong result
encryption.innodb_encrypt_log_corruption : Configuration modified in 10.4.8 encryption.innodb_encrypt_log_corruption : Configuration modified in 10.4.8
encryption.innodb_encrypt_temporary_tables : Combinations added in 10.4.8 encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result; combinations added in 10.4.8
encryption.innodb_encryption : MDEV-15675 - Timeout encryption.innodb_encryption : MDEV-15675 - Timeout
encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure
encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result
@ -447,13 +479,14 @@ federated.federated_innodb : MDEV-10617 - Wrong checksum
federated.federated_partition : MDEV-10417 - Fails on Mips federated.federated_partition : MDEV-10417 - Fails on Mips
federated.federated_transactions : MDEV-10617 - Wrong checksum federated.federated_transactions : MDEV-10617 - Wrong checksum
federated.federatedx : MDEV-10617 - Wrong checksum federated.federatedx : MDEV-10617 - Wrong checksum
federated.federatedx_versioning : Modified in 10.4.8 federated.federatedx_versioning : Modified in 10.4.9
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
funcs_1.innodb_storedproc_07 : Include file modified in 10.4.8 funcs_1.innodb_storedproc_07 : Include file modified in 10.4.8
funcs_1.innodb_storedproc_08 : Include file modified in 10.4.8 funcs_1.innodb_storedproc_08 : Include file modified in 10.4.8
funcs_1.innodb_trig_03e : Modified in 10.4.8 funcs_1.innodb_trig_03e : Modified in 10.4.8
funcs_1.is_basics_mixed : Modified in 10.4.9
funcs_1.is_columns : Modified in 10.4.8 funcs_1.is_columns : Modified in 10.4.8
funcs_1.is_columns_innodb : Modified in 10.4.8 funcs_1.is_columns_innodb : Modified in 10.4.8
funcs_1.is_columns_memory : Modified in 10.4.8 funcs_1.is_columns_memory : Modified in 10.4.8
@ -507,42 +540,39 @@ gcol.gcol_select_innodb : Include file modified in 10.4.8
gcol.gcol_select_myisam : Include file modified in 10.4.8 gcol.gcol_select_myisam : Include file modified in 10.4.8
gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion; modified in 10.4.8 gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion; modified in 10.4.8
gcol.innodb_virtual_debug : MDEV-19114 - Assertion failure gcol.innodb_virtual_debug : MDEV-19114 - Assertion failure
gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.4.9
gcol.innodb_virtual_fk_restart : MDEV-17466 - Assertion failure gcol.innodb_virtual_fk_restart : MDEV-17466 - Assertion failure
gcol.innodb_virtual_index : Modified in 10.4.8 gcol.innodb_virtual_index : Modified in 10.4.8
gcol.innodb_virtual_purge : Modified in 10.2.25
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
innodb.101_compatibility : MDEV-13891 - Wrong result innodb.101_compatibility : MDEV-13891 - Wrong result
innodb.alter_algorithm : Modified in 10.4.9
innodb.alter_copy : MDEV-16181 - Assertion failure; modified in 10.4.8 innodb.alter_copy : MDEV-16181 - Assertion failure; modified in 10.4.8
innodb.alter_crash : MDEV-16944 - The process cannot access the file innodb.alter_crash : MDEV-16944 - The process cannot access the file
innodb.alter_large_dml : MDEV-20148 - Debug sync point wait timed out; added in 10.4.7 innodb.alter_large_dml : MDEV-20148 - Debug sync point wait timed out
innodb.alter_missing_tablespace : Modified in 10.4.7
innodb.auto_increment_dup : Modified in 10.4.8 innodb.auto_increment_dup : Modified in 10.4.8
innodb.autoinc_persist : MDEV-15282 - Assertion failure innodb.autoinc_persist : MDEV-15282 - Assertion failure
innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.binlog_consistent : MDEV-10618 - Server fails to start
innodb.blob-crash : MDEV-19298 - Assertion failure; added in 10.4.7 innodb.blob-crash : MDEV-19298 - Assertion failure
innodb.check_ibd_filesize : Added in 10.4.7
innodb.create_select : Added in 10.4.7
innodb.doublewrite : MDEV-12905 - Server crash innodb.doublewrite : MDEV-12905 - Server crash
innodb.foreign-keys : Modified in 10.4.8 innodb.foreign-keys : Modified in 10.4.8
innodb.foreign_key : Modified in 10.4.8 innodb.foreign_key : Modified in 10.4.8
innodb.full_crc32_import : Modified in 10.4.9
innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed
innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure
innodb.ibuf_not_empty : MDEV-19021 - Wrong result innodb.ibuf_not_empty : MDEV-19021 - Wrong result; modified in 10.4.9
innodb.innodb-16k : Modified in 10.4.7 innodb.information_schema_grants : Added in 10.4.9
innodb.innodb-32k : Modified in 10.4.7 innodb.innodb-32k-crash : MDEV-20194 - Extra warnings
innodb.innodb-32k-crash : MDEV-16953 - Corrupt log record found; modified in 10.4.7 innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup
innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup; modified in 10.4.7
innodb.innodb-alter : Modified in 10.4.8 innodb.innodb-alter : Modified in 10.4.8
innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS
innodb.innodb-alter-nullable : Modified in 10.4.9
innodb.innodb-alter-table : MDEV-10619 - Testcase timeout innodb.innodb-alter-table : MDEV-10619 - Testcase timeout
innodb.innodb-alter-tempfile : MDEV-15285 - Table already exists innodb.innodb-autoinc : Modified in 10.4.9
innodb.innodb-autoinc : Modified in 10.4.7
innodb.innodb-bigblob : MDEV-18655 - ASAN unknown crash innodb.innodb-bigblob : MDEV-18655 - ASAN unknown crash
innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb-blob : MDEV-12053 - Client crash
innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query; modified in 10.4.9
innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown
innodb.innodb-fkcheck : Modified in 10.4.8 innodb.innodb-fkcheck : Modified in 10.4.8
innodb.innodb-get-fk : MDEV-13276 - Server crash; modified in 10.4.8 innodb.innodb-get-fk : MDEV-13276 - Server crash; modified in 10.4.8
@ -556,11 +586,10 @@ innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem
innodb.innodb-read-view : Added in 10.4.8 innodb.innodb-read-view : Added in 10.4.8
innodb.innodb-system-table-view : Modified in 10.4.8 innodb.innodb-system-table-view : Modified in 10.4.8
innodb.innodb-table-online : MDEV-13894 - Wrong result innodb.innodb-table-online : MDEV-13894 - Wrong result
innodb.innodb-virtual-columns-debug : MDEV-20143 - Wrong result; added in 10.4.7 innodb.innodb-virtual-columns-debug : Modified in 10.4.9
innodb.innodb-wl5522 : MDEV-13644 - Assertion failure innodb.innodb-wl5522 : MDEV-13644 - Assertion failure
innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno; modified in 10.4.8 innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno; modified in 10.4.8
innodb.innodb-wl5980-debug : Added in 10.4.7 innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc
innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc; added in 10.4.7
innodb.innodb_buffer_pool_resize : MDEV-16964 - Assertion failure innodb.innodb_buffer_pool_resize : MDEV-16964 - Assertion failure
innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure
innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt
@ -574,56 +603,55 @@ innodb.innodb_bulk_create_index_debug : Include file modified in 10.4.8
innodb.innodb_bulk_create_index_flush : Configuration added in 10.4.8 innodb.innodb_bulk_create_index_flush : Configuration added in 10.4.8
innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start
innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full
innodb.innodb_force_recovery : Modified in 10.4.9
innodb.innodb_information_schema : MDEV-8851 - Wrong result innodb.innodb_information_schema : MDEV-8851 - Wrong result
innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.4.7 innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed
innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.4.7 innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result
innodb.innodb_monitor : MDEV-10939 - Testcase timeout innodb.innodb_monitor : MDEV-10939 - Testcase timeout
innodb.innodb_mysql : Include file modified in 10.4.8 innodb.innodb_mysql : Include file modified in 10.4.8
innodb.innodb_prefix_index_restart_server : MDEV-20213 - Server crash
innodb.innodb_simulate_comp_failures_small : MDEV-20526 - ASAN use-after-poison innodb.innodb_simulate_comp_failures_small : MDEV-20526 - ASAN use-after-poison
innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_stats : MDEV-10682 - wrong result
innodb.innodb_stats_persistent : MDEV-17745 - Wrong result innodb.innodb_stats_persistent : MDEV-17745 - Wrong result; modified in 10.4.9
innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed
innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait
innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks
innodb.instant_alter : Modified in 10.4.8 innodb.instant_alter : Modified in 10.4.8
innodb.instant_alter_bugs : Modified in 10.4.8 innodb.instant_alter_bugs : Modified in 10.4.9
innodb.instant_alter_charset : Modified in 10.4.8 innodb.instant_alter_charset : Modified in 10.4.8
innodb.instant_alter_debug : Modified in 10.4.7 innodb.instant_alter_extend : MDEV-20963 - Binary files differ
innodb.instant_alter_index_rename : Modified in 10.4.9
innodb.log_alter_table : Configuration added in 10.4.8 innodb.log_alter_table : Configuration added in 10.4.8
innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_corruption : MDEV-13251 - Wrong result
innodb.log_data_file_size : MDEV-14204 - Server failed to start innodb.log_data_file_size : MDEV-14204 - Server failed to start; MDEV-20648 - Assertion failure
innodb.log_file : MDEV-20159 - Assertion failure innodb.log_file : MDEV-20159 - Assertion failure
innodb.log_file_name : MDEV-14193 - Exception innodb.log_file_name : MDEV-14193 - Exception
innodb.log_file_size : MDEV-15668 - Not found pattern innodb.log_file_size : MDEV-15668 - Not found pattern
innodb.max_record_size : Added in 10.4.7
innodb.missing_tablespaces : Added in 10.4.7
innodb.monitor : MDEV-16179 - Wrong result innodb.monitor : MDEV-16179 - Wrong result
innodb.page_id_innochecksum : Modified in 10.4.8 innodb.page_id_innochecksum : Modified in 10.4.8
innodb.purge : Added in 10.4.7
innodb.purge_secondary : MDEV-15681 - Wrong result innodb.purge_secondary : MDEV-15681 - Wrong result
innodb.purge_secondary_mdev-16222 : MDEV-20528 - Debug sync point wait timed out; added in 10.4.7 innodb.purge_secondary_mdev-16222 : MDEV-20528 - Debug sync point wait timed out
innodb.purge_thread_shutdown : MDEV-13792 - Wrong result innodb.purge_thread_shutdown : MDEV-13792 - Wrong result
innodb.read_only_recovery : MDEV-13886 - Server crash innodb.read_only_recovery : MDEV-13886 - Server crash
innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile; modified in 10.4.8 innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile; modified in 10.4.8
innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace
innodb.strict_mode : Modified in 10.4.7 innodb.stat_tables : Added in 10.4.9
innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_definition_cache_debug : MDEV-14206 - Extra warning
innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start
innodb.temp_table_savepoint : MDEV-16182 - Wrong result
innodb.temporary_table : MDEV-13265 - Wrong result innodb.temporary_table : MDEV-13265 - Wrong result
innodb.temporary_table_optimization : MDEV-20531 - Wrong result innodb.temporary_table_optimization : Modified in 10.4.9
innodb.truncate_missing : Modified in 10.4.7
innodb.trx_id_future : Modified in 10.4.8 innodb.trx_id_future : Modified in 10.4.8
innodb.undo_log : Modified in 10.4.7 innodb.undo_truncate : MDEV-17340 - Server hung; MDEV-20840 - Sporadic timeout
innodb.undo_truncate : MDEV-17340 - Server hung
innodb.undo_truncate_recover : MDEV-17679 - Server has gone away; MDEV-19200 - Shutdown fails; modified in 10.4.8 innodb.undo_truncate_recover : MDEV-17679 - Server has gone away; MDEV-19200 - Shutdown fails; modified in 10.4.8
innodb.update_time : MDEV-14804 - Wrong result innodb.update_time : MDEV-14804 - Wrong result
innodb.xa_recovery : MDEV-15279 - mysqld got exception innodb.xa_recovery : MDEV-15279 - mysqld got exception
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
innodb_fts.fulltext2 : Modified in 10.4.7 innodb_fts.concurrent_insert : Modified in 10.4.9
innodb_fts.innodb_fts_misc : Modified in 10.4.8 innodb_fts.crash_recovery : Modified in 10.4.9
innodb_fts.fulltext_table_evict : Modified in 10.4.8
innodb_fts.innodb_fts_misc : Modified in 10.4.9
innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning
innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log
innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed
@ -632,8 +660,8 @@ innodb_fts.sync_ddl : MDEV-18654 - Assertion failure
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
innodb_gis.alter_spatial_index : MDEV-13745 - Server crash; modified in 10.4.7 innodb_gis.alter_spatial_index : MDEV-13745 - Server crash
innodb_gis.kill_server : MDEV-16941 - Checksum mismatch innodb_gis.innodb_gis_rtree : MDEV-20213 - Server crash
innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result; modified in 10.4.8 innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result; modified in 10.4.8
innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded
innodb_gis.rtree_purge : MDEV-15275 - Timeout innodb_gis.rtree_purge : MDEV-15275 - Timeout
@ -646,10 +674,9 @@ innodb_gis.update_root : Modified in 10.4.8
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed
innodb_zip.innochecksum : MDEV-20158 - Server failed to shut down innodb_zip.innochecksum : MDEV-14486 - Server failed to shut down
innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings
innodb_zip.page_size : Include file modified in 10.4.7 innodb_zip.restart : MDEV-20213 - Server crash
innodb_zip.restart : Include file modified in 10.4.7
innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.4.8 innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.4.8
innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure
innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket
@ -657,11 +684,10 @@ innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
maria.alter : Modified in 10.4.7
maria.icp : Modified in 10.4.8 maria.icp : Modified in 10.4.8
maria.insert_select : MDEV-12757 - Timeout maria.insert_select : MDEV-12757 - Timeout
maria.insert_select-7314 : MDEV-16492 - Timeout maria.insert_select-7314 : MDEV-16492 - Timeout
maria.kill : Added in 10.4.7 maria.lock : Modified in 10.4.9
maria.maria : MDEV-14430 - Extra warning maria.maria : MDEV-14430 - Extra warning
maria.maria-big : Modified in 10.4.8 maria.maria-big : Modified in 10.4.8
maria.maria-gis-recovery : Modified in 10.4.8 maria.maria-gis-recovery : Modified in 10.4.8
@ -670,7 +696,6 @@ maria.maria-recover : Modified in 10.4.8
maria.maria-recovery : Modified in 10.4.8 maria.maria-recovery : Modified in 10.4.8
maria.maria3 : Modified in 10.4.8 maria.maria3 : Modified in 10.4.8
maria.partition : Added in 10.4.8 maria.partition : Added in 10.4.8
maria.temporary : Added in 10.4.7
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
@ -678,13 +703,16 @@ mariabackup.absolute_ibdata_paths : MDEV-16571 - Wrong result
mariabackup.apply-log-only : MDEV-20135 - Timeout mariabackup.apply-log-only : MDEV-20135 - Timeout
mariabackup.big_innodb_log : Added in 10.4.8 mariabackup.big_innodb_log : Added in 10.4.8
mariabackup.data_directory : MDEV-15270 - Error on exec mariabackup.data_directory : MDEV-15270 - Error on exec
mariabackup.encrypted_page_corruption : Modified in 10.4.9
mariabackup.extra_lsndir_stream : Added in 10.4.9
mariabackup.full_backup : MDEV-16571 - Wrong result mariabackup.full_backup : MDEV-16571 - Wrong result
mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future; MDEV-18569 - Table doesn't exist mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future; MDEV-18569 - Table doesn't exist
mariabackup.incremental_encrypted : MDEV-15667 - timeout mariabackup.incremental_encrypted : MDEV-15667 - timeout
mariabackup.incremental_rocksdb : MDEV-20954 - Cannot access the file
mariabackup.log_checksum_mismatch : MDEV-16571 - Wrong result mariabackup.log_checksum_mismatch : MDEV-16571 - Wrong result
mariabackup.mdev-14447 : MDEV-15201 - Timeout mariabackup.mdev-14447 : MDEV-15201 - Timeout
mariabackup.missing_ibd : Modified in 10.4.7 mariabackup.mdev-18438 : Added in 10.4.9
mariabackup.partial : MDEV-19298 - Assertion failure mariabackup.partial : MDEV-19298 - Assertion failure; modified in 10.4.9
mariabackup.partial_exclude : MDEV-15270 - Error on exec mariabackup.partial_exclude : MDEV-15270 - Error on exec
mariabackup.unencrypted_page_compressed : MDEV-18653 - Wrong error mariabackup.unencrypted_page_compressed : MDEV-18653 - Wrong error
mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault
@ -721,7 +749,6 @@ multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_h
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
parts.fulltext : Added in 10.4.7
parts.partition_alter1_1_2_innodb : MDEV-18655 - ASAN unknown crash parts.partition_alter1_1_2_innodb : MDEV-18655 - ASAN unknown crash
parts.partition_alter1_1_innodb : MDEV-18655 - ASAN unknown crash parts.partition_alter1_1_innodb : MDEV-18655 - ASAN unknown crash
parts.partition_alter1_2_innodb : MDEV-18655 - ASAN unknown crash parts.partition_alter1_2_innodb : MDEV-18655 - ASAN unknown crash
@ -729,7 +756,9 @@ parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL s
parts.partition_auto_increment_archive : MDEV-16491 - Marked as crashed and should be repaired parts.partition_auto_increment_archive : MDEV-16491 - Marked as crashed and should be repaired
parts.partition_auto_increment_maria : MDEV-14430 - Extra warning parts.partition_auto_increment_maria : MDEV-14430 - Extra warning
parts.partition_basic_innodb : MDEV-20214 - ASAN error parts.partition_basic_innodb : MDEV-20214 - ASAN error
parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist parts.partition_debug : Modified in 10.4.9
parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist; modified in 10.4.9
parts.partition_debug_myisam : Modified in 10.4.9
parts.partition_exch_qa_10 : MDEV-11765 - wrong result parts.partition_exch_qa_10 : MDEV-11765 - wrong result
parts.partition_exch_qa_4_innodb : Include file modified in 10.4.8 parts.partition_exch_qa_4_innodb : Include file modified in 10.4.8
parts.partition_exch_qa_4_myisam : Include file modified in 10.4.8 parts.partition_exch_qa_4_myisam : Include file modified in 10.4.8
@ -749,6 +778,7 @@ parts.partition_mgm_lc2_innodb : Include file modified in 10.4.8
parts.partition_mgm_lc2_memory : Include file modified in 10.4.8 parts.partition_mgm_lc2_memory : Include file modified in 10.4.8
parts.partition_mgm_lc2_myisam : Include file modified in 10.4.8 parts.partition_mgm_lc2_myisam : Include file modified in 10.4.8
parts.partition_special_innodb : MDEV-16942 - Timeout parts.partition_special_innodb : MDEV-16942 - Timeout
parts.reorganize_partition_innodb : Added in 10.4.9
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
@ -779,6 +809,7 @@ perfschema.hostcache_ipv6_nameinfo_noname_allow : Configuration modified in 10.4
perfschema.hostcache_ipv6_nameinfo_noname_deny : Configuration modified in 10.4.8 perfschema.hostcache_ipv6_nameinfo_noname_deny : Configuration modified in 10.4.8
perfschema.hostcache_ipv6_passwd : Configuration modified in 10.4.8 perfschema.hostcache_ipv6_passwd : Configuration modified in 10.4.8
perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; configuration modified in 10.4.8 perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; configuration modified in 10.4.8
perfschema.pfs_upgrade_func : MDEV-20957 - Upgrade file was not properly created
perfschema.pfs_upgrade_proc : MDEV-20533 - Upgrade file was not properly created perfschema.pfs_upgrade_proc : MDEV-20533 - Upgrade file was not properly created
perfschema.pfs_upgrade_view : MDEV-20533 - Upgrade file was not properly created perfschema.pfs_upgrade_view : MDEV-20533 - Upgrade file was not properly created
perfschema.privilege_table_io : MDEV-13184 - Extra lines perfschema.privilege_table_io : MDEV-13184 - Extra lines
@ -799,16 +830,13 @@ perfschema_stress.* : MDEV-10996 - Not maintained
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
period.versioning : MDEV-20159 - Assertion failure; modified in 10.4.8 period.versioning : MDEV-20159 - Assertion failure; include file modified in 10.4.9
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
plugins.feedback_plugin_load : Modified in 10.4.8 plugins.feedback_plugin_load : Modified in 10.4.9
plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such
plugins.multiauth : MDEV-20163 - Plugin could not be loaded; include file modified in 10.4.8 plugins.multiauth : MDEV-20163 - Plugin could not be loaded; include file modified in 10.4.8
plugins.pam : Modified in 10.4.7
plugins.pam_cleartext : Modified in 10.4.7
plugins.pam_v1 : Modified in 10.4.7
plugins.processlist : MDEV-16574 - Wrong result plugins.processlist : MDEV-16574 - Wrong result
plugins.qc_info : Modified in 10.4.8 plugins.qc_info : Modified in 10.4.8
plugins.server_audit : MDEV-14295 - Wrong result plugins.server_audit : MDEV-14295 - Wrong result
@ -827,6 +855,7 @@ rocksdb.drop_index_inplace : MDEV-14162 - Crash on shutdown
rocksdb.drop_table : MDEV-14308 - Timeout rocksdb.drop_table : MDEV-14308 - Timeout
rocksdb.drop_table3 : MDEV-16949 - Server crash rocksdb.drop_table3 : MDEV-16949 - Server crash
rocksdb.dup_key_update : MDEV-17284 - Wrong result rocksdb.dup_key_update : MDEV-17284 - Wrong result
rocksdb.index_merge_rocksdb2 : Include file modified in 10.4.9
rocksdb.locking_issues : MDEV-14464 - Wrong result rocksdb.locking_issues : MDEV-14464 - Wrong result
rocksdb.mariadb_ignore_dirs : MDEV-16639 - Server crash rocksdb.mariadb_ignore_dirs : MDEV-16639 - Server crash
rocksdb.mariadb_port_fixes : MDEV-16387 - Wrong plan rocksdb.mariadb_port_fixes : MDEV-16387 - Wrong plan
@ -835,9 +864,7 @@ rocksdb.perf_context : MDEV-17285 - Wrong results
rocksdb.rocksdb_cf_options : MDEV-16639 - Server crash rocksdb.rocksdb_cf_options : MDEV-16639 - Server crash
rocksdb.rocksdb_cf_per_partition : MDEV-16636 - Wrong result rocksdb.rocksdb_cf_per_partition : MDEV-16636 - Wrong result
rocksdb.rocksdb_parts : MDEV-13843 - Wrong result rocksdb.rocksdb_parts : MDEV-13843 - Wrong result
rocksdb.ttl_primary_read_filtering : MDEV-16560 - Wrong result
rocksdb.ttl_secondary : MDEV-16943 - Timeout rocksdb.ttl_secondary : MDEV-16943 - Timeout
rocksdb.ttl_secondary_read_filtering : MDEV-16560 - Wrong result
rocksdb.unique_check : MDEV-16576 - Wrong errno rocksdb.unique_check : MDEV-16576 - Wrong errno
rocksdb.use_direct_reads_writes : MDEV-16646 - Server crash rocksdb.use_direct_reads_writes : MDEV-16646 - Server crash
rocksdb.write_sync : MDEV-16965 - WRong result rocksdb.write_sync : MDEV-16965 - WRong result
@ -863,18 +890,18 @@ roles.show_create_database-10463 : Modified in 10.4.8
rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free
rpl.create_or_replace2 : MDEV-19412 - Lost connection to MySQL server rpl.create_or_replace2 : MDEV-19412 - Lost connection to MySQL server
rpl.create_or_replace_mix : MDEV-20523 - Wrong result; include file modified in 10.4.7 rpl.create_or_replace_mix : MDEV-20523 - Wrong result
rpl.create_or_replace_row : Include file modified in 10.4.7 rpl.create_or_replace_statement : MDEV-20523 - Wrong result
rpl.create_or_replace_statement : MDEV-20523 - Wrong result; include file modified in 10.4.7
rpl.create_select : MDEV-14121 - Assertion failure rpl.create_select : MDEV-14121 - Assertion failure
rpl.kill_race_condition : Modified in 10.4.7
rpl.last_insert_id : MDEV-10625 - warnings in error log rpl.last_insert_id : MDEV-10625 - warnings in error log
rpl.mdev_17588 : Modified in 10.4.8 rpl.mdev_17588 : Modified in 10.4.8
rpl.rpl_000011 : Modified in 10.4.9
rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips
rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips
rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log
rpl.rpl_binlog_errors : MDEV-12742 - Crash rpl.rpl_binlog_errors : MDEV-12742 - Crash
rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master
rpl.rpl_cant_read_event_incident : MDEV-20960 - Abort on shutdown
rpl.rpl_circular_for_4_hosts : MDEV-20536 - Server crash rpl.rpl_circular_for_4_hosts : MDEV-20536 - Server crash
rpl.rpl_colSize : MDEV-16112 - Server crash rpl.rpl_colSize : MDEV-16112 - Server crash
rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code
@ -886,7 +913,7 @@ rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file,
rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed
rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Table marked as crashed rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Table marked as crashed
rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start
rpl.rpl_drop_temp_table_invaid_lex : Added in 10.4.7 rpl.rpl_dual_pos_advance : MDEV-20213 - Server crash
rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning
rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning
rpl.rpl_failed_drop_tbl_binlog : Added in 10.4.8 rpl.rpl_failed_drop_tbl_binlog : Added in 10.4.8
@ -909,6 +936,8 @@ rpl.rpl_insert_id : MDEV-15197 - Wrong result
rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure
rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query
rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips
rpl.rpl_ip_mix : Modified in 10.4.9
rpl.rpl_ip_mix2 : Modified in 10.4.9
rpl.rpl_ipv4_as_ipv6 : MDEV-20147 - Incorrect checksum for freed object rpl.rpl_ipv4_as_ipv6 : MDEV-20147 - Incorrect checksum for freed object
rpl.rpl_known_bugs_detection : Modified in 10.2.27 rpl.rpl_known_bugs_detection : Modified in 10.2.27
rpl.rpl_lcase_tblnames_rewrite_db : MDEV-20213 - Server crash rpl.rpl_lcase_tblnames_rewrite_db : MDEV-20213 - Server crash
@ -923,6 +952,7 @@ rpl.rpl_non_direct_stm_mixing_engines : MDEV-14489 - Failed sync_slave_with_ma
rpl.rpl_parallel : MDEV-10653 - Timeouts rpl.rpl_parallel : MDEV-10653 - Timeouts
rpl.rpl_parallel2 : MDEV-17390 - Operation cannot be performed rpl.rpl_parallel2 : MDEV-17390 - Operation cannot be performed
rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash
rpl.rpl_parallel_ignored_errors : Added in 10.4.9
rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure
rpl.rpl_parallel_multilevel : MDEV-20160 - Server crash rpl.rpl_parallel_multilevel : MDEV-20160 - Server crash
rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout
@ -933,11 +963,14 @@ rpl.rpl_parallel_temptable : MDEV-10356 - Crash; MDEV-19076 - Wrong
rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips
rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings
rpl.rpl_read_only : MDEV-20159 - Assertion failure rpl.rpl_read_only : MDEV-20159 - Assertion failure
rpl.rpl_read_only2 : Added in 10.4.9
rpl.rpl_relayrotate : MDEV-20213 - Server crash
rpl.rpl_rotate_logs : Modified in 10.4.9
rpl.rpl_row_001 : MDEV-16653 - MTR's internal check fails rpl.rpl_row_001 : MDEV-16653 - MTR's internal check fails
rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start
rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed
rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result
rpl.rpl_row_drop_temp_table : Added in 10.4.7 rpl.rpl_row_find_row_debug : Modified in 10.4.9
rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed
rpl.rpl_row_img_eng_min : MDEV-13875 - diff_files failed rpl.rpl_row_img_eng_min : MDEV-13875 - diff_files failed
rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed
@ -949,12 +982,15 @@ rpl.rpl_semi_sync : MDEV-11220 - Wrong result
rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result
rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result
rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings
rpl.rpl_semi_sync_slave_reply_fail : Added in 10.4.9
rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures
rpl.rpl_semi_sync_wait_no_slave : MDEV-20159 - Assertion failure rpl.rpl_semi_sync_wait_no_slave : MDEV-20159 - Assertion failure
rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition
rpl.rpl_semisync_ali_issues : MDEV-16272 - Wrong result rpl.rpl_semisync_ali_issues : MDEV-16272 - Wrong result
rpl.rpl_set_statement_default_master : MDEV-13258 - Extra warning rpl.rpl_set_statement_default_master : MDEV-13258 - Extra warning
rpl.rpl_show_slave_hosts : MDEV-10681 - Crash rpl.rpl_show_slave_hosts : MDEV-10681 - Crash
rpl.rpl_shutdown_wait_semisync_slaves : MDEV-20213 - Server crash
rpl.rpl_skip_error : Modified in 10.4.9
rpl.rpl_skip_replication : MDEV-13258 - Extra warning rpl.rpl_skip_replication : MDEV-13258 - Extra warning
rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock
rpl.rpl_slave_load_in : MDEV-20159 - Assertion failure rpl.rpl_slave_load_in : MDEV-20159 - Assertion failure
@ -973,6 +1009,7 @@ rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries
rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output
rpl.rpl_trigger : MDEV-18055 - Wrong result rpl.rpl_trigger : MDEV-18055 - Wrong result
rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error
rpl.rpl_unsafe_statements : Modified in 10.1.42
rpl.rpl_user_variables : MDEV-20522 - Wrong result rpl.rpl_user_variables : MDEV-20522 - Wrong result
rpl.rpl_variables : MDEV-20150 - Server crash rpl.rpl_variables : MDEV-20150 - Server crash
rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result
@ -991,8 +1028,12 @@ rpl/extra/rpl_tests.* : MDEV-10994 - Not maintained
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
sphinx.* : MDEV-10986 - Tests have not been maintained sequence.group_by : Modified in 10.4.9
sphinx.sphinx : MDEV-10986 - Sporadic failures
#-----------------------------------------------------------------------
sphinx.* : MDEV-10986 - Tests have not been maintained; suite.pm modified in 10.4.9
sphinx.sphinx : MDEV-10986 - Sporadic failures; modified in 10.4.9
sphinx.union-5539 : MDEV-10986 - Sporadic failures sphinx.union-5539 : MDEV-10986 - Sporadic failures
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
@ -1014,11 +1055,16 @@ spider/bg.vp_fixes : MDEV-9329 - Fails on Ubuntu/s390x
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
spider/bugfix.select_by_null : Added in 10.4.9
#-----------------------------------------------------------------------
spider/handler.* : MDEV-10987, MDEV-10990 - Tests have not been maintained spider/handler.* : MDEV-10987, MDEV-10990 - Tests have not been maintained
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
sql_sequence.concurrent_create : MDEV-16635 - Server crash sql_sequence.concurrent_create : MDEV-16635 - Server crash
sql_sequence.other : Modified in 10.4.9
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
@ -1043,11 +1089,12 @@ sys_vars.character_set_server_func : Modified in 10.4.8
sys_vars.collation_connection_basic : Modified in 10.4.8 sys_vars.collation_connection_basic : Modified in 10.4.8
sys_vars.collation_database_basic : Modified in 10.4.8 sys_vars.collation_database_basic : Modified in 10.4.8
sys_vars.collation_server_basic : Modified in 10.4.8 sys_vars.collation_server_basic : Modified in 10.4.8
sys_vars.delayed_insert_limit_func : Modified in 10.4.9
sys_vars.expire_logs_days_basic : Modified in 10.4.8 sys_vars.expire_logs_days_basic : Modified in 10.4.8
sys_vars.histogram_size_basic : Modified in 10.2.27 sys_vars.histogram_size_basic : Modified in 10.2.27
sys_vars.host_cache_size_auto : MDEV-20112 - Wrong result sys_vars.host_cache_size_auto : MDEV-20112 - Wrong result
sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error
sys_vars.innodb_ft_result_cache_limit : Modified in 10.2.26 sys_vars.innodb_change_buffering_debug_basic : Modified in 10.4.9
sys_vars.innodb_max_dirty_pages_pct_basic : Modified in 10.4.8 sys_vars.innodb_max_dirty_pages_pct_basic : Modified in 10.4.8
sys_vars.innodb_max_dirty_pages_pct_lwm_basic : Modified in 10.4.8 sys_vars.innodb_max_dirty_pages_pct_lwm_basic : Modified in 10.4.8
sys_vars.innodb_read_io_threads_basic : Configuration added in 10.4.8 sys_vars.innodb_read_io_threads_basic : Configuration added in 10.4.8
@ -1122,11 +1169,11 @@ tokudb_bugs.frm_store : MDEV-12823 - Valgrind
tokudb_bugs.frm_store2 : MDEV-12823 - Valgrind tokudb_bugs.frm_store2 : MDEV-12823 - Valgrind
tokudb_bugs.frm_store3 : MDEV-12823 - Valgrind tokudb_bugs.frm_store3 : MDEV-12823 - Valgrind
tokudb_bugs.xa : MDEV-11804 - Lock wait timeout tokudb_bugs.xa : MDEV-11804 - Lock wait timeout
tokudb_bugs.xa-3 : MDEV-16953 - Corrupt log record found
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection
tokudb_parts.partition_debug_tokudb : Include file modified in 10.4.9
tokudb_parts.partition_exch_qa_4_tokudb : Include file modified in 10.4.8 tokudb_parts.partition_exch_qa_4_tokudb : Include file modified in 10.4.8
tokudb_parts.partition_exch_qa_8_tokudb : Include file modified in 10.4.8 tokudb_parts.partition_exch_qa_8_tokudb : Include file modified in 10.4.8
tokudb_parts.partition_mgm_lc0_tokudb : Include file modified in 10.4.8 tokudb_parts.partition_mgm_lc0_tokudb : Include file modified in 10.4.8
@ -1152,55 +1199,58 @@ unit.conc_ps_bugs : MDEV-13252 - not ok 44 test_bug4236
unit.ma_pagecache_consist_64kRD : MDEV-19367 - AddressSanitizer CHECK failed unit.ma_pagecache_consist_64kRD : MDEV-19367 - AddressSanitizer CHECK failed
unit.ma_pagecache_consist_64kWR : MDEV-19367 - AddressSanitizer CHECK failed unit.ma_pagecache_consist_64kWR : MDEV-19367 - AddressSanitizer CHECK failed
unit.ma_test_loghandler : MDEV-10638 - record read not ok unit.ma_test_loghandler : MDEV-10638 - record read not ok
unit.mf_iocache : MDEV-20952 - ASAN stack-buffer-overflow
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
vcol.cross_db : Modified in 10.4.8 vcol.cross_db : Modified in 10.4.8
vcol.not_supported : MDEV-10639 - Testcase timeout vcol.not_supported : MDEV-10639 - Testcase timeout
vcol.update : Modified in 10.4.8 vcol.update : Modified in 10.4.8
vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout; modified in 10.4.9
vcol.vcol_misc : MDEV-16651 - Wrong error message; modified in 10.4.7 vcol.vcol_misc : MDEV-16651 - Wrong error message
vcol.vcol_select_innodb : Modified in 10.4.8 vcol.vcol_select_innodb : Modified in 10.4.8
vcol.vcol_select_myisam : Modified in 10.4.8 vcol.vcol_select_myisam : Modified in 10.4.8
vcol.vcol_sql_mode : Added in 10.4.8 vcol.vcol_sql_mode : Added in 10.4.8
vcol.vcol_sql_mode_datetime : Added in 10.4.9
vcol.vcol_sql_mode_time : Added in 10.4.9
vcol.vcol_sql_mode_timestamp : Added in 10.4.9
vcol.vcol_sql_mode_upgrade : Added in 10.4.8 vcol.vcol_sql_mode_upgrade : Added in 10.4.8
vcol.vcol_trigger_sp_innodb : Include file modified in 10.4.8 vcol.vcol_trigger_sp_innodb : Include file modified in 10.4.8
vcol.vcol_trigger_sp_myisam : Include file modified in 10.4.8 vcol.vcol_trigger_sp_myisam : Include file modified in 10.4.8
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
versioning.alter : Modified in 10.4.8 versioning.alter : Modified in 10.4.9
versioning.auto_increment : Include file modified in 10.4.8 versioning.auto_increment : Include file modified in 10.4.9
versioning.commit_id : Include file modified in 10.4.8 versioning.commit_id : Include file modified in 10.4.9
versioning.create : Modified in 10.4.8 versioning.create : Modified in 10.4.9
versioning.cte : Modified in 10.4.8 versioning.cte : Modified in 10.4.8
versioning.delete : Modified in 10.4.8 versioning.delete : Modified in 10.4.9
versioning.derived : Modified in 10.4.8 versioning.derived : Modified in 10.4.8
versioning.foreign : Modified in 10.4.8 versioning.engines : Combinations added in 10.4.9
versioning.insert : Include file modified in 10.4.8 versioning.foreign : Modified in 10.4.9
versioning.online : Modified in 10.4.8 versioning.insert : Include file modified in 10.4.9
versioning.partition : Modified in 10.4.8 versioning.key_type : Combinations added in 10.4.9
versioning.partition_innodb : Modified in 10.4.8 versioning.online : Modified in 10.4.9
versioning.replace : Modified in 10.4.8 versioning.partition : Modified in 10.4.9
versioning.select : Modified in 10.4.8 versioning.partition_innodb : Modified in 10.4.9
versioning.select2 : Include file modified in 10.4.8 versioning.replace : Modified in 10.4.9
versioning.simple : Modified in 10.3.17 versioning.select : Include file modified in 10.4.9
versioning.truncate : Modified in 10.4.8 versioning.select2 : Include file modified in 10.4.9
versioning.trx_id : Modified in 10.4.8 versioning.truncate : Modified in 10.4.9
versioning.update : Include file modified in 10.4.8 versioning.trx_id : Modified in 10.4.9
versioning.update-big : Modified in 10.4.8 versioning.update : MDEV-20955 - Wrong result code; modified in 10.4.9
versioning.view : Modified in 10.4.8 versioning.update-big : Modified in 10.4.9
versioning.view : Modified in 10.4.9
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
wsrep.* : suite.pm modified in 10.4.7
wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node
wsrep.mdev_6832 : MDEV-14195 - Check testcase failed wsrep.mdev_6832 : MDEV-14195 - Check testcase failed; modified in 10.4.9
wsrep.mysql_tzinfo_to_sql_symlink_skip : Added in 10.4.8 wsrep.mysql_tzinfo_to_sql_symlink_skip : Added in 10.4.8
wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use
wsrep.variables : MDEV-14311 - Wrong result; MDEV-17585 - Deadlock; modified in 10.4.7 wsrep.variables : MDEV-14311 - Wrong result; MDEV-17585 - Deadlock; modified in 10.4.9
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
wsrep_info.* : suite.pm modified in 10.4.7
wsrep_info.plugin : MDEV-13569 - No nodes coming from prim view wsrep_info.plugin : MDEV-13569 - No nodes coming from prim view

View File

@ -440,7 +440,7 @@ if [ "$reply" = "n" ]; then
echo " ... skipping." echo " ... skipping."
else else
emptypass=0 emptypass=0
do_query "UPDATE mysql.global_priv SET priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', 'invalid', '$.auth_or', json_array(json_object(), json_object('plugin', 'unix_socket'))) WHERE User='root';" do_query "UPDATE mysql.global_priv SET priv=json_set(priv, '$.password_last_changed', UNIX_TIMESTAMP(), '$.plugin', 'mysql_native_password', '$.authentication_string', 'invalid', '$.auth_or', json_array(json_object(), json_object('plugin', 'unix_socket'))) WHERE User='root';"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "Enabled successfully!" echo "Enabled successfully!"
echo "Reloading privilege tables.." echo "Reloading privilege tables.."

View File

@ -26,7 +26,7 @@ use Fcntl;
BEGIN { BEGIN {
# **************************** # ****************************
# static information... # static information...
$VERSION = "2.06, 20 Dec 2000"; $VERSION = "2.10, 13 Sep 2019";
$0 =~ m%/([^/]+)$%o; $0 =~ m%/([^/]+)$%o;
$script = $1; $script = $1;
$script = 'MySQLAccess' unless $script; $script = 'MySQLAccess' unless $script;

View File

@ -290,6 +290,14 @@ static bool backup_block_commit(THD *thd)
/* We can ignore errors from flush_tables () */ /* We can ignore errors from flush_tables () */
(void) flush_tables(thd, FLUSH_SYS_TABLES); (void) flush_tables(thd, FLUSH_SYS_TABLES);
if (mysql_bin_log.is_open())
{
mysql_mutex_lock(mysql_bin_log.get_log_lock());
mysql_file_sync(mysql_bin_log.get_log_file()->file,
MYF(MY_WME|MY_SYNC_FILESIZE));
mysql_mutex_unlock(mysql_bin_log.get_log_lock());
}
thd->clear_error(); thd->clear_error();
DBUG_RETURN(0); DBUG_RETURN(0);

View File

@ -3461,7 +3461,6 @@ bool ha_partition::init_partition_bitmaps()
/* /*
Open handler object Open handler object
SYNOPSIS SYNOPSIS
open() open()
name Full path of table name name Full path of table name
@ -3588,6 +3587,7 @@ int ha_partition::open(const char *name, int mode, uint test_if_locked)
} }
else else
{ {
check_insert_autoincrement();
if (unlikely((error= open_read_partitions(name_buff, sizeof(name_buff))))) if (unlikely((error= open_read_partitions(name_buff, sizeof(name_buff)))))
goto err_handler; goto err_handler;
m_num_locks= m_file_sample->lock_count(); m_num_locks= m_file_sample->lock_count();
@ -4473,10 +4473,7 @@ exit:
table->found_next_number_field->field_index)) table->found_next_number_field->field_index))
{ {
update_next_auto_inc_val(); update_next_auto_inc_val();
/* if (part_share->auto_inc_initialized)
The following call is safe as part_share->auto_inc_initialized
(tested in the call) is guaranteed to be set for update statements.
*/
set_auto_increment_if_higher(table->found_next_number_field); set_auto_increment_if_higher(table->found_next_number_field);
} }
DBUG_RETURN(error); DBUG_RETURN(error);
@ -8138,6 +8135,7 @@ int ha_partition::info(uint flag)
if (flag & HA_STATUS_AUTO) if (flag & HA_STATUS_AUTO)
{ {
bool auto_inc_is_first_in_idx= (table_share->next_number_keypart == 0); bool auto_inc_is_first_in_idx= (table_share->next_number_keypart == 0);
bool all_parts_opened= true;
DBUG_PRINT("info", ("HA_STATUS_AUTO")); DBUG_PRINT("info", ("HA_STATUS_AUTO"));
if (!table->found_next_number_field) if (!table->found_next_number_field)
stats.auto_increment_value= 0; stats.auto_increment_value= 0;
@ -8168,6 +8166,15 @@ int ha_partition::info(uint flag)
("checking all partitions for auto_increment_value")); ("checking all partitions for auto_increment_value"));
do do
{ {
if (!bitmap_is_set(&m_opened_partitions, (uint)(file_array - m_file)))
{
/*
Some partitions aren't opened.
So we can't calculate the autoincrement.
*/
all_parts_opened= false;
break;
}
file= *file_array; file= *file_array;
file->info(HA_STATUS_AUTO | no_lock_flag); file->info(HA_STATUS_AUTO | no_lock_flag);
set_if_bigger(auto_increment_value, set_if_bigger(auto_increment_value,
@ -8176,7 +8183,7 @@ int ha_partition::info(uint flag)
DBUG_ASSERT(auto_increment_value); DBUG_ASSERT(auto_increment_value);
stats.auto_increment_value= auto_increment_value; stats.auto_increment_value= auto_increment_value;
if (auto_inc_is_first_in_idx) if (all_parts_opened && auto_inc_is_first_in_idx)
{ {
set_if_bigger(part_share->next_auto_inc_val, set_if_bigger(part_share->next_auto_inc_val,
auto_increment_value); auto_increment_value);
@ -8485,6 +8492,7 @@ int ha_partition::change_partitions_to_open(List<String> *partition_names)
return 0; return 0;
} }
check_insert_autoincrement();
if (bitmap_cmp(&m_opened_partitions, &m_part_info->read_partitions) != 0) if (bitmap_cmp(&m_opened_partitions, &m_part_info->read_partitions) != 0)
return 0; return 0;

View File

@ -1329,6 +1329,19 @@ private:
unlock_auto_increment(); unlock_auto_increment();
} }
void check_insert_autoincrement()
{
/*
If we INSERT into the table having the AUTO_INCREMENT column,
we have to read all partitions for the next autoincrement value
unless we already did it.
*/
if (!part_share->auto_inc_initialized &&
ha_thd()->lex->sql_command == SQLCOM_INSERT &&
table->found_next_number_field)
bitmap_set_all(&m_part_info->read_partitions);
}
public: public:
/* /*

View File

@ -2666,10 +2666,17 @@ const int FORMAT_MAX_DECIMALS= 30;
bool Item_func_format::fix_length_and_dec() bool Item_func_format::fix_length_and_dec()
{ {
uint32 char_length= args[0]->max_char_length(); uint32 char_length= args[0]->type_handler()->Item_decimal_notation_int_digits(args[0]);
uint32 max_sep_count= (char_length / 3) + (decimals ? 1 : 0) + /*sign*/1; uint dec= FORMAT_MAX_DECIMALS;
if (args[1]->const_item() && !args[1]->is_expensive())
{
Longlong_hybrid tmp= args[1]->to_longlong_hybrid();
if (!args[1]->null_value)
dec= tmp.to_uint(FORMAT_MAX_DECIMALS);
}
uint32 max_sep_count= (char_length / 3) + (dec ? 1 : 0) + /*sign*/1;
collation.set(default_charset()); collation.set(default_charset());
fix_char_length(char_length + max_sep_count + decimals); fix_char_length(char_length + max_sep_count + dec);
if (arg_count == 3) if (arg_count == 3)
locale= args[2]->basic_const_item() ? args[2]->locale_from_val_str() : NULL; locale= args[2]->basic_const_item() ? args[2]->locale_from_val_str() : NULL;
else else

View File

@ -68,7 +68,7 @@ uchar* find_named(I_List<NAMED_ILINK> *list, const char *name, size_t length,
} }
bool NAMED_ILIST::delete_element(const char *name, size_t length, void (*free_element)(const char *name, uchar*)) bool NAMED_ILIST::delete_element(const char *name, size_t length, void (*free_element)(const char *name, void*))
{ {
I_List_iterator<NAMED_ILINK> it(*this); I_List_iterator<NAMED_ILINK> it(*this);
NAMED_ILINK *element; NAMED_ILINK *element;
@ -85,7 +85,7 @@ bool NAMED_ILIST::delete_element(const char *name, size_t length, void (*free_el
DBUG_RETURN(1); DBUG_RETURN(1);
} }
void NAMED_ILIST::delete_elements(void (*free_element)(const char *name, uchar*)) void NAMED_ILIST::delete_elements(void (*free_element)(const char *name, void*))
{ {
NAMED_ILINK *element; NAMED_ILINK *element;
DBUG_ENTER("NAMED_ILIST::delete_elements"); DBUG_ENTER("NAMED_ILIST::delete_elements");
@ -157,9 +157,9 @@ KEY_CACHE *get_or_create_key_cache(const char *name, size_t length)
} }
void free_key_cache(const char *name, KEY_CACHE *key_cache) void free_key_cache(const char *name, void *key_cache)
{ {
end_key_cache(key_cache, 1); // Can never fail end_key_cache(static_cast<KEY_CACHE *>(key_cache), 1); // Can never fail
my_free(key_cache); my_free(key_cache);
} }
@ -221,13 +221,12 @@ Rpl_filter *get_or_create_rpl_filter(const char *name, size_t length)
return filter; return filter;
} }
void free_rpl_filter(const char *name, Rpl_filter *filter) void free_rpl_filter(const char *name, void *filter)
{ {
delete filter; delete static_cast<Rpl_filter*>(filter);
filter= 0;
} }
void free_all_rpl_filters() void free_all_rpl_filters()
{ {
rpl_filters.delete_elements((void (*)(const char*, uchar*)) free_rpl_filter); rpl_filters.delete_elements(free_rpl_filter);
} }

View File

@ -30,8 +30,8 @@ class NAMED_ILINK;
class NAMED_ILIST: public I_List<NAMED_ILINK> class NAMED_ILIST: public I_List<NAMED_ILINK>
{ {
public: public:
void delete_elements(void (*free_element)(const char*, uchar*)); void delete_elements(void (*free_element)(const char*, void*));
bool delete_element(const char *name, size_t length, void (*free_element)(const char*, uchar*)); bool delete_element(const char *name, size_t length, void (*free_element)(const char*, void*));
}; };
/* For key cache */ /* For key cache */
@ -42,7 +42,7 @@ extern NAMED_ILIST key_caches;
KEY_CACHE *create_key_cache(const char *name, size_t length); KEY_CACHE *create_key_cache(const char *name, size_t length);
KEY_CACHE *get_key_cache(const LEX_CSTRING *cache_name); KEY_CACHE *get_key_cache(const LEX_CSTRING *cache_name);
KEY_CACHE *get_or_create_key_cache(const char *name, size_t length); KEY_CACHE *get_or_create_key_cache(const char *name, size_t length);
void free_key_cache(const char *name, KEY_CACHE *key_cache); void free_key_cache(const char *name, void *key_cache);
bool process_key_caches(process_key_cache_t func, void *param); bool process_key_caches(process_key_cache_t func, void *param);
/* For Rpl_filter */ /* For Rpl_filter */
@ -52,7 +52,6 @@ extern NAMED_ILIST rpl_filters;
Rpl_filter *create_rpl_filter(const char *name, size_t length); Rpl_filter *create_rpl_filter(const char *name, size_t length);
Rpl_filter *get_rpl_filter(LEX_CSTRING *filter_name); Rpl_filter *get_rpl_filter(LEX_CSTRING *filter_name);
Rpl_filter *get_or_create_rpl_filter(const char *name, size_t length); Rpl_filter *get_or_create_rpl_filter(const char *name, size_t length);
void free_rpl_filter(const char *name, Rpl_filter *filter);
void free_all_rpl_filters(void); void free_all_rpl_filters(void);
#endif /* KEYCACHES_INCLUDED */ #endif /* KEYCACHES_INCLUDED */

View File

@ -5968,7 +5968,6 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd,
DBUG_ASSERT(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()); DBUG_ASSERT(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open());
DBUG_PRINT("enter", ("event: %p", event)); DBUG_PRINT("enter", ("event: %p", event));
int error= 0;
binlog_cache_mngr *const cache_mngr= binlog_cache_mngr *const cache_mngr=
(binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
@ -6006,7 +6005,7 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd,
thd->binlog_set_pending_rows_event(event, is_transactional); thd->binlog_set_pending_rows_event(event, is_transactional);
DBUG_RETURN(error); DBUG_RETURN(0);
} }
@ -7718,7 +7717,7 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
mysql_mutex_unlock(&LOCK_prepare_ordered); mysql_mutex_unlock(&LOCK_prepare_ordered);
DEBUG_SYNC(orig_entry->thd, "commit_after_release_LOCK_prepare_ordered"); DEBUG_SYNC(orig_entry->thd, "commit_after_release_LOCK_prepare_ordered");
DBUG_PRINT("info", ("Queued for group commit as %s\n", DBUG_PRINT("info", ("Queued for group commit as %s",
(orig_queue == NULL) ? "leader" : "participant")); (orig_queue == NULL) ? "leader" : "participant"));
DBUG_RETURN(orig_queue == NULL); DBUG_RETURN(orig_queue == NULL);
} }
@ -10734,13 +10733,13 @@ bool wsrep_stmt_rollback_is_safe(THD* thd)
binlog_cache_data * trx_cache = &cache_mngr->trx_cache; binlog_cache_data * trx_cache = &cache_mngr->trx_cache;
if (thd->wsrep_sr().fragments_certified() > 0 && if (thd->wsrep_sr().fragments_certified() > 0 &&
(trx_cache->get_prev_position() == MY_OFF_T_UNDEF || (trx_cache->get_prev_position() == MY_OFF_T_UNDEF ||
trx_cache->get_prev_position() < thd->wsrep_sr().bytes_certified())) trx_cache->get_prev_position() < thd->wsrep_sr().log_position()))
{ {
WSREP_DEBUG("statement rollback is not safe for streaming replication" WSREP_DEBUG("statement rollback is not safe for streaming replication"
" pre-stmt_pos: %llu, frag repl pos: %zu\n" " pre-stmt_pos: %llu, frag repl pos: %zu\n"
"Thread: %llu, SQL: %s", "Thread: %llu, SQL: %s",
trx_cache->get_prev_position(), trx_cache->get_prev_position(),
thd->wsrep_sr().bytes_certified(), thd->wsrep_sr().log_position(),
thd->thread_id, thd->query()); thd->thread_id, thd->query());
ret = false; ret = false;
} }

View File

@ -668,7 +668,9 @@ SHOW_COMP_OPTION have_crypt, have_compress;
SHOW_COMP_OPTION have_profiling; SHOW_COMP_OPTION have_profiling;
SHOW_COMP_OPTION have_openssl; SHOW_COMP_OPTION have_openssl;
#ifndef EMBEDDED_LIBRARY
static std::atomic<char*> shutdown_user; static std::atomic<char*> shutdown_user;
#endif //EMBEDDED_LIBRARY
/* Thread specific variables */ /* Thread specific variables */
@ -1987,7 +1989,7 @@ static void clean_up(bool print_message)
tdc_deinit(); tdc_deinit();
mdl_destroy(); mdl_destroy();
dflt_key_cache= 0; dflt_key_cache= 0;
key_caches.delete_elements((void (*)(const char*, uchar*)) free_key_cache); key_caches.delete_elements(free_key_cache);
wt_end(); wt_end();
multi_keycache_free(); multi_keycache_free();
sp_cache_end(); sp_cache_end();
@ -4303,7 +4305,6 @@ static int init_common_variables()
return 1; return 1;
} }
global_system_variables.in_subquery_conversion_threshold= IN_SUBQUERY_CONVERSION_THRESHOLD;
#ifdef WITH_WSREP #ifdef WITH_WSREP
/* /*

View File

@ -2681,9 +2681,17 @@ bool find_eq_ref_candidate(TABLE *table, table_map sj_inner_tables)
{ {
do /* For all equalities on all key parts */ do /* For all equalities on all key parts */
{ {
/* Check if this is "t.keypart = expr(outer_tables) */ /*
Check if this is "t.keypart = expr(outer_tables)
Don't allow variants that can produce duplicates:
- Dont allow "ref or null"
- the keyuse (that is, the operation) must be null-rejecting,
unless the other expression is non-NULLable.
*/
if (!(keyuse->used_tables & sj_inner_tables) && if (!(keyuse->used_tables & sj_inner_tables) &&
!(keyuse->optimize & KEY_OPTIMIZE_REF_OR_NULL)) !(keyuse->optimize & KEY_OPTIMIZE_REF_OR_NULL) &&
(keyuse->null_rejecting || !keyuse->val->maybe_null))
{ {
bound_parts |= 1 << keyuse->keypart; bound_parts |= 1 << keyuse->keypart;
} }

View File

@ -1561,7 +1561,7 @@ scan_one_gtid_slave_pos_table(THD *thd, HASH *hash, DYNAMIC_ARRAY *array,
sub_id= (ulonglong)table->field[1]->val_int(); sub_id= (ulonglong)table->field[1]->val_int();
server_id= (uint32)table->field[2]->val_int(); server_id= (uint32)table->field[2]->val_int();
seq_no= (ulonglong)table->field[3]->val_int(); seq_no= (ulonglong)table->field[3]->val_int();
DBUG_PRINT("info", ("Read slave state row: %u-%u-%lu sub_id=%lu\n", DBUG_PRINT("info", ("Read slave state row: %u-%u-%lu sub_id=%lu",
(unsigned)domain_id, (unsigned)server_id, (unsigned)domain_id, (unsigned)server_id,
(ulong)seq_no, (ulong)sub_id)); (ulong)seq_no, (ulong)sub_id));

View File

@ -806,7 +806,7 @@ int Repl_semi_sync_master::commit_trx(const char* trx_wait_binlog_name,
if (!get_master_enabled() || !is_on()) if (!get_master_enabled() || !is_on())
goto l_end; goto l_end;
DBUG_PRINT("semisync", ("%s: wait pos (%s, %lu), repl(%d)\n", DBUG_PRINT("semisync", ("%s: wait pos (%s, %lu), repl(%d)",
"Repl_semi_sync_master::commit_trx", "Repl_semi_sync_master::commit_trx",
trx_wait_binlog_name, (ulong)trx_wait_binlog_pos, trx_wait_binlog_name, (ulong)trx_wait_binlog_pos,
(int)is_on())); (int)is_on()));

View File

@ -55,7 +55,26 @@ extern "C" const char* wsrep_thd_transaction_state_str(const THD *thd)
extern "C" const char *wsrep_thd_query(const THD *thd) extern "C" const char *wsrep_thd_query(const THD *thd)
{ {
return thd ? thd->query() : NULL; if (thd)
{
switch(thd->lex->sql_command)
{
case SQLCOM_CREATE_USER:
return "CREATE USER";
case SQLCOM_GRANT:
return "GRANT";
case SQLCOM_REVOKE:
return "REVOKE";
case SQLCOM_SET_OPTION:
if (thd->lex->definer)
return "SET PASSWORD";
/* fallthrough */
default:
if (thd->query())
return thd->query();
}
}
return "NULL";
} }
extern "C" query_id_t wsrep_thd_transaction_id(const THD *thd) extern "C" query_id_t wsrep_thd_transaction_id(const THD *thd)

View File

@ -1466,7 +1466,7 @@ log:
/* Such a statement can always go directly to binlog, no trans cache */ /* Such a statement can always go directly to binlog, no trans cache */
if (thd->binlog_query(THD::STMT_QUERY_TYPE, if (thd->binlog_query(THD::STMT_QUERY_TYPE,
log_query.ptr(), log_query.length(), log_query.ptr(), log_query.length(),
FALSE, FALSE, FALSE, 0)) FALSE, FALSE, FALSE, 0) > 0)
{ {
my_error(ER_ERROR_ON_WRITE, MYF(0), "binary log", -1); my_error(ER_ERROR_ON_WRITE, MYF(0), "binary log", -1);
goto done; goto done;

View File

@ -4722,6 +4722,7 @@ typedef struct st_sp_table
uint lock_count; uint lock_count;
uint query_lock_count; uint query_lock_count;
uint8 trg_event_map; uint8 trg_event_map;
my_bool for_insert_data;
} SP_TABLE; } SP_TABLE;
@ -4817,6 +4818,7 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check)
if (tab->query_lock_count > tab->lock_count) if (tab->query_lock_count > tab->lock_count)
tab->lock_count++; tab->lock_count++;
tab->trg_event_map|= table->trg_event_map; tab->trg_event_map|= table->trg_event_map;
tab->for_insert_data|= table->for_insert_data;
} }
else else
{ {
@ -4840,6 +4842,7 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check)
tab->lock_type= table->lock_type; tab->lock_type= table->lock_type;
tab->lock_count= tab->query_lock_count= 1; tab->lock_count= tab->query_lock_count= 1;
tab->trg_event_map= table->trg_event_map; tab->trg_event_map= table->trg_event_map;
tab->for_insert_data= table->for_insert_data;
if (my_hash_insert(&m_sptabs, (uchar *)tab)) if (my_hash_insert(&m_sptabs, (uchar *)tab))
return FALSE; return FALSE;
} }
@ -4923,7 +4926,8 @@ sp_head::add_used_tables_to_table_list(THD *thd,
TABLE_LIST::PRELOCK_ROUTINE, TABLE_LIST::PRELOCK_ROUTINE,
belong_to_view, belong_to_view,
stab->trg_event_map, stab->trg_event_map,
query_tables_last_ptr); query_tables_last_ptr,
stab->for_insert_data);
tab_buff+= ALIGN_SIZE(sizeof(TABLE_LIST)); tab_buff+= ALIGN_SIZE(sizeof(TABLE_LIST));
result= TRUE; result= TRUE;
} }

View File

@ -3788,7 +3788,7 @@ bool change_password(THD *thd, LEX_USER *user)
DBUG_ASSERT(query_length); DBUG_ASSERT(query_length);
thd->clear_error(); thd->clear_error();
result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length, result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length,
FALSE, FALSE, FALSE, 0); FALSE, FALSE, FALSE, 0) > 0;
} }
end: end:
if (result) if (result)
@ -3940,7 +3940,7 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
DBUG_ASSERT(query_length); DBUG_ASSERT(query_length);
thd->clear_error(); thd->clear_error();
result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length, result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length,
FALSE, FALSE, FALSE, 0); FALSE, FALSE, FALSE, 0) > 0;
} }
end: end:
close_mysql_tables(thd); close_mysql_tables(thd);

View File

@ -1317,7 +1317,7 @@ bool Sql_cmd_analyze_table::execute(THD *thd)
"analyze", lock_type, 1, 0, 0, 0, "analyze", lock_type, 1, 0, 0, 0,
&handler::ha_analyze, 0); &handler::ha_analyze, 0);
/* ! we write after unlocking the table */ /* ! we write after unlocking the table */
if (!res && !m_lex->no_write_to_binlog) if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
{ {
/* /*
Presumably, ANALYZE and binlog writing doesn't require synchronization Presumably, ANALYZE and binlog writing doesn't require synchronization
@ -1377,7 +1377,7 @@ bool Sql_cmd_optimize_table::execute(THD *thd)
"optimize", TL_WRITE, 1, 0, 0, 0, "optimize", TL_WRITE, 1, 0, 0, 0,
&handler::ha_optimize, 0); &handler::ha_optimize, 0);
/* ! we write after unlocking the table */ /* ! we write after unlocking the table */
if (!res && !m_lex->no_write_to_binlog) if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
{ {
/* /*
Presumably, OPTIMIZE and binlog writing doesn't require synchronization Presumably, OPTIMIZE and binlog writing doesn't require synchronization
@ -1413,7 +1413,7 @@ bool Sql_cmd_repair_table::execute(THD *thd)
&handler::ha_repair, &view_repair); &handler::ha_repair, &view_repair);
/* ! we write after unlocking the table */ /* ! we write after unlocking the table */
if (!res && !m_lex->no_write_to_binlog) if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
{ {
/* /*
Presumably, REPAIR and binlog writing doesn't require synchronization Presumably, REPAIR and binlog writing doesn't require synchronization

View File

@ -2668,6 +2668,7 @@ Locked_tables_list::reopen_tables(THD *thd, bool need_reopen)
{ {
thd->locked_tables_list.unlink_from_list(thd, table_list, false); thd->locked_tables_list.unlink_from_list(thd, table_list, false);
mysql_lock_remove(thd, thd->lock, *prev); mysql_lock_remove(thd, thd->lock, *prev);
(*prev)->file->extra(HA_EXTRA_PREPARE_FOR_FORCED_CLOSE);
close_thread_table(thd, prev); close_thread_table(thd, prev);
break; break;
} }
@ -4604,9 +4605,11 @@ add_internal_tables(THD *thd, Query_tables_list *prelocking_ctx,
TABLE_LIST *tables) TABLE_LIST *tables)
{ {
TABLE_LIST *global_table_list= prelocking_ctx->query_tables; TABLE_LIST *global_table_list= prelocking_ctx->query_tables;
DBUG_ENTER("add_internal_tables");
do do
{ {
DBUG_PRINT("info", ("table name: %s", tables->table_name.str));
/* /*
Skip table if already in the list. Can happen with prepared statements Skip table if already in the list. Can happen with prepared statements
*/ */
@ -4616,20 +4619,22 @@ add_internal_tables(THD *thd, Query_tables_list *prelocking_ctx,
TABLE_LIST *tl= (TABLE_LIST *) thd->alloc(sizeof(TABLE_LIST)); TABLE_LIST *tl= (TABLE_LIST *) thd->alloc(sizeof(TABLE_LIST));
if (!tl) if (!tl)
return TRUE; DBUG_RETURN(TRUE);
tl->init_one_table_for_prelocking(&tables->db, tl->init_one_table_for_prelocking(&tables->db,
&tables->table_name, &tables->table_name,
NULL, tables->lock_type, NULL, tables->lock_type,
TABLE_LIST::PRELOCK_NONE, TABLE_LIST::PRELOCK_NONE,
0, 0, 0, 0,
&prelocking_ctx->query_tables_last); &prelocking_ctx->query_tables_last,
tables->for_insert_data);
/* /*
Store link to the new table_list that will be used by open so that Store link to the new table_list that will be used by open so that
Item_func_nextval() can find it Item_func_nextval() can find it
*/ */
tables->next_local= tl; tables->next_local= tl;
DBUG_PRINT("info", ("table name: %s added", tables->table_name.str));
} while ((tables= tables->next_global)); } while ((tables= tables->next_global));
return FALSE; DBUG_RETURN(FALSE);
} }
@ -4660,6 +4665,7 @@ bool DML_prelocking_strategy::
handle_table(THD *thd, Query_tables_list *prelocking_ctx, handle_table(THD *thd, Query_tables_list *prelocking_ctx,
TABLE_LIST *table_list, bool *need_prelocking) TABLE_LIST *table_list, bool *need_prelocking)
{ {
DBUG_ENTER("handle_table");
TABLE *table= table_list->table; TABLE *table= table_list->table;
/* We rely on a caller to check that table is going to be changed. */ /* We rely on a caller to check that table is going to be changed. */
DBUG_ASSERT(table_list->lock_type >= TL_WRITE_ALLOW_WRITE || DBUG_ASSERT(table_list->lock_type >= TL_WRITE_ALLOW_WRITE ||
@ -4690,7 +4696,7 @@ handle_table(THD *thd, Query_tables_list *prelocking_ctx,
{ {
if (arena) if (arena)
thd->restore_active_arena(arena, &backup); thd->restore_active_arena(arena, &backup);
return TRUE; DBUG_RETURN(TRUE);
} }
*need_prelocking= TRUE; *need_prelocking= TRUE;
@ -4718,7 +4724,8 @@ handle_table(THD *thd, Query_tables_list *prelocking_ctx,
NULL, lock_type, NULL, lock_type,
TABLE_LIST::PRELOCK_FK, TABLE_LIST::PRELOCK_FK,
table_list->belong_to_view, op, table_list->belong_to_view, op,
&prelocking_ctx->query_tables_last); &prelocking_ctx->query_tables_last,
table_list->for_insert_data);
} }
if (arena) if (arena)
thd->restore_active_arena(arena, &backup); thd->restore_active_arena(arena, &backup);
@ -4726,8 +4733,11 @@ handle_table(THD *thd, Query_tables_list *prelocking_ctx,
} }
/* Open any tables used by DEFAULT (like sequence tables) */ /* Open any tables used by DEFAULT (like sequence tables) */
DBUG_PRINT("info", ("table: %p name: %s db: %s flags: %u",
table_list, table_list->table_name.str,
table_list->db.str, table_list->for_insert_data));
if (table->internal_tables && if (table->internal_tables &&
((sql_command_flags[thd->lex->sql_command] & CF_INSERTS_DATA) || (table_list->for_insert_data ||
thd->lex->default_used)) thd->lex->default_used))
{ {
Query_arena *arena, backup; Query_arena *arena, backup;
@ -4740,10 +4750,10 @@ handle_table(THD *thd, Query_tables_list *prelocking_ctx,
if (unlikely(error)) if (unlikely(error))
{ {
*need_prelocking= TRUE; *need_prelocking= TRUE;
return TRUE; DBUG_RETURN(TRUE);
} }
} }
return FALSE; DBUG_RETURN(FALSE);
} }
@ -4760,7 +4770,7 @@ bool open_and_lock_internal_tables(TABLE *table, bool lock_table)
THD *thd= table->in_use; THD *thd= table->in_use;
TABLE_LIST *tl; TABLE_LIST *tl;
MYSQL_LOCK *save_lock,*new_lock; MYSQL_LOCK *save_lock,*new_lock;
DBUG_ENTER("open_internal_tables"); DBUG_ENTER("open_and_lock_internal_tables");
/* remove pointer to old select_lex which is already destroyed */ /* remove pointer to old select_lex which is already destroyed */
for (tl= table->internal_tables ; tl ; tl= tl->next_global) for (tl= table->internal_tables ; tl ; tl= tl->next_global)

View File

@ -49,7 +49,7 @@
#include <m_ctype.h> #include <m_ctype.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <thr_alarm.h> #include <thr_alarm.h>
#ifdef __WIN__ #ifdef __WIN__0
#include <io.h> #include <io.h>
#endif #endif
#include <mysys_err.h> #include <mysys_err.h>
@ -5848,17 +5848,33 @@ int THD::decide_logging_format(TABLE_LIST *tables)
Get the capabilities vector for all involved storage engines and Get the capabilities vector for all involved storage engines and
mask out the flags for the binary log. mask out the flags for the binary log.
*/ */
for (TABLE_LIST *table= tables; table; table= table->next_global) for (TABLE_LIST *tbl= tables; tbl; tbl= tbl->next_global)
{ {
if (table->placeholder()) TABLE *table;
TABLE_SHARE *share;
handler::Table_flags flags;
if (tbl->placeholder())
continue; continue;
handler::Table_flags const flags= table->table->file->ha_table_flags(); table= tbl->table;
share= table->s;
flags= table->file->ha_table_flags();
if (!share->table_creation_was_logged)
{
/*
This is a temporary table which was not logged in the binary log.
Disable statement logging to enforce row level logging.
*/
DBUG_ASSERT(share->tmp_table);
flags&= ~HA_BINLOG_STMT_CAPABLE;
/* We can only use row logging */
set_current_stmt_binlog_format_row();
}
DBUG_PRINT("info", ("table: %s; ha_table_flags: 0x%llx", DBUG_PRINT("info", ("table: %s; ha_table_flags: 0x%llx",
table->table_name.str, flags)); tbl->table_name.str, flags));
if (table->table->s->no_replicate) if (share->no_replicate)
{ {
/* /*
The statement uses a table that is not replicated. The statement uses a table that is not replicated.
@ -5876,44 +5892,44 @@ int THD::decide_logging_format(TABLE_LIST *tables)
*/ */
lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_TABLE); lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_TABLE);
if (table->lock_type >= TL_WRITE_ALLOW_WRITE) if (tbl->lock_type >= TL_WRITE_ALLOW_WRITE)
{ {
non_replicated_tables_count++; non_replicated_tables_count++;
continue; continue;
} }
} }
if (table == lex->first_not_own_table()) if (tbl == lex->first_not_own_table())
found_first_not_own_table= true; found_first_not_own_table= true;
replicated_tables_count++; replicated_tables_count++;
if (table->prelocking_placeholder != TABLE_LIST::PRELOCK_FK) if (tbl->prelocking_placeholder != TABLE_LIST::PRELOCK_FK)
{ {
if (table->lock_type <= TL_READ_NO_INSERT) if (tbl->lock_type <= TL_READ_NO_INSERT)
has_read_tables= true; has_read_tables= true;
else if (table->table->found_next_number_field && else if (table->found_next_number_field &&
(table->lock_type >= TL_WRITE_ALLOW_WRITE)) (tbl->lock_type >= TL_WRITE_ALLOW_WRITE))
{ {
has_auto_increment_write_tables= true; has_auto_increment_write_tables= true;
has_auto_increment_write_tables_not_first= found_first_not_own_table; has_auto_increment_write_tables_not_first= found_first_not_own_table;
if (table->table->s->next_number_keypart != 0) if (share->next_number_keypart != 0)
has_write_table_auto_increment_not_first_in_pk= true; has_write_table_auto_increment_not_first_in_pk= true;
} }
} }
if (table->lock_type >= TL_WRITE_ALLOW_WRITE) if (tbl->lock_type >= TL_WRITE_ALLOW_WRITE)
{ {
bool trans; bool trans;
if (prev_write_table && prev_write_table->file->ht != if (prev_write_table && prev_write_table->file->ht !=
table->table->file->ht) table->file->ht)
multi_write_engine= TRUE; multi_write_engine= TRUE;
if (table->table->s->non_determinstic_insert && if (share->non_determinstic_insert &&
!(sql_command_flags[lex->sql_command] & CF_SCHEMA_CHANGE)) !(sql_command_flags[lex->sql_command] & CF_SCHEMA_CHANGE))
has_write_tables_with_unsafe_statements= true; has_write_tables_with_unsafe_statements= true;
trans= table->table->file->has_transactions(); trans= table->file->has_transactions();
if (table->table->s->tmp_table) if (share->tmp_table)
lex->set_stmt_accessed_table(trans ? LEX::STMT_WRITES_TEMP_TRANS_TABLE : lex->set_stmt_accessed_table(trans ? LEX::STMT_WRITES_TEMP_TRANS_TABLE :
LEX::STMT_WRITES_TEMP_NON_TRANS_TABLE); LEX::STMT_WRITES_TEMP_NON_TRANS_TABLE);
else else
@ -5924,17 +5940,16 @@ int THD::decide_logging_format(TABLE_LIST *tables)
flags_write_some_set |= flags; flags_write_some_set |= flags;
is_write= TRUE; is_write= TRUE;
prev_write_table= table->table; prev_write_table= table;
} }
flags_access_some_set |= flags; flags_access_some_set |= flags;
if (lex->sql_command != SQLCOM_CREATE_TABLE || if (lex->sql_command != SQLCOM_CREATE_TABLE || lex->tmp_table())
(lex->sql_command == SQLCOM_CREATE_TABLE && lex->tmp_table()))
{ {
my_bool trans= table->table->file->has_transactions(); my_bool trans= table->file->has_transactions();
if (table->table->s->tmp_table) if (share->tmp_table)
lex->set_stmt_accessed_table(trans ? LEX::STMT_READS_TEMP_TRANS_TABLE : lex->set_stmt_accessed_table(trans ? LEX::STMT_READS_TEMP_TRANS_TABLE :
LEX::STMT_READS_TEMP_NON_TRANS_TABLE); LEX::STMT_READS_TEMP_NON_TRANS_TABLE);
else else
@ -5943,10 +5958,10 @@ int THD::decide_logging_format(TABLE_LIST *tables)
} }
if (prev_access_table && prev_access_table->file->ht != if (prev_access_table && prev_access_table->file->ht !=
table->table->file->ht) table->file->ht)
multi_access_engine= TRUE; multi_access_engine= TRUE;
prev_access_table= table->table; prev_access_table= table;
} }
if (wsrep_binlog_format() != BINLOG_FORMAT_ROW) if (wsrep_binlog_format() != BINLOG_FORMAT_ROW)
@ -6075,10 +6090,17 @@ int THD::decide_logging_format(TABLE_LIST *tables)
{ {
/* /*
5. Error: Cannot modify table that uses a storage engine 5. Error: Cannot modify table that uses a storage engine
limited to row-logging when binlog_format = STATEMENT limited to row-logging when binlog_format = STATEMENT, except
if all tables that are updated are temporary tables
*/ */
if (IF_WSREP((!WSREP_NNULL(this) || if (!lex->stmt_writes_to_non_temp_table())
wsrep_cs().mode() == wsrep::client_state::m_local),1)) {
/* As all updated tables are temporary, nothing will be logged */
set_current_stmt_binlog_format_row();
}
else if (IF_WSREP((!WSREP(this) ||
wsrep_cs().mode() ==
wsrep::client_state::m_local),1))
{ {
my_error((error= ER_BINLOG_STMT_MODE_AND_ROW_ENGINE), MYF(0), ""); my_error((error= ER_BINLOG_STMT_MODE_AND_ROW_ENGINE), MYF(0), "");
} }
@ -6147,10 +6169,8 @@ int THD::decide_logging_format(TABLE_LIST *tables)
"ROW" : "STATEMENT")); "ROW" : "STATEMENT"));
if (variables.binlog_format == BINLOG_FORMAT_ROW && if (variables.binlog_format == BINLOG_FORMAT_ROW &&
(lex->sql_command == SQLCOM_UPDATE || (sql_command_flags[lex->sql_command] &
lex->sql_command == SQLCOM_UPDATE_MULTI || (CF_UPDATES_DATA | CF_DELETES_DATA)))
lex->sql_command == SQLCOM_DELETE ||
lex->sql_command == SQLCOM_DELETE_MULTI))
{ {
String table_names; String table_names;
/* /*
@ -6170,8 +6190,8 @@ int THD::decide_logging_format(TABLE_LIST *tables)
} }
if (!table_names.is_empty()) if (!table_names.is_empty())
{ {
bool is_update= (lex->sql_command == SQLCOM_UPDATE || bool is_update= MY_TEST(sql_command_flags[lex->sql_command] &
lex->sql_command == SQLCOM_UPDATE_MULTI); CF_UPDATES_DATA);
/* /*
Replace the last ',' with '.' for table_names Replace the last ',' with '.' for table_names
*/ */
@ -7008,11 +7028,12 @@ void THD::issue_unsafe_warnings()
@see decide_logging_format @see decide_logging_format
@retval < 0 No logging of query (ok)
@retval 0 Success @retval 0 Success
@retval > 0 If there is a failure when writing the query (e.g.,
@retval nonzero If there is a failure when writing the query (e.g.,
write failure), then the error code is returned. write failure), then the error code is returned.
*/ */
int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg, int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
ulong query_len, bool is_trans, bool direct, ulong query_len, bool is_trans, bool direct,
bool suppress_use, int errcode) bool suppress_use, int errcode)
@ -7038,7 +7059,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
The current statement is to be ignored, and not written to The current statement is to be ignored, and not written to
the binlog. Do not call issue_unsafe_warnings(). the binlog. Do not call issue_unsafe_warnings().
*/ */
DBUG_RETURN(0); DBUG_RETURN(-1);
} }
/* /*
@ -7054,8 +7075,11 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
{ {
int error; int error;
if (unlikely(error= binlog_flush_pending_rows_event(TRUE, is_trans))) if (unlikely(error= binlog_flush_pending_rows_event(TRUE, is_trans)))
{
DBUG_ASSERT(error > 0);
DBUG_RETURN(error); DBUG_RETURN(error);
} }
}
/* /*
Warnings for unsafe statements logged in statement format are Warnings for unsafe statements logged in statement format are
@ -7097,7 +7121,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
("is_current_stmt_binlog_format_row: %d", ("is_current_stmt_binlog_format_row: %d",
is_current_stmt_binlog_format_row())); is_current_stmt_binlog_format_row()));
if (is_current_stmt_binlog_format_row()) if (is_current_stmt_binlog_format_row())
DBUG_RETURN(0); DBUG_RETURN(-1);
/* Fall through */ /* Fall through */
/* /*
@ -7138,7 +7162,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
} }
binlog_table_maps= 0; binlog_table_maps= 0;
DBUG_RETURN(error); DBUG_RETURN(error >= 0 ? error : 1);
} }
case THD::QUERY_TYPE_COUNT: case THD::QUERY_TYPE_COUNT:

View File

@ -1630,12 +1630,16 @@ public:
/** /**
@class Sub_statement_state @class Sub_statement_state
@brief Used to save context when executing a function or trigger @brief Used to save context when executing a function or trigger
operations on stat tables aren't technically a sub-statement, but they are
similar in a sense that they cannot change the transaction status.
*/ */
/* Defines used for Sub_statement_state::in_sub_stmt */ /* Defines used for Sub_statement_state::in_sub_stmt */
#define SUB_STMT_TRIGGER 1 #define SUB_STMT_TRIGGER 1
#define SUB_STMT_FUNCTION 2 #define SUB_STMT_FUNCTION 2
#define SUB_STMT_STAT_TABLES 4
class Sub_statement_state class Sub_statement_state
@ -6653,6 +6657,11 @@ public:
/* Bits in server_command_flags */ /* Bits in server_command_flags */
/**
Statement that deletes existing rows (DELETE, DELETE_MULTI)
*/
#define CF_DELETES_DATA (1U << 24)
/** /**
Skip the increase of the global query id counter. Commonly set for Skip the increase of the global query id counter. Commonly set for
commands that are stateless (won't cause any change on the server commands that are stateless (won't cause any change on the server
@ -6858,6 +6867,22 @@ class Sql_mode_save
sql_mode_t old_mode; // SQL mode saved at construction time. sql_mode_t old_mode; // SQL mode saved at construction time.
}; };
class Switch_to_definer_security_ctx
{
public:
Switch_to_definer_security_ctx(THD *thd, TABLE_LIST *table) :
m_thd(thd), m_sctx(thd->security_ctx)
{
if (table->security_ctx)
thd->security_ctx= table->security_ctx;
}
~Switch_to_definer_security_ctx() { m_thd->security_ctx = m_sctx; }
private:
THD *m_thd;
Security_context *m_sctx;
};
class Sql_mode_instant_set: public Sql_mode_save class Sql_mode_instant_set: public Sql_mode_save
{ {

View File

@ -930,7 +930,7 @@ cleanup:
transactional_table, FALSE, FALSE, transactional_table, FALSE, FALSE,
errcode); errcode);
if (log_result) if (log_result > 0)
{ {
error=1; error=1;
} }
@ -1616,7 +1616,7 @@ bool multi_delete::send_eof()
if (unlikely(thd->binlog_query(THD::ROW_QUERY_TYPE, if (unlikely(thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query(), thd->query_length(), thd->query(), thd->query_length(),
transactional_tables, FALSE, FALSE, transactional_tables, FALSE, FALSE,
errcode)) && errcode) > 0) &&
!normal_tables) !normal_tables)
{ {
local_error=1; // Log write failed: roll back the SQL statement local_error=1; // Log write failed: roll back the SQL statement

View File

@ -1193,13 +1193,13 @@ values_loop_end:
else if (thd->binlog_query(THD::ROW_QUERY_TYPE, else if (thd->binlog_query(THD::ROW_QUERY_TYPE,
log_query.c_ptr(), log_query.length(), log_query.c_ptr(), log_query.length(),
transactional_table, FALSE, FALSE, transactional_table, FALSE, FALSE,
errcode)) errcode) > 0)
error= 1; error= 1;
} }
else if (thd->binlog_query(THD::ROW_QUERY_TYPE, else if (thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query(), thd->query_length(), thd->query(), thd->query_length(),
transactional_table, FALSE, FALSE, transactional_table, FALSE, FALSE,
errcode)) errcode) > 0)
error= 1; error= 1;
} }
} }
@ -3964,6 +3964,7 @@ bool select_insert::prepare_eof()
int error; int error;
bool const trans_table= table->file->has_transactions(); bool const trans_table= table->file->has_transactions();
bool changed; bool changed;
bool binary_logged= 0;
killed_state killed_status= thd->killed; killed_state killed_status= thd->killed;
DBUG_ENTER("select_insert::prepare_eof"); DBUG_ENTER("select_insert::prepare_eof");
@ -4014,18 +4015,22 @@ bool select_insert::prepare_eof()
(likely(!error) || thd->transaction.stmt.modified_non_trans_table)) (likely(!error) || thd->transaction.stmt.modified_non_trans_table))
{ {
int errcode= 0; int errcode= 0;
int res;
if (likely(!error)) if (likely(!error))
thd->clear_error(); thd->clear_error();
else else
errcode= query_error_code(thd, killed_status == NOT_KILLED); errcode= query_error_code(thd, killed_status == NOT_KILLED);
if (thd->binlog_query(THD::ROW_QUERY_TYPE, res= thd->binlog_query(THD::ROW_QUERY_TYPE,
thd->query(), thd->query_length(), thd->query(), thd->query_length(),
trans_table, FALSE, FALSE, errcode)) trans_table, FALSE, FALSE, errcode);
if (res > 0)
{ {
table->file->ha_release_auto_increment(); table->file->ha_release_auto_increment();
DBUG_RETURN(true); DBUG_RETURN(true);
} }
binary_logged= res == 0 || !table->s->tmp_table;
} }
table->s->table_creation_was_logged|= binary_logged;
table->file->ha_release_auto_increment(); table->file->ha_release_auto_increment();
if (unlikely(error)) if (unlikely(error))
@ -4082,8 +4087,9 @@ bool select_insert::send_eof()
DBUG_RETURN(res); DBUG_RETURN(res);
} }
void select_insert::abort_result_set() { void select_insert::abort_result_set()
{
bool binary_logged= 0;
DBUG_ENTER("select_insert::abort_result_set"); DBUG_ENTER("select_insert::abort_result_set");
/* /*
If the creation of the table failed (due to a syntax error, for If the creation of the table failed (due to a syntax error, for
@ -4135,16 +4141,20 @@ void select_insert::abort_result_set() {
if(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open()) if(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open())
{ {
int errcode= query_error_code(thd, thd->killed == NOT_KILLED); int errcode= query_error_code(thd, thd->killed == NOT_KILLED);
int res;
/* error of writing binary log is ignored */ /* error of writing binary log is ignored */
(void) thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(), res= thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(),
thd->query_length(), thd->query_length(),
transactional_table, FALSE, FALSE, errcode); transactional_table, FALSE, FALSE, errcode);
binary_logged= res == 0 || !table->s->tmp_table;
} }
if (changed) if (changed)
query_cache_invalidate3(thd, table, 1); query_cache_invalidate3(thd, table, 1);
} }
DBUG_ASSERT(transactional_table || !changed || DBUG_ASSERT(transactional_table || !changed ||
thd->transaction.stmt.modified_non_trans_table); thd->transaction.stmt.modified_non_trans_table);
table->s->table_creation_was_logged|= binary_logged;
table->file->ha_release_auto_increment(); table->file->ha_release_auto_increment();
} }
@ -4213,6 +4223,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
/* Add selected items to field list */ /* Add selected items to field list */
List_iterator_fast<Item> it(*items); List_iterator_fast<Item> it(*items);
Item *item; Item *item;
bool save_table_creation_was_logged;
DBUG_ENTER("select_create::create_table_from_items"); DBUG_ENTER("select_create::create_table_from_items");
tmp_table.s= &share; tmp_table.s= &share;
@ -4367,6 +4378,14 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
table->reginfo.lock_type=TL_WRITE; table->reginfo.lock_type=TL_WRITE;
hooks->prelock(&table, 1); // Call prelock hooks hooks->prelock(&table, 1); // Call prelock hooks
/*
Ensure that decide_logging_format(), called by mysql_lock_tables(), works
with temporary tables that will be logged later if needed.
*/
save_table_creation_was_logged= table->s->table_creation_was_logged;
table->s->table_creation_was_logged= 1;
/* /*
mysql_lock_tables() below should never fail with request to reopen table mysql_lock_tables() below should never fail with request to reopen table
since it won't wait for the table lock (we have exclusive metadata lock on since it won't wait for the table lock (we have exclusive metadata lock on
@ -4379,7 +4398,10 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
/* /*
This can happen in innodb when you get a deadlock when using same table This can happen in innodb when you get a deadlock when using same table
in insert and select or when you run out of memory. in insert and select or when you run out of memory.
It can also happen if there was a conflict in
THD::decide_logging_format()
*/ */
if (!thd->is_error())
my_error(ER_CANT_LOCK, MYF(0), my_errno); my_error(ER_CANT_LOCK, MYF(0), my_errno);
if (*lock) if (*lock)
{ {
@ -4390,6 +4412,7 @@ TABLE *select_create::create_table_from_items(THD *thd, List<Item> *items,
DBUG_RETURN(0); DBUG_RETURN(0);
/* purecov: end */ /* purecov: end */
} }
table->s->table_creation_was_logged= save_table_creation_was_logged;
DBUG_RETURN(table); DBUG_RETURN(table);
} }
@ -4593,7 +4616,7 @@ select_create::binlog_show_create_table(TABLE **tables, uint count)
/* is_trans */ TRUE, /* is_trans */ TRUE,
/* direct */ FALSE, /* direct */ FALSE,
/* suppress_use */ FALSE, /* suppress_use */ FALSE,
errcode); errcode) > 0;
} }
#ifdef WITH_WSREP #ifdef WITH_WSREP
if (thd->wsrep_trx().active()) if (thd->wsrep_trx().active())
@ -4717,8 +4740,6 @@ bool select_create::send_eof()
} }
#endif /* WITH_WSREP */ #endif /* WITH_WSREP */
} }
else if (!thd->is_current_stmt_binlog_format_row())
table->s->table_creation_was_logged= 1;
/* /*
exit_done must only be set after last potential call to exit_done must only be set after last potential call to
@ -4804,7 +4825,8 @@ void select_create::abort_result_set()
if (table) if (table)
{ {
bool tmp_table= table->s->tmp_table; bool tmp_table= table->s->tmp_table;
bool table_creation_was_logged= (!tmp_table ||
table->s->table_creation_was_logged);
if (tmp_table) if (tmp_table)
{ {
DBUG_ASSERT(saved_tmp_table_share); DBUG_ASSERT(saved_tmp_table_share);
@ -4833,7 +4855,9 @@ void select_create::abort_result_set()
/* Remove logging of drop, create + insert rows */ /* Remove logging of drop, create + insert rows */
binlog_reset_cache(thd); binlog_reset_cache(thd);
/* Original table was deleted. We have to log it */ /* Original table was deleted. We have to log it */
log_drop_table(thd, &create_table->db, &create_table->table_name, tmp_table); if (table_creation_was_logged)
log_drop_table(thd, &create_table->db, &create_table->table_name,
tmp_table);
} }
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;

View File

@ -7723,7 +7723,7 @@ uint binlog_unsafe_map[256];
#define UNSAFE(a, b, c) \ #define UNSAFE(a, b, c) \
{ \ { \
DBUG_PRINT("unsafe_mixed_statement", ("SETTING BASE VALUES: %s, %s, %02X\n", \ DBUG_PRINT("unsafe_mixed_statement", ("SETTING BASE VALUES: %s, %s, %02X", \
LEX::stmt_accessed_table_string(a), \ LEX::stmt_accessed_table_string(a), \
LEX::stmt_accessed_table_string(b), \ LEX::stmt_accessed_table_string(b), \
c)); \ c)); \

View File

@ -2208,6 +2208,14 @@ public:
((1U << STMT_READS_TEMP_TRANS_TABLE) | ((1U << STMT_READS_TEMP_TRANS_TABLE) |
(1U << STMT_WRITES_TEMP_TRANS_TABLE))) != 0); (1U << STMT_WRITES_TEMP_TRANS_TABLE))) != 0);
} }
inline bool stmt_writes_to_non_temp_table()
{
DBUG_ENTER("THD::stmt_writes_to_non_temp_table");
DBUG_RETURN((stmt_accessed_table_flag &
((1U << STMT_WRITES_TRANS_TABLE) |
(1U << STMT_WRITES_NON_TRANS_TABLE))));
}
/** /**
Checks if a temporary non-transactional table is about to be accessed Checks if a temporary non-transactional table is about to be accessed
@ -2259,7 +2267,7 @@ public:
unsafe= (binlog_unsafe_map[stmt_accessed_table_flag] & condition); unsafe= (binlog_unsafe_map[stmt_accessed_table_flag] & condition);
#if !defined(DBUG_OFF) #if !defined(DBUG_OFF)
DBUG_PRINT("LEX::is_mixed_stmt_unsafe", ("RESULT %02X %02X %02X\n", condition, DBUG_PRINT("LEX::is_mixed_stmt_unsafe", ("RESULT %02X %02X %02X", condition,
binlog_unsafe_map[stmt_accessed_table_flag], binlog_unsafe_map[stmt_accessed_table_flag],
(binlog_unsafe_map[stmt_accessed_table_flag] & condition))); (binlog_unsafe_map[stmt_accessed_table_flag] & condition)));
@ -4593,6 +4601,8 @@ public:
const Lex_length_and_dec_st &attr); const Lex_length_and_dec_st &attr);
bool set_cast_type_udt(Lex_cast_type_st *type, bool set_cast_type_udt(Lex_cast_type_st *type,
const LEX_CSTRING &name); const LEX_CSTRING &name);
void mark_first_table_as_inserting();
}; };

View File

@ -2053,7 +2053,7 @@ int READ_INFO::read_xml(THD *thd)
chr= read_value(delim, &value); chr= read_value(delim, &value);
if (attribute.length() > 0 && value.length() > 0) if (attribute.length() > 0 && value.length() > 0)
{ {
DBUG_PRINT("read_xml", ("lev:%i att:%s val:%s\n", DBUG_PRINT("read_xml", ("lev:%i att:%s val:%s",
level + 1, level + 1,
attribute.c_ptr_safe(), attribute.c_ptr_safe(),
value.c_ptr_safe())); value.c_ptr_safe()));

View File

@ -610,11 +610,12 @@ void init_update_queries(void)
CF_CAN_GENERATE_ROW_EVENTS | CF_CAN_GENERATE_ROW_EVENTS |
CF_OPTIMIZER_TRACE | CF_OPTIMIZER_TRACE |
CF_CAN_BE_EXPLAINED | CF_CAN_BE_EXPLAINED |
CF_SP_BULK_SAFE; CF_SP_BULK_SAFE | CF_DELETES_DATA;
sql_command_flags[SQLCOM_DELETE_MULTI]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE | sql_command_flags[SQLCOM_DELETE_MULTI]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
CF_CAN_GENERATE_ROW_EVENTS | CF_CAN_GENERATE_ROW_EVENTS |
CF_OPTIMIZER_TRACE | CF_OPTIMIZER_TRACE |
CF_CAN_BE_EXPLAINED; CF_CAN_BE_EXPLAINED |
CF_DELETES_DATA;
sql_command_flags[SQLCOM_REPLACE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE | sql_command_flags[SQLCOM_REPLACE]= CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
CF_CAN_GENERATE_ROW_EVENTS | CF_CAN_GENERATE_ROW_EVENTS |
CF_OPTIMIZER_TRACE | CF_OPTIMIZER_TRACE |
@ -3313,6 +3314,10 @@ mysql_execute_command(THD *thd)
#endif #endif
DBUG_ENTER("mysql_execute_command"); DBUG_ENTER("mysql_execute_command");
// check that we correctly marked first table for data insertion
DBUG_ASSERT(!(sql_command_flags[lex->sql_command] & CF_INSERTS_DATA) ||
first_table->for_insert_data);
if (thd->security_ctx->password_expired && if (thd->security_ctx->password_expired &&
lex->sql_command != SQLCOM_SET_OPTION) lex->sql_command != SQLCOM_SET_OPTION)
{ {
@ -6840,11 +6845,7 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv,
bool check_single_table_access(THD *thd, ulong privilege, bool check_single_table_access(THD *thd, ulong privilege,
TABLE_LIST *all_tables, bool no_errors) TABLE_LIST *all_tables, bool no_errors)
{ {
Security_context * backup_ctx= thd->security_ctx; Switch_to_definer_security_ctx backup_sctx(thd, all_tables);
/* we need to switch to the saved context (if any) */
if (all_tables->security_ctx)
thd->security_ctx= all_tables->security_ctx;
const char *db_name; const char *db_name;
if ((all_tables->view || all_tables->field_translation) && if ((all_tables->view || all_tables->field_translation) &&
@ -6857,20 +6858,15 @@ bool check_single_table_access(THD *thd, ulong privilege,
&all_tables->grant.privilege, &all_tables->grant.privilege,
&all_tables->grant.m_internal, &all_tables->grant.m_internal,
0, no_errors)) 0, no_errors))
goto deny; return 1;
/* Show only 1 table for check_grant */ /* Show only 1 table for check_grant */
if (!(all_tables->belong_to_view && if (!(all_tables->belong_to_view &&
(thd->lex->sql_command == SQLCOM_SHOW_FIELDS)) && (thd->lex->sql_command == SQLCOM_SHOW_FIELDS)) &&
check_grant(thd, privilege, all_tables, FALSE, 1, no_errors)) check_grant(thd, privilege, all_tables, FALSE, 1, no_errors))
goto deny;
thd->security_ctx= backup_ctx;
return 0;
deny:
thd->security_ctx= backup_ctx;
return 1; return 1;
return 0;
} }
/** /**
@ -7045,7 +7041,6 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
{ {
TABLE_LIST *org_tables= tables; TABLE_LIST *org_tables= tables;
TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table(); TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table();
Security_context *sctx= thd->security_ctx, *backup_ctx= thd->security_ctx;
uint i= 0; uint i= 0;
/* /*
The check that first_not_own_table is not reached is for the case when The check that first_not_own_table is not reached is for the case when
@ -7057,12 +7052,9 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
{ {
TABLE_LIST *const table_ref= tables->correspondent_table ? TABLE_LIST *const table_ref= tables->correspondent_table ?
tables->correspondent_table : tables; tables->correspondent_table : tables;
Switch_to_definer_security_ctx backup_ctx(thd, table_ref);
ulong want_access= requirements; ulong want_access= requirements;
if (table_ref->security_ctx)
sctx= table_ref->security_ctx;
else
sctx= backup_ctx;
/* /*
Register access for view underlying table. Register access for view underlying table.
@ -7073,7 +7065,7 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
if (table_ref->schema_table_reformed) if (table_ref->schema_table_reformed)
{ {
if (check_show_access(thd, table_ref)) if (check_show_access(thd, table_ref))
goto deny; return 1;
continue; continue;
} }
@ -7083,8 +7075,6 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
if (table_ref->is_anonymous_derived_table()) if (table_ref->is_anonymous_derived_table())
continue; continue;
thd->security_ctx= sctx;
if (table_ref->sequence) if (table_ref->sequence)
{ {
/* We want to have either SELECT or INSERT rights to sequences depending /* We want to have either SELECT or INSERT rights to sequences depending
@ -7098,15 +7088,11 @@ check_table_access(THD *thd, ulong requirements,TABLE_LIST *tables,
&table_ref->grant.privilege, &table_ref->grant.privilege,
&table_ref->grant.m_internal, &table_ref->grant.m_internal,
0, no_errors)) 0, no_errors))
goto deny; return 1;
} }
thd->security_ctx= backup_ctx;
return check_grant(thd,requirements,org_tables, return check_grant(thd,requirements,org_tables,
any_combination_of_privileges_will_do, any_combination_of_privileges_will_do,
number, no_errors); number, no_errors);
deny:
thd->security_ctx= backup_ctx;
return TRUE;
} }
@ -10401,3 +10387,14 @@ CHARSET_INFO *find_bin_collation(CHARSET_INFO *cs)
} }
return cs; return cs;
} }
void LEX::mark_first_table_as_inserting()
{
TABLE_LIST *t= first_select_lex()->table_list.first;
DBUG_ENTER("Query_tables_list::mark_tables_with_important_flags");
DBUG_ASSERT(sql_command_flags[sql_command] & CF_INSERTS_DATA);
t->for_insert_data= TRUE;
DBUG_PRINT("info", ("table_list: %p name: %s db: %s command: %u",
t, t->table_name.str,t->db.str, sql_command));
DBUG_VOID_RETURN;
}

View File

@ -3303,7 +3303,7 @@ void mysql_sql_stmt_execute(THD *thd)
/* Query text for binary, general or slow log, if any of them is open */ /* Query text for binary, general or slow log, if any of them is open */
String expanded_query; String expanded_query;
DBUG_ENTER("mysql_sql_stmt_execute"); DBUG_ENTER("mysql_sql_stmt_execute");
DBUG_PRINT("info", ("EXECUTE: %.*s\n", (int) name->length, name->str)); DBUG_PRINT("info", ("EXECUTE: %.*s", (int) name->length, name->str));
if (!(stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name))) if (!(stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
{ {
@ -3541,7 +3541,7 @@ void mysql_sql_stmt_close(THD *thd)
{ {
Prepared_statement* stmt; Prepared_statement* stmt;
const LEX_CSTRING *name= &thd->lex->prepared_stmt.name(); const LEX_CSTRING *name= &thd->lex->prepared_stmt.name();
DBUG_PRINT("info", ("DEALLOCATE PREPARE: %.*s\n", (int) name->length, DBUG_PRINT("info", ("DEALLOCATE PREPARE: %.*s", (int) name->length,
name->str)); name->str));
if (! (stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name))) if (! (stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))

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