Below is the list of changes that have just been committed into a local
5.1 repository of abotchkov. When abotchkov 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.2391 06/05/14 21:08:34 holyfoot@stripped +3 -0
Merge abotchkov@stripped:/home/bk/mysql-5.1-new
into mysql.com:/usersnfs/abotchkov/mysql-5.1.mrg
sql/sql_table.cc
1.333 06/05/14 21:08:27 holyfoot@stripped +0 -0
Auto merged
sql/sql_parse.cc
1.547 06/05/14 21:08:26 holyfoot@stripped +0 -0
Auto merged
sql/handler.h
1.209 06/05/14 21:08:26 holyfoot@stripped +0 -0
Auto merged
# 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: holyfoot
# Host: production.mysql.com
# Root: /usersnfs/abotchkov/mysql-5.1.mrg/RESYNC
--- 1.208/sql/handler.h 2006-05-10 09:54:03 +02:00
+++ 1.209/sql/handler.h 2006-05-14 21:08:26 +02:00
@@ -603,6 +603,7 @@
#define HTON_FLUSH_AFTER_RENAME (1 << 4)
#define HTON_NOT_USER_SELECTABLE (1 << 5)
#define HTON_TEMPORARY_NOT_SUPPORTED (1 << 6) //Having temporary tables not supported
+#define HTON_ALTER_CANNOT_CREATE (1 << 7) //Cannot use alter to create
typedef struct st_thd_trans
{
--- 1.546/sql/sql_parse.cc 2006-05-11 14:40:31 +02:00
+++ 1.547/sql/sql_parse.cc 2006-05-14 21:08:26 +02:00
@@ -2857,6 +2857,17 @@
res= 1;
goto end_with_restore_list;
}
+#ifdef WITH_PARTITION_STORAGE_ENGINE
+ {
+ partition_info *part_info= thd->lex->part_info;
+ if (part_info && !(part_info= thd->lex->part_info->get_clone()))
+ {
+ res= -1;
+ goto end_with_restore_list;
+ }
+ thd->work_part_info= part_info;
+ }
+#endif
if (select_lex->item_list.elements) // With select
{
select_result *result;
@@ -2926,15 +2937,6 @@
lex->like_name);
else
{
-#ifdef WITH_PARTITION_STORAGE_ENGINE
- partition_info *part_info= thd->lex->part_info;
- if (part_info && !(part_info= thd->lex->part_info->get_clone()))
- {
- res= -1;
- goto end_with_restore_list;
- }
- thd->work_part_info= part_info;
-#endif
res= mysql_create_table(thd, create_table->db,
create_table->table_name, &lex->create_info,
lex->create_list,
--- 1.332/sql/sql_table.cc 2006-05-10 09:54:05 +02:00
+++ 1.333/sql/sql_table.cc 2006-05-14 21:08:27 +02:00
@@ -3078,6 +3078,7 @@
}
file->set_auto_partitions(part_info);
part_info->default_engine_type= create_info->db_type;
+ part_info->is_auto_partitioned= TRUE;
}
if (part_info)
{
@@ -3138,8 +3139,8 @@
}
DBUG_PRINT("info", ("db_type = %d",
ha_legacy_type(part_info->default_engine_type)));
- if (part_info->check_partition_info( &engine_type, file,
- create_info->max_rows))
+ if (part_info->check_partition_info(&engine_type, file,
+ create_info->max_rows))
goto err;
part_info->default_engine_type= engine_type;
@@ -3198,6 +3199,12 @@
}
else if (create_info->db_type != engine_type)
{
+ /*
+ We come here when we don't use a partitioned handler.
+ Since we use a partitioned table it must be "native partitioned".
+ We have switched engine from defaults, most likely only specified
+ engines in partition clauses.
+ */
delete file;
if (!(file= get_new_handler((TABLE_SHARE*) 0, thd->mem_root, engine_type)))
{
@@ -5098,7 +5105,9 @@
ha_resolve_storage_engine_name(old_db_type),
ha_resolve_storage_engine_name(new_db_type)));
if (ha_check_storage_engine_flag(old_db_type, HTON_ALTER_NOT_SUPPORTED) ||
- ha_check_storage_engine_flag(new_db_type, HTON_ALTER_NOT_SUPPORTED))
+ ha_check_storage_engine_flag(new_db_type, HTON_ALTER_NOT_SUPPORTED) ||
+ (old_db_type != new_db_type &&
+ ha_check_storage_engine_flag(new_db_type, HTON_ALTER_CANNOT_CREATE)))
{
DBUG_PRINT("info", ("doesn't support alter"));
my_error(ER_ILLEGAL_HA, MYF(0), table_name);
| Thread |
|---|
| • bk commit into 5.1 tree (holyfoot:1.2391) | holyfoot | 14 May |