mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Fixed warnings from valgrind (not a bug)
Don't add -debug to server version if MYSQL_SERVER_PREFIX is used Indentation cleanups
This commit is contained in:
@@ -13,7 +13,7 @@ SHOW CREATE TABLE T1;
|
|||||||
Table Create Table
|
Table Create Table
|
||||||
T1 CREATE TABLE `T1` (
|
T1 CREATE TABLE `T1` (
|
||||||
`a` int(11) default NULL
|
`a` int(11) default NULL
|
||||||
) TYPE=MyISAM
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
RENAME TABLE T1 TO T2;
|
RENAME TABLE T1 TO T2;
|
||||||
SHOW TABLES LIKE "T2";
|
SHOW TABLES LIKE "T2";
|
||||||
Tables_in_test (T2)
|
Tables_in_test (T2)
|
||||||
@@ -68,7 +68,7 @@ SHOW CREATE TABLE T1;
|
|||||||
Table Create Table
|
Table Create Table
|
||||||
T1 CREATE TABLE `T1` (
|
T1 CREATE TABLE `T1` (
|
||||||
`a` int(11) default NULL
|
`a` int(11) default NULL
|
||||||
) TYPE=InnoDB
|
) ENGINE=InnoDB DEFAULT CHARSET=latin
|
||||||
RENAME TABLE T1 TO T2;
|
RENAME TABLE T1 TO T2;
|
||||||
SHOW TABLES LIKE "T2";
|
SHOW TABLES LIKE "T2";
|
||||||
Tables_in_test (T2)
|
Tables_in_test (T2)
|
||||||
|
@@ -663,9 +663,22 @@ static void make_sortkey(register SORTPARAM *param,
|
|||||||
for ( ; (field= addonf->field) ; addonf++)
|
for ( ; (field= addonf->field) ; addonf++)
|
||||||
{
|
{
|
||||||
if (addonf->null_bit && field->is_null())
|
if (addonf->null_bit && field->is_null())
|
||||||
|
{
|
||||||
nulls[addonf->null_offset]|= addonf->null_bit;
|
nulls[addonf->null_offset]|= addonf->null_bit;
|
||||||
|
#ifdef HAVE_purify
|
||||||
|
bzero(to, addonf->length);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else
|
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;
|
to+= addonf->length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -841,16 +841,13 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows)
|
|||||||
if (file->state->records == 0 &&
|
if (file->state->records == 0 &&
|
||||||
(!rows || rows >= MI_MIN_ROWS_TO_DISABLE_INDEXES))
|
(!rows || rows >= MI_MIN_ROWS_TO_DISABLE_INDEXES))
|
||||||
mi_disable_non_unique_index(file,rows);
|
mi_disable_non_unique_index(file,rows);
|
||||||
else
|
else if (!file->bulk_insert &&
|
||||||
if (!file->bulk_insert &&
|
|
||||||
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT))
|
(!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT))
|
||||||
{
|
|
||||||
mi_init_bulk_insert(file,
|
mi_init_bulk_insert(file,
|
||||||
current_thd->variables.bulk_insert_buff_size,
|
current_thd->variables.bulk_insert_buff_size,
|
||||||
rows);
|
rows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
enable_activate_all_index=1;
|
enable_activate_all_index=1;
|
||||||
info(HA_STATUS_CONST); // Read new key info
|
info(HA_STATUS_CONST); // Read new key info
|
||||||
}
|
}
|
||||||
|
@@ -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
|
strmov(fn_ext(pidfile_name),".pid"); // Add proper extension
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
if (*(MYSQL_SERVER_SUFFIX))
|
if (!*(MYSQL_SERVER_SUFFIX))
|
||||||
strxmov(strend(server_version),MYSQL_SERVER_SUFFIX,"-debug",NullS);
|
strmov(strend(server_version),"-debug");
|
||||||
else
|
else
|
||||||
strmov(strend(server_version),"--debug");
|
|
||||||
#else
|
|
||||||
strmov(strend(server_version),MYSQL_SERVER_SUFFIX);
|
|
||||||
#endif
|
#endif
|
||||||
|
strmov(strend(server_version),MYSQL_SERVER_SUFFIX);
|
||||||
|
|
||||||
load_defaults(conf_file_name, groups, &argc, &argv);
|
load_defaults(conf_file_name, groups, &argc, &argv);
|
||||||
defaults_argv=argv;
|
defaults_argv=argv;
|
||||||
|
@@ -628,15 +628,15 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
|
|||||||
if (!timestamps)
|
if (!timestamps)
|
||||||
{
|
{
|
||||||
sql_field->unireg_check= Field::TIMESTAMP_DNUN_FIELD;
|
sql_field->unireg_check= Field::TIMESTAMP_DNUN_FIELD;
|
||||||
++timestamps_with_niladic;
|
timestamps_with_niladic++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sql_field->unireg_check= Field::NONE;
|
sql_field->unireg_check= Field::NONE;
|
||||||
}
|
}
|
||||||
else if (sql_field->unireg_check != Field::NONE)
|
else if (sql_field->unireg_check != Field::NONE)
|
||||||
++timestamps_with_niladic;
|
timestamps_with_niladic++;
|
||||||
|
|
||||||
++timestamps;
|
timestamps++;
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
default:
|
default:
|
||||||
sql_field->pack_flag=(FIELDFLAG_NUMBER |
|
sql_field->pack_flag=(FIELDFLAG_NUMBER |
|
||||||
|
Reference in New Issue
Block a user