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
e975cd0b
Commit
e975cd0b
authored
Apr 02, 2016
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
parent
3fc6a8b8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
1 deletion
+39
-1
mysql-test/r/ctype_sjis.result
mysql-test/r/ctype_sjis.result
+18
-0
mysql-test/std_data/loaddata/mdev9842.txt
mysql-test/std_data/loaddata/mdev9842.txt
+1
-0
mysql-test/t/ctype_sjis.test
mysql-test/t/ctype_sjis.test
+18
-0
sql/sql_load.cc
sql/sql_load.cc
+2
-1
No files found.
mysql-test/r/ctype_sjis.result
View file @
e975cd0b
...
...
@@ -18730,3 +18730,21 @@ DROP TABLE t1;
#
# End of 10.0 tests
#
#
# Start of 10.2 tests
#
#
# MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
#
CREATE TABLE t1 (a TEXT CHARACTER SET sjis);
LOAD DATA INFILE '../../std_data/loaddata/mdev9842.txt' INTO TABLE t1 CHARACTER SET sjis;
SELECT HEX(a) FROM t1;
HEX(a)
78835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C
SELECT a=CONCAT('x', REPEAT(_sjis 0x835C, 200)) FROM t1;
a=CONCAT('x', REPEAT(_sjis 0x835C, 200))
1
DROP TABLE t1;
#
# End of 10.2 tests
#
mysql-test/std_data/loaddata/mdev9842.txt
0 → 100644
View file @
e975cd0b
x\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
mysql-test/t/ctype_sjis.test
View file @
e975cd0b
...
...
@@ -231,3 +231,21 @@ SET NAMES sjis;
--echo #
--echo # End of 10.0 tests
--echo #
--echo #
--echo # Start of 10.2 tests
--echo #
--echo #
--echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
--echo #
CREATE TABLE t1 (a TEXT CHARACTER SET sjis);
LOAD DATA INFILE '
../../
std_data
/
loaddata
/
mdev9842
.
txt
' INTO TABLE t1 CHARACTER SET sjis;
SELECT HEX(a) FROM t1;
SELECT a=CONCAT('
x
'
,
REPEAT
(
_sjis
0x835C
,
200
))
FROM
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 10.2 tests
--
echo
#
sql/sql_load.cc
View file @
e975cd0b
...
...
@@ -1492,7 +1492,8 @@ int READ_INFO::read_field()
for
(;;)
{
while
(
to
<
end_of_buff
)
// Make sure we have enough space for the longest multi-byte character.
while
(
to
+
read_charset
->
mbmaxlen
<=
end_of_buff
)
{
chr
=
GET
;
if
(
chr
==
my_b_EOF
)
...
...
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