Post-merge fixes (adapting new SP code to 4.1 changes).
This commit is contained in:
parent
97dc6a528e
commit
02211a600b
@ -48,12 +48,12 @@ sp_find_procedure(THD *thd, Item_string *iname)
|
|||||||
HA_READ_KEY_EXACT))
|
HA_READ_KEY_EXACT))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
if ((defstr= get_field(&thd->mem_root, table, 1)) == NULL)
|
if ((defstr= get_field(&thd->mem_root, table->field[1])) == NULL)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
// QQ Set up our own mem_root here???
|
// QQ Set up our own mem_root here???
|
||||||
tmplex= lex_start(thd, (uchar*)defstr, strlen(defstr));
|
tmplex= lex_start(thd, (uchar*)defstr, strlen(defstr));
|
||||||
if (yyparse(thd) || thd->fatal_error || tmplex->sphead == NULL)
|
if (yyparse(thd) || thd->is_fatal_error || tmplex->sphead == NULL)
|
||||||
goto done; // Error
|
goto done; // Error
|
||||||
else
|
else
|
||||||
sp = tmplex->sphead;
|
sp = tmplex->sphead;
|
||||||
|
@ -1043,6 +1043,15 @@ bool select_dumpvar::send_data(List<Item> &items)
|
|||||||
|
|
||||||
bool select_dumpvar::send_eof()
|
bool select_dumpvar::send_eof()
|
||||||
{
|
{
|
||||||
|
/* This mimics select_send::send_eof(), which unlocks this way.
|
||||||
|
* It appears to be necessary, since tables aren't unlock after
|
||||||
|
* selects otherwise.
|
||||||
|
*/
|
||||||
|
if (thd->lock)
|
||||||
|
{
|
||||||
|
mysql_unlock_tables(thd, thd->lock);
|
||||||
|
thd->lock=0;
|
||||||
|
}
|
||||||
if (row_count)
|
if (row_count)
|
||||||
{
|
{
|
||||||
::send_ok(thd,row_count);
|
::send_ok(thd,row_count);
|
||||||
|
@ -2982,13 +2982,17 @@ mysql_execute_command(THD *thd)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifndef EMBEDDED_LIBRARY
|
||||||
// When executing substatements, they're assumed to send_error when
|
// When executing substatements, they're assumed to send_error when
|
||||||
// it happens, but not to send_ok.
|
// it happens, but not to send_ok.
|
||||||
my_bool nsok= thd->net.no_send_ok;
|
my_bool nsok= thd->net.no_send_ok;
|
||||||
|
|
||||||
thd->net.no_send_ok= TRUE;
|
thd->net.no_send_ok= TRUE;
|
||||||
|
#endif
|
||||||
res= sp->execute(thd);
|
res= sp->execute(thd);
|
||||||
|
#ifndef EMBEDDED_LIBRARY
|
||||||
thd->net.no_send_ok= nsok;
|
thd->net.no_send_ok= nsok;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
send_ok(thd);
|
send_ok(thd);
|
||||||
|
@ -1224,9 +1224,9 @@ sp_case:
|
|||||||
;
|
;
|
||||||
|
|
||||||
sp_whens:
|
sp_whens:
|
||||||
/* Empty */
|
/* Empty */ {}
|
||||||
| WHEN_SYM sp_case
|
| WHEN_SYM sp_case {}
|
||||||
| ELSE sp_proc_stmts
|
| ELSE sp_proc_stmts {}
|
||||||
;
|
;
|
||||||
|
|
||||||
sp_labeled_control:
|
sp_labeled_control:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user