Commit d42b1458 authored by pem@mysql.comhem.se's avatar pem@mysql.comhem.se

Post-merge fixes, some quite complex. client/mysqlbinlog.cc and sql/log_event.cc

merged manually by guilhem.
parent dfd59e29
This diff is collapsed.
......@@ -311,41 +311,41 @@
#define ER_TRUNCATED_WRONG_VALUE 1292
#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293
#define ER_INVALID_ON_UPDATE 1294
#define ER_SP_NO_RECURSIVE_CREATE 1294
#define ER_SP_ALREADY_EXISTS 1295
#define ER_SP_DOES_NOT_EXIST 1296
#define ER_SP_DROP_FAILED 1297
#define ER_SP_STORE_FAILED 1298
#define ER_SP_LILABEL_MISMATCH 1299
#define ER_SP_LABEL_REDEFINE 1300
#define ER_SP_LABEL_MISMATCH 1301
#define ER_SP_UNINIT_VAR 1302
#define ER_SP_BADSELECT 1303
#define ER_SP_BADRETURN 1304
#define ER_SP_BADSTATEMENT 1305
#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1306
#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1307
#define ER_QUERY_INTERRUPTED 1308
#define ER_SP_WRONG_NO_OF_ARGS 1309
#define ER_SP_COND_MISMATCH 1310
#define ER_SP_NORETURN 1311
#define ER_SP_NORETURNEND 1312
#define ER_SP_BAD_CURSOR_QUERY 1313
#define ER_SP_BAD_CURSOR_SELECT 1314
#define ER_SP_CURSOR_MISMATCH 1315
#define ER_SP_CURSOR_ALREADY_OPEN 1316
#define ER_SP_CURSOR_NOT_OPEN 1317
#define ER_SP_UNDECLARED_VAR 1318
#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1319
#define ER_SP_FETCH_NO_DATA 1320
#define ER_SP_DUP_PARAM 1321
#define ER_SP_DUP_VAR 1322
#define ER_SP_DUP_COND 1323
#define ER_SP_DUP_CURS 1324
#define ER_SP_CANT_ALTER 1325
#define ER_SP_SUBSELECT_NYI 1326
#define ER_SP_NO_USE 1327
#define ER_SP_VARCOND_AFTER_CURSHNDLR 1328
#define ER_SP_CURSOR_AFTER_HANDLER 1329
#define ER_SP_CASE_NOT_FOUND 1330
#define ER_ERROR_MESSAGES 331
#define ER_SP_NO_RECURSIVE_CREATE 1295
#define ER_SP_ALREADY_EXISTS 1296
#define ER_SP_DOES_NOT_EXIST 1297
#define ER_SP_DROP_FAILED 1298
#define ER_SP_STORE_FAILED 1299
#define ER_SP_LILABEL_MISMATCH 1300
#define ER_SP_LABEL_REDEFINE 1301
#define ER_SP_LABEL_MISMATCH 1302
#define ER_SP_UNINIT_VAR 1303
#define ER_SP_BADSELECT 1304
#define ER_SP_BADRETURN 1305
#define ER_SP_BADSTATEMENT 1306
#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1307
#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1308
#define ER_QUERY_INTERRUPTED 1309
#define ER_SP_WRONG_NO_OF_ARGS 1310
#define ER_SP_COND_MISMATCH 1311
#define ER_SP_NORETURN 1312
#define ER_SP_NORETURNEND 1313
#define ER_SP_BAD_CURSOR_QUERY 1314
#define ER_SP_BAD_CURSOR_SELECT 1315
#define ER_SP_CURSOR_MISMATCH 1316
#define ER_SP_CURSOR_ALREADY_OPEN 1317
#define ER_SP_CURSOR_NOT_OPEN 1318
#define ER_SP_UNDECLARED_VAR 1319
#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1320
#define ER_SP_FETCH_NO_DATA 1321
#define ER_SP_DUP_PARAM 1322
#define ER_SP_DUP_VAR 1323
#define ER_SP_DUP_COND 1324
#define ER_SP_DUP_CURS 1325
#define ER_SP_CANT_ALTER 1326
#define ER_SP_SUBSELECT_NYI 1327
#define ER_SP_NO_USE 1328
#define ER_SP_VARCOND_AFTER_CURSHNDLR 1329
#define ER_SP_CURSOR_AFTER_HANDLER 1330
#define ER_SP_CASE_NOT_FOUND 1331
#define ER_ERROR_MESSAGES 332
......@@ -9,6 +9,10 @@ select get_lock("a",10);
get_lock("a",10)
1
show binlog events;
master-bin.000001 246 Query 1 246 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
master-bin.000001 375 Query 1 375 use `drop-temp+table-test`; DO RELEASE_LOCK("a")
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
master-bin.000001 95 Query 1 190 use `test`; create database `drop-temp+table-test`
master-bin.000001 190 Query 1 306 use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001 306 Query 1 457 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
master-bin.000001 457 Query 1 550 use `drop-temp+table-test`; DO RELEASE_LOCK("a")
drop database `drop-temp+table-test`;
......@@ -324,6 +324,7 @@ f_double_u 0
f_float_u 0
f_double_15_1_u 0.0
f_float_3_1_u 0.0
use test;
drop table if exists t1,t2,t3;
create table t1(id1 int not null auto_increment primary key, t char(12));
create table t2(id2 int not null, t char(12));
......
......@@ -14,6 +14,7 @@ insert into t1 values ("Alas");
flush logs;
--- Local --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1000000000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
......@@ -26,13 +27,14 @@ insert into t1 values ("abirvalg");
SET INSERT_ID=1;
SET TIMESTAMP=1000000000;
insert into t2 values ();
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-1-0' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-2-0' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-3-0' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-4-0' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-5-0' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-1-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-2-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-3-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-4-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-5-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
--- Broken LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1000000000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
......@@ -40,9 +42,11 @@ SET @@session.sql_mode=0;
insert into t1 values ("Alas");
--- --database --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
SET INSERT_ID=1;
--- --position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1000000000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
......@@ -50,6 +54,7 @@ SET @@session.sql_mode=0;
insert into t1 values ("Alas");
--- Remote --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1000000000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
......@@ -62,10 +67,14 @@ insert into t1 values ("abirvalg");
SET INSERT_ID=1;
SET TIMESTAMP=1000000000;
insert into t2 values ();
SET TIMESTAMP=1000000000;
insert into t1 values ("Alas");
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-1-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-2-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-3-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-4-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-5-1' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word);
--- Broken LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1000000000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
......@@ -73,22 +82,11 @@ SET @@session.sql_mode=0;
insert into t1 values ("Alas");
--- --database --
use test;
SET TIMESTAMP=1000000000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
SET @@session.sql_mode=0;
create table t1 (word varchar(20));
SET TIMESTAMP=1000000000;
create table t2 (id int auto_increment not null primary key);
SET TIMESTAMP=1000000000;
insert into t1 values ("abirvalg");
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
SET INSERT_ID=1;
SET TIMESTAMP=1000000000;
insert into t2 values ();
SET TIMESTAMP=1000000000;
insert into t1 values ("Alas");
--- --position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
use test;
SET TIMESTAMP=1000000000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
......
......@@ -857,7 +857,7 @@ Variable_name Value
Qcache_queries_in_cache 0
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 9
Qcache_inserts 11
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 6
......@@ -870,7 +870,7 @@ Variable_name Value
Qcache_queries_in_cache 1
show status like "Qcache_inserts";
Variable_name Value
Qcache_inserts 10
Qcache_inserts 12
show status like "Qcache_hits";
Variable_name Value
Qcache_hits 7
......
......@@ -9,7 +9,7 @@ insert into t1 values (1),(1);
ERROR 23000: Duplicate entry '1' for key 1
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 213 slave-relay-bin.000002 257 master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 213 257 None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 273 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 273 # None 0 No #
show tables like 't1';
Tables_in_test (t1)
drop table t1;
......@@ -26,14 +26,14 @@ select (@id := id) - id from t3;
0
kill @id;
drop table t2,t3;
show binlog events from 79;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 79 Query 1 79 use `test`; create table t1 (a int primary key)
master-bin.000001 149 Query 1 149 use `test`; insert into t1 values (1),(1)
master-bin.000001 213 Query 1 213 use `test`; drop table t1
master-bin.000001 261 Query 1 261 use `test`; create table t2 (a int primary key)
master-bin.000001 331 Query 1 331 use `test`; insert into t2 values(1)
master-bin.000001 390 Query 1 390 use `test`; create table t3 (id int)
master-bin.000001 449 Query 1 449 use `test`; insert into t3 values(connection_id())
master-bin.000001 522 Query 1 522 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
master-bin.000001 613 Query 1 613 use `test`; drop table t2,t3
show binlog events from 95;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 95 Query 1 187 use `test`; create table t1 (a int primary key)
master-bin.000001 187 Query 1 273 use `test`; insert into t1 values (1),(1)
master-bin.000001 273 Query 1 343 use `test`; drop table t1
master-bin.000001 343 Query 1 435 use `test`; create table t2 (a int primary key)
master-bin.000001 435 Query 1 516 use `test`; insert into t2 values(1)
master-bin.000001 516 Query 1 597 use `test`; create table t3 (id int)
master-bin.000001 597 Query 1 692 use `test`; insert into t3 values(connection_id())
master-bin.000001 692 Query 1 805 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
master-bin.000001 805 Query 1 878 use `test`; drop table t2,t3
......@@ -16,6 +16,9 @@ master_pos_wait('master-bin.001',3000)>=0
select max(a) from t1;
max(a)
8000
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 687207 # # master-bin.000001 Yes Yes 0 0 687207 # None 0 No #
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 1
......@@ -31,7 +34,4 @@ Binlog_cache_use 2
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 687207 # # master-bin.000001 Yes Yes 0 0 687207 # None 0 No #
drop table t1;
......@@ -10,4 +10,4 @@ reset slave;
start slave;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 slave-relay-bin.000002 123 master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 79 326 None 0 No #
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 # # master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 79 # None 0 No #
......@@ -35,7 +35,7 @@ call foo()|
ERROR 42000: PROCEDURE foo does not exist
drop procedure if exists foo|
Warnings:
Warning 1292 PROCEDURE foo does not exist
Warning 1297 PROCEDURE foo does not exist
show create procedure foo|
ERROR 42000: PROCEDURE foo does not exist
create procedure foo()
......@@ -71,7 +71,7 @@ declare y int;
set x = y;
end|
Warnings:
Warning 1298 Referring to uninitialized variable y
Warning 1303 Referring to uninitialized variable y
drop procedure foo|
create procedure foo()
return 42|
......
......@@ -1048,7 +1048,7 @@ drop table if exists t3|
create table t3 (s1 smallint)|
insert into t3 values (123456789012)|
Warnings:
Warning 1263 Data truncated, out of range for column 's1' at row 1
Warning 1264 Data truncated, out of range for column 's1' at row 1
create procedure bug2780()
begin
declare exit handler for sqlwarning set @x = 1;
......
......@@ -8,6 +8,7 @@ help_keyword
help_relation
help_topic
host
proc
tables_priv
user
show create table db;
......
......@@ -364,7 +364,7 @@ set sql_log_bin=1;
set sql_log_off=1;
set sql_log_update=1;
Warnings:
Note 1302 The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
Note 1307 The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
set sql_low_priority_updates=1;
set sql_max_join_size=200;
select @@sql_max_join_size,@@max_join_size;
......
......@@ -48,7 +48,7 @@ connection master;
--error 0,1053;
reap;
connection master1;
show binlog events from 79;
show binlog events from 95;
save_master_pos;
connection slave;
# SQL slave thread should not have stopped (because table of the killed
......
......@@ -32,18 +32,18 @@ create function func1() returns int
return 42|
# Can't create recursively
--error 1290
--error 1295
create procedure foo()
create procedure bar() set @x=3|
--error 1290
--error 1295
create procedure foo()
create function bar() returns double return 2.3|
# Already exists
--error 1291
--error 1296
create procedure proc1()
set @x = 42|
--error 1291
--error 1296
create function func1() returns int
return 42|
......@@ -51,39 +51,39 @@ drop procedure proc1|
drop function func1|
# Does not exist
--error 1292
--error 1297
alter procedure foo|
--error 1292
--error 1297
alter function foo|
--error 1292
--error 1297
drop procedure foo|
--error 1292
--error 1297
drop function foo|
--error 1292
--error 1297
call foo()|
drop procedure if exists foo|
--error 1292
--error 1297
show create procedure foo|
# LEAVE/ITERATE with no match
--error 1295
--error 1300
create procedure foo()
foo: loop
leave bar;
end loop|
--error 1295
--error 1300
create procedure foo()
foo: loop
iterate bar;
end loop|
--error 1295
--error 1300
create procedure foo()
foo: begin
iterate foo;
end|
# Redefining label
--error 1296
--error 1301
create procedure foo()
foo: loop
foo: loop
......@@ -92,7 +92,7 @@ foo: loop
end loop foo|
# End label mismatch
--error 1297
--error 1302
create procedure foo()
foo: loop
set @x=2;
......@@ -107,12 +107,12 @@ end|
drop procedure foo|
# RETURN in FUNCTION only
--error 1300
--error 1305
create procedure foo()
return 42|
# Doesn't allow queries in FUNCTIONs (for now :-( )
--error 1301
--error 1306
create function foo() returns int
begin
declare x int;
......@@ -126,19 +126,19 @@ create procedure p(x int)
create function f(x int) returns int
return x+42|
--error 1305
--error 1310
call p()|
--error 1305
--error 1310
call p(1, 2)|
--error 1305
--error 1310
select f()|
--error 1305
--error 1310
select f(1, 2)|
drop procedure p|
drop function f|
--error 1306
--error 1311
create procedure p(val int, out res int)
begin
declare x int default 0;
......@@ -152,7 +152,7 @@ begin
end if;
end|
--error 1306
--error 1311
create procedure p(val int, out res int)
begin
declare x int default 0;
......@@ -167,7 +167,7 @@ begin
end if;
end|
--error 1307
--error 1312
create function f(val int) returns int
begin
declare x int;
......@@ -185,12 +185,12 @@ begin
end if;
end|
--error 1308
--error 1313
select f(10)|
drop function f|
--error 1309
--error 1314
create procedure p()
begin
declare c cursor for insert into test.t1 values ("foo", 42);
......@@ -199,7 +199,7 @@ begin
close c;
end|
--error 1310
--error 1315
create procedure p()
begin
declare x int;
......@@ -209,7 +209,7 @@ begin
close c;
end|
--error 1311
--error 1316
create procedure p()
begin
declare c cursor for select * from test.t;
......@@ -231,7 +231,7 @@ begin
open c;
close c;
end|
--error 1312
--error 1317
call p()|
drop procedure p|
......@@ -243,11 +243,11 @@ begin
close c;
close c;
end|
--error 1313
--error 1318
call p()|
drop procedure p|
--error 1292
--error 1297
alter procedure bar3 sql security invoker|
--error 1059
alter procedure bar3 name
......@@ -261,7 +261,7 @@ drop table if exists t1|
create table t1 (val int, x float)|
insert into t1 values (42, 3.1), (19, 1.2)|
--error 1314
--error 1319
create procedure p()
begin
declare x int;
......@@ -281,7 +281,7 @@ begin
fetch c into x;
close c;
end|
--error 1315
--error 1320
call p()|
drop procedure p|
......@@ -296,34 +296,34 @@ begin
fetch c into x, y, z;
close c;
end|
--error 1315
--error 1320
call p()|
drop procedure p|
--error 1317
--error 1322
create procedure p(in x int, x char(10))
begin
end|
--error 1317
--error 1322
create function p(x int, x char(10))
begin
end|
--error 1318
--error 1323
create procedure p()
begin
declare x float;
declare x int;
end|
--error 1319
--error 1324
create procedure p()
begin
declare c condition for 1064;
declare c condition for 1065;
end|
--error 1320
--error 1325
create procedure p()
begin
declare c cursor for select * from t1;
......@@ -331,18 +331,18 @@ begin
end|
# USE is not allowed
--error 1323
--error 1328
create procedure u()
use sptmp|
# Enforced standard order of declarations
--error 1324
--error 1329
create procedure p()
begin
declare c cursor for select * from t1;
declare x int;
end|
--error 1324
--error 1329
create procedure p()
begin
declare x int;
......@@ -350,7 +350,7 @@ begin
declare foo condition for sqlstate '42S99';
end|
--error 1325
--error 1330
create procedure p()
begin
declare x int;
......@@ -375,13 +375,13 @@ drop procedure bug1965|
#
# BUG#1966
#
--error 1314
--error 1319
select 1 into a|
#
# BUG#336
#
--error 1322
--error 1327
create procedure bug336(id char(16))
begin
declare x int;
......@@ -391,7 +391,7 @@ end|
#
# BUG#1654
#
--error 1301
--error 1306
create function bug1654()
returns int
return (select sum(t.data) from test.t2 t)|
......@@ -429,7 +429,7 @@ begin
fetch c1 into v1;
end|
--error 1313
--error 1318
call bug2259()|
drop procedure bug2259|
......@@ -485,7 +485,7 @@ begin
end case;
return 2;
end|
--error 1326
--error 1331
select bug3287()|
drop function bug3287|
......@@ -496,7 +496,7 @@ when 0 then
when 1 then
insert into test.t1 values (x, 1.1);
end case|
--error 1326
--error 1331
call bug3287(2)|
drop procedure bug3287|
......
......@@ -2019,9 +2019,9 @@ build_template(
if (templ_type == ROW_MYSQL_REC_FIELDS &&
((prebuilt->read_just_key && !index_contains_field) ||
(!(fetch_all_in_key && index_contains_field)
(!(fetch_all_in_key && index_contains_field) &&
!(fetch_primary_key_cols &&
dict_table_col_in_clustered_key(index->table, i) &&
dict_table_col_in_clustered_key(index->table, i)) &&
thd->query_id != field->query_id))) {
/* This field is not needed in the query, skip it */
......
This diff is collapsed.
This diff is collapsed.
......@@ -301,35 +301,6 @@ character-set=latin1
"Truncated wrong %-.32s value: '%-.128s'"
"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause"
"Invalid ON UPDATE clause for '%-.64s' field",
"Row %ld was truncated; It contained more data than there where input columns",
"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld",
"Data truncated, out of range for column '%s' at row %ld",
"Data truncated for column '%s' at row %ld",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users",
"Can't revoke all privileges, grant for one or more of the requested users",
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support. They can be used later when MySQL slave with SSL will be started.",
"Server is running in --secure-auth mode, but '%s@%s' has a password in the old format; please change the password to the new format",
"Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d",
"Wrong parameter or combination of parameters for START SLAVE UNTIL",
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart",
"SQL thread is not to be started so UNTIL options are ignored",
"Incorrect index name '%-.100s'",
"Incorrect catalog name '%-.100s'",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
"Unknown table engine '%s'",
"'%s' is deprecated. Use '%s' instead.",
"The target table %-.100s of the %s is not updatable.",
"The '%s' feature was disabled. You need MySQL built with '%s' define to have it working"
"MySQL is started in --skip-grant-tables mode. You can't use this command"
"Can't create a %s from within another stored routine"
"%s %s already exists"
"%s %s does not exist"
......
......@@ -309,35 +309,6 @@ character-set=latin1
"Truncated wrong %-.32s value: '%-.128s'"
"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause"
"Invalid ON UPDATE clause for '%-.64s' field",
"Row %ld was truncated; It contained more data than there where input columns",
"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld",
"Data truncated, out of range for column '%s' at row %ld",
"Data truncated for column '%s' at row %ld",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users",
"Can't revoke all privileges, grant for one or more of the requested users",
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support. They can be used later when MySQL slave with SSL will be started.",
"Server is running in --secure-auth mode, but '%s@%s' has a password in the old format; please change the password to the new format",
"Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d",
"Wrong parameter or combination of parameters for START SLAVE UNTIL",
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart",
"SQL thread is not to be started so UNTIL options are ignored",
"Incorrect index name '%-.100s'",
"Incorrect catalog name '%-.100s'",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
"Unknown table engine '%s'",
"'%s' is deprecated. Use '%s' instead.",
"The target table %-.100s of the %s is not updatable.",
"The '%s' feature was disabled. You need MySQL built with '%s' define to have it working"
"MySQL is started in --skip-grant-tables mode. You can't use this command"
"Can't create a %s from within another stored routine"
"%s %s already exists"
"%s %s does not exist"
......
......@@ -298,40 +298,6 @@ character-set=latin1
"Truncated wrong %-.32s value: '%-.128s'"
"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause"
"Invalid ON UPDATE clause for '%-.64s' field",
"ZLIB: Not enough memory available for zlib",
"ZLIB: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)",
"ZLIB: Input data was corrupted for zlib",
"%d line(s) was(were) cut by group_concat()",
"Row %ld doesn't contain data for all columns",
"Row %ld was truncated; It contained more data than there where input columns",
"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld",
"Data truncated, out of range for column '%s' at row %ld",
"Data truncated for column '%s' at row %ld",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users",
"Can't revoke all privileges, grant for one or more of the requested users",
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support. They can be used later when MySQL slave with SSL will be started.",
"Server is running in --secure-auth mode, but '%s@%s' has a password in the old format; please change the password to the new format",
"Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d",
"Wrong parameter or combination of parameters for START SLAVE UNTIL",
"It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL. Otherwise you will get problems if you get an unexpected slave's mysqld restart",
"SQL thread is not to be started so UNTIL options are ignored",
"Incorrect index name '%-.100s'",
"Incorrect catalog name '%-.100s'",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
"Unknown table engine '%s'",
"'%s' is deprecated. Use '%s' instead.",
"The target table %-.100s of the %s is not updatable.",
"The '%s' feature was disabled. You need MySQL built with '%s' define to have it working",
"MySQL is started in --skip-grant-tables mode. You can't use this command"
"Can't create a %s from within another stored routine"
"%s %s already exists"
"%s %s does not exist"
......
......@@ -303,35 +303,6 @@ character-set=latin7
"Truncated wrong %-.32s value: '%-.128s'"
"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause"
"Invalid ON UPDATE clause for '%-.64s' field",
"Row %ld was truncated; It contained more data than there where input columns",
"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld",
"Data truncated, out of range for column '%s' at row %ld",
"Data truncated for column '%s' at row %ld",
"Using storage engine %s for table '%s'",
"Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'",
"Can't drop one or more of the requested users",
"Can't revoke all privileges, grant for one or more of the requested users",
"Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'",
"Illegal mix of collations for operation '%s'",
"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)",
"Unknown collation: '%-.64s'",
"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support. They can be used later when MySQL slave with SSL will be started.",
"Server is running in --secure-auth mode, but '%s@%s' has a password in the old format; please change the password to the new format",
"Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d",
"Wrong parameter or combination of parameters for START SLAVE UNTIL",
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart",
"SQL thread is not to be started so UNTIL options are ignored",
"Incorrect index name '%-.100s'",
"Incorrect catalog name '%-.100s'",
"Query cache failed to set size %lu, new query cache size is %lu",
"Column '%-.64s' cannot be part of FULLTEXT index",
"Unknown key cache '%-.100s'",
"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work",
"Unknown table engine '%s'",
"'%s' is deprecated. Use '%s' instead.",
"The target table %-.100s of the %s is not updatable.",
"The '%s' feature was disabled. You need MySQL built with '%s' define to have it working"
"MySQL is started in --skip-grant-tables mode. You can't use this command"
"Can't create a %s from within another stored routine"
"%s %s already exists"
"%s %s does not exist"
......
......@@ -548,7 +548,7 @@ db_show_routine_status(THD *thd, int type, const char *wild)
}
/* Init fields */
setup_tables(&tables, 0);
setup_tables(&tables);
for (used_field= &used_fields[0];
used_field->field_name;
used_field++)
......
......@@ -1351,7 +1351,7 @@ bool delayed_insert::handle_inserts(void)
on this table until all entries has been processed
*/
if (group_count++ >= max_rows && (row= rows.head()) &&
(!(row->log_query & DELAYED_LOG_BIN && using_bin_log) ||
(!(row->log_query & using_bin_log) ||
row->query))
{
group_count=0;
......
......@@ -1982,7 +1982,6 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
}
// Must be written before unlock
mysql_update_log.write(thd,thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
thd->clear_error();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment