1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge mysql.com:/home/jimw/my/mysql-4.1-11203

into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/sql_load.cc:
  Auto merged
mysql-test/r/loaddata.result:
  Resolve conflict
mysql-test/t/loaddata.test:
  Resolve conflict
This commit is contained in:
unknown
2005-10-21 17:57:51 -07:00
4 changed files with 37 additions and 3 deletions

View File

@ -806,8 +806,23 @@ int READ_INFO::read_field()
*to++= (byte) escape_char;
goto found_eof;
}
*to++ = (byte) unescape((char) chr);
continue;
/*
When escape_char == enclosed_char, we treat it like we do for
handling quotes in SQL parsing -- you can double-up the
escape_char to include it literally, but it doesn't do escapes
like \n. This allows: LOAD DATA ... ENCLOSED BY '"' ESCAPED BY '"'
with data like: "fie""ld1", "field2"
*/
if (escape_char != enclosed_char || chr == escape_char)
{
*to++ = (byte) unescape((char) chr);
continue;
}
else
{
PUSH(chr);
chr= escape_char;
}
}
#ifdef ALLOW_LINESEPARATOR_IN_STRINGS
if (chr == line_term_char)