List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:December 8 2009 9:50am
Subject:Re: bzr commit into mysql-pe branch (Alexey.Kopytov:3688) Bug#42849
View as plain text  
Patch approved, but please change some typos in the test, see below
OK to push after these changes.

Very good patch, with good comments!



/Mattias

Alexey Kopytov wrote:
> #At file:///data/src/bzr/bugteam/bug42849/my60-bug42849/ based on
> revid:magne.mahre@stripped
> 
>  3688 Alexey Kopytov	2009-11-29
>       Bug #42849: innodb crash with varying time_zone on partitioned 
>                   timestamp primary key 
>        
>       Intermediate patch for discussion. Changes from the previous 
>       version: 
>        
>       - reject any expressions containing TIMESTAMP values as 
>       arguments, not just the date/time functions. The only
>       exception for UNIX_TIMESTAMP(timestamp_value) still holds.
>       
>       - new test cases to check the above statement.
> 
>     modified:
>       mysql-test/r/partition.result
>       mysql-test/r/partition_bug18198.result
>       mysql-test/r/partition_error.result
>       mysql-test/t/partition.test
>       mysql-test/t/partition_bug18198.test
>       mysql-test/t/partition_error.test
>       sql/item.h
>       sql/item_func.h
>       sql/item_timefunc.h
>       sql/share/errmsg-utf8.txt
>       sql/share/errmsg.txt
>       sql/sql_partition.cc
>       sql/sql_partition.h
>       sql/sql_yacc.yy
> === modified file 'mysql-test/r/partition.result'
> --- a/mysql-test/r/partition.result	2009-10-30 16:34:50 +0000
> +++ b/mysql-test/r/partition.result	2009-11-29 17:07:13 +0000
<snip>

> @@ -653,3 +653,295 @@ ERROR HY000: This partition function is 
>  create table t1 (a char(10))
>  partition by hash (extractvalue(a,'a'));
>  ERROR HY000: This partition function is not allowed
> +#
> +# Bug #42849: innodb crash with varying time_zone on partitioned
> +#             timestamp primary key
> +#
> +CREATE TABLE old (a TIMESTAMP NOT NULL PRIMARY KEY)
> +PARTITION BY RANGE (UNIX_TIMESTAMP(a)) (
> +PARTITION p VALUES LESS THAN (20080819),

mattiasj: More logical to have s time_t value instead of a date like 
range, applies to all 20080819 ranges...
Maybe also add one test with (UNIX_TIMESTAMP(timestamp_col) + 
TO_DAYS(datetime_col)) as the partitioning expression (it works as 
expected).

> +PARTITION pmax VALUES LESS THAN MAXVALUE);
> +CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
> +PARTITION BY RANGE (a) (
> +PARTITION p VALUES LESS THAN (20080819),
> +PARTITION pmax VALUES LESS THAN MAXVALUE);
> +ERROR HY000: The PARTITION function returns the wrong type

<snip>
Thread
bzr commit into mysql-pe branch (Alexey.Kopytov:3688) Bug#42849Alexey Kopytov29 Nov
  • Re: bzr commit into mysql-pe branch (Alexey.Kopytov:3688) Bug#42849Mattias Jonsson8 Dec
  • Re: bzr commit into mysql-pe branch (Alexey.Kopytov:3688) Bug#42849Mattias Jonsson8 Dec