mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Applied patches for BDB tables
Fixes to InnoDB to compile on Windows Fix for temporary InnoDB tables Fixed bug in REPLACE() Fixed sub char keys for InnoDB
This commit is contained in:
@ -479,12 +479,16 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
}
|
||||
}
|
||||
else if (column->length > length ||
|
||||
(f_is_packed(sql_field->pack_flag) && column->length != length))
|
||||
((f_is_packed(sql_field->pack_flag) ||
|
||||
((file->option_flag() & HA_NO_PREFIX_CHAR_KEYS) &&
|
||||
(key_info->flags & HA_NOSAME))) &&
|
||||
column->length != length))
|
||||
{
|
||||
my_error(ER_WRONG_SUB_KEY,MYF(0));
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
length=column->length;
|
||||
if (!(file->option_flag() & HA_NO_PREFIX_CHAR_KEYS))
|
||||
length=column->length;
|
||||
}
|
||||
else if (length == 0)
|
||||
{
|
||||
@ -1426,21 +1430,20 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
|
||||
create_info,
|
||||
create_list,key_list,1,1))) // no logging
|
||||
DBUG_RETURN(error);
|
||||
|
||||
if (table->tmp_table)
|
||||
new_table=open_table(thd,new_db,tmp_name,tmp_name,0);
|
||||
else
|
||||
{
|
||||
if (table->tmp_table)
|
||||
new_table=open_table(thd,new_db,tmp_name,tmp_name,0);
|
||||
else
|
||||
{
|
||||
char path[FN_REFLEN];
|
||||
(void) sprintf(path,"%s/%s/%s",mysql_data_home,new_db,tmp_name);
|
||||
fn_format(path,path,"","",4);
|
||||
new_table=open_temporary_table(thd, path, new_db, tmp_name,0);
|
||||
}
|
||||
if (!new_table)
|
||||
{
|
||||
VOID(quick_rm_table(new_db_type,new_db,tmp_name));
|
||||
goto err;
|
||||
}
|
||||
char path[FN_REFLEN];
|
||||
(void) sprintf(path,"%s/%s/%s",mysql_data_home,new_db,tmp_name);
|
||||
fn_format(path,path,"","",4);
|
||||
new_table=open_temporary_table(thd, path, new_db, tmp_name,0);
|
||||
}
|
||||
if (!new_table)
|
||||
{
|
||||
VOID(quick_rm_table(new_db_type,new_db,tmp_name));
|
||||
goto err;
|
||||
}
|
||||
|
||||
save_time_stamp=new_table->time_stamp;
|
||||
|
Reference in New Issue
Block a user