Commit b2cd3a96 authored by grog@mysql.com[grog]'s avatar grog@mysql.com[grog]

foo1

parent 316eeff6
This diff is collapsed.
......@@ -165,15 +165,15 @@ class ha_innobase: public handler
int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
bool can_switch_engines();
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,
enum thr_lock_type lock_type);
void init_table_handle_for_HANDLER();
void init_table_handle_for_HANDLER();
ulonglong get_auto_increment();
int reset_auto_increment(ulonglong value);
virtual bool get_error_message(int error, String *buf);
uint8 table_cache_type() { return HA_CACHE_TBL_ASKTRANSACT; }
/*
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 */
int innobase_xa_recover(
/*====================*/
/* out: number of prepared transactions
/* out: number of prepared transactions
stored in xid_list */
XID* xid_list, /* in/out: prepared transactions */
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,
/***********************************************************************
Create a consistent view for a cursor based on current transaction
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. */
void*
......@@ -319,7 +319,7 @@ innobase_create_cursor_view(void);
/***********************************************************************
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. */
void
......@@ -328,8 +328,8 @@ innobase_close_cursor_view(
void* curview); /* in: Consistent read view to be closed */
/***********************************************************************
Set the given consistent cursor view to a transaction which is created
if the corresponding MySQL thread still lacks one. If the given
Set the given consistent cursor view to a transaction which is created
if the corresponding MySQL thread still lacks one. If the given
consistent cursor view is NULL global read view of a transaction is
restored to a transaction read view. */
......
......@@ -35,9 +35,9 @@
#include "ha_berkeley.h"
extern handlerton berkeley_hton;
#else
handlerton berkeley_hton = { "BerkeleyDB", SHOW_OPTION_NO,
"Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB, NULL,
0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
handlerton berkeley_hton = { "BerkeleyDB", SHOW_OPTION_NO,
"Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB, NULL,
0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, HTON_NO_FLAGS };
#endif
#ifdef HAVE_BLACKHOLE_DB
......@@ -46,8 +46,8 @@ extern handlerton blackhole_hton;
#else
handlerton blackhole_hton = { "BLACKHOLE", SHOW_OPTION_NO,
"/dev/null storage engine (anything you write to it disappears)",
DB_TYPE_BLACKHOLE_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
DB_TYPE_BLACKHOLE_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_EXAMPLE_DB
......@@ -55,9 +55,9 @@ handlerton blackhole_hton = { "BLACKHOLE", SHOW_OPTION_NO,
extern handlerton example_hton;
#else
handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO,
"Example storage engine",
DB_TYPE_EXAMPLE_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"Example storage engine",
DB_TYPE_EXAMPLE_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#if defined(HAVE_ARCHIVE_DB)
......@@ -65,17 +65,17 @@ handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO,
extern handlerton archive_hton;
#else
handlerton archive_hton = { "ARCHIVE", SHOW_OPTION_NO,
"Archive storage engine", DB_TYPE_ARCHIVE_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 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,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_CSV_DB
#include "examples/ha_tina.h"
extern handlerton tina_hton;
#else
handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine",
DB_TYPE_CSV_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine",
DB_TYPE_CSV_DB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_INNOBASE_DB
......@@ -83,9 +83,9 @@ handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine",
extern handlerton innobase_hton;
#else
handlerton innobase_hton = { "InnoDB", SHOW_OPTION_NO,
"Supports transactions, row-level locking, and foreign keys",
DB_TYPE_INNODB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"Supports transactions, row-level locking, and foreign keys",
DB_TYPE_INNODB, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_NDBCLUSTER_DB
......@@ -93,18 +93,18 @@ handlerton innobase_hton = { "InnoDB", SHOW_OPTION_NO,
extern handlerton ndbcluster_hton;
#else
handlerton ndbcluster_hton = { "ndbcluster", SHOW_OPTION_NO,
"Clustered, fault-tolerant, memory-based tables",
DB_TYPE_NDBCLUSTER, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
"Clustered, fault-tolerant, memory-based tables",
DB_TYPE_NDBCLUSTER, NULL, 0, 0, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_FEDERATED_DB
#include "ha_federated.h"
extern handlerton federated_hton;
#else
handlerton federated_hton = { "FEDERATED", SHOW_OPTION_NO,
"Federated MySQL storage engine", DB_TYPE_FEDERATED_DB, NULL, 0, 0, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
handlerton federated_hton = { "FEDERATED", SHOW_OPTION_NO,
"Federated MySQL storage engine", DB_TYPE_FEDERATED_DB, NULL, 0, 0, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#include <myisampack.h>
......@@ -118,8 +118,8 @@ extern handlerton binlog_hton;
/*
Obsolete
*/
handlerton isam_hton = { "ISAM", SHOW_OPTION_NO, "Obsolete storage engine",
DB_TYPE_ISAM, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
handlerton isam_hton = { "ISAM", SHOW_OPTION_NO, "Obsolete storage engine",
DB_TYPE_ISAM, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
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,
default:
break;
}
return ((enum db_type) thd->variables.table_type != DB_TYPE_UNKNOWN ?
(enum db_type) thd->variables.table_type :
((enum db_type) global_system_variables.table_type !=
......@@ -481,7 +481,7 @@ int ha_init()
for (types= sys_table_types; *types; types++)
{
if (!(*types)->init || !(*types)->init())
ha_was_inited_ok(types);
ha_was_inited_ok(types);
else
(*types)->state= SHOW_OPTION_DISABLED;
}
......@@ -1144,7 +1144,7 @@ int ha_release_temporary_latches(THD *thd)
}
/*
/*
Export statistics for different engines. Currently we use it only for
InnoDB.
*/
......@@ -1480,7 +1480,7 @@ next_insert_id(ulonglong nr,struct system_variables *variables)
RETURN
0 ok
1 get_auto_increment() was called and returned ~(ulonglong) 0
IMPLEMENTATION
......@@ -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
to ask engine if there are any new tables that should be written to disk
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
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,
{
int error= 0;
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));
#ifdef HAVE_NDBCLUSTER_DB
if (have_ndbcluster == SHOW_OPTION_YES)
......@@ -2500,7 +2500,7 @@ int handler::read_multi_range_next(KEY_MULTI_RANGE **found_range_p)
read_range_first()
start_key Start key. Is 0 if no min 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
NOTES
......@@ -2538,7 +2538,7 @@ int handler::read_range_first(const key_range *start_key,
start_key->length,
start_key->flag);
if (result)
DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND)
DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND)
? HA_ERR_END_OF_FILE
: result);
......@@ -2586,7 +2586,7 @@ int handler::read_range_next()
SYNOPSIS
compare_key
range range to compare to row. May be 0 for no range
NOTES
See key.cc::key_cmp() for details
......@@ -2626,7 +2626,7 @@ int handler::index_read_idx(byte * buf, uint index, const byte * key,
SYNOPSIS
ha_known_exts()
NOTES
No mutexes, worst case race is a minor surplus memory allocation
We have to recreate the extension map if mysqld is restarted (for example
......@@ -2673,7 +2673,7 @@ TYPELIB *ha_known_exts(void)
ext= (const char **) my_once_alloc(sizeof(char *)*
(found_exts.elements+1),
MYF(MY_WME | MY_FAE));
DBUG_ASSERT(ext != 0);
known_extensions.count= found_exts.elements;
known_extensions.type_names= ext;
......@@ -2702,7 +2702,7 @@ TYPELIB *ha_known_exts(void)
Only works for InnoDB at the moment
RETURN VALUE
Always 0 (= success)
Always 0 (= success)
*/
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
RETURN VALUE
Always 0 (= success)
Always 0 (= success)
PARAMETERS
*/
......
......@@ -106,7 +106,7 @@
Index scan will not return records in rowid order. Not guaranteed to be
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 */
......@@ -231,7 +231,7 @@ struct xid_t {
long bqual_length;
char data[XIDDATASIZE]; // not \0-terminated !
xid_t() {} /* Remove gcc warning */
xid_t() {} /* Remove gcc warning */
bool eq(struct xid_t *xid)
{ return eq(xid->gtrid_length, xid->bqual_length, xid->data); }
bool eq(long g, long b, const char *d)
......@@ -319,7 +319,7 @@ typedef struct
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;
......@@ -333,7 +333,7 @@ typedef struct
This is going away and new engines will just use "name" for this.
*/
enum db_type db_type;
/*
/*
Method that initizlizes a storage engine
*/
bool (*init)();
......@@ -573,7 +573,7 @@ class handler :public Sql_alloc
virtual const key_map *keys_to_use_for_scanning() { return &key_map_empty; }
virtual bool has_transactions(){ return 0;}
virtual uint extra_rec_buf_length() { return 0; }
/*
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)
......@@ -726,7 +726,7 @@ class handler :public Sql_alloc
int check_old_types();
/* to be actually called to get 'check()' functionality*/
int ha_check(THD *thd, HA_CHECK_OPT *check_opt);
virtual int backup(THD* thd, HA_CHECK_OPT* check_opt)
{ return HA_ADMIN_NOT_IMPLEMENTED; }
/*
......@@ -815,7 +815,7 @@ class handler :public Sql_alloc
*/
virtual int rename_table(const char *from, const char *to);
virtual int delete_table(const char *name);
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 */
......@@ -829,7 +829,7 @@ class handler :public Sql_alloc
/* 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,
uint key_length,
qc_engine_callback
qc_engine_callback
*engine_callback,
ulonglong *engine_data)
{
......@@ -847,7 +847,7 @@ class handler :public Sql_alloc
{
return memcmp(ref1, ref2, ref_length);
}
/*
Condition pushdown to storage engines
*/
......@@ -856,7 +856,7 @@ class handler :public Sql_alloc
Push condition down to the table handler.
SYNOPSIS
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.
RETURN
The 'remainder' condition that caller must use to filter out records.
......@@ -865,14 +865,14 @@ class handler :public Sql_alloc
NOTES
The pushed conditions form a stack (from which one can remove the
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)
or less restrictive condition, depending on handler's capabilities.
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
condition stack.
*/
*/
virtual const COND *cond_push(const COND *cond) { return cond; };
/*
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",
sys_var_trust_routine_creators
sys_trust_routine_creators("log_bin_trust_routine_creators",
&trust_function_creators);
sys_var_bool_ptr
sys_var_bool_ptr
sys_trust_function_creators("log_bin_trust_function_creators",
&trust_function_creators);
sys_var_thd_ulong sys_log_warnings("log_warnings", &SV::log_warnings);
......@@ -742,7 +742,7 @@ sys_var *sys_variables[]=
&sys_innodb_thread_concurrency,
&sys_innodb_commit_concurrency,
&sys_innodb_flush_log_at_trx_commit,
#endif
#endif
&sys_trust_routine_creators,
&sys_trust_function_creators,
&sys_engine_condition_pushdown,
......@@ -803,7 +803,7 @@ struct show_var_st init_vars[]= {
{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_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},
{sys_expire_logs_days.name, (char*) &sys_expire_logs_days, SHOW_SYS},
{sys_flush.name, (char*) &sys_flush, SHOW_SYS},
......@@ -931,9 +931,9 @@ struct show_var_st init_vars[]= {
{sys_myisam_repair_threads.name, (char*) &sys_myisam_repair_threads,
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},
#ifdef __NT__
{"named_pipe", (char*) &opt_enable_named_pipe, SHOW_MY_BOOL},
#endif
......@@ -1204,7 +1204,7 @@ static void fix_tx_isolation(THD *thd, enum_var_type type)
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)) {}
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)
#ifdef HAVE_QUERY_CACHE
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);
}
#endif
......@@ -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)
{
#ifndef EMBEDDED_LIBRARY
resize_thr_alarm(max_connections +
resize_thr_alarm(max_connections +
global_system_variables.max_insert_delayed_threads + 10);
#endif
}
......@@ -1514,7 +1514,7 @@ bool sys_var_thd_ha_rows::update(THD *thd, set_var *var)
if (var->type == OPT_GLOBAL)
{
/* 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;
pthread_mutex_unlock(&LOCK_global_system_variables);
}
......@@ -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());
return 1;
}
/*
We must copy result to thread space to not get a memory leak if
update is aborted
......@@ -1945,7 +1945,7 @@ typedef struct old_names_map_st
const char *new_name;
} my_old_conv;
static my_old_conv old_conv[]=
static my_old_conv old_conv[]=
{
{ "cp1251_koi8" , "cp1251" },
{ "cp1250_latin2" , "cp1250" },
......@@ -1963,7 +1963,7 @@ static my_old_conv old_conv[]=
CHARSET_INFO *get_old_charset_by_name(const char *name)
{
my_old_conv *conv;
for (conv= old_conv; conv->old_name; conv++)
{
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)
pthread_mutex_lock(&LOCK_global_system_variables);
key_cache= get_key_cache(base_name);
if (!key_cache)
{
/* Key cache didn't exists */
......@@ -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
and clear the old key cache.
*/
NAMED_LIST *list;
NAMED_LIST *list;
key_cache= (KEY_CACHE *) find_named(&key_caches, base_name->str,
base_name->length, &list);
key_cache->in_init= 1;
......@@ -2410,7 +2410,7 @@ bool sys_var_key_buffer_size::update(THD *thd, set_var *var)
error= (bool)(ha_resize_key_cache(key_cache));
pthread_mutex_lock(&LOCK_global_system_variables);
key_cache->in_init= 0;
key_cache->in_init= 0;
end:
pthread_mutex_unlock(&LOCK_global_system_variables);
......@@ -2459,7 +2459,7 @@ bool sys_var_key_cache_long::update(THD *thd, set_var *var)
error= (bool) (ha_resize_key_cache(key_cache));
pthread_mutex_lock(&LOCK_global_system_variables);
key_cache->in_init= 0;
key_cache->in_init= 0;
end:
pthread_mutex_unlock(&LOCK_global_system_variables);
......@@ -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,
LEX_STRING *base)
{
/*
/*
We can use ptr() instead of c_ptr() here because String contaning
time zone name is guaranteed to be zero ended.
*/
......@@ -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
explaination of the different warnings we send below
*/
if (opt_sql_bin_update)
{
((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG |
......@@ -2838,7 +2838,7 @@ static byte *get_warning_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];
return (byte*) &thd->sys_var_tmp.long_value;
}
......@@ -2878,7 +2878,7 @@ static byte *get_prepared_stmt_count(THD *thd)
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);
for (; opt->name; opt++)
......@@ -3286,7 +3286,7 @@ void sys_var_thd_table_type::warn_deprecated(THD *thd)
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX,
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)
......@@ -3385,7 +3385,7 @@ void fix_sql_mode_var(THD *thd, enum_var_type type)
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
to allow one to get full use of MySQL in this 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 |
MODE_IGNORE_SPACE);
/*
/*
MODE_ONLY_FULL_GROUP_BY removed from ANSI mode because it is currently
overly restrictive (see BUG#8510).
*/
......@@ -3479,7 +3479,7 @@ static KEY_CACHE *create_key_cache(const char *name, uint length)
KEY_CACHE *key_cache;
DBUG_ENTER("create_key_cache");
DBUG_PRINT("enter",("name: %.*s", length, name));
if ((key_cache= (KEY_CACHE*) my_malloc(sizeof(KEY_CACHE),
MYF(MY_ZEROFILL | MY_WME))))
{
......@@ -3546,7 +3546,7 @@ void sys_var_trust_routine_creators::warn_deprecated(THD *thd)
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX,
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)
......
......@@ -755,7 +755,7 @@ class Server_side_cursor;
- prepared, that is, contain placeholders,
- opened as cursors. We maintain 1 to 1 relationship between
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
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
......@@ -778,7 +778,7 @@ class Statement: public ilink, public Query_arena
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.
*/
bool set_query_id;
......@@ -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
for it.
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
STATUS.
*/
......@@ -1152,7 +1152,7 @@ class THD :public Statement,
/*
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
chapter 'Miscellaneous functions', for functions GET_LOCK, RELEASE_LOCK.
chapter 'Miscellaneous functions', for functions GET_LOCK, RELEASE_LOCK.
*/
User_level_lock *ull;
#ifndef DBUG_OFF
......@@ -1355,10 +1355,10 @@ class THD :public Statement,
long long_value;
ulong ulong_value;
} sys_var_tmp;
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
mysql_bin_log.start_union_events to turn this on)
*/
......@@ -1369,19 +1369,19 @@ class THD :public Statement,
*/
bool unioned_events;
/*
If TRUE, at least one mysql_bin_log::write(Log_event e), where
e.cache_stmt == TRUE call has been made after last
If TRUE, at least one mysql_bin_log::write(Log_event e), where
e.cache_stmt == TRUE call has been made after last
mysql_bin_log.start_union_events() call.
*/
bool unioned_events_trans;
/*
/*
'queries' (actually SP statements) that run under inside this binlog
union have thd->query_id >= first_query_id.
*/
query_id_t first_query_id;
} binlog_evt_union;
THD();
~THD();
......@@ -1393,7 +1393,7 @@ class THD :public Statement,
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():
if preallocation fails, we should notice that at the first call to
alloc_root.
alloc_root.
*/
void init_for_queries();
void change_user(void);
......@@ -1589,7 +1589,7 @@ class THD :public Statement,
#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...)
XXX: We never call destructor for objects of this class.
*/
......@@ -1771,8 +1771,8 @@ class select_create: public select_insert {
#include <myisam.h>
/*
Param to create temporary tables when doing SELECT:s
/*
Param to create temporary tables when doing SELECT:s
NOTE
This structure is copied using memcpy as a part of JOIN.
*/
......@@ -1800,8 +1800,8 @@ class TMP_TABLE_PARAM :public Sql_alloc
uint quick_group;
bool using_indirect_summary_function;
/* If >0 convert all blob fields to varchar(convert_blob_length) */
uint convert_blob_length;
CHARSET_INFO *table_charset;
uint convert_blob_length;
CHARSET_INFO *table_charset;
bool schema_table;
/*
True if GROUP BY and its aggregate functions are already computed
......@@ -1932,12 +1932,12 @@ class Table_ident :public Sql_alloc
else
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)
{
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 */
db.str=0; table.str= internal_table_name; table.length=1;
......@@ -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,
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
......@@ -2000,12 +2000,12 @@ class Unique :public Sql_alloc
}
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);
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)
{
register ulong max_elems_in_tree=
register ulong max_elems_in_tree=
(1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
return sizeof(uint)*(1 + nkeys/max_elems_in_tree);
}
......
......@@ -705,7 +705,7 @@ impossible position";
if (loop_breaker)
break;
end_io_cache(&log);
(void) my_close(file, MYF(MY_WME));
......@@ -854,7 +854,7 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
/* Issuing warning then started without --skip-slave-start */
if (!opt_skip_slave_start)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_MISSING_SKIP_SLAVE,
ER_MISSING_SKIP_SLAVE,
ER(ER_MISSING_SKIP_SLAVE));
}
......@@ -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,
ER(ER_SLAVE_WAS_RUNNING));
}
unlock_slave_threads(mi);
if (slave_errno)
......@@ -1040,7 +1040,7 @@ int reset_slave(THD *thd, MASTER_INFO* mi)
slave_server_id the slave's server id
*/
void kill_zombie_dump_threads(uint32 slave_server_id)
{
......@@ -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.
*/
*/
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)
mi->port = lex_mi->port;
if (lex_mi->connect_retry)
mi->connect_retry = lex_mi->connect_retry;
if (lex_mi->ssl != LEX_MASTER_INFO::SSL_UNCHANGED)
mi->ssl= (lex_mi->ssl == LEX_MASTER_INFO::SSL_ENABLE);
if (lex_mi->ssl_ca)
......@@ -1150,7 +1150,7 @@ bool change_master(THD* thd, MASTER_INFO* mi)
#ifndef HAVE_OPENSSL
if (lex_mi->ssl || lex_mi->ssl_ca || lex_mi->ssl_capath ||
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));
#endif
......@@ -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_return_int("File_size", 20,
field_list.push_back(new Item_return_int("File_size", 20,
MYSQL_TYPE_LONGLONG));
if (protocol->send_fields(&field_list,
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