diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 18:15:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-01 18:15:00 +0000 |
commit | a2a2e32c02643a0cec111511220227703fda1cd5 (patch) | |
tree | 69cc2b631234c2a8e026b9cd4d72676c61c594df /mysql-test/suite/gcol/inc | |
parent | Releasing progress-linux version 1:10.11.8-1~progress7.99u1. (diff) | |
download | mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.tar.xz mariadb-a2a2e32c02643a0cec111511220227703fda1cd5.zip |
Merging upstream version 1:11.4.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/gcol/inc')
-rw-r--r-- | mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc | 8 | ||||
-rw-r--r-- | mysql-test/suite/gcol/inc/gcol_keys.inc | 6 | ||||
-rw-r--r-- | mysql-test/suite/gcol/inc/gcol_select.inc | 11 |
3 files changed, 19 insertions, 6 deletions
diff --git a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc index 4cc10730..13b7dd19 100644 --- a/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc +++ b/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc @@ -257,9 +257,13 @@ drop table t1; --echo # create table t1 (a int); ---error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +insert t1 values (1); alter table t1 add column b binary(32) generated always as (random_bytes(a)); -alter table t1 add column b binary(32) default (random_bytes(a)); +select a,length(b) from t1; +--error ER_GENERATED_COLUMN_FUNCTION_IS_NOT_ALLOWED +alter table t1 add index (b); +alter table t1 add column c binary(32) default (random_bytes(a)); +select a,length(b),length(c) from t1; drop table t1; --echo # diff --git a/mysql-test/suite/gcol/inc/gcol_keys.inc b/mysql-test/suite/gcol/inc/gcol_keys.inc index 4ae47afc..cc45e250 100644 --- a/mysql-test/suite/gcol/inc/gcol_keys.inc +++ b/mysql-test/suite/gcol/inc/gcol_keys.inc @@ -14,6 +14,8 @@ # Change: # ################################################################################ +--source include/have_sequence.inc + if (!$support_virtual_index) { let $skip_spatial_index_check=1; let $skip_foreign_key_check=1; @@ -197,12 +199,16 @@ PRIMARY KEY (pk), KEY (col_time_key), KEY (col_datetime_key)); +--disable_warnings INSERT INTO c ( col_time_nokey,col_datetime_nokey,col_varchar_nokey) values ('14:03:03.042673','2001-11-28 00:50:27.051028', 'c'), ('01:46:09.016386','2007-10-09 19:53:04.008332', NULL), ('16:21:18.052408','2001-11-08 21:02:12.009395', 'x'), ('18:56:33.027423','2003-04-01 00:00:00', 'i'); +insert into c (col_time_nokey,col_datetime_nokey,col_varchar_nokey) select '10:10:10', '2021-12-24 01:50:27', 'z' from seq_1_to_10; +--enable_warnings + --replace_column 9 x 10 x EXPLAIN SELECT outr.col_time_key AS x diff --git a/mysql-test/suite/gcol/inc/gcol_select.inc b/mysql-test/suite/gcol/inc/gcol_select.inc index 2386c55f..8dc76276 100644 --- a/mysql-test/suite/gcol/inc/gcol_select.inc +++ b/mysql-test/suite/gcol/inc/gcol_select.inc @@ -545,11 +545,11 @@ CREATE TABLE cc ( ); INSERT INTO cc (col_int_nokey) VALUES (0),(1),(7),(0),(4),(5); --replace_column 9 # 10 # -EXPLAIN SELECT pk FROM cc WHERE col_int_key > 3; -SELECT pk FROM cc WHERE col_int_key > 3; +EXPLAIN SELECT pk FROM cc force index(col_int_key) WHERE col_int_key > 3; +SELECT pk FROM cc force index(col_int_key) WHERE col_int_key > 3; --replace_column 9 # 10 # -EXPLAIN SELECT pk FROM cc WHERE col_int_key > 3 ORDER BY 1; -SELECT pk FROM cc WHERE col_int_key > 3 ORDER BY 1; +EXPLAIN SELECT pk FROM cc force index(col_int_key) WHERE col_int_key > 3 ORDER BY 1; +SELECT pk FROM cc force index(col_int_key) WHERE col_int_key > 3 ORDER BY 1; DROP TABLE cc; --echo # @@ -872,7 +872,10 @@ CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(2147483647); ALTER TABLE t1 ADD COLUMN h INT AS (a) VIRTUAL; ALTER TABLE t1 CHANGE h i INT AS (a) VIRTUAL, ALGORITHM=COPY; +# COPY/NONE is not supported in embedded +--error ER_WARN_DATA_OUT_OF_RANGE,ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE; +--error ER_WARN_DATA_OUT_OF_RANGE,ER_ALTER_OPERATION_NOT_SUPPORTED_REASON ALTER TABLE t1 ADD COLUMN e SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE; ALTER TABLE t1 ADD COLUMN f SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=SHARED; ALTER TABLE t1 ADD COLUMN g SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=EXCLUSIVE; |