mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge buzz.(none):/home/davi/mysql-5.0-runtime
into buzz.(none):/home/davi/mysql-5.1-runtime mysql-test/r/ps.result: Auto merged mysql-test/t/limit.test: Auto merged mysql-test/t/ps.test: Auto merged sql/item.h: Auto merged sql/item_func.cc: Auto merged sql/sql_class.h: Auto merged sql/item.cc: Auto merged mysql-test/suite/rpl/r/rpl_user_variables.result: Manual merge mysql-test/suite/rpl/t/rpl_user_variables.test: Manual merge sql/sql_yacc.yy: Manual merge
This commit is contained in:
@ -94,6 +94,9 @@ drop table t1;
|
||||
prepare s from "select 1 limit ?";
|
||||
set @a='qwe';
|
||||
execute s using @a;
|
||||
1
|
||||
set @a=-1;
|
||||
execute s using @a;
|
||||
ERROR HY000: Incorrect arguments to EXECUTE
|
||||
prepare s from "select 1 limit 1, ?";
|
||||
execute s using @a;
|
||||
@ -101,4 +104,10 @@ ERROR HY000: Incorrect arguments to EXECUTE
|
||||
prepare s from "select 1 limit ?, ?";
|
||||
execute s using @a, @a;
|
||||
ERROR HY000: Incorrect arguments to EXECUTE
|
||||
set @a=14632475938453979136;
|
||||
execute s using @a, @a;
|
||||
1
|
||||
set @a=-14632475938453979136;
|
||||
execute s using @a, @a;
|
||||
ERROR HY000: Incorrect arguments to EXECUTE
|
||||
End of 5.0 tests
|
||||
|
@ -1885,6 +1885,36 @@ prepare stmt from "create view v1 as select * from t1";
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
prepare stmt from "create view v1 as select * from `t1` `b`";
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
prepare stmt from "select ?";
|
||||
set @arg= 123456789.987654321;
|
||||
select @arg;
|
||||
@arg
|
||||
123456789.987654321
|
||||
execute stmt using @arg;
|
||||
?
|
||||
123456789.987654321
|
||||
set @arg= "string";
|
||||
select @arg;
|
||||
@arg
|
||||
string
|
||||
execute stmt using @arg;
|
||||
?
|
||||
string
|
||||
set @arg= 123456;
|
||||
select @arg;
|
||||
@arg
|
||||
123456
|
||||
execute stmt using @arg;
|
||||
?
|
||||
123456
|
||||
set @arg= cast(-12345.54321 as decimal(20, 10));
|
||||
select @arg;
|
||||
@arg
|
||||
-12345.5432100000
|
||||
execute stmt using @arg;
|
||||
?
|
||||
-12345.5432100000
|
||||
deallocate prepare stmt;
|
||||
End of 5.0 tests.
|
||||
create procedure proc_1() reset query cache;
|
||||
call proc_1();
|
||||
|
@ -235,6 +235,22 @@ select * from t1;
|
||||
a b
|
||||
2 1
|
||||
drop table t1;
|
||||
create table t1(a int);
|
||||
insert into t1 values (1),(2);
|
||||
prepare s1 from 'insert into t1 select a from t1 limit ?';
|
||||
set @x='1.1';
|
||||
execute s1 using @x;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
1
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
1
|
||||
drop table t1;
|
||||
End of 5.0 tests.
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
DROP FUNCTION IF EXISTS f2;
|
||||
|
@ -306,6 +306,23 @@ select * from t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#33851: Passing UNSIGNED param to EXECUTE returns ERROR 1210
|
||||
#
|
||||
|
||||
connection master;
|
||||
create table t1(a int);
|
||||
insert into t1 values (1),(2);
|
||||
prepare s1 from 'insert into t1 select a from t1 limit ?';
|
||||
set @x='1.1';
|
||||
execute s1 using @x;
|
||||
select * from t1;
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
select * from t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
# This test uses a stored function that uses user-defined variables to return data
|
||||
|
@ -76,15 +76,22 @@ drop table t1;
|
||||
# Bug #28464: a string argument to 'limit ?' PS
|
||||
#
|
||||
|
||||
prepare s from "select 1 limit ?";
|
||||
set @a='qwe';
|
||||
--error 1210
|
||||
prepare s from "select 1 limit ?";
|
||||
set @a='qwe';
|
||||
execute s using @a;
|
||||
set @a=-1;
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
execute s using @a;
|
||||
prepare s from "select 1 limit 1, ?";
|
||||
--error 1210
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
execute s using @a;
|
||||
prepare s from "select 1 limit ?, ?";
|
||||
--error 1210
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
execute s using @a, @a;
|
||||
set @a=14632475938453979136;
|
||||
execute s using @a, @a;
|
||||
set @a=-14632475938453979136;
|
||||
--error ER_WRONG_ARGUMENTS
|
||||
execute s using @a, @a;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
@ -1961,6 +1961,25 @@ prepare stmt from "create view v1 as select * from t1";
|
||||
--error ER_NO_SUCH_TABLE
|
||||
prepare stmt from "create view v1 as select * from `t1` `b`";
|
||||
|
||||
#
|
||||
# Bug#33851: Passing UNSIGNED param to EXECUTE returns ERROR 1210
|
||||
#
|
||||
|
||||
prepare stmt from "select ?";
|
||||
set @arg= 123456789.987654321;
|
||||
select @arg;
|
||||
execute stmt using @arg;
|
||||
set @arg= "string";
|
||||
select @arg;
|
||||
execute stmt using @arg;
|
||||
set @arg= 123456;
|
||||
select @arg;
|
||||
execute stmt using @arg;
|
||||
set @arg= cast(-12345.54321 as decimal(20, 10));
|
||||
select @arg;
|
||||
execute stmt using @arg;
|
||||
deallocate prepare stmt;
|
||||
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user