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:
@@ -551,7 +551,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
|
|||||||
ha_checksum *key_checksum, uint level)
|
ha_checksum *key_checksum, uint level)
|
||||||
{
|
{
|
||||||
int flag;
|
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;
|
uchar key[MI_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*old_keypos,*endpos;
|
||||||
my_off_t next_page,record;
|
my_off_t next_page,record;
|
||||||
char llbuff[22];
|
char llbuff[22];
|
||||||
@@ -586,6 +586,8 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
|
|||||||
}
|
}
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
|
memcpy((char*) info->lastkey,(char*) key,key_length);
|
||||||
|
info->lastkey_length=key_length;
|
||||||
if (nod_flag)
|
if (nod_flag)
|
||||||
{
|
{
|
||||||
next_page=_mi_kpos(nod_flag,keypos);
|
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_checksum)+= mi_byte_checksum((byte*) key,
|
||||||
key_length- info->s->rec_reflength);
|
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);
|
record= _mi_dpos(info,0,key+key_length);
|
||||||
if (keyinfo->flag & HA_FULLTEXT) /* special handling for ft2 */
|
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",
|
DBUG_PRINT("test",("page: %s record: %s filelength: %s",
|
||||||
llstr(page,llbuff),llstr(record,llbuff2),
|
llstr(page,llbuff),llstr(record,llbuff2),
|
||||||
llstr(info->state->data_file_length,llbuff3)));
|
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));
|
DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -603,7 +603,7 @@ error () {
|
|||||||
error_is () {
|
error_is () {
|
||||||
$ECHO "Errors are (from $TIMEFILE) :"
|
$ECHO "Errors are (from $TIMEFILE) :"
|
||||||
$CAT < $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() {
|
prefix_to_8() {
|
||||||
@@ -1309,6 +1309,9 @@ run_testcase ()
|
|||||||
skip_inc
|
skip_inc
|
||||||
$ECHO "$RES$RES_SPACE [ skipped ]"
|
$ECHO "$RES$RES_SPACE [ skipped ]"
|
||||||
else
|
else
|
||||||
|
if [ $res -gt 2 ]; then
|
||||||
|
$ECHO "mysqltest returned unexpected code $res, it has probably crashed" >> $TIMEFILE
|
||||||
|
fi
|
||||||
total_inc
|
total_inc
|
||||||
fail_inc
|
fail_inc
|
||||||
$ECHO "$RES$RES_SPACE [ fail ]"
|
$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);
|
strxmov(get_charsets_dir(buf), cs->csname, ".xml", NullS);
|
||||||
my_read_charset_file(buf,flags);
|
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);
|
pthread_mutex_unlock(&THR_LOCK_charset);
|
||||||
return cs;
|
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));
|
VOID(pthread_mutex_lock(&LOCK_mysql_create_db));
|
||||||
|
|
||||||
// do not alter database if another thread is holding read lock
|
// do not alter database if another thread is holding read lock
|
||||||
if (wait_if_global_read_lock(thd,0))
|
if ((error=wait_if_global_read_lock(thd,0)))
|
||||||
{
|
|
||||||
error= -1;
|
|
||||||
goto exit2;
|
goto exit2;
|
||||||
}
|
|
||||||
|
|
||||||
/* Check directory */
|
/* Check directory */
|
||||||
(void)sprintf(path,"%s/%s/%s", mysql_data_home, db, MY_DB_OPT_FILE);
|
(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);
|
start_waiting_global_read_lock(thd);
|
||||||
exit2:
|
exit2:
|
||||||
VOID(pthread_mutex_unlock(&LOCK_mysql_create_db));
|
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