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
83c5552b
Commit
83c5552b
authored
Sep 13, 2010
by
Gleb Shchepa
Browse files
Options
Browse Files
Download
Plain Diff
manual merge 5.1-bugteam --> 5.5-merge (bug 55779)
parents
68c14bca
79c1faa0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
2 deletions
+42
-2
mysql-test/r/type_timestamp.result
mysql-test/r/type_timestamp.result
+21
-0
mysql-test/t/type_timestamp.test
mysql-test/t/type_timestamp.test
+17
-0
sql/item.cc
sql/item.cc
+4
-2
No files found.
mysql-test/r/type_timestamp.result
View file @
83c5552b
...
...
@@ -503,6 +503,27 @@ f1 f2-f3
5 0
DROP TABLE t1;
End of 5.0 tests
#
# Bug #55779: select does not work properly in mysql server
# Version "5.1.42 SUSE MySQL RPM"
#
CREATE TABLE t1 (a TIMESTAMP, KEY (a));
INSERT INTO t1 VALUES ('2000-01-01 00:00:00'), ('2000-01-01 00:00:00'),
('2000-01-01 00:00:01'), ('2000-01-01 00:00:01');
SELECT a FROM t1 WHERE a >= 20000101000000;
a
2000-01-01 00:00:00
2000-01-01 00:00:00
2000-01-01 00:00:01
2000-01-01 00:00:01
SELECT a FROM t1 WHERE a >= '20000101000000';
a
2000-01-01 00:00:00
2000-01-01 00:00:00
2000-01-01 00:00:01
2000-01-01 00:00:01
DROP TABLE t1;
End of 5.1 tests
Bug#50888 valgrind warnings in Field_timestamp::val_str
...
...
mysql-test/t/type_timestamp.test
View file @
83c5552b
...
...
@@ -347,6 +347,23 @@ DROP TABLE t1;
--
echo
End
of
5.0
tests
--
echo
#
--
echo
# Bug #55779: select does not work properly in mysql server
--
echo
# Version "5.1.42 SUSE MySQL RPM"
--
echo
#
CREATE
TABLE
t1
(
a
TIMESTAMP
,
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
'2000-01-01 00:00:00'
),
(
'2000-01-01 00:00:00'
),
(
'2000-01-01 00:00:01'
),
(
'2000-01-01 00:00:01'
);
SELECT
a
FROM
t1
WHERE
a
>=
20000101000000
;
SELECT
a
FROM
t1
WHERE
a
>=
'20000101000000'
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
--
echo
--
echo
Bug
#50888 valgrind warnings in Field_timestamp::val_str
--
echo
...
...
sql/item.cc
View file @
83c5552b
...
...
@@ -7287,14 +7287,16 @@ int stored_field_cmp_to_item(THD *thd, Field *field, Item *item)
enum_field_types
field_type
=
field
->
type
();
if
(
field_type
==
MYSQL_TYPE_DATE
||
field_type
==
MYSQL_TYPE_DATETIME
)
if
(
field_type
==
MYSQL_TYPE_DATE
||
field_type
==
MYSQL_TYPE_DATETIME
||
field_type
==
MYSQL_TYPE_TIMESTAMP
)
{
enum_mysql_timestamp_type
type
=
MYSQL_TIMESTAMP_ERROR
;
if
(
field_type
==
MYSQL_TYPE_DATE
)
type
=
MYSQL_TIMESTAMP_DATE
;
if
(
field_type
==
MYSQL_TYPE_DATETIME
)
if
(
field_type
==
MYSQL_TYPE_DATETIME
||
field_type
==
MYSQL_TYPE_TIMESTAMP
)
type
=
MYSQL_TIMESTAMP_DATETIME
;
const
char
*
field_name
=
field
->
field_name
;
...
...
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