summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-07-05 11:38:05 +0300
committerunknown <bell@sanja.is.com.ua>2005-07-05 11:38:05 +0300
commitb5fd8cae27ae710ae5ab3681534c315c6049b6f7 (patch)
treef76cced6c273267787992bca7b5d9fcdd8f287ef /sql/sql_cache.cc
parent8226e5fcbd97e101b1ff464bc207df7d2abecf4d (diff)
parentfbdfcae6a97749e9037a173103f9a5a3e30139d9 (diff)
downloadmariadb-git-b5fd8cae27ae710ae5ab3681534c315c6049b6f7.tar.gz
merge
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 430e0fbcabf..279a1ccb443 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -2135,6 +2135,13 @@ Query_cache::register_tables_from_list(TABLE_LIST *tables_used,
tables_used;
tables_used= tables_used->next_global, n++, block_table++)
{
+ if (tables_used->derived)
+ {
+ DBUG_PRINT("qcache", ("derived table skipped");
+ n--;
+ block_table--;
+ continue;
+ }
block_table->n= n;
if (tables_used->view)
{
@@ -2778,6 +2785,12 @@ static TABLE_COUNTER_TYPE process_and_count_tables(TABLE_LIST *tables_used,
tables_used->table->s->table_name,
tables_used->table->s->table_cache_key,
tables_used->table->s->db_type));
+ if (table_used->derived)
+ {
+ table_count--;
+ DBUG_PRINT("qcache", ("derived table skipped"));
+ continue;
+ }
*tables_type|= tables_used->table->file->table_cache_type();
/*