mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.5' into 10.6
This commit is contained in:
@@ -122,4 +122,31 @@ CREATE TABLE t2 (b VARCHAR(8)) ENGINE=InnoDB;
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
ALTER TABLE t2 MODIFY b VARCHAR(16), ADD KEY(b);
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32337 Assertion `pos < table->n_def' failed
|
||||
--echo # in dict_table_get_nth_col
|
||||
--echo #
|
||||
CREATE TABLE t (a INT, va INT AS (a), b INT, vb INT AS (b),
|
||||
c INT, vc INT AS (c), vf VARCHAR(16) AS (f),
|
||||
f VARCHAR(4)) ENGINE=InnoDB;
|
||||
ALTER TABLE t MODIFY f VARCHAR(8);
|
||||
# Altering the virtual column is not supported
|
||||
--error ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN
|
||||
ALTER TABLE t MODIFY vf VARCHAR(18);
|
||||
DROP TABLE t;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32527 Server aborts during alter operation
|
||||
--echo # when table doesn't have foreign index
|
||||
--echo #
|
||||
CREATE TABLE t1 (f1 INT NOT NULL, INDEX(f1)) ENGINE=InnoDB;
|
||||
CREATE TABLE t2(f1 INT NOT NULL, f2 VARCHAR(100) DEFAULT NULL,
|
||||
INDEX idx(f1, f2),
|
||||
FOREIGN KEY(f1) REFERENCES t1(f1))ENGINE=INNODB;
|
||||
SET SESSION FOREIGN_KEY_CHECKS = OFF;
|
||||
ALTER TABLE t2 DROP INDEX idx;
|
||||
ALTER TABLE t2 MODIFY f2 VARCHAR(1023);
|
||||
SET SESSION FOREIGN_KEY_CHECKS = ON;
|
||||
DROP TABLE t2, t1;
|
||||
--echo # End of 10.4 tests
|
||||
|
@@ -930,7 +930,27 @@ INSERT INTO t1 VALUES (2,11,11);
|
||||
DROP TABLE t1;
|
||||
SET FOREIGN_KEY_CHECKS=DEFAULT;
|
||||
|
||||
-- echo # End of 10.4 tests
|
||||
--echo #
|
||||
--echo # MDEV-32018 Allow the setting of Auto_increment on FK referenced columns
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
id int unsigned NOT NULL PRIMARY KEY
|
||||
);
|
||||
|
||||
CREATE TABLE t2 (
|
||||
id int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
t1_id int unsigned DEFAULT NULL,
|
||||
CONSTRAINT FK_t1_id FOREIGN KEY (t1_id) REFERENCES t1 (id)
|
||||
);
|
||||
|
||||
ALTER TABLE t1 MODIFY id INT unsigned AUTO_INCREMENT;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20729 Fix REFERENCES constraint in column definition
|
||||
|
26
mysql-test/suite/innodb/t/innodb-page_compression_none.test
Normal file
26
mysql-test/suite/innodb/t/innodb-page_compression_none.test
Normal file
@@ -0,0 +1,26 @@
|
||||
-- source include/innodb_checksum_algorithm.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30825 innodb_compression_algorithm=0 (none) increments Innodb_num_pages_page_compression_error
|
||||
--echo #
|
||||
|
||||
SET @save_compression_algorithm=@@GLOBAL.innodb_compression_algorithm;
|
||||
SET GLOBAL innodb_compression_algorithm=0;
|
||||
SELECT VARIABLE_VALUE INTO @compress_errors FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_num_pages_page_compression_error';
|
||||
|
||||
|
||||
CREATE TABLE t (c INT) page_compressed=1 page_compression_level=4 ENGINE=InnoDB;
|
||||
INSERT INTO t VALUES (1);
|
||||
|
||||
FLUSH TABLES t FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
|
||||
SELECT VARIABLE_VALUE - @compress_errors AS NUMBER_OF_ERRORS FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'Innodb_num_pages_page_compression_error';
|
||||
|
||||
DROP TABLE t;
|
||||
SET GLOBAL innodb_compression_algorithm=@save_compression_algorithm;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
@@ -32,6 +32,23 @@ let $coll_pad='utf8_bin';
|
||||
SET NAMES utf8mb3 COLLATE utf8mb3_unicode_nopad_ci;
|
||||
--source include/ctype_nopad_prefix_unique.inc
|
||||
|
||||
--source include/ctype_utf8mb3_uca_char.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-30050 Inconsistent results of DISTINCT with NOPAD
|
||||
--echo #
|
||||
|
||||
CREATE OR REPLACE TABLE t1 (c CHAR(100) COLLATE utf8mb3_unicode_nopad_ci);
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES ('ss'),('ß');
|
||||
SET big_tables=0;
|
||||
SELECT DISTINCT c FROM t1;
|
||||
SET big_tables=1;
|
||||
SELECT DISTINCT c FROM t1;
|
||||
DROP TABLE t1;
|
||||
SET big_tables=DEFAULT;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # End 10.4 tests
|
||||
--echo #
|
||||
|
97
mysql-test/suite/innodb/t/mon_lock_wait_current_count.test
Normal file
97
mysql-test/suite/innodb/t/mon_lock_wait_current_count.test
Normal file
@@ -0,0 +1,97 @@
|
||||
# Check if lock_row_lock_current_waits counter in
|
||||
# information_schema.innodb_metrics does not become negative after disabling,
|
||||
# resetting and enabling.
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--connect (prevent_purge,localhost,root,,)
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
|
||||
--connection default
|
||||
# lock_row_lock_time_avg is filled under lock_sys.wait_mutex lock, which
|
||||
# will be held by connection 2, that is why the following SELECT
|
||||
# from information_schema.innodb_metrics will be blocked.
|
||||
#
|
||||
# And setting innodb_monitor_disable=all causes innodb monitor enabling
|
||||
# status changing. The status will not be restored to default value even
|
||||
# after
|
||||
# -----------------------
|
||||
# SET GLOBAL innodb_monitor_reset_all=default;
|
||||
# SET GLOBAL innodb_monitor_enable=default;
|
||||
# -----------------------
|
||||
# execution. See MDEV-32553 for details.
|
||||
#
|
||||
# All monitors disabling, i.e. "innodb_monitor_disable=all" causes
|
||||
# innodb.monitor test failure due to MDEV-32553. 10.5 is not affected, as
|
||||
# innodb.monitor differs there.
|
||||
#
|
||||
# Disable not all monitors at the beggining of the test,
|
||||
# but only the monitor, which causes hanging, i.e. lock_row_lock_time_avg.
|
||||
SET GLOBAL innodb_monitor_disable='lock_row_lock_time_avg';
|
||||
# 'lock_row_lock_current_waits' should be enabled by default;
|
||||
CREATE TABLE `t` (a INT PRIMARY KEY) engine=InnoDB STATS_PERSISTENT=0;
|
||||
INSERT INTO t VALUES (5);
|
||||
SELECT name, count FROM information_schema.innodb_metrics
|
||||
WHERE name ='lock_row_lock_current_waits';
|
||||
|
||||
--connect (con1,localhost,root,,)
|
||||
BEGIN;
|
||||
SELECT * FROM t FOR UPDATE;
|
||||
|
||||
--connect (con2,localhost,root,,)
|
||||
SET DEBUG_SYNC="lock_wait_before_suspend SIGNAL blocked WAIT_FOR cont";
|
||||
BEGIN;
|
||||
--send SELECT * FROM t FOR UPDATE
|
||||
|
||||
--connection default
|
||||
SET DEBUG_SYNC="now WAIT_FOR blocked";
|
||||
SELECT name, count FROM information_schema.innodb_metrics
|
||||
WHERE name ='lock_row_lock_current_waits';
|
||||
SET GLOBAL innodb_monitor_disable='lock_row_lock_current_waits';
|
||||
SET GLOBAL innodb_monitor_reset_all='lock_row_lock_current_waits';
|
||||
SET GLOBAL innodb_monitor_enable='lock_row_lock_current_waits';
|
||||
######################################
|
||||
# Equals to zero if the bug is not fixed, as MONITOR_DISPLAY_CURRENT is not
|
||||
# set for this counter and its value is reset during previous
|
||||
# "SET GLOBAL innodb_monitor_reset_all='lock_row_lock_current_waits'" execution.
|
||||
#####
|
||||
SELECT name, count FROM information_schema.innodb_metrics
|
||||
WHERE name ='lock_row_lock_current_waits';
|
||||
SET DEBUG_SYNC="now SIGNAL cont";
|
||||
|
||||
--disconnect con1
|
||||
|
||||
--connection con2
|
||||
--reap
|
||||
COMMIT;
|
||||
--disconnect con2
|
||||
|
||||
--connection default
|
||||
SET DEBUG_SYNC="reset";
|
||||
######################################
|
||||
# Equals to -1 if the bug is not fixed. I.e.
|
||||
# innodb_counter_value[MONITOR_OVLD_ROW_LOCK_CURRENT_WAIT].mon_start_value is
|
||||
# set to 1 during
|
||||
# "set global innodb_monitor_disable='lock_row_lock_current_waits'" execution,
|
||||
# and the value is counted as
|
||||
# (value = 0) - (mon_value_reset = 0) - (mon_start_value = 1) +
|
||||
# (mon_last_value = 0) = -1. See MONITOR_SET_DIFF() macro in
|
||||
# srv_mon_process_existing_counter() for details.
|
||||
#####
|
||||
SELECT name, count FROM information_schema.innodb_metrics
|
||||
WHERE name ='lock_row_lock_current_waits';
|
||||
DROP TABLE `t`;
|
||||
SET GLOBAL innodb_monitor_disable='lock_row_lock_current_waits';
|
||||
SET GLOBAL innodb_monitor_reset_all='lock_row_lock_current_waits';
|
||||
SET GLOBAL innodb_monitor_enable='lock_row_lock_current_waits';
|
||||
# TODO: remove it when MDEV-32553 is fixed
|
||||
SET GLOBAL innodb_monitor_enable='lock_row_lock_time_avg';
|
||||
--disable_warnings
|
||||
SET GLOBAL innodb_monitor_disable=default;
|
||||
SET GLOBAL innodb_monitor_reset_all=default;
|
||||
SET GLOBAL innodb_monitor_enable=default;
|
||||
--enable_warnings
|
||||
--disconnect prevent_purge
|
||||
--source include/wait_until_count_sessions.inc
|
Reference in New Issue
Block a user