diff options
Diffstat (limited to 'mysql-test/suite/gcol/r')
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_bugfixes.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_csv.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_falcon.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result | 14 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result | 14 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_keys_innodb.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_purge.result | 22 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_select_innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/gcol_select_myisam.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result | 72 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/innodb_virtual_stats.result | 12 | ||||
-rw-r--r-- | mysql-test/suite/gcol/r/main_alter_table.result | 2 |
14 files changed, 63 insertions, 102 deletions
diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result index f2d72d1e363..6d93c63fc2f 100644 --- a/mysql-test/suite/gcol/r/gcol_bugfixes.result +++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result @@ -241,7 +241,7 @@ pk >= 8 HAVING x > '2000-02-06' ORDER BY col_time_nokey, pk; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE c ALL PRIMARY,col_varchar_key,col_varchar_key_2 NULL NULL NULL 6 Using where +1 SIMPLE c index_merge PRIMARY,col_varchar_key,col_varchar_key_2 col_varchar_key,PRIMARY 5,4 NULL 2 Using union(col_varchar_key,PRIMARY); Using where SELECT COUNT(DISTINCT col_varchar_key) AS x FROM c WHERE col_varchar_key IN ('rr', 'rr') OR @@ -535,7 +535,6 @@ CREATE TABLE t (a INTEGER) engine=innodb; ALTER TABLE t ADD b INTEGER AS (SUBSTR('','a',1)); Warnings: Warning 1292 Truncated incorrect INTEGER value: 'a' -Warning 1292 Truncated incorrect INTEGER value: 'a' DROP TABLE t; set sql_mode= @save_old_sql_mode; # Bug#21875520 Problems with virtual column indexes diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result index 6da3f3c14d3..8d12db6246b 100644 --- a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result @@ -154,6 +154,8 @@ a b drop table t1; create table t2 (a int); create table t1 (a int, b int generated always as (a % 2) stored references t2(a)); +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 ')' at line 1 +create table t1 (a int, b int generated always as (a % 2) stored); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -164,6 +166,8 @@ drop table t1; create table t1 (a int, b int generated always as (a % 2) virtual); alter table t1 modify b int generated always as (a % 2) stored references t2(a); 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 'references t2(a)' at line 1 +alter table t1 modify b int generated always as (a % 2) stored; +ERROR HY000: This is not yet supported for generated columns show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result index 0d7aaeab1fa..45bac8dce97 100644 --- a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result @@ -154,6 +154,8 @@ a b drop table t1; create table t2 (a int); create table t1 (a int, b int generated always as (a % 2) stored references t2(a)); +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 ')' at line 1 +create table t1 (a int, b int generated always as (a % 2) stored); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -164,6 +166,8 @@ drop table t1; create table t1 (a int, b int generated always as (a % 2) virtual); alter table t1 modify b int generated always as (a % 2) stored references t2(a); 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 'references t2(a)' at line 1 +alter table t1 modify b int generated always as (a % 2) stored; +ERROR HY000: This is not yet supported for generated columns show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/gcol/r/gcol_csv.result b/mysql-test/suite/gcol/r/gcol_csv.result index 20708586d51..e07b72ba589 100644 --- a/mysql-test/suite/gcol/r/gcol_csv.result +++ b/mysql-test/suite/gcol/r/gcol_csv.result @@ -1,4 +1,4 @@ -SET @@session.storage_engine = 'CSV'; +SET @@session.default_storage_engine = 'CSV'; create table t1 (a int, b virtual int as (a+1)); ERROR HY000: 'Specified storage engine' is not yet supported for generated columns. create table t1 (a int not null); diff --git a/mysql-test/suite/gcol/r/gcol_falcon.result b/mysql-test/suite/gcol/r/gcol_falcon.result index 2eb558e6b69..8948539a245 100644 --- a/mysql-test/suite/gcol/r/gcol_falcon.result +++ b/mysql-test/suite/gcol/r/gcol_falcon.result @@ -1,4 +1,4 @@ -SET @@session.storage_engine = 'falcon'; +SET @@session.default_storage_engine = 'falcon'; create table t1 (a int, b virtual int as (a+1)); ERROR HY000: 'Specified storage engine' is not yet supported for generated columns. create table t1 (a int); diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result index ec5e8c0d70d..193ef064da8 100644 --- a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result @@ -627,16 +627,12 @@ a BLOB GENERATED ALWAYS AS ('') VIRTUAL, b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL, KEY (a(183),b) ); -Warnings: -Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b` -Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL +ERROR HY000: Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b` +CREATE TABLE t ( +a BLOB GENERATED ALWAYS AS ('') VIRTUAL, +b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL +); INSERT IGNORE INTO t VALUES(), (), (); -Warnings: -Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b` -Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL -Warning 1265 Data truncated for column 'b' at row 1 -Warning 1265 Data truncated for column 'b' at row 2 -Warning 1265 Data truncated for column 'b' at row 3 DELETE IGNORE FROM t; DROP TABLE t; # diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result index a2ade8c324f..98db88abf4b 100644 --- a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result @@ -549,16 +549,12 @@ a BLOB GENERATED ALWAYS AS ('') VIRTUAL, b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL, KEY (a(183),b) ); -Warnings: -Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b` -Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL +ERROR HY000: Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b` +CREATE TABLE t ( +a BLOB GENERATED ALWAYS AS ('') VIRTUAL, +b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL +); INSERT IGNORE INTO t VALUES(), (), (); -Warnings: -Warning 1901 Function or expression '''' cannot be used in the GENERATED ALWAYS AS clause of `b` -Warning 1105 Expression depends on the @@sql_mode value TIME_ROUND_FRACTIONAL -Warning 1265 Data truncated for column 'b' at row 1 -Warning 1265 Data truncated for column 'b' at row 2 -Warning 1265 Data truncated for column 'b' at row 3 DELETE IGNORE FROM t; DROP TABLE t; # diff --git a/mysql-test/suite/gcol/r/gcol_keys_innodb.result b/mysql-test/suite/gcol/r/gcol_keys_innodb.result index 121ec59678b..196ceb5459e 100644 --- a/mysql-test/suite/gcol/r/gcol_keys_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_keys_innodb.result @@ -205,7 +205,7 @@ outr.col_varchar_nokey in ('c', 'x', 'i') AND (outr.col_time_key IS NULL OR outr.col_datetime_key = '2009-09-27'); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE outr ALL col_time_key,col_datetime_key NULL NULL NULL 4 x +1 SIMPLE outr index_merge col_time_key,col_datetime_key col_time_key,col_datetime_key 4,6 NULL 2 x SELECT outr.col_time_key AS x FROM c AS outr diff --git a/mysql-test/suite/gcol/r/gcol_purge.result b/mysql-test/suite/gcol/r/gcol_purge.result new file mode 100644 index 00000000000..ea8369ad8e5 --- /dev/null +++ b/mysql-test/suite/gcol/r/gcol_purge.result @@ -0,0 +1,22 @@ +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; +connect con1,localhost,root,,,; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; +INSERT INTO t1(f1, f2) VALUES(1,2); +DELETE from t1 where f1 = 1; +connect con2,localhost,root,,,; +begin; +INSERT INTO t1 (f1, f2) VALUES(1,2); +set global debug_dbug="+d,ib_purge_virtual_index_callback"; +connection con1; +COMMIT; +InnoDB 0 transactions not purged +connection con2; +commit; +disconnect con1; +disconnect con2; +connection default; +set global debug_dbug=default; +DROP TABLE t1; diff --git a/mysql-test/suite/gcol/r/gcol_select_innodb.result b/mysql-test/suite/gcol/r/gcol_select_innodb.result index 4e308bc8fc5..17acbcf2bb2 100644 --- a/mysql-test/suite/gcol/r/gcol_select_innodb.result +++ b/mysql-test/suite/gcol/r/gcol_select_innodb.result @@ -89,8 +89,8 @@ a b c 2 -2 -2 explain select * from t1 where c in (select c from t3 where c between -2 and -1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index -1 PRIMARY t1 ALL c NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join) +1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index +1 PRIMARY t1 ref c c 5 test.t3.c 1 # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> select * from t1 union select * from t2; @@ -146,7 +146,7 @@ count(distinct c) 3 explain select count(distinct c) from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by (scanning) +1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by ### ### filesort & range-based utils ### diff --git a/mysql-test/suite/gcol/r/gcol_select_myisam.result b/mysql-test/suite/gcol/r/gcol_select_myisam.result index 81632c8b3cf..77ab0cdb926 100644 --- a/mysql-test/suite/gcol/r/gcol_select_myisam.result +++ b/mysql-test/suite/gcol/r/gcol_select_myisam.result @@ -89,7 +89,7 @@ a b c 2 -2 -2 explain select * from t1 where c in (select c from t3 where c between -2 and -1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t3 index c c 5 NULL 6 Using where; Using index +1 PRIMARY t3 range c c 5 NULL 2 Using where; Using index 1 PRIMARY t1 ref c c 5 test.t3.c 1 # select_type=UNION, type=system # select_type=UNION RESULT, type=<union1,2> @@ -146,7 +146,7 @@ count(distinct c) 3 explain select count(distinct c) from t1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by (scanning) +1 SIMPLE t1 range NULL c 5 NULL 6 Using index for group-by ### ### filesort & range-based utils ### @@ -1121,7 +1121,7 @@ id select_type table type possible_keys key key_len ref rows Extra EXPLAIN SELECT * FROM t2 AS t1 WHERE b NOT IN (SELECT b FROM t1 FORCE INDEX(b)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system NULL NULL NULL NULL 1 -2 SUBQUERY t1 index_subquery b b 5 func 2 Using index; Full scan on NULL key +2 SUBQUERY t1 index_subquery b b 5 func 3 Using index; Full scan on NULL key DROP TABLE t1; DROP TABLE t2, t3; # diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result index 2ed1f917ca6..3658e38125f 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result @@ -204,77 +204,5 @@ connection truncate; disconnect truncate; connection default; DROP TABLE t1, t2; -# -# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf -# on table with virtual columns and indexes -# -InnoDB 0 transactions not purged -SET @saved_dbug= @@GLOBAL.debug_dbug; -set global debug_dbug= "d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2"; -create table t1 ( -pk serial, vb tinyblob as (b) virtual, b tinyblob, -primary key(pk), index (vb(64))) -engine innodb; -insert ignore into t1 (b) values ('foo'); -select * into outfile 'load.data' from t1; -load data infile 'load.data' replace into table t1; -set debug_sync= "now WAIT_FOR latch_released"; -set global debug_dbug= @saved_dbug; -drop table t1; -set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table"; -create table t1 ( -pk serial, vb tinyblob as (b) virtual, b tinyblob, -primary key(pk), index (vb(64))) -engine innodb; -insert ignore into t1 (b) values ('foo'); -select * into outfile 'load.data' from t1; -load data infile 'load.data' replace into table t1; -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 -3 -4 j j -5 K K -6 NULL NULL -DROP TABLE t1; -SET debug_sync= reset; -set global debug_dbug= @old_dbug; SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff --git a/mysql-test/suite/gcol/r/innodb_virtual_stats.result b/mysql-test/suite/gcol/r/innodb_virtual_stats.result index 4ef499f932f..c0f595263df 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_stats.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_stats.result @@ -24,6 +24,9 @@ vidxcd n_diff_pfx03 c,d,DB_ROW_ID vidxcd n_leaf_pages Number of leaf pages in the index vidxcd size Number of pages in the index ALTER TABLE t ADD COLUMN e INT GENERATED ALWAYS AS(a+a+b), ADD INDEX idxb (b), ALGORITHM=INPLACE; +select count(*) from t; +count(*) +1 SELECT index_name, stat_name, stat_description FROM mysql.innodb_index_stats WHERE database_name = 'test' AND table_name = 't'; @@ -45,6 +48,9 @@ vidxcd n_diff_pfx03 c,d,DB_ROW_ID vidxcd n_leaf_pages Number of leaf pages in the index vidxcd size Number of pages in the index ALTER TABLE t DROP COLUMN c, DROP INDEX idxa, ALGORITHM=INPLACE; +select count(*) from t; +count(*) +1 SELECT index_name, stat_name, stat_description FROM mysql.innodb_index_stats WHERE database_name = 'test' AND table_name = 't'; @@ -61,6 +67,9 @@ vidxcd n_diff_pfx02 d,DB_ROW_ID vidxcd n_leaf_pages Number of leaf pages in the index vidxcd size Number of pages in the index ALTER TABLE t ADD INDEX vidxe (e), ALGORITHM=INPLACE; +select count(*) from t; +count(*) +1 SELECT index_name, stat_name, stat_description FROM mysql.innodb_index_stats WHERE database_name = 'test' AND table_name = 't'; @@ -81,6 +90,9 @@ vidxe n_diff_pfx02 e,DB_ROW_ID vidxe n_leaf_pages Number of leaf pages in the index vidxe size Number of pages in the index ALTER TABLE t ADD COLUMN f INT GENERATED ALWAYS AS(a + a), ADD INDEX vidxf (f), ALGORITHM=INPLACE; +select count(*) from t; +count(*) +1 SELECT index_name, stat_name, stat_description FROM mysql.innodb_index_stats WHERE database_name = 'test' AND table_name = 't'; diff --git a/mysql-test/suite/gcol/r/main_alter_table.result b/mysql-test/suite/gcol/r/main_alter_table.result index 864169ee16c..77c0a382922 100644 --- a/mysql-test/suite/gcol/r/main_alter_table.result +++ b/mysql-test/suite/gcol/r/main_alter_table.result @@ -38,7 +38,7 @@ INFORMATION_SCHEMA.INNODB_SYS_TABLES AS T JOIN INFORMATION_SCHEMA.INNODB_SYS_INDEXES AS I JOIN INFORMATION_SCHEMA.INNODB_SYS_FIELDS AS F ON I.INDEX_ID = F.INDEX_ID AND I.TABLE_ID = T.TABLE_ID -WHERE T.NAME LIKE 'test/%'; +WHERE T.NAME LIKE 'test/t%'; TABLE_NAME INDEX_NAME IS_PRIMARY_KEY FIELD_NAME FIELD_POS test/t0 a yes a 0 test/t1 a no a 0 |