Skip to content

Commit

Permalink
Merge branch 'mysql-8.0' into mysql-trunk
Browse files Browse the repository at this point in the history
Change-Id: I377dc7deca52276466e1b6aea886cafc96ae650f
  • Loading branch information
Amit Khandekar committed Nov 11, 2022
2 parents 08b4836 + 950eb14 commit b359f84
Show file tree
Hide file tree
Showing 23 changed files with 331 additions and 49 deletions.
1 change: 1 addition & 0 deletions include/sql_chars.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ enum MY_ATTRIBUTE((__packed__)) my_lex_states {
MY_LEX_IDENT_OR_HEX,
MY_LEX_IDENT_OR_BIN,
MY_LEX_IDENT_OR_NCHAR,
MY_LEX_IDENT_OR_DOLLAR_QUOTE,
MY_LEX_STRING_OR_DELIMITER
};

Expand Down
6 changes: 3 additions & 3 deletions mysql-test/r/create.result
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ drop database if exists mysqltest;
Warnings:
Note 1008 Can't drop database 'mysqltest'; database doesn't exist
create database mysqltest;
create table mysqltest.$test1 (a$1 int, $b int, c$ int);
insert into mysqltest.$test1 values (1,2,3);
select a$1, $b, c$ from mysqltest.$test1;
create table mysqltest.`$test1` (a$1 int, `$b` int, c$ int);
insert into mysqltest.`$test1` values (1,2,3);
select a$1, `$b`, c$ from mysqltest.`$test1`;
a$1 $b c$
1 2 3
create table mysqltest.test2$ (a int);
Expand Down
148 changes: 148 additions & 0 deletions mysql-test/r/dollar_identifier.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
create table $t(id int);
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
drop table $t;
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
create table t(id int, $id int, $id2 int, $$id int, $ int, $1 int,$$$ int,
id$$$ int, 1$ int, `$$` int, _$ int, b$$lit$$ int);
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
select `$1`, $$$,$$id, '$someli$teral' from t where t.`$id` = 0;
$1 $$$ $$id $someli$teral
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
SET sql_mode = sys.LIST_ADD(@@sql_mode, 'ANSI_QUOTES');
select "$id2", "$$$" from t where t."$id" = 0;
$id2 $$$
SET sql_mode = sys.LIST_DROP(@@sql_mode, 'ANSI_QUOTES');
select * from t where t.`$id` = 0 or `$id2` = 0 or b$$lit$$ = 0;
id $id $id2 $$id $ $1 $$$ id$$$ 1$ $$ _$ b$$lit$$
select id+$id+$$id from t;
id+$id+$$id
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
create view $view as select id, $id2 from t;
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
select * from $view;
id $id2
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
drop view `$view`;
create table tpart (
firstname varchar(25) NOT NULL,
lastname varchar(25) NOT NULL,
username varchar(16) NOT NULL,
email varchar(35),
`$joined` date not null
)
partition by key(`$joined`) partitions 6;
drop table tpart;
prepare $stmt from 'select $$id, $id, `$$` from t';
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
execute $stmt;
$$id $id $$
set @table_name:='t';
set @sql:=concat('select $$id, $id, `$$` from ', @table_name);
prepare dynamic_stmt from @sql;
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
execute dynamic_stmt;
$$id $id $$
create schema $s;
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
create table $s.$t($id int);
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
select $s.$t.$id from $s.$t;
$id
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
select $s.`$t`.`$id` from $s.`$t`;
$id
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
drop table `$s`.`$t`;
drop schema `$s`;
create procedure $p(in $i int)
begin
declare $id1 int;
select b$$lit$$ into $id1 from t where id = $i;
end//
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
call $p(3);
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1329 No data - zero rows fetched, selected, or processed
drop procedure `$p`;
create function $f($i int) returns int no sql
begin
return `$i` * 2;
end//
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
select $f(2);
$f(2)
4
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
drop function `$f`;
create role $username@$hostname.$domainname.com;
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
drop role $username@$hostname.$domainname.com;
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
set @$myvar = true;
select count(*) from t where @$myvar;
count(*)
0
select 8.0 $p, 8.4$p, .0$p, 8.$p, 8.p;
$p $p $p $p p
8.0 8.4 0.0 8 8
Warnings:
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
select .$p;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.$p' at line 1
show warnings;
Level Code Message
Warning 1681 '$ as the first character of an unquoted identifier' is deprecated and will be removed in a future release.
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.$p' at line 1
SELECT JSON_EXTRACT('{"id": "3", "$name": "Barney"}', "$.id");
JSON_EXTRACT('{"id": "3", "$name": "Barney"}', "$.id")
"3"
SELECT JSON_EXTRACT('{"id": "3", "$name": "$Barney"}', "$.$name");
JSON_EXTRACT('{"id": "3", "$name": "$Barney"}', "$.$name")
"$Barney"
PROMPT set to '$aa'
PROMPT set to '$aa$'
drop table t;
2 changes: 1 addition & 1 deletion mysql-test/r/opt_hints.result
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,7 @@ SELECT /*+ NO_ICP(3rd_index) */ 1 FROM t1;
1
Warnings:
Warning 3128 Unresolved name `3rd_index`@`select#1` for NO_ICP hint
CREATE INDEX $index ON t1(j, i);
CREATE INDEX `$index` ON t1(j, i);
SELECT /*+ NO_ICP($index) */ 1 FROM t1;
1
Warnings:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ if ($tablespace == 'tblsp') {

# Check for compressed tables without File_block_size.
--echo #Create table with tablespace
CREATE TABLESPACE $tablespace ADD DATAFILE '$tablespace.ibd'
eval CREATE TABLESPACE $tablespace ADD DATAFILE '$tablespace.ibd'
ENGINE=InnoDB;

CREATE TABLE tab(c1 TEXT, c2 BLOB) TABLESPACE $tablespace;
eval CREATE TABLE tab(c1 TEXT, c2 BLOB) TABLESPACE $tablespace;

# Check for compressed tables with File_block_size.
CREATE TABLESPACE tblsp1 ADD DATAFILE 'tblsp1.ibd' FILE_BLOCK_SIZE=1k
Expand Down Expand Up @@ -139,7 +139,7 @@ DROP TABLE tab;
# Drop only when tablespace is set
if ($tablespace == 'tblsp') {
DROP TABLE tab1;
DROP TABLESPACE $tablespace;
eval DROP TABLESPACE $tablespace;
DROP TABLESPACE tblsp1;
}

Expand Down
18 changes: 9 additions & 9 deletions mysql-test/suite/innodb/r/default_row_format_tablespace.result
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ SELECT @@innodb_default_row_format;
@@innodb_default_row_format
dynamic
#Create table with tablespace
CREATE TABLESPACE $tablespace ADD DATAFILE '$tablespace.ibd'
CREATE TABLESPACE tblsp ADD DATAFILE 'tblsp.ibd'
ENGINE=InnoDB;
CREATE TABLE tab(c1 TEXT, c2 BLOB) TABLESPACE $tablespace;
CREATE TABLE tab(c1 TEXT, c2 BLOB) TABLESPACE tblsp;
CREATE TABLESPACE tblsp1 ADD DATAFILE 'tblsp1.ibd' FILE_BLOCK_SIZE=1k
ENGINE=InnoDB;
CREATE TABLE tab1(c1 TEXT, c2 BLOB) KEY_BLOCK_SIZE=1 TABLESPACE tblsp1;
Expand All @@ -88,7 +88,7 @@ mtr/asserted_test_suppressions mtr/asserted_test_suppressions 33 4 Dynamic 0 Sin
mtr/global_suppressions mtr/global_suppressions 33 4 Dynamic 0 Single
mtr/test_ignored_global_suppressions mtr/test_ignored_global_suppressions 33 4 Dynamic 0 Single
mtr/test_suppressions mtr/test_suppressions 33 4 Dynamic 0 Single
test/tab $tablespace 161 5 Dynamic 0 General
test/tab tblsp 161 5 Dynamic 0 General
test/tab1 tblsp1 163 5 Compressed 1024 General
ALTER TABLE tab ROW_FORMAT=COMPACT;
=== information_schema.innodb_tables and innodb_tablespaces ===
Expand All @@ -97,7 +97,7 @@ mtr/asserted_test_suppressions mtr/asserted_test_suppressions 33 4 Dynamic 0 Sin
mtr/global_suppressions mtr/global_suppressions 33 4 Dynamic 0 Single
mtr/test_ignored_global_suppressions mtr/test_ignored_global_suppressions 33 4 Dynamic 0 Single
mtr/test_suppressions mtr/test_suppressions 33 4 Dynamic 0 Single
test/tab $tablespace 129 5 Compact 0 General
test/tab tblsp 129 5 Compact 0 General
test/tab1 tblsp1 163 5 Compressed 1024 General
CHECK TABLE tab;
Table Op Msg_type Msg_text
Expand All @@ -109,7 +109,7 @@ mtr/asserted_test_suppressions mtr/asserted_test_suppressions 33 4 Dynamic 0 Sin
mtr/global_suppressions mtr/global_suppressions 33 4 Dynamic 0 Single
mtr/test_ignored_global_suppressions mtr/test_ignored_global_suppressions 33 4 Dynamic 0 Single
mtr/test_suppressions mtr/test_suppressions 33 4 Dynamic 0 Single
test/tab $tablespace 161 5 Dynamic 0 General
test/tab tblsp 161 5 Dynamic 0 General
test/tab1 tblsp1 163 5 Compressed 1024 General
CHECK TABLE tab;
Table Op Msg_type Msg_text
Expand All @@ -121,13 +121,13 @@ mtr/asserted_test_suppressions mtr/asserted_test_suppressions 33 4 Dynamic 0 Sin
mtr/global_suppressions mtr/global_suppressions 33 4 Dynamic 0 Single
mtr/test_ignored_global_suppressions mtr/test_ignored_global_suppressions 33 4 Dynamic 0 Single
mtr/test_suppressions mtr/test_suppressions 33 4 Dynamic 0 Single
test/tab $tablespace 128 5 Redundant 0 General
test/tab tblsp 128 5 Redundant 0 General
test/tab1 tblsp1 163 5 Compressed 1024 General
CHECK TABLE tab;
Table Op Msg_type Msg_text
test.tab check status OK
ALTER TABLE tab ROW_FORMAT=COMPRESSED;
ERROR HY000: InnoDB: Tablespace `$tablespace` cannot contain a COMPRESSED table
ERROR HY000: InnoDB: Tablespace `tblsp` cannot contain a COMPRESSED table
ALTER TABLE tab1 ROW_FORMAT=DYNAMIC;
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'KEY_BLOCK_SIZE'
SELECT NAME,ROW_FORMAT FROM INFORMATION_SCHEMA.INNODB_TABLES
Expand All @@ -147,14 +147,14 @@ mtr/asserted_test_suppressions mtr/asserted_test_suppressions 33 4 Dynamic 0 Sin
mtr/global_suppressions mtr/global_suppressions 33 4 Dynamic 0 Single
mtr/test_ignored_global_suppressions mtr/test_ignored_global_suppressions 33 4 Dynamic 0 Single
mtr/test_suppressions mtr/test_suppressions 33 4 Dynamic 0 Single
test/tab $tablespace 161 5 Dynamic 0 General
test/tab tblsp 161 5 Dynamic 0 General
test/tab1 tblsp1 163 5 Compressed 1024 General
CHECK TABLE tab;
Table Op Msg_type Msg_text
test.tab check status OK
DROP TABLE tab;
DROP TABLE tab1;
DROP TABLESPACE $tablespace;
DROP TABLESPACE tblsp;
DROP TABLESPACE tblsp1;
SET GLOBAL innodb_file_per_table=Default;
SELECT @@innodb_default_row_format;
Expand Down
8 changes: 4 additions & 4 deletions mysql-test/suite/innodb/r/virtual_basic.result
Original file line number Diff line number Diff line change
Expand Up @@ -983,13 +983,13 @@ replace into t set a = 'a',b =1;
drop table t;
CREATE TABLE t1 (doc JSON);
ALTER TABLE t1
ADD COLUMN $col_varchar VARCHAR(10) GENERATED ALWAYS AS
ADD COLUMN `$col_varchar` VARCHAR(10) GENERATED ALWAYS AS
(JSON_UNQUOTE(JSON_EXTRACT(doc, '$.col_varchar'))),
ADD COLUMN $col_int INT GENERATED ALWAYS AS (JSON_EXTRACT(doc,
ADD COLUMN `$col_int` INT GENERATED ALWAYS AS (JSON_EXTRACT(doc,
'$.col_int'));
ALTER TABLE t1 ADD COLUMN $col_1 INT GENERATED ALWAYS AS (JSON_EXTRACT(doc,
ALTER TABLE t1 ADD COLUMN `$col_1` INT GENERATED ALWAYS AS (JSON_EXTRACT(doc,
'$.col_1'));
ALTER TABLE t1 DROP COLUMN $col_varchar, DROP COLUMN $col_int;
ALTER TABLE t1 DROP COLUMN `$col_varchar`, DROP COLUMN `$col_int`;
DROP TABLE t1;
CREATE TABLE t (a INT, b INT, h VARCHAR(10));
INSERT INTO t VALUES (12, 3, "ss");
Expand Down
8 changes: 4 additions & 4 deletions mysql-test/suite/innodb/t/virtual_basic.test
Original file line number Diff line number Diff line change
Expand Up @@ -823,14 +823,14 @@ drop table t;
# Test on dropping multiple virtual columns
CREATE TABLE t1 (doc JSON);
ALTER TABLE t1
ADD COLUMN $col_varchar VARCHAR(10) GENERATED ALWAYS AS
ADD COLUMN `$col_varchar` VARCHAR(10) GENERATED ALWAYS AS
(JSON_UNQUOTE(JSON_EXTRACT(doc, '$.col_varchar'))),
ADD COLUMN $col_int INT GENERATED ALWAYS AS (JSON_EXTRACT(doc,
ADD COLUMN `$col_int` INT GENERATED ALWAYS AS (JSON_EXTRACT(doc,
'$.col_int'));
ALTER TABLE t1 ADD COLUMN $col_1 INT GENERATED ALWAYS AS (JSON_EXTRACT(doc,
ALTER TABLE t1 ADD COLUMN `$col_1` INT GENERATED ALWAYS AS (JSON_EXTRACT(doc,
'$.col_1'));

ALTER TABLE t1 DROP COLUMN $col_varchar, DROP COLUMN $col_int;
ALTER TABLE t1 DROP COLUMN `$col_varchar`, DROP COLUMN `$col_int`;

DROP TABLE t1;

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/x/r/admin_create_index_spatial.result
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Got expected error (code 0)

1 rows affected
Got expected error (code 0)
doc _id ST_ASGEOJSON($ix_gj_r_9BDE81F857CBD7E27CAED548ED36F57CE4307F0B)
doc _id ST_ASGEOJSON(`$ix_gj_r_9BDE81F857CBD7E27CAED548ED36F57CE4307F0B`)
{"_id": "five", "first": {"type": "MultiLineString", "coordinates": [[[10, 10], [20, 20], [10, 40]], [[40, 40], [30, 30], [40, 20], [30, 10]]]}} five {"type": "MultiLineString", "coordinates": [[[10.0, 10.0], [20.0, 20.0], [10.0, 40.0]], [[40.0, 40.0], [30.0, 30.0], [40.0, 20.0], [30.0, 10.0]]]}
{"_id": "four", "first": {"type": "MultiPoint", "coordinates": [[10, 40], [40, 30], [20, 20], [30, 10]]}} four {"type": "MultiPoint", "coordinates": [[10.0, 40.0], [40.0, 30.0], [20.0, 20.0], [30.0, 10.0]]}
{"_id": "one", "first": {"type": "Point", "coordinates": [10, 11]}} one {"type": "Point", "coordinates": [10.0, 11.0]}
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/suite/x/r/create_index_crud.result
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ doc _id _json_schema $ix_t13_r_5E11219941D8F091BF6F252A48E0EEAA9D734FF9 $ix_i_1C
{"_id": 4, "col1": "val4", "col2": 102} 4 {"type": "object"} val4 102
{"_id": 5, "col1": "val5"} 5 {"type": "object"} val5 null
0 rows affected
RUN SELECT _id,doc, CONCAT("Prefix",$ix_t13_r_5E11219941D8F091BF6F252A48E0EEAA9D734FF9) , $ix_i_1C70785A292B9A2762EFA186DFCFB4F03C660E7F
RUN SELECT _id,doc, CONCAT("Prefix",`$ix_t13_r_5E11219941D8F091BF6F252A48E0EEAA9D734FF9`) , `$ix_i_1C70785A292B9A2762EFA186DFCFB4F03C660E7F`
FROM xplugintest.table2
_id doc CONCAT("Prefix",$ix_t13_r_5E11219941D8F091BF6F252A48E0EEAA9D734FF9) $ix_i_1C70785A292B9A2762EFA186DFCFB4F03C660E7F
_id doc CONCAT("Prefix",`$ix_t13_r_5E11219941D8F091BF6F252A48E0EEAA9D734FF9`) $ix_i_1C70785A292B9A2762EFA186DFCFB4F03C660E7F
0 {"_id": 0, "col1": "01234567890123456789"} Prefix01234567890123456789 null
1 {"_id": 1, "col1": "val1", "col2": 101} Prefixval1 101
4 {"_id": 4, "col1": "val4", "col2": 102} Prefixval4 102
Expand All @@ -89,7 +89,7 @@ Mysqlx.Error {
sql_state: "42000"
}

RUN ALTER TABLE xplugintest.table2 ADD COLUMN $ix_t13_bf29f74d5ecec695774cb5b3f1ff979e7643bf36 TEXT
RUN ALTER TABLE xplugintest.table2 ADD COLUMN `$ix_t13_bf29f74d5ecec695774cb5b3f1ff979e7643bf36` TEXT

0 rows affected
Records: 0 Duplicates: 0 Warnings: 0
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/x/r/performance_schema_stmt.result
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ CREATE TABLE `xtest`.`test2` (doc JSON,_id VARBINARY(32) GENERATED ALWAYS AS (JS
SELECT @@sql_mode
SELECT COUNT(*) AS cnt,COUNT(CASE WHEN (column_name = 'doc' AND data_type = 'json') THEN 1 ELSE NULL END) AS doc,COUNT(CASE WHEN (column_name = '_id' AND generation_expression RLIKE '^json_unquote\\(json_extract\\(`doc`,(_[[:alnum:]]+)?\\\\''\\$\\._id\\\\''\\)\\)$') THEN 1 ELSE NULL END) AS id,COUNT(CASE WHEN (column_name != '_id' AND column_name != 'doc' AND column_name != '_json_schema' AND generation_expression RLIKE 'json_extract\\(`doc`,(_[[:alnum:]]+)?\\\\''\\$((\\*{2})?(\\[([[:digit:]]+|\\*)\\]|\\.([[:alpha:]_\\$][[:alnum:]_\\$]*|\\*|\\".*\\"|`.*`)))*\\\\''\\)') THEN 1 ELSE NULL END) AS gen, COUNT(CASE WHEN (column_name = '_json_schema') THEN 1 ELSE NULL END) AS validation_schema FROM information_schema.columns WHERE table_name = 'test2' AND table_schema = 'xtest'
SELECT @@lower_case_table_names
ALTER TABLE `xtest`.`test2` MODIFY COLUMN _json_schema JSON GENERATED ALWAYS AS ('{"type":"object"}') VIRTUAL, ALTER CHECK $val_strict_7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E NOT ENFORCED
ALTER TABLE `xtest`.`test2` MODIFY COLUMN _json_schema JSON GENERATED ALWAYS AS ('{"type":"object"}') VIRTUAL, ALTER CHECK `$val_strict_7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E` NOT ENFORCED
0 rows affected
######### get validation error when working with collections #########

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/x/t/admin_create_index_spatial.test
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ SHOW STATUS LIKE 'Mysqlx_stmt_execute_mysqlx';
-->callmacro Insert spatial1 '{"_id": "five", "first":{"type": "MultiLineString", "coordinates": [[[10, 10], [20, 20], [10, 40]], [[40, 40], [30, 30], [40, 20], [30, 10]]]}}' ER_SUCCESS
-->callmacro Insert spatial1 '{"_id": "six", "first":{"type": "MultiPolygon", "coordinates": [[[[40, 40], [20, 45], [45, 30], [40, 40]]], [[[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]]]]}}' ER_SUCCESS
-->callmacro Insert spatial1 '{"_id": "seven", "first":{"type": "GeometryCollection", "geometries": [{"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [10, 20]}]}]}}' ER_SUCCESS
-->stmtsql SELECT doc,_id,ST_ASGEOJSON($ix_gj_r_9BDE81F857CBD7E27CAED548ED36F57CE4307F0B) FROM xtest.spatial1;
-->stmtsql SELECT doc,_id,ST_ASGEOJSON(`$ix_gj_r_9BDE81F857CBD7E27CAED548ED36F57CE4307F0B`) FROM xtest.spatial1;
-->recvresult
-->echo Using of index give an unexpected result and it caused by another bug
-->callmacro Show_use_of_index spatial1 MBRContains(st_geomfromgeojson(doc->'$.first',1,4326),st_geomfromtext('point(10 11)',4326))
Expand Down
Loading

0 comments on commit b359f84

Please sign in to comment.