Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When 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, 2007-07-10 16:18:07-04:00, jas@rowvwade. +2 -0
Do autocommit every 10,000 records on load and alter table.
storage/falcon/ha_falcon.cpp@stripped, 2007-07-10 16:17:48-04:00, jas@rowvwade. +20 -0
Do autocommit every 10,000 records on load and alter table.
storage/falcon/ha_falcon.h@stripped, 2007-07-10 16:17:49-04:00, jas@rowvwade. +1 -1
Track number of table inserts to support autocommit.
# 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: jas
# Host: rowvwade.
# Root: D:/MySQL/mysql-5.1-falcon
--- 1.198/storage/falcon/ha_falcon.cpp 2007-07-10 16:18:32 -04:00
+++ 1.199/storage/falcon/ha_falcon.cpp 2007-07-10 16:18:32 -04:00
@@ -41,6 +41,8 @@
#define MAX(a,b) ((a >= b) ? (a) : (b))
#endif
+static const int LOAD_AUTOCOMMIT_RECORDS = 10000;
+
#if defined(_WIN32) && MYSQL_VERSION_ID < 0x50100
#define IS_SLASH(c) (c == '/' || c == '\\')
#else
@@ -895,6 +897,21 @@
DBUG_RETURN(error(code));
}
+ if (++insertCount > LOAD_AUTOCOMMIT_RECORDS)
+ switch (thd_sql_command(mySqlThread))
+ {
+ case SQLCOM_LOAD:
+ case SQLCOM_ALTER_TABLE:
+ storageHandler->commit(mySqlThread);
+ storageConnection->startTransaction(thd_tx_isolation(mySqlThread));
+ storageConnection->markVerb();
+ insertCount = 0;
+ break;
+
+ default:
+ ;
+ }
+
DBUG_RETURN(0);
}
@@ -1584,6 +1601,8 @@
if (storageConnection && thd->query)
storageConnection->setCurrentStatement(thd->query);
+ insertCount = 0;
+
switch (thd_sql_command(thd))
{
case SQLCOM_ALTER_TABLE:
@@ -1591,6 +1610,7 @@
case SQLCOM_CREATE_INDEX:
{
int ret = storageTable->alterCheck();
+
if (ret)
DBUG_RETURN(error(ret));
}
--- 1.44/storage/falcon/ha_falcon.h 2007-07-10 16:18:32 -04:00
+++ 1.45/storage/falcon/ha_falcon.h 2007-07-10 16:18:32 -04:00
@@ -98,7 +98,6 @@
int threadSwitchError(void);
int error(int storageError);
void freeActiveBlobs(void);
- //const char* getDbName(const char *tableName);
int setIndexes(void);
int genType(Field *field, CmdGen *gen);
void genKeyFields(KEY *key, CmdGen *gen);
@@ -151,6 +150,7 @@
bool lockForUpdate;
key_range startKey;
key_range endKey;
+ uint64 insertCount;
};
class NfsPluginHandler
| Thread |
|---|
| • bk commit into 6.0-falcon tree (jas:1.2618) | U-ROWVWADEjas | 10 Jul |