diff options
author | unknown <mikael@c-4909e253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2006-04-17 22:51:34 -0400 |
---|---|---|
committer | unknown <mikael@c-4909e253.1238-1-64736c10.cust.bredbandsbolaget.se> | 2006-04-17 22:51:34 -0400 |
commit | faa5f3e00754f326eed456b9d7b36be751fd11b3 (patch) | |
tree | 6000e72ead29b81629a2ee2c82b7a63e4cca694b /sql/partition_info.h | |
parent | a514095a5d306fead8d22d03a39c83db18d98ef8 (diff) | |
download | mariadb-git-faa5f3e00754f326eed456b9d7b36be751fd11b3.tar.gz |
BUG#16002: Make partition functions that are unsigned work properly
mysql-test/r/partition.result:
A number of new test cases for unsigned partition functions
mysql-test/r/partition_error.result:
A number of new test cases for unsigned partition functions
mysql-test/r/partition_range.result:
A number of new test cases for unsigned partition functions
mysql-test/t/partition.test:
A number of new test cases for unsigned partition functions
mysql-test/t/partition_error.test:
A number of new test cases for unsigned partition functions
mysql-test/t/partition_range.test:
A number of new test cases for unsigned partition functions
sql/ha_partition.cc:
Error message for no partition found needs to take signed/unsigned into account when printing erroneus value
sql/partition_element.h:
Introduced signed_flag and max_value flag on partition elements
Also list is now a list of a struct rather than simply longlong values
Small rearranges of order
sql/partition_info.cc:
Introduced signed_flag and max_value flag on partition elements
Also list is now a list of a struct rather than simply longlong values
Small rearranges of order
Lots of new code to handle checks of proper definition of table when
partition function is unsigned
sql/partition_info.h:
Mostly rearrangement of code and some addition of a THD object in check_partition_info call
plus a new method for comparing unsigned values
sql/share/errmsg.txt:
Negative values not ok for unsigned partition functions
sql/sql_partition.cc:
Fixed a multi-thread bug (when defining several partitioned tables in parallel)
New code to generate partition syntax that takes into account sign of constants.
Made function fix_fields_part_func more reusable.
Fixed a number of get_partition_id functions for range and list and similar functions
for partition pruning code.
Unfortunately fairly much duplication of code with just small changes.
sql/sql_partition.h:
New function headers
sql/sql_show.cc:
Changed list of values for LIST partitioned tables
Also fixed printing of unsigned values in INFORMATION SCHEMA for partitioned table
sql/sql_table.cc:
Fixed for new interface
sql/sql_yacc.yy:
Moved definition of struct to partition_element.h
Added code to keep track of sign of constants in
RANGE and LIST partitions
sql/table.cc:
Fixed for new interface
Diffstat (limited to 'sql/partition_info.h')
-rw-r--r-- | sql/partition_info.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/sql/partition_info.h b/sql/partition_info.h index 664c8834b0b..5a2cacd3c71 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -163,6 +163,7 @@ public: uint no_subpart_fields; uint no_full_part_fields; + uint has_null_part_id; /* This variable is used to calculate the partition id when using LINEAR KEY/HASH. This functionality is kept in the MySQL Server @@ -182,7 +183,6 @@ public: bool fixed; bool from_openfrm; bool has_null_value; - uint has_null_part_id; partition_info() @@ -204,19 +204,13 @@ public: no_parts(0), no_subparts(0), count_curr_subparts(0), part_error_code(0), no_list_values(0), no_part_fields(0), no_subpart_fields(0), - no_full_part_fields(0), linear_hash_mask(0), - use_default_partitions(TRUE), - use_default_no_partitions(TRUE), - use_default_subpartitions(TRUE), - use_default_no_subpartitions(TRUE), - default_partitions_setup(FALSE), - defined_max_value(FALSE), + no_full_part_fields(0), has_null_part_id(0), linear_hash_mask(0), + use_default_partitions(TRUE), use_default_no_partitions(TRUE), + use_default_subpartitions(TRUE), use_default_no_subpartitions(TRUE), + default_partitions_setup(FALSE), defined_max_value(FALSE), list_of_part_fields(FALSE), list_of_subpart_fields(FALSE), - linear_hash_ind(FALSE), - fixed(FALSE), - from_openfrm(FALSE), - has_null_value(FALSE), - has_null_part_id(0) + linear_hash_ind(FALSE), fixed(FALSE), from_openfrm(FALSE), + has_null_value(FALSE) { all_fields_in_PF.clear_all(); all_fields_in_PPF.clear_all(); @@ -248,10 +242,11 @@ public: static bool check_engine_mix(handlerton **engine_array, uint no_parts); bool check_range_constants(); bool check_list_constants(); - bool check_partition_info(handlerton **eng_type, + bool check_partition_info(THD *thd, handlerton **eng_type, handler *file, ulonglong max_rows); private: static int list_part_cmp(const void* a, const void* b); + static int list_part_cmp_unsigned(const void* a, const void* b); bool set_up_default_partitions(handler *file, ulonglong max_rows, uint start_no); bool set_up_default_subpartitions(handler *file, ulonglong max_rows); |