Below is the list of changes that have just been committed into a local
5.1 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
1.2143 06/03/04 14:21:27 reggie@big_geek. +3 -0
Bug #17720 Partition ALTER TABLE fails on rename of .MYI file
Fix this by passing the HA_EXTRA_PREPARE_FOR_DELETE onto the newly added or about to be
dropped partitions
so they have an opportunity to close their OS file handle.
sql/ha_partition.h
1.13 06/03/04 14:21:18 reggie@big_geek. +1 -0
added decl for new prepare_for_delete function
sql/ha_partition.cc
1.34 06/03/04 14:21:18 reggie@big_geek. +40 -1
initialize m_new_file to NULL
call new function prepare_for_delete for the HA_EXTRA_PREPARE_FOR_DELETE operation
inside prepare_for_delete, loop over m_new_file and m_reorged_file if they are
non-NULL
client/mysqltest.c
1.193 06/03/04 14:21:17 reggie@big_geek. +1 -0
prevent positive find of pattern when pattern has zero length (this has nothing to do
with this bug fix)
# 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: reggie
# Host: big_geek.
# Root: C:/Work/mysql/mysql-5.1-bug17720
--- 1.33/sql/ha_partition.cc 2006-02-25 15:20:52 -06:00
+++ 1.34/sql/ha_partition.cc 2006-03-04 14:21:18 -06:00
@@ -218,6 +218,7 @@
m_engine_array= NULL;
m_file= NULL;
m_reorged_file= NULL;
+ m_new_file= NULL;
m_reorged_parts= 0;
m_added_file= NULL;
m_tot_parts= 0;
@@ -4680,11 +4681,13 @@
}
/* Category 3), used by MyISAM handlers */
+ case HA_EXTRA_PREPARE_FOR_DELETE:
+ DBUG_RETURN(prepare_for_delete());
+ break;
case HA_EXTRA_NORMAL:
case HA_EXTRA_QUICK:
case HA_EXTRA_NO_READCHECK:
case HA_EXTRA_PREPARE_FOR_UPDATE:
- case HA_EXTRA_PREPARE_FOR_DELETE:
case HA_EXTRA_FORCE_REOPEN:
case HA_EXTRA_FLUSH_CACHE:
{
@@ -4794,6 +4797,41 @@
/*
+ Prepares our new and reorged handlers for rename or delete
+
+ SYNOPSIS
+ prepare_for_delete()
+
+ RETURN VALUE
+ >0 Error code
+ 0 Success
+*/
+
+int ha_partition::prepare_for_delete()
+{
+ int result= 0, tmp;
+ handler **file;
+ DBUG_ENTER("ha_partition::prepare_for_delete()");
+
+ if (m_new_file != NULL)
+ {
+ for (file= m_new_file; *file; file++)
+ if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE)))
+ result= tmp;
+ for (file= m_reorged_file; *file; file++)
+ if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE)))
+ result= tmp;
+ }
+ else
+ {
+ for (file= m_file; *file; file++)
+ if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE)))
+ result= tmp;
+ }
+ DBUG_RETURN(result);
+}
+
+/*
Call extra on all partitions
SYNOPSIS
@@ -4810,6 +4848,7 @@
int result= 0, tmp;
handler **file;
DBUG_ENTER("ha_partition::loop_extra()");
+
/*
TODO, 5.2: this is where you could possibly add optimisations to add the bitmap
_if_ a SELECT.
--- 1.12/sql/ha_partition.h 2006-02-16 10:38:20 -06:00
+++ 1.13/sql/ha_partition.h 2006-03-04 14:21:18 -06:00
@@ -197,6 +197,7 @@
DBUG_RETURN(0);
}
private:
+ int prepare_for_delete();
int copy_partitions(ulonglong *copied, ulonglong *deleted);
void cleanup_new_partition(uint part_count);
int prepare_new_partition(TABLE *table, HA_CREATE_INFO *create_info,
--- 1.192/client/mysqltest.c 2006-02-28 15:14:25 -06:00
+++ 1.193/client/mysqltest.c 2006-03-04 14:21:17 -06:00
@@ -3736,6 +3736,7 @@
{
const char** pattern= dynamic_element(&patterns, i, const char**);
DBUG_PRINT("info", ("pattern: %s", *pattern));
+ if (strlen(*pattern) == 0) continue;
/* Search for the path in string */
while ((p= strstr(val, *pattern)))
{
| Thread |
|---|
| • bk commit into 5.1 tree (reggie:1.2143) BUG#17720 | reggie | 4 Mar |