diff options
author | unknown <monty@mysql.com> | 2004-04-06 12:13:43 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-04-06 12:13:43 +0300 |
commit | 6a868cca91198c14999f26b5da8a137bb320d7ba (patch) | |
tree | 509557fea33580a9b087dce685c789de3664b19e | |
parent | 66de313563a74099d416767fec884ab590530d31 (diff) | |
download | mariadb-git-6a868cca91198c14999f26b5da8a137bb320d7ba.tar.gz |
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
-rw-r--r-- | myisam/mi_write.c | 2 | ||||
-rw-r--r-- | mysql-test/r/lowercase_table2.result | 4 | ||||
-rw-r--r-- | sql/filesort.cc | 15 | ||||
-rw-r--r-- | sql/ha_myisam.cc | 7 | ||||
-rw-r--r-- | sql/mysqld.cc | 8 | ||||
-rw-r--r-- | sql/sql_base.cc | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 2 | ||||
-rw-r--r-- | sql/sql_table.cc | 8 |
8 files changed, 28 insertions, 20 deletions
diff --git a/myisam/mi_write.c b/myisam/mi_write.c index 59819b40f96..c17f47fc1ae 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -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++) { diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result index 737d49fc340..c29d52ffffc 100644 --- a/mysql-test/r/lowercase_table2.result +++ b/mysql-test/r/lowercase_table2.result @@ -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) diff --git a/sql/filesort.cc b/sql/filesort.cc index a15ffb43f6f..8699a517661 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -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; } } diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 6ac3c52fe40..427edde2f4b 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -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; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 62ec6bc1027..e5c996c663f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -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; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index f3bf0a15745..dce08cf59c4 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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); diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 506a5deda91..021064c6bfc 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -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 && diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 5e358f76d3f..442774744b8 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -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 | |