Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-01-23 10:13:11+01:00, tomas@stripped +4 -0
wl#4225 add ndb table creation control
mysql-test/suite/ndb/r/ndb_basic.result@stripped, 2008-01-23 10:13:08+01:00, tomas@stripped +2 -0
wl#4225 add ndb table creation control
sql/ha_ndbcluster.cc@stripped, 2008-01-23 10:13:08+01:00, tomas@stripped +28 -1
wl#4225 add ndb table creation control
sql/set_var.cc@stripped, 2008-01-23 10:13:09+01:00, tomas@stripped +4 -0
wl#4225 add ndb table creation control
sql/sql_class.h@stripped, 2008-01-23 10:13:09+01:00, tomas@stripped +3 -0
wl#4225 add ndb table creation control
diff -Nrup a/mysql-test/suite/ndb/r/ndb_basic.result b/mysql-test/suite/ndb/r/ndb_basic.result
--- a/mysql-test/suite/ndb/r/ndb_basic.result 2007-12-14 21:53:48 +01:00
+++ b/mysql-test/suite/ndb/r/ndb_basic.result 2008-01-23 10:13:08 +01:00
@@ -34,6 +34,8 @@ ndb_optimization_delay #
ndb_optimized_node_selection #
ndb_report_thresh_binlog_epoch_slip #
ndb_report_thresh_binlog_mem_usage #
+ndb_table_no_logging #
+ndb_table_temporary #
ndb_use_copying_alter_table #
ndb_use_exact_count #
ndb_use_transactions #
diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc 2008-01-08 15:59:56 +01:00
+++ b/sql/ha_ndbcluster.cc 2008-01-23 10:13:08 +01:00
@@ -6582,6 +6582,7 @@ int ha_ndbcluster::create(const char *na
const char *tablespace= create_info->tablespace;
bool use_disk= FALSE;
NdbDictionary::Table::SingleUserMode single_user_mode= NdbDictionary::Table::SingleUserModeLocked;
+ bool ndb_sys_table= FALSE;
DBUG_ENTER("ha_ndbcluster::create");
DBUG_PRINT("enter", ("name: %s", name));
@@ -6638,6 +6639,15 @@ int ha_ndbcluster::create(const char *na
DBUG_RETURN(HA_ERR_NO_CONNECTION);
}
single_user_mode = NdbDictionary::Table::SingleUserModeReadWrite;
+ ndb_sys_table= TRUE;
+ }
+ if (!ndb_apply_status_share)
+ {
+ if ((strcmp(m_dbname, NDB_REP_DB) == 0 &&
+ strcmp(m_tabname, NDB_APPLY_TABLE) == 0))
+ {
+ ndb_sys_table= TRUE;
+ }
}
DBUG_PRINT("table", ("name: %s", m_tabname));
@@ -6645,7 +6655,18 @@ int ha_ndbcluster::create(const char *na
{
DBUG_RETURN(my_errno= errno);
}
- tab.setLogging(!(create_info->options & HA_LEX_CREATE_TMP_TABLE));
+ if (!ndb_sys_table)
+ {
+ if (thd->variables.ndb_table_temporary)
+ {
+ tab.setTemporary(TRUE);
+ tab.setLogging(FALSE);
+ }
+ else if (thd->variables.ndb_table_no_logging)
+ {
+ tab.setLogging(FALSE);
+ }
+ }
tab.setSingleUserMode(single_user_mode);
// Save frm data for this table
@@ -6714,6 +6735,8 @@ int ha_ndbcluster::create(const char *na
if (use_disk)
{
+ tab.setLogging(TRUE);
+ tab.setTemporary(FALSE);
if (tablespace)
tab.setTablespaceName(tablespace);
else
@@ -7062,6 +7085,10 @@ int ha_ndbcluster::create_ndb_index(THD
// TODO Only temporary ordered indexes supported
ndb_index.setLogging(FALSE);
}
+ if (!m_table->getLogging())
+ ndb_index.setLogging(FALSE);
+ if (((NDBTAB*)m_table)->getTemporary())
+ ndb_index.setTemporary(TRUE);
if (ndb_index.setTable(m_tabname))
{
DBUG_RETURN(my_errno= errno);
diff -Nrup a/sql/set_var.cc b/sql/set_var.cc
--- a/sql/set_var.cc 2007-12-18 07:32:30 +01:00
+++ b/sql/set_var.cc 2008-01-23 10:13:09 +01:00
@@ -508,6 +508,10 @@ static sys_var_thd_bool
sys_ndb_use_transactions(&vars, "ndb_use_transactions", &SV::ndb_use_transactions);
static sys_var_thd_ulong
sys_ndb_optimize_level(&vars, "ndb_optimization_delay", &SV::ndb_optimization_delay);
+static sys_var_thd_bool
+sys_ndb_table_no_logging(&vars, "ndb_table_no_logging", &SV::ndb_table_no_logging);
+static sys_var_thd_bool
+sys_ndb_table_temporary(&vars, "ndb_table_temporary", &SV::ndb_table_temporary);
static sys_var_long_ptr
sys_ndb_cache_check_time(&vars, "ndb_cache_check_time", &ndb_cache_check_time);
static sys_var_const_str
diff -Nrup a/sql/sql_class.h b/sql/sql_class.h
--- a/sql/sql_class.h 2007-12-18 07:32:30 +01:00
+++ b/sql/sql_class.h 2008-01-23 10:13:09 +01:00
@@ -324,6 +324,9 @@ struct system_variables
my_bool ndb_use_transactions;
my_bool ndb_index_stat_enable;
+ my_bool ndb_table_no_logging;
+ my_bool ndb_table_temporary;
+
my_bool old_alter_table;
my_bool old_passwords;
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2838) | tomas | 23 Jan |