Commit 03042c7d authored by unknown's avatar unknown

Post-merge fixes.

parent cd8508d3
...@@ -206,8 +206,9 @@ Q_SERVER_START, Q_SERVER_STOP,Q_REQUIRE_MANAGER, ...@@ -206,8 +206,9 @@ Q_SERVER_START, Q_SERVER_STOP,Q_REQUIRE_MANAGER,
Q_WAIT_FOR_SLAVE_TO_STOP, Q_WAIT_FOR_SLAVE_TO_STOP,
Q_REQUIRE_VERSION, Q_REQUIRE_VERSION,
Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS, Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
Q_ENABLE_INFO, Q_DISABLE_INFO, Q_DELIMITER, Q_ENABLE_INFO, Q_DISABLE_INFO,
Q_EXEC, Q_EXEC,
Q_DELIMITER,
Q_UNKNOWN, /* Unknown command. */ Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */ Q_COMMENT, /* Comments, ignored. */
Q_COMMENT_WITH_COMMAND Q_COMMENT_WITH_COMMAND
......
...@@ -698,7 +698,7 @@ bool Protocol::convert_str(const char *from, uint length) ...@@ -698,7 +698,7 @@ bool Protocol::convert_str(const char *from, uint length)
bool setup_params_data(st_prep_stmt *stmt) bool setup_params_data(st_prep_stmt *stmt)
{ {
THD *thd= stmt->thd; THD *thd= stmt->thd;
List<Item> &params= thd->lex.param_list; List<Item> &params= thd->lex->param_list;
List_iterator<Item> param_iterator(params); List_iterator<Item> param_iterator(params);
Item_param *param; Item_param *param;
ulong param_no= 0; ulong param_no= 0;
...@@ -728,7 +728,7 @@ bool setup_params_data(st_prep_stmt *stmt) ...@@ -728,7 +728,7 @@ bool setup_params_data(st_prep_stmt *stmt)
bool setup_params_data_withlog(st_prep_stmt *stmt) bool setup_params_data_withlog(st_prep_stmt *stmt)
{ {
THD *thd= stmt->thd; THD *thd= stmt->thd;
List<Item> &params= thd->lex.param_list; List<Item> &params= thd->lex->param_list;
List_iterator<Item> param_iterator(params); List_iterator<Item> param_iterator(params);
Item_param *param; Item_param *param;
MYSQL_BIND *client_param= thd->client_params; MYSQL_BIND *client_param= thd->client_params;
......
...@@ -457,10 +457,10 @@ drop table t1,t2; ...@@ -457,10 +457,10 @@ drop table t1,t2;
CREATE TABLE t1 ( CREATE TABLE t1 (
html varchar(5) default NULL, html varchar(5) default NULL,
rin int(11) default '0', rin int(11) default '0',
out int(11) default '0' rout int(11) default '0'
) TYPE=MyISAM; ) TYPE=MyISAM;
INSERT INTO t1 VALUES ('1',1,0); INSERT INTO t1 VALUES ('1',1,0);
SELECT DISTINCT html,SUM(out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin; SELECT DISTINCT html,SUM(rout)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
html prod html prod
1 0.00 1 0.00
drop table t1; drop table t1;
...@@ -715,10 +715,10 @@ Variable_name Value ...@@ -715,10 +715,10 @@ Variable_name Value
Qcache_queries_in_cache 0 Qcache_queries_in_cache 0
show status like "Qcache_inserts"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_inserts 1 Qcache_inserts 44
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 1 Qcache_hits 12
/**/ select * from t1; /**/ select * from t1;
a a
/**/ select * from t1; /**/ select * from t1;
...@@ -728,8 +728,8 @@ Variable_name Value ...@@ -728,8 +728,8 @@ Variable_name Value
Qcache_queries_in_cache 1 Qcache_queries_in_cache 1
show status like "Qcache_inserts"; show status like "Qcache_inserts";
Variable_name Value Variable_name Value
Qcache_inserts 2 Qcache_inserts 45
show status like "Qcache_hits"; show status like "Qcache_hits";
Variable_name Value Variable_name Value
Qcache_hits 2 Qcache_hits 13
drop table t1; drop table t1;
...@@ -35,7 +35,7 @@ call foo(); ...@@ -35,7 +35,7 @@ call foo();
ERROR HY000: PROCEDURE foo does not exist ERROR HY000: PROCEDURE foo does not exist
drop procedure if exists foo; drop procedure if exists foo;
Warnings: Warnings:
Warning 1275 PROCEDURE foo does not exist Warning 1281 PROCEDURE foo does not exist
create procedure foo() create procedure foo()
foo: loop foo: loop
leave bar; leave bar;
......
...@@ -311,7 +311,7 @@ set sql_log_bin=1; ...@@ -311,7 +311,7 @@ set sql_log_bin=1;
set sql_log_off=1; set sql_log_off=1;
set sql_log_update=1; set sql_log_update=1;
Warnings: Warnings:
Note 1285 The update log is deprecated and replaced by the binary log. SET SQL_LOG_UPDATE has been ignored. Note 1291 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_low_priority_updates=1;
set sql_max_join_size=200; set sql_max_join_size=200;
select @@sql_max_join_size,@@max_join_size; select @@sql_max_join_size,@@max_join_size;
......
...@@ -326,9 +326,9 @@ drop table t1,t2; ...@@ -326,9 +326,9 @@ drop table t1,t2;
CREATE TABLE t1 ( CREATE TABLE t1 (
html varchar(5) default NULL, html varchar(5) default NULL,
rin int(11) default '0', rin int(11) default '0',
out int(11) default '0' rout int(11) default '0'
) TYPE=MyISAM; ) TYPE=MyISAM;
INSERT INTO t1 VALUES ('1',1,0); INSERT INTO t1 VALUES ('1',1,0);
SELECT DISTINCT html,SUM(out)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin; SELECT DISTINCT html,SUM(rout)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
drop table t1; drop table t1;
...@@ -32,18 +32,18 @@ create function func1() returns int ...@@ -32,18 +32,18 @@ create function func1() returns int
return 42| return 42|
# Can't create recursively # Can't create recursively
--error 1273 --error 1279
create procedure foo() create procedure foo()
create procedure bar() set @x=3| create procedure bar() set @x=3|
--error 1273 --error 1279
create procedure foo() create procedure foo()
create function bar() returns double return 2.3| create function bar() returns double return 2.3|
# Already exists # Already exists
--error 1274 --error 1280
create procedure proc1() create procedure proc1()
set @x = 42| set @x = 42|
--error 1274 --error 1280
create function func1() returns int create function func1() returns int
return 42| return 42|
...@@ -51,32 +51,32 @@ drop procedure proc1| ...@@ -51,32 +51,32 @@ drop procedure proc1|
drop function func1| drop function func1|
# Does not exist # Does not exist
--error 1275 --error 1281
alter procedure foo| alter procedure foo|
--error 1275 --error 1281
alter function foo| alter function foo|
--error 1275 --error 1281
drop procedure foo| drop procedure foo|
--error 1275 --error 1281
drop function foo| drop function foo|
--error 1275 --error 1281
call foo()| call foo()|
drop procedure if exists foo| drop procedure if exists foo|
# LEAVE/ITERATE with no match # LEAVE/ITERATE with no match
--error 1278 --error 1284
create procedure foo() create procedure foo()
foo: loop foo: loop
leave bar; leave bar;
end loop| end loop|
--error 1278 --error 1284
create procedure foo() create procedure foo()
foo: loop foo: loop
iterate bar; iterate bar;
end loop| end loop|
# Redefining label # Redefining label
--error 1279 --error 1285
create procedure foo() create procedure foo()
foo: loop foo: loop
foo: loop foo: loop
...@@ -85,14 +85,14 @@ foo: loop ...@@ -85,14 +85,14 @@ foo: loop
end loop foo| end loop foo|
# End label mismatch # End label mismatch
--error 1280 --error 1286
create procedure foo() create procedure foo()
foo: loop foo: loop
set @x=2; set @x=2;
end loop bar| end loop bar|
# Referring to undef variable # Referring to undef variable
--error 1281 --error 1287
create procedure foo(out x int) create procedure foo(out x int)
begin begin
declare y int; declare y int;
...@@ -106,17 +106,17 @@ begin ...@@ -106,17 +106,17 @@ begin
select name from mysql.proc; select name from mysql.proc;
select type from mysql.proc; select type from mysql.proc;
end| end|
--error 1282 --error 1288
call foo()| call foo()|
drop procedure foo| drop procedure foo|
# RETURN in FUNCTION only # RETURN in FUNCTION only
--error 1283 --error 1289
create procedure foo() create procedure foo()
return 42| return 42|
# Doesn't allow queries in FUNCTIONs (for now :-( ) # Doesn't allow queries in FUNCTIONs (for now :-( )
--error 1284 --error 1290
create function foo() returns int create function foo() returns int
begin begin
declare x int; declare x int;
...@@ -130,19 +130,19 @@ create procedure p(x int) ...@@ -130,19 +130,19 @@ create procedure p(x int)
create function f(x int) returns int create function f(x int) returns int
return x+42| return x+42|
--error 1288 --error 1294
call p()| call p()|
--error 1288 --error 1294
call p(1, 2)| call p(1, 2)|
--error 1288 --error 1294
select f()| select f()|
--error 1288 --error 1294
select f(1, 2)| select f(1, 2)|
drop procedure p| drop procedure p|
drop function f| drop function f|
--error 1289 --error 1295
create procedure p(val int, out res int) create procedure p(val int, out res int)
begin begin
declare x int default 0; declare x int default 0;
...@@ -156,7 +156,7 @@ begin ...@@ -156,7 +156,7 @@ begin
end if; end if;
end| end|
--error 1289 --error 1295
create procedure p(val int, out res int) create procedure p(val int, out res int)
begin begin
declare x int default 0; declare x int default 0;
......
...@@ -793,7 +793,7 @@ static void mark_as_dependent(THD *thd, SELECT_LEX *last, SELECT_LEX *current, ...@@ -793,7 +793,7 @@ static void mark_as_dependent(THD *thd, SELECT_LEX *last, SELECT_LEX *current,
// store pointer on SELECT_LEX from wich item is dependent // store pointer on SELECT_LEX from wich item is dependent
item->depended_from= last; item->depended_from= last;
current->mark_as_dependent(last); current->mark_as_dependent(last);
if (thd->lex.describe) if (thd->lex->describe)
{ {
char warn_buff[MYSQL_ERRMSG_SIZE]; char warn_buff[MYSQL_ERRMSG_SIZE];
sprintf(warn_buff, ER(ER_WARN_FIELD_RESOLVED), sprintf(warn_buff, ER(ER_WARN_FIELD_RESOLVED),
......
...@@ -437,7 +437,6 @@ static SYMBOL symbols[] = { ...@@ -437,7 +437,6 @@ static SYMBOL symbols[] = {
{ "USE", SYM(USE_SYM),0,0}, { "USE", SYM(USE_SYM),0,0},
{ "USE_FRM", SYM(USE_FRM),0,0}, { "USE_FRM", SYM(USE_FRM),0,0},
{ "USER", SYM(USER),0,0}, { "USER", SYM(USER),0,0},
{ "UNTIL", SYM(UNTIL_SYM),0,0},
{ "USING", SYM(USING),0,0}, { "USING", SYM(USING),0,0},
{ "UTC_DATE", SYM(UTC_DATE_SYM),0,0}, { "UTC_DATE", SYM(UTC_DATE_SYM),0,0},
{ "UTC_TIME", SYM(UTC_TIME_SYM),0,0}, { "UTC_TIME", SYM(UTC_TIME_SYM),0,0},
......
...@@ -393,7 +393,7 @@ sp_add_fun_to_lex(LEX *lex, LEX_STRING fun) ...@@ -393,7 +393,7 @@ sp_add_fun_to_lex(LEX *lex, LEX_STRING fun)
ls->str= sql_strmake(fun.str, fun.length); ls->str= sql_strmake(fun.str, fun.length);
ls->length= fun.length; ls->length= fun.length;
hash_insert(&lex->spfuns, (byte *)ls); my_hash_insert(&lex->spfuns, (byte *)ls);
} }
} }
...@@ -405,7 +405,7 @@ sp_merge_funs(LEX *dst, LEX *src) ...@@ -405,7 +405,7 @@ sp_merge_funs(LEX *dst, LEX *src)
LEX_STRING *ls= (LEX_STRING *)hash_element(&src->spfuns, i); LEX_STRING *ls= (LEX_STRING *)hash_element(&src->spfuns, i);
if (! hash_search(&dst->spfuns, (byte *)ls->str, ls->length)) if (! hash_search(&dst->spfuns, (byte *)ls->str, ls->length))
hash_insert(&dst->spfuns, (byte *)ls); my_hash_insert(&dst->spfuns, (byte *)ls);
} }
} }
......
...@@ -41,7 +41,7 @@ public: ...@@ -41,7 +41,7 @@ public:
inline void inline void
insert(sp_head *sp) insert(sp_head *sp)
{ {
hash_insert(&m_hashtable, (const byte *)sp); my_hash_insert(&m_hashtable, (const byte *)sp);
} }
inline sp_head * inline sp_head *
......
...@@ -2588,7 +2588,7 @@ my_bool Query_cache::ask_handler_allowance(THD *thd, ...@@ -2588,7 +2588,7 @@ my_bool Query_cache::ask_handler_allowance(THD *thd,
{ {
DBUG_PRINT("qcache", ("Handler does not allow caching for %s.%s", DBUG_PRINT("qcache", ("Handler does not allow caching for %s.%s",
tables_used->db, tables_used->alias)); tables_used->db, tables_used->alias));
thd->lex.safe_to_cache_query= 0; // Don't try to cache this thd->lex->safe_to_cache_query= 0; // Don't try to cache this
DBUG_RETURN(1); DBUG_RETURN(1);
} }
} }
......
...@@ -616,7 +616,7 @@ public: ...@@ -616,7 +616,7 @@ public:
thd.current_tablenr=0; thd.current_tablenr=0;
thd.version=refresh_version; thd.version=refresh_version;
thd.command=COM_DELAYED_INSERT; thd.command=COM_DELAYED_INSERT;
thd.lex.current_select= 0; /* for my_message_sql */ thd.lex->current_select= 0; /* for my_message_sql */
bzero((char*) &thd.net,sizeof(thd.net)); // Safety bzero((char*) &thd.net,sizeof(thd.net)); // Safety
thd.system_thread=1; thd.system_thread=1;
......
...@@ -901,7 +901,7 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length) ...@@ -901,7 +901,7 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length)
my_pthread_setprio(pthread_self(),WAIT_PRIOR); my_pthread_setprio(pthread_self(),WAIT_PRIOR);
// save WHERE clause pointers to avoid damaging they by optimisation // save WHERE clause pointers to avoid damaging they by optimisation
for (SELECT_LEX *sl= thd->lex.all_selects_list; for (SELECT_LEX *sl= thd->lex->all_selects_list;
sl; sl;
sl= sl->next_select_in_list()) sl= sl->next_select_in_list())
{ {
......
...@@ -697,22 +697,22 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report) ...@@ -697,22 +697,22 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
{ {
pthread_mutex_lock(&mi->rli.data_lock); pthread_mutex_lock(&mi->rli.data_lock);
if (thd->lex.mi.pos) if (thd->lex->mi.pos)
{ {
mi->rli.until_condition= RELAY_LOG_INFO::UNTIL_MASTER_POS; mi->rli.until_condition= RELAY_LOG_INFO::UNTIL_MASTER_POS;
mi->rli.until_log_pos= thd->lex.mi.pos; mi->rli.until_log_pos= thd->lex->mi.pos;
/* /*
We don't check thd->lex.mi.log_file_name for NULL here We don't check thd->lex.mi.log_file_name for NULL here
since it is checked in sql_yacc.yy since it is checked in sql_yacc.yy
*/ */
strmake(mi->rli.until_log_name, thd->lex.mi.log_file_name, strmake(mi->rli.until_log_name, thd->lex->mi.log_file_name,
sizeof(mi->rli.until_log_name)-1); sizeof(mi->rli.until_log_name)-1);
} }
else if (thd->lex.mi.relay_log_pos) else if (thd->lex->mi.relay_log_pos)
{ {
mi->rli.until_condition= RELAY_LOG_INFO::UNTIL_RELAY_POS; mi->rli.until_condition= RELAY_LOG_INFO::UNTIL_RELAY_POS;
mi->rli.until_log_pos= thd->lex.mi.relay_log_pos; mi->rli.until_log_pos= thd->lex->mi.relay_log_pos;
strmake(mi->rli.until_log_name, thd->lex.mi.relay_log_name, strmake(mi->rli.until_log_name, thd->lex->mi.relay_log_name,
sizeof(mi->rli.until_log_name)-1); sizeof(mi->rli.until_log_name)-1);
} }
else else
...@@ -750,7 +750,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report) ...@@ -750,7 +750,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
pthread_mutex_unlock(&mi->rli.data_lock); pthread_mutex_unlock(&mi->rli.data_lock);
} }
else if (thd->lex.mi.pos || thd->lex.mi.relay_log_pos) else if (thd->lex->mi.pos || thd->lex->mi.relay_log_pos)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_UNTIL_COND_IGNORED, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_UNTIL_COND_IGNORED,
ER(ER_UNTIL_COND_IGNORED)); ER(ER_UNTIL_COND_IGNORED));
......
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