Bug #29353 inserting a negative value to a csv table leads to the table corruption
| Submitted: | 26 Jun 2007 7:11 | Modified: | 10 Jul 2007 22:41 |
|---|---|---|---|
| Reporter: | Ramil Kalimullin | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: CSV | Severity: | S1 (Critical) |
| Version: | 5.1 source | OS: | Any |
| Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[26 Jun 2007 7:11]
Ramil Kalimullin
[26 Jun 2007 12:05]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/29588 ChangeSet@1.2510, 2007-06-26 16:26:32+05:00, ramil@mysql.com +3 -0 Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption Problem: we believe a number cannot start with '-' ['+'] sign reading rows. Fix: properly handle starting '-' and '+' signs that may occur before numbers.
[26 Jun 2007 13:38]
Alexander Barkov
The patch looks ok.
I also suggest to simplify the code starting from
else if (my_isdigit(system_charset_info,
file_buff->get_value(curr_offset)))
{
to scan everything until comma or until end-of-line,
without checking digits or dots.
It will allow to open csv files with numbers written
in full scientific notation, e.g.:
.10
1e+5
and so on.
Field->store() will accept all correct formats,
or will return error for unknown formats.
[27 Jun 2007 11:20]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/29692 ChangeSet@1.2522, 2007-06-27 16:20:00+05:00, ramil@mysql.com +3 -0 Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption Problem: we believe a number cannot start with '-' ['+'] sign reading rows. Fix: let field->store() check given values.
[27 Jun 2007 14:55]
Alexey Botchkov
ok to push
[28 Jun 2007 8:44]
Alexander Barkov
Ok to push.
[3 Jul 2007 12:40]
Ramil Kalimullin
http://lists.mysql.com/commits/30165 ChangeSet@1.2534, 2007-07-03 17:17:58+05:00, ramil@mysql.com +8 -0 Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption New Field::store() method implemented to explicitly set thd->count_cuted_fields before value storing, instead of (incorrectly) setting it in the CSV storage engine. Thread row counter now properly incremented during check and repair in the CSV engine.
[3 Jul 2007 23:25]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/30165 ChangeSet@1.2534, 2007-07-03 17:17:58+05:00, ramil@mysql.com +8 -0 Complementary fix for bug #29353: inserting a negative value to a csv table leads to the table corruption New Field::store() method implemented to explicitly set thd->count_cuted_fields before value storing, instead of (incorrectly) setting it in the CSV storage engine. Thread row counter now properly incremented during check and repair in the CSV engine.
[10 Jul 2007 13:27]
Bugs System
Pushed into 5.1.21-beta
[10 Jul 2007 22:41]
Paul DuBois
Noted in 5.1.21 changelog. Inserting a negative number into a CSV table could corrupt it.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.