diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-04-21 12:07:30 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-04-21 12:07:30 +0400 |
commit | 765ae6e82165d1bc4cf6cc9f0d556d66a5e172d1 (patch) | |
tree | 79056428f6d0c7d262f042ff3fd9b1f28f464ef6 /mysql-test/main/ctype_utf8.result | |
parent | f4019f5b3544a18f3ddf32df2c5214c3f8dabdce (diff) | |
download | mariadb-git-765ae6e82165d1bc4cf6cc9f0d556d66a5e172d1.tar.gz |
MDEV-19239 ERROR 1300 (HY000): Invalid utf8 character string in 10.3.13-MariaDB
A sequence of <digits>e<mbhead><mbtail>, e.g.:
SELECT 123eXYzzz FROM t1;
was not scanned correctly (where XY is a multi-byte character).
The multi-byte head byte X was appended to 123e separately from
the multi-byte tail byte Y, so a pointer to "Yzzz" was passed
into scan_ident_start(), which failed on a bad multi-byte sequence.
After this change, scan_ident_start() gets a pointer to "XYzzz",
so it correctly sees the whole multi-byte character.
Diffstat (limited to 'mysql-test/main/ctype_utf8.result')
-rw-r--r-- | mysql-test/main/ctype_utf8.result | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/mysql-test/main/ctype_utf8.result b/mysql-test/main/ctype_utf8.result index 9c2fcb84765..6a72f60a437 100644 --- a/mysql-test/main/ctype_utf8.result +++ b/mysql-test/main/ctype_utf8.result @@ -11300,5 +11300,73 @@ t1 CREATE TABLE `t1` ( DROP TABLE t1; SET sql_mode=DEFAULT; # +# MDEV-19239 ERROR 1300 (HY000): Invalid utf8 character string in 10.3.13-MariaDB +# +SET NAMES utf8; +SELECT +x.消息ID, +x.消息TITLE, +x.消息类型, +x.发送时间, +x.阅读时间,x.老师ID, +IF(x.四天内最近一次登录时间='2100-01-01 00:00:00','',x.四天内最近一次登录时间) 四天内最近一次登录时间 +FROM ( +SELECT +msg.*, +CASE +WHEN login.login_time BETWEEN msg.发送时间 AND DATE_ADD(msg.发送时间,INTERVAL 4 DAY) +THEN login.login_time +WHEN (login.login_time NOT BETWEEN msg.发送时间 AND DATE_ADD(msg.发送时间,INTERVAL 4 DAY)) AND login.login_time>0 +THEN '2100-01-01 00:00:00' ELSE '' + END 四天内最近一次登录时间 +FROM ( +SELECT +me.id 消息ID, +me.title 消息TITLE, +CASE +WHEN me.type=1 +THEN 'Interview Message' + WHEN me.type=2 +THEN 'Orientation Message' + WHEN me.type=3 +THEN 'Warning Message' + WHEN me.type=4 +THEN 'Fail Message' + WHEN me.type=5 +THEN 'FM Message' + WHEN me.type=6 +THEN 'Training Message' + WHEN me.type=7 +THEN 'TUrgent Message' + END 消息类型, +FROM_UNIXTIME(me.sending_time) 发送时间, +IF(tar.is_read=1,FROM_UNIXTIME(tar.read_time),'') 阅读时间, +tar.tid 老师ID +FROM ebk_message me +LEFT JOIN ebk_message_target tar +ON me.id=tar.msg_id +WHERE +FROM_UNIXTIME(me.sending_time,'%Y-%m-%d') BETWEEN 'start' AND 'end' AND me.status=1 AND tar.tid>0 +GROUP BY +tar.tid, +me.sending_time,me.id) msg +LEFT JOIN ( +SELECT tid,FROM_UNIXTIME(login_time) login_time +FROM ebk_teacher_login_log +WHERE FROM_UNIXTIME(login_time,'%Y-%m-%d') BETWEEN 'start' AND DATE_ADD('end',INTERVAL 4 DAY) +ORDER BY tid,FROM_UNIXTIME(login_time)) login +ON +msg.老师ID=login.tid +ORDER BY msg.消息ID,msg.发送时间,msg.老师ID,login_time) x +GROUP BY x.消息ID,x.发送时间,x.老师ID; +ERROR 42S02: Table 'test.ebk_message' doesn't exist +SET NAMES utf8; +CREATE TABLE t1 (x INT); +INSERT INTO t1 VALUES (1); +SELECT x AS 5天内最近一次登录时间 FROM t1; +5天内最近一次登录时间 +1 +DROP TABLE t1; +# # End of 10.3 tests # |