Bug #44973 Can't insert backslash
Submitted: 20 May 10:30 Modified: 20 May 10:36
Reporter: Alexander Sosedkin
Status: Duplicate
Category:Connector/Net Severity:S1 (Critical)
Version:6.0.3 OS:Any
Assigned to: Target Version:

[20 May 10:30] Alexander Sosedkin
Description:
For example if you insert into a table using ExecuteNonQuery:

INSERT INTO `table_name` (`varchar_column_name`) VALUES ( '\\') -- escaped \

There is an exception:
System.ArgumentOutOfRangeException: Index and length must refer to a location within the
string. Parameter name: length

I found a bug in the code ReadQuotedToken, there does not need a variable "escaped"
(which also was not necessary and in the old code tokenizer)

Sorry for English, this electronic translator.

How to repeat:
Try to insert \ (backslash) in varchar column

Suggested fix:
Remove variable "escaped" in the method "MySqlTokenizer.ReadQuotedToken"
[20 May 10:36] Tonci Grgin
Please do not submit the same bug more than once. An existing bug report already describes
this very problem. Even if you feel that your issue is somewhat different, the resolution
is likely
to be the same. Because of this, we hope you add your comments to the original bug
instead.

Thank you for your interest in MySQL.

Explanation: Hi Alexander and thanks for your report. It has already been reported in
Bug#44960 so please see my requests there.