Below is the list of changes that have just been committed into a local
6.0 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-11-14 15:25:30-05:00, jas@rowvwade. +4 -0
Fix table truncation.
storage/falcon/StorageTable.cpp@stripped, 2007-11-14 15:25:20-05:00, jas@rowvwade. +1 -0
Clear the current record when truncating a table, just in
case.
storage/falcon/Table.cpp@stripped, 2007-11-14 15:25:20-05:00, jas@rowvwade. +1 -1
Make sure tables with data section ids of zero can be deleted.
storage/falcon/ha_falcon.cpp@stripped, 2007-11-14 15:25:21-05:00, jas@rowvwade. +9 -3
Reject call to delete_all_row() unless the operation is
a truncate.
storage/falcon/ha_falcon.h@stripped, 2007-11-14 15:25:21-05:00, jas@rowvwade. +2 -0
Enable table truncation.
diff -Nrup a/storage/falcon/StorageTable.cpp b/storage/falcon/StorageTable.cpp
--- a/storage/falcon/StorageTable.cpp 2007-11-13 17:09:36 -05:00
+++ b/storage/falcon/StorageTable.cpp 2007-11-14 15:25:20 -05:00
@@ -83,6 +83,7 @@ int StorageTable::deleteTable(void)
int StorageTable::truncateTable(void)
{
+ clearRecord();
int ret = share->truncateTable(storageConnection);
return ret;
diff -Nrup a/storage/falcon/Table.cpp b/storage/falcon/Table.cpp
--- a/storage/falcon/Table.cpp 2007-11-13 17:09:37 -05:00
+++ b/storage/falcon/Table.cpp 2007-11-14 15:25:20 -05:00
@@ -3098,7 +3098,7 @@ void Table::expunge(Transaction *transac
if (transaction)
transaction->hasUpdates = true;
- if (dataSectionId)
+ if (dataSectionId || blobSectionId)
{
dbb->deleteSection(dataSectionId, TRANSACTION_ID(transaction));
dataSectionId = 0;
diff -Nrup a/storage/falcon/ha_falcon.cpp b/storage/falcon/ha_falcon.cpp
--- a/storage/falcon/ha_falcon.cpp 2007-11-14 01:36:02 -05:00
+++ b/storage/falcon/ha_falcon.cpp 2007-11-14 15:25:21 -05:00
@@ -852,6 +852,7 @@ int StorageInterface::delete_table(const
// to warnings about temp tables
// This fix could affect other DROP TABLE scenarios.
// if (res == StorageErrorTableNotFound)
+
if (res != StorageErrorUncommittedUpdates)
res = 0;
@@ -863,14 +864,19 @@ int StorageInterface::delete_all_rows()
{
DBUG_ENTER("StorageInterface::delete_all_rows");
+ if (!mySqlThread)
+ mySqlThread = current_thd;
+
+ // If this isn't a truncate, punt!
+
+ if (thd_sql_command(mySqlThread) != SQLCOM_TRUNCATE)
+ DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND);
+
int ret = 0;
struct st_table_share *tableShare = table_share;
struct st_table *tableObj = table;
const char *tableName = tableShare->normalized_path.str;
- if (!mySqlThread)
- mySqlThread = current_thd;
-
if (!storageShare)
if ( !(storageShare = storageHandler->preDeleteTable(tableName)) )
DBUG_RETURN(0);
diff -Nrup a/storage/falcon/ha_falcon.h b/storage/falcon/ha_falcon.h
--- a/storage/falcon/ha_falcon.h 2007-11-13 17:09:37 -05:00
+++ b/storage/falcon/ha_falcon.h 2007-11-14 15:25:21 -05:00
@@ -20,7 +20,9 @@ class CmdGen;
class THD;
class my_decimal;
+#define TRUNCATE_ENABLED
//#define XA_ENABLED
+
static const int TRANSACTION_READ_UNCOMMITTED = 1; // Dirty reads, non-repeatable reads and phantom reads can occur.
static const int TRANSACTION_READ_COMMITTED = 2; // Dirty reads are prevented; non-repeatable reads and phantom reads can occur.
static const int TRANSACTION_WRITE_COMMITTED = 4; // Dirty reads are prevented; non-repeatable reads happen after writes; phantom reads can occur.
| Thread |
|---|
| • bk commit into 6.0 tree (jas:1.2677) | U-ROWVWADEjas | 14 Nov |