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
0f2a1f0d
Commit
0f2a1f0d
authored
Apr 10, 2006
by
igor@rurik.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0
parents
8b7526db
e2feeb88
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
9 deletions
+58
-9
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+11
-5
mysql-test/r/having.result
mysql-test/r/having.result
+0
-2
mysql-test/r/view.result
mysql-test/r/view.result
+21
-0
mysql-test/t/cast.test
mysql-test/t/cast.test
+2
-0
mysql-test/t/having.test
mysql-test/t/having.test
+2
-0
mysql-test/t/view.test
mysql-test/t/view.test
+20
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-2
No files found.
mysql-test/mysql-test-run.pl
View file @
0f2a1f0d
...
@@ -3194,11 +3194,6 @@ sub run_mysqltest ($) {
...
@@ -3194,11 +3194,6 @@ sub run_mysqltest ($) {
mtr_init_args
(
\
$args
);
mtr_init_args
(
\
$args
);
if
(
$opt_valgrind_mysqltest
)
{
valgrind_arguments
(
$args
,
\
$exe
);
}
mtr_add_arg
(
$args
,
"
--no-defaults
");
mtr_add_arg
(
$args
,
"
--no-defaults
");
mtr_add_arg
(
$args
,
"
--silent
");
mtr_add_arg
(
$args
,
"
--silent
");
mtr_add_arg
(
$args
,
"
-v
");
mtr_add_arg
(
$args
,
"
-v
");
...
@@ -3314,6 +3309,17 @@ sub run_mysqltest ($) {
...
@@ -3314,6 +3309,17 @@ sub run_mysqltest ($) {
# Add arguments that should not go into the MYSQL_TEST env var
# Add arguments that should not go into the MYSQL_TEST env var
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
if
(
$opt_valgrind_mysqltest
)
{
# Prefix the Valgrind options to the argument list.
# We do this here, since we do not want to Valgrind the nested invocations
# of mysqltest; that would mess up the stderr output causing test failure.
my
@args_saved
=
@$args
;
mtr_init_args
(
\
$args
);
valgrind_arguments
(
$args
,
\
$exe
);
mtr_add_arg
(
$args
,
"
%s
",
$_
)
for
@args_saved
;
}
mtr_add_arg
(
$args
,
"
--test-file
");
mtr_add_arg
(
$args
,
"
--test-file
");
mtr_add_arg
(
$args
,
$tinfo
->
{'
path
'});
mtr_add_arg
(
$args
,
$tinfo
->
{'
path
'});
...
...
mysql-test/r/having.result
View file @
0f2a1f0d
...
@@ -360,8 +360,6 @@ s1 count(s1)
...
@@ -360,8 +360,6 @@ s1 count(s1)
y 1
y 1
drop table t1;
drop table t1;
DROP SCHEMA IF EXISTS HU;
DROP SCHEMA IF EXISTS HU;
Warnings:
Note 1008 Can't drop database 'HU'; database doesn't exist
CREATE SCHEMA HU ;
CREATE SCHEMA HU ;
USE HU ;
USE HU ;
CREATE TABLE STAFF
CREATE TABLE STAFF
...
...
mysql-test/r/view.result
View file @
0f2a1f0d
...
@@ -2579,3 +2579,24 @@ COUNT(*)
...
@@ -2579,3 +2579,24 @@ COUNT(*)
2
2
DROP VIEW v2;
DROP VIEW v2;
DROP TABLE t1, t2;
DROP TABLE t1, t2;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY,
td date DEFAULT NULL, KEY idx(td));
INSERT INTO t1 VALUES
(1, '2005-01-01'), (2, '2005-01-02'), (3, '2005-01-02'),
(4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'),
(7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06');
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
id td
2 2005-01-02
3 2005-01-02
4 2005-01-03
5 2005-01-04
SELECT * FROM v1 WHERE td BETWEEN '2005.01.02' AND '2005.01.04';
id td
2 2005-01-02
3 2005-01-02
4 2005-01-03
5 2005-01-04
DROP VIEW v1;
DROP TABLE t1;
mysql-test/t/cast.test
View file @
0f2a1f0d
...
@@ -171,6 +171,8 @@ select cast(1.0e+300 as signed int);
...
@@ -171,6 +171,8 @@ select cast(1.0e+300 as signed int);
CREATE
TABLE
t1
(
f1
double
);
CREATE
TABLE
t1
(
f1
double
);
INSERT
INTO
t1
SET
f1
=
-
1.0e+30
;
INSERT
INTO
t1
SET
f1
=
-
1.0e+30
;
INSERT
INTO
t1
SET
f1
=
+
1.0e+30
;
INSERT
INTO
t1
SET
f1
=
+
1.0e+30
;
# Expected result is +-1e+30, but Windows returns +-1e+030.
--
replace_result
1
e
+
030
1
e
+
30
SELECT
f1
AS
double_val
,
CAST
(
f1
AS
SIGNED
INT
)
AS
cast_val
FROM
t1
;
SELECT
f1
AS
double_val
,
CAST
(
f1
AS
SIGNED
INT
)
AS
cast_val
FROM
t1
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
...
...
mysql-test/t/having.test
View file @
0f2a1f0d
...
@@ -354,7 +354,9 @@ drop table t1;
...
@@ -354,7 +354,9 @@ drop table t1;
# when the server is run on Windows or with --lower-case-table-names=1
# when the server is run on Windows or with --lower-case-table-names=1
#
#
--
disable_warnings
DROP
SCHEMA
IF
EXISTS
HU
;
DROP
SCHEMA
IF
EXISTS
HU
;
--
enable_warnings
CREATE
SCHEMA
HU
;
CREATE
SCHEMA
HU
;
USE
HU
;
USE
HU
;
...
...
mysql-test/t/view.test
View file @
0f2a1f0d
...
@@ -2439,3 +2439,23 @@ SELECT COUNT(*) FROM t1 LEFT JOIN v2 ON t1.id=v2.id;
...
@@ -2439,3 +2439,23 @@ SELECT COUNT(*) FROM t1 LEFT JOIN v2 ON t1.id=v2.id;
DROP
VIEW
v2
;
DROP
VIEW
v2
;
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
#
# Bug #16069: VIEW does return the same results as underlying SELECT
# with WHERE condition containing BETWEEN over dates
CREATE
TABLE
t1
(
id
int
NOT
NULL
PRIMARY
KEY
,
td
date
DEFAULT
NULL
,
KEY
idx
(
td
));
INSERT
INTO
t1
VALUES
(
1
,
'2005-01-01'
),
(
2
,
'2005-01-02'
),
(
3
,
'2005-01-02'
),
(
4
,
'2005-01-03'
),
(
5
,
'2005-01-04'
),
(
6
,
'2005-01-05'
),
(
7
,
'2005-01-05'
),
(
8
,
'2005-01-05'
),
(
9
,
'2005-01-06'
);
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
WHERE
td
BETWEEN
'2005.01.02'
AND
'2005.01.04'
;
SELECT
*
FROM
v1
WHERE
td
BETWEEN
'2005.01.02'
AND
'2005.01.04'
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
sql/item_cmpfunc.cc
View file @
0f2a1f0d
...
@@ -55,8 +55,8 @@ static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems)
...
@@ -55,8 +55,8 @@ static void agg_cmp_type(THD *thd, Item_result *type, Item **items, uint nitems)
bool
all_constant
=
TRUE
;
bool
all_constant
=
TRUE
;
/* If the first argument is a FIELD_ITEM, pull out the field. */
/* If the first argument is a FIELD_ITEM, pull out the field. */
if
(
items
[
0
]
->
type
()
==
Item
::
FIELD_ITEM
)
if
(
items
[
0
]
->
real_item
()
->
type
()
==
Item
::
FIELD_ITEM
)
field
=
((
Item_field
*
)
items
[
0
]
)
->
field
;
field
=
((
Item_field
*
)
(
items
[
0
]
->
real_item
())
)
->
field
;
/* But if it can't be compared as a longlong, we don't really care. */
/* But if it can't be compared as a longlong, we don't really care. */
if
(
field
&&
!
field
->
can_be_compared_as_longlong
())
if
(
field
&&
!
field
->
can_be_compared_as_longlong
())
field
=
NULL
;
field
=
NULL
;
...
...
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