summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@mysql.com>2009-10-21 20:53:44 +0200
committerMikael Ronstrom <mikael@mysql.com>2009-10-21 20:53:44 +0200
commitf3f4e41c3704b6a82942de5fd6c918319e0e4bb2 (patch)
tree68dfb95850fcf981ed46f9e26172009717ca5472 /sql/partition_info.cc
parent540015aac8f486617ee515623ccee2a70c845019 (diff)
downloadmariadb-git-f3f4e41c3704b6a82942de5fd6c918319e0e4bb2.tar.gz
Added checks for no NULL values in VALUES LESS THAN, added tests for no MAXVALUE in VALUES IN
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 52535041776..3bce7dac1fa 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -1992,7 +1992,7 @@ int partition_info::fix_parser_data(THD *thd)
partition_element *part_elem;
part_elem_value *val;
uint num_elements;
- uint i= 0, j;
+ uint i= 0, j, k;
int result;
DBUG_ENTER("partition_info::fix_parser_data");
@@ -2020,6 +2020,15 @@ int partition_info::fix_parser_data(THD *thd)
my_error(ER_PARTITION_COLUMN_LIST_ERROR, MYF(0));
DBUG_RETURN(TRUE);
}
+ for (k= 0; k < num_columns; k++)
+ {
+ part_column_list_val *col_val= &val->col_val_array[k];
+ if (col_val->null_value && part_type == RANGE_PARTITION)
+ {
+ my_error(ER_NULL_IN_VALUES_LESS_THAN, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+ }
}
else
{