mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
weave merge of mysql-5.5->mysql-5.5-security
This commit is contained in:
@ -1302,9 +1302,10 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
|
||||
String &field_term, String &line_start, String &line_term,
|
||||
String &enclosed_par, int escape, bool get_it_from_net,
|
||||
bool is_fifo)
|
||||
:file(file_par),escape_char(escape)
|
||||
:file(file_par), buff_length(tot_length), escape_char(escape),
|
||||
found_end_of_line(false), eof(false), need_end_io_cache(false),
|
||||
error(false), line_cuted(false), found_null(false), read_charset(cs)
|
||||
{
|
||||
read_charset= cs;
|
||||
field_term_ptr=(char*) field_term.ptr();
|
||||
field_term_length= field_term.length();
|
||||
line_term_ptr=(char*) line_term.ptr();
|
||||
@ -1332,12 +1333,10 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
|
||||
(uchar) enclosed_par[0] : INT_MAX;
|
||||
field_term_char= field_term_length ? (uchar) field_term_ptr[0] : INT_MAX;
|
||||
line_term_char= line_term_length ? (uchar) line_term_ptr[0] : INT_MAX;
|
||||
error=eof=found_end_of_line=found_null=line_cuted=0;
|
||||
buff_length=tot_length;
|
||||
|
||||
|
||||
/* Set of a stack for unget if long terminators */
|
||||
uint length=max(field_term_length,line_term_length)+1;
|
||||
uint length= max(cs->mbmaxlen, max(field_term_length, line_term_length)) + 1;
|
||||
set_if_bigger(length,line_start.length());
|
||||
stack=stack_pos=(int*) sql_alloc(sizeof(int)*length);
|
||||
|
||||
@ -1379,7 +1378,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
|
||||
|
||||
READ_INFO::~READ_INFO()
|
||||
{
|
||||
if (!error && need_end_io_cache)
|
||||
if (need_end_io_cache)
|
||||
::end_io_cache(&cache);
|
||||
|
||||
if (buffer != NULL)
|
||||
|
Reference in New Issue
Block a user