mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
Merge monty@192.168.0.9:/my/mysql-5.1
into mysql.com:/home/my/mysql-5.1 sql/handler.cc: Auto merged
This commit is contained in:
commit
c5f13dd2a4
13 changed files with 45 additions and 29 deletions
|
@ -4095,8 +4095,8 @@ static void append_metadata(DYNAMIC_STRING *ds,
|
|||
static void append_info(DYNAMIC_STRING *ds, ulonglong affected_rows,
|
||||
const char *info)
|
||||
{
|
||||
char buf[40];
|
||||
sprintf(buf,"affected rows: %llu\n", affected_rows);
|
||||
char buf[40], buff2[21];
|
||||
sprintf(buf,"affected rows: %s\n", llstr(affected_rows, buff2));
|
||||
dynstr_append(ds, buf);
|
||||
if (info)
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ static inline void bitmap_unlock(MY_BITMAP *map __attribute__((unused)))
|
|||
|
||||
|
||||
my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
|
||||
my_bool thread_safe)
|
||||
my_bool thread_safe __attribute__((unused)))
|
||||
{
|
||||
DBUG_ENTER("bitmap_init");
|
||||
if (!buf)
|
||||
|
|
|
@ -504,6 +504,7 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
|
|||
switch ((enum ha_base_keytype) keyseg->type) {
|
||||
case HA_KEYTYPE_TEXT:
|
||||
case HA_KEYTYPE_BINARY:
|
||||
case HA_KEYTYPE_BIT:
|
||||
if (keyseg->flag & HA_SPACE_PACK)
|
||||
{
|
||||
int a_length;
|
||||
|
@ -515,7 +516,9 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
|
|||
a= end;
|
||||
break;
|
||||
case HA_KEYTYPE_VARTEXT1:
|
||||
case HA_KEYTYPE_VARTEXT2:
|
||||
case HA_KEYTYPE_VARBINARY1:
|
||||
case HA_KEYTYPE_VARBINARY2:
|
||||
{
|
||||
int a_length;
|
||||
get_key_length(a_length, a);
|
||||
|
@ -545,6 +548,9 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
|
|||
case HA_KEYTYPE_DOUBLE:
|
||||
a= end;
|
||||
break;
|
||||
case HA_KEYTYPE_END:
|
||||
DBUG_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return keyseg;
|
||||
|
|
|
@ -1123,10 +1123,12 @@ void thr_downgrade_write_lock(THR_LOCK_DATA *in_data,
|
|||
enum thr_lock_type new_lock_type)
|
||||
{
|
||||
THR_LOCK *lock=in_data->lock;
|
||||
THR_LOCK_DATA *data, *next;
|
||||
enum thr_lock_type old_lock_type= in_data->type;
|
||||
#ifdef TO_BE_REMOVED
|
||||
THR_LOCK_DATA *data, *next;
|
||||
bool start_writers= FALSE;
|
||||
bool start_readers= FALSE;
|
||||
#endif
|
||||
DBUG_ENTER("thr_downgrade_write_only_lock");
|
||||
|
||||
pthread_mutex_lock(&lock->mutex);
|
||||
|
@ -1134,7 +1136,8 @@ void thr_downgrade_write_lock(THR_LOCK_DATA *in_data,
|
|||
DBUG_ASSERT(old_lock_type > new_lock_type);
|
||||
in_data->type= new_lock_type;
|
||||
check_locks(lock,"after downgrading lock",0);
|
||||
#if 0
|
||||
|
||||
#if TO_BE_REMOVED
|
||||
switch (old_lock_type)
|
||||
{
|
||||
case TL_WRITE_ONLY:
|
||||
|
|
|
@ -97,7 +97,8 @@ static int simple_parser_plugin_deinit(void)
|
|||
1 failure (cannot happen)
|
||||
*/
|
||||
|
||||
static int simple_parser_init(MYSQL_FTPARSER_PARAM *param)
|
||||
static int simple_parser_init(MYSQL_FTPARSER_PARAM *param
|
||||
__attribute__((unused)))
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
@ -117,7 +118,8 @@ static int simple_parser_init(MYSQL_FTPARSER_PARAM *param)
|
|||
1 failure (cannot happen)
|
||||
*/
|
||||
|
||||
static int simple_parser_deinit(MYSQL_FTPARSER_PARAM *param)
|
||||
static int simple_parser_deinit(MYSQL_FTPARSER_PARAM *param
|
||||
__attribute__((unused)))
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
|
|
@ -851,7 +851,7 @@ private:
|
|||
char m_dbname[FN_HEADLEN];
|
||||
//char m_schemaname[FN_HEADLEN];
|
||||
char m_tabname[FN_HEADLEN];
|
||||
ulong m_table_flags;
|
||||
ulonglong m_table_flags;
|
||||
THR_LOCK_DATA m_lock;
|
||||
bool m_lock_tuple;
|
||||
NDB_SHARE *m_share;
|
||||
|
|
|
@ -3882,21 +3882,22 @@ ndbcluster_show_status_binlog(THD* thd, stat_print_fn *stat_print,
|
|||
pthread_mutex_lock(&injector_mutex);
|
||||
if (injector_ndb)
|
||||
{
|
||||
char buff1[22],buff2[22],buff3[22],buff4[22],buff5[22];
|
||||
ndb_latest_epoch= injector_ndb->getLatestGCI();
|
||||
pthread_mutex_unlock(&injector_mutex);
|
||||
|
||||
buflen=
|
||||
snprintf(buf, sizeof(buf),
|
||||
"latest_epoch=%llu, "
|
||||
"latest_trans_epoch=%llu, "
|
||||
"latest_received_binlog_epoch=%llu, "
|
||||
"latest_handled_binlog_epoch=%llu, "
|
||||
"latest_applied_binlog_epoch=%llu",
|
||||
ndb_latest_epoch,
|
||||
g_latest_trans_gci,
|
||||
ndb_latest_received_binlog_epoch,
|
||||
ndb_latest_handled_binlog_epoch,
|
||||
ndb_latest_applied_binlog_epoch);
|
||||
"latest_epoch=%s, "
|
||||
"latest_trans_epoch=%s, "
|
||||
"latest_received_binlog_epoch=%s, "
|
||||
"latest_handled_binlog_epoch=%s, "
|
||||
"latest_applied_binlog_epoch=%s",
|
||||
llstr(ndb_latest_epoch, buff1),
|
||||
llstr(g_latest_trans_gci, buff2),
|
||||
llstr(ndb_latest_received_binlog_epoch, buff3),
|
||||
llstr(ndb_latest_handled_binlog_epoch, buff4),
|
||||
llstr(ndb_latest_applied_binlog_epoch, buff5));
|
||||
if (stat_print(thd, ndbcluster_hton_name, ndbcluster_hton_name_length,
|
||||
"binlog", strlen("binlog"),
|
||||
buf, buflen))
|
||||
|
|
|
@ -3328,16 +3328,18 @@ namespace
|
|||
if (likely(!(error= bitmap_init(&cols,
|
||||
use_bitbuf ? bitbuf : NULL,
|
||||
(n_fields + 7) & ~7UL,
|
||||
false))))
|
||||
FALSE))))
|
||||
{
|
||||
bitmap_set_all(&cols);
|
||||
if (likely(!(error= write_locked_table_maps(thd))))
|
||||
{
|
||||
error=
|
||||
RowsEventT::binlog_row_logging_function(thd, table,
|
||||
table->file->has_transactions(),
|
||||
table->file->
|
||||
has_transactions(),
|
||||
&cols, table->s->fields,
|
||||
before_record, after_record);
|
||||
before_record,
|
||||
after_record);
|
||||
}
|
||||
if (!use_bitbuf)
|
||||
bitmap_free(&cols);
|
||||
|
|
|
@ -1518,7 +1518,7 @@ extern bool opt_using_transactions, mysqld_embedded;
|
|||
extern bool using_update_log, opt_large_files, server_id_supplied;
|
||||
extern bool opt_update_log, opt_bin_log, opt_error_log;
|
||||
extern my_bool opt_log, opt_slow_log;
|
||||
extern uint log_output_options;
|
||||
extern ulong log_output_options;
|
||||
extern my_bool opt_log_queries_not_using_indexes;
|
||||
extern bool opt_disable_networking, opt_skip_show_db;
|
||||
extern my_bool opt_character_set_client_handshake;
|
||||
|
|
|
@ -343,7 +343,7 @@ static my_bool opt_sync_bdb_logs;
|
|||
|
||||
bool opt_update_log, opt_bin_log;
|
||||
my_bool opt_log, opt_slow_log;
|
||||
uint log_output_options;
|
||||
ulong log_output_options;
|
||||
my_bool opt_log_queries_not_using_indexes= 0;
|
||||
bool opt_error_log= IF_WIN(1,0);
|
||||
bool opt_disable_networking=0, opt_skip_show_db=0;
|
||||
|
@ -3225,7 +3225,7 @@ server.");
|
|||
{
|
||||
sql_print_error("CSV engine is not present, falling back to the "
|
||||
"log files");
|
||||
log_output_options= log_output_options & ~LOG_TABLE | LOG_FILE;
|
||||
log_output_options= (log_output_options & ~LOG_TABLE) | LOG_FILE;
|
||||
}
|
||||
|
||||
logger.set_handlers(LOG_FILE, opt_slow_log ? log_output_options:LOG_NONE,
|
||||
|
@ -6953,7 +6953,8 @@ static void mysql_init_variables(void)
|
|||
/* Things reset to zero */
|
||||
opt_skip_slave_start= opt_reckless_slave = 0;
|
||||
mysql_home[0]= pidfile_name[0]= log_error_file[0]= 0;
|
||||
opt_log= opt_update_log= opt_slow_log= 0;
|
||||
opt_log= opt_slow_log= 0;
|
||||
opt_update_log= 0;
|
||||
log_output_options= find_bit_type(log_output_str, &log_output_typelib);
|
||||
opt_bin_log= 0;
|
||||
opt_disable_networking= opt_skip_show_db=0;
|
||||
|
|
|
@ -2724,7 +2724,8 @@ void sys_var_log_output::set_default(THD *thd, enum_var_type type)
|
|||
}
|
||||
|
||||
|
||||
byte *sys_var_log_output::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base)
|
||||
byte *sys_var_log_output::value_ptr(THD *thd, enum_var_type type,
|
||||
LEX_STRING *base)
|
||||
{
|
||||
char buff[256];
|
||||
String tmp(buff, sizeof(buff), &my_charset_latin1);
|
||||
|
|
|
@ -785,10 +785,10 @@ public:
|
|||
|
||||
class sys_var_log_output :public sys_var
|
||||
{
|
||||
uint *value;
|
||||
ulong *value;
|
||||
TYPELIB *enum_names;
|
||||
public:
|
||||
sys_var_log_output(const char *name_arg, uint *value_arg,
|
||||
sys_var_log_output(const char *name_arg, ulong *value_arg,
|
||||
TYPELIB *typelib, sys_after_update_func func)
|
||||
:sys_var(name_arg,func), value(value_arg), enum_names(typelib)
|
||||
{}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#define TEST_STRING "This is a test"
|
||||
#define BUFFER_LEN 1024
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc __attribute__((unused)), char *argv[])
|
||||
{
|
||||
int ret;
|
||||
azio_stream foo, foo1;
|
||||
|
|
Loading…
Add table
Reference in a new issue