mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
14810ff1d3
Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names. changed store_warning() -> push_warning_print() BitKeeper/deleted/.del-rpl000016-slave.opt~ef76f85ddcc13b87: Delete: mysql-test/t/rpl000016-slave.opt BitKeeper/deleted/.del-sel000001.test~9567c1646058cc: Delete: mysql-test/t/sel000001.test BitKeeper/deleted/.del-sel000002.test~9f500639572e18e1: Delete: mysql-test/t/sel000002.test BitKeeper/deleted/.del-sel000003.test~63a5512d18cd20a2: Delete: mysql-test/t/sel000003.test BitKeeper/deleted/.del-sel000001.result~383913ae4505ec86: Delete: mysql-test/r/sel000001.result BitKeeper/deleted/.del-sel000002.result~d1787e6fd5dbc1cc: Delete: mysql-test/r/sel000002.result BitKeeper/deleted/.del-sel000003.result~d7b657b1e3a286a7: Delete: mysql-test/r/sel000003.result BitKeeper/deleted/.del-sel000031.result~d49aeac63ad7db4d: Delete: mysql-test/r/sel000031.result BitKeeper/deleted/.del-sel000031.test~50a19a8e204e99bc: Delete: mysql-test/t/sel000031.test BitKeeper/deleted/.del-sel000032.result~6cb30e23cbca9fb0: Delete: mysql-test/r/sel000032.result BitKeeper/deleted/.del-sel000032.test~e32da7c3fc4b7ace: Delete: mysql-test/t/sel000032.test BitKeeper/deleted/.del-rpl000003.result~68d6ee00beaa011: Delete: mysql-test/r/rpl000003.result BitKeeper/deleted/.del-rpl000003.test~b7cfc4c5576fbafd: Delete: mysql-test/t/rpl000003.test client/mysql.cc: Don't yet print information about SQL help client/mysqltest.c: Added test options: --enable_warnings --disable_warnings --enable_info --disable_info configure.in: changed version number of shared libraries mysql-test/include/master-slave.inc: Don't write warnings on init mysql-test/r/backup.result: Updated results mysql-test/r/bdb.result: Updated results mysql-test/r/bigint.result: Updated results mysql-test/r/bool.result: Updated results mysql-test/r/create.result: Updated results mysql-test/r/delete.result: Updated results mysql-test/r/derived.result: Updated results mysql-test/r/distinct.result: Updated results mysql-test/r/drop.result: Updated results mysql-test/r/flush.result: Updated results mysql-test/r/fulltext.result: Updated results mysql-test/r/fulltext_multi.result: Updated results mysql-test/r/fulltext_order_by.result: Updated results mysql-test/r/func_equal.result: Updated results mysql-test/r/func_in.result: Updated results mysql-test/r/func_set.result: Updated results mysql-test/r/gcc296.result: Updated results mysql-test/r/group_by.result: Updated results mysql-test/r/innodb-deadlock.result: Updated results mysql-test/r/innodb.result: Updated results mysql-test/r/innodb_cache.result: Updated results mysql-test/r/innodb_handler.result: Updated results mysql-test/r/insert.result: Updated results mysql-test/r/insert_select.result: Updated results mysql-test/r/isam.result: Updated results mysql-test/r/join_outer.result: Updated results mysql-test/r/key.result: Updated results mysql-test/r/merge.result: Updated results mysql-test/r/multi_update.result: Updated results mysql-test/r/myisam.result: Updated results mysql-test/r/null.result: Updated results mysql-test/r/null_key.result: Updated results mysql-test/r/odbc.result: Updated results mysql-test/r/olap.result: Updated results mysql-test/r/order_by.result: Updated results mysql-test/r/query_cache.result: Updated results mysql-test/r/rename.result: Updated results mysql-test/r/row.result: Updated results mysql-test/r/rpl000001.result: Updated results mysql-test/r/rpl000002.result: Updated results mysql-test/r/rpl000004.result: Updated results mysql-test/r/rpl000005.result: Updated results mysql-test/r/rpl000006.result: Updated results mysql-test/r/rpl000008.result: Updated results mysql-test/r/rpl000009.result: Updated results mysql-test/r/rpl000010.result: Updated results mysql-test/r/rpl000011.result: Updated results mysql-test/r/rpl000012.result: Updated results mysql-test/r/rpl000013.result: Updated results mysql-test/r/rpl_alter.result: Updated results mysql-test/r/rpl_empty_master_crash.result: Updated results mysql-test/r/rpl_redirect.result: Updated results mysql-test/r/rpl_replicate_do.result: Updated results mysql-test/r/rpl_rotate_logs.result: Updated results mysql-test/r/rpl_skip_error.result: Updated results mysql-test/r/rpl_temporary.result: Updated results mysql-test/r/select.result: Updated results mysql-test/r/subselect.result: Updated results mysql-test/r/temp_table.result: Updated results mysql-test/r/type_date.result: Updated results mysql-test/r/type_float.result: Updated results mysql-test/r/union.result: Updated results mysql-test/r/update.result: Updated results mysql-test/r/user_var.result: Updated results mysql-test/r/varbinary.result: Updated results mysql-test/r/variables.result: Updated results mysql-test/r/warnings.result: Updated results mysql-test/t/alias.test: Don't write warnings when initializing test mysql-test/t/alter_table.test: Don't write warnings when initializing test mysql-test/t/analyse.test: Don't write warnings when initializing test mysql-test/t/auto_increment.test: Don't write warnings when initializing test mysql-test/t/backup.test: Don't write warnings when initializing test mysql-test/t/bdb-alter-table-1.test: Don't write warnings when initializing test mysql-test/t/bdb-crash.test: Don't write warnings when initializing test mysql-test/t/bdb-deadlock.test: Don't write warnings when initializing test mysql-test/t/bdb.test: Don't write warnings when initializing test cleaned up test mysql-test/t/bdb_cache.test: Don't write warnings when initializing test mysql-test/t/bench_count_distinct.test: Don't write warnings when initializing test mysql-test/t/bigint.test: Don't write warnings when initializing test mysql-test/t/binary.test: Don't write warnings when initializing test mysql-test/t/bool.test: Don't write warnings when initializing test Changed to use standard table names mysql-test/t/bulk_replace.test: Don't write warnings when initializing test mysql-test/t/case.test: Don't write warnings when initializing test mysql-test/t/check.test: Don't write warnings when initializing test mysql-test/t/compare.test: Don't write warnings when initializing test mysql-test/t/connect.test: Removed empty line mysql-test/t/constraints.test: Don't write warnings when initializing test mysql-test/t/count_distinct.test: Don't write warnings when initializing test mysql-test/t/count_distinct2.test: Don't write warnings when initializing test mysql-test/t/create.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/ctype_latin1_de.test: Don't write warnings when initializing test mysql-test/t/ctype_many.test: Don't write warnings when initializing test mysql-test/t/delayed.test: Don't write warnings when initializing test mysql-test/t/delete.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/derived.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/dirty_close.test: Don't write warnings when initializing test mysql-test/t/distinct.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/drop.test: Don't write warnings when initializing test mysql-test/t/empty_table.test: Don't write warnings when initializing test mysql-test/t/err000001.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/explain.test: Don't write warnings when initializing test mysql-test/t/flush.test: Don't write warnings when initializing test mysql-test/t/foreign_key.test: Don't write warnings when initializing test mysql-test/t/fulltext.test: Don't write warnings when initializing test mysql-test/t/fulltext_cache.test: Don't write warnings when initializing test mysql-test/t/fulltext_distinct.test: Don't write warnings when initializing test mysql-test/t/fulltext_left_join.test: Don't write warnings when initializing test mysql-test/t/fulltext_multi.test: Don't write warnings when initializing test mysql-test/t/fulltext_order_by.test: Don't write warnings when initializing test mysql-test/t/fulltext_update.test: Don't write warnings when initializing test mysql-test/t/func_concat.test: Don't write warnings when initializing test mysql-test/t/func_date_add.test: Don't write warnings when initializing test mysql-test/t/func_encrypt.test: Don't write warnings when initializing test mysql-test/t/func_equal.test: Don't write warnings when initializing test mysql-test/t/func_group.test: Don't write warnings when initializing test mysql-test/t/func_if.test: Don't write warnings when initializing test mysql-test/t/func_in.test: Don't write warnings when initializing test mysql-test/t/func_isnull.test: Don't write warnings when initializing test mysql-test/t/func_like.test: Don't write warnings when initializing test mysql-test/t/func_regexp.test: Don't write warnings when initializing test mysql-test/t/func_set.test: Don't write warnings when initializing test Merged test with other tests mysql-test/t/func_str.test: Don't write warnings when initializing test mysql-test/t/func_time.test: Don't write warnings when initializing test mysql-test/t/func_timestamp.test: Don't write warnings when initializing test mysql-test/t/gcc296.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/grant_cache.test: Don't write warnings when initializing test mysql-test/t/group_by.test: Don't write warnings when initializing test Cleaned up test mysql-test/t/handler.test: Don't write warnings when initializing test mysql-test/t/having.test: Don't write warnings when initializing test mysql-test/t/heap.test: Don't write warnings when initializing test mysql-test/t/heap_auto_increment.test: Don't write warnings when initializing test mysql-test/t/heap_btree.test: Don't write warnings when initializing test mysql-test/t/heap_hash.test: Don't write warnings when initializing test mysql-test/t/innodb-deadlock.test: Don't write warnings when initializing test mysql-test/t/innodb.test: Don't write warnings when initializing test mysql-test/t/innodb_cache.test: Don't write warnings when initializing test mysql-test/t/innodb_handler.test: Don't write warnings when initializing test mysql-test/t/ins000001.test: Don't write warnings when initializing test mysql-test/t/insert.test: Don't write warnings when initializing test cleaned up test. Changed to use standard database and table names mysql-test/t/insert_select.test: Don't write warnings when initializing test Changed to use standard table names mysql-test/t/insert_update.test: Don't write warnings when initializing test mysql-test/t/isam.test: Don't write warnings when initializing test cleaned up test mysql-test/t/join.test: Don't write warnings when initializing test mysql-test/t/join_crash.test: Don't write warnings when initializing test mysql-test/t/join_outer.test: Don't write warnings when initializing test mysql-test/t/key.test: Don't write warnings when initializing test mysql-test/t/key_diff.test: Don't write warnings when initializing test mysql-test/t/key_primary.test: Don't write warnings when initializing test mysql-test/t/keywords.test: Don't write warnings when initializing test mysql-test/t/kill.test: Don't write warnings when initializing test mysql-test/t/limit.test: Don't write warnings when initializing test mysql-test/t/lock.test: Don't write warnings when initializing test mysql-test/t/lock_multi.test: Don't write warnings when initializing test mysql-test/t/lowercase_table.test: Don't write warnings when initializing test mysql-test/t/merge.test: Don't write warnings when initializing test cleaned up test mysql-test/t/multi_update.test: Don't write warnings when initializing test mysql-test/t/myisam.test: Don't write warnings when initializing test mysql-test/t/null.test: Don't write warnings when initializing test mysql-test/t/null_key.test: Don't write warnings when initializing test mysql-test/t/odbc.test: Don't write warnings when initializing test mysql-test/t/olap.test: Don't write warnings when initializing test mysql-test/t/order_by.test: Don't write warnings when initializing test mysql-test/t/order_fill_sortbuf.test: Don't write warnings when initializing test mysql-test/t/query_cache.test: Don't write warnings when initializing test mysql-test/t/raid.test: Don't write warnings when initializing test mysql-test/t/range.test: Don't write warnings when initializing test mysql-test/t/rename.test: Don't write warnings when initializing test mysql-test/t/repair.test: Don't write warnings when initializing test mysql-test/t/replace.test: Don't write warnings when initializing test mysql-test/t/rollback.test: Don't write warnings when initializing test mysql-test/t/row.test: Don't write warnings when initializing test mysql-test/t/rpl000001.test: Don't write warnings when initializing test mysql-test/t/rpl000002.test: Don't write warnings when initializing test mysql-test/t/rpl000004.test: Don't write warnings when initializing test mysql-test/t/rpl000005.test: Don't write warnings when initializing test mysql-test/t/rpl000006.test: Don't write warnings when initializing test mysql-test/t/rpl000008-slave.opt: Don't write warnings when initializing test mysql-test/t/rpl000008.test: Don't write warnings when initializing test mysql-test/t/rpl000009-slave.opt: Don't write warnings when initializing test mysql-test/t/rpl000009.test: Don't write warnings when initializing test mysql-test/t/rpl000010.test: Don't write warnings when initializing test mysql-test/t/rpl000011.test: Don't write warnings when initializing test mysql-test/t/rpl000012.test: Don't write warnings when initializing test mysql-test/t/rpl000013.test: Don't write warnings when initializing test mysql-test/t/rpl000015.test: Don't write warnings when initializing test mysql-test/t/rpl000017.test: Don't write warnings when initializing test mysql-test/t/rpl000018.test: Don't write warnings when initializing test mysql-test/t/rpl_alter.test: Don't write warnings when initializing test mysql-test/t/rpl_empty_master_crash.test: Don't write warnings when initializing test mysql-test/t/rpl_redirect.test: Don't write warnings when initializing test mysql-test/t/rpl_replicate_do.test: Don't write warnings when initializing test mysql-test/t/rpl_rotate_logs.test: Don't write warnings when initializing test mysql-test/t/rpl_skip_error.test: Don't write warnings when initializing test mysql-test/t/rpl_temporary.test: Don't write warnings when initializing test mysql-test/t/sel000033.test: Don't write warnings when initializing test mysql-test/t/sel000100.test: Don't write warnings when initializing test mysql-test/t/select.test: Don't write warnings when initializing test mysql-test/t/select_found.test: Don't write warnings when initializing test mysql-test/t/select_safe.test: Don't write warnings when initializing test mysql-test/t/show_check.test: Don't write warnings when initializing test mysql-test/t/status.test: Don't write warnings when initializing test mysql-test/t/subselect.test: Don't write warnings when initializing test mysql-test/t/symlink.test: Don't write warnings when initializing test mysql-test/t/tablelock.test: Don't write warnings when initializing test mysql-test/t/temp_table.test: Don't write warnings when initializing test mysql-test/t/truncate.test: Don't write warnings when initializing test mysql-test/t/type_blob.test: Don't write warnings when initializing test mysql-test/t/type_date.test: Don't write warnings when initializing test mysql-test/t/type_datetime.test: Don't write warnings when initializing test mysql-test/t/type_decimal.test: Don't write warnings when initializing test mysql-test/t/type_enum.test: Don't write warnings when initializing test mysql-test/t/type_float.test: Don't write warnings when initializing test mysql-test/t/type_ranges.test: Don't write warnings when initializing test mysql-test/t/type_set.test: Don't write warnings when initializing test mysql-test/t/type_time.test: Don't write warnings when initializing test mysql-test/t/type_timestamp.test: Don't write warnings when initializing test mysql-test/t/type_uint.test: Don't write warnings when initializing test mysql-test/t/type_year.test: Don't write warnings when initializing test mysql-test/t/union.test: Don't write warnings when initializing test mysql-test/t/update.test: Don't write warnings when initializing test mysql-test/t/user_var.test: Don't write warnings when initializing test mysql-test/t/varbinary.test: Don't write warnings when initializing test mysql-test/t/variables.test: Don't write warnings when initializing test mysql-test/t/warnings.test: Don't write warnings when initializing test mysys/my_vsnprintf.c: Safety fix readline/terminal.c: Removed compiler warnings sql/ha_berkeley.cc: Indentation changes sql/mysql_priv.h: Change store_warning -> push_warning_printf sql/sql_db.cc: Change store_warning -> push_warning_printf sql/sql_error.cc: Change store_warning -> push_warning_printf sql/sql_table.cc: Change store_warning -> push_warning_printf
546 lines
12 KiB
Text
546 lines
12 KiB
Text
flush query cache;
|
||
flush query cache;
|
||
reset query cache;
|
||
flush status;
|
||
drop database if exists mysqltest;
|
||
drop table if exists t1,t2,t3,t11,t21, mysqltest.t1;
|
||
create table t1 (a int not null);
|
||
insert into t1 values (1),(2),(3);
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
select sql_no_cache * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
select length(now()) from t1;
|
||
length(now())
|
||
19
|
||
19
|
||
19
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
show status like "Qcache_inserts";
|
||
Variable_name Value
|
||
Qcache_inserts 1
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 1
|
||
drop table t1;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
create table t1 (a int not null);
|
||
insert into t1 values (1),(2),(3);
|
||
create table t2 (a int not null);
|
||
insert into t2 values (4),(5),(6);
|
||
create table t3 (a int not null) type=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST;
|
||
select * from t3;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
select * from t3;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 2
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
insert into t2 values (7);
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 3
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
insert into t3 values (8);
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
select * from t3;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
8
|
||
4
|
||
5
|
||
6
|
||
7
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
update t2 set a=9 where a=7;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
8
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
update t3 set a=10 where a=1;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
select * from t3;
|
||
a
|
||
10
|
||
2
|
||
3
|
||
8
|
||
4
|
||
5
|
||
6
|
||
9
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
delete from t2 where a=9;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
select * from t1;
|
||
a
|
||
10
|
||
2
|
||
3
|
||
8
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
delete from t3 where a=10;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
drop table t1, t2, t3;
|
||
create table t1 (a int not null);
|
||
insert into t1 values (1),(2),(3);
|
||
create table t2 (a int not null);
|
||
insert into t2 values (1),(2),(3);
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
select * from t2;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
insert into t1 values (4);
|
||
show status like "Qcache_free_blocks";
|
||
Variable_name Value
|
||
Qcache_free_blocks 2
|
||
flush query cache;
|
||
show status like "Qcache_free_blocks";
|
||
Variable_name Value
|
||
Qcache_free_blocks 1
|
||
drop table t1, t2;
|
||
create table t1 (a text not null);
|
||
create table t11 (a text not null);
|
||
create table t2 (a text not null);
|
||
create table t21 (a text not null);
|
||
create table t3 (a text not null);
|
||
insert into t1 values("1111111111111111111111111111111111111111111111111111");
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t11 select * from t1;
|
||
insert into t21 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t3 select * from t1;
|
||
insert into t3 select * from t2;
|
||
insert into t3 select * from t1;
|
||
select * from t11;
|
||
select * from t21;
|
||
show status like "Qcache_total_blocks";
|
||
Variable_name Value
|
||
Qcache_total_blocks 7
|
||
show status like "Qcache_free_blocks";
|
||
Variable_name Value
|
||
Qcache_free_blocks 1
|
||
insert into t11 values("");
|
||
select * from t3;
|
||
show status like "Qcache_total_blocks";
|
||
Variable_name Value
|
||
Qcache_total_blocks 8
|
||
show status like "Qcache_free_blocks";
|
||
Variable_name Value
|
||
Qcache_free_blocks 1
|
||
flush query cache;
|
||
show status like "Qcache_total_blocks";
|
||
Variable_name Value
|
||
Qcache_total_blocks 7
|
||
show status like "Qcache_free_blocks";
|
||
Variable_name Value
|
||
Qcache_free_blocks 1
|
||
drop table t1, t2, t3, t11, t21;
|
||
set query_cache_type=demand;
|
||
create table t1 (a int not null);
|
||
insert into t1 values (1),(2),(3);
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
select sql_cache * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
set query_cache_type=2;
|
||
select sql_cache * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 4
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
set query_cache_type=on;
|
||
reset query cache;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
select sql_no_cache * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
drop table t1;
|
||
create table t1 (a text not null);
|
||
select CONNECTION_ID() from t1;
|
||
CONNECTION_ID()
|
||
select FOUND_ROWS();
|
||
FOUND_ROWS()
|
||
0
|
||
select NOW() from t1;
|
||
NOW()
|
||
select CURDATE() from t1;
|
||
CURDATE()
|
||
select CURTIME() from t1;
|
||
CURTIME()
|
||
select DATABASE() from t1;
|
||
DATABASE()
|
||
select ENCRYPT("test") from t1;
|
||
ENCRYPT("test")
|
||
select LAST_INSERT_ID() from t1;
|
||
last_insert_id()
|
||
select RAND() from t1;
|
||
RAND()
|
||
select UNIX_TIMESTAMP() from t1;
|
||
UNIX_TIMESTAMP()
|
||
select USER() from t1;
|
||
USER()
|
||
select benchmark(1,1) from t1;
|
||
benchmark(1,1)
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
create table t2 (a text not null);
|
||
insert into t1 values("1111111111111111111111111111111111111111111111111111");
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 4
|
||
show status like "Qcache_lowmem_prunes";
|
||
Variable_name Value
|
||
Qcache_lowmem_prunes 0
|
||
select a as a1, a as a2 from t1;
|
||
select a as a2, a as a3 from t1;
|
||
select a as a3, a as a4 from t1;
|
||
select a as a1, a as a2 from t1;
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 4
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 2
|
||
show status like "Qcache_lowmem_prunes";
|
||
Variable_name Value
|
||
Qcache_lowmem_prunes 2
|
||
reset query cache;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
insert into t2 select * from t1;
|
||
insert into t1 select * from t2;
|
||
select * from t1;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
drop table t1,t2;
|
||
create database if not exists mysqltest;
|
||
create table mysqltest.t1 (i int not null auto_increment, a int, primary key (i));
|
||
insert into mysqltest.t1 (a) values (1);
|
||
select * from mysqltest.t1 where i is null;
|
||
i a
|
||
1 1
|
||
select * from mysqltest.t1;
|
||
i a
|
||
1 1
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
drop database mysqltest;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
create table t1 (a char(1) not null);
|
||
insert into t1 values("<22>");
|
||
select * from t1;
|
||
a
|
||
<EFBFBD>
|
||
set CHARACTER SET cp1251_koi8;
|
||
select * from t1;
|
||
a
|
||
<EFBFBD>
|
||
set CHARACTER SET DEFAULT;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 2
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 4
|
||
drop table t1;
|
||
create database if not exists mysqltest;
|
||
create table mysqltest.t1 (i int not null);
|
||
create table t1 (i int not null);
|
||
insert into mysqltest.t1 (i) values (1);
|
||
insert into t1 (i) values (2);
|
||
select * from t1;
|
||
i
|
||
2
|
||
use mysqltest;
|
||
select * from t1;
|
||
i
|
||
1
|
||
select * from t1;
|
||
i
|
||
1
|
||
use test;
|
||
select * from t1;
|
||
i
|
||
2
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 2
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 6
|
||
drop database mysqltest;
|
||
drop table t1;
|
||
create table t1 (i int not null);
|
||
insert into t1 (i) values (1),(2),(3),(4);
|
||
select SQL_CALC_FOUND_ROWS * from t1 limit 2;
|
||
i
|
||
1
|
||
2
|
||
select FOUND_ROWS();
|
||
FOUND_ROWS()
|
||
4
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 6
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
select * from t1 where i=1;
|
||
i
|
||
1
|
||
select FOUND_ROWS();
|
||
FOUND_ROWS()
|
||
1
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 6
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 2
|
||
select SQL_CALC_FOUND_ROWS * from t1 limit 2;
|
||
i
|
||
1
|
||
2
|
||
select FOUND_ROWS();
|
||
FOUND_ROWS()
|
||
4
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 7
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 2
|
||
select * from t1 where i=1;
|
||
i
|
||
1
|
||
select FOUND_ROWS();
|
||
FOUND_ROWS()
|
||
1
|
||
show status like "Qcache_hits";
|
||
Variable_name Value
|
||
Qcache_hits 8
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 2
|
||
drop table t1;
|
||
flush query cache;
|
||
reset query cache;
|
||
create table t1 (a int not null);
|
||
insert into t1 values (1),(2),(3);
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
select * from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
insert delayed into t1 values (4);
|
||
select a from t1;
|
||
a
|
||
1
|
||
2
|
||
3
|
||
4
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
drop table t1;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
set GLOBAL query_cache_size=1000;
|
||
show global variables like "query_cache_size";
|
||
Variable_name Value
|
||
query_cache_size 0
|
||
set GLOBAL query_cache_size=1100;
|
||
set GLOBAL query_cache_size=1200;
|
||
set GLOBAL query_cache_size=1300;
|
||
set GLOBAL query_cache_size=1400;
|
||
set GLOBAL query_cache_size=1500;
|
||
set GLOBAL query_cache_size=1600;
|
||
set GLOBAL query_cache_size=1700;
|
||
set GLOBAL query_cache_size=1800;
|
||
set GLOBAL query_cache_size=1900;
|
||
show global variables like "query_cache_size";
|
||
Variable_name Value
|
||
query_cache_size 1024
|
||
set GLOBAL query_cache_size=1048576;
|
||
create table t1 (i int not null);
|
||
create table t2 (i int not null);
|
||
select * from t1;
|
||
i
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 1
|
||
create temporary table t3 (i int not null);
|
||
select * from t2;
|
||
i
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 2
|
||
select * from t3;
|
||
i
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 2
|
||
update t1 set i=(select distinct 1 from (select * from t2) a);
|
||
drop table t1, t2, t3;
|
||
use mysql;
|
||
select * from db;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|
||
use test;
|
||
select * from mysql.db;
|
||
show status like "Qcache_queries_in_cache";
|
||
Variable_name Value
|
||
Qcache_queries_in_cache 0
|