diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 9 | ||||
-rw-r--r-- | sql/mysqld.cc | 16 | ||||
-rw-r--r-- | sql/sql_load.cc | 8 |
3 files changed, 30 insertions, 3 deletions
diff --git a/sql/field.cc b/sql/field.cc index 592252bb294..43481ca0963 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -1836,9 +1836,16 @@ double Field_longlong::val_real(void) else #endif longlongget(j,ptr); - return unsigned_flag ? ulonglong2double((ulonglong) j) : (double) j; + /* The following is open coded to avoid a bug in gcc 3.3 */ + if (unsigned_flag) + { + ulonglong tmp= (ulonglong) j; + return ulonglong2double(tmp); + } + return (double) j; } + longlong Field_longlong::val_int(void) { longlong j; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b90ab1a4a3a..ae5b46671a5 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2158,7 +2158,10 @@ int main(int argc, char **argv) max_connections,table_cache_size)); sql_print_error("Warning: Changed limits: max_connections: %ld table_cache: %ld",max_connections,table_cache_size); } + open_files_limit= files; } +#else + open_files_limit= 0; /* Can't set or detect limit */ #endif unireg_init(opt_specialflag); /* Set up extern variabels */ init_errmessage(); /* Read error messages from file */ @@ -4903,6 +4906,19 @@ static void fix_paths(void) } +/* + set how many open files we want to be able to handle + + SYNOPSIS + set_maximum_open_files() + max_file_limit Files to open + + NOTES + The request may not fulfilled becasue of system limitations + + RETURN + Files available to open +*/ #ifdef SET_RLIMIT_NOFILE static uint set_maximum_open_files(uint max_file_limit) diff --git a/sql/sql_load.cc b/sql/sql_load.cc index ee573672c35..4911b1a6b75 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -767,9 +767,13 @@ int READ_INFO::read_field() row_end= to; return 0; } - /* Copy the found '"' character */ + /* + The string didn't terminate yet. + Store back next character for the loop + */ PUSH(chr); - chr='"'; + /* copy the found term character to 'to' */ + chr= found_enclosed_char; } else if (chr == field_term_char && found_enclosed_char == INT_MAX) { |