Commit 67b0e3e5 authored by unknown's avatar unknown

Remove 'extern' references from .cc files


mysys/checksum.c:
  Cleanup
mysys/my_static.h:
  Remove not used include file
sql/item_strfunc.cc:
  Remove 'extern' references
sql/lock.cc:
  Remove 'extern' references
sql/log.cc:
  Remove 'extern' references
sql/mysql_priv.h:
  Add 'extern' references
sql/net_serv.cc:
  Added comment
sql/repl_failsafe.cc:
  Remove 'extern' references
sql/set_var.cc:
  Remove 'extern' references
sql/sql_derived.cc:
  Remove 'extern' references
sql/sql_insert.cc:
  Remove 'extern' references
sql/sql_parse.cc:
  Remove 'extern' references
sql/sql_prepare.cc:
  Remove 'extern' references
sql/sql_repl.cc:
  Remove 'extern' references
sql/sql_string.cc:
  Added comment
sql/sql_table.cc:
  Remove 'extern' references
sql/sql_test.cc:
  Remove 'extern' references
sql/sql_yacc.yy:
  Remove 'extern' references
sql/table.cc:
  Remove 'extern' references
parent 8db1ce6e
......@@ -30,11 +30,13 @@
ha_checksum my_checksum(ha_checksum crc, const byte *pos, uint length)
{
/* const byte *end=pos+length;
#ifdef NOT_USED
const byte *end=pos+length;
for ( ; pos != end ; pos++)
crc=((crc << 8) + *((uchar*) pos)) + (crc >> (8*sizeof(ha_checksum)-8));
return crc;
*/
#else
return (ha_checksum)crc32((uint)crc, (const uchar *)pos, length);
#endif
}
......@@ -19,7 +19,6 @@
a shared library
*/
#include "mysys_priv.h"
#include <signal.h>
#define MAX_SIGNALS 10 /* Max signals under a dont-allow */
......
......@@ -33,6 +33,7 @@
#include "md5.h"
#include "sha1.h"
#include "my_aes.h"
#include "../mysys/my_static.h" // For soundex_map
String 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
}
*/
static char get_scode(CHARSET_INFO *cs,char *ptr)
{
......
......@@ -75,8 +75,6 @@
#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);
......
......@@ -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);
......
......@@ -705,6 +705,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
*/
......@@ -785,7 +788,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;
......@@ -802,6 +805,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 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 */
......@@ -936,6 +944,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)
......
......@@ -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
......
......@@ -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,"",
......
......@@ -1836,8 +1836,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);
......
......@@ -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
......
......@@ -1569,8 +1569,6 @@ bool select_create::send_data(List<Item> &values)
return 0;
}
extern HASH open_cache;
bool select_create::send_eof()
{
......
......@@ -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,
......
......@@ -76,7 +76,6 @@ Long data handling:
#define STMT_QUERY_LOG_LENGTH 8192
extern int yyparse(void *thd);
static String null_string("NULL", 4, default_charset_info);
/*
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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)
{
......
......@@ -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; }
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment