diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-10-13 23:31:03 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-10-13 23:31:03 +0400 |
commit | e2400f188921950a19453dd3955821fe51866a69 (patch) | |
tree | c9252395e6769c668743a695f5ed66315a16cdb2 /mysql-test/r/query_cache_ps_no_prot.result | |
parent | edebd2a2234dabb5bd047059c0d2131814c936db (diff) | |
download | mariadb-git-e2400f188921950a19453dd3955821fe51866a69.tar.gz |
Backport of:
----------------------------------------------------------
revno: 2630.2.6
committer: Konstantin Osipov <konstantin@mysql.com>
branch nick: mysql-6.0-27430
timestamp: Mon 2008-05-26 16:12:28 +0400
message:
Cover four special cases of WL#4166 with tests:
- when the query cache is disabled at the time of prepared statement
reprepare
- when long data parameters are used
- when character_set_connection != character_set_client, and a parameter
conversion takes place
- when parameter data is out of acceptable range, e.g. year 10000 is
supplied as part of MYSQL_TYPE_DATETIME value. The server is supposed
to warn in such case.
mysql-test/include/query_cache_sql_prepare.inc:
Addditional test for Bug#27430
mysql-test/r/query_cache_ps_no_prot.result:
Update result file.
mysql-test/r/query_cache_ps_ps_prot.result:
Update result file.
tests/mysql_client_test.c:
Add more tests (Bug#27430 and WL#4166).
Fix test_datetime_range() test to correctly assert for the number
of warnings. Additionally, print these warnings out.
Diffstat (limited to 'mysql-test/r/query_cache_ps_no_prot.result')
-rw-r--r-- | mysql-test/r/query_cache_ps_no_prot.result | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/query_cache_ps_no_prot.result b/mysql-test/r/query_cache_ps_no_prot.result index 0efb2540c64..f686e876a60 100644 --- a/mysql-test/r/query_cache_ps_no_prot.result +++ b/mysql-test/r/query_cache_ps_no_prot.result @@ -529,5 +529,46 @@ DROP DATABASE mysqltest1; use test; ######################################################################## +# +# Bug#27430 Crash in subquery code when in PS and table DDL changed +# after PREPARE +# Check the effect of automatic reprepare on query cache +# +######################################################################## +drop table if exists t1; +create table t1 (a varchar(255)); +insert into t1 (a) values ("Pack my box with five dozen liquor jugs."); +flush status; +prepare stmt from "select a from t1"; +execute stmt; +a +Pack my box with five dozen liquor jugs. +set @@global.query_cache_size=0; +alter table t1 add column b int; +execute stmt; +a +Pack my box with five dozen liquor jugs. +set @@global.query_cache_size=100000; +execute stmt; +a +Pack my box with five dozen liquor jugs. +execute stmt; +a +Pack my box with five dozen liquor jugs. +# +# Sic: ALTER TABLE caused an automatic reprepare +# of the prepared statement. Since the query cache was disabled +# at the time of reprepare, the new prepared statement doesn't +# work with it. +# +show status like 'Qcache_hits'; +Variable_name Value +Qcache_hits 0 +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +# Cleanup +deallocate prepare stmt; +drop table t1; set @@global.query_cache_size=@initial_query_cache_size; flush status; |