diff options
author | unknown <monty@mishka.mysql.fi> | 2003-09-24 10:24:56 +0300 |
---|---|---|
committer | unknown <monty@mishka.mysql.fi> | 2003-09-24 10:24:56 +0300 |
commit | 74e3399af186b3159738c0c9c55672f0dbd7705c (patch) | |
tree | cc7389163da24340a03858b997927a41eeedc545 /sql | |
parent | 4e09f14b18ededb18aab527abe582fca34afe79c (diff) | |
parent | 1c50f8ac7894e7a59e25f720ab700cbe73986347 (diff) | |
download | mariadb-git-74e3399af186b3159738c0c9c55672f0dbd7705c.tar.gz |
merge
sql/item_strfunc.cc:
Auto merged
sql/lock.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
sql/net_serv.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_strfunc.cc | 15 | ||||
-rw-r--r-- | sql/lock.cc | 2 | ||||
-rw-r--r-- | sql/log.cc | 1 | ||||
-rw-r--r-- | sql/mysql_priv.h | 19 | ||||
-rw-r--r-- | sql/net_serv.cc | 7 | ||||
-rw-r--r-- | sql/repl_failsafe.cc | 1 | ||||
-rw-r--r-- | sql/set_var.cc | 2 | ||||
-rw-r--r-- | sql/sql_derived.cc | 2 | ||||
-rw-r--r-- | sql/sql_insert.cc | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/sql_prepare.cc | 1 | ||||
-rw-r--r-- | sql/sql_repl.cc | 2 | ||||
-rw-r--r-- | sql/sql_string.cc | 5 | ||||
-rw-r--r-- | sql/sql_table.cc | 1 | ||||
-rw-r--r-- | sql/sql_test.cc | 2 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 1 | ||||
-rw-r--r-- | sql/table.cc | 1 |
17 files changed, 34 insertions, 32 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 98e8ee3914e..c48cf61262d 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -33,6 +33,7 @@ #include "md5.h" #include "sha1.h" #include "my_aes.h" +#include "../mysys/my_static.h" // For soundex_map String my_empty_string("",default_charset_info); @@ -1496,15 +1497,11 @@ void Item_func_soundex::fix_length_and_dec() } - /* - If alpha, map input letter to soundex code. - If not alpha and remove_garbage is set then skip to next char - else return 0 - */ - -extern "C" { -extern const char *soundex_map; // In mysys/static.c -} +/* + If alpha, map input letter to soundex code. + If not alpha and remove_garbage is set then skip to next char + else return 0 +*/ static char get_scode(CHARSET_INFO *cs,char *ptr) { diff --git a/sql/lock.cc b/sql/lock.cc index ea5e60b558f..29795415720 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -75,8 +75,6 @@ TODO: #include "../myisammrg/myrg_def.h" #endif -extern HASH open_cache; - static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table,uint count, bool unlock, TABLE **write_locked); static int lock_external(THD *thd, TABLE **table,uint count); diff --git a/sql/log.cc b/sql/log.cc index 33464d0ab29..708aa943a81 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -31,7 +31,6 @@ #include <m_ctype.h> // For test_if_number MYSQL_LOG mysql_log,mysql_update_log,mysql_slow_log,mysql_bin_log; -extern I_List<i_string> binlog_do_db, binlog_ignore_db; static bool test_if_number(const char *str, long *res, bool allow_wildcards); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 1d7dd3aa5bb..a0f34434254 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -707,6 +707,9 @@ bool open_log(MYSQL_LOG *log, const char *hostname, enum_log_type type, bool read_append, bool no_auto_events, ulong max_size); +/* mysqld.cc */ +extern void yyerror(const char*); + /* External variables */ @@ -787,7 +790,7 @@ extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open, LOCK_error_log, LOCK_delayed_insert, LOCK_delayed_status, LOCK_delayed_create, LOCK_crypt, LOCK_timezone, LOCK_slave_list, LOCK_active_mi, LOCK_manager, - LOCK_global_system_variables; + LOCK_global_system_variables, LOCK_user_conn; extern rw_lock_t LOCK_grant; extern pthread_cond_t COND_refresh, COND_thread_count, COND_manager; extern pthread_attr_t connection_attrib; @@ -804,7 +807,11 @@ extern SHOW_COMP_OPTION have_berkeley_db; extern struct system_variables global_system_variables; extern struct system_variables max_system_variables; extern struct rand_struct sql_rand; -extern String null_string; +extern HASH open_cache; +extern TABLE *unused_tables; +extern I_List<i_string> binlog_do_db, binlog_ignore_db; +extern const char* any_db; +extern struct my_option my_long_options[]; /* optional things, have_* variables */ @@ -939,6 +946,14 @@ bool flush_error_log(void); void free_list(I_List <i_string_pair> *list); void free_list(I_List <i_string> *list); +/* sql_yacc.cc */ +extern int yyparse(void *thd); + +/* frm_crypt.cc */ +#ifdef HAVE_CRYPTED_FRM +SQL_CRYPT *get_crypt_for_frm(void); +#endif + /* Some inline functions for more speed */ inline bool add_item_to_list(THD *thd, Item *item) diff --git a/sql/net_serv.cc b/sql/net_serv.cc index eac197e530b..7944a528b83 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -88,10 +88,15 @@ void sql_print_error(const char *format,...); #ifdef MYSQL_SERVER #define USE_QUERY_CACHE +/* + The following variables/functions should really not be declared + extern, but as it's hard to include mysql_priv.h here, we have to + live with this for a while. +*/ extern uint test_flags; -extern void query_cache_insert(NET *net, const char *packet, ulong length); extern ulong bytes_sent, bytes_received, net_big_packet_count; extern pthread_mutex_t LOCK_bytes_sent , LOCK_bytes_received; +extern void query_cache_insert(NET *net, const char *packet, ulong length); #else #undef statistic_add #undef statistic_increment diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index b931ce0ba8c..78fee1d8b19 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -34,7 +34,6 @@ RPL_STATUS rpl_status=RPL_NULL; pthread_mutex_t LOCK_rpl_status; pthread_cond_t COND_rpl_status; HASH slave_list; -extern const char* any_db; const char *rpl_role_type[] = {"MASTER","SLAVE",NullS}; TYPELIB rpl_role_typelib = {array_elements(rpl_role_type)-1,"", diff --git a/sql/set_var.cc b/sql/set_var.cc index 147033be660..ba1baf3797e 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1913,8 +1913,6 @@ static byte *get_sys_var_length(const sys_var *var, uint *length, void set_var_init() { - extern struct my_option my_long_options[]; // From mysqld - hash_init(&system_variable_hash, system_charset_info, array_elements(sys_variables),0,0, (hash_get_key) get_sys_var_length,0,0); diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 5d05fea4fe3..121e0321eb0 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -25,8 +25,6 @@ #include "sql_select.h" #include "sql_acl.h" -extern const char *any_db; // Special symbol for check_access - /* Resolve derived tables in all queries diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 6028e291edd..2e229d2b04d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1569,8 +1569,6 @@ bool select_create::send_data(List<Item> &values) return 0; } -extern HASH open_cache; - bool select_create::send_eof() { diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index de76fef85a9..53318907d78 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -44,7 +44,6 @@ #define MIN_HANDSHAKE_SIZE 6 #endif /* HAVE_OPENSSL */ -extern int yyparse(void *thd); extern "C" pthread_mutex_t THR_LOCK_keycache; #ifdef SOLARIS extern "C" int gethostname(char *name, int namelen); @@ -120,7 +119,6 @@ static bool end_active_trans(THD *thd) static HASH hash_user_connections; -extern pthread_mutex_t LOCK_user_conn; static int get_or_create_user_conn(THD *thd, const char *user, const char *host, diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 0ea3132eabc..469937b6065 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -76,7 +76,6 @@ Long data handling: #define STMT_QUERY_LOG_LENGTH 8192 -extern int yyparse(void *thd); String null_string("NULL", 4, default_charset_info); /* diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 8e2c024e7b3..b1097f3f376 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -24,8 +24,6 @@ #include "log_event.h" #include <my_dir.h> -extern const char* any_db; - int max_binlog_dump_events = 0; // unlimited my_bool opt_sporadic_binlog_dump_fail = 0; static int binlog_dump_count = 0; diff --git a/sql/sql_string.cc b/sql/sql_string.cc index e7d7b08c93c..be9404ce0b8 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -28,6 +28,11 @@ #include <floatingpoint.h> #endif +/* + The following extern declarations are ok as these are interface functions + required by the string function +*/ + extern gptr sql_alloc(unsigned size); extern void sql_element_free(void *ptr); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 5e4971a7372..b8f4b360dda 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -29,7 +29,6 @@ #include <io.h> #endif -extern HASH open_cache; static const char *primary_key_name="PRIMARY"; static bool check_if_keyname_exists(const char *name,KEY *start, KEY *end); diff --git a/sql/sql_test.cc b/sql/sql_test.cc index d2f97640010..f991a09398b 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -41,7 +41,6 @@ static const char *lock_descriptions[] = "High priority write lock", "Highest priority write lock" }; -extern HASH open_cache; #ifndef DBUG_OFF @@ -65,7 +64,6 @@ print_where(COND *cond,const char *info) } /* This is for debugging purposes */ -extern TABLE *unused_tables; void print_cached_tables(void) { diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 6491dd6cad1..0205d69da00 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -38,7 +38,6 @@ #include <myisam.h> #include <myisammrg.h> -extern void yyerror(const char*); int yylex(void *yylval, void *yythd); #define yyoverflow(A,B,C,D,E,F) if (my_yyoverflow((B),(D),(int*) (F))) { yyerror((char*) (A)); return 2; } diff --git a/sql/table.cc b/sql/table.cc index 5e7991436a1..c31b68fc2dc 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -236,7 +236,6 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, #ifdef HAVE_CRYPTED_FRM else if (*(head+26) == 2) { - extern SQL_CRYPT *get_crypt_for_frm(void); my_pthread_setspecific_ptr(THR_MALLOC,old_root); crypted=get_crypt_for_frm(); my_pthread_setspecific_ptr(THR_MALLOC,&outparam->mem_root); |