mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Extra safety fixes (probably not needed, but can't hurt)
sql/ha_innodb.cc: simple optimization sql/sql_show.cc: Simple optimization
This commit is contained in:
@@ -1067,6 +1067,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
packet_length--;
|
||||
}
|
||||
/* We must allocate some extra memory for query cache */
|
||||
thd->query_length= 0; // Extra safety: Avoid races
|
||||
if (!(thd->query= (char*) thd->memdup_w_gap((gptr) (packet),
|
||||
packet_length,
|
||||
thd->db_length+2+
|
||||
@@ -2982,8 +2983,8 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
|
||||
{
|
||||
DBUG_ENTER("mysql_parse");
|
||||
|
||||
mysql_init_query(thd);
|
||||
thd->query_length = length;
|
||||
mysql_init_query(thd);
|
||||
if (query_cache_send_result_to_client(thd, inBuf, length) <= 0)
|
||||
{
|
||||
LEX *lex=lex_start(thd, (uchar*) inBuf, length);
|
||||
|
Reference in New Issue
Block a user