Merge branch 'bb-10.4-release' into 10.4
This commit is contained in:
commit
583b72ad0d
@ -14,7 +14,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
|
||||
PROJECT(MySQL)
|
||||
|
||||
IF(POLICY CMP0022)
|
||||
CMAKE_POLICY(SET CMP0022 NEW)
|
||||
@ -41,8 +42,16 @@ IF(NOT DEFINED MANUFACTURER)
|
||||
MARK_AS_ADVANCED(MANUFACTURER)
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
||||
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel")
|
||||
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
# Setting build type to RelWithDebInfo as none was specified.")
|
||||
SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
|
||||
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel"
|
||||
FORCE)
|
||||
# Set the possible values of build type for cmake-gui
|
||||
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"None" "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# MAX_INDEXES - Set the maximum number of indexes per table, default 64
|
||||
SET(MAX_INDEXES 64 CACHE STRING "Max number of indexes")
|
||||
@ -68,18 +77,8 @@ IF(UNIX AND NOT APPLE)
|
||||
MARK_AS_ADVANCED(WITH_PIC)
|
||||
ENDIF()
|
||||
|
||||
# Optionally set project name, e.g.
|
||||
# foo.xcodeproj (mac) or foo.sln (windows)
|
||||
# This is used by TokuDB only
|
||||
SET(MYSQL_PROJECT_NAME_DOCSTRING "MySQL project name")
|
||||
IF(DEFINED MYSQL_PROJECT_NAME)
|
||||
SET(MYSQL_PROJECT_NAME ${MYSQL_PROJECT_NAME} CACHE STRING
|
||||
${MYSQL_PROJECT_NAME_DOCSTRING} FORCE)
|
||||
ELSE()
|
||||
SET(MYSQL_PROJECT_NAME "MySQL" CACHE STRING
|
||||
${MYSQL_PROJECT_NAME_DOCSTRING} FORCE)
|
||||
MARK_AS_ADVANCED(MYSQL_PROJECT_NAME)
|
||||
ENDIF()
|
||||
PROJECT(${MYSQL_PROJECT_NAME})
|
||||
|
||||
IF(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
|
@ -166,7 +166,7 @@ MACRO(MERGE_STATIC_LIBS TARGET OUTPUT_NAME LIBS_TO_MERGE)
|
||||
ENDFOREACH()
|
||||
IF(OSLIBS)
|
||||
LIST(REMOVE_DUPLICATES OSLIBS)
|
||||
TARGET_LINK_LIBRARIES(${TARGET} ${OSLIBS})
|
||||
TARGET_LINK_LIBRARIES(${TARGET} LINK_PRIVATE ${OSLIBS})
|
||||
ENDIF()
|
||||
|
||||
# Make the generated dummy source file depended on all static input
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d19c7c69269fdf4e2af8943dd86c12e4e1664afd
|
||||
Subproject commit 180c543704d627a50a52aaf60e24ca14e0ec4686
|
@ -451,9 +451,9 @@ IF(NOT DISABLE_SHARED)
|
||||
# Clean direct output flags, as 2 targets have the same base name
|
||||
# libmysqld
|
||||
SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
TARGET_LINK_LIBRARIES(libmysqld ${CRC32_LIBRARY})
|
||||
TARGET_LINK_LIBRARIES(libmysqld LINK_PRIVATE ${CRC32_LIBRARY})
|
||||
SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
TARGET_LINK_LIBRARIES(mysqlserver ${CRC32_LIBRARY})
|
||||
TARGET_LINK_LIBRARIES(mysqlserver LINK_PRIVATE ${CRC32_LIBRARY})
|
||||
IF(LIBMYSQLD_SO_EXTRA_LIBS)
|
||||
TARGET_LINK_LIBRARIES(libmysqld ${LIBMYSQLD_SO_EXTRA_LIBS})
|
||||
ENDIF()
|
||||
|
@ -141,3 +141,37 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
3 DERIVED t2 index NULL PRIMARY 4 NULL 3
|
||||
drop view v1;
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-23723: Crash when test_if_skip_sort_order() is checked for derived table subject to split
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, KEY (a), KEY (a,b)) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (c INT, KEY (c)) ENGINE=InnoDB;
|
||||
SELECT * FROM t1 t1a JOIN t1 t1b;
|
||||
a b a b
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
INSERT INTO t1 VALUES (1,2),(3,4),(5,6),(7,8),(9,10),(11,12);
|
||||
set statement optimizer_switch='split_materialized=off' for EXPLAIN
|
||||
SELECT *
|
||||
FROM
|
||||
t1 JOIN
|
||||
(SELECT t1.a, t1.b FROM t1, t2 WHERE t1.b = t2.c GROUP BY t1.a, t1.b) as dt
|
||||
WHERE
|
||||
t1.a = dt.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 index a,a_2 a_2 10 NULL 6 Using where; Using index
|
||||
1 PRIMARY <derived3> ref key0 key0 5 test.t1.a 2
|
||||
3 DERIVED t1 index NULL a_2 10 NULL 6 Using where; Using index
|
||||
3 DERIVED t2 ref c c 5 test.t1.b 1 Using index
|
||||
set statement optimizer_switch='split_materialized=on' for EXPLAIN
|
||||
SELECT *
|
||||
FROM
|
||||
t1 JOIN
|
||||
(SELECT t1.a, t1.b FROM t1, t2 WHERE t1.b = t2.c GROUP BY t1.a, t1.b) as dt
|
||||
WHERE
|
||||
t1.a = dt.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 index a,a_2 a_2 10 NULL 6 Using where; Using index
|
||||
1 PRIMARY <derived3> ref key0 key0 5 test.t1.a 2
|
||||
3 LATERAL DERIVED t1 ref a,a_2 a 5 test.t1.a 1 Using where; Using temporary; Using filesort
|
||||
3 LATERAL DERIVED t2 ref c c 5 test.t1.b 1 Using index
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -124,3 +124,29 @@ eval set statement optimizer_switch='split_materialized=off' for explain $q;
|
||||
drop view v1;
|
||||
|
||||
drop table t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23723: Crash when test_if_skip_sort_order() is checked for derived table subject to split
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT, b INT, KEY (a), KEY (a,b)) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (c INT, KEY (c)) ENGINE=InnoDB;
|
||||
|
||||
SELECT * FROM t1 t1a JOIN t1 t1b;
|
||||
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
INSERT INTO t1 VALUES (1,2),(3,4),(5,6),(7,8),(9,10),(11,12);
|
||||
|
||||
let $query=
|
||||
EXPLAIN
|
||||
SELECT *
|
||||
FROM
|
||||
t1 JOIN
|
||||
(SELECT t1.a, t1.b FROM t1, t2 WHERE t1.b = t2.c GROUP BY t1.a, t1.b) as dt
|
||||
WHERE
|
||||
t1.a = dt.a;
|
||||
|
||||
eval set statement optimizer_switch='split_materialized=off' for $query;
|
||||
eval set statement optimizer_switch='split_materialized=on' for $query;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
drop table if exists t0,t5,t6,t7,t8,t9;
|
||||
drop database if exists mysqltest;
|
||||
drop view if exists v0, v1, v2, v3, v4;
|
||||
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
|
||||
create table t4 (id int primary key, Word varchar(40) not null);
|
||||
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
|
||||
@ -79,13 +75,21 @@ ERROR 42000: Not unique table/alias: 'C'
|
||||
select C.a, c.a from t1 c, t2 C;
|
||||
ERROR 42000: Not unique table/alias: 'C'
|
||||
drop table t1, t2;
|
||||
#
|
||||
# Bug #9761: CREATE TABLE ... LIKE ... not handled correctly when lower_case_table_names is set
|
||||
#
|
||||
create table t1 (a int);
|
||||
create table t2 like T1;
|
||||
drop table t1, t2;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
#
|
||||
# End of 4.1 tests
|
||||
#
|
||||
#
|
||||
# Bug#20404: SHOW CREATE TABLE fails with Turkish I
|
||||
#
|
||||
set names utf8;
|
||||
drop table if exists İ,İİ;
|
||||
create table İ (s1 int);
|
||||
show create table İ;
|
||||
Table Create Table
|
||||
@ -107,7 +111,12 @@ Tables_in_test
|
||||
ii
|
||||
drop table İİ;
|
||||
set names latin1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
#
|
||||
# Bug#21317: SHOW CREATE DATABASE does not obey to lower_case_table_names
|
||||
#
|
||||
create database mysql_TEST character set latin2;
|
||||
create table mysql_TEST.T1 (a int);
|
||||
show create database mysql_TEST;
|
||||
@ -126,8 +135,32 @@ show databases like "mysql_TE%";
|
||||
Database (mysql_TE%)
|
||||
mysql_test
|
||||
drop database mysql_TEST;
|
||||
End of 10.0 tests
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
# MDEV-17148 DROP DATABASE throw "Directory not empty" after changed lower_case_table_names.
|
||||
#
|
||||
create database db1;
|
||||
create table t1 (a int);
|
||||
drop database db1;
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-25109 Server crashes in sp_name::sp_name upon invalid data in mysql.proc
|
||||
#
|
||||
call mtr.add_suppression("Stored routine ''.'': invalid value in column");
|
||||
insert ignore into mysql.proc () values ();
|
||||
Warnings:
|
||||
Warning 1364 Field 'param_list' doesn't have a default value
|
||||
Warning 1364 Field 'returns' doesn't have a default value
|
||||
Warning 1364 Field 'body' doesn't have a default value
|
||||
Warning 1364 Field 'comment' doesn't have a default value
|
||||
show function status;
|
||||
ERROR 42000: Incorrect routine name ''
|
||||
delete from mysql.proc where name = '';
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
@ -2,14 +2,6 @@
|
||||
# Test of --lower-case-table-names
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
# Clear up from other tests (to ensure that SHOW TABLES below is right)
|
||||
drop table if exists t0,t5,t6,t7,t8,t9;
|
||||
drop database if exists mysqltest;
|
||||
drop view if exists v0, v1, v2, v3, v4;
|
||||
--enable_warnings
|
||||
|
||||
create table T1 (id int primary key, Word varchar(40) not null, Index(Word));
|
||||
create table t4 (id int primary key, Word varchar(40) not null);
|
||||
INSERT INTO T1 VALUES (1, 'a'), (2, 'b'), (3, 'c');
|
||||
@ -68,32 +60,29 @@ drop table t1,t2;
|
||||
#
|
||||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
-- error 1066
|
||||
--error ER_NONUNIQ_TABLE
|
||||
select * from t1 c, t2 C;
|
||||
-- error 1066
|
||||
--error ER_NONUNIQ_TABLE
|
||||
select C.a, c.a from t1 c, t2 C;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #9761: CREATE TABLE ... LIKE ... not handled correctly when
|
||||
# lower_case_table_names is set
|
||||
--echo #
|
||||
--echo # Bug #9761: CREATE TABLE ... LIKE ... not handled correctly when lower_case_table_names is set
|
||||
--echo #
|
||||
|
||||
create table t1 (a int);
|
||||
create table t2 like T1;
|
||||
drop table t1, t2;
|
||||
|
||||
show tables;
|
||||
--echo #
|
||||
--echo # End of 4.1 tests
|
||||
--echo #
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
|
||||
#
|
||||
# Bug#20404: SHOW CREATE TABLE fails with Turkish I
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug#20404: SHOW CREATE TABLE fails with Turkish I
|
||||
--echo #
|
||||
set names utf8;
|
||||
--disable_warnings
|
||||
drop table if exists İ,İİ;
|
||||
--enable_warnings
|
||||
create table İ (s1 int);
|
||||
show create table İ;
|
||||
show tables;
|
||||
@ -104,11 +93,13 @@ show tables;
|
||||
drop table İİ;
|
||||
set names latin1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
--echo #
|
||||
--echo # End of 5.0 tests
|
||||
--echo #
|
||||
|
||||
#
|
||||
# Bug#21317: SHOW CREATE DATABASE does not obey to lower_case_table_names
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug#21317: SHOW CREATE DATABASE does not obey to lower_case_table_names
|
||||
--echo #
|
||||
create database mysql_TEST character set latin2;
|
||||
create table mysql_TEST.T1 (a int);
|
||||
show create database mysql_TEST;
|
||||
@ -117,11 +108,13 @@ show databases like "mysql%";
|
||||
show databases like "mysql_TE%";
|
||||
drop database mysql_TEST;
|
||||
|
||||
--echo End of 10.0 tests
|
||||
--echo #
|
||||
--echo # End of 10.0 tests
|
||||
--echo #
|
||||
|
||||
#
|
||||
# MDEV-17148 DROP DATABASE throw "Directory not empty" after changed lower_case_table_names.
|
||||
#
|
||||
--echo #
|
||||
--echo # MDEV-17148 DROP DATABASE throw "Directory not empty" after changed lower_case_table_names.
|
||||
--echo #
|
||||
|
||||
let $datadir=`select @@datadir`;
|
||||
create database db1;
|
||||
@ -130,3 +123,19 @@ copy_file $datadir/test/t1.frm $datadir/db1/T1.frm;
|
||||
drop database db1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25109 Server crashes in sp_name::sp_name upon invalid data in mysql.proc
|
||||
--echo #
|
||||
call mtr.add_suppression("Stored routine ''.'': invalid value in column");
|
||||
insert ignore into mysql.proc () values ();
|
||||
--error ER_SP_WRONG_NAME
|
||||
show function status;
|
||||
delete from mysql.proc where name = '';
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
15
mysql-test/main/mdev19198.result
Normal file
15
mysql-test/main/mdev19198.result
Normal file
@ -0,0 +1,15 @@
|
||||
CREATE TABLE t1 (c INT);
|
||||
CREATE TABLE t2 (c INT);
|
||||
LOCK TABLES t1 WRITE, t2 READ;
|
||||
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
UNLOCK TABLES;
|
||||
LOCK TABLES t1 READ , t2 READ;
|
||||
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
|
||||
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||
UNLOCK TABLES;
|
||||
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
DROP TABLES t1,t2;
|
15
mysql-test/main/mdev19198.test
Normal file
15
mysql-test/main/mdev19198.test
Normal file
@ -0,0 +1,15 @@
|
||||
CREATE TABLE t1 (c INT);
|
||||
CREATE TABLE t2 (c INT);
|
||||
|
||||
LOCK TABLES t1 WRITE, t2 READ;
|
||||
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
|
||||
UNLOCK TABLES;
|
||||
|
||||
LOCK TABLES t1 READ , t2 READ;
|
||||
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
|
||||
UNLOCK TABLES;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS t1 LIKE t2;
|
||||
|
||||
DROP TABLES t1,t2;
|
@ -30,3 +30,38 @@ disconnect con2;
|
||||
USE test;
|
||||
DROP PROCEDURE p_install;
|
||||
DROP PROCEDURE p_show_vars;
|
||||
#
|
||||
# Bug#29363867: LOST CONNECTION TO MYSQL SERVER DURING QUERY
|
||||
#
|
||||
## prepared SET with a plugin variable prevents uninstall
|
||||
install plugin query_response_time soname 'query_response_time';
|
||||
prepare s from 'set global query_response_time_range_base=16';
|
||||
select plugin_status from information_schema.plugins where plugin_name='query_response_time';
|
||||
plugin_status
|
||||
ACTIVE
|
||||
uninstall plugin query_response_time;
|
||||
Warnings:
|
||||
Warning 1620 Plugin is busy and will be uninstalled on shutdown
|
||||
execute s;
|
||||
execute s;
|
||||
select plugin_status from information_schema.plugins where plugin_name='query_response_time';
|
||||
plugin_status
|
||||
DELETED
|
||||
deallocate prepare s;
|
||||
select plugin_status from information_schema.plugins where plugin_name='query_response_time';
|
||||
plugin_status
|
||||
## prepared SET mentioning a plugin otherwise does not prevent uninstall
|
||||
install plugin archive soname 'ha_archive';
|
||||
create table t1 (a int) engine=archive;
|
||||
insert t1 values (1),(2),(3);
|
||||
prepare s from 'set session auto_increment_increment=(select count(*) from t1)';
|
||||
flush tables;
|
||||
select plugin_status from information_schema.plugins where plugin_name='archive';
|
||||
plugin_status
|
||||
ACTIVE
|
||||
uninstall plugin archive;
|
||||
select plugin_status from information_schema.plugins where plugin_name='archive';
|
||||
plugin_status
|
||||
execute s;
|
||||
ERROR 42000: Unknown storage engine 'ARCHIVE'
|
||||
drop table t1;
|
||||
|
@ -1,3 +1,10 @@
|
||||
if (!$QUERY_RESPONSE_TIME_SO) {
|
||||
skip Needs query_response_time loadable plugin;
|
||||
}
|
||||
if (!$HA_ARCHIVE_SO) {
|
||||
skip Needs Archive loadable plugin;
|
||||
}
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-5345 - Deadlock between mysql_change_user(), SHOW VARIABLES and
|
||||
--echo # INSTALL PLUGIN
|
||||
@ -54,3 +61,31 @@ disconnect con2;
|
||||
USE test;
|
||||
DROP PROCEDURE p_install;
|
||||
DROP PROCEDURE p_show_vars;
|
||||
|
||||
--echo #
|
||||
--echo # Bug#29363867: LOST CONNECTION TO MYSQL SERVER DURING QUERY
|
||||
--echo #
|
||||
|
||||
--echo ## prepared SET with a plugin variable prevents uninstall
|
||||
install plugin query_response_time soname 'query_response_time';
|
||||
prepare s from 'set global query_response_time_range_base=16';
|
||||
select plugin_status from information_schema.plugins where plugin_name='query_response_time';
|
||||
uninstall plugin query_response_time;
|
||||
execute s;
|
||||
execute s;
|
||||
select plugin_status from information_schema.plugins where plugin_name='query_response_time';
|
||||
deallocate prepare s;
|
||||
select plugin_status from information_schema.plugins where plugin_name='query_response_time';
|
||||
|
||||
--echo ## prepared SET mentioning a plugin otherwise does not prevent uninstall
|
||||
install plugin archive soname 'ha_archive';
|
||||
create table t1 (a int) engine=archive;
|
||||
insert t1 values (1),(2),(3);
|
||||
prepare s from 'set session auto_increment_increment=(select count(*) from t1)';
|
||||
flush tables;
|
||||
select plugin_status from information_schema.plugins where plugin_name='archive';
|
||||
uninstall plugin archive;
|
||||
select plugin_status from information_schema.plugins where plugin_name='archive';
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
execute s;
|
||||
drop table t1;
|
||||
|
@ -1,3 +1,8 @@
|
||||
#
|
||||
# MDEV-9538 Server crashes in check_show_access on SHOW STATISTICS
|
||||
# MDEV-9539 Server crashes in make_columns_old_format on SHOW GEOMETRY_COLUMNS
|
||||
# MDEV-9540 SHOW SPATIAL_REF_SYS and SHOW SYSTEM_VARIABLES return empty results with numerous warnings
|
||||
#
|
||||
show statistics;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'statistics' at line 1
|
||||
show spatial_ref_sys
|
||||
@ -10,3 +15,30 @@ show geometry_columns;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'geometry_columns' at line 1
|
||||
show nonexistent;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'nonexistent' at line 1
|
||||
#
|
||||
# MDEV-21603 Crashing SHOW TABLES with derived table in WHERE condition
|
||||
#
|
||||
create table t1 (nm varchar(32), a int);
|
||||
insert t1 values ('1',1),('2',2),('3',3);
|
||||
show tables
|
||||
where tables_in_test in (select *
|
||||
from (select nm from test.t1 group by nm) dt);
|
||||
Tables_in_test
|
||||
show fields from test.t1
|
||||
where field in (select * from (select nm from test.t1 group by nm) dt);
|
||||
Field Type Null Key Default Extra
|
||||
insert t1 values ('nm',0);
|
||||
show fields from test.t1
|
||||
where field in (select * from (select nm from test.t1 group by nm) dt);
|
||||
Field Type Null Key Default Extra
|
||||
nm varchar(32) YES NULL
|
||||
show fields from test.t1 where field in
|
||||
(select * from (select column_name from information_schema.columns
|
||||
where table_name='t1' group by column_name) dt);
|
||||
Field Type Null Key Default Extra
|
||||
nm varchar(32) YES NULL
|
||||
a int(11) YES NULL
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# MDEV-9538 Server crashes in check_show_access on SHOW STATISTICS
|
||||
# MDEV-9539 Server crashes in make_columns_old_format on SHOW GEOMETRY_COLUMNS
|
||||
# MDEV-9540 SHOW SPATIAL_REF_SYS and SHOW SYSTEM_VARIABLES return empty results with numerous warnings
|
||||
#
|
||||
--echo #
|
||||
--echo # MDEV-9538 Server crashes in check_show_access on SHOW STATISTICS
|
||||
--echo # MDEV-9539 Server crashes in make_columns_old_format on SHOW GEOMETRY_COLUMNS
|
||||
--echo # MDEV-9540 SHOW SPATIAL_REF_SYS and SHOW SYSTEM_VARIABLES return empty results with numerous warnings
|
||||
--echo #
|
||||
--error ER_PARSE_ERROR
|
||||
show statistics;
|
||||
--error ER_PARSE_ERROR
|
||||
@ -13,3 +13,27 @@ show system_variables;
|
||||
show geometry_columns;
|
||||
--error ER_PARSE_ERROR
|
||||
show nonexistent;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-21603 Crashing SHOW TABLES with derived table in WHERE condition
|
||||
--echo #
|
||||
create table t1 (nm varchar(32), a int);
|
||||
insert t1 values ('1',1),('2',2),('3',3);
|
||||
|
||||
show tables
|
||||
where tables_in_test in (select *
|
||||
from (select nm from test.t1 group by nm) dt);
|
||||
show fields from test.t1
|
||||
where field in (select * from (select nm from test.t1 group by nm) dt);
|
||||
insert t1 values ('nm',0);
|
||||
show fields from test.t1
|
||||
where field in (select * from (select nm from test.t1 group by nm) dt);
|
||||
|
||||
show fields from test.t1 where field in
|
||||
(select * from (select column_name from information_schema.columns
|
||||
where table_name='t1' group by column_name) dt);
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
1
mysql-test/main/show_explain.opt
Normal file
1
mysql-test/main/show_explain.opt
Normal file
@ -0,0 +1 @@
|
||||
--enable-plugin-innodb-lock-waits --enable-plugin-innodb-trx
|
@ -863,7 +863,14 @@ select * from t1 where pk between 10 and 20 for update;
|
||||
# run SHOW EXPLAIN on a frozen thread
|
||||
connection default;
|
||||
let $save_wait_condition= $wait_condition;
|
||||
let $wait_condition= select State='Sending data' from information_schema.processlist where id=$thr2;
|
||||
let $wait_condition=
|
||||
select 1
|
||||
from information_schema.INNODB_LOCK_WAITS
|
||||
where
|
||||
requesting_trx_id=(select trx_id
|
||||
from information_schema.INNODB_TRX
|
||||
where trx_mysql_thread_id=$thr2);
|
||||
|
||||
let $thr_default=`select connection_id()`;
|
||||
--source include/wait_condition.inc
|
||||
--echo # do: send_eval show explain for thr2;
|
||||
|
@ -116,7 +116,9 @@ Warnings:
|
||||
Note 1050 Table 't2' already exists
|
||||
DROP DATABASE testdb;
|
||||
USE test;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
#
|
||||
# BUG#13489996 valgrind:conditional jump or move depends on
|
||||
# uninitialised values-field_blob
|
||||
@ -328,3 +330,26 @@ FOR i IN 1..10 DO
|
||||
RETURN 1;
|
||||
END FOR
|
||||
DROP FUNCTION f1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-25501 routine_definition in information_schema.routines loses tablename if it starts with an _ and is not backticked
|
||||
#
|
||||
create table _t1 (a int);
|
||||
create procedure p1() select * from _t1;
|
||||
show create procedure p1;
|
||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
|
||||
select * from _t1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||
select routine_definition from information_schema.routines where routine_schema=database() and specific_name='p1';
|
||||
routine_definition
|
||||
select * from _t1
|
||||
select body, body_utf8 from mysql.proc where name='p1';
|
||||
body body_utf8
|
||||
select * from _t1 select * from _t1
|
||||
drop procedure p1;
|
||||
drop table _t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
@ -143,7 +143,9 @@ CALL p1();
|
||||
DROP DATABASE testdb;
|
||||
USE test;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # BUG#13489996 valgrind:conditional jump or move depends on
|
||||
@ -350,3 +352,22 @@ DELIMITER ;$$
|
||||
SELECT f1();
|
||||
SELECT body FROM mysql.proc WHERE db='test' AND specific_name='f1';
|
||||
DROP FUNCTION f1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25501 routine_definition in information_schema.routines loses tablename if it starts with an _ and is not backticked
|
||||
--echo #
|
||||
create table _t1 (a int);
|
||||
create procedure p1() select * from _t1;
|
||||
show create procedure p1;
|
||||
select routine_definition from information_schema.routines where routine_schema=database() and specific_name='p1';
|
||||
select body, body_utf8 from mysql.proc where name='p1';
|
||||
drop procedure p1;
|
||||
drop table _t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
@ -8468,6 +8468,21 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
|
||||
DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#30366310: USING A FUNCTION TO ASSIGN DEFAULT VALUES TO
|
||||
# 2 OR MORE VARIABLES CRASHES SERVER
|
||||
#
|
||||
create function f1() returns bigint return now()-1|
|
||||
create procedure p1()
|
||||
begin
|
||||
declare b, c bigint default f1();
|
||||
select b-c;
|
||||
end|
|
||||
call p1()|
|
||||
b-c
|
||||
0
|
||||
drop procedure p1|
|
||||
drop function f1|
|
||||
#End of 10.2 tests
|
||||
#
|
||||
# MDEV-12007 Allow ROW variables as a cursor FETCH target
|
||||
|
@ -10013,6 +10013,25 @@ DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # BUG#30366310: USING A FUNCTION TO ASSIGN DEFAULT VALUES TO
|
||||
--echo # 2 OR MORE VARIABLES CRASHES SERVER
|
||||
--echo #
|
||||
|
||||
delimiter |;
|
||||
create function f1() returns bigint return now()-1|
|
||||
create procedure p1()
|
||||
begin
|
||||
declare b, c bigint default f1();
|
||||
select b-c;
|
||||
end|
|
||||
call p1()|
|
||||
drop procedure p1|
|
||||
drop function f1|
|
||||
delimiter ;|
|
||||
|
||||
|
||||
--echo #End of 10.2 tests
|
||||
|
||||
--echo #
|
||||
|
@ -492,8 +492,17 @@ select * from mysql.plugin WHERE name='unexisting_udf';
|
||||
name dl
|
||||
DROP FUNCTION unexisting_udf;
|
||||
ERROR 42000: FUNCTION test.unexisting_udf does not exist
|
||||
#
|
||||
# Bug #31674599: THE UDF_INIT() FUNCTION CAUSE SERVER CRASH
|
||||
#
|
||||
call mtr.add_suppression('Invalid row in mysql.func table');
|
||||
insert mysql.func () values ();
|
||||
# restart
|
||||
delete from mysql.func where name = '';
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-15073: Generic UDAF parser code in server for window functions
|
||||
#
|
||||
CREATE AGGREGATE FUNCTION avgcost
|
||||
|
@ -562,7 +562,17 @@ select * from mysql.plugin WHERE name='unexisting_udf';
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
DROP FUNCTION unexisting_udf;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #31674599: THE UDF_INIT() FUNCTION CAUSE SERVER CRASH
|
||||
--echo #
|
||||
call mtr.add_suppression('Invalid row in mysql.func table');
|
||||
insert mysql.func () values ();
|
||||
source include/restart_mysqld.inc;
|
||||
delete from mysql.func where name = '';
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15073: Generic UDAF parser code in server for window functions
|
||||
|
@ -7125,7 +7125,7 @@ CALL sp1();
|
||||
x y z
|
||||
000 000 000
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'z' at row 1
|
||||
Warning 1264 Out of range value for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7163,7 +7163,7 @@ CALL sp1();
|
||||
x y z
|
||||
00000 00000 00000
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'z' at row 1
|
||||
Warning 1264 Out of range value for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7201,7 +7201,7 @@ CALL sp1();
|
||||
x y z
|
||||
00000000 00000000 00000000
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'z' at row 1
|
||||
Warning 1264 Out of range value for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7239,7 +7239,7 @@ CALL sp1();
|
||||
x y z
|
||||
0000000000 0000000000 0000000000
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'z' at row 1
|
||||
Warning 1264 Out of range value for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7277,7 +7277,7 @@ CALL sp1();
|
||||
x y z
|
||||
00000000000000000000 00000000000000000000 00000000000000000000
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'z' at row 1
|
||||
Warning 1264 Out of range value for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7297,7 +7297,7 @@ CALL sp1();
|
||||
x y z
|
||||
-9999999999 -9999999999 -9999999999
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'z' at row 1
|
||||
Warning 1264 Out of range value for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7308,7 +7308,7 @@ CALL sp1();
|
||||
x y z
|
||||
0 0 0
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'z' at row 1
|
||||
Note 1265 Data truncated for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7319,7 +7319,7 @@ CALL sp1();
|
||||
x y z
|
||||
0000000000 0000000000 0000000000
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'z' at row 1
|
||||
Warning 1264 Out of range value for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7330,7 +7330,7 @@ CALL sp1();
|
||||
x y z
|
||||
0000000000 0000000000 0000000000
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'z' at row 1
|
||||
Note 1265 Data truncated for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7341,7 +7341,7 @@ CALL sp1();
|
||||
x y z
|
||||
0 0 0
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'z' at row 1
|
||||
Note 1265 Data truncated for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7352,7 +7352,7 @@ CALL sp1();
|
||||
x y z
|
||||
0 0 0
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'z' at row 1
|
||||
Note 1265 Data truncated for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7363,7 +7363,7 @@ CALL sp1();
|
||||
x y z
|
||||
0000000000 0000000000 0000000000
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'z' at row 1
|
||||
Note 1265 Data truncated for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@ -7374,7 +7374,7 @@ CALL sp1();
|
||||
x y z
|
||||
0000000000 0000000000 0000000000
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'z' at row 1
|
||||
Note 1265 Data truncated for column 'x' at row 1
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
|
22
mysql-test/suite/galera/r/galera_inject_bf_long_wait.result
Normal file
22
mysql-test/suite/galera/r/galera_inject_bf_long_wait.result
Normal file
@ -0,0 +1,22 @@
|
||||
CREATE TABLE t1(id int not null primary key, b int) engine=InnoDB;
|
||||
INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3);
|
||||
BEGIN;
|
||||
UPDATE t1 set b = 100 where id between 1 and 2;;
|
||||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1b;
|
||||
SET @save_dbug = @@SESSION.debug_dbug;
|
||||
SET @@SESSION.innodb_lock_wait_timeout=2;
|
||||
SET @@SESSION.debug_dbug = '+d,wsrep_instrument_BF_lock_wait';
|
||||
UPDATE t1 set b = 200 WHERE id = 1;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SET @@SESSION.debug_dbug = @save_dbug;
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
id b
|
||||
0 0
|
||||
1 100
|
||||
2 100
|
||||
3 3
|
||||
disconnect node_1b;
|
||||
DROP TABLE t1;
|
24
mysql-test/suite/galera/r/galera_password.result
Normal file
24
mysql-test/suite/galera/r/galera_password.result
Normal file
@ -0,0 +1,24 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SHOW VARIABLES LIKE '%password%';
|
||||
Variable_name Value
|
||||
default_password_lifetime 0
|
||||
disconnect_on_expired_password OFF
|
||||
max_password_errors 4294967295
|
||||
old_passwords OFF
|
||||
report_password
|
||||
strict_password_validation ON
|
||||
CREATE USER 'user123456'@'localhost';
|
||||
GRANT SELECT, INSERT, UPDATE ON test.* TO 'user123456'@'localhost';
|
||||
SET PASSWORD FOR 'user123456'@'localhost' = PASSWORD('A$10abcdDCBA123456%7');
|
||||
SHOW GRANTS FOR 'user123456'@'localhost';
|
||||
Grants for user123456@localhost
|
||||
GRANT USAGE ON *.* TO `user123456`@`localhost` IDENTIFIED BY PASSWORD '*5846CF4D641598B360B3562E581586155C59F65A'
|
||||
GRANT SELECT, INSERT, UPDATE ON `test`.* TO `user123456`@`localhost`
|
||||
connection node_2;
|
||||
SHOW GRANTS FOR 'user123456'@'localhost';
|
||||
Grants for user123456@localhost
|
||||
GRANT USAGE ON *.* TO `user123456`@`localhost` IDENTIFIED BY PASSWORD '*5846CF4D641598B360B3562E581586155C59F65A'
|
||||
GRANT SELECT, INSERT, UPDATE ON `test`.* TO `user123456`@`localhost`
|
||||
connection node_1;
|
||||
DROP USER 'user123456'@'localhost';
|
@ -1,8 +1,8 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_4
|
||||
4
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
@ -52,23 +52,23 @@ SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
EXPECT_19
|
||||
19
|
||||
connection node_2;
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_4
|
||||
4
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
EXPECT_19
|
||||
19
|
||||
connection node_3;
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_4
|
||||
4
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
EXPECT_19
|
||||
19
|
||||
connection node_4;
|
||||
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 4
|
||||
1
|
||||
SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
EXPECT_4
|
||||
4
|
||||
SELECT COUNT(*) AS EXPECT_19 FROM t1;
|
||||
EXPECT_19
|
||||
19
|
||||
|
25
mysql-test/suite/galera/t/galera_inject_bf_long_wait.test
Normal file
25
mysql-test/suite/galera/t/galera_inject_bf_long_wait.test
Normal file
@ -0,0 +1,25 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
CREATE TABLE t1(id int not null primary key, b int) engine=InnoDB;
|
||||
INSERT INTO t1 VALUES (0,0),(1,1),(2,2),(3,3);
|
||||
|
||||
BEGIN;
|
||||
--send UPDATE t1 set b = 100 where id between 1 and 2;
|
||||
|
||||
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connection node_1b
|
||||
SET @save_dbug = @@SESSION.debug_dbug;
|
||||
SET @@SESSION.innodb_lock_wait_timeout=2;
|
||||
SET @@SESSION.debug_dbug = '+d,wsrep_instrument_BF_lock_wait';
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
UPDATE t1 set b = 200 WHERE id = 1;
|
||||
SET @@SESSION.debug_dbug = @save_dbug;
|
||||
|
||||
--connection node_1
|
||||
--reap
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
--disconnect node_1b
|
||||
DROP TABLE t1;
|
14
mysql-test/suite/galera/t/galera_password.test
Normal file
14
mysql-test/suite/galera/t/galera_password.test
Normal file
@ -0,0 +1,14 @@
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
SHOW VARIABLES LIKE '%password%';
|
||||
|
||||
CREATE USER 'user123456'@'localhost';
|
||||
GRANT SELECT, INSERT, UPDATE ON test.* TO 'user123456'@'localhost';
|
||||
SET PASSWORD FOR 'user123456'@'localhost' = PASSWORD('A$10abcdDCBA123456%7');
|
||||
SHOW GRANTS FOR 'user123456'@'localhost';
|
||||
|
||||
--connection node_2
|
||||
SHOW GRANTS FOR 'user123456'@'localhost';
|
||||
|
||||
--connection node_1
|
||||
DROP USER 'user123456'@'localhost';
|
@ -809,4 +809,12 @@ eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/load.data' REPLACE INTO TABLE t1 (p
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/load.data
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # MDEV-19011 Assertion `file->s->base.reclength < file->s->vreclength'
|
||||
--echo # failed in ha_myisam::setup_vcols_for_repair
|
||||
CREATE TABLE t1 (a INT GENERATED ALWAYS AS (1) VIRTUAL) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 ADD KEY (a);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
}
|
||||
|
@ -671,3 +671,77 @@ PRIMARY KEY (number)
|
||||
REPLACE t2(number) VALUES('1');
|
||||
REPLACE t2(number) VALUES('1');
|
||||
DROP TABLE t2;
|
||||
# MDEV-24583 SELECT aborts after failed REPLACE into table with vcol
|
||||
CREATE TABLE t1 (pk INT, a VARCHAR(3), v VARCHAR(3) AS (CONCAT('x-',a)),
|
||||
PRIMARY KEY(pk)) ENGINE=MyISAM;
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
INSERT INTO t1 (pk, a) VALUES (1,'foo');
|
||||
SET sql_mode=CONCAT(@@sql_mode,',STRICT_ALL_TABLES');
|
||||
REPLACE INTO t1 (pk,a) VALUES (1,'qux');
|
||||
SELECT * FROM v1;
|
||||
pk a v
|
||||
1 foo x-f
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
pk INT,
|
||||
a VARCHAR(1),
|
||||
v VARCHAR(1) AS (CONCAT('virt-',a)) VIRTUAL,
|
||||
PRIMARY KEY (pk)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (pk,a) VALUES
|
||||
(1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e'),(6,'f');
|
||||
REPLACE INTO t1 (pk) VALUES (1);
|
||||
ERROR 22001: Data too long for column 'v' at row 1
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
pk a v
|
||||
1 a v
|
||||
2 b v
|
||||
3 c v
|
||||
4 d v
|
||||
5 e v
|
||||
6 f v
|
||||
SET SQL_MODE=DEFAULT;
|
||||
DROP TABLE t1;
|
||||
# (duplicate) MDEV-24656
|
||||
# [FATAL] InnoDB: Data field type 0, len 0, ASAN heap-buffer-overflow
|
||||
# upon LOAD DATA with virtual columns
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY, a VARCHAR(2333),
|
||||
va VARCHAR(171) AS (a)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (id,a) VALUES (1,REPEAT('x',200));
|
||||
SELECT id, va INTO OUTFILE 'load_t1' FROM t1;
|
||||
LOAD DATA INFILE 'load_t1' REPLACE INTO TABLE t1 (id,va);
|
||||
ERROR 22001: Data too long for column 'va' at row 1
|
||||
SELECT * FROM t1;
|
||||
id a va
|
||||
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
LOAD DATA INFILE 'load_t1' IGNORE INTO TABLE t1 (id,va);
|
||||
Warnings:
|
||||
Warning 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (id BIGINT PRIMARY KEY, a VARCHAR(2333),
|
||||
va VARCHAR(171) AS (a)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (id,a) VALUES (1,REPEAT('x',200));
|
||||
SELECT id, va INTO OUTFILE 'load_t1' FROM t1;
|
||||
LOAD DATA INFILE 'load_t1' REPLACE INTO TABLE t1 (id,va);
|
||||
ERROR 22001: Data too long for column 'va' at row 1
|
||||
SELECT * FROM t1;
|
||||
id a va
|
||||
1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
LOAD DATA INFILE 'load_t1' IGNORE INTO TABLE t1 (id,va);
|
||||
Warnings:
|
||||
Warning 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
# (duplicate) MDEV-24665
|
||||
# ASAN errors, assertion failures, corrupt values after failed
|
||||
# LOAD DATA into table with virtual/stored column
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY,
|
||||
ts TIMESTAMP DEFAULT '1971-01-01 00:00:00',
|
||||
c VARBINARY(8) DEFAULT '', vc VARCHAR(3) AS (c) STORED);
|
||||
INSERT IGNORE INTO t1 (id,c) VALUES (1,'foobar');
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'vc' at row 1
|
||||
SELECT id, ts, vc INTO OUTFILE 'load_t1' FROM t1;
|
||||
LOAD DATA INFILE 'load_t1' REPLACE INTO TABLE t1 (id, ts, vc);
|
||||
INSERT IGNORE INTO t1 (id) VALUES (2);
|
||||
DROP TABLE t1;
|
||||
|
@ -883,6 +883,11 @@ Warning 1264 Out of range value for column 'vi' at row 1
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/load.data' REPLACE INTO TABLE t1 (pk,i,ts);
|
||||
ERROR 22003: Out of range value for column 'vi' at row 1
|
||||
DROP TABLE t1;
|
||||
# MDEV-19011 Assertion `file->s->base.reclength < file->s->vreclength'
|
||||
# failed in ha_myisam::setup_vcols_for_repair
|
||||
CREATE TABLE t1 (a INT GENERATED ALWAYS AS (1) VIRTUAL) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 ADD KEY (a);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#21365158 WL8149:ASSERTION `!TABLE || (!TABLE->WRITE_SET
|
||||
#
|
||||
|
@ -883,6 +883,11 @@ Warning 1264 Out of range value for column 'vi' at row 1
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/load.data' REPLACE INTO TABLE t1 (pk,i,ts);
|
||||
ERROR 22003: Out of range value for column 'vi' at row 1
|
||||
DROP TABLE t1;
|
||||
# MDEV-19011 Assertion `file->s->base.reclength < file->s->vreclength'
|
||||
# failed in ha_myisam::setup_vcols_for_repair
|
||||
CREATE TABLE t1 (a INT GENERATED ALWAYS AS (1) VIRTUAL) ENGINE=MyISAM;
|
||||
ALTER TABLE t1 ADD KEY (a);
|
||||
DROP TABLE t1;
|
||||
DROP VIEW IF EXISTS v1,v2;
|
||||
DROP TABLE IF EXISTS t1,t2,t3;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
|
@ -233,4 +233,48 @@ set debug_sync= "now WAIT_FOR got_no_such_table";
|
||||
set global debug_dbug= @saved_dbug;
|
||||
drop table t1;
|
||||
set debug_sync=reset;
|
||||
#
|
||||
# MDEV-18546 ASAN heap-use-after-free
|
||||
# in innobase_get_computed_value / row_purge
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
pk INT AUTO_INCREMENT,
|
||||
b BIT(15),
|
||||
v BIT(15) AS (b) VIRTUAL,
|
||||
PRIMARY KEY(pk),
|
||||
UNIQUE(v)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT IGNORE INTO t1 (b) VALUES
|
||||
(NULL),(b'011'),(b'000110100'),
|
||||
(b'01101101010'),(b'01111001001011'),(NULL);
|
||||
SET GLOBAL innodb_debug_sync = "ib_clust_v_col_before_row_allocated "
|
||||
"SIGNAL before_row_allocated "
|
||||
"WAIT_FOR flush_unlock";
|
||||
SET GLOBAL innodb_debug_sync = "ib_open_after_dict_open "
|
||||
"SIGNAL purge_open "
|
||||
"WAIT_FOR select_open";
|
||||
set global debug_dbug= "d,ib_purge_virtual_index_callback";
|
||||
connect purge_waiter,localhost,root;
|
||||
SET debug_sync= "now WAIT_FOR before_row_allocated";
|
||||
connection default;
|
||||
REPLACE INTO t1 (pk, b) SELECT pk, b FROM t1;
|
||||
connection purge_waiter;
|
||||
connection default;
|
||||
disconnect purge_waiter;
|
||||
FLUSH TABLES;
|
||||
SET GLOBAL innodb_debug_sync = reset;
|
||||
SET debug_sync= "now SIGNAL flush_unlock WAIT_FOR purge_open";
|
||||
SET GLOBAL innodb_debug_sync = reset;
|
||||
SET debug_sync= "ib_open_after_dict_open SIGNAL select_open";
|
||||
SELECT * FROM t1;
|
||||
pk b v
|
||||
1 NULL NULL
|
||||
2 |