diff options
author | unknown <mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2006-05-10 12:53:40 -0400 |
---|---|---|
committer | unknown <mikael@c-870ae253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2006-05-10 12:53:40 -0400 |
commit | 4e3f4e970f6476d3b6b79077e26ddcb5a24ef80a (patch) | |
tree | 15485e03be56b9839d6e8ab9f610939e568fad1b /sql/table.cc | |
parent | 3065eeb3f8cff732e1a462b58996105881c7ca88 (diff) | |
download | mariadb-git-4e3f4e970f6476d3b6b79077e26ddcb5a24ef80a.tar.gz |
BUG#19010: Fix issues with that ALTER TABLE from auto-partitioned NDB table doesn't work unless primary key exists on table.
mysql-test/r/ndb_bitfield.result:
Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/ndb_dd_basic.result:
Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/ndb_dd_disk2memory.result:
Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/ndb_gis.result:
Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/ndb_partition_key.result:
New test cases for auto-partitioning change that was made to fix bug
mysql-test/r/rpl_ndb_UUID.result:
Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/r/rpl_ndb_dd_advance.result:
Test cases changes now that auto-partitioning is remembered in frm file
mysql-test/t/ndb_partition_key.test:
New test cases for auto-partitioning change that was made to fix bug
sql/partition_info.h:
New boolean to keep track of auto partitioned or not
sql/sql_partition.cc:
Ensure that auto-partitiong flag is reset when partitions are dropped, added, reorganised or coalesced.
Ensure that auto-partitioned tables are altered into non-partitioned table when ALTER TABLE t1 engine=X
is performed.
sql/sql_show.cc:
Only print partition info for non-auto-partitioned tables
sql/sql_table.cc:
Set auto partition flag when auto partitions are generated in create table
sql/table.cc:
Fix reading of frm file where new auto-partition flag is introduced.
sql/table.h:
New flag for auto partition on share object
sql/unireg.cc:
Fix code for writing frm to also write autopartition flag at end of partition info, fix some length issues
at the same time that was in this part that caused no problems since partition info always was the last info
in the file.
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc index 6ba66569f5c..8227287df0f 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -655,7 +655,6 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, my_free(buff, MYF(0)); goto err; } - next_chunk++; } #else if (partition_info_len) @@ -679,7 +678,15 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, */ next_chunk+= 4; } + else if (share->mysql_version >= 50110) #endif + { + /* New auto_partitioned indicator introduced in 5.1.11 */ +#ifdef WITH_PARTITION_STORAGE_ENGINE + share->auto_partitioned= *next_chunk; +#endif + next_chunk++; + } keyinfo= share->key_info; for (i= 0; i < keys; i++, keyinfo++) { @@ -1469,6 +1476,8 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, Fix the partition functions and ensure they are not constant functions */ + outparam->part_info->is_auto_partitioned= share->auto_partitioned; + DBUG_PRINT("info", ("autopartitioned = %u", share->auto_partitioned)); if (fix_partition_func(thd, share->normalized_path.str, outparam, is_create_table)) goto err; |