mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Post-merge fixes.
Note: One sp.test still fails (prime), and rpl_server_id2.test fails (will be fixed by guilhem ASAP). mysql-test/r/index_merge.result: Fixed syntax error (no ',' after last index in create table any more). mysql-test/r/index_merge_bdb.result: Fixed syntax error (no ',' after last index in create table any more). mysql-test/r/index_merge_innodb.result: Fixed syntax error (no ',' after last index in create table any more). mysql-test/r/index_merge_innodb2.result: Fixed syntax error (no ',' after last index in create table any more). mysql-test/r/rpl_server_id1.result: Update result after merge. mysql-test/r/sp-error.result: Update result after merge. mysql-test/r/variables.result: Update result after merge. mysql-test/t/index_merge.test: Fixed syntax error (no ',' after last index in create table any more). mysql-test/t/index_merge_bdb.test: Fixed syntax error (no ',' after last index in create table any more). mysql-test/t/index_merge_innodb.test: Fixed syntax error (no ',' after last index in create table any more). mysql-test/t/index_merge_innodb2.test: Fixed syntax error (no ',' after last index in create table any more). mysql-test/t/sp-error.test: Post-merge fix of error codes. sql/opt_range.cc: Manually merged by Monty. sql/opt_range.h: Manually merged by Monty. sql/slave.cc: Post-merge fixes with some help from Guilhem. sql/slave.h: Post-merge fixes with some help from Guilhem. sql/sp_head.cc: Got rid of warning (reordering initialization). sql/sql_parse.cc: Post-merge fix: Need to set/reset select_limit at SP CALL time as well. tests/client_test.c: Post-merge fix: key_len length in explain has changed.
This commit is contained in:
@ -2,7 +2,7 @@ drop table if exists t0, t1, t2, t3,t4;
|
||||
create table t0
|
||||
(
|
||||
key1 int not null,
|
||||
INDEX i1(key1),
|
||||
INDEX i1(key1)
|
||||
);
|
||||
alter table t0 add key2 int not null, add index i2(key2);
|
||||
alter table t0 add key3 int not null, add index i3(key3);
|
||||
@ -217,7 +217,7 @@ key3 int not null,
|
||||
index i1a (key1a, key1b),
|
||||
index i1b (key1b, key1a),
|
||||
index i2_1(key2, key2_1),
|
||||
index i2_2(key2, key2_1),
|
||||
index i2_2(key2, key2_1)
|
||||
);
|
||||
insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0;
|
||||
select * from t4 where key1a = 3 or key1b = 4;
|
||||
|
@ -6,7 +6,7 @@ key2 int,
|
||||
filler char(200),
|
||||
filler2 char(200),
|
||||
index(key1),
|
||||
index(key2),
|
||||
index(key2)
|
||||
) engine=bdb;
|
||||
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
|
||||
pk key1 key2 filler filler2
|
||||
|
@ -4,7 +4,7 @@ create table t1
|
||||
key1 int not null,
|
||||
key2 int not null,
|
||||
INDEX i1(key1),
|
||||
INDEX i2(key2),
|
||||
INDEX i2(key2)
|
||||
) engine=innodb;
|
||||
explain select * from t1 where key1 < 5 or key2 > 197;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
|
@ -6,7 +6,7 @@ key2 int,
|
||||
filler char(200),
|
||||
filler2 char(200),
|
||||
index(key1),
|
||||
index(key2),
|
||||
index(key2)
|
||||
) engine=innodb;
|
||||
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
|
||||
pk key1 key2 filler filler2
|
||||
|
@ -10,7 +10,7 @@ stop slave;
|
||||
change master to master_port=SLAVE_PORT;
|
||||
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 SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 4 None 0 No NULL
|
||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 95 None 0 No NULL
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
show status like "slave_running";
|
||||
|
@ -35,7 +35,7 @@ call foo()|
|
||||
ERROR 42000: PROCEDURE foo does not exist
|
||||
drop procedure if exists foo|
|
||||
Warnings:
|
||||
Warning 1297 PROCEDURE foo does not exist
|
||||
Warning 1298 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 1303 Referring to uninitialized variable y
|
||||
Warning 1304 Referring to uninitialized variable y
|
||||
drop procedure foo|
|
||||
create procedure foo()
|
||||
return 42|
|
||||
|
@ -364,7 +364,7 @@ set sql_log_bin=1;
|
||||
set sql_log_off=1;
|
||||
set sql_log_update=1;
|
||||
Warnings:
|
||||
Note 1307 The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
|
||||
Note 1308 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;
|
||||
|
@ -10,7 +10,7 @@ drop table if exists t0, t1, t2, t3,t4;
|
||||
create table t0
|
||||
(
|
||||
key1 int not null,
|
||||
INDEX i1(key1),
|
||||
INDEX i1(key1)
|
||||
);
|
||||
|
||||
--disable_query_log
|
||||
@ -192,7 +192,7 @@ create table t4 (
|
||||
index i1b (key1b, key1a),
|
||||
|
||||
index i2_1(key2, key2_1),
|
||||
index i2_2(key2, key2_1),
|
||||
index i2_2(key2, key2_1)
|
||||
);
|
||||
|
||||
insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0;
|
||||
|
@ -14,7 +14,7 @@ create table t1 (
|
||||
filler char(200),
|
||||
filler2 char(200),
|
||||
index(key1),
|
||||
index(key2),
|
||||
index(key2)
|
||||
) engine=bdb;
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ create table t1
|
||||
key2 int not null,
|
||||
|
||||
INDEX i1(key1),
|
||||
INDEX i2(key2),
|
||||
INDEX i2(key2)
|
||||
) engine=innodb;
|
||||
|
||||
--disable_query_log
|
||||
|
@ -14,7 +14,7 @@ create table t1 (
|
||||
filler char(200),
|
||||
filler2 char(200),
|
||||
index(key1),
|
||||
index(key2),
|
||||
index(key2)
|
||||
) engine=innodb;
|
||||
|
||||
|
||||
|
@ -32,18 +32,18 @@ create function func1() returns int
|
||||
return 42|
|
||||
|
||||
# Can't create recursively
|
||||
--error 1295
|
||||
--error 1296
|
||||
create procedure foo()
|
||||
create procedure bar() set @x=3|
|
||||
--error 1295
|
||||
--error 1296
|
||||
create procedure foo()
|
||||
create function bar() returns double return 2.3|
|
||||
|
||||
# Already exists
|
||||
--error 1296
|
||||
--error 1297
|
||||
create procedure proc1()
|
||||
set @x = 42|
|
||||
--error 1296
|
||||
--error 1297
|
||||
create function func1() returns int
|
||||
return 42|
|
||||
|
||||
@ -51,39 +51,39 @@ drop procedure proc1|
|
||||
drop function func1|
|
||||
|
||||
# Does not exist
|
||||
--error 1297
|
||||
--error 1298
|
||||
alter procedure foo|
|
||||
--error 1297
|
||||
--error 1298
|
||||
alter function foo|
|
||||
--error 1297
|
||||
--error 1298
|
||||
drop procedure foo|
|
||||
--error 1297
|
||||
--error 1298
|
||||
drop function foo|
|
||||
--error 1297
|
||||
--error 1298
|
||||
call foo()|
|
||||
drop procedure if exists foo|
|
||||
--error 1297
|
||||
--error 1298
|
||||
show create procedure foo|
|
||||
|
||||
# LEAVE/ITERATE with no match
|
||||
--error 1300
|
||||
--error 1301
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
leave bar;
|
||||
end loop|
|
||||
--error 1300
|
||||
--error 1301
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
iterate bar;
|
||||
end loop|
|
||||
--error 1300
|
||||
--error 1301
|
||||
create procedure foo()
|
||||
foo: begin
|
||||
iterate foo;
|
||||
end|
|
||||
|
||||
# Redefining label
|
||||
--error 1301
|
||||
--error 1302
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
foo: loop
|
||||
@ -92,7 +92,7 @@ foo: loop
|
||||
end loop foo|
|
||||
|
||||
# End label mismatch
|
||||
--error 1302
|
||||
--error 1303
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
set @x=2;
|
||||
@ -107,12 +107,12 @@ end|
|
||||
drop procedure foo|
|
||||
|
||||
# RETURN in FUNCTION only
|
||||
--error 1305
|
||||
--error 1306
|
||||
create procedure foo()
|
||||
return 42|
|
||||
|
||||
# Doesn't allow queries in FUNCTIONs (for now :-( )
|
||||
--error 1306
|
||||
--error 1307
|
||||
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 1310
|
||||
--error 1311
|
||||
call p()|
|
||||
--error 1310
|
||||
--error 1311
|
||||
call p(1, 2)|
|
||||
--error 1310
|
||||
--error 1311
|
||||
select f()|
|
||||
--error 1310
|
||||
--error 1311
|
||||
select f(1, 2)|
|
||||
|
||||
drop procedure p|
|
||||
drop function f|
|
||||
|
||||
--error 1311
|
||||
--error 1312
|
||||
create procedure p(val int, out res int)
|
||||
begin
|
||||
declare x int default 0;
|
||||
@ -152,7 +152,7 @@ begin
|
||||
end if;
|
||||
end|
|
||||
|
||||
--error 1311
|
||||
--error 1312
|
||||
create procedure p(val int, out res int)
|
||||
begin
|
||||
declare x int default 0;
|
||||
@ -167,7 +167,7 @@ begin
|
||||
end if;
|
||||
end|
|
||||
|
||||
--error 1312
|
||||
--error 1313
|
||||
create function f(val int) returns int
|
||||
begin
|
||||
declare x int;
|
||||
@ -185,12 +185,12 @@ begin
|
||||
end if;
|
||||
end|
|
||||
|
||||
--error 1313
|
||||
--error 1314
|
||||
select f(10)|
|
||||
|
||||
drop function f|
|
||||
|
||||
--error 1314
|
||||
--error 1315
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for insert into test.t1 values ("foo", 42);
|
||||
@ -199,7 +199,7 @@ begin
|
||||
close c;
|
||||
end|
|
||||
|
||||
--error 1315
|
||||
--error 1316
|
||||
create procedure p()
|
||||
begin
|
||||
declare x int;
|
||||
@ -209,7 +209,7 @@ begin
|
||||
close c;
|
||||
end|
|
||||
|
||||
--error 1316
|
||||
--error 1317
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for select * from test.t;
|
||||
@ -231,7 +231,7 @@ begin
|
||||
open c;
|
||||
close c;
|
||||
end|
|
||||
--error 1317
|
||||
--error 1318
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
@ -243,11 +243,11 @@ begin
|
||||
close c;
|
||||
close c;
|
||||
end|
|
||||
--error 1318
|
||||
--error 1319
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
--error 1297
|
||||
--error 1298
|
||||
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 1319
|
||||
--error 1320
|
||||
create procedure p()
|
||||
begin
|
||||
declare x int;
|
||||
@ -281,7 +281,7 @@ begin
|
||||
fetch c into x;
|
||||
close c;
|
||||
end|
|
||||
--error 1320
|
||||
--error 1321
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
@ -296,34 +296,34 @@ begin
|
||||
fetch c into x, y, z;
|
||||
close c;
|
||||
end|
|
||||
--error 1320
|
||||
--error 1321
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
--error 1322
|
||||
--error 1323
|
||||
create procedure p(in x int, x char(10))
|
||||
begin
|
||||
end|
|
||||
--error 1322
|
||||
--error 1323
|
||||
create function p(x int, x char(10))
|
||||
begin
|
||||
end|
|
||||
|
||||
--error 1323
|
||||
--error 1324
|
||||
create procedure p()
|
||||
begin
|
||||
declare x float;
|
||||
declare x int;
|
||||
end|
|
||||
|
||||
--error 1324
|
||||
--error 1325
|
||||
create procedure p()
|
||||
begin
|
||||
declare c condition for 1064;
|
||||
declare c condition for 1065;
|
||||
end|
|
||||
|
||||
--error 1325
|
||||
--error 1326
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for select * from t1;
|
||||
@ -331,18 +331,18 @@ begin
|
||||
end|
|
||||
|
||||
# USE is not allowed
|
||||
--error 1328
|
||||
--error 1329
|
||||
create procedure u()
|
||||
use sptmp|
|
||||
|
||||
# Enforced standard order of declarations
|
||||
--error 1329
|
||||
--error 1330
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for select * from t1;
|
||||
declare x int;
|
||||
end|
|
||||
--error 1329
|
||||
--error 1330
|
||||
create procedure p()
|
||||
begin
|
||||
declare x int;
|
||||
@ -350,7 +350,7 @@ begin
|
||||
declare foo condition for sqlstate '42S99';
|
||||
end|
|
||||
|
||||
--error 1330
|
||||
--error 1331
|
||||
create procedure p()
|
||||
begin
|
||||
declare x int;
|
||||
@ -375,13 +375,13 @@ drop procedure bug1965|
|
||||
#
|
||||
# BUG#1966
|
||||
#
|
||||
--error 1319
|
||||
--error 1320
|
||||
select 1 into a|
|
||||
|
||||
#
|
||||
# BUG#336
|
||||
#
|
||||
--error 1327
|
||||
--error 1328
|
||||
create procedure bug336(id char(16))
|
||||
begin
|
||||
declare x int;
|
||||
@ -391,7 +391,7 @@ end|
|
||||
#
|
||||
# BUG#1654
|
||||
#
|
||||
--error 1306
|
||||
--error 1307
|
||||
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 1318
|
||||
--error 1319
|
||||
call bug2259()|
|
||||
drop procedure bug2259|
|
||||
|
||||
@ -485,7 +485,7 @@ begin
|
||||
end case;
|
||||
return 2;
|
||||
end|
|
||||
--error 1331
|
||||
--error 1332
|
||||
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 1331
|
||||
--error 1332
|
||||
call bug3287(2)|
|
||||
drop procedure bug3287|
|
||||
|
||||
|
Reference in New Issue
Block a user