Commit 7a7f3c13 authored by pem@mysql.telia.com's avatar pem@mysql.telia.com

Adopt to the introduction of a separate CLIENT_MULTI_RESULTS flag.

parent 08e5a7e1
...@@ -120,7 +120,7 @@ sp_head::operator delete(void *ptr, size_t size) ...@@ -120,7 +120,7 @@ sp_head::operator delete(void *ptr, size_t size)
} }
sp_head::sp_head() sp_head::sp_head()
: Sql_alloc(), m_simple_case(FALSE), m_multi_query(FALSE), m_free_list(NULL) : Sql_alloc(), m_simple_case(FALSE), m_multi_results(FALSE), m_free_list(NULL)
{ {
DBUG_ENTER("sp_head::sp_head"); DBUG_ENTER("sp_head::sp_head");
......
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
int m_type; // TYPE_ENUM_FUNCTION or TYPE_ENUM_PROCEDURE int m_type; // TYPE_ENUM_FUNCTION or TYPE_ENUM_PROCEDURE
enum enum_field_types m_returns; // For FUNCTIONs only enum enum_field_types m_returns; // For FUNCTIONs only
my_bool m_simple_case; // TRUE if parsing simple case, FALSE otherwise my_bool m_simple_case; // TRUE if parsing simple case, FALSE otherwise
my_bool m_multi_query; // TRUE if a procedure with SELECT(s) my_bool m_multi_results; // TRUE if a procedure with SELECT(s)
uint m_old_cmq; // Old CLIENT_MULTI_QUERIES value uint m_old_cmq; // Old CLIENT_MULTI_QUERIES value
#if NOT_USED_NOW #if NOT_USED_NOW
// QQ We're not using this at the moment. // QQ We're not using this at the moment.
......
...@@ -3309,9 +3309,9 @@ mysql_execute_command(THD *thd) ...@@ -3309,9 +3309,9 @@ mysql_execute_command(THD *thd)
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 #endif
if (sp->m_multi_query) if (sp->m_multi_results)
{ {
if (! (thd->client_capabilities & CLIENT_MULTI_QUERIES)) if (! (thd->client_capabilities & CLIENT_MULTI_RESULTS))
{ {
send_error(thd, ER_SP_BADSELECT); send_error(thd, ER_SP_BADSELECT);
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
...@@ -3328,7 +3328,7 @@ mysql_execute_command(THD *thd) ...@@ -3328,7 +3328,7 @@ mysql_execute_command(THD *thd)
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
thd->net.no_send_ok= nsok; thd->net.no_send_ok= nsok;
#endif #endif
if (sp->m_multi_query) if (sp->m_multi_results)
{ {
if (! smrx) if (! smrx)
thd->server_status &= ~SERVER_MORE_RESULTS_EXISTS; thd->server_status &= ~SERVER_MORE_RESULTS_EXISTS;
......
...@@ -1203,7 +1203,7 @@ sp_proc_stmt: ...@@ -1203,7 +1203,7 @@ sp_proc_stmt:
if (lex->sql_command == SQLCOM_SELECT && !lex->result) if (lex->sql_command == SQLCOM_SELECT && !lex->result)
{ {
/* We maybe have one or more SELECT without INTO */ /* We maybe have one or more SELECT without INTO */
lex->sphead->m_multi_query= TRUE; lex->sphead->m_multi_results= TRUE;
} }
/* Don't add an instruction for empty SET statements. /* Don't add an instruction for empty SET statements.
** (This happens if the SET only contained local variables, ** (This happens if the SET only contained local variables,
......
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