mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
postreview fixes
This commit is contained in:
@ -551,6 +551,7 @@ int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags);
|
|||||||
#define MYSQL_HA_FLUSH_ALL 0x02
|
#define MYSQL_HA_FLUSH_ALL 0x02
|
||||||
|
|
||||||
/* sql_base.cc */
|
/* sql_base.cc */
|
||||||
|
#define TMP_TABLE_KEY_EXTRA 8
|
||||||
void set_item_name(Item *item,char *pos,uint length);
|
void set_item_name(Item *item,char *pos,uint length);
|
||||||
bool add_field_to_list(char *field_name, enum enum_field_types type,
|
bool add_field_to_list(char *field_name, enum enum_field_types type,
|
||||||
char *length, char *decimal,
|
char *length, char *decimal,
|
||||||
|
@ -816,8 +816,9 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
|
|||||||
|
|
||||||
for (table=thd->temporary_tables; table ; table=table->next)
|
for (table=thd->temporary_tables; table ; table=table->next)
|
||||||
{
|
{
|
||||||
if (table->key_length == key_length+8 &&
|
if (table->key_length == key_length + TMP_TABLE_KEY_EXTRA &&
|
||||||
!memcmp(table->table_cache_key,key,key_length+8))
|
!memcmp(table->table_cache_key, key,
|
||||||
|
key_length + TMP_TABLE_KEY_EXTRA))
|
||||||
{
|
{
|
||||||
if (table->query_id == thd->query_id)
|
if (table->query_id == thd->query_id)
|
||||||
{
|
{
|
||||||
|
@ -983,7 +983,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
|
|||||||
*/
|
*/
|
||||||
for (tmptable= thd->temporary_tables; tmptable ; tmptable= tmptable->next)
|
for (tmptable= thd->temporary_tables; tmptable ; tmptable= tmptable->next)
|
||||||
{
|
{
|
||||||
if (tmptable->key_length - 8 == table->key_len() &&
|
if (tmptable->key_length - TMP_TABLE_KEY_EXTRA == table->key_len() &&
|
||||||
!memcmp(tmptable->table_cache_key, table->data(),
|
!memcmp(tmptable->table_cache_key, table->data(),
|
||||||
table->key_len()))
|
table->key_len()))
|
||||||
{
|
{
|
||||||
@ -993,7 +993,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
|
|||||||
STRUCT_UNLOCK(&structure_guard_mutex);
|
STRUCT_UNLOCK(&structure_guard_mutex);
|
||||||
/*
|
/*
|
||||||
We should not store result of this query because it contain
|
We should not store result of this query because it contain
|
||||||
temporary tables => assign following wariable to make check
|
temporary tables => assign following variable to make check
|
||||||
faster.
|
faster.
|
||||||
*/
|
*/
|
||||||
thd->safe_to_cache_query=0;
|
thd->safe_to_cache_query=0;
|
||||||
|
Reference in New Issue
Block a user