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
7882cd32
Commit
7882cd32
authored
Apr 26, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix (bug #9756: mysql client failing on dumps containing certain \ sequences).
parent
b890c05b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
mysys/charset.c
mysys/charset.c
+7
-7
No files found.
mysys/charset.c
View file @
7882cd32
...
...
@@ -581,15 +581,15 @@ ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
{
char
escape
=
0
;
#ifdef USE_MB
int
l
;
if
(
use_mb_flag
&&
(
l
=
my_ismbchar
(
charset_info
,
from
,
end
)))
int
tmp_length
;
if
(
use_mb_flag
&&
(
tmp_length
=
my_ismbchar
(
charset_info
,
from
,
end
)))
{
if
(
to
+
l
>=
to_end
)
if
(
to
+
tmp_length
>
to_end
)
{
overflow
=
1
;
break
;
}
while
(
l
--
)
while
(
tmp_length
--
)
*
to
++=
*
from
++
;
from
--
;
continue
;
...
...
@@ -605,7 +605,7 @@ ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
multi-byte character into a valid one. For example, 0xbf27 is not
a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \)
*/
if
(
use_mb_flag
&&
(
l
=
my_mbcharlen
(
charset_info
,
*
from
))
>
1
)
if
(
use_mb_flag
&&
(
tmp_length
=
my_mbcharlen
(
charset_info
,
*
from
))
>
1
)
escape
=
*
from
;
else
#endif
...
...
@@ -634,7 +634,7 @@ ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
}
if
(
escape
)
{
if
(
to
+
2
>
=
to_end
)
if
(
to
+
2
>
to_end
)
{
overflow
=
1
;
break
;
...
...
@@ -644,7 +644,7 @@ ulong escape_string_for_mysql(CHARSET_INFO *charset_info,
}
else
{
if
(
to
+
1
>
=
to_end
)
if
(
to
+
1
>
to_end
)
{
overflow
=
1
;
break
;
...
...
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