mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
e17562b55a
Added framework to create/drop and manager buffers for multiple key caches include/my_getopt.h: Fixed prototype include/my_sys.h: Added (temporary) KEY_CACHE type include/mysqld_error.h: New error messages mysql-test/r/select_safe.result: Updated test results mysql-test/r/variables.result: Updated test results mysys/my_getopt.c: Fixed bugs with GET_ASK_ADDR sql/Makefile.am: Make sql_yacc.o depend on all header files in sql directory sql/item_func.cc: Added support for variable components sql/mysql_priv.h: Added support for variable components sql/mysqld.cc: Added support for multiple key caches sql/set_var.cc: Added support for multiple key caches sql/set_var.h: Added support for multiple key caches sql/share/czech/errmsg.txt: New error messages sql/share/danish/errmsg.txt: New error messages sql/share/dutch/errmsg.txt: New error messages sql/share/english/errmsg.txt: New error messages sql/share/estonian/errmsg.txt: New error messages sql/share/french/errmsg.txt: New error messages sql/share/german/errmsg.txt: New error messages sql/share/greek/errmsg.txt: New error messages sql/share/hungarian/errmsg.txt: New error messages sql/share/italian/errmsg.txt: New error messages sql/share/japanese/errmsg.txt: New error messages sql/share/korean/errmsg.txt: New error messages sql/share/norwegian-ny/errmsg.txt: New error messages sql/share/norwegian/errmsg.txt: New error messages sql/share/polish/errmsg.txt: New error messages sql/share/portuguese/errmsg.txt: New error messages sql/share/romanian/errmsg.txt: New error messages sql/share/russian/errmsg.txt: New error messages sql/share/serbian/errmsg.txt: New error messages sql/share/slovak/errmsg.txt: New error messages sql/share/spanish/errmsg.txt: New error messages sql/share/swedish/errmsg.txt: New error messages sql/share/ukrainian/errmsg.txt: New error messages sql/sql_lex.cc: Fixes for quoting of variables. sql/sql_parse.cc: Fix after changing prototype for get_system_var sql/sql_show.cc: Fix after introducing variable components sql/sql_yacc.yy: Support for variables with components (To support multiple key caches)
63 lines
2.3 KiB
Text
63 lines
2.3 KiB
Text
drop table if exists t1;
|
|
SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=4, SQL_MAX_JOIN_SIZE=9;
|
|
create table t1 (a int auto_increment primary key, b char(20));
|
|
insert into t1 values(1,"test");
|
|
SELECT SQL_BUFFER_RESULT * from t1;
|
|
a b
|
|
1 test
|
|
update t1 set b="a" where a=1;
|
|
delete from t1 where a=1;
|
|
insert into t1 values(1,"test"),(2,"test2");
|
|
SELECT SQL_BUFFER_RESULT * from t1;
|
|
a b
|
|
1 test
|
|
2 test2
|
|
update t1 set b="a" where a=1;
|
|
select 1 from t1,t1 as t2,t1 as t3,t1 as t4;
|
|
1
|
|
1
|
|
1
|
|
1
|
|
1
|
|
update t1 set b="a";
|
|
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
|
update t1 set b="a" where b="test";
|
|
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
|
delete from t1;
|
|
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
|
delete from t1 where b="test";
|
|
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
|
delete from t1 where a+0=1;
|
|
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
|
select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5;
|
|
ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok
|
|
update t1 set b="a" limit 1;
|
|
update t1 set b="a" where b="b" limit 2;
|
|
delete from t1 where b="test" limit 1;
|
|
delete from t1 where a+0=1 limit 2;
|
|
SET MAX_JOIN_SIZE=2;
|
|
SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS;
|
|
@@MAX_JOIN_SIZE @@SQL_BIG_SELECTS
|
|
2 0
|
|
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
|
|
SELECT * from t1;
|
|
ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok
|
|
SET SQL_BIG_SELECTS=1;
|
|
SELECT * from t1;
|
|
a b
|
|
3 a
|
|
2 test2
|
|
4 a
|
|
5 a
|
|
SET MAX_JOIN_SIZE=2;
|
|
SELECT * from t1;
|
|
ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok
|
|
SET MAX_JOIN_SIZE=DEFAULT;
|
|
SELECT * from t1;
|
|
a b
|
|
3 a
|
|
2 test2
|
|
4 a
|
|
5 a
|
|
drop table t1;
|
|
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, SQL_MAX_JOIN_SIZE=DEFAULT;
|