summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/gcol
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
commit86fbb58c3ac0865482819c10a3e81f2eea001c36 (patch)
tree28c9e526ea739c6f9b89e36115e1e2698bddf981 /mysql-test/suite/gcol
parentReleasing progress-linux version 1:10.11.6-2~progress7.99u1. (diff)
downloadmariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.tar.xz
mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.zip
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/gcol')
-rw-r--r--mysql-test/suite/gcol/r/gcol_bugfixes.result38
-rw-r--r--mysql-test/suite/gcol/r/gcol_partition_innodb.result5
-rw-r--r--mysql-test/suite/gcol/r/gcol_purge.result2
-rw-r--r--mysql-test/suite/gcol/r/gcol_update.result3
-rw-r--r--mysql-test/suite/gcol/r/innodb_prefix_index_check.result29
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_debug.result3
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_purge.result3
-rw-r--r--mysql-test/suite/gcol/t/gcol_bugfixes.test35
-rw-r--r--mysql-test/suite/gcol/t/gcol_partition_innodb.test7
-rw-r--r--mysql-test/suite/gcol/t/gcol_purge.test2
-rw-r--r--mysql-test/suite/gcol/t/gcol_update.test5
-rw-r--r--mysql-test/suite/gcol/t/innodb_prefix_index_check.test43
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug.test6
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_purge.test5
14 files changed, 182 insertions, 4 deletions
diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result
index f124ebe6..5dfa416a 100644
--- a/mysql-test/suite/gcol/r/gcol_bugfixes.result
+++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result
@@ -744,3 +744,41 @@ 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;
+#
+# MDEV-28566 Assertion `!expr->is_fixed()' failed in bool
+# Virtual_column_info::fix_session_expr(THD*)
+#
+CREATE TABLE t1 (c1 CHAR(1));
+FLUSH TABLES WITH READ LOCK;
+UPDATE t1 SET c1=1;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+unlock tables;
+SELECT * FROM t1;
+c1
+DROP TABLE t1;
+CREATE TABLE t1 (c1 CHAR AS (CONCAT (0,DAYNAME (0))));
+FLUSH TABLES WITH READ LOCK;
+UPDATE t1 SET c1=1;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+unlock tables;
+UPDATE t1 SET c1=1;
+SELECT * FROM t1;
+c1
+DROP TABLE t1;
+CREATE TABLE t1 (a int primary key, c1 CHAR AS (CONCAT (0,DAYNAME (0))));
+insert into t1 (a) values (1);
+FLUSH TABLES WITH READ LOCK;
+UPDATE t1 SET c1=1;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+UPDATE t1 SET a=2;
+ERROR HY000: Can't execute the query because you have a conflicting read lock
+unlock tables;
+UPDATE t1 SET a=2;
+UPDATE t1 SET c1=1;
+ERROR HY000: The value specified for generated column 'c1' in table 't1' has been ignored
+SELECT * FROM t1;
+a c1
+2 NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0'
+DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/r/gcol_partition_innodb.result b/mysql-test/suite/gcol/r/gcol_partition_innodb.result
index 2bff3305..e6252b3d 100644
--- a/mysql-test/suite/gcol/r/gcol_partition_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_partition_innodb.result
@@ -1,4 +1,6 @@
-SET @@session.default_storage_engine = 'InnoDB';
+SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent = 0;
+SET default_storage_engine = 'InnoDB';
drop table if exists t1;
# Case 1. Partitioning by RANGE based on a non-stored generated column.
CREATE TABLE t1 (
@@ -126,6 +128,7 @@ Warnings:
Warning 1906 The value specified for generated column 'vd' in table 't1' has been ignored
DROP TABLE t1;
InnoDB 0 transactions not purged
+SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
DROP VIEW IF EXISTS v1,v2;
DROP TABLE IF EXISTS t1,t2,t3;
DROP PROCEDURE IF EXISTS p1;
diff --git a/mysql-test/suite/gcol/r/gcol_purge.result b/mysql-test/suite/gcol/r/gcol_purge.result
index e16cf0df..19db34ac 100644
--- a/mysql-test/suite/gcol/r/gcol_purge.result
+++ b/mysql-test/suite/gcol/r/gcol_purge.result
@@ -1,7 +1,7 @@
SET @save_dbug=@@GLOBAL.debug_dbug;
CREATE TABLE t1(f1 INT NOT NULL, f2 int not null,
f3 int generated always as (f2 * 2) VIRTUAL,
-primary key(f1), INDEX (f3))ENGINE=InnoDB;
+primary key(f1), INDEX (f3))ENGINE=InnoDB STATS_PERSISTENT=0;
connect con1,localhost,root,,,;
InnoDB 0 transactions not purged
START TRANSACTION WITH CONSISTENT SNAPSHOT;
diff --git a/mysql-test/suite/gcol/r/gcol_update.result b/mysql-test/suite/gcol/r/gcol_update.result
index 35e0b3e8..54974826 100644
--- a/mysql-test/suite/gcol/r/gcol_update.result
+++ b/mysql-test/suite/gcol/r/gcol_update.result
@@ -1,3 +1,5 @@
+SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent = 0;
connect purge_control,localhost,root;
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
@@ -37,3 +39,4 @@ InnoDB 0 transactions not purged
disconnect purge_control;
connection default;
drop table t1;
+SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
diff --git a/mysql-test/suite/gcol/r/innodb_prefix_index_check.result b/mysql-test/suite/gcol/r/innodb_prefix_index_check.result
index 01dbe4a6..ea84cd15 100644
--- a/mysql-test/suite/gcol/r/innodb_prefix_index_check.result
+++ b/mysql-test/suite/gcol/r/innodb_prefix_index_check.result
@@ -13,3 +13,32 @@ key(f1,f2(1))
)ENGINE=INNODB;
REPLACE INTO t1(f3) VALUES (1),(1);
DROP TABLE t1;
+#Create and alter table examples for full column index followed by prefix index.
+CREATE TABLE t1(
+f1 VARCHAR(100),
+f2 char(2),
+KEY(f1,f2),
+KEY(f1(5)))ENGINE=INNODB;
+REPLACE INTO t1(f2) VALUES (1),(1);
+ALTER TABLE t1 ADD INDEX(f2,f1);
+DROP TABLE t1;
+#Create and alter table examples for small prefix index followed by large
+#prefix index.
+CREATE TABLE t1(
+f1 VARCHAR(100),
+f2 char(2),
+KEY(f1(5),f2),
+KEY(f1(10)))ENGINE=INNODB;
+REPLACE INTO t1(f2) VALUES (1),(1);
+ALTER TABLE t1 ADD INDEX(f2,f1);
+DROP TABLE t1;
+#Create and alter table examples for prefix index followed by full column
+#index.
+CREATE TABLE t1(
+f1 VARCHAR(100),
+f2 char(2),
+KEY(f1(5),f2),
+KEY(f1))ENGINE=INNODB;
+REPLACE INTO t1(f2) VALUES (1),(1);
+ALTER TABLE t1 ADD INDEX(f2,f1);
+DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug.result b/mysql-test/suite/gcol/r/innodb_virtual_debug.result
index 3f3e3ea3..e1b87938 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_debug.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_debug.result
@@ -1,4 +1,6 @@
set default_storage_engine=innodb;
+SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent = 0;
CREATE TABLE `t` (
`a` VARCHAR(100),
`b` VARCHAR(100),
@@ -145,3 +147,4 @@ DROP TABLE t1;
disconnect con1;
connection default;
SET DEBUG_SYNC=RESET;
+SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_purge.result
index 7951bd0e..3f1c4413 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_purge.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_purge.result
@@ -1,3 +1,5 @@
+SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent = 0;
#
# Bug#21869656 UNDO LOG DOES NOT CONTAIN ENOUGH INFORMATION
# ON INDEXED VIRTUAL COLUMNS
@@ -171,3 +173,4 @@ CHECK TABLE t EXTENDED;
Table Op Msg_type Msg_text
test.t check status OK
DROP TABLE t;
+SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
diff --git a/mysql-test/suite/gcol/t/gcol_bugfixes.test b/mysql-test/suite/gcol/t/gcol_bugfixes.test
index 4c1b00a8..1edc9779 100644
--- a/mysql-test/suite/gcol/t/gcol_bugfixes.test
+++ b/mysql-test/suite/gcol/t/gcol_bugfixes.test
@@ -724,3 +724,38 @@ DROP TABLE t1;
--remove_file $datadir/test/load_t1
+--echo #
+--echo # MDEV-28566 Assertion `!expr->is_fixed()' failed in bool
+--echo # Virtual_column_info::fix_session_expr(THD*)
+--echo #
+
+CREATE TABLE t1 (c1 CHAR(1));
+FLUSH TABLES WITH READ LOCK;
+--error ER_CANT_UPDATE_WITH_READLOCK
+UPDATE t1 SET c1=1;
+unlock tables;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 CHAR AS (CONCAT (0,DAYNAME (0))));
+FLUSH TABLES WITH READ LOCK;
+--error ER_CANT_UPDATE_WITH_READLOCK
+UPDATE t1 SET c1=1;
+unlock tables;
+UPDATE t1 SET c1=1;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a int primary key, c1 CHAR AS (CONCAT (0,DAYNAME (0))));
+insert into t1 (a) values (1);
+FLUSH TABLES WITH READ LOCK;
+--error ER_CANT_UPDATE_WITH_READLOCK
+UPDATE t1 SET c1=1;
+--error ER_CANT_UPDATE_WITH_READLOCK
+UPDATE t1 SET a=2;
+unlock tables;
+UPDATE t1 SET a=2;
+--error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
+UPDATE t1 SET c1=1;
+SELECT * FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/t/gcol_partition_innodb.test b/mysql-test/suite/gcol/t/gcol_partition_innodb.test
index a8765970..6bcd9d27 100644
--- a/mysql-test/suite/gcol/t/gcol_partition_innodb.test
+++ b/mysql-test/suite/gcol/t/gcol_partition_innodb.test
@@ -29,7 +29,9 @@
##### Storage engine to be tested
# Set the session storage engine
--source include/have_innodb.inc
-eval SET @@session.default_storage_engine = 'InnoDB';
+SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent = 0;
+SET default_storage_engine = 'InnoDB';
##### Workarounds for known open engine specific bugs
# none
@@ -58,6 +60,9 @@ REPLACE INTO t1 SELECT * FROM t1;
DROP TABLE t1;
--source suite/innodb/include/wait_all_purged.inc
+
+SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
+
#------------------------------------------------------------------------------#
# Cleanup
--source suite/gcol/inc/gcol_cleanup.inc
diff --git a/mysql-test/suite/gcol/t/gcol_purge.test b/mysql-test/suite/gcol/t/gcol_purge.test
index cfe20c4a..4ebb37ad 100644
--- a/mysql-test/suite/gcol/t/gcol_purge.test
+++ b/mysql-test/suite/gcol/t/gcol_purge.test
@@ -4,7 +4,7 @@
SET @save_dbug=@@GLOBAL.debug_dbug;
CREATE TABLE t1(f1 INT NOT NULL, f2 int not null,
f3 int generated always as (f2 * 2) VIRTUAL,
- primary key(f1), INDEX (f3))ENGINE=InnoDB;
+ primary key(f1), INDEX (f3))ENGINE=InnoDB STATS_PERSISTENT=0;
connect(con1,localhost,root,,,);
--source ../innodb/include/wait_all_purged.inc
START TRANSACTION WITH CONSISTENT SNAPSHOT;
diff --git a/mysql-test/suite/gcol/t/gcol_update.test b/mysql-test/suite/gcol/t/gcol_update.test
index 2076632f..86474f86 100644
--- a/mysql-test/suite/gcol/t/gcol_update.test
+++ b/mysql-test/suite/gcol/t/gcol_update.test
@@ -1,5 +1,8 @@
--source include/have_innodb.inc
+SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent = 0;
+
connect (purge_control,localhost,root);
START TRANSACTION WITH CONSISTENT SNAPSHOT;
@@ -60,3 +63,5 @@ disconnect purge_control;
connection default;
drop table t1;
+
+SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
diff --git a/mysql-test/suite/gcol/t/innodb_prefix_index_check.test b/mysql-test/suite/gcol/t/innodb_prefix_index_check.test
index 4923ead9..5cc46e16 100644
--- a/mysql-test/suite/gcol/t/innodb_prefix_index_check.test
+++ b/mysql-test/suite/gcol/t/innodb_prefix_index_check.test
@@ -20,3 +20,46 @@ REPLACE INTO t1(f3) VALUES (1),(1);
DROP TABLE t1;
+--echo #Create and alter table examples for full column index followed by prefix index.
+
+CREATE TABLE t1(
+f1 VARCHAR(100),
+f2 char(2),
+KEY(f1,f2),
+KEY(f1(5)))ENGINE=INNODB;
+
+REPLACE INTO t1(f2) VALUES (1),(1);
+
+ALTER TABLE t1 ADD INDEX(f2,f1);
+
+DROP TABLE t1;
+
+--echo #Create and alter table examples for small prefix index followed by large
+--echo #prefix index.
+
+CREATE TABLE t1(
+f1 VARCHAR(100),
+f2 char(2),
+KEY(f1(5),f2),
+KEY(f1(10)))ENGINE=INNODB;
+
+REPLACE INTO t1(f2) VALUES (1),(1);
+
+ALTER TABLE t1 ADD INDEX(f2,f1);
+
+DROP TABLE t1;
+
+--echo #Create and alter table examples for prefix index followed by full column
+--echo #index.
+
+CREATE TABLE t1(
+f1 VARCHAR(100),
+f2 char(2),
+KEY(f1(5),f2),
+KEY(f1))ENGINE=INNODB;
+
+REPLACE INTO t1(f2) VALUES (1),(1);
+
+ALTER TABLE t1 ADD INDEX(f2,f1);
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug.test b/mysql-test/suite/gcol/t/innodb_virtual_debug.test
index cd2b8604..c359f3c8 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug.test
@@ -4,6 +4,10 @@
--source include/count_sessions.inc
set default_storage_engine=innodb;
+# Ensure that the history list length will actually be decremented by purge.
+SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent = 0;
+
CREATE TABLE `t` (
`a` VARCHAR(100),
`b` VARCHAR(100),
@@ -338,4 +342,6 @@ DROP TABLE t1;
connection default;
SET DEBUG_SYNC=RESET;
+SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
+
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_purge.test
index 99c7267c..5f3cae34 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_purge.test
@@ -1,6 +1,9 @@
--source include/have_innodb.inc
--source include/count_sessions.inc
+SET @save_stats_persistent = @@GLOBAL.innodb_stats_persistent;
+SET GLOBAL innodb_stats_persistent = 0;
+
--echo #
--echo # Bug#21869656 UNDO LOG DOES NOT CONTAIN ENOUGH INFORMATION
--echo # ON INDEXED VIRTUAL COLUMNS
@@ -182,4 +185,6 @@ SET GLOBAL innodb_max_purge_lag_wait=0;
CHECK TABLE t EXTENDED;
DROP TABLE t;
+SET GLOBAL innodb_stats_persistent = @save_stats_persistent;
+
--source include/wait_until_count_sessions.inc