~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/r/query_cache_ps_no_prot.result

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
529
529
use test;
530
530
 
531
531
########################################################################
 
532
#
 
533
# Bug#27430 Crash in subquery code when in PS and table DDL changed
 
534
# after PREPARE
 
535
# Check the effect of automatic reprepare on query cache
 
536
#
 
537
########################################################################
 
538
drop table if exists t1;
 
539
create table t1 (a varchar(255));
 
540
insert into t1 (a) values ("Pack my box with five dozen liquor jugs.");
 
541
flush status;
 
542
prepare stmt from "select a from t1";
 
543
execute stmt;
 
544
a
 
545
Pack my box with five dozen liquor jugs.
 
546
set @@global.query_cache_size=0;
 
547
alter table t1 add column b int;
 
548
execute stmt;
 
549
a
 
550
Pack my box with five dozen liquor jugs.
 
551
set @@global.query_cache_size=100000;
 
552
execute stmt;
 
553
a
 
554
Pack my box with five dozen liquor jugs.
 
555
execute stmt;
 
556
a
 
557
Pack my box with five dozen liquor jugs.
 
558
#
 
559
# Sic: ALTER TABLE caused an automatic reprepare 
 
560
# of the prepared statement. Since the query cache was disabled
 
561
# at the time of reprepare, the new prepared statement doesn't
 
562
# work with it.
 
563
 
564
show status like 'Qcache_hits';
 
565
Variable_name   Value
 
566
Qcache_hits     0
 
567
show status like 'Qcache_queries_in_cache';
 
568
Variable_name   Value
 
569
Qcache_queries_in_cache 0
 
570
# Cleanup
 
571
deallocate prepare stmt;
 
572
drop table t1;
532
573
set @@global.query_cache_size=@initial_query_cache_size;
533
574
flush status;