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
539c4da1
Commit
539c4da1
authored
Jan 06, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use relative dates so that the tests don't fail when the year
changes.
parent
b3138ef7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
mysql-test/r/view.result
mysql-test/r/view.result
+3
-3
mysql-test/t/view.test
mysql-test/t/view.test
+3
-3
No files found.
mysql-test/r/view.result
View file @
539c4da1
...
...
@@ -2675,9 +2675,9 @@ lName varchar(25) NOT NULL,
DOB date NOT NULL,
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES
('
Hank', 'Hill', '1964-09-29'
),
('
Tom', 'Adams', '1908-02-14'
),
('
Homer', 'Simpson', '1968-03-05'
);
('
Alice', 'Hill', date_sub(curdate(), interval 15271 day)
),
('
Bob', 'Adams', date_sub(curdate(), interval 33600 day)
),
('
Carol', 'Simpson', date_sub(curdate(), interval 13700 day)
);
CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age
FROM t1 HAVING Age < 75;
...
...
mysql-test/t/view.test
View file @
539c4da1
...
...
@@ -2544,9 +2544,9 @@ CREATE TABLE t1(
uID
int
unsigned
NOT
NULL
AUTO_INCREMENT
PRIMARY
KEY
);
INSERT
INTO
t1
(
fName
,
lName
,
DOB
)
VALUES
(
'
Hank'
,
'Hill'
,
'1964-09-29'
),
(
'
Tom'
,
'Adams'
,
'1908-02-14'
),
(
'
Homer'
,
'Simpson'
,
'1968-03-05'
);
(
'
Alice'
,
'Hill'
,
date_sub
(
curdate
(),
interval
15271
day
)
),
(
'
Bob'
,
'Adams'
,
date_sub
(
curdate
(),
interval
33600
day
)
),
(
'
Carol'
,
'Simpson'
,
date_sub
(
curdate
(),
interval
13700
day
)
);
CREATE
VIEW
v1
AS
SELECT
(
year
(
now
())
-
year
(
DOB
))
AS
Age
...
...
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