Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
ba33d475
Commit
ba33d475
authored
4 years ago
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: type_year test formatting
parent
589479b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
mysql-test/r/type_year.result
mysql-test/r/type_year.result
+11
-6
mysql-test/t/type_year.test
mysql-test/t/type_year.test
+12
-15
No files found.
mysql-test/r/type_year.result
View file @
ba33d475
drop table if exists t1;
create table t1 (y year,y2 year(2));
create table t1 (y year,y2 year(2));
Warnings:
Warnings:
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
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
...
@@ -28,6 +27,9 @@ y y2
2001 01
2001 01
2069 69
2069 69
drop table t1;
drop table t1;
#
# Bug 2335
#
create table t1 (y year);
create table t1 (y year);
insert ignore into t1 values (now());
insert ignore into t1 values (now());
Warnings:
Warnings:
...
@@ -36,6 +38,9 @@ select if(y = now(), 1, 0) from t1;
...
@@ -36,6 +38,9 @@ select if(y = now(), 1, 0) from t1;
if(y = now(), 1, 0)
if(y = now(), 1, 0)
1
1
drop table t1;
drop table t1;
#
# Bug #27176: Assigning a string to an year column has unexpected results
#
create table t1(a year);
create table t1(a year);
insert into t1 values (2000.5), ('2000.5'), ('2001a'), ('2.001E3');
insert into t1 values (2000.5), ('2000.5'), ('2001a'), ('2.001E3');
Warnings:
Warnings:
...
@@ -47,7 +52,9 @@ a
...
@@ -47,7 +52,9 @@ a
2001
2001
2001
2001
drop table t1;
drop table t1;
End of 5.0 tests
#
# End of 5.0 tests
#
#
#
# Bug #49480: WHERE using YEAR columns returns unexpected results
# 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
...
@@ -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
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
DROP TABLE t1;
DROP TABLE t1;
#
#
End of 5.1 tests
# End of 5.1 tests
#
create function y2k() returns int deterministic return 2000;
create function y2k() returns int deterministic return 2000;
create table t1 (a year(2), b int);
create table t1 (a year(2), b int);
Warnings:
Warnings:
...
@@ -456,9 +464,6 @@ DROP TABLE t1;
...
@@ -456,9 +464,6 @@ DROP TABLE t1;
# End of 10.1 tests
# End of 10.1 tests
#
#
#
#
# Start of 10.2 tests
#
#
# MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
# MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
#
#
CREATE TABLE t1 (a YEAR);
CREATE TABLE t1 (a YEAR);
...
...
This diff is collapsed.
Click to expand it.
mysql-test/t/type_year.test
View file @
ba33d475
#
#
# Test year
# Test year
#
#
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
create
table
t1
(
y
year
,
y2
year
(
2
));
create
table
t1
(
y
year
,
y2
year
(
2
));
insert
into
t1
values
(
0
,
0
),(
1999
,
1999
),(
2000
,
2000
),(
2001
,
2001
),(
70
,
70
),(
69
,
69
);
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;
...
@@ -12,24 +9,27 @@ select * from t1 order by y;
select
*
from
t1
order
by
y2
;
select
*
from
t1
order
by
y2
;
drop
table
t1
;
drop
table
t1
;
#
--
echo
#
# Bug 2335
--
echo
# Bug 2335
#
--
echo
#
create
table
t1
(
y
year
);
create
table
t1
(
y
year
);
insert
ignore
into
t1
values
(
now
());
insert
ignore
into
t1
values
(
now
());
select
if
(
y
=
now
(),
1
,
0
)
from
t1
;
select
if
(
y
=
now
(),
1
,
0
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
--
echo
#
# Bug #27176: Assigning a string to an year column has unexpected results
--
echo
# Bug #27176: Assigning a string to an year column has unexpected results
#
--
echo
#
create
table
t1
(
a
year
);
create
table
t1
(
a
year
);
insert
into
t1
values
(
2000.5
),
(
'2000.5'
),
(
'2001a'
),
(
'2.001E3'
);
insert
into
t1
values
(
2000.5
),
(
'2000.5'
),
(
'2001a'
),
(
'2.001E3'
);
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
--
echo
End
of
5.0
tests
--
echo
#
--
echo
# End of 5.0 tests
--
echo
#
--
echo
#
--
echo
#
--
echo
# Bug #49480: WHERE using YEAR columns returns unexpected results
--
echo
# Bug #49480: WHERE using YEAR columns returns unexpected results
...
@@ -168,9 +168,10 @@ CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4));
...
@@ -168,9 +168,10 @@ CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4));
ALTER
TABLE
t1
MODIFY
COLUMN
c2
YEAR
(
2
);
ALTER
TABLE
t1
MODIFY
COLUMN
c2
YEAR
(
2
);
DROP
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.1 tests
--
echo
#
--
echo
#
--
echo
End
of
5.1
tests
#
#
# fun with convert_const_to_int
# fun with convert_const_to_int
# in some cases 00 is equal to 2000, in others it is not.
# in some cases 00 is equal to 2000, in others it is not.
...
@@ -229,10 +230,6 @@ DROP TABLE t1;
...
@@ -229,10 +230,6 @@ DROP TABLE t1;
--
echo
# End of 10.1 tests
--
echo
# End of 10.1 tests
--
echo
#
--
echo
#
--
echo
#
--
echo
# Start of 10.2 tests
--
echo
#
--
echo
#
--
echo
#
--
echo
# MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
--
echo
# MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
--
echo
#
--
echo
#
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment