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
8fbf1f8e
Commit
8fbf1f8e
authored
Nov 22, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved test to correct file
parent
e42c72e2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
13 deletions
+23
-13
mysql-test/r/func_test.result
mysql-test/r/func_test.result
+0
-3
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+5
-0
mysql-test/t/func_test.test
mysql-test/t/func_test.test
+0
-10
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+18
-0
No files found.
mysql-test/r/func_test.result
View file @
8fbf1f8e
...
@@ -26,9 +26,6 @@
...
@@ -26,9 +26,6 @@
1 1 1
1 1 1
-1.49 or -1.49 0.6 or 0.6
-1.49 or -1.49 0.6 or 0.6
1 1
1 1
start ctime1 ctime2
start ctime1 ctime2
2002-11-04 00:00:00 20021029165106 20021105164731
5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1
5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1
0 1
0 1
1 and 2 between 2 and 10 2 between 2 and 10 and 1
1 and 2 between 2 and 10 2 between 2 and 10 and 1
...
...
mysql-test/r/func_time.result
View file @
8fbf1f8e
...
@@ -220,3 +220,8 @@ to_days("0000-00-00") to_days(d) to_days(dt) to_days(t) to_days(c)
...
@@ -220,3 +220,8 @@ to_days("0000-00-00") to_days(d) to_days(dt) to_days(t) to_days(c)
NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL
extract(MONTH FROM "0000-00-00") extract(MONTH FROM d) extract(MONTH FROM dt) extract(MONTH FROM t) extract(MONTH FROM c)
extract(MONTH FROM "0000-00-00") extract(MONTH FROM d) extract(MONTH FROM dt) extract(MONTH FROM t) extract(MONTH FROM c)
0 0 0 0 0
0 0 0 0 0
start ctime1 ctime2
start ctime1 ctime2
2002-11-04 00:00:00 20021029165106 20021105164731
start ctime1 ctime2
2002-11-04 00:00:00 2002-10-29 16:51:06 2002-11-05 16:47:31
mysql-test/t/func_test.test
View file @
8fbf1f8e
...
@@ -15,16 +15,6 @@ select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between
...
@@ -15,16 +15,6 @@ select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between
select
'b'
between
'a'
and
'c'
,
'B'
between
'a'
and
'c'
;
select
'b'
between
'a'
and
'c'
,
'B'
between
'a'
and
'c'
;
select
2
in
(
3
,
2
,
5
,
9
,
5
,
1
),
"monty"
in
(
"david"
,
"monty"
,
"allan"
),
1.2
in
(
1.4
,
1.2
,
1.0
);
select
2
in
(
3
,
2
,
5
,
9
,
5
,
1
),
"monty"
in
(
"david"
,
"monty"
,
"allan"
),
1.2
in
(
1.4
,
1.2
,
1.0
);
select
-
1.49
or
-
1.49
,
0.6
or
0.6
;
select
-
1.49
or
-
1.49
,
0.6
or
0.6
;
drop
table
if
exists
t1
,
t2
;
CREATE
TABLE
t1
(
start
datetime
default
NULL
)
TYPE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
'2002-10-21 00:00:00'
);
INSERT
INTO
t1
VALUES
(
'2002-10-28 00:00:00'
);
INSERT
INTO
t1
VALUES
(
'2002-11-04 00:00:00'
);
CREATE
TABLE
t2
(
ctime1
timestamp
(
14
)
NOT
NULL
,
ctime2
timestamp
(
14
)
NOT
NULL
)
TYPE
=
MyISAM
;
INSERT
INTO
t2
VALUES
(
20021029165106
,
20021105164731
);
select
*
from
t1
,
t2
where
t1
.
start
between
t2
.
ctime1
and
t2
.
ctime2
;
select
*
from
t1
,
t2
where
t1
.
start
>=
t2
.
ctime1
and
t1
.
start
<=
t2
.
ctime2
;
drop
table
if
exists
t1
,
t2
;
#
#
# Wrong usage of functions
# Wrong usage of functions
...
...
mysql-test/t/func_time.test
View file @
8fbf1f8e
...
@@ -150,3 +150,21 @@ select yearweek("0000-00-00"),yearweek(d),yearweek(dt),yearweek(t),yearweek(c) f
...
@@ -150,3 +150,21 @@ select yearweek("0000-00-00"),yearweek(d),yearweek(dt),yearweek(t),yearweek(c) f
select
to_days
(
"0000-00-00"
),
to_days
(
d
),
to_days
(
dt
),
to_days
(
t
),
to_days
(
c
)
from
t1
;
select
to_days
(
"0000-00-00"
),
to_days
(
d
),
to_days
(
dt
),
to_days
(
t
),
to_days
(
c
)
from
t1
;
select
extract
(
MONTH
FROM
"0000-00-00"
),
extract
(
MONTH
FROM
d
),
extract
(
MONTH
FROM
dt
),
extract
(
MONTH
FROM
t
),
extract
(
MONTH
FROM
c
)
from
t1
;
select
extract
(
MONTH
FROM
"0000-00-00"
),
extract
(
MONTH
FROM
d
),
extract
(
MONTH
FROM
dt
),
extract
(
MONTH
FROM
t
),
extract
(
MONTH
FROM
c
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# Test problem with TIMESTAMP and BETWEEN
#
CREATE
TABLE
t1
(
start
datetime
default
NULL
);
INSERT
INTO
t1
VALUES
(
'2002-10-21 00:00:00'
),(
'2002-10-28 00:00:00'
),(
'2002-11-04 00:00:00'
);
CREATE
TABLE
t2
(
ctime1
timestamp
(
14
)
NOT
NULL
,
ctime2
timestamp
(
14
)
NOT
NULL
);
INSERT
INTO
t2
VALUES
(
20021029165106
,
20021105164731
);
CREATE
TABLE
t3
(
ctime1
char
(
19
)
NOT
NULL
,
ctime2
char
(
19
)
NOT
NULL
);
INSERT
INTO
t3
VALUES
(
"2002-10-29 16:51:06"
,
"2002-11-05 16:47:31"
);
# The following statement should be fixed to return a row in 4.1
select
*
from
t1
,
t2
where
t1
.
start
between
t2
.
ctime1
and
t2
.
ctime2
;
select
*
from
t1
,
t2
where
t1
.
start
>=
t2
.
ctime1
and
t1
.
start
<=
t2
.
ctime2
;
select
*
from
t1
,
t3
where
t1
.
start
between
t3
.
ctime1
and
t3
.
ctime2
;
drop
table
t1
,
t2
,
t3
;
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