mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mc05.(none):/space/tomas/mysql-4.1-ndb
This commit is contained in:
commit
2369c9b238
16 changed files with 43 additions and 43 deletions
|
@ -93,7 +93,7 @@ sub add_copyright
|
|||
{
|
||||
$start_copyright="/* ";
|
||||
$line_copyright= " ";
|
||||
$end_copyright= " */";
|
||||
$end_copyright= "*/";
|
||||
}
|
||||
elsif ($ARGV =~ /-x86\.s$/)
|
||||
{
|
||||
|
|
|
@ -1239,7 +1239,6 @@ static void fix_history(String *final_command)
|
|||
static int not_in_history(const char *line)
|
||||
{
|
||||
HIST_ENTRY *oldhist = history_get(history_length);
|
||||
int num;
|
||||
|
||||
if (oldhist == 0)
|
||||
return 1;
|
||||
|
@ -1589,7 +1588,6 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
|||
const char *server_cmd= buffer->ptr();
|
||||
char cmd_buf[100];
|
||||
MYSQL_RES *result;
|
||||
MYSQL_FIELD *fields;
|
||||
int error;
|
||||
|
||||
if (help_arg[0] != '\'')
|
||||
|
@ -1615,7 +1613,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
|||
{
|
||||
unsigned int num_fields= mysql_num_fields(result);
|
||||
my_ulonglong num_rows= mysql_num_rows(result);
|
||||
fields= mysql_fetch_fields(result);
|
||||
mysql_fetch_fields(result);
|
||||
if (num_fields==3 && num_rows==1)
|
||||
{
|
||||
if (!(cur= mysql_fetch_row(result)))
|
||||
|
@ -2406,7 +2404,7 @@ com_shell(String *buffer, char *line __attribute__((unused)))
|
|||
char *shell_cmd;
|
||||
|
||||
/* Skip space from line begin */
|
||||
while (isspace(*line))
|
||||
while (my_isspace(charset_info, *line))
|
||||
line++;
|
||||
if (!(shell_cmd = strchr(line, ' ')))
|
||||
{
|
||||
|
|
|
@ -109,7 +109,7 @@ MYSQL_MANAGER* manager=0;
|
|||
|
||||
static char **default_argv;
|
||||
static const char *load_default_groups[]= { "mysqltest","client",0 };
|
||||
static char line_buffer[MAX_DELIMITER], *line_buffer_pos= line_buffer;;
|
||||
static char line_buffer[MAX_DELIMITER], *line_buffer_pos= line_buffer;
|
||||
|
||||
static FILE* file_stack[MAX_INCLUDE_DEPTH];
|
||||
static FILE** cur_file;
|
||||
|
|
|
@ -90,8 +90,9 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
|
|||
|
||||
/* Skip rows inserted by current inserted */
|
||||
for (r=_mi_search(info, keyinfo, keybuff, keylen, SEARCH_FIND, key_root) ;
|
||||
!r &&
|
||||
(subkeys=ft_sintXkorr(info->lastkey+info->lastkey_length-extra)) > 0 &&
|
||||
!r && info->lastpos >= info->state->data_file_length ;
|
||||
info->lastpos >= info->state->data_file_length ;
|
||||
r= _mi_search_next(info, keyinfo, info->lastkey,
|
||||
info->lastkey_length, SEARCH_BIGGER, key_root))
|
||||
;
|
||||
|
|
|
@ -39,7 +39,7 @@ int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused)))
|
|||
}
|
||||
|
||||
|
||||
int run_test(const char *filename)
|
||||
static int run_test(const char *filename)
|
||||
{
|
||||
MI_INFO *file;
|
||||
MI_UNIQUEDEF uniquedef;
|
||||
|
|
|
@ -10,4 +10,4 @@ reset slave;
|
|||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 slave-relay-bin.000002 123 master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 79 326 None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 slave-relay-bin.000002 123 master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 79 # None 0 No #
|
||||
|
|
|
@ -21,5 +21,5 @@ start slave;
|
|||
# can't sync_with_master so we must sleep
|
||||
sleep 3;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 33 #
|
||||
--replace_column 1 # 23 # 33 #
|
||||
show slave status;
|
||||
|
|
|
@ -114,10 +114,8 @@ public:
|
|||
int reset(void);
|
||||
int external_lock(THD *thd, int lock_type);
|
||||
int delete_all_rows(void);
|
||||
ha_rows records_in_range(int inx, const byte *start_key,uint start_key_len,
|
||||
enum ha_rkey_function start_search_flag,
|
||||
const byte *end_key,uint end_key_len,
|
||||
enum ha_rkey_function end_search_flag);
|
||||
ha_rows records_in_range(uint inx, key_range *min_key,
|
||||
key_range *max_key);
|
||||
int delete_table(const char *from);
|
||||
int rename_table(const char * from, const char * to);
|
||||
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
|
||||
|
|
|
@ -103,15 +103,16 @@ TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"",
|
|||
|
||||
enum db_type ha_resolve_by_name(const char *name, uint namelen)
|
||||
{
|
||||
if (!my_strcasecmp(&my_charset_latin1, name, "DEFAULT")) {
|
||||
return(enum db_type) current_thd->variables.table_type;
|
||||
THD *thd=current_thd;
|
||||
if (thd && !my_strcasecmp(&my_charset_latin1, name, "DEFAULT")) {
|
||||
return (enum db_type) thd->variables.table_type;
|
||||
}
|
||||
|
||||
show_table_type_st *types;
|
||||
for (types= sys_table_types; types->type; types++)
|
||||
{
|
||||
if (!my_strcasecmp(&my_charset_latin1, name, types->type))
|
||||
return(enum db_type)types->db_type;
|
||||
return (enum db_type) types->db_type;
|
||||
}
|
||||
return DB_TYPE_UNKNOWN;
|
||||
}
|
||||
|
|
|
@ -411,7 +411,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
|
|||
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
|
||||
else
|
||||
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
|
||||
(ulong) info.deleted+info.updated, (ulong) thd->cuted_fields);
|
||||
(ulong) (info.deleted+info.updated), (ulong) thd->cuted_fields);
|
||||
::send_ok(thd,info.copied+info.deleted+info.updated,(ulonglong)id,buff);
|
||||
}
|
||||
free_underlaid_joins(thd, &thd->lex->select_lex);
|
||||
|
@ -1582,7 +1582,7 @@ bool select_insert::send_eof()
|
|||
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
|
||||
else
|
||||
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
|
||||
(ulong) info.deleted+info.updated, (ulong) thd->cuted_fields);
|
||||
(ulong) (info.deleted+info.updated), (ulong) thd->cuted_fields);
|
||||
::send_ok(thd,info.copied+info.deleted+info.updated,last_insert_id,buff);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
|
|
@ -4613,7 +4613,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
|||
mysql_bin_log.new_file(1);
|
||||
mysql_slow_log.new_file(1);
|
||||
#ifdef HAVE_REPLICATION
|
||||
if (expire_logs_days)
|
||||
if (mysql_bin_log.is_open() && expire_logs_days)
|
||||
{
|
||||
long purge_time= time(0) - expire_logs_days*24*60*60;
|
||||
if (purge_time >= 0)
|
||||
|
|
|
@ -223,7 +223,7 @@ static uint16 big5strokexfrm(uint16 i)
|
|||
static int my_strnncoll_big5_internal(const uchar **a_res,
|
||||
const uchar **b_res, uint length)
|
||||
{
|
||||
const char *a= *a_res, *b= *b_res;
|
||||
const uchar *a= *a_res, *b= *b_res;
|
||||
|
||||
while (length--)
|
||||
{
|
||||
|
@ -236,10 +236,10 @@ static int my_strnncoll_big5_internal(const uchar **a_res,
|
|||
b+= 2;
|
||||
length--;
|
||||
}
|
||||
else if (sort_order_big5[(uchar) *a++] !=
|
||||
sort_order_big5[(uchar) *b++])
|
||||
return ((int) sort_order_big5[(uchar) a[-1]] -
|
||||
(int) sort_order_big5[(uchar) b[-1]]);
|
||||
else if (sort_order_big5[*a++] !=
|
||||
sort_order_big5[*b++])
|
||||
return ((int) sort_order_big5[a[-1]] -
|
||||
(int) sort_order_big5[b[-1]]);
|
||||
}
|
||||
*a_res= a;
|
||||
*b_res= b;
|
||||
|
|
|
@ -2585,7 +2585,7 @@ static uint16 gbksortorder(uint16 i)
|
|||
int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res,
|
||||
uint length)
|
||||
{
|
||||
const char *a= *a_res, *b= *b_res;
|
||||
const uchar *a= *a_res, *b= *b_res;
|
||||
uint a_char,b_char;
|
||||
|
||||
while (length--)
|
||||
|
@ -2601,9 +2601,9 @@ int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res,
|
|||
b+= 2;
|
||||
length--;
|
||||
}
|
||||
else if (sort_order_gbk[(uchar) *a++] != sort_order_gbk[(uchar) *b++])
|
||||
return ((int) sort_order_gbk[(uchar) a[-1]] -
|
||||
(int) sort_order_gbk[(uchar) b[-1]]);
|
||||
else if (sort_order_gbk[*a++] != sort_order_gbk[*b++])
|
||||
return ((int) sort_order_gbk[a[-1]] -
|
||||
(int) sort_order_gbk[b[-1]]);
|
||||
}
|
||||
*a_res= a;
|
||||
*b_res= b;
|
||||
|
|
|
@ -283,7 +283,7 @@ uint my_well_formed_len_mb(CHARSET_INFO *cs,
|
|||
|
||||
while (pos)
|
||||
{
|
||||
if ((mblen= cs->cset->mb_wc(cs, &wc, b, e)) <0)
|
||||
if ((mblen= cs->cset->mb_wc(cs, &wc, (uchar*) b, (uchar*) e)) <0)
|
||||
break;
|
||||
b+= mblen;
|
||||
pos--;
|
||||
|
|
|
@ -6750,8 +6750,8 @@ static int my_strnncollsp_uca(CHARSET_INFO *cs,
|
|||
int s_res;
|
||||
int t_res;
|
||||
|
||||
slen= cs->cset->lengthsp(cs, s, slen);
|
||||
tlen= cs->cset->lengthsp(cs, t, tlen);
|
||||
slen= cs->cset->lengthsp(cs, (char*) s, slen);
|
||||
tlen= cs->cset->lengthsp(cs, (char*) t, tlen);
|
||||
|
||||
my_uca_scanner_init(&sscanner, cs, s, slen);
|
||||
my_uca_scanner_init(&tscanner, cs, t, tlen);
|
||||
|
@ -6796,7 +6796,7 @@ static void my_hash_sort_uca(CHARSET_INFO *cs,
|
|||
int s_res;
|
||||
my_uca_scanner scanner;
|
||||
|
||||
slen= cs->cset->lengthsp(cs, s, slen);
|
||||
slen= cs->cset->lengthsp(cs, (char*) s, slen);
|
||||
my_uca_scanner_init(&scanner, cs, s, slen);
|
||||
|
||||
while ((s_res= my_uca_scanner_next(&scanner)) >0)
|
||||
|
|
|
@ -2400,7 +2400,8 @@ static void test_long_data_str()
|
|||
MYSQL_STMT *stmt;
|
||||
int rc, i;
|
||||
char data[255];
|
||||
long length, length1;
|
||||
long length;
|
||||
ulong length1;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_BIND bind[2];
|
||||
my_bool is_null[2];
|
||||
|
@ -2495,8 +2496,8 @@ static void test_long_data_str1()
|
|||
MYSQL_STMT *stmt;
|
||||
int rc, i;
|
||||
char data[255];
|
||||
long length, length1;
|
||||
ulong max_blob_length, blob_length;
|
||||
long length;
|
||||
ulong max_blob_length, blob_length, length1;
|
||||
my_bool true_value;
|
||||
MYSQL_RES *result;
|
||||
MYSQL_BIND bind[2];
|
||||
|
@ -3084,7 +3085,7 @@ static void test_bind_result_ext()
|
|||
char szData[20], bData[20];
|
||||
ulong szLength, bLength;
|
||||
MYSQL_BIND bind[8];
|
||||
long length[8];
|
||||
ulong length[8];
|
||||
my_bool is_null[8];
|
||||
|
||||
myheader("test_bind_result_ext");
|
||||
|
@ -5376,7 +5377,7 @@ static void test_store_result2()
|
|||
MYSQL_STMT *stmt;
|
||||
int rc;
|
||||
int nData;
|
||||
long length;
|
||||
ulong length;
|
||||
MYSQL_BIND bind[1];
|
||||
|
||||
myheader("test_store_result2");
|
||||
|
@ -8094,7 +8095,7 @@ static void test_ts()
|
|||
MYSQL_TIME ts;
|
||||
MYSQL_RES *prep_res;
|
||||
char strts[30];
|
||||
long length;
|
||||
ulong length;
|
||||
int rc, field_count;
|
||||
char name;
|
||||
|
||||
|
@ -8974,7 +8975,8 @@ static void test_multi()
|
|||
char *query;
|
||||
MYSQL_BIND bind[1];
|
||||
int rc, i;
|
||||
long param= 1, length= 1;
|
||||
long param= 1;
|
||||
ulong length= 1;
|
||||
myheader("test_multi");
|
||||
|
||||
bind[0].buffer_type= MYSQL_TYPE_LONG;
|
||||
|
@ -9100,7 +9102,7 @@ static void test_bind_nagative()
|
|||
int rc;
|
||||
MYSQL_BIND bind[1];
|
||||
long my_val = 0L;
|
||||
long my_length = 0L;
|
||||
ulong my_length = 0L;
|
||||
long my_null = 0L;
|
||||
myheader("test_insert_select");
|
||||
|
||||
|
@ -9141,7 +9143,7 @@ static void test_derived()
|
|||
int rc, i;
|
||||
MYSQL_BIND bind[1];
|
||||
long my_val = 0L;
|
||||
long my_length = 0L;
|
||||
ulong my_length = 0L;
|
||||
long my_null = 0L;
|
||||
const char *query=
|
||||
"select count(1) from (select f.id from t1 f where f.id=?) as x";
|
||||
|
|
Loading…
Add table
Reference in a new issue