mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fixed compiler warnings
Fixed compile-pentium64 scripts Fixed wrong estimate of update_with_key_prefix in sql-bench Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1 Fixed unsafe define of uint4korr() Fixed that --extern works with mysql-test-run.pl Small trivial cleanups This also fixes a bug in counting number of rows that are updated when we have many simultanous queries Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc Split handle_one_connection() into reusable sub functions. Split create_new_thread() into reusable sub functions. Added thread_scheduler; Preliminary interface code for future thread_handling code. Use 'my_thread_id' for internal thread id's Make thr_alarm_kill() to depend on thread_id instead of thread Make thr_abort_locks_for_thread() depend on thread_id instead of thread In store_globals(), set my_thread_var->id to be thd->thread_id. Use my_thread_var->id as basis for my_thread_name() The above changes makes the connection we have between THD and threads more soft. Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions Fixed compiler warnings Fixed core dumps when running with --debug Removed setting of signal masks (was never used) Made event code call pthread_exit() (portability fix) Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called. Made handling of thread_id and thd->variables.pseudo_thread_id uniform. Removed one common 'not freed memory' warning from mysqltest Fixed a couple of usage of not initialized warnings (unlikely cases) Suppress compiler warnings from bdb and (for the moment) warnings from ndb
This commit is contained in:
@ -38,6 +38,7 @@
|
||||
#include <queues.h>
|
||||
#include "sql_bitmap.h"
|
||||
#include "sql_array.h"
|
||||
#include "scheduler.h"
|
||||
|
||||
/* TODO convert all these three maps to Bitmap classes */
|
||||
typedef ulonglong table_map; /* Used for table bits in join */
|
||||
@ -282,7 +283,6 @@ MY_LOCALE *my_locale_by_number(uint number);
|
||||
#define TEST_MIT_THREAD 4
|
||||
#define TEST_BLOCKING 8
|
||||
#define TEST_KEEP_TMP_TABLES 16
|
||||
#define TEST_NO_THREADS 32 /* For debugging under Linux */
|
||||
#define TEST_READCHECK 64 /* Force use of readcheck */
|
||||
#define TEST_NO_EXTRA 128
|
||||
#define TEST_CORE_ON_SIGNAL 256 /* Give core if signal */
|
||||
@ -787,6 +787,23 @@ uint build_table_path(char *buff, size_t bufflen, const char *db,
|
||||
void write_bin_log(THD *thd, bool clear_error,
|
||||
char const *query, ulong query_length);
|
||||
|
||||
/* sql_connect.cc */
|
||||
int check_user(THD *thd, enum enum_server_command command,
|
||||
const char *passwd, uint passwd_len, const char *db,
|
||||
bool check_count);
|
||||
pthread_handler_t handle_one_connection(void *arg);
|
||||
bool init_new_connection_handler_thread();
|
||||
void reset_mqh(LEX_USER *lu, bool get_them);
|
||||
bool check_mqh(THD *thd, uint check_command);
|
||||
void time_out_user_resource_limits(THD *thd, USER_CONN *uc);
|
||||
int check_for_max_user_connections(THD *thd, USER_CONN *uc);
|
||||
void decrease_user_connections(USER_CONN *uc);
|
||||
void thd_init_client_charset(THD *thd, uint cs_number);
|
||||
bool setup_connection_thread_globals(THD *thd);
|
||||
bool login_connection(THD *thd);
|
||||
void prepare_new_connection_state(THD* thd);
|
||||
void end_connection(THD *thd);
|
||||
|
||||
bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create, bool silent);
|
||||
bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create);
|
||||
bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent);
|
||||
@ -822,10 +839,7 @@ bool multi_delete_set_locks_and_link_aux_tables(LEX *lex);
|
||||
void init_max_user_conn(void);
|
||||
void init_update_queries(void);
|
||||
void free_max_user_conn(void);
|
||||
pthread_handler_t handle_one_connection(void *arg);
|
||||
pthread_handler_t handle_bootstrap(void *arg);
|
||||
void end_thread(THD *thd,bool put_in_cache);
|
||||
void flush_thread_cache();
|
||||
bool mysql_execute_command(THD *thd);
|
||||
bool do_command(THD *thd);
|
||||
bool dispatch_command(enum enum_server_command command, THD *thd,
|
||||
@ -1495,6 +1509,11 @@ File open_binlog(IO_CACHE *log, const char *log_file_name,
|
||||
extern void MYSQLerror(const char*);
|
||||
void refresh_status(THD *thd);
|
||||
my_bool mysql_rm_tmp_tables(void);
|
||||
void handle_connection_in_main_thread(THD *thd);
|
||||
void create_thread_to_handle_connection(THD *thd);
|
||||
void unlink_thd(THD *thd);
|
||||
bool one_thread_per_connection_end(THD *thd, bool put_in_cache);
|
||||
void flush_thread_cache();
|
||||
|
||||
/* item_func.cc */
|
||||
extern bool check_reserved_words(LEX_STRING *name);
|
||||
@ -1578,7 +1597,7 @@ extern ulong max_prepared_stmt_count, prepared_stmt_count;
|
||||
extern ulong binlog_cache_size, max_binlog_cache_size, open_files_limit;
|
||||
extern ulong max_binlog_size, max_relay_log_size;
|
||||
extern ulong opt_binlog_rows_event_max_size;
|
||||
extern ulong rpl_recovery_rank, thread_cache_size;
|
||||
extern ulong rpl_recovery_rank, thread_cache_size, thread_pool_size;
|
||||
extern ulong back_log;
|
||||
extern ulong specialflag, current_pid;
|
||||
extern ulong expire_logs_days, sync_binlog_period, sync_binlog_counter;
|
||||
@ -1663,6 +1682,9 @@ extern TABLE *unused_tables;
|
||||
extern const char* any_db;
|
||||
extern struct my_option my_long_options[];
|
||||
extern const LEX_STRING view_type;
|
||||
extern scheduler_functions thread_scheduler;
|
||||
extern TYPELIB thread_handling_typelib;
|
||||
extern uint8 uc_update_queries[SQLCOM_END+1];
|
||||
extern uint sql_command_flags[];
|
||||
extern TYPELIB log_output_typelib;
|
||||
|
||||
|
Reference in New Issue
Block a user