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
a7e2cd55
Commit
a7e2cd55
authored
Aug 19, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-19034 ASAN unknown-crash in get_date_time_separator with PAD_CHAR_TO_FULL_LENGTH
parent
457dc9d6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
mysql-test/r/type_datetime.result
mysql-test/r/type_datetime.result
+11
-0
mysql-test/t/type_datetime.test
mysql-test/t/type_datetime.test
+14
-0
sql-common/my_time.c
sql-common/my_time.c
+1
-1
No files found.
mysql-test/r/type_datetime.result
View file @
a7e2cd55
...
...
@@ -1156,5 +1156,16 @@ ExtractValue('foo','bar') i MIN(d)
3 1976-12-14 13:21:07
DROP TABLE t1;
#
# MDEV-19034 ASAN unknown-crash in get_date_time_separator with PAD_CHAR_TO_FULL_LENGTH
#
SET SQL_MODE=DEFAULT;
CREATE OR REPLACE TABLE t1 (a CHAR(11));
CREATE OR REPLACE TABLE t2 (b DATETIME);
INSERT INTO t1 VALUES ('2010-02-19') ;
SET SQL_MODE= 'PAD_CHAR_TO_FULL_LENGTH';
INSERT INTO t2 SELECT * FROM t1;
DROP TABLE t1, t2;
SET SQL_MODE=DEFAULT;
#
# End of 10.1 tests
#
mysql-test/t/type_datetime.test
View file @
a7e2cd55
...
...
@@ -710,6 +710,20 @@ INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04
SELECT
ExtractValue
(
'foo'
,
'bar'
),
i
,
MIN
(
d
)
FROM
t1
GROUP
BY
i
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-19034 ASAN unknown-crash in get_date_time_separator with PAD_CHAR_TO_FULL_LENGTH
--
echo
#
SET
SQL_MODE
=
DEFAULT
;
CREATE
OR
REPLACE
TABLE
t1
(
a
CHAR
(
11
));
CREATE
OR
REPLACE
TABLE
t2
(
b
DATETIME
);
INSERT
INTO
t1
VALUES
(
'2010-02-19'
)
;
SET
SQL_MODE
=
'PAD_CHAR_TO_FULL_LENGTH'
;
INSERT
INTO
t2
SELECT
*
FROM
t1
;
DROP
TABLE
t1
,
t2
;
SET
SQL_MODE
=
DEFAULT
;
--
echo
#
--
echo
# End of 10.1 tests
--
echo
#
sql-common/my_time.c
View file @
a7e2cd55
...
...
@@ -184,7 +184,7 @@ static int get_date_time_separator(uint *number_of_fields, ulonglong flags,
do
{
s
++
;
}
while
(
my_isspace
(
&
my_charset_latin1
,
*
s
));
}
while
(
s
<
end
&&
my_isspace
(
&
my_charset_latin1
,
*
s
));
*
str
=
s
;
return
0
;
}
...
...
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