diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-03-18 14:20:06 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-03-18 14:20:06 +0400 |
commit | 7d0c354f5c354b45f9d9dadf2ff5ea02ba0b1071 (patch) | |
tree | f78a9c086879b1c4b068d2fb2fd99863beb51141 /mysql-test/t | |
parent | b13ce223a886a0d3a28b243d5fee39ec608d5192 (diff) | |
parent | 6c5cfbbf3399887baff489f089641385c112c9a0 (diff) | |
download | mariadb-git-7d0c354f5c354b45f9d9dadf2ff5ea02ba0b1071.tar.gz |
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/analyze_debug.test | 13 | ||||
-rw-r--r-- | mysql-test/t/derived.test | 19 | ||||
-rw-r--r-- | mysql-test/t/func_json.test | 25 | ||||
-rw-r--r-- | mysql-test/t/gis-rt-precise.test | 22 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 17 |
5 files changed, 96 insertions, 0 deletions
diff --git a/mysql-test/t/analyze_debug.test b/mysql-test/t/analyze_debug.test new file mode 100644 index 00000000000..684011c5aea --- /dev/null +++ b/mysql-test/t/analyze_debug.test @@ -0,0 +1,13 @@ + +--source include/have_debug.inc + +SET @save_use_stat_tables= @@use_stat_tables; +SET use_stat_tables= PREFERABLY; +CREATE TABLE t1 (a int); +insert into t1 values (1),(2),(3); + +SET STATEMENT debug_dbug="d,fail_2call_open_only_one_table" for +ANALYZE TABLE t1; + +drop table t1; +SET use_stat_tables= @save_use_stat_tables; diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index 318cf584348..121e274ceeb 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -929,5 +929,24 @@ drop view v1; drop table t1; --echo # +--echo # MDEV-11363: Assertion `!derived->first_sel ect()->first_inner_unit() || +--echo # derived->first_select()->first_inner_unit()->first_select()-> +--echo # exclude_from_table_unique_test' failed in +--echo # TABLE_LIST::set_check_materialized() +--echo # + +CREATE TABLE t1 (f1 INT); +CREATE TABLE t2 (f2 INT); +CREATE TABLE t3 (f3 INT); +CREATE VIEW v1 AS ( SELECT f1 AS f FROM t1 ) UNION ( SELECT f2 AS f FROM t2 ); +CREATE VIEW v2 AS SELECT f3 AS f FROM t3; +CREATE VIEW v3 AS SELECT f FROM ( SELECT f3 AS f FROM v1, t3 ) AS sq; +CREATE VIEW v4 AS SELECT COUNT(*) as f FROM v3; +REPLACE INTO v2 ( SELECT * FROM v4 ) UNION ( SELECT f FROM v2 ); + +drop view v1,v2,v3,v4; +drop table t1,t2,t3; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/t/func_json.test b/mysql-test/t/func_json.test index 09e4f30c325..74692c475f4 100644 --- a/mysql-test/t/func_json.test +++ b/mysql-test/t/func_json.test @@ -238,3 +238,28 @@ select json_merge('{"a":{"u":12, "x":"b", "r":1}}', '{"a":{"x":"c", "r":2}}') ; select json_compact('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); select json_loose('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); select json_detailed('{"a":1, "b":[1,2,3], "c":{"aa":"v1", "bb": "v2"}}'); + +# +# MDEV-11856 json_search doesn't search for values with double quotes character (") +# + +SELECT JSON_search( '{"x": "\\""}', "one", '"'); +SELECT JSON_search( '{"x": "\\""}', "one", '\\"'); + +# +# MDEV-11833 JSON functions don't seem to respect max_allowed_packet. +# +set @@global.net_buffer_length=1024; +set @@global.max_allowed_packet=2048; +--connect (newconn, localhost, root,,) + +show variables like 'net_buffer_length'; +show variables like 'max_allowed_packet'; +select json_array(repeat('a',1024),repeat('a',1024)); +select json_object("a", repeat('a',1024),"b", repeat('a',1024)); +--connection default + +set @@global.max_allowed_packet = default; +set @@global.net_buffer_length = default; +--disconnect newconn + diff --git a/mysql-test/t/gis-rt-precise.test b/mysql-test/t/gis-rt-precise.test index 4cae10a9076..9c26aa05598 100644 --- a/mysql-test/t/gis-rt-precise.test +++ b/mysql-test/t/gis-rt-precise.test @@ -62,3 +62,25 @@ SELECT fid, AsText(g) FROM t1 WHERE ST_Within(g, DROP TABLE t1; --echo End of 5.5 tests. + +# +# MDEV-12078 Using spatial index changes type from point to geometry. +# +CREATE TABLE t1 ( + coordinate point NOT NULL, + SPATIAL KEY coordinate (coordinate) +) ENGINE=Aria DEFAULT CHARSET=ascii PAGE_CHECKSUM=1; + +SHOW COLUMNS FROM t1; + +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(0 0)")); +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(10 0)")); +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(10 10)")); +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(0 10)")); +INSERT INTO t1 (coordinate) VALUES(ST_PointFromText("POINT(5 5)")); + +SELECT astext(coordinate) FROM t1 WHERE ST_Intersects(ST_LineFromText("LINESTRING(0 0, 10 0, 10 10, 0 10)"), coordinate); + +SHOW COLUMNS FROM t1; + +DROP TABLE t1; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index a97b0b1c815..c354032bc36 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -1750,6 +1750,23 @@ drop database `foo.bar`; --echo End of 10.0 tests +--echo # +--echo # MDEV-10766 Queries which start with WITH clause do not get +--echo # inserted into query cache +--echo # +flush status; +show status like "Qcache_inserts"; +create table t1 (i int); +with cte as (select * from t1) select * from cte; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +with cte as (select * from t1) select * from cte; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_inserts"; +show status like "Qcache_hits"; +drop table t1; + --echo restore defaults SET GLOBAL query_cache_type= default; SET GLOBAL query_cache_size= default; |