diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-06-05 02:04:32 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-05 02:04:32 +0200 |
commit | f07b3463e7a4ff32316e1cc94d553b5009ac51f2 (patch) | |
tree | 1d75a3c9b8e2c2c6fa063e05c72b5f8330c1918d /mysql-test | |
parent | 980bdc3d64425e329f7742fad04e4bc8547ba6b8 (diff) | |
download | mariadb-git-f07b3463e7a4ff32316e1cc94d553b5009ac51f2.tar.gz |
do not re-populate I_S tables in subqueries
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/information_schema2.result | 12 | ||||
-rw-r--r-- | mysql-test/t/information_schema2.test | 13 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/information_schema2.result b/mysql-test/r/information_schema2.result index 60a20944839..3f7f3ecd4e1 100644 --- a/mysql-test/r/information_schema2.result +++ b/mysql-test/r/information_schema2.result @@ -6,3 +6,15 @@ select variable_name from information_schema.session_variables where variable_na (select variable_name from information_schema.session_variables where variable_name = 'basedir'); variable_name BASEDIR +create table t1 (a char); +insert t1 values ('a'),('t'),('z'); +flush status; +select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1; +a exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) +a 0 +t 1 +z 0 +show status like 'created_tmp_tables'; +Variable_name Value +Created_tmp_tables 38 +drop table t1; diff --git a/mysql-test/t/information_schema2.test b/mysql-test/t/information_schema2.test index c2479087f47..06bc6d1bf55 100644 --- a/mysql-test/t/information_schema2.test +++ b/mysql-test/t/information_schema2.test @@ -7,3 +7,16 @@ select variable_name from information_schema.session_status where variable_name select variable_name from information_schema.session_variables where variable_name = (select variable_name from information_schema.session_variables where variable_name = 'basedir'); +# +# information_schema tables inside subqueries, they should not be re-populated +# (i_s.columns needs to scan i_s itself, creating a tmp table for every i_s +# table. if it's re-populated, it'll do that multiple times) +# +create table t1 (a char); +insert t1 values ('a'),('t'),('z'); +flush status; +select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1; +# fix the result in ps-protocol +--replace_result 39 38 +show status like 'created_tmp_tables'; +drop table t1; |