1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

WL#2269 Enable query cache for NDB part 2

-This is mostly fixes for correct behaviour when using query cache + transactions + the thread that
fetches commit count from NDB at regular intervals. The major fix is to add a
list in thd_ndb, that keeps a list of NDB_SHARE's that were modified by
transaction and then "clearing" them in ndbcluster_commit.


mysql-test/r/ndb_cache2.result:
  Updated test cases for the ndb_util thread, more simultaneous tables and more tesst
mysql-test/t/ndb_cache2.test:
  Updated test cases for the ndb_util thread, more simultaneous tables and more advanced tesst
sql/ha_ndbcluster.cc:
  Add table changed during transaction to list of changed tables in Thd_ndb, this list is then used in ndbcluster_commit to invalidate the cached commit_count in share
  Fix so that ndb_util_thread uses milliseconds "sleeps"
  Changed so that ndb_commit_count uses the commit_count from share if available
sql/ha_ndbcluster.h:
  Add commit_count_lock to NBD_SHARE, use for detecting simultaneous attempts to update commit_count
  Add list of tables changed by transaction to Thd_ndb
  Change check_ndb_connection to take thd as argument, use current_thd as default
  Added m_rows_changed variable to keep track of if this handler has modified any records within the transaction
sql/set_var.cc:
  Change format of code
  Sort sys__ variables in aplha order
This commit is contained in:
unknown
2005-03-15 15:03:25 +01:00
parent 87636012c7
commit aa5dba42ef
5 changed files with 958 additions and 175 deletions

View File

@@ -404,7 +404,7 @@ sys_var_long_ptr sys_innodb_thread_concurrency("innodb_thread_concurrency",
#ifdef HAVE_NDBCLUSTER_DB
/* ndb thread specific variable settings */
sys_var_thd_ulong
sys_var_thd_ulong
sys_ndb_autoincrement_prefetch_sz("ndb_autoincrement_prefetch_sz",
&SV::ndb_autoincrement_prefetch_sz);
sys_var_thd_bool
@@ -413,7 +413,8 @@ sys_var_thd_bool
sys_ndb_use_exact_count("ndb_use_exact_count", &SV::ndb_use_exact_count);
sys_var_thd_bool
sys_ndb_use_transactions("ndb_use_transactions", &SV::ndb_use_transactions);
sys_var_long_ptr sys_ndb_cache_check_time("ndb_cache_check_time", &ndb_cache_check_time);
sys_var_long_ptr
sys_ndb_cache_check_time("ndb_cache_check_time", &ndb_cache_check_time);
#endif
/* Time/date/datetime formats */
@@ -686,10 +687,10 @@ sys_var *sys_variables[]=
#endif
#ifdef HAVE_NDBCLUSTER_DB
&sys_ndb_autoincrement_prefetch_sz,
&sys_ndb_cache_check_time,
&sys_ndb_force_send,
&sys_ndb_use_exact_count,
&sys_ndb_use_transactions,
&sys_ndb_cache_check_time,
#endif
&sys_unique_checks,
&sys_updatable_views_with_limit,
@@ -1276,7 +1277,6 @@ static int check_max_delayed_threads(THD *thd, set_var *var)
return 0;
}
static void fix_max_connections(THD *thd, enum_var_type type)
{
#ifndef EMBEDDED_LIBRARY