From 80a226aa622c4a31a03476d5894e3671f2011bb4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 May 2005 11:02:39 -0700 Subject: Fix timeouts with SSL on Windows, and also sync the fastsend implementation with normal socket behavior. (Bug #8572) vio/viossl.c: Sync implementations of *_fastsend() and *_timeout() with viosocket.c --- vio/viossl.c | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/vio/viossl.c b/vio/viossl.c index 773d444063b..043d23f0238 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -128,26 +128,32 @@ int vio_ssl_write(Vio * vio, const gptr buf, int size) int vio_ssl_fastsend(Vio * vio __attribute__((unused))) { - int r= 0; + int r=0; DBUG_ENTER("vio_ssl_fastsend"); -#ifdef IPTOS_THROUGHPUT +#if defined(IPTOS_THROUGHPUT) && !defined(__EMX__) { -#ifndef __EMX__ - int tos = IPTOS_THROUGHPUT; - if (!setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos))) -#endif /* !__EMX__ */ - { - int nodelay = 1; - if (setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (void *) &nodelay, - sizeof(nodelay))) { - DBUG_PRINT("warning", - ("Couldn't set socket option for fast send")); - r= -1; - } - } + int tos= IPTOS_THROUGHPUT; + r= setsockopt(vio->sd, IPPROTO_IP, IP_TOS, (void *) &tos, sizeof(tos)); + } +#endif /* IPTOS_THROUGHPUT && !__EMX__ */ + if (!r) + { +#ifdef __WIN__ + BOOL nodelay= 1; + r= setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (const char*) &nodelay, + sizeof(nodelay)); +#else + int nodelay= 1; + r= setsockopt(vio->sd, IPPROTO_TCP, TCP_NODELAY, (void*) &nodelay, + sizeof(nodelay)); +#endif /* __WIN__ */ + } + if (r) + { + DBUG_PRINT("warning", ("Couldn't set socket option for fast send")); + r= -1; } -#endif /* IPTOS_THROUGHPUT */ DBUG_PRINT("exit", ("%d", r)); DBUG_RETURN(r); } @@ -424,6 +430,11 @@ void vio_ssl_timeout(Vio *vio __attribute__((unused)), uint which __attribute__((unused)), uint timeout __attribute__((unused))) { - /* Not yet implemented (non critical) */ +#ifdef __WIN__ + ulong wait_timeout= (ulong) timeout * 1000; + (void) setsockopt(vio->sd, SOL_SOCKET, + which ? SO_SNDTIMEO : SO_RCVTIMEO, (char*) &wait_timeout, + sizeof(wait_timeout)); +#endif /* __WIN__ */ } #endif /* HAVE_OPENSSL */ -- cgit v1.2.1 From 75e8f8372e4ab63994abaa41d93ed85c4cfeb9d4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 May 2005 11:11:40 -0700 Subject: Fix error reporting for 'OPTIMIZE TABLE' on InnoDB tables. (Bug #8135) sql/sql_table.cc: Pass through errors from InnoDB in OPTIMIZE TABLE. --- sql/sql_table.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 67aade519f5..70b20c21cfb 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2052,6 +2052,28 @@ send_result_message: ((result_code= table->table->file->analyze(thd, check_opt)) > 0)) result_code= 0; // analyze went ok } + if (result_code) // either mysql_recreate_table or analyze failed + { + const char *err_msg; + if ((err_msg= thd->net.last_error)) + { + if (!thd->vio_ok()) + { + sql_print_error(err_msg); + } + else + { + /* Hijack the row already in-progress. */ + protocol->store("error", 5, system_charset_info); + protocol->store(err_msg, system_charset_info); + (void)protocol->write(); + /* Start off another row for HA_ADMIN_FAILED */ + protocol->prepare_for_resend(); + protocol->store(table_name, system_charset_info); + protocol->store(operator_name, system_charset_info); + } + } + } result_code= result_code ? HA_ADMIN_FAILED : HA_ADMIN_OK; table->next= save_next; goto send_result_message; -- cgit v1.2.1 From 8ac75806e2a18451198948d7086db8cafe8b0071 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 May 2005 20:26:40 -0700 Subject: Fix table renaming to not lowercase table names for all storage engines when lower_case_table_names == 2, as it did previously for InnoDB and MEMORY. (Bug #9660) mysql-test/r/lowercase_table2.result: Fix results sql/sql_table.cc: Add build_table_path() function to construct the path to a table, and use it to replace nearly all of the places where this was done with similar code. Fix mysql_rename_table() to not lowercase the .frm file name when lower_case_table_names == 2 and the storage engine does not set the HA_FILE_BASED flag (such as InnoDB). --- mysql-test/r/lowercase_table2.result | 12 ++-- sql/sql_table.cc | 126 ++++++++++++++++++++--------------- 2 files changed, 79 insertions(+), 59 deletions(-) diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index 8361b66817a..1015990df9a 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -72,7 +72,7 @@ T1 CREATE TABLE `T1` ( RENAME TABLE T1 TO T2; SHOW TABLES LIKE "T2"; Tables_in_test (T2) -t2 +T2 SELECT * FROM t2; a 1 @@ -83,25 +83,25 @@ t3 RENAME TABLE T3 TO T1; SHOW TABLES LIKE "T1"; Tables_in_test (T1) -t1 +T1 ALTER TABLE T1 add b int; SHOW TABLES LIKE "T1"; Tables_in_test (T1) -t1 +T1 ALTER TABLE T1 RENAME T2; SHOW TABLES LIKE "T2"; Tables_in_test (T2) -t2 +T2 LOCK TABLE T2 WRITE; ALTER TABLE T2 drop b; SHOW TABLES LIKE "T2"; Tables_in_test (T2) -t2 +T2 UNLOCK TABLES; RENAME TABLE T2 TO T1; SHOW TABLES LIKE "T1"; Tables_in_test (T1) -t1 +T1 SELECT * from T1; a 1 diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 67aade519f5..951f89c4917 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -40,6 +40,34 @@ static int copy_data_between_tables(TABLE *from,TABLE *to, uint order_num, ORDER *order, ha_rows *copied,ha_rows *deleted); + +/* + Build the path to a file for a table (or the base path that can + then have various extensions stuck on to it). + + SYNOPSIS + build_table_path() + buff Buffer to build the path into + bufflen sizeof(buff) + db Name of database + table Name of table + ext Filename extension + + RETURN + FALSE Always -- see usage in mysql_create_indexes() + */ + +static bool build_table_path(char *buff, size_t bufflen, const char *db, + const char *table, const char *ext) +{ + strxnmov(buff, bufflen-1, mysql_data_home, "/", db, "/", table, ext, + NullS); + unpack_filename(buff,buff); + return FALSE; +} + + + /* delete (drop) tables. @@ -214,8 +242,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, DBUG_RETURN(-1); alias= (lower_case_table_names == 2) ? table->alias : table->real_name; /* remove form file and isam files */ - strxmov(path, mysql_data_home, "/", db, "/", alias, reg_ext, NullS); - (void) unpack_filename(path,path); + build_table_path(path, sizeof(path), db, alias, reg_ext); } if (drop_temporary || (access(path,F_OK) && ha_create_table_from_engine(thd,db,alias,TRUE))) @@ -295,13 +322,10 @@ int quick_rm_table(enum db_type base,const char *db, { char path[FN_REFLEN]; int error=0; - my_snprintf(path, sizeof(path), "%s/%s/%s%s", - mysql_data_home, db, table_name, reg_ext); - unpack_filename(path,path); + build_table_path(path, sizeof(path), db, table_name, reg_ext); if (my_delete(path,MYF(0))) error=1; /* purecov: inspected */ - my_snprintf(path, sizeof(path), "%s/%s/%s", mysql_data_home, db, table_name); - unpack_filename(path,path); + build_table_path(path, sizeof(path), db, table_name, ""); return ha_delete_table(base,path) || error; } @@ -1299,11 +1323,9 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, if (!create_info->default_table_charset) { HA_CREATE_INFO db_info; - uint length; char path[FN_REFLEN]; - strxmov(path, mysql_data_home, "/", db, NullS); - length= unpack_dirname(path,path); // Convert if not unix - strmov(path+length, MY_DB_OPT_FILE); + /* Abuse build_table_path() to build the path to the db.opt file */ + build_table_path(path, sizeof(path), db, MY_DB_OPT_FILE, ""); load_db_opt(thd, path, &db_info); create_info->default_table_charset= db_info.default_table_charset; } @@ -1317,17 +1339,18 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, /* Check if table exists */ if (create_info->options & HA_LEX_CREATE_TMP_TABLE) { - my_snprintf(path, sizeof(path), "%s%s%lx_%lx_%x%s", - mysql_tmpdir, tmp_file_prefix, current_pid, thd->thread_id, - thd->tmp_table++, reg_ext); + char tmp_table_name[NAME_LEN+1]; + my_snprintf(tmp_table_name, sizeof(tmp_table_name), "%s%lx_%lx_%x", + tmp_file_prefix, current_pid, thd->thread_id, + thd->tmp_table++); if (lower_case_table_names) - my_casedn_str(files_charset_info, path); + my_casedn_str(files_charset_info, tmp_table_name); create_info->table_options|=HA_CREATE_DELAY_KEY_WRITE; + build_table_path(path, sizeof(path), db, tmp_table_name, reg_ext); } else - my_snprintf(path, sizeof(path), "%s/%s/%s%s", mysql_data_home, db, - alias, reg_ext); - unpack_filename(path,path); + build_table_path(path, sizeof(path), db, alias, reg_ext); + /* Check if table already exists */ if ((create_info->options & HA_LEX_CREATE_TMP_TABLE) && find_temporary_table(thd,db,table_name)) @@ -1560,37 +1583,42 @@ mysql_rename_table(enum db_type base, const char *new_db, const char *new_name) { - char from[FN_REFLEN], to[FN_REFLEN]; - char tmp_from[NAME_LEN+1], tmp_to[NAME_LEN+1]; + char from[FN_REFLEN], to[FN_REFLEN], lc_from[FN_REFLEN], lc_to[FN_REFLEN]; + char *from_base= from, *to_base= to; + char tmp_name[NAME_LEN+1]; handler *file=get_new_handler((TABLE*) 0, base); int error=0; DBUG_ENTER("mysql_rename_table"); + build_table_path(from, sizeof(from), old_db, old_name, ""); + build_table_path(to, sizeof(to), new_db, new_name, ""); + + /* + If lower_case_table_names == 2 (case-preserving but case-insensitive + file system) and the storage is not HA_FILE_BASED, we need to provide + a lowercase file name, but we leave the .frm in mixed case. + */ if (lower_case_table_names == 2 && !(file->table_flags() & HA_FILE_BASED)) { - /* Table handler expects to get all file names as lower case */ - strmov(tmp_from, old_name); - my_casedn_str(files_charset_info, tmp_from); - old_name= tmp_from; + strmov(tmp_name, old_name); + my_casedn_str(files_charset_info, tmp_name); + build_table_path(lc_from, sizeof(lc_from), old_db, tmp_name, ""); + from_base= lc_from; - strmov(tmp_to, new_name); - my_casedn_str(files_charset_info, tmp_to); - new_name= tmp_to; + strmov(tmp_name, new_name); + my_casedn_str(files_charset_info, tmp_name); + build_table_path(lc_to, sizeof(lc_to), new_db, tmp_name, ""); + to_base= lc_to; } - my_snprintf(from, sizeof(from), "%s/%s/%s", - mysql_data_home, old_db, old_name); - my_snprintf(to, sizeof(to), "%s/%s/%s", - mysql_data_home, new_db, new_name); - fn_format(from,from,"","",4); - fn_format(to,to, "","",4); - if (!(error=file->rename_table((const char*) from,(const char *) to))) + if (!(error=file->rename_table((const char*) from_base, + (const char *) to_base))) { if (rename_file_ext(from,to,reg_ext)) { error=my_errno; /* Restore old file name */ - file->rename_table((const char*) to,(const char *) from); + file->rename_table((const char*) to_base, (const char *) from_base); } } delete file; @@ -1768,8 +1796,8 @@ static int prepare_for_repair(THD* thd, TABLE_LIST *table_list, if (!(table= table_list->table)) /* if open_ltable failed */ { char name[FN_REFLEN]; - strxmov(name, mysql_data_home, "/", table_list->db, "/", - table_list->real_name, NullS); + build_table_path(name, sizeof(name), table_list->db, + table_list->real_name, ""); if (openfrm(name, "", 0, 0, 0, &tmp_table)) DBUG_RETURN(0); // Can't open frm file table= &tmp_table; @@ -2570,11 +2598,9 @@ int mysql_create_indexes(THD *thd, TABLE_LIST *table_list, List &keys) else { if (table->file->add_index(table, key_info_buffer, key_count)|| - (my_snprintf(path, sizeof(path), "%s/%s/%s%s", mysql_data_home, - table_list->db, (lower_case_table_names == 2) ? - table_list->alias: table_list->real_name, reg_ext) >= - (int) sizeof(path)) || - ! unpack_filename(path, path) || + build_table_path(path, sizeof(path), table_list->db, + (lower_case_table_names == 2) ? + table_list->alias : table_list->real_name, reg_ext) || mysql_create_frm(thd, path, &create_info, fields, key_count, key_info_buffer, table->file)) /* don't need to free((gptr) key_info_buffer);*/ @@ -2672,11 +2698,9 @@ int mysql_drop_indexes(THD *thd, TABLE_LIST *table_list, keys, /*tmp_table*/ 0, db_options, table->file, key_info_buffer, key_count, /*select_field_count*/ 0)|| - (snprintf(path, sizeof(path), "%s/%s/%s%s", mysql_data_home, - table_list->db, (lower_case_table_names == 2)? - table_list->alias: table_list->real_name, reg_ext)>= - (int)sizeof(path))|| - ! unpack_filename(path, path)|| + build_table_path(path, sizeof(path), table_list->db, + (lower_case_table_names == 2) ? + table_list->alias : table_list->real_name, reg_ext) || mysql_create_frm(thd, path, &create_info, fields, key_count, key_info_buffer, table->file)) /*don't need to free((gptr) key_numbers);*/ @@ -3199,9 +3223,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, else { char path[FN_REFLEN]; - my_snprintf(path, sizeof(path), "%s/%s/%s", mysql_data_home, - new_db, tmp_name); - fn_format(path,path,"","",4); + build_table_path(path, sizeof(path), new_db, tmp_name, ""); new_table=open_temporary_table(thd, path, new_db, tmp_name,0); } if (!new_table) @@ -3406,9 +3428,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, shutdown. */ char path[FN_REFLEN]; - my_snprintf(path, sizeof(path), "%s/%s/%s", mysql_data_home, - new_db, table_name); - fn_format(path,path,"","",4); + build_table_path(path, sizeof(path), new_db, table_name); table=open_temporary_table(thd, path, new_db, tmp_name,0); if (table) { -- cgit v1.2.1 From e547fbea68891d61447beaf4263044114318ef6a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 May 2005 10:01:26 -0700 Subject: Cleanups to patch for bug #9660 after review by Monty. sql/sql_table.cc: Make return value of build_table_path() useful Eliminate some unnecessary casts --- sql/sql_table.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 951f89c4917..411fb420895 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -54,16 +54,16 @@ static int copy_data_between_tables(TABLE *from,TABLE *to, ext Filename extension RETURN - FALSE Always -- see usage in mysql_create_indexes() + 0 Error + # Size of path */ -static bool build_table_path(char *buff, size_t bufflen, const char *db, +static uint build_table_path(char *buff, size_t bufflen, const char *db, const char *table, const char *ext) { strxnmov(buff, bufflen-1, mysql_data_home, "/", db, "/", table, ext, NullS); - unpack_filename(buff,buff); - return FALSE; + return unpack_filename(buff,buff); } @@ -1611,14 +1611,13 @@ mysql_rename_table(enum db_type base, to_base= lc_to; } - if (!(error=file->rename_table((const char*) from_base, - (const char *) to_base))) + if (!(error=file->rename_table(from_base, to_base))) { if (rename_file_ext(from,to,reg_ext)) { error=my_errno; /* Restore old file name */ - file->rename_table((const char*) to_base, (const char *) from_base); + file->rename_table(to_base, from_base); } } delete file; @@ -2600,7 +2599,8 @@ int mysql_create_indexes(THD *thd, TABLE_LIST *table_list, List &keys) if (table->file->add_index(table, key_info_buffer, key_count)|| build_table_path(path, sizeof(path), table_list->db, (lower_case_table_names == 2) ? - table_list->alias : table_list->real_name, reg_ext) || + table_list->alias : table_list->real_name, + reg_ext) != 0 || mysql_create_frm(thd, path, &create_info, fields, key_count, key_info_buffer, table->file)) /* don't need to free((gptr) key_info_buffer);*/ @@ -2700,7 +2700,8 @@ int mysql_drop_indexes(THD *thd, TABLE_LIST *table_list, /*select_field_count*/ 0)|| build_table_path(path, sizeof(path), table_list->db, (lower_case_table_names == 2) ? - table_list->alias : table_list->real_name, reg_ext) || + table_list->alias : table_list->real_name, + reg_ext) != 0 || mysql_create_frm(thd, path, &create_info, fields, key_count, key_info_buffer, table->file)) /*don't need to free((gptr) key_numbers);*/ -- cgit v1.2.1 From f20c56a9e7cc12a65068392ee733fff2ff4b805a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Jun 2005 09:48:25 -0700 Subject: Fix handling of NULL fields in FIELD(). (Bug #10944) mysql-test/r/func_str.result: Update results mysql-test/t/func_str.test: Add regression tests sql/item_func.cc: Handle NULL as first argument to FIELD() --- mysql-test/r/func_str.result | 6 ++++++ mysql-test/t/func_str.test | 6 ++++++ sql/item_func.cc | 12 ++++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 5405dbf53d9..ea1efbc7c0a 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -783,3 +783,9 @@ id aes_decrypt(str, 'bar') 1 foo 2 NULL DROP TABLE t1, t2; +select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0); +field(0,NULL,1,0) field("",NULL,"bar","") field(0.0,NULL,1.0,0.0) +3 3 3 +select field(NULL,1,2,NULL), field(NULL,1,2,0); +field(NULL,1,2,NULL) field(NULL,1,2,0) +0 0 diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 22028437111..a5536f7a0be 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -521,3 +521,9 @@ SELECT t1.id, aes_decrypt(str, 'bar') FROM t1, t2 WHERE t1.id = t2.id DROP TABLE t1, t2; + +# +# Bug #10944: Mishandling of NULL arguments in FIELD() +# +select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0); +select field(NULL,1,2,NULL), field(NULL,1,2,0); diff --git a/sql/item_func.cc b/sql/item_func.cc index 3c50e750b41..1300dc6faac 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1488,6 +1488,10 @@ void Item_func_locate::print(String *str) longlong Item_func_field::val_int() { DBUG_ASSERT(fixed == 1); + + if (args[0]->null_value) + return 0; + if (cmp_type == STRING_RESULT) { String *field; @@ -1505,8 +1509,8 @@ longlong Item_func_field::val_int() longlong val= args[0]->val_int(); for (uint i=1; i < arg_count ; i++) { - if (val == args[i]->val_int()) - return (longlong) (i); + if (!args[i]->null_value && val == args[i]->val_int()) + return (longlong) (i); } } else @@ -1514,8 +1518,8 @@ longlong Item_func_field::val_int() double val= args[0]->val(); for (uint i=1; i < arg_count ; i++) { - if (val == args[i]->val()) - return (longlong) (i); + if (!args[i]->null_value && val == args[i]->val()) + return (longlong) (i); } } return 0; -- cgit v1.2.1 From b4953598aa436f926a06cdcb505eb7a4c38bf846 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Jun 2005 14:35:02 -0700 Subject: Update results of test after merge of bugfix mysql-test/r/rpl_failed_optimize.result: Update results --- mysql-test/r/rpl_failed_optimize.result | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result index 1576ec60500..120bb53ed25 100644 --- a/mysql-test/r/rpl_failed_optimize.result +++ b/mysql-test/r/rpl_failed_optimize.result @@ -9,6 +9,7 @@ BEGIN; INSERT INTO t1 VALUES (1); OPTIMIZE TABLE t1; Table Op Msg_type Msg_text +test.t1 optimize error Lock wait timeout exceeded; try restarting transaction test.t1 optimize status Operation failed OPTIMIZE TABLE non_existing; Table Op Msg_type Msg_text -- cgit v1.2.1 From 4e19af2716b645cec8ca04ea15ddf698ec36927c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Jun 2005 16:03:41 -0700 Subject: Fix compile error when HAVE_BERKELEY_DB sql/sql_table.cc: Add missing argument --- sql/sql_table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index f277bc50462..7e80a71beb0 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3451,7 +3451,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, shutdown. */ char path[FN_REFLEN]; - build_table_path(path, sizeof(path), new_db, table_name); + build_table_path(path, sizeof(path), new_db, table_name, ""); table=open_temporary_table(thd, path, new_db, tmp_name,0); if (table) { -- cgit v1.2.1 From 638bb0a2917b966f136f0046234fc40b9407df29 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Jun 2005 16:16:25 -0700 Subject: Fix --with-bdb to be --with-berkeley-db in BUILD/SETUP.sh BUILD/SETUP.sh: Fix --with-bdb to --with-berkeley-db --- BUILD/SETUP.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 8bb281f20e9..3f8a9ccaf22 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -48,8 +48,8 @@ global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wch c_warnings="$global_warnings -Wunused" cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" -base_max_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio" -max_leave_isam_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server" +base_max_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio" +max_leave_isam_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server" max_no_es_configs="$max_leave_isam_configs --without-isam" max_configs="$max_no_es_configs --with-embedded-server" -- cgit v1.2.1 From cee10f979e3bf4a26dca94bd94002b316e400733 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Jun 2005 02:43:32 +0200 Subject: tztime.cc: Set #pragma implementation" earlier Many files: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION client/sql_string.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION mysys/raid.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/field.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_berkeley.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_blackhole.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_heap.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_innodb.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_isam.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_isammrg.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_myisam.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_myisammrg.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/ha_ndbcluster.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/handler.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/hash_filo.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_cmpfunc.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_func.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_geofunc.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_strfunc.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_subselect.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_sum.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_timefunc.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/item_uniq.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/log_event.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/opt_range.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/procedure.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/protocol.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/protocol_cursor.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/set_var.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_analyse.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_class.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_crypt.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_list.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_map.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_olap.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/examples/ha_archive.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_select.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_string.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/sql_udf.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/examples/ha_example.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/examples/ha_tina.cc: Need to include before #ifdef USE_PRAGMA_IMPLEMENTATION sql/tztime.cc: Set #pragma implementation" earlier --- client/sql_string.cc | 3 ++- mysys/raid.cc | 2 ++ sql/examples/ha_archive.cc | 4 +++- sql/examples/ha_example.cc | 4 +++- sql/examples/ha_tina.cc | 4 +++- sql/field.cc | 2 ++ sql/ha_berkeley.cc | 2 ++ sql/ha_blackhole.cc | 2 ++ sql/ha_heap.cc | 2 ++ sql/ha_innodb.cc | 2 ++ sql/ha_isam.cc | 2 ++ sql/ha_isammrg.cc | 2 ++ sql/ha_myisam.cc | 2 ++ sql/ha_myisammrg.cc | 2 ++ sql/ha_ndbcluster.cc | 2 ++ sql/handler.cc | 2 ++ sql/hash_filo.cc | 2 ++ sql/item.cc | 2 ++ sql/item_cmpfunc.cc | 2 ++ sql/item_func.cc | 2 ++ sql/item_geofunc.cc | 2 ++ sql/item_strfunc.cc | 2 ++ sql/item_subselect.cc | 2 ++ sql/item_sum.cc | 2 ++ sql/item_timefunc.cc | 2 ++ sql/item_uniq.cc | 3 +++ sql/log_event.cc | 3 +++ sql/opt_range.cc | 2 ++ sql/procedure.cc | 2 ++ sql/protocol.cc | 2 ++ sql/protocol_cursor.cc | 2 ++ sql/set_var.cc | 2 ++ sql/sql_analyse.cc | 2 ++ sql/sql_class.cc | 2 ++ sql/sql_crypt.cc | 2 ++ sql/sql_list.cc | 2 ++ sql/sql_map.cc | 2 ++ sql/sql_olap.cc | 2 ++ sql/sql_select.cc | 2 ++ sql/sql_string.cc | 3 ++- sql/sql_udf.cc | 2 ++ sql/tztime.cc | 12 +++++++----- 42 files changed, 94 insertions(+), 10 deletions(-) diff --git a/client/sql_string.cc b/client/sql_string.cc index 690997152f1..8f0e46c5eea 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -16,11 +16,12 @@ /* This file is originally from the mysql distribution. Coded by monty */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif -#include #include #include #include diff --git a/mysys/raid.cc b/mysys/raid.cc index 62587c438ca..20e70d2d102 100644 --- a/mysys/raid.cc +++ b/mysys/raid.cc @@ -70,6 +70,8 @@ tonu@mysql.com & monty@mysql.com */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc index bc4af0c7dc7..51268fd60b3 100644 --- a/sql/examples/ha_archive.cc +++ b/sql/examples/ha_archive.cc @@ -14,7 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#include + +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/examples/ha_example.cc b/sql/examples/ha_example.cc index cb0780ea74d..b122c4dc83f 100644 --- a/sql/examples/ha_example.cc +++ b/sql/examples/ha_example.cc @@ -63,7 +63,9 @@ -Brian */ -#ifdef __GNUC__ +#include + +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/examples/ha_tina.cc b/sql/examples/ha_tina.cc index 0345a170c3c..44040ad3b61 100644 --- a/sql/examples/ha_tina.cc +++ b/sql/examples/ha_tina.cc @@ -38,7 +38,9 @@ TODO: -Brian */ -#ifdef __GNUC__ +#include + +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/field.cc b/sql/field.cc index adb0368384e..60287d4003b 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -19,6 +19,8 @@ ** This file implements classes defined in field.h *****************************************************************************/ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 05cad23b176..d4adea4a7b4 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -47,6 +47,8 @@ */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index 59b3f7102b5..a5456d54c1b 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index d584c33f061..83f5203324f 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 3f2e11e8bd1..b3b82df5469 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -28,6 +28,8 @@ have disables the InnoDB inlining in this file. */ in Windows? */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_isam.cc b/sql/ha_isam.cc index 31e9236460f..b755c63698f 100644 --- a/sql/ha_isam.cc +++ b/sql/ha_isam.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_isammrg.cc b/sql/ha_isammrg.cc index c0e6f665f08..7e14ccb43bf 100644 --- a/sql/ha_isammrg.cc +++ b/sql/ha_isammrg.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index d8608c6a599..b4ac8cc777f 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index edb3521470f..3374ee1271a 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index eaa0473df1b..516703112dd 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -20,6 +20,8 @@ NDB Cluster */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/handler.cc b/sql/handler.cc index f14564b6629..d47bb02a58c 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -17,6 +17,8 @@ /* Handler-calling-functions */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/hash_filo.cc b/sql/hash_filo.cc index ec200768222..34f3cd6b035 100644 --- a/sql/hash_filo.cc +++ b/sql/hash_filo.cc @@ -20,6 +20,8 @@ ** to usage. */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item.cc b/sql/item.cc index bff8c1cace6..d32a6581049 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 337ac949d35..f53dcb43e5c 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -17,6 +17,8 @@ /* This file defines all compare functions */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_func.cc b/sql/item_func.cc index 3c50e750b41..e9339877ab7 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -17,6 +17,8 @@ /* This file defines all numerical functions */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index c58a9e434c7..e907c5a0d45 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -17,6 +17,8 @@ /* This file defines all spatial functions */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 5ca5caf6bdf..725712f4e85 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -20,6 +20,8 @@ ** (This shouldn't be needed) */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 2e4c70ecd5f..553b309cfde 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -22,6 +22,8 @@ SUBSELECT TODO: (sql_select.h/sql_select.cc) */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 0e252259f53..9c35fb1d427 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -17,6 +17,8 @@ /* Sum functions (COUNT, MIN...) */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index a3cf69035f3..9f5cd61f95a 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -17,6 +17,8 @@ /* This file defines all time functions */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_uniq.cc b/sql/item_uniq.cc index 0c757c0e3a3..c83373bd8b0 100644 --- a/sql/item_uniq.cc +++ b/sql/item_uniq.cc @@ -15,6 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Compability file */ + +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation #endif diff --git a/sql/log_event.cc b/sql/log_event.cc index f2287857d37..9701ef2ff00 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -16,6 +16,9 @@ #ifndef MYSQL_CLIENT + +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/opt_range.cc b/sql/opt_range.cc index bd1befb436f..7b37f0ce4f7 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -23,6 +23,8 @@ */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/procedure.cc b/sql/procedure.cc index a0042dd879e..10689dd36f6 100644 --- a/sql/procedure.cc +++ b/sql/procedure.cc @@ -17,6 +17,8 @@ /* Procedures (functions with changes output of select) */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/protocol.cc b/sql/protocol.cc index 6a17ae2f95b..835bd986fb8 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -19,6 +19,8 @@ The actual communction is handled by the net_xxx functions in net_serv.cc */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/protocol_cursor.cc b/sql/protocol_cursor.cc index b225e06ed32..53a03001544 100644 --- a/sql/protocol_cursor.cc +++ b/sql/protocol_cursor.cc @@ -19,6 +19,8 @@ The actual communction is handled by the net_xxx functions in net_serv.cc */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/set_var.cc b/sql/set_var.cc index 3d3ba6d6ab7..b006dde2b4b 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -48,6 +48,8 @@ new attribute. */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index fb5d0eb0a3f..678bdbb4588 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -23,6 +23,8 @@ ** - type set is out of optimization yet */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 805db107370..ff45b164893 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -22,6 +22,8 @@ ** *****************************************************************************/ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_crypt.cc b/sql/sql_crypt.cc index f21a109e95d..eda7f0f6bbb 100644 --- a/sql/sql_crypt.cc +++ b/sql/sql_crypt.cc @@ -23,6 +23,8 @@ needs something like 'ssh'. */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_list.cc b/sql/sql_list.cc index d57a7dfe4e3..485c569f49c 100644 --- a/sql/sql_list.cc +++ b/sql/sql_list.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_map.cc b/sql/sql_map.cc index aac44949d89..9baacd1bc4b 100644 --- a/sql/sql_map.cc +++ b/sql/sql_map.cc @@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_olap.cc b/sql/sql_olap.cc index 024abb6c74b..a365cbb0614 100644 --- a/sql/sql_olap.cc +++ b/sql/sql_olap.cc @@ -28,6 +28,8 @@ #ifdef DISABLED_UNTIL_REWRITTEN_IN_4_1 +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 0362f097cba..1d42fe49283 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -17,6 +17,8 @@ /* mysql_select and join optimization */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_string.cc b/sql/sql_string.cc index ab2db4aaf53..e5339782f02 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -16,11 +16,12 @@ /* This file is originally from the mysql distribution. Coded by monty */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif -#include #include #include #include diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index f5b4775ee0b..deed806db2a 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -28,6 +28,8 @@ ** dynamic functions, so this shouldn't be a real problem. */ +#include + #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: implement sql_udf.h #endif diff --git a/sql/tztime.cc b/sql/tztime.cc index 8fac054c49c..30ff25f080f 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -20,18 +20,20 @@ (We will refer to this code as to elsie-code further.) */ -#ifdef USE_PRAGMA_IMPLEMENTATION -#pragma implementation // gcc: Class implementation -#endif - /* We should not include mysql_priv.h in mysql_tzinfo_to_sql utility since it creates unsolved link dependencies on some platforms. */ + +#include + +#ifdef USE_PRAGMA_IMPLEMENTATION +#pragma implementation // gcc: Class implementation +#endif + #if !defined(TZINFO2SQL) && !defined(TESTTIME) #include "mysql_priv.h" #else -#include #include #include "tztime.h" #include -- cgit v1.2.1 From c0df79f9047726fca65c8709c9174cd57c68b3c9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 1 Jun 2005 18:08:39 -0700 Subject: Restore a bit of code accidently deleted during merge sql/item_func.cc: Restore accidently deleted code --- sql/item_func.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/item_func.cc b/sql/item_func.cc index 4963476c114..fd0b2c196fd 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2329,6 +2329,8 @@ longlong Item_func_field::val_int() if (cmp_type == STRING_RESULT) { String *field; + if (!(field= args[0]->val_str(&value))) + return 0; for (uint i=1 ; i < arg_count ; i++) { String *tmp_value=args[i]->val_str(&tmp); -- cgit v1.2.1