cleanup: type_year test formatting
This commit is contained in:
parent
589479b3ec
commit
ba33d4753e
@ -1,4 +1,3 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (y year,y2 year(2));
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
@ -28,6 +27,9 @@ y y2
|
||||
2001 01
|
||||
2069 69
|
||||
drop table t1;
|
||||
#
|
||||
# Bug 2335
|
||||
#
|
||||
create table t1 (y year);
|
||||
insert ignore into t1 values (now());
|
||||
Warnings:
|
||||
@ -36,6 +38,9 @@ select if(y = now(), 1, 0) from t1;
|
||||
if(y = now(), 1, 0)
|
||||
1
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #27176: Assigning a string to an year column has unexpected results
|
||||
#
|
||||
create table t1(a year);
|
||||
insert into t1 values (2000.5), ('2000.5'), ('2001a'), ('2.001E3');
|
||||
Warnings:
|
||||
@ -47,7 +52,9 @@ a
|
||||
2001
|
||||
2001
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
#
|
||||
# Bug #49480: WHERE using YEAR columns returns unexpected results
|
||||
#
|
||||
@ -373,7 +380,8 @@ Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Pleas
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
DROP TABLE t1;
|
||||
#
|
||||
End of 5.1 tests
|
||||
# End of 5.1 tests
|
||||
#
|
||||
create function y2k() returns int deterministic return 2000;
|
||||
create table t1 (a year(2), b int);
|
||||
Warnings:
|
||||
@ -456,9 +464,6 @@ DROP TABLE t1;
|
||||
# End of 10.1 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
|
||||
#
|
||||
CREATE TABLE t1 (a YEAR);
|
||||
|
@ -1,9 +1,6 @@
|
||||
#
|
||||
# Test year
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (y year,y2 year(2));
|
||||
insert into t1 values (0,0),(1999,1999),(2000,2000),(2001,2001),(70,70),(69,69);
|
||||
@ -12,24 +9,27 @@ select * from t1 order by y;
|
||||
select * from t1 order by y2;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug 2335
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug 2335
|
||||
--echo #
|
||||
|
||||
create table t1 (y year);
|
||||
insert ignore into t1 values (now());
|
||||
select if(y = now(), 1, 0) from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #27176: Assigning a string to an year column has unexpected results
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #27176: Assigning a string to an year column has unexpected results
|
||||
--echo #
|
||||
|
||||
create table t1(a year);
|
||||
insert into t1 values (2000.5), ('2000.5'), ('2001a'), ('2.001E3');
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
--echo #
|
||||
--echo # End of 5.0 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Bug #49480: WHERE using YEAR columns returns unexpected results
|
||||
@ -168,9 +168,10 @@ CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4));
|
||||
ALTER TABLE t1 MODIFY COLUMN c2 YEAR(2);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
||||
--echo End of 5.1 tests
|
||||
#
|
||||
# fun with convert_const_to_int
|
||||
# in some cases 00 is equal to 2000, in others it is not.
|
||||
@ -229,10 +230,6 @@ DROP TABLE t1;
|
||||
--echo # End of 10.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
|
||||
--echo #
|
||||
|
Loading…
x
Reference in New Issue
Block a user