Below is the list of changes that have just been committed into a local
5.1 repository of mattiasj. When mattiasj 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, 2008-02-29 11:28:16+01:00,
mattiasj@stripped +2 -0
Bug#24159: Altered AUTO_INCREMENT not effective when inserting in MERGE
This is the updated 5.0 patch for 5.1+
(get_auto_increment changed from 5.0 to 5.1)
storage/myisammrg/ha_myisammrg.cc@stripped, 2008-02-29 11:28:13+01:00,
mattiasj@stripped +30 -0
Bug#24159: Altered AUTO_INCREMENT not efective when inserting in MERGE
This is the updated 5.0 patch for 5.1+
(get_auto_increment changed from 5.0 to 5.1)
storage/myisammrg/ha_myisammrg.h@stripped, 2008-02-29 11:28:13+01:00,
mattiasj@stripped +4 -0
Bug#24159: Altered AUTO_INCREMENT not effective when inserting in MERG
This is the updated 5.0 patch for 5.1+
(get_auto_increment changed from 5.0 to 5.1+)
diff -Nrup a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
--- a/storage/myisammrg/ha_myisammrg.cc 2008-02-29 10:51:56 +01:00
+++ b/storage/myisammrg/ha_myisammrg.cc 2008-02-29 11:28:13 +01:00
@@ -1168,6 +1168,36 @@ static int myisammrg_init(void *p)
return 0;
}
+void ha_myisammrg::get_auto_increment(ulonglong offset, ulonglong increment,
+ ulonglong nb_desired_values,
+ ulonglong *first_value,
+ ulonglong *nb_reserved_values)
+{
+ DBUG_ENTER("ha_myisammrg::get_auto_increment");
+
+ /* use default if not first part of multi column index */
+ if (table->s->next_number_key_offset)
+ {
+ handler::get_auto_increment(offset, increment, nb_desired_values,
+ first_value, nb_reserved_values);
+ DBUG_VOID_RETURN;
+ }
+
+ if (file->merge_insert_method == MERGE_INSERT_TO_FIRST)
+ file->current_table= file->open_tables;
+ else if (file->merge_insert_method == MERGE_INSERT_TO_LAST)
+ file->current_table= file->end_table-1;
+ else /* unsupported insertion method, will fail in myrg_write */
+ {
+ *first_value= ~(ulonglong) 0;
+ DBUG_VOID_RETURN;
+ }
+ *first_value= file->current_table->table->s->state.auto_increment+1;
+ /* MyISAM has only table-level lock, so reserves to +inf */
+ *nb_reserved_values= ULONGLONG_MAX;
+ DBUG_VOID_RETURN;
+}
+
struct st_mysql_storage_engine myisammrg_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
diff -Nrup a/storage/myisammrg/ha_myisammrg.h b/storage/myisammrg/ha_myisammrg.h
--- a/storage/myisammrg/ha_myisammrg.h 2008-02-29 10:53:25 +01:00
+++ b/storage/myisammrg/ha_myisammrg.h 2008-02-29 11:28:13 +01:00
@@ -94,4 +94,8 @@ class ha_myisammrg: public handler
TABLE *table_ptr() { return table; }
bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
int check(THD* thd, HA_CHECK_OPT* check_opt);
+ virtual void get_auto_increment(ulonglong offset, ulonglong increment,
+ ulonglong nb_desired_values,
+ ulonglong *first_value,
+ ulonglong *nb_reserved_values);
};
| Thread |
|---|
| • bk commit into 5.1 tree (mattiasj:1.2531) BUG#24159 | mattiasj | 29 Feb 2008 |