Commit 0d58b499 authored by unknown's avatar unknown

foo1


sql/ha_innodb.cc:
  Import patch foo1
sql/ha_innodb.h:
  Import patch foo1
sql/handler.cc:
  Import patch foo1
sql/handler.h:
  Import patch foo1
sql/mysqld.cc:
  Import patch foo1
sql/set_var.cc:
  Import patch foo1
sql/sql_class.h:
  Import patch foo1
sql/sql_repl.cc:
  Import patch foo1
parent 231d932a
This diff is collapsed.
...@@ -165,15 +165,15 @@ class ha_innobase: public handler ...@@ -165,15 +165,15 @@ class ha_innobase: public handler
int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list); int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
bool can_switch_engines(); bool can_switch_engines();
uint referenced_by_foreign_key(); uint referenced_by_foreign_key();
void free_foreign_key_create_info(char* str); void free_foreign_key_create_info(char* str);
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to, THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type); enum thr_lock_type lock_type);
void init_table_handle_for_HANDLER(); void init_table_handle_for_HANDLER();
ulonglong get_auto_increment(); ulonglong get_auto_increment();
int reset_auto_increment(ulonglong value); int reset_auto_increment(ulonglong value);
virtual bool get_error_message(int error, String *buf); virtual bool get_error_message(int error, String *buf);
uint8 table_cache_type() { return HA_CACHE_TBL_ASKTRANSACT; } uint8 table_cache_type() { return HA_CACHE_TBL_ASKTRANSACT; }
/* /*
ask handler about permission to cache table during query registration ask handler about permission to cache table during query registration
...@@ -280,7 +280,7 @@ This function is used to recover X/Open XA distributed transactions */ ...@@ -280,7 +280,7 @@ This function is used to recover X/Open XA distributed transactions */
int innobase_xa_recover( int innobase_xa_recover(
/*====================*/ /*====================*/
/* out: number of prepared transactions /* out: number of prepared transactions
stored in xid_list */ stored in xid_list */
XID* xid_list, /* in/out: prepared transactions */ XID* xid_list, /* in/out: prepared transactions */
uint len); /* in: number of slots in xid_list */ uint len); /* in: number of slots in xid_list */
...@@ -309,7 +309,7 @@ int innobase_repl_report_sent_binlog(THD *thd, char *log_file_name, ...@@ -309,7 +309,7 @@ int innobase_repl_report_sent_binlog(THD *thd, char *log_file_name,
/*********************************************************************** /***********************************************************************
Create a consistent view for a cursor based on current transaction Create a consistent view for a cursor based on current transaction
which is created if the corresponding MySQL thread still lacks one. which is created if the corresponding MySQL thread still lacks one.
This consistent view is then used inside of MySQL when accessing records This consistent view is then used inside of MySQL when accessing records
using a cursor. */ using a cursor. */
void* void*
...@@ -319,7 +319,7 @@ innobase_create_cursor_view(void); ...@@ -319,7 +319,7 @@ innobase_create_cursor_view(void);
/*********************************************************************** /***********************************************************************
Close the given consistent cursor view of a transaction and restore Close the given consistent cursor view of a transaction and restore
global read view to a transaction read view. Transaction is created if the global read view to a transaction read view. Transaction is created if the
corresponding MySQL thread still lacks one. */ corresponding MySQL thread still lacks one. */
void void
...@@ -328,8 +328,8 @@ innobase_close_cursor_view( ...@@ -328,8 +328,8 @@ innobase_close_cursor_view(
void* curview); /* in: Consistent read view to be closed */ void* curview); /* in: Consistent read view to be closed */
/*********************************************************************** /***********************************************************************
Set the given consistent cursor view to a transaction which is created Set the given consistent cursor view to a transaction which is created
if the corresponding MySQL thread still lacks one. If the given if the corresponding MySQL thread still lacks one. If the given
consistent cursor view is NULL global read view of a transaction is consistent cursor view is NULL global read view of a transaction is
restored to a transaction read view. */ restored to a transaction read view. */
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
#include "ha_berkeley.h" #include "ha_berkeley.h"
extern handlerton berkeley_hton; extern handlerton berkeley_hton;
#else #else
handlerton berkeley_hton = { "BerkeleyDB", SHOW_OPTION_NO, handlerton berkeley_hton = { "BerkeleyDB", SHOW_OPTION_NO,
"Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB, NULL, "Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB, NULL,
0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, HTON_NO_FLAGS }; NULL, NULL, HTON_NO_FLAGS };
#endif #endif
#ifdef HAVE_BLACKHOLE_DB #ifdef HAVE_BLACKHOLE_DB
...@@ -46,8 +46,8 @@ extern handlerton blackhole_hton; ...@@ -46,8 +46,8 @@ extern handlerton blackhole_hton;
#else #else
handlerton blackhole_hton = { "BLACKHOLE", SHOW_OPTION_NO, handlerton blackhole_hton = { "BLACKHOLE", SHOW_OPTION_NO,
"/dev/null storage engine (anything you write to it disappears)", "/dev/null storage engine (anything you write to it disappears)",
DB_TYPE_BLACKHOLE_DB, NULL, 0, 0, NULL, NULL, DB_TYPE_BLACKHOLE_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS }; HTON_NO_FLAGS };
#endif #endif
#ifdef HAVE_EXAMPLE_DB #ifdef HAVE_EXAMPLE_DB
...@@ -55,9 +55,9 @@ handlerton blackhole_hton = { "BLACKHOLE", SHOW_OPTION_NO, ...@@ -55,9 +55,9 @@ handlerton blackhole_hton = { "BLACKHOLE", SHOW_OPTION_NO,
extern handlerton example_hton; extern handlerton example_hton;
#else #else
handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO, handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO,
"Example storage engine", "Example storage engine",
DB_TYPE_EXAMPLE_DB, NULL, 0, 0, NULL, NULL, DB_TYPE_EXAMPLE_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS }; HTON_NO_FLAGS };
#endif #endif
#if defined(HAVE_ARCHIVE_DB) #if defined(HAVE_ARCHIVE_DB)
...@@ -65,17 +65,17 @@ handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO, ...@@ -65,17 +65,17 @@ handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO,
extern handlerton archive_hton; extern handlerton archive_hton;
#else #else
handlerton archive_hton = { "ARCHIVE", SHOW_OPTION_NO, handlerton archive_hton = { "ARCHIVE", SHOW_OPTION_NO,
"Archive storage engine", DB_TYPE_ARCHIVE_DB, NULL, 0, 0, NULL, NULL, "Archive storage engine", DB_TYPE_ARCHIVE_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS }; HTON_NO_FLAGS };
#endif #endif
#ifdef HAVE_CSV_DB #ifdef HAVE_CSV_DB
#include "examples/ha_tina.h" #include "examples/ha_tina.h"
extern handlerton tina_hton; extern handlerton tina_hton;
#else #else
handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine", handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine",
DB_TYPE_CSV_DB, NULL, 0, 0, NULL, NULL, DB_TYPE_CSV_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS }; HTON_NO_FLAGS };
#endif #endif
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
...@@ -83,9 +83,9 @@ handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine", ...@@ -83,9 +83,9 @@ handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine",
extern handlerton innobase_hton; extern handlerton innobase_hton;
#else #else
handlerton innobase_hton = { "InnoDB", SHOW_OPTION_NO, handlerton innobase_hton = { "InnoDB", SHOW_OPTION_NO,
"Supports transactions, row-level locking, and foreign keys", "Supports transactions, row-level locking, and foreign keys",
DB_TYPE_INNODB, NULL, 0, 0, NULL, NULL, DB_TYPE_INNODB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS }; HTON_NO_FLAGS };
#endif #endif
#ifdef HAVE_NDBCLUSTER_DB #ifdef HAVE_NDBCLUSTER_DB
...@@ -93,18 +93,18 @@ handlerton innobase_hton = { "InnoDB", SHOW_OPTION_NO, ...@@ -93,18 +93,18 @@ handlerton innobase_hton = { "InnoDB", SHOW_OPTION_NO,
extern handlerton ndbcluster_hton; extern handlerton ndbcluster_hton;
#else #else
handlerton ndbcluster_hton = { "ndbcluster", SHOW_OPTION_NO, handlerton ndbcluster_hton = { "ndbcluster", SHOW_OPTION_NO,
"Clustered, fault-tolerant, memory-based tables", "Clustered, fault-tolerant, memory-based tables",
DB_TYPE_NDBCLUSTER, NULL, 0, 0, NULL, NULL, DB_TYPE_NDBCLUSTER, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS }; HTON_NO_FLAGS };
#endif #endif
#ifdef HAVE_FEDERATED_DB #ifdef HAVE_FEDERATED_DB
#include "ha_federated.h" #include "ha_federated.h"
extern handlerton federated_hton; extern handlerton federated_hton;
#else #else
handlerton federated_hton = { "FEDERATED", SHOW_OPTION_NO, handlerton federated_hton = { "FEDERATED", SHOW_OPTION_NO,
"Federated MySQL storage engine", DB_TYPE_FEDERATED_DB, NULL, 0, 0, NULL, "Federated MySQL storage engine", DB_TYPE_FEDERATED_DB, NULL, 0, 0, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS }; HTON_NO_FLAGS };
#endif #endif
#include <myisampack.h> #include <myisampack.h>
...@@ -118,8 +118,8 @@ extern handlerton binlog_hton; ...@@ -118,8 +118,8 @@ extern handlerton binlog_hton;
/* /*
Obsolete Obsolete
*/ */
handlerton isam_hton = { "ISAM", SHOW_OPTION_NO, "Obsolete storage engine", handlerton isam_hton = { "ISAM", SHOW_OPTION_NO, "Obsolete storage engine",
DB_TYPE_ISAM, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, DB_TYPE_ISAM, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, HTON_NO_FLAGS }; NULL, NULL, NULL, NULL, NULL, NULL, HTON_NO_FLAGS };
...@@ -283,7 +283,7 @@ enum db_type ha_checktype(THD *thd, enum db_type database_type, ...@@ -283,7 +283,7 @@ enum db_type ha_checktype(THD *thd, enum db_type database_type,
default: default:
break; break;
} }
return ((enum db_type) thd->variables.table_type != DB_TYPE_UNKNOWN ? return ((enum db_type) thd->variables.table_type != DB_TYPE_UNKNOWN ?
(enum db_type) thd->variables.table_type : (enum db_type) thd->variables.table_type :
((enum db_type) global_system_variables.table_type != ((enum db_type) global_system_variables.table_type !=
...@@ -481,7 +481,7 @@ int ha_init() ...@@ -481,7 +481,7 @@ int ha_init()
for (types= sys_table_types; *types; types++) for (types= sys_table_types; *types; types++)
{ {
if (!(*types)->init || !(*types)->init()) if (!(*types)->init || !(*types)->init())
ha_was_inited_ok(types); ha_was_inited_ok(types);
else else
(*types)->state= SHOW_OPTION_DISABLED; (*types)->state= SHOW_OPTION_DISABLED;
} }
...@@ -1144,7 +1144,7 @@ int ha_release_temporary_latches(THD *thd) ...@@ -1144,7 +1144,7 @@ int ha_release_temporary_latches(THD *thd)
} }
/* /*
Export statistics for different engines. Currently we use it only for Export statistics for different engines. Currently we use it only for
InnoDB. InnoDB.
*/ */
...@@ -1480,7 +1480,7 @@ next_insert_id(ulonglong nr,struct system_variables *variables) ...@@ -1480,7 +1480,7 @@ next_insert_id(ulonglong nr,struct system_variables *variables)
RETURN RETURN
0 ok 0 ok
1 get_auto_increment() was called and returned ~(ulonglong) 0 1 get_auto_increment() was called and returned ~(ulonglong) 0
IMPLEMENTATION IMPLEMENTATION
...@@ -2323,8 +2323,8 @@ int ha_discover(THD *thd, const char *db, const char *name, ...@@ -2323,8 +2323,8 @@ int ha_discover(THD *thd, const char *db, const char *name,
/* /*
Call this function in order to give the handler the possiblity Call this function in order to give the handler the possiblity
to ask engine if there are any new tables that should be written to disk to ask engine if there are any new tables that should be written to disk
or any dropped tables that need to be removed from disk or any dropped tables that need to be removed from disk
*/ */
...@@ -2334,7 +2334,7 @@ ha_find_files(THD *thd,const char *db,const char *path, ...@@ -2334,7 +2334,7 @@ ha_find_files(THD *thd,const char *db,const char *path,
{ {
int error= 0; int error= 0;
DBUG_ENTER("ha_find_files"); DBUG_ENTER("ha_find_files");
DBUG_PRINT("enter", ("db: %s, path: %s, wild: %s, dir: %d", DBUG_PRINT("enter", ("db: %s, path: %s, wild: %s, dir: %d",
db, path, wild, dir)); db, path, wild, dir));
#ifdef HAVE_NDBCLUSTER_DB #ifdef HAVE_NDBCLUSTER_DB
if (have_ndbcluster == SHOW_OPTION_YES) if (have_ndbcluster == SHOW_OPTION_YES)
...@@ -2500,7 +2500,7 @@ int handler::read_multi_range_next(KEY_MULTI_RANGE **found_range_p) ...@@ -2500,7 +2500,7 @@ int handler::read_multi_range_next(KEY_MULTI_RANGE **found_range_p)
read_range_first() read_range_first()
start_key Start key. Is 0 if no min range start_key Start key. Is 0 if no min range
end_key End key. Is 0 if no max range end_key End key. Is 0 if no max range
eq_range_arg Set to 1 if start_key == end_key eq_range_arg Set to 1 if start_key == end_key
sorted Set to 1 if result should be sorted per key sorted Set to 1 if result should be sorted per key
NOTES NOTES
...@@ -2538,7 +2538,7 @@ int handler::read_range_first(const key_range *start_key, ...@@ -2538,7 +2538,7 @@ int handler::read_range_first(const key_range *start_key,
start_key->length, start_key->length,
start_key->flag); start_key->flag);
if (result) if (result)
DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND) DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND)
? HA_ERR_END_OF_FILE ? HA_ERR_END_OF_FILE
: result); : result);
...@@ -2586,7 +2586,7 @@ int handler::read_range_next() ...@@ -2586,7 +2586,7 @@ int handler::read_range_next()
SYNOPSIS SYNOPSIS
compare_key compare_key
range range to compare to row. May be 0 for no range range range to compare to row. May be 0 for no range
NOTES NOTES
See key.cc::key_cmp() for details See key.cc::key_cmp() for details
...@@ -2626,7 +2626,7 @@ int handler::index_read_idx(byte * buf, uint index, const byte * key, ...@@ -2626,7 +2626,7 @@ int handler::index_read_idx(byte * buf, uint index, const byte * key,
SYNOPSIS SYNOPSIS
ha_known_exts() ha_known_exts()
NOTES NOTES
No mutexes, worst case race is a minor surplus memory allocation No mutexes, worst case race is a minor surplus memory allocation
We have to recreate the extension map if mysqld is restarted (for example We have to recreate the extension map if mysqld is restarted (for example
...@@ -2673,7 +2673,7 @@ TYPELIB *ha_known_exts(void) ...@@ -2673,7 +2673,7 @@ TYPELIB *ha_known_exts(void)
ext= (const char **) my_once_alloc(sizeof(char *)* ext= (const char **) my_once_alloc(sizeof(char *)*
(found_exts.elements+1), (found_exts.elements+1),
MYF(MY_WME | MY_FAE)); MYF(MY_WME | MY_FAE));
DBUG_ASSERT(ext != 0); DBUG_ASSERT(ext != 0);
known_extensions.count= found_exts.elements; known_extensions.count= found_exts.elements;
known_extensions.type_names= ext; known_extensions.type_names= ext;
...@@ -2702,7 +2702,7 @@ TYPELIB *ha_known_exts(void) ...@@ -2702,7 +2702,7 @@ TYPELIB *ha_known_exts(void)
Only works for InnoDB at the moment Only works for InnoDB at the moment
RETURN VALUE RETURN VALUE
Always 0 (= success) Always 0 (= success)
*/ */
int ha_repl_report_sent_binlog(THD *thd, char *log_file_name, int ha_repl_report_sent_binlog(THD *thd, char *log_file_name,
...@@ -2727,7 +2727,7 @@ int ha_repl_report_sent_binlog(THD *thd, char *log_file_name, ...@@ -2727,7 +2727,7 @@ int ha_repl_report_sent_binlog(THD *thd, char *log_file_name,
Does nothing at the moment Does nothing at the moment
RETURN VALUE RETURN VALUE
Always 0 (= success) Always 0 (= success)
PARAMETERS PARAMETERS
*/ */
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
Index scan will not return records in rowid order. Not guaranteed to be Index scan will not return records in rowid order. Not guaranteed to be
set for unordered (e.g. HASH) indexes. set for unordered (e.g. HASH) indexes.
*/ */
#define HA_KEY_SCAN_NOT_ROR 128 #define HA_KEY_SCAN_NOT_ROR 128
/* operations for disable/enable indexes */ /* operations for disable/enable indexes */
...@@ -231,7 +231,7 @@ struct xid_t { ...@@ -231,7 +231,7 @@ struct xid_t {
long bqual_length; long bqual_length;
char data[XIDDATASIZE]; // not \0-terminated ! char data[XIDDATASIZE]; // not \0-terminated !
xid_t() {} /* Remove gcc warning */ xid_t() {} /* Remove gcc warning */
bool eq(struct xid_t *xid) bool eq(struct xid_t *xid)
{ return eq(xid->gtrid_length, xid->bqual_length, xid->data); } { return eq(xid->gtrid_length, xid->bqual_length, xid->data); }
bool eq(long g, long b, const char *d) bool eq(long g, long b, const char *d)
...@@ -319,7 +319,7 @@ typedef struct ...@@ -319,7 +319,7 @@ typedef struct
const char *name; const char *name;
/* /*
Historical marker for if the engine is available of not Historical marker for if the engine is available of not
*/ */
SHOW_COMP_OPTION state; SHOW_COMP_OPTION state;
...@@ -333,7 +333,7 @@ typedef struct ...@@ -333,7 +333,7 @@ typedef struct
This is going away and new engines will just use "name" for this. This is going away and new engines will just use "name" for this.
*/ */
enum db_type db_type; enum db_type db_type;
/* /*
Method that initizlizes a storage engine Method that initizlizes a storage engine
*/ */
bool (*init)(); bool (*init)();
...@@ -573,7 +573,7 @@ class handler :public Sql_alloc ...@@ -573,7 +573,7 @@ class handler :public Sql_alloc
virtual const key_map *keys_to_use_for_scanning() { return &key_map_empty; } virtual const key_map *keys_to_use_for_scanning() { return &key_map_empty; }
virtual bool has_transactions(){ return 0;} virtual bool has_transactions(){ return 0;}
virtual uint extra_rec_buf_length() { return 0; } virtual uint extra_rec_buf_length() { return 0; }
/* /*
Return upper bound of current number of records in the table Return upper bound of current number of records in the table
(max. of how many records one will retrieve when doing a full table scan) (max. of how many records one will retrieve when doing a full table scan)
...@@ -726,7 +726,7 @@ class handler :public Sql_alloc ...@@ -726,7 +726,7 @@ class handler :public Sql_alloc
int check_old_types(); int check_old_types();
/* to be actually called to get 'check()' functionality*/ /* to be actually called to get 'check()' functionality*/
int ha_check(THD *thd, HA_CHECK_OPT *check_opt); int ha_check(THD *thd, HA_CHECK_OPT *check_opt);
virtual int backup(THD* thd, HA_CHECK_OPT* check_opt) virtual int backup(THD* thd, HA_CHECK_OPT* check_opt)
{ return HA_ADMIN_NOT_IMPLEMENTED; } { return HA_ADMIN_NOT_IMPLEMENTED; }
/* /*
...@@ -815,7 +815,7 @@ class handler :public Sql_alloc ...@@ -815,7 +815,7 @@ class handler :public Sql_alloc
*/ */
virtual int rename_table(const char *from, const char *to); virtual int rename_table(const char *from, const char *to);
virtual int delete_table(const char *name); virtual int delete_table(const char *name);
virtual int create(const char *name, TABLE *form, HA_CREATE_INFO *info)=0; virtual int create(const char *name, TABLE *form, HA_CREATE_INFO *info)=0;
/* lock_count() can be more than one if the table is a MERGE */ /* lock_count() can be more than one if the table is a MERGE */
...@@ -829,7 +829,7 @@ class handler :public Sql_alloc ...@@ -829,7 +829,7 @@ class handler :public Sql_alloc
/* ask handler about permission to cache table when query is to be cached */ /* ask handler about permission to cache table when query is to be cached */
virtual my_bool register_query_cache_table(THD *thd, char *table_key, virtual my_bool register_query_cache_table(THD *thd, char *table_key,
uint key_length, uint key_length,
qc_engine_callback qc_engine_callback
*engine_callback, *engine_callback,
ulonglong *engine_data) ulonglong *engine_data)
{ {
...@@ -847,7 +847,7 @@ class handler :public Sql_alloc ...@@ -847,7 +847,7 @@ class handler :public Sql_alloc
{ {
return memcmp(ref1, ref2, ref_length); return memcmp(ref1, ref2, ref_length);
} }
/* /*
Condition pushdown to storage engines Condition pushdown to storage engines
*/ */
...@@ -856,7 +856,7 @@ class handler :public Sql_alloc ...@@ -856,7 +856,7 @@ class handler :public Sql_alloc
Push condition down to the table handler. Push condition down to the table handler.
SYNOPSIS SYNOPSIS
cond_push() cond_push()
cond Condition to be pushed. The condition tree must not be cond Condition to be pushed. The condition tree must not be
modified by the by the caller. modified by the by the caller.
RETURN RETURN
The 'remainder' condition that caller must use to filter out records. The 'remainder' condition that caller must use to filter out records.
...@@ -865,14 +865,14 @@ class handler :public Sql_alloc ...@@ -865,14 +865,14 @@ class handler :public Sql_alloc
NOTES NOTES
The pushed conditions form a stack (from which one can remove the The pushed conditions form a stack (from which one can remove the
last pushed condition using cond_pop). last pushed condition using cond_pop).
The table handler filters out rows using (pushed_cond1 AND pushed_cond2 The table handler filters out rows using (pushed_cond1 AND pushed_cond2
AND ... AND pushed_condN) AND ... AND pushed_condN)
or less restrictive condition, depending on handler's capabilities. or less restrictive condition, depending on handler's capabilities.
handler->extra(HA_EXTRA_RESET) call empties the condition stack. handler->extra(HA_EXTRA_RESET) call empties the condition stack.
Calls to rnd_init/rnd_end, index_init/index_end etc do not affect the Calls to rnd_init/rnd_end, index_init/index_end etc do not affect the
condition stack. condition stack.
*/ */
virtual const COND *cond_push(const COND *cond) { return cond; }; virtual const COND *cond_push(const COND *cond) { return cond; };
/* /*
Pop the top condition from the condition stack of the handler instance. Pop the top condition from the condition stack of the handler instance.
......
This diff is collapsed.
...@@ -205,7 +205,7 @@ sys_var_bool_ptr sys_local_infile("local_infile", ...@@ -205,7 +205,7 @@ sys_var_bool_ptr sys_local_infile("local_infile",
sys_var_trust_routine_creators sys_var_trust_routine_creators
sys_trust_routine_creators("log_bin_trust_routine_creators", sys_trust_routine_creators("log_bin_trust_routine_creators",
&trust_function_creators); &trust_function_creators);
sys_var_bool_ptr sys_var_bool_ptr
sys_trust_function_creators("log_bin_trust_function_creators", sys_trust_function_creators("log_bin_trust_function_creators",
&trust_function_creators); &trust_function_creators);
sys_var_thd_ulong sys_log_warnings("log_warnings", &SV::log_warnings); sys_var_thd_ulong sys_log_warnings("log_warnings", &SV::log_warnings);
...@@ -742,7 +742,7 @@ sys_var *sys_variables[]= ...@@ -742,7 +742,7 @@ sys_var *sys_variables[]=
&sys_innodb_thread_concurrency, &sys_innodb_thread_concurrency,
&sys_innodb_commit_concurrency, &sys_innodb_commit_concurrency,
&sys_innodb_flush_log_at_trx_commit, &sys_innodb_flush_log_at_trx_commit,
#endif #endif
&sys_trust_routine_creators, &sys_trust_routine_creators,
&sys_trust_function_creators, &sys_trust_function_creators,
&sys_engine_condition_pushdown, &sys_engine_condition_pushdown,
...@@ -803,7 +803,7 @@ struct show_var_st init_vars[]= { ...@@ -803,7 +803,7 @@ struct show_var_st init_vars[]= {
{sys_delayed_insert_timeout.name, (char*) &sys_delayed_insert_timeout, SHOW_SYS}, {sys_delayed_insert_timeout.name, (char*) &sys_delayed_insert_timeout, SHOW_SYS},
{sys_delayed_queue_size.name,(char*) &sys_delayed_queue_size, SHOW_SYS}, {sys_delayed_queue_size.name,(char*) &sys_delayed_queue_size, SHOW_SYS},
{sys_div_precincrement.name,(char*) &sys_div_precincrement,SHOW_SYS}, {sys_div_precincrement.name,(char*) &sys_div_precincrement,SHOW_SYS},
{sys_engine_condition_pushdown.name, {sys_engine_condition_pushdown.name,
(char*) &sys_engine_condition_pushdown, SHOW_SYS}, (char*) &sys_engine_condition_pushdown, SHOW_SYS},
{sys_expire_logs_days.name, (char*) &sys_expire_logs_days, SHOW_SYS}, {sys_expire_logs_days.name, (char*) &sys_expire_logs_days, SHOW_SYS},
{sys_flush.name, (char*) &sys_flush, SHOW_SYS}, {sys_flush.name, (char*) &sys_flush, SHOW_SYS},
...@@ -931,9 +931,9 @@ struct show_var_st init_vars[]= { ...@@ -931,9 +931,9 @@ struct show_var_st init_vars[]= {
{sys_myisam_repair_threads.name, (char*) &sys_myisam_repair_threads, {sys_myisam_repair_threads.name, (char*) &sys_myisam_repair_threads,
SHOW_SYS}, SHOW_SYS},
{sys_myisam_sort_buffer_size.name, (char*) &sys_myisam_sort_buffer_size, SHOW_SYS}, {sys_myisam_sort_buffer_size.name, (char*) &sys_myisam_sort_buffer_size, SHOW_SYS},
{sys_myisam_stats_method.name, (char*) &sys_myisam_stats_method, SHOW_SYS}, {sys_myisam_stats_method.name, (char*) &sys_myisam_stats_method, SHOW_SYS},
#ifdef __NT__ #ifdef __NT__
{"named_pipe", (char*) &opt_enable_named_pipe, SHOW_MY_BOOL}, {"named_pipe", (char*) &opt_enable_named_pipe, SHOW_MY_BOOL},
#endif #endif
...@@ -1204,7 +1204,7 @@ static void fix_tx_isolation(THD *thd, enum_var_type type) ...@@ -1204,7 +1204,7 @@ static void fix_tx_isolation(THD *thd, enum_var_type type)
thd->variables.tx_isolation); thd->variables.tx_isolation);
} }
static void fix_completion_type(THD *thd __attribute__(unused), static void fix_completion_type(THD *thd __attribute__(unused),
enum_var_type type __attribute__(unused)) {} enum_var_type type __attribute__(unused)) {}
static int check_completion_type(THD *thd, set_var *var) static int check_completion_type(THD *thd, set_var *var)
...@@ -1272,7 +1272,7 @@ static void fix_query_cache_size(THD *thd, enum_var_type type) ...@@ -1272,7 +1272,7 @@ static void fix_query_cache_size(THD *thd, enum_var_type type)
#ifdef HAVE_QUERY_CACHE #ifdef HAVE_QUERY_CACHE
static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type) static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type)
{ {
query_cache_min_res_unit= query_cache_min_res_unit=
query_cache.set_min_res_unit(query_cache_min_res_unit); query_cache.set_min_res_unit(query_cache_min_res_unit);
} }
#endif #endif
...@@ -1336,7 +1336,7 @@ static int check_max_delayed_threads(THD *thd, set_var *var) ...@@ -1336,7 +1336,7 @@ static int check_max_delayed_threads(THD *thd, set_var *var)
static void fix_max_connections(THD *thd, enum_var_type type) static void fix_max_connections(THD *thd, enum_var_type type)
{ {
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
resize_thr_alarm(max_connections + resize_thr_alarm(max_connections +
global_system_variables.max_insert_delayed_threads + 10); global_system_variables.max_insert_delayed_threads + 10);
#endif #endif
} }
...@@ -1514,7 +1514,7 @@ bool sys_var_thd_ha_rows::update(THD *thd, set_var *var) ...@@ -1514,7 +1514,7 @@ bool sys_var_thd_ha_rows::update(THD *thd, set_var *var)
if (var->type == OPT_GLOBAL) if (var->type == OPT_GLOBAL)
{ {
/* Lock is needed to make things safe on 32 bit systems */ /* Lock is needed to make things safe on 32 bit systems */
pthread_mutex_lock(&LOCK_global_system_variables); pthread_mutex_lock(&LOCK_global_system_variables);
global_system_variables.*offset= (ha_rows) tmp; global_system_variables.*offset= (ha_rows) tmp;
pthread_mutex_unlock(&LOCK_global_system_variables); pthread_mutex_unlock(&LOCK_global_system_variables);
} }
...@@ -1888,7 +1888,7 @@ bool sys_var_thd_date_time_format::check(THD *thd, set_var *var) ...@@ -1888,7 +1888,7 @@ bool sys_var_thd_date_time_format::check(THD *thd, set_var *var)
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, res->c_ptr()); my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, res->c_ptr());
return 1; return 1;
} }
/* /*
We must copy result to thread space to not get a memory leak if We must copy result to thread space to not get a memory leak if
update is aborted update is aborted
...@@ -1945,7 +1945,7 @@ typedef struct old_names_map_st ...@@ -1945,7 +1945,7 @@ typedef struct old_names_map_st
const char *new_name; const char *new_name;
} my_old_conv; } my_old_conv;
static my_old_conv old_conv[]= static my_old_conv old_conv[]=
{ {
{ "cp1251_koi8" , "cp1251" }, { "cp1251_koi8" , "cp1251" },
{ "cp1250_latin2" , "cp1250" }, { "cp1250_latin2" , "cp1250" },
...@@ -1963,7 +1963,7 @@ static my_old_conv old_conv[]= ...@@ -1963,7 +1963,7 @@ static my_old_conv old_conv[]=
CHARSET_INFO *get_old_charset_by_name(const char *name) CHARSET_INFO *get_old_charset_by_name(const char *name)
{ {
my_old_conv *conv; my_old_conv *conv;
for (conv= old_conv; conv->old_name; conv++) for (conv= old_conv; conv->old_name; conv++)
{ {
if (!my_strcasecmp(&my_charset_latin1, name, conv->old_name)) if (!my_strcasecmp(&my_charset_latin1, name, conv->old_name))
...@@ -2344,7 +2344,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var) ...@@ -2344,7 +2344,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
pthread_mutex_lock(&LOCK_global_system_variables); pthread_mutex_lock(&LOCK_global_system_variables);
key_cache= get_key_cache(base_name); key_cache= get_key_cache(base_name);
if (!key_cache) if (!key_cache)
{ {
/* Key cache didn't exists */ /* Key cache didn't exists */
...@@ -2381,7 +2381,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var) ...@@ -2381,7 +2381,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
Move tables using this key cache to the default key cache Move tables using this key cache to the default key cache
and clear the old key cache. and clear the old key cache.
*/ */
NAMED_LIST *list; NAMED_LIST *list;
key_cache= (KEY_CACHE *) find_named(&key_caches, base_name->str, key_cache= (KEY_CACHE *) find_named(&key_caches, base_name->str,
base_name->length, &list); base_name->length, &list);
key_cache->in_init= 1; key_cache->in_init= 1;
...@@ -2410,7 +2410,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var) ...@@ -2410,7 +2410,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
error= (bool)(ha_resize_key_cache(key_cache)); error= (bool)(ha_resize_key_cache(key_cache));
pthread_mutex_lock(&LOCK_global_system_variables); pthread_mutex_lock(&LOCK_global_system_variables);
key_cache->in_init= 0; key_cache->in_init= 0;
end: end:
pthread_mutex_unlock(&LOCK_global_system_variables); pthread_mutex_unlock(&LOCK_global_system_variables);
...@@ -2459,7 +2459,7 @@ bool sys_var_key_cache_long::update(THD *thd, set_var *var) ...@@ -2459,7 +2459,7 @@ bool sys_var_key_cache_long::update(THD *thd, set_var *var)
error= (bool) (ha_resize_key_cache(key_cache)); error= (bool) (ha_resize_key_cache(key_cache));
pthread_mutex_lock(&LOCK_global_system_variables); pthread_mutex_lock(&LOCK_global_system_variables);
key_cache->in_init= 0; key_cache->in_init= 0;
end: end:
pthread_mutex_unlock(&LOCK_global_system_variables); pthread_mutex_unlock(&LOCK_global_system_variables);
...@@ -2632,7 +2632,7 @@ bool sys_var_thd_time_zone::update(THD *thd, set_var *var) ...@@ -2632,7 +2632,7 @@ bool sys_var_thd_time_zone::update(THD *thd, set_var *var)
byte *sys_var_thd_time_zone::value_ptr(THD *thd, enum_var_type type, byte *sys_var_thd_time_zone::value_ptr(THD *thd, enum_var_type type,
LEX_STRING *base) LEX_STRING *base)
{ {
/* /*
We can use ptr() instead of c_ptr() here because String contaning We can use ptr() instead of c_ptr() here because String contaning
time zone name is guaranteed to be zero ended. time zone name is guaranteed to be zero ended.
*/ */
...@@ -2786,7 +2786,7 @@ static bool set_log_update(THD *thd, set_var *var) ...@@ -2786,7 +2786,7 @@ static bool set_log_update(THD *thd, set_var *var)
See sql/mysqld.cc/, comments in function init_server_components() for an See sql/mysqld.cc/, comments in function init_server_components() for an
explaination of the different warnings we send below explaination of the different warnings we send below
*/ */
if (opt_sql_bin_update) if (opt_sql_bin_update)
{ {
((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG | ((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG |
...@@ -2838,7 +2838,7 @@ static byte *get_warning_count(THD *thd) ...@@ -2838,7 +2838,7 @@ static byte *get_warning_count(THD *thd)
static byte *get_error_count(THD *thd) static byte *get_error_count(THD *thd)
{ {
thd->sys_var_tmp.long_value= thd->sys_var_tmp.long_value=
thd->warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_ERROR]; thd->warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_ERROR];
return (byte*) &thd->sys_var_tmp.long_value; return (byte*) &thd->sys_var_tmp.long_value;
} }
...@@ -2878,7 +2878,7 @@ static byte *get_prepared_stmt_count(THD *thd) ...@@ -2878,7 +2878,7 @@ static byte *get_prepared_stmt_count(THD *thd)
ptr pointer to option structure ptr pointer to option structure
*/ */
static struct my_option *find_option(struct my_option *opt, const char *name) static struct my_option *find_option(struct my_option *opt, const char *name)
{ {
uint length=strlen(name); uint length=strlen(name);
for (; opt->name; opt++) for (; opt->name; opt++)
...@@ -3286,7 +3286,7 @@ void sys_var_thd_table_type::warn_deprecated(THD *thd) ...@@ -3286,7 +3286,7 @@ void sys_var_thd_table_type::warn_deprecated(THD *thd)
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX, ER_WARN_DEPRECATED_SYNTAX,
ER(ER_WARN_DEPRECATED_SYNTAX), "table_type", ER(ER_WARN_DEPRECATED_SYNTAX), "table_type",
"storage_engine"); "storage_engine");
} }
void sys_var_thd_table_type::set_default(THD *thd, enum_var_type type) void sys_var_thd_table_type::set_default(THD *thd, enum_var_type type)
...@@ -3385,7 +3385,7 @@ void fix_sql_mode_var(THD *thd, enum_var_type type) ...@@ -3385,7 +3385,7 @@ void fix_sql_mode_var(THD *thd, enum_var_type type)
ulong fix_sql_mode(ulong sql_mode) ulong fix_sql_mode(ulong sql_mode)
{ {
/* /*
Note that we dont set Note that we dont set
MODE_NO_KEY_OPTIONS | MODE_NO_TABLE_OPTIONS | MODE_NO_FIELD_OPTIONS MODE_NO_KEY_OPTIONS | MODE_NO_TABLE_OPTIONS | MODE_NO_FIELD_OPTIONS
to allow one to get full use of MySQL in this mode. to allow one to get full use of MySQL in this mode.
*/ */
...@@ -3394,7 +3394,7 @@ ulong fix_sql_mode(ulong sql_mode) ...@@ -3394,7 +3394,7 @@ ulong fix_sql_mode(ulong sql_mode)
{ {
sql_mode|= (MODE_REAL_AS_FLOAT | MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES | sql_mode|= (MODE_REAL_AS_FLOAT | MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES |
MODE_IGNORE_SPACE); MODE_IGNORE_SPACE);
/* /*
MODE_ONLY_FULL_GROUP_BY removed from ANSI mode because it is currently MODE_ONLY_FULL_GROUP_BY removed from ANSI mode because it is currently
overly restrictive (see BUG#8510). overly restrictive (see BUG#8510).
*/ */
...@@ -3479,7 +3479,7 @@ static KEY_CACHE *create_key_cache(const char *name, uint length) ...@@ -3479,7 +3479,7 @@ static KEY_CACHE *create_key_cache(const char *name, uint length)
KEY_CACHE *key_cache; KEY_CACHE *key_cache;
DBUG_ENTER("create_key_cache"); DBUG_ENTER("create_key_cache");
DBUG_PRINT("enter",("name: %.*s", length, name)); DBUG_PRINT("enter",("name: %.*s", length, name));
if ((key_cache= (KEY_CACHE*) my_malloc(sizeof(KEY_CACHE), if ((key_cache= (KEY_CACHE*) my_malloc(sizeof(KEY_CACHE),
MYF(MY_ZEROFILL | MY_WME)))) MYF(MY_ZEROFILL | MY_WME))))
{ {
...@@ -3546,7 +3546,7 @@ void sys_var_trust_routine_creators::warn_deprecated(THD *thd) ...@@ -3546,7 +3546,7 @@ void sys_var_trust_routine_creators::warn_deprecated(THD *thd)
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX, ER_WARN_DEPRECATED_SYNTAX,
ER(ER_WARN_DEPRECATED_SYNTAX), "log_bin_trust_routine_creators", ER(ER_WARN_DEPRECATED_SYNTAX), "log_bin_trust_routine_creators",
"log_bin_trust_function_creators"); "log_bin_trust_function_creators");
} }
void sys_var_trust_routine_creators::set_default(THD *thd, enum_var_type type) void sys_var_trust_routine_creators::set_default(THD *thd, enum_var_type type)
......
...@@ -755,7 +755,7 @@ class Server_side_cursor; ...@@ -755,7 +755,7 @@ class Server_side_cursor;
- prepared, that is, contain placeholders, - prepared, that is, contain placeholders,
- opened as cursors. We maintain 1 to 1 relationship between - opened as cursors. We maintain 1 to 1 relationship between
statement and cursor - if user wants to create another cursor for his statement and cursor - if user wants to create another cursor for his
query, we create another statement for it. query, we create another statement for it.
To perform some action with statement we reset THD part to the state of To perform some action with statement we reset THD part to the state of
that statement, do the action, and then save back modified state from THD that statement, do the action, and then save back modified state from THD
to the statement. It will be changed in near future, and Statement will to the statement. It will be changed in near future, and Statement will
...@@ -778,7 +778,7 @@ class Statement: public ilink, public Query_arena ...@@ -778,7 +778,7 @@ class Statement: public ilink, public Query_arena
ulong id; ulong id;
/* /*
- if set_query_id=1, we set field->query_id for all fields. In that case - if set_query_id=1, we set field->query_id for all fields. In that case
field list can not contain duplicates. field list can not contain duplicates.
*/ */
bool set_query_id; bool set_query_id;
...@@ -803,7 +803,7 @@ class Statement: public ilink, public Query_arena ...@@ -803,7 +803,7 @@ class Statement: public ilink, public Query_arena
it. We will see the query_length field as either 0, or the right value it. We will see the query_length field as either 0, or the right value
for it. for it.
Assuming that the write and read of an n-bit memory field in an n-bit Assuming that the write and read of an n-bit memory field in an n-bit
computer is atomic, we can avoid races in the above way. computer is atomic, we can avoid races in the above way.
This printing is needed at least in SHOW PROCESSLIST and SHOW INNODB This printing is needed at least in SHOW PROCESSLIST and SHOW INNODB
STATUS. STATUS.
*/ */
...@@ -1152,7 +1152,7 @@ class THD :public Statement, ...@@ -1152,7 +1152,7 @@ class THD :public Statement,
/* /*
One thread can hold up to one named user-level lock. This variable One thread can hold up to one named user-level lock. This variable
points to a lock object if the lock is present. See item_func.cc and points to a lock object if the lock is present. See item_func.cc and
chapter 'Miscellaneous functions', for functions GET_LOCK, RELEASE_LOCK. chapter 'Miscellaneous functions', for functions GET_LOCK, RELEASE_LOCK.
*/ */
User_level_lock *ull; User_level_lock *ull;
#ifndef DBUG_OFF #ifndef DBUG_OFF
...@@ -1355,10 +1355,10 @@ class THD :public Statement, ...@@ -1355,10 +1355,10 @@ class THD :public Statement,
long long_value; long long_value;
ulong ulong_value; ulong ulong_value;
} sys_var_tmp; } sys_var_tmp;
struct { struct {
/* /*
If true, mysql_bin_log::write(Log_event) call will not write events to If true, mysql_bin_log::write(Log_event) call will not write events to
binlog, and maintain 2 below variables instead (use binlog, and maintain 2 below variables instead (use
mysql_bin_log.start_union_events to turn this on) mysql_bin_log.start_union_events to turn this on)
*/ */
...@@ -1369,19 +1369,19 @@ class THD :public Statement, ...@@ -1369,19 +1369,19 @@ class THD :public Statement,
*/ */
bool unioned_events; bool unioned_events;
/* /*
If TRUE, at least one mysql_bin_log::write(Log_event e), where If TRUE, at least one mysql_bin_log::write(Log_event e), where
e.cache_stmt == TRUE call has been made after last e.cache_stmt == TRUE call has been made after last
mysql_bin_log.start_union_events() call. mysql_bin_log.start_union_events() call.
*/ */
bool unioned_events_trans; bool unioned_events_trans;
/* /*
'queries' (actually SP statements) that run under inside this binlog 'queries' (actually SP statements) that run under inside this binlog
union have thd->query_id >= first_query_id. union have thd->query_id >= first_query_id.
*/ */
query_id_t first_query_id; query_id_t first_query_id;
} binlog_evt_union; } binlog_evt_union;
THD(); THD();
~THD(); ~THD();
...@@ -1393,7 +1393,7 @@ class THD :public Statement, ...@@ -1393,7 +1393,7 @@ class THD :public Statement,
killing mysqld) where it's vital to not allocate excessive and not used killing mysqld) where it's vital to not allocate excessive and not used
memory. Note, that we still don't return error from init_for_queries(): memory. Note, that we still don't return error from init_for_queries():
if preallocation fails, we should notice that at the first call to if preallocation fails, we should notice that at the first call to
alloc_root. alloc_root.
*/ */
void init_for_queries(); void init_for_queries();
void change_user(void); void change_user(void);
...@@ -1589,7 +1589,7 @@ class THD :public Statement, ...@@ -1589,7 +1589,7 @@ class THD :public Statement,
#define SYSTEM_THREAD_SLAVE_SQL 4 #define SYSTEM_THREAD_SLAVE_SQL 4
/* /*
Used to hold information about file and file structure in exchainge Used to hold information about file and file structure in exchainge
via non-DB file (...INTO OUTFILE..., ...LOAD DATA...) via non-DB file (...INTO OUTFILE..., ...LOAD DATA...)
XXX: We never call destructor for objects of this class. XXX: We never call destructor for objects of this class.
*/ */
...@@ -1771,8 +1771,8 @@ class select_create: public select_insert { ...@@ -1771,8 +1771,8 @@ class select_create: public select_insert {
#include <myisam.h> #include <myisam.h>
/* /*
Param to create temporary tables when doing SELECT:s Param to create temporary tables when doing SELECT:s
NOTE NOTE
This structure is copied using memcpy as a part of JOIN. This structure is copied using memcpy as a part of JOIN.
*/ */
...@@ -1800,8 +1800,8 @@ class TMP_TABLE_PARAM :public Sql_alloc ...@@ -1800,8 +1800,8 @@ class TMP_TABLE_PARAM :public Sql_alloc
uint quick_group; uint quick_group;
bool using_indirect_summary_function; bool using_indirect_summary_function;
/* If >0 convert all blob fields to varchar(convert_blob_length) */ /* If >0 convert all blob fields to varchar(convert_blob_length) */
uint convert_blob_length; uint convert_blob_length;
CHARSET_INFO *table_charset; CHARSET_INFO *table_charset;
bool schema_table; bool schema_table;
/* /*
True if GROUP BY and its aggregate functions are already computed True if GROUP BY and its aggregate functions are already computed
...@@ -1932,12 +1932,12 @@ class Table_ident :public Sql_alloc ...@@ -1932,12 +1932,12 @@ class Table_ident :public Sql_alloc
else else
db= db_arg; db= db_arg;
} }
inline Table_ident(LEX_STRING table_arg) inline Table_ident(LEX_STRING table_arg)
:table(table_arg), sel((SELECT_LEX_UNIT *)0) :table(table_arg), sel((SELECT_LEX_UNIT *)0)
{ {
db.str=0; db.str=0;
} }
inline Table_ident(SELECT_LEX_UNIT *s) : sel(s) inline Table_ident(SELECT_LEX_UNIT *s) : sel(s)
{ {
/* We must have a table name here as this is used with add_table_to_list */ /* We must have a table name here as this is used with add_table_to_list */
db.str=0; table.str= internal_table_name; table.length=1; db.str=0; table.str= internal_table_name; table.length=1;
...@@ -1967,7 +1967,7 @@ class user_var_entry ...@@ -1967,7 +1967,7 @@ class user_var_entry
}; };
/* /*
Unique -- class for unique (removing of duplicates). Unique -- class for unique (removing of duplicates).
Puts all values to the TREE. If the tree becomes too big, Puts all values to the TREE. If the tree becomes too big,
it's dumped to the file. User can request sorted values, or it's dumped to the file. User can request sorted values, or
just iterate through them. In the last case tree merging is performed in just iterate through them. In the last case tree merging is performed in
...@@ -2000,12 +2000,12 @@ class Unique :public Sql_alloc ...@@ -2000,12 +2000,12 @@ class Unique :public Sql_alloc
} }
bool get(TABLE *table); bool get(TABLE *table);
static double get_use_cost(uint *buffer, uint nkeys, uint key_size, static double get_use_cost(uint *buffer, uint nkeys, uint key_size,
ulong max_in_memory_size); ulong max_in_memory_size);
inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size, inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size,
ulong max_in_memory_size) ulong max_in_memory_size)
{ {
register ulong max_elems_in_tree= register ulong max_elems_in_tree=
(1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size)); (1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
return sizeof(uint)*(1 + nkeys/max_elems_in_tree); return sizeof(uint)*(1 + nkeys/max_elems_in_tree);
} }
......
...@@ -705,7 +705,7 @@ impossible position"; ...@@ -705,7 +705,7 @@ impossible position";
if (loop_breaker) if (loop_breaker)
break; break;
end_io_cache(&log); end_io_cache(&log);
(void) my_close(file, MYF(MY_WME)); (void) my_close(file, MYF(MY_WME));
...@@ -854,7 +854,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report) ...@@ -854,7 +854,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
/* Issuing warning then started without --skip-slave-start */ /* Issuing warning then started without --skip-slave-start */
if (!opt_skip_slave_start) if (!opt_skip_slave_start)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_MISSING_SKIP_SLAVE, ER_MISSING_SKIP_SLAVE,
ER(ER_MISSING_SKIP_SLAVE)); ER(ER_MISSING_SKIP_SLAVE));
} }
...@@ -880,7 +880,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report) ...@@ -880,7 +880,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_SLAVE_WAS_RUNNING, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_SLAVE_WAS_RUNNING,
ER(ER_SLAVE_WAS_RUNNING)); ER(ER_SLAVE_WAS_RUNNING));
} }
unlock_slave_threads(mi); unlock_slave_threads(mi);
if (slave_errno) if (slave_errno)
...@@ -1040,7 +1040,7 @@ int reset_slave(THD *thd, MASTER_INFO* mi) ...@@ -1040,7 +1040,7 @@ int reset_slave(THD *thd, MASTER_INFO* mi)
slave_server_id the slave's server id slave_server_id the slave's server id
*/ */
void kill_zombie_dump_threads(uint32 slave_server_id) void kill_zombie_dump_threads(uint32 slave_server_id)
{ {
...@@ -1105,9 +1105,9 @@ bool change_master(THD* thd, MASTER_INFO* mi) ...@@ -1105,9 +1105,9 @@ bool change_master(THD* thd, MASTER_INFO* mi)
*/ */
/* /*
If the user specified host or port without binlog or position, If the user specified host or port without binlog or position,
reset binlog's name to FIRST and position to 4. reset binlog's name to FIRST and position to 4.
*/ */
if ((lex_mi->host || lex_mi->port) && !lex_mi->log_file_name && !lex_mi->pos) if ((lex_mi->host || lex_mi->port) && !lex_mi->log_file_name && !lex_mi->pos)
{ {
...@@ -1134,7 +1134,7 @@ bool change_master(THD* thd, MASTER_INFO* mi) ...@@ -1134,7 +1134,7 @@ bool change_master(THD* thd, MASTER_INFO* mi)
mi->port = lex_mi->port; mi->port = lex_mi->port;
if (lex_mi->connect_retry) if (lex_mi->connect_retry)
mi->connect_retry = lex_mi->connect_retry; mi->connect_retry = lex_mi->connect_retry;
if (lex_mi->ssl != LEX_MASTER_INFO::SSL_UNCHANGED) if (lex_mi->ssl != LEX_MASTER_INFO::SSL_UNCHANGED)
mi->ssl= (lex_mi->ssl == LEX_MASTER_INFO::SSL_ENABLE); mi->ssl= (lex_mi->ssl == LEX_MASTER_INFO::SSL_ENABLE);
if (lex_mi->ssl_ca) if (lex_mi->ssl_ca)
...@@ -1150,7 +1150,7 @@ bool change_master(THD* thd, MASTER_INFO* mi) ...@@ -1150,7 +1150,7 @@ bool change_master(THD* thd, MASTER_INFO* mi)
#ifndef HAVE_OPENSSL #ifndef HAVE_OPENSSL
if (lex_mi->ssl || lex_mi->ssl_ca || lex_mi->ssl_capath || if (lex_mi->ssl || lex_mi->ssl_ca || lex_mi->ssl_capath ||
lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key ) lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key )
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_SLAVE_IGNORED_SSL_PARAMS, ER(ER_SLAVE_IGNORED_SSL_PARAMS)); ER_SLAVE_IGNORED_SSL_PARAMS, ER(ER_SLAVE_IGNORED_SSL_PARAMS));
#endif #endif
...@@ -1510,7 +1510,7 @@ bool show_binlogs(THD* thd) ...@@ -1510,7 +1510,7 @@ bool show_binlogs(THD* thd)
} }
field_list.push_back(new Item_empty_string("Log_name", 255)); field_list.push_back(new Item_empty_string("Log_name", 255));
field_list.push_back(new Item_return_int("File_size", 20, field_list.push_back(new Item_return_int("File_size", 20,
MYSQL_TYPE_LONGLONG)); MYSQL_TYPE_LONGLONG));
if (protocol->send_fields(&field_list, if (protocol->send_fields(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
......
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