mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Post-merge fixes.
This commit is contained in:
parent
c8585f3283
commit
f9e73c7716
12 changed files with 65 additions and 67 deletions
|
@ -828,14 +828,14 @@ DROP DATABASE mysqltest;
|
|||
SELECT * FROM test.t1;
|
||||
a
|
||||
USE test;
|
||||
drop table t1;
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 8
|
||||
Qcache_inserts 9
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 6
|
||||
|
@ -848,7 +848,7 @@ Variable_name Value
|
|||
Qcache_queries_in_cache 1
|
||||
show status like "Qcache_inserts";
|
||||
Variable_name Value
|
||||
Qcache_inserts 9
|
||||
Qcache_inserts 10
|
||||
show status like "Qcache_hits";
|
||||
Variable_name Value
|
||||
Qcache_hits 7
|
||||
|
|
|
@ -31,7 +31,7 @@ n
|
|||
4
|
||||
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 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 244 # Master master-bin.000001 244 No #
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 731 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 304 # Master master-bin.000001 304 No #
|
||||
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
||||
select * from t1;
|
||||
n
|
||||
|
|
|
@ -35,7 +35,7 @@ call foo()|
|
|||
ERROR 42000: PROCEDURE foo does not exist
|
||||
drop procedure if exists foo|
|
||||
Warnings:
|
||||
Warning 1289 PROCEDURE foo does not exist
|
||||
Warning 1292 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 1295 Referring to uninitialized variable y
|
||||
Warning 1298 Referring to uninitialized variable y
|
||||
drop procedure foo|
|
||||
create procedure foo()
|
||||
return 42|
|
||||
|
|
|
@ -360,7 +360,7 @@ set sql_log_bin=1;
|
|||
set sql_log_off=1;
|
||||
set sql_log_update=1;
|
||||
Warnings:
|
||||
Note 1299 The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored.
|
||||
Note 1302 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;
|
||||
|
|
|
@ -32,18 +32,18 @@ create function func1() returns int
|
|||
return 42|
|
||||
|
||||
# Can't create recursively
|
||||
--error 1287
|
||||
--error 1290
|
||||
create procedure foo()
|
||||
create procedure bar() set @x=3|
|
||||
--error 1287
|
||||
--error 1290
|
||||
create procedure foo()
|
||||
create function bar() returns double return 2.3|
|
||||
|
||||
# Already exists
|
||||
--error 1288
|
||||
--error 1291
|
||||
create procedure proc1()
|
||||
set @x = 42|
|
||||
--error 1288
|
||||
--error 1291
|
||||
create function func1() returns int
|
||||
return 42|
|
||||
|
||||
|
@ -51,39 +51,39 @@ drop procedure proc1|
|
|||
drop function func1|
|
||||
|
||||
# Does not exist
|
||||
--error 1289
|
||||
--error 1292
|
||||
alter procedure foo|
|
||||
--error 1289
|
||||
--error 1292
|
||||
alter function foo|
|
||||
--error 1289
|
||||
--error 1292
|
||||
drop procedure foo|
|
||||
--error 1289
|
||||
--error 1292
|
||||
drop function foo|
|
||||
--error 1289
|
||||
--error 1292
|
||||
call foo()|
|
||||
drop procedure if exists foo|
|
||||
--error 1289
|
||||
--error 1292
|
||||
show create procedure foo|
|
||||
|
||||
# LEAVE/ITERATE with no match
|
||||
--error 1292
|
||||
--error 1295
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
leave bar;
|
||||
end loop|
|
||||
--error 1292
|
||||
--error 1295
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
iterate bar;
|
||||
end loop|
|
||||
--error 1292
|
||||
--error 1295
|
||||
create procedure foo()
|
||||
foo: begin
|
||||
iterate foo;
|
||||
end|
|
||||
|
||||
# Redefining label
|
||||
--error 1293
|
||||
--error 1296
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
foo: loop
|
||||
|
@ -92,7 +92,7 @@ foo: loop
|
|||
end loop foo|
|
||||
|
||||
# End label mismatch
|
||||
--error 1294
|
||||
--error 1297
|
||||
create procedure foo()
|
||||
foo: loop
|
||||
set @x=2;
|
||||
|
@ -107,12 +107,12 @@ end|
|
|||
drop procedure foo|
|
||||
|
||||
# RETURN in FUNCTION only
|
||||
--error 1297
|
||||
--error 1300
|
||||
create procedure foo()
|
||||
return 42|
|
||||
|
||||
# Doesn't allow queries in FUNCTIONs (for now :-( )
|
||||
--error 1298
|
||||
--error 1301
|
||||
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 1302
|
||||
--error 1305
|
||||
call p()|
|
||||
--error 1302
|
||||
--error 1305
|
||||
call p(1, 2)|
|
||||
--error 1302
|
||||
--error 1305
|
||||
select f()|
|
||||
--error 1302
|
||||
--error 1305
|
||||
select f(1, 2)|
|
||||
|
||||
drop procedure p|
|
||||
drop function f|
|
||||
|
||||
--error 1303
|
||||
--error 1306
|
||||
create procedure p(val int, out res int)
|
||||
begin
|
||||
declare x int default 0;
|
||||
|
@ -152,7 +152,7 @@ begin
|
|||
end if;
|
||||
end|
|
||||
|
||||
--error 1303
|
||||
--error 1306
|
||||
create procedure p(val int, out res int)
|
||||
begin
|
||||
declare x int default 0;
|
||||
|
@ -167,7 +167,7 @@ begin
|
|||
end if;
|
||||
end|
|
||||
|
||||
--error 1304
|
||||
--error 1307
|
||||
create function f(val int) returns int
|
||||
begin
|
||||
declare x int;
|
||||
|
@ -185,12 +185,12 @@ begin
|
|||
end if;
|
||||
end|
|
||||
|
||||
--error 1305
|
||||
--error 1308
|
||||
select f(10)|
|
||||
|
||||
drop function f|
|
||||
|
||||
--error 1306
|
||||
--error 1309
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for insert into test.t1 values ("foo", 42);
|
||||
|
@ -199,7 +199,7 @@ begin
|
|||
close c;
|
||||
end|
|
||||
|
||||
--error 1307
|
||||
--error 1310
|
||||
create procedure p()
|
||||
begin
|
||||
declare x int;
|
||||
|
@ -209,7 +209,7 @@ begin
|
|||
close c;
|
||||
end|
|
||||
|
||||
--error 1308
|
||||
--error 1311
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for select * from test.t;
|
||||
|
@ -231,7 +231,7 @@ begin
|
|||
open c;
|
||||
close c;
|
||||
end|
|
||||
--error 1309
|
||||
--error 1312
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
|
@ -243,11 +243,11 @@ begin
|
|||
close c;
|
||||
close c;
|
||||
end|
|
||||
--error 1310
|
||||
--error 1313
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
--error 1289
|
||||
--error 1292
|
||||
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 1311
|
||||
--error 1314
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for select * from t1;
|
||||
|
@ -281,7 +281,7 @@ begin
|
|||
fetch c into x;
|
||||
close c;
|
||||
end|
|
||||
--error 1312
|
||||
--error 1315
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
|
@ -296,34 +296,34 @@ begin
|
|||
fetch c into x, y, z;
|
||||
close c;
|
||||
end|
|
||||
--error 1312
|
||||
--error 1315
|
||||
call p()|
|
||||
drop procedure p|
|
||||
|
||||
--error 1314
|
||||
--error 1317
|
||||
create procedure p(in x int, x char(10))
|
||||
begin
|
||||
end|
|
||||
--error 1314
|
||||
--error 1317
|
||||
create function p(x int, x char(10))
|
||||
begin
|
||||
end|
|
||||
|
||||
--error 1315
|
||||
--error 1318
|
||||
create procedure p()
|
||||
begin
|
||||
declare x float;
|
||||
declare x int;
|
||||
end|
|
||||
|
||||
--error 1316
|
||||
--error 1319
|
||||
create procedure p()
|
||||
begin
|
||||
declare c condition for 1064;
|
||||
declare c condition for 1065;
|
||||
end|
|
||||
|
||||
--error 1317
|
||||
--error 1320
|
||||
create procedure p()
|
||||
begin
|
||||
declare c cursor for select * from t1;
|
||||
|
@ -347,13 +347,13 @@ drop procedure bug1965|
|
|||
#
|
||||
# BUG#1966
|
||||
#
|
||||
--error 1311
|
||||
--error 1314
|
||||
select 1 into a|
|
||||
|
||||
#
|
||||
# BUG#336
|
||||
#
|
||||
--error 1319
|
||||
--error 1322
|
||||
create procedure bug336(id char(16))
|
||||
begin
|
||||
declare x int;
|
||||
|
@ -363,7 +363,7 @@ end|
|
|||
#
|
||||
# BUG#1654
|
||||
#
|
||||
--error 1298
|
||||
--error 1301
|
||||
create function bug1654()
|
||||
returns int
|
||||
return (select sum(t.data) from test.t2 t)|
|
||||
|
@ -401,7 +401,7 @@ begin
|
|||
fetch c1 into v1;
|
||||
end|
|
||||
|
||||
--error 1310
|
||||
--error 1313
|
||||
call bug2259()|
|
||||
drop procedure bug2259|
|
||||
|
||||
|
|
|
@ -236,6 +236,7 @@ public:
|
|||
{
|
||||
cleanup();
|
||||
delete this;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ Item_sum_sum_distinct::Item_sum_sum_distinct(Item *item)
|
|||
|
||||
|
||||
Item_sum_sum_distinct::Item_sum_sum_distinct(THD *thd,
|
||||
Item_sum_sum_distinct &original)
|
||||
Item_sum_sum_distinct *original)
|
||||
:Item_sum_num(thd, original), sum(0.0), tree(0)
|
||||
{
|
||||
quick_group= 0;
|
||||
|
@ -297,7 +297,7 @@ Item_sum_sum_distinct::~Item_sum_sum_distinct()
|
|||
Item *
|
||||
Item_sum_sum_distinct::copy_or_same(THD *thd)
|
||||
{
|
||||
return new (&thd->mem_root) Item_sum_sum_distinct(thd, *this);
|
||||
return new (&thd->mem_root) Item_sum_sum_distinct(thd, this);
|
||||
}
|
||||
|
||||
C_MODE_START
|
||||
|
|
|
@ -166,7 +166,7 @@ class Item_sum_sum_distinct :public Item_sum_num
|
|||
double sum;
|
||||
Unique *tree;
|
||||
private:
|
||||
Item_sum_sum_distinct(THD *thd, Item_sum_sum_distinct &item);
|
||||
Item_sum_sum_distinct(THD *thd, Item_sum_sum_distinct *item);
|
||||
public:
|
||||
Item_sum_sum_distinct(Item *item_par);
|
||||
~Item_sum_sum_distinct();
|
||||
|
|
|
@ -251,7 +251,7 @@ static SYMBOL symbols[] = {
|
|||
{ "KEY", SYM(KEY_SYM)},
|
||||
{ "KEYS", SYM(KEYS)},
|
||||
{ "KILL", SYM(KILL_SYM)},
|
||||
{ "LANGUAGE", SYM(LANGAUGE_SYM)},
|
||||
{ "LANGUAGE", SYM(LANGUAGE_SYM)},
|
||||
{ "LAST", SYM(LAST_SYM)},
|
||||
{ "LEADING", SYM(LEADING)},
|
||||
{ "LEAVE", SYM(LEAVE_SYM)},
|
||||
|
@ -487,7 +487,7 @@ static SYMBOL symbols[] = {
|
|||
{ "VARIABLES", SYM(VARIABLES)},
|
||||
{ "VARYING", SYM(VARYING)},
|
||||
{ "WARNINGS", SYM(WARNINGS)},
|
||||
{ "WEEK", SYM(WEEK_SYM)},
|
||||
{ "WEEK", SYM(WEEK_SYM)},
|
||||
{ "WHEN", SYM(WHEN_SYM)},
|
||||
{ "WHERE", SYM(WHERE)},
|
||||
{ "WHILE", SYM(WHILE_SYM)},
|
||||
|
@ -721,7 +721,6 @@ static SYMBOL sql_functions[] = {
|
|||
{ "UPPER", F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ucase)},
|
||||
{ "VARIANCE", SYM(VARIANCE_SYM)},
|
||||
{ "VERSION", F_SYM(FUNC_ARG0),0,CREATE_FUNC(create_func_version)},
|
||||
{ "WEEK", SYM(WEEK_SYM)},
|
||||
{ "WEEKDAY", F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_weekday)},
|
||||
{ "WEEKOFYEAR", F_SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_weekofyear)},
|
||||
{ "WITHIN", F_SYM(FUNC_ARG2),0,CREATE_FUNC_GEOM(create_func_within)},
|
||||
|
|
|
@ -304,17 +304,14 @@ class SQL_SELECT :public Sql_alloc {
|
|||
};
|
||||
|
||||
|
||||
class FT_SELECT: public QUICK_SELECT {
|
||||
class FT_SELECT: public QUICK_RANGE_SELECT {
|
||||
public:
|
||||
FT_SELECT(THD *thd, TABLE *table, uint key):
|
||||
QUICK_SELECT (thd, table, key, 1) { init(); }
|
||||
FT_SELECT(THD *thd, TABLE *table, uint key) :
|
||||
QUICK_RANGE_SELECT (thd, table, key, 1) { init(); }
|
||||
|
||||
int init() { return error= file->ft_init(); }
|
||||
int get_next() { return error= file->ft_read(record); }
|
||||
int init() { return error=file->ft_init(); }
|
||||
int get_next() { return error=file->ft_read(record); }
|
||||
int get_type() { return QS_TYPE_FULLTEXT; }
|
||||
};
|
||||
|
||||
|
||||
QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
|
||||
struct st_table_ref *ref);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -504,7 +504,7 @@ db_show_routine_status(THD *thd, int type, const char *wild)
|
|||
}
|
||||
|
||||
/* Init fields */
|
||||
setup_tables(&tables);
|
||||
setup_tables(&tables, 0);
|
||||
for (used_field= &used_fields[0];
|
||||
used_field->field_name;
|
||||
used_field++)
|
||||
|
|
|
@ -5754,6 +5754,7 @@ simple_ident:
|
|||
(Item*) new Item_field(NullS,NullS,$1.str) :
|
||||
(Item*) new Item_ref(0,0, NullS,NullS,$1.str);
|
||||
}
|
||||
}
|
||||
| simple_ident_q { $$= $1; }
|
||||
;
|
||||
|
||||
|
@ -5764,7 +5765,7 @@ simple_ident_nospvar:
|
|||
$$= (sel->parsing_place != SELECT_LEX_NODE::IN_HAVING ||
|
||||
sel->get_in_sum_expr() > 0) ?
|
||||
(Item*) new Item_field(NullS,NullS,$1.str) :
|
||||
(Item*) new Item_ref(NullS,NullS,$1.str);
|
||||
(Item*) new Item_ref(0,0,NullS,NullS,$1.str);
|
||||
}
|
||||
| simple_ident_q { $$= $1; }
|
||||
;
|
||||
|
|
Loading…
Add table
Reference in a new issue