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_element.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_element.h')
-rw-r--r-- | sql/partition_element.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sql/partition_element.h b/sql/partition_element.h index d20715d2408..7063e514901 100644 --- a/sql/partition_element.h +++ b/sql/partition_element.h @@ -36,15 +36,22 @@ enum partition_state { PART_IS_ADDED= 8 }; +typedef struct p_elem_val +{ + longlong value; + bool null_value; + bool unsigned_flag; +} part_elem_value; + class partition_element :public Sql_alloc { public: List<partition_element> subpartitions; - List<longlong> list_val_list; + List<part_elem_value> list_val_list; ulonglong part_max_rows; ulonglong part_min_rows; + longlong range_value; char *partition_name; char *tablespace_name; - longlong range_value; char* part_comment; char* data_file_name; char* index_file_name; @@ -52,13 +59,16 @@ public: enum partition_state part_state; uint16 nodegroup_id; bool has_null_value; + bool signed_flag; + bool max_value; partition_element() - : part_max_rows(0), part_min_rows(0), partition_name(NULL), - tablespace_name(NULL), range_value(0), part_comment(NULL), + : part_max_rows(0), part_min_rows(0), range_value(0), + partition_name(NULL), tablespace_name(NULL), part_comment(NULL), data_file_name(NULL), index_file_name(NULL), - engine_type(NULL),part_state(PART_NORMAL), - nodegroup_id(UNDEF_NODEGROUP), has_null_value(FALSE) + engine_type(NULL), part_state(PART_NORMAL), + nodegroup_id(UNDEF_NODEGROUP), has_null_value(FALSE), + signed_flag(FALSE), max_value(FALSE) { subpartitions.empty(); list_val_list.empty(); |