1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Cleanups after review of WL#602

Fixed warnings from test suite
Some fixes in mysql-test-run script to catch more warnings


mysql-test/lib/mtr_report.pl:
  Catch more warnings
mysql-test/mysql-test-run.sh:
  Catch warnings from mysqld
mysql-test/t/mysqldump.test:
  Add key_block_size to catch future changes in information schema
mysys/errors.c:
  Ensure that mysql-test-run catches if we call my_close() too many times
sql/handler.cc:
  Initialize all elements
sql/log.cc:
  true -> TRUE
sql/sql_class.h:
  Review change: key_info -> key_create_info
sql/sql_lex.h:
  Review change: key_info -> key_create_info
sql/sql_table.cc:
  Review change: key_info -> key_create_info
  Don't call mysql_close() if init_ddl_log is not called.
  Better error handling in init_ddl_log
sql/sql_yacc.yy:
  Review change: key_info -> key_create_info
This commit is contained in:
unknown
2006-05-03 19:40:52 +03:00
parent 8e2650ab3d
commit 3c099551d0
10 changed files with 46 additions and 35 deletions

View File

@@ -231,7 +231,7 @@ static int mysql_copy_key_list(List<Key> *orig_key,
}
}
if (!(temp_key= new Key(prep_key->type, prep_key->name,
&prep_key->key_info,
&prep_key->key_create_info,
prep_key->generated,
prep_columns)))
{
@@ -507,12 +507,14 @@ bool read_ddl_log_entry(uint read_entry, DDL_LOG_ENTRY *ddl_log_entry)
Initialise ddl log
SYNOPSIS
init_ddl_log()
RETURN VALUES
TRUE Error
FALSE Success
DESCRIPTION
Write the header of the ddl log file and length of names. Also set
number of entries to zero.
RETURN VALUES
TRUE Error
FALSE Success
*/
static bool init_ddl_log()
@@ -522,9 +524,8 @@ static bool init_ddl_log()
DBUG_ENTER("init_ddl_log");
if (global_ddl_log.inited)
{
DBUG_RETURN(FALSE);
}
goto end;
global_ddl_log.io_size= IO_SIZE;
create_ddl_log_file_name(file_name);
if ((global_ddl_log.file_id= my_create(file_name,
@@ -539,9 +540,12 @@ static bool init_ddl_log()
global_ddl_log.inited= TRUE;
if (write_ddl_log_header())
{
VOID(my_close(global_ddl_log.file_id, MYF(MY_WME)));
global_ddl_log.inited= FALSE;
DBUG_RETURN(TRUE);
}
end:
DBUG_RETURN(FALSE);
}
@@ -1129,7 +1133,11 @@ void release_ddl_log()
my_free((char*)free_list, MYF(0));
free_list= tmp;
}
VOID(my_close(global_ddl_log.file_id, MYF(0)));
if (global_ddl_log.inited)
{
global_ddl_log.inited= 0;
VOID(my_close(global_ddl_log.file_id, MYF(MY_WME)));
}
pthread_mutex_unlock(&LOCK_gdl);
VOID(pthread_mutex_destroy(&LOCK_gdl));
DBUG_VOID_RETURN;
@@ -2500,7 +2508,7 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
break;
case Key::FULLTEXT:
key_info->flags= HA_FULLTEXT;
if ((key_info->parser_name= &key->key_info.parser_name)->str)
if ((key_info->parser_name= &key->key_create_info.parser_name)->str)
key_info->flags|= HA_USES_PARSER;
else
key_info->parser_name= 0;
@@ -2527,7 +2535,7 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
key_info->key_parts=(uint8) key->columns.elements;
key_info->key_part=key_part_info;
key_info->usable_key_parts= key_number;
key_info->algorithm= key->key_info.algorithm;
key_info->algorithm= key->key_create_info.algorithm;
if (key->type == Key::FULLTEXT)
{
@@ -2578,8 +2586,8 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
TODO: Add warning if block size changes. We can't do it here, as
this may depend on the size of the key
*/
key_info->block_size= (key->key_info.block_size ?
key->key_info.block_size :
key_info->block_size= (key->key_create_info.block_size ?
key->key_create_info.block_size :
create_info->key_block_size);
if (key_info->block_size)
@@ -5476,7 +5484,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
while ((prep_col= prep_col_it++))
prep_columns.push_back(new key_part_spec(*prep_col));
prepared_key_list.push_back(new Key(prep_key->type, prep_key->name,
&prep_key->key_info,
&prep_key->key_create_info,
prep_key->generated, prep_columns));
}