mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Manual merge from mysql-trunk-merge.
This commit is contained in:
@ -827,7 +827,7 @@ static bool insert_params_with_log(Prepared_statement *stmt, uchar *null_array,
|
||||
const String *res;
|
||||
DBUG_ENTER("insert_params_with_log");
|
||||
|
||||
if (query->copy(stmt->query, stmt->query_length, default_charset_info))
|
||||
if (query->copy(stmt->query(), stmt->query_length(), default_charset_info))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
for (Item_param **it= begin; it < end; ++it)
|
||||
@ -989,7 +989,7 @@ static bool emb_insert_params_with_log(Prepared_statement *stmt,
|
||||
|
||||
DBUG_ENTER("emb_insert_params_with_log");
|
||||
|
||||
if (query->copy(stmt->query, stmt->query_length, default_charset_info))
|
||||
if (query->copy(stmt->query(), stmt->query_length(), default_charset_info))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
for (; it < end; ++it, ++client_param)
|
||||
@ -1140,7 +1140,7 @@ static bool insert_params_from_vars_with_log(Prepared_statement *stmt,
|
||||
|
||||
DBUG_ENTER("insert_params_from_vars");
|
||||
|
||||
if (query->copy(stmt->query, stmt->query_length, default_charset_info))
|
||||
if (query->copy(stmt->query(), stmt->query_length(), default_charset_info))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
for (Item_param **it= begin; it < end; ++it)
|
||||
@ -2504,9 +2504,9 @@ void mysqld_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
|
||||
}
|
||||
|
||||
#if defined(ENABLED_PROFILING)
|
||||
thd->profiling.set_query_source(stmt->query, stmt->query_length);
|
||||
thd->profiling.set_query_source(stmt->query(), stmt->query_length());
|
||||
#endif
|
||||
DBUG_PRINT("exec_query", ("%s", stmt->query));
|
||||
DBUG_PRINT("exec_query", ("%s", stmt->query()));
|
||||
DBUG_PRINT("info",("stmt: 0x%lx", (long) stmt));
|
||||
|
||||
sp_cache_flush_obsolete(&thd->sp_proc_cache);
|
||||
@ -2924,7 +2924,7 @@ Execute_sql_statement::execute_server_code(THD *thd)
|
||||
if (alloc_query(thd, m_sql_text.str, m_sql_text.length))
|
||||
return TRUE;
|
||||
|
||||
Parser_state parser_state(thd, thd->query, thd->query_length);
|
||||
Parser_state parser_state(thd, thd->query(), thd->query_length());
|
||||
|
||||
parser_state.m_lip.multi_statements= FALSE;
|
||||
lex_start(thd);
|
||||
@ -2947,7 +2947,7 @@ Execute_sql_statement::execute_server_code(THD *thd)
|
||||
/* report error issued during command execution */
|
||||
if (error == 0 && thd->spcont == NULL)
|
||||
general_log_write(thd, COM_STMT_EXECUTE,
|
||||
thd->query, thd->query_length);
|
||||
thd->query(), thd->query_length());
|
||||
|
||||
end:
|
||||
lex_end(thd->lex);
|
||||
@ -3164,7 +3164,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
|
||||
old_stmt_arena= thd->stmt_arena;
|
||||
thd->stmt_arena= this;
|
||||
|
||||
Parser_state parser_state(thd, thd->query, thd->query_length);
|
||||
Parser_state parser_state(thd, thd->query(), thd->query_length());
|
||||
parser_state.m_lip.stmt_prepare_mode= TRUE;
|
||||
parser_state.m_lip.multi_statements= FALSE;
|
||||
lex_start(thd);
|
||||
@ -3254,7 +3254,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
|
||||
the general log.
|
||||
*/
|
||||
if (thd->spcont == NULL)
|
||||
general_log_write(thd, COM_STMT_PREPARE, query, query_length);
|
||||
general_log_write(thd, COM_STMT_PREPARE, query(), query_length());
|
||||
}
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
@ -3484,7 +3484,7 @@ Prepared_statement::reprepare()
|
||||
return TRUE;
|
||||
|
||||
error= ((name.str && copy.set_name(&name)) ||
|
||||
copy.prepare(query, query_length) ||
|
||||
copy.prepare(query(), query_length()) ||
|
||||
validate_metadata(©));
|
||||
|
||||
if (cur_db_changed)
|
||||
@ -3722,8 +3722,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
||||
to point at it even after we restore from backup. This is ok, as
|
||||
expanded query was allocated in thd->mem_root.
|
||||
*/
|
||||
stmt_backup.query= thd->query;
|
||||
stmt_backup.query_length= thd->query_length;
|
||||
stmt_backup.set_query_inner(thd->query(), thd->query_length());
|
||||
|
||||
/*
|
||||
At first execution of prepared statement we may perform logical
|
||||
@ -3748,8 +3747,8 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
||||
Note that multi-statements cannot exist here (they are not supported in
|
||||
prepared statements).
|
||||
*/
|
||||
if (query_cache_send_result_to_client(thd, thd->query,
|
||||
thd->query_length) <= 0)
|
||||
if (query_cache_send_result_to_client(thd, thd->query(),
|
||||
thd->query_length()) <= 0)
|
||||
{
|
||||
MYSQL_QUERY_EXEC_START(thd->query,
|
||||
thd->thread_id,
|
||||
@ -3810,7 +3809,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
||||
the general log.
|
||||
*/
|
||||
if (error == 0 && thd->spcont == NULL)
|
||||
general_log_write(thd, COM_STMT_EXECUTE, thd->query, thd->query_length);
|
||||
general_log_write(thd, COM_STMT_EXECUTE, thd->query(), thd->query_length());
|
||||
|
||||
error:
|
||||
flags&= ~ (uint) IS_IN_USE;
|
||||
|
Reference in New Issue
Block a user