Commit 6a868cca authored by unknown's avatar unknown

Fixed warnings from valgrind (not a bug)

Don't add -debug to server version if MYSQL_SERVER_PREFIX is used
Indentation cleanups


myisam/mi_write.c:
  Indentation cleanup
mysql-test/r/lowercase_table2.result:
  Fixed test results
sql/filesort.cc:
  Fixed warnings from valgrind (not a bug)
sql/ha_myisam.cc:
  Indentation cleanup
sql/mysqld.cc:
  Don't add -debug to server if MYSQL_SERVER_PREFIX is used
sql/sql_base.cc:
  Indentation cleanup
sql/sql_show.cc:
  Fixed typo in comment
sql/sql_table.cc:
  Indentation cleanup
parent 66de3135
......@@ -917,7 +917,7 @@ int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows)
DBUG_PRINT("enter",("cache_size: %lu", cache_size));
DBUG_ASSERT(!info->bulk_insert &&
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT));
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT));
for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++)
{
......
......@@ -13,7 +13,7 @@ SHOW CREATE TABLE T1;
Table Create Table
T1 CREATE TABLE `T1` (
`a` int(11) default NULL
) TYPE=MyISAM
) ENGINE=MyISAM DEFAULT CHARSET=latin1
RENAME TABLE T1 TO T2;
SHOW TABLES LIKE "T2";
Tables_in_test (T2)
......@@ -68,7 +68,7 @@ SHOW CREATE TABLE T1;
Table Create Table
T1 CREATE TABLE `T1` (
`a` int(11) default NULL
) TYPE=InnoDB
) ENGINE=InnoDB DEFAULT CHARSET=latin
RENAME TABLE T1 TO T2;
SHOW TABLES LIKE "T2";
Tables_in_test (T2)
......
......@@ -663,9 +663,22 @@ static void make_sortkey(register SORTPARAM *param,
for ( ; (field= addonf->field) ; addonf++)
{
if (addonf->null_bit && field->is_null())
{
nulls[addonf->null_offset]|= addonf->null_bit;
#ifdef HAVE_purify
bzero(to, addonf->length);
#endif
}
else
field->pack((char *) to, field->ptr);
{
uchar *end= (uchar*) field->pack((char *) to, field->ptr);
#ifdef HAVE_purify
uint length= (uint) ((to + addonf->length) - end);
DBUG_ASSERT((int) length >= 0);
if (length)
bzero(end, length);
#endif
}
to+= addonf->length;
}
}
......
......@@ -841,14 +841,11 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows)
if (file->state->records == 0 &&
(!rows || rows >= MI_MIN_ROWS_TO_DISABLE_INDEXES))
mi_disable_non_unique_index(file,rows);
else
if (!file->bulk_insert &&
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT))
{
else if (!file->bulk_insert &&
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT))
mi_init_bulk_insert(file,
current_thd->variables.bulk_insert_buff_size,
rows);
}
}
}
enable_activate_all_index=1;
......
......@@ -2105,13 +2105,11 @@ static int init_common_variables(const char *conf_file_name, int argc,
strmov(fn_ext(pidfile_name),".pid"); // Add proper extension
#ifndef DBUG_OFF
if (*(MYSQL_SERVER_SUFFIX))
strxmov(strend(server_version),MYSQL_SERVER_SUFFIX,"-debug",NullS);
if (!*(MYSQL_SERVER_SUFFIX))
strmov(strend(server_version),"-debug");
else
strmov(strend(server_version),"--debug");
#else
strmov(strend(server_version),MYSQL_SERVER_SUFFIX);
#endif
strmov(strend(server_version),MYSQL_SERVER_SUFFIX);
load_defaults(conf_file_name, groups, &argc, &argv);
defaults_argv=argv;
......
......@@ -1805,7 +1805,7 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length,
if (cached_field_index < table->fields &&
!my_strcasecmp(system_charset_info,
table->field[cached_field_index]->field_name, name))
field_ptr= table->field + cached_field_index;
field_ptr= table->field + cached_field_index;
else if (table->name_hash.records)
field_ptr= (Field**)hash_search(&table->name_hash,(byte*) name,
length);
......
......@@ -1279,7 +1279,7 @@ store_create_info(THD *thd, TABLE *table, String *packet)
/*
Again we are using CURRENT_TIMESTAMP instead of NOW becaus eit is
Again we are using CURRENT_TIMESTAMP instead of NOW because it is
more standard
*/
has_now_default= table->timestamp_field == field &&
......
......@@ -628,15 +628,15 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
if (!timestamps)
{
sql_field->unireg_check= Field::TIMESTAMP_DNUN_FIELD;
++timestamps_with_niladic;
timestamps_with_niladic++;
}
else
sql_field->unireg_check= Field::NONE;
}
else if(sql_field->unireg_check != Field::NONE)
++timestamps_with_niladic;
else if (sql_field->unireg_check != Field::NONE)
timestamps_with_niladic++;
++timestamps;
timestamps++;
/* fall-through */
default:
sql_field->pack_flag=(FIELDFLAG_NUMBER |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment