Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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, 2006-10-19 11:20:04+02:00, jonas@stripped +5 -0
ndb - add temporary tables to hugo
and use it for testOperations/testTransactions
storage/ndb/test/include/NDBT_Test.hpp@stripped, 2006-10-19 11:20:02+02:00, jonas@stripped +4 -0
Add support for temporary tables in hugo
storage/ndb/test/ndbapi/testOperations.cpp@stripped, 2006-10-19 11:20:03+02:00, jonas@stripped +4 -2
Make testOperations use temporary tables
storage/ndb/test/ndbapi/testTransactions.cpp@stripped, 2006-10-19 11:20:03+02:00, jonas@stripped +2 -0
Make testTransactions use temporary tables
storage/ndb/test/src/NDBT_Tables.cpp@stripped, 2006-10-19 11:20:03+02:00, jonas@stripped +5 -0
Add support for temporary tables in hugo
storage/ndb/test/src/NDBT_Test.cpp@stripped, 2006-10-19 11:20:03+02:00, jonas@stripped +22 -3
Add support for temporary tables in hugo
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jonas
# Host: perch.ndb.mysql.com
# Root: /home/jonas/src/51-work
--- 1.17/storage/ndb/test/include/NDBT_Test.hpp 2006-10-19 11:20:09 +02:00
+++ 1.18/storage/ndb/test/include/NDBT_Test.hpp 2006-10-19 11:20:09 +02:00
@@ -364,6 +364,9 @@
// Table create tweaks
int createHook(Ndb*, NdbDictionary::Table&, int when);
Vector<BaseString> m_tables_in_test;
+
+ void setTemporaryTables(bool val);
+ bool getTemporaryTables() const;
private:
int executeOne(Ndb_cluster_connection&,
const char* _tabname, const char* testname = NULL);
@@ -390,6 +393,7 @@
bool runonce;
const char* tsname;
bool createAllTables;
+ bool temporaryTables;
};
--- 1.13/storage/ndb/test/ndbapi/testOperations.cpp 2006-10-19 11:20:09 +02:00
+++ 1.14/storage/ndb/test/ndbapi/testOperations.cpp 2006-10-19 11:20:09 +02:00
@@ -660,9 +660,11 @@
Vector<int> tmp;
generate(tmp, 5);
-
+
NDBT_TestSuite ts("testOperations");
-
+
+ ts.setTemporaryTables(true);
+
for(Uint32 i = 0; i < 12; i++)
{
if(false && (i == 6 || i == 8 || i == 10))
--- 1.8/storage/ndb/test/ndbapi/testTransactions.cpp 2006-10-19 11:20:09 +02:00
+++ 1.9/storage/ndb/test/ndbapi/testTransactions.cpp 2006-10-19 11:20:09 +02:00
@@ -372,6 +372,8 @@
ndb_init();
NDBT_TestSuite ts("testOperations");
+ ts.setTemporaryTables(true);
+
for(Uint32 i = 0; i<sizeof(matrix)/sizeof(matrix[0]); i++){
NDBT_TestCaseImpl1 *pt = new NDBT_TestCaseImpl1(&ts, matrix[i].name, "");
--- 1.21/storage/ndb/test/src/NDBT_Tables.cpp 2006-10-19 11:20:09 +02:00
+++ 1.22/storage/ndb/test/src/NDBT_Tables.cpp 2006-10-19 11:20:09 +02:00
@@ -1039,6 +1039,11 @@
j++;
}
j++;
+ if (tmpTab.getTemporary())
+ {
+ tmpIndx.setTemporary(true);
+ tmpIndx.setLogging(false);
+ }
if(pNdb->getDictionary()->createIndex(tmpIndx) != 0){
ndbout << pNdb->getDictionary()->getNdbError() << endl;
return NDBT_FAILED;
--- 1.31/storage/ndb/test/src/NDBT_Test.cpp 2006-10-19 11:20:09 +02:00
+++ 1.32/storage/ndb/test/src/NDBT_Test.cpp 2006-10-19 11:20:09 +02:00
@@ -770,6 +770,7 @@
diskbased = false;
tsname = NULL;
createAllTables = false;
+ temporaryTables = false;
}
@@ -791,6 +792,14 @@
createAllTables = _flag;
}
+void NDBT_TestSuite::setTemporaryTables(bool val){
+ temporaryTables = val;
+}
+
+bool NDBT_TestSuite::getTemporaryTables() const {
+ return temporaryTables;
+}
+
bool NDBT_TestSuite::timerIsOn(){
return (timer != 0);
}
@@ -805,6 +814,7 @@
g_create_hook(Ndb* ndb, NdbDictionary::Table& tab, int when, void* arg)
{
NDBT_TestSuite* ts = (NDBT_TestSuite*)arg;
+
return ts->createHook(ndb, tab, when);
}
@@ -942,14 +952,23 @@
NDBT_TestSuite::createHook(Ndb* ndb, NdbDictionary::Table& tab, int when)
{
if (when == 0) {
- if (diskbased) {
- for (int i = 0; i < tab.getNoOfColumns(); i++) {
+ if (diskbased)
+ {
+ for (int i = 0; i < tab.getNoOfColumns(); i++)
+ {
NdbDictionary::Column* col = tab.getColumn(i);
- if (! col->getPrimaryKey()) {
+ if (! col->getPrimaryKey())
+ {
col->setStorageType(NdbDictionary::Column::StorageTypeDisk);
}
}
}
+ else if (temporaryTables)
+ {
+ tab.setTemporary(true);
+ tab.setLogging(false);
+ }
+
if (tsname != NULL) {
tab.setTablespace(tsname);
}
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2312) | jonas | 19 Oct |