Commit 5ab6c5e5 authored by unknown's avatar unknown
Browse files

postreview fixes


sql/mysql_priv.h:
  constant definition
sql/sql_base.cc:
  difine used instead of constant
sql/sql_cache.cc:
  difine used instead of constant
  typo fixed
parent a6efe82f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -551,6 +551,7 @@ int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags);
#define MYSQL_HA_FLUSH_ALL          0x02

/* sql_base.cc */
#define TMP_TABLE_KEY_EXTRA 8
void set_item_name(Item *item,char *pos,uint length);
bool add_field_to_list(char *field_name, enum enum_field_types type,
		       char *length, char *decimal,
+3 −2
Original line number Diff line number Diff line
@@ -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)
  {
    if (table->key_length == key_length+8 &&
	!memcmp(table->table_cache_key,key,key_length+8))
    if (table->key_length == key_length + TMP_TABLE_KEY_EXTRA &&
	!memcmp(table->table_cache_key, key,
                key_length + TMP_TABLE_KEY_EXTRA))
    {
      if (table->query_id == thd->query_id)
      {
+2 −2
Original line number Diff line number Diff line
@@ -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)
    {
      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(),
                  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);
        /*
          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.
        */
        thd->safe_to_cache_query=0;