summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormskold/marty@mysql.com/linux.site <>2007-01-05 09:26:57 +0100
committermskold/marty@mysql.com/linux.site <>2007-01-05 09:26:57 +0100
commitda3a1cff4d1e3a32fc5c23457581e572f52a1f39 (patch)
treebb21648630b8023910746b4afa4f8efcb2ba85ea /sql
parent499eb4d8bae79220ff461fccc05e25e15629ec88 (diff)
parent9a0dd00d89f3e2e2279b730c3b71e0fb4a88cfcf (diff)
downloadmariadb-git-da3a1cff4d1e3a32fc5c23457581e572f52a1f39.tar.gz
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_ndbcluster.cc11
-rw-r--r--sql/mysqld.cc15
-rw-r--r--sql/sql_class.cc3
3 files changed, 17 insertions, 12 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 0f580c833a9..107f21f28d2 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -2955,13 +2955,10 @@ KEY* key_info;
DBUG_RETURN(error == HA_ERR_KEY_NOT_FOUND ? HA_ERR_END_OF_FILE : error);
}
else if (type == UNIQUE_INDEX)
- {
- error= unique_index_scan(key_info,
- start_key->key,
- start_key->length,
- buf);
- DBUG_RETURN(error == HA_ERR_KEY_NOT_FOUND ? HA_ERR_END_OF_FILE : error);
- }
+ DBUG_RETURN(unique_index_scan(key_info,
+ start_key->key,
+ start_key->length,
+ buf));
break;
default:
break;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 95de1f91ecf..5ba97c3eaa6 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4571,8 +4571,8 @@ enum options_mysqld
OPT_LOG_BIN_TRUST_FUNCTION_CREATORS,
OPT_SAFE_SHOW_DB, OPT_INNODB_SAFE_BINLOG,
OPT_INNODB, OPT_ISAM,
- OPT_ENGINE_CONDITION_PUSHDOWN,
- OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING, OPT_NDB_USE_EXACT_COUNT,
+ OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
+ OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS,
OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
OPT_NDB_SHM, OPT_NDB_OPTIMIZED_NODE_SELECTION, OPT_NDB_CACHE_CHECK_TIME,
OPT_NDB_MGMD, OPT_NDB_NODEID,
@@ -5203,6 +5203,17 @@ Disable with --skip-ndbcluster (will save memory).",
(gptr*) &global_system_variables.ndb_use_exact_count,
(gptr*) &global_system_variables.ndb_use_exact_count,
0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
+ {"ndb-use-transactions", OPT_NDB_USE_TRANSACTIONS,
+ "Use transactions for large inserts, if enabled then large "
+ "inserts will be split into several smaller transactions",
+ (gptr*) &global_system_variables.ndb_use_transactions,
+ (gptr*) &global_system_variables.ndb_use_transactions,
+ 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
+ {"ndb_use_transactions", OPT_NDB_USE_TRANSACTIONS,
+ "same as --ndb-use-transactions.",
+ (gptr*) &global_system_variables.ndb_use_transactions,
+ (gptr*) &global_system_variables.ndb_use_transactions,
+ 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
{"ndb-shm", OPT_NDB_SHM,
"Use shared memory connections when available.",
(gptr*) &opt_ndb_shm,
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 84d2ce77014..b1f8ec31081 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -290,9 +290,6 @@ void THD::init(void)
variables.date_format);
variables.datetime_format= date_time_format_copy((THD*) 0,
variables.datetime_format);
-#ifdef HAVE_NDBCLUSTER_DB
- variables.ndb_use_transactions= 1;
-#endif
pthread_mutex_unlock(&LOCK_global_system_variables);
server_status= SERVER_STATUS_AUTOCOMMIT;
if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)