mirror of
https://github.com/MariaDB/server.git
synced 2025-11-19 19:03:26 +03:00
Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into teton.kitebird.com:/home/paul/mysql-4.1
This commit is contained in:
@@ -1447,7 +1447,7 @@ row_create_table_for_mysql(
|
||||
fprintf(stderr,
|
||||
" InnoDB: Error: table %s already exists in InnoDB internal\n"
|
||||
"InnoDB: data dictionary. Have you deleted the .frm file\n"
|
||||
"InnoDB: and not used DROPT ABLE? Have you used DROP DATABASE\n"
|
||||
"InnoDB: and not used DROP TABLE? Have you used DROP DATABASE\n"
|
||||
"InnoDB: for InnoDB tables in MySQL version <= 3.23.43?\n"
|
||||
"InnoDB: See the Restrictions section of the InnoDB manual.\n",
|
||||
table->name);
|
||||
|
||||
@@ -551,7 +551,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
|
||||
ha_checksum *key_checksum, uint level)
|
||||
{
|
||||
int flag;
|
||||
uint used_length,comp_flag,nod_flag,key_length,not_used;
|
||||
uint used_length,comp_flag,nod_flag,key_length=0,not_used;
|
||||
uchar key[MI_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*old_keypos,*endpos;
|
||||
my_off_t next_page,record;
|
||||
char llbuff[22];
|
||||
@@ -586,6 +586,8 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
|
||||
}
|
||||
for ( ;; )
|
||||
{
|
||||
memcpy((char*) info->lastkey,(char*) key,key_length);
|
||||
info->lastkey_length=key_length;
|
||||
if (nod_flag)
|
||||
{
|
||||
next_page=_mi_kpos(nod_flag,keypos);
|
||||
@@ -629,8 +631,6 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
|
||||
}
|
||||
(*key_checksum)+= mi_byte_checksum((byte*) key,
|
||||
key_length- info->s->rec_reflength);
|
||||
memcpy((char*) info->lastkey,(char*) key,key_length);
|
||||
info->lastkey_length=key_length;
|
||||
record= _mi_dpos(info,0,key+key_length);
|
||||
if (keyinfo->flag & HA_FULLTEXT) /* special handling for ft2 */
|
||||
{
|
||||
@@ -658,7 +658,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
|
||||
DBUG_PRINT("test",("page: %s record: %s filelength: %s",
|
||||
llstr(page,llbuff),llstr(record,llbuff2),
|
||||
llstr(info->state->data_file_length,llbuff3)));
|
||||
DBUG_DUMP("key",(byte*) info->lastkey,key_length);
|
||||
DBUG_DUMP("key",(byte*) key,key_length);
|
||||
DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos));
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -603,7 +603,7 @@ error () {
|
||||
error_is () {
|
||||
$ECHO "Errors are (from $TIMEFILE) :"
|
||||
$CAT < $TIMEFILE
|
||||
$ECHO "(the last line(s) may be the ones that caused the die() in mysqltest)"
|
||||
$ECHO "(the last lines may be the most important ones)"
|
||||
}
|
||||
|
||||
prefix_to_8() {
|
||||
@@ -1309,6 +1309,9 @@ run_testcase ()
|
||||
skip_inc
|
||||
$ECHO "$RES$RES_SPACE [ skipped ]"
|
||||
else
|
||||
if [ $res -gt 2 ]; then
|
||||
$ECHO "mysqltest returned unexpected code $res, it has probably crashed" >> $TIMEFILE
|
||||
fi
|
||||
total_inc
|
||||
fail_inc
|
||||
$ECHO "$RES$RES_SPACE [ fail ]"
|
||||
|
||||
@@ -540,7 +540,7 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
|
||||
strxmov(get_charsets_dir(buf), cs->csname, ".xml", NullS);
|
||||
my_read_charset_file(buf,flags);
|
||||
}
|
||||
cs= (cs->state & MY_CS_AVAILABLE) ? cs : NULL;
|
||||
cs= (cs && cs->state & MY_CS_AVAILABLE) ? cs : NULL;
|
||||
pthread_mutex_unlock(&THR_LOCK_charset);
|
||||
return cs;
|
||||
}
|
||||
|
||||
@@ -270,11 +270,8 @@ int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
|
||||
VOID(pthread_mutex_lock(&LOCK_mysql_create_db));
|
||||
|
||||
// do not alter database if another thread is holding read lock
|
||||
if (wait_if_global_read_lock(thd,0))
|
||||
{
|
||||
error= -1;
|
||||
if ((error=wait_if_global_read_lock(thd,0)))
|
||||
goto exit2;
|
||||
}
|
||||
|
||||
/* Check directory */
|
||||
(void)sprintf(path,"%s/%s/%s", mysql_data_home, db, MY_DB_OPT_FILE);
|
||||
@@ -307,7 +304,7 @@ exit:
|
||||
start_waiting_global_read_lock(thd);
|
||||
exit2:
|
||||
VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));
|
||||
DBUG_RETURN(error);
|
||||
DBUG_RETURN(error ? -1 : 0); /* -1 to delegate send_error() */
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user