summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/inc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-12-16 16:47:07 +0300
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2009-12-16 16:47:07 +0300
commitf1e83a4163458f7e25c709403cc7c7b48a7ef23e (patch)
treefa68ffcd1dbdaf248e483a5692358fe7330ec507 /mysql-test/suite/parts/inc
parentbcedf962ff7d22dd4d921a099fa38feeacc01b0b (diff)
parent8b19de0de10094b25be63cd6a9a1d61517602f0b (diff)
downloadmariadb-git-f1e83a4163458f7e25c709403cc7c7b48a7ef23e.tar.gz
Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Diffstat (limited to 'mysql-test/suite/parts/inc')
-rw-r--r--mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc14
-rw-r--r--mysql-test/suite/parts/inc/partition_timestamp.inc82
2 files changed, 54 insertions, 42 deletions
diff --git a/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc b/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc
index 1a66a26312a..be02e4e0402 100644
--- a/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc
+++ b/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc
@@ -152,10 +152,16 @@ let $valsqlfunc = timestampdiff(YEAR,'2002-05-01','2001-01-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
-let $sqlfunc = unix_timestamp(col1);
-let $valsqlfunc = unix_timestamp ('2002-05-01');
-let $coltype = date;
---source suite/parts/inc/partition_blocked_sql_funcs.inc
+################################################################################
+# After the fix for bug #42849 the server behavior does not fit into this test's
+# architecture: for UNIX_TIMESTAMP() some of the queries in
+# suite/parts/inc/partition_blocked_sql_funcs.inc will fail with a different
+# error (ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR) and some will succeed where
+################################################################################
+#let $sqlfunc = unix_timestamp(col1);
+#let $valsqlfunc = unix_timestamp ('2002-05-01');
+#let $coltype = date;
+#--source suite/parts/inc/partition_blocked_sql_funcs.inc
let $sqlfunc = week(col1);
let $valsqlfunc = week('2002-05-01');
diff --git a/mysql-test/suite/parts/inc/partition_timestamp.inc b/mysql-test/suite/parts/inc/partition_timestamp.inc
index d152c82a76f..4cf61c155bc 100644
--- a/mysql-test/suite/parts/inc/partition_timestamp.inc
+++ b/mysql-test/suite/parts/inc/partition_timestamp.inc
@@ -33,42 +33,48 @@ select count(*) from t2;
select * from t2;
drop table t2;
-eval create table t3 (a timestamp not null, primary key(a)) engine=$engine
-partition by range (month(a)) subpartition by key (a)
-subpartitions 3 (
-partition quarter1 values less than (4),
-partition quarter2 values less than (7),
-partition quarter3 values less than (10),
-partition quarter4 values less than (13)
-);
-show create table t3;
-let $count=12;
---echo $count inserts;
-while ($count)
-{
-eval insert into t3 values (date_add('1970-01-01 00:00:00',interval $count-1 month));
-dec $count;
-}
-select count(*) from t3;
-select * from t3;
-drop table t3;
+################################################################################
+# The following 2 tests are no longer valid after bug #42849 has been fixed:
+# it is not possible to use a timezone-dependent (such as month(timestamp_col)
+# or just a timestamp_col in a numeric context) anymore.
+################################################################################
-eval create table t4 (a timestamp not null, primary key(a)) engine=$engine
-partition by list (month(a)) subpartition by key (a)
-subpartitions 3 (
-partition quarter1 values in (0,1,2,3),
-partition quarter2 values in (4,5,6),
-partition quarter3 values in (7,8,9),
-partition quarter4 values in (10,11,12)
-);
-show create table t4;
-let $count=12;
---echo $count inserts;
-while ($count)
-{
-eval insert into t4 values (date_add('1970-01-01 00:00:00',interval $count-1 month));
-dec $count;
-}
-select count(*) from t4;
-select * from t4;
-drop table t4;
+# eval create table t3 (a timestamp not null, primary key(a)) engine=$engine
+# partition by range (month(a)) subpartition by key (a)
+# subpartitions 3 (
+# partition quarter1 values less than (4),
+# partition quarter2 values less than (7),
+# partition quarter3 values less than (10),
+# partition quarter4 values less than (13)
+# );
+# show create table t3;
+# let $count=12;
+# --echo $count inserts;
+# while ($count)
+# {
+# eval insert into t3 values (date_add('1970-01-01 00:00:00',interval $count-1 month));
+# dec $count;
+# }
+# select count(*) from t3;
+# select * from t3;
+# drop table t3;
+
+# eval create table t4 (a timestamp not null, primary key(a)) engine=$engine
+# partition by list (month(a)) subpartition by key (a)
+# subpartitions 3 (
+# partition quarter1 values in (0,1,2,3),
+# partition quarter2 values in (4,5,6),
+# partition quarter3 values in (7,8,9),
+# partition quarter4 values in (10,11,12)
+# );
+# show create table t4;
+# let $count=12;
+# --echo $count inserts;
+# while ($count)
+# {
+# eval insert into t4 values (date_add('1970-01-01 00:00:00',interval $count-1 month));
+# dec $count;
+# }
+# select count(*) from t4;
+# select * from t4;
+# drop table t4;