summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2006-02-24 18:34:15 +0200
committermonty@mysql.com <>2006-02-24 18:34:15 +0200
commit82b77cdd901bb36d4be23456bc0c5d171a29e3f7 (patch)
tree603ae9081a58d9f7bb204327f65d4a8af4425b28 /sql/sql_base.cc
parentb11c033f496eccc680c1026a57af836c9a4578f3 (diff)
downloadmariadb-git-82b77cdd901bb36d4be23456bc0c5d171a29e3f7.tar.gz
Fixes to embedded server to be able to run tests with it
(Needed for "list of pushes" web page and autopush)
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 37d4c80a0d0..2614a7cd5be 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -368,6 +368,15 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh,
DESCRIPTION
Marks all tables in the list which were used by current substatement
(they are marked by its query_id) as free for reuse.
+
+ NOTE
+ The reason we reset query_id is that it's not enough to just test
+ if table->query_id != thd->query_id to know if a table is in use.
+
+ For example
+ SELECT f1_that_uses_t1() FROM t1;
+ In f1_that_uses_t1() we will see one instance of t1 where query_id is
+ set to query_id of original query.
*/
static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)