~jlukas79/+junk/mysql-server

« back to all changes in this revision

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

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
show status like "Qcache_queries_in_cache";
43
43
Variable_name   Value
44
44
Qcache_queries_in_cache 0
45
 
create table t1 (a int not null);
 
45
create table t1 (a int not null) ENGINE=MyISAM;
46
46
insert into t1 values (1),(2),(3);
47
 
create table t2 (a int not null);
 
47
create table t2 (a int not null) ENGINE=MyISAM;
48
48
insert into t2 values (4),(5),(6);
49
49
create table t3 (a int not null) engine=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST;
50
50
select * from t3;
176
176
1
177
177
2
178
178
3
179
 
select * from t1 union select sql_cache * from t1;
180
 
a
181
 
1
182
 
2
183
 
3
184
 
select * from t1 where a IN (select sql_cache a from t1);
185
 
a
186
 
1
187
 
2
188
 
3
189
 
select * from t1 where a IN (select a from t1 union select sql_cache a from t1);
190
 
a
191
 
1
192
 
2
193
 
3
194
179
show status like "Qcache_hits";
195
180
Variable_name   Value
196
181
Qcache_hits     4
207
192
1
208
193
2
209
194
3
210
 
select * from t1 union select sql_no_cache * from t1;
211
 
a
212
 
1
213
 
2
214
 
3
215
 
select * from t1 where a IN (select sql_no_cache a from t1);
216
 
a
217
 
1
218
 
2
219
 
3
220
 
select * from t1 where a IN (select a from t1 union select sql_no_cache a from t1);
221
 
a
222
 
1
223
 
2
224
 
3
225
 
select sql_cache sql_no_cache * from t1;
226
 
a
227
 
1
228
 
2
229
 
3
230
 
select sql_cache  * from t1 union select sql_no_cache * from t1;
231
 
a
232
 
1
233
 
2
234
 
3
235
 
select sql_cache * from t1 where a IN (select sql_no_cache a from t1);
236
 
a
237
 
1
238
 
2
239
 
3
240
 
select sql_cache * from t1 where a IN (select a from t1 union select sql_no_cache a from t1);
241
 
a
242
 
1
243
 
2
244
 
3
245
195
show status like "Qcache_queries_in_cache";
246
196
Variable_name   Value
247
197
Qcache_queries_in_cache 0
460
410
drop table t1;
461
411
flush query cache;
462
412
reset query cache;
463
 
create table t1 (a int not null);
 
413
create table t1 (a int not null) ENGINE=MyISAM;
464
414
insert into t1 values (1),(2),(3);
465
415
select * from t1;
466
416
a
889
839
group_concat(a)
890
840
1234567890
891
841
Warnings:
892
 
Warning 1260    1 line(s) were cut by GROUP_CONCAT()
 
842
Warning 1260    Row 1 was cut by GROUP_CONCAT()
893
843
set group_concat_max_len=1024;
894
844
select group_concat(a) FROM t1 group by b;
895
845
group_concat(a)
1490
1440
a
1491
1441
drop table t1;
1492
1442
set GLOBAL query_cache_size= default;
1493
 
set GLOBAL query_cache_size=1000000;
1494
 
create table t1 (a char);
1495
 
insert into t1 values ('c');
1496
 
a
1497
 
drop table t1;
1498
 
set GLOBAL query_cache_size= default;
1499
1443
SET GLOBAL query_cache_size=64*1024*1024;
1500
1444
CREATE TABLE t1 (id INT);
1501
1445
CREATE PROCEDURE proc29856(IN theUPC TEXT)
1706
1650
1
1707
1651
DROP TABLE t1;
1708
1652
End of 5.1 tests
 
1653
CREATE TABLE t1( a INT );
 
1654
SET @v = ( SELECT SQL_CACHE    1 );
 
1655
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 '1 )' at line 1
 
1656
SET @v = ( SELECT SQL_NO_CACHE 1 );
 
1657
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 '1 )' at line 1
 
1658
SELECT a FROM t1 WHERE a IN ( SELECT SQL_CACHE    a FROM t1 );
 
1659
ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list'
 
1660
SELECT a FROM t1 WHERE a IN ( SELECT SQL_NO_CACHE a FROM t1 );
 
1661
ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
 
1662
SELECT ( SELECT SQL_CACHE a FROM t1 );
 
1663
ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list'
 
1664
SELECT ( SELECT SQL_NO_CACHE a FROM t1 );
 
1665
ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
 
1666
SELECT SQL_CACHE * FROM t1;
 
1667
a
 
1668
SELECT SQL_NO_CACHE * FROM t1;
 
1669
a
 
1670
SELECT * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
 
1671
ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
 
1672
SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
 
1673
ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
 
1674
SELECT * FROM t1 WHERE a IN (SELECT SQL_CACHE a FROM t1);
 
1675
ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list'
 
1676
SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 UNION SELECT SQL_CACHE a FROM t1);
 
1677
ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list'
 
1678
SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
 
1679
ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
 
1680
SELECT * FROM t1 WHERE a IN (SELECT SQL_NO_CACHE a FROM t1);
 
1681
ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
 
1682
SELECT * FROM t1 WHERE a IN 
 
1683
(SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1);
 
1684
ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
 
1685
SELECT SQL_CACHE SQL_NO_CACHE * FROM t1;
 
1686
ERROR HY000: Incorrect usage of SQL_CACHE and SQL_NO_CACHE
 
1687
SELECT SQL_NO_CACHE SQL_CACHE * FROM t1;
 
1688
ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE
 
1689
SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
 
1690
ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
 
1691
SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
 
1692
ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
 
1693
SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1;
 
1694
ERROR 42000: Incorrect usage/placement of 'SQL_CACHE'
 
1695
SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1;
 
1696
ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE'
 
1697
SELECT SQL_CACHE * FROM t1 WHERE a IN 
 
1698
(SELECT SQL_NO_CACHE a FROM t1);
 
1699
ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
 
1700
SELECT SQL_CACHE * FROM t1 WHERE a IN 
 
1701
(SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1);
 
1702
ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list'
 
1703
DROP TABLE t1;