diff options
author | unknown <monty@mysql.com> | 2005-07-28 21:25:05 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-07-28 21:25:05 +0300 |
commit | d2810c56cf3e23553038e52d99d89624fff79e96 (patch) | |
tree | b252523c60a966126c131c027e46d75b320daaba | |
parent | 167fb5f17025966046b2459531b27462b5c77c9a (diff) | |
download | mariadb-git-d2810c56cf3e23553038e52d99d89624fff79e96.tar.gz |
Fixed compiler warnings
client/mysqldump.c:
Fixed wrong argument to printf()
client/mysqltest.c:
Fixed compiler warning
myisam/ft_boolean_search.c:
Fixed compiler warning
myisammrg/myrg_static.c:
Fixed compiler warning
mysql-test/r/rpl_drop_temp.result:
Drop used database
mysql-test/t/rpl_drop_temp.test:
Drop used database
ndb/src/common/logger/LogHandler.cpp:
Fixed compiler warning
sql/field.cc:
Fixed compiler warning
sql/ha_ndbcluster.cc:
Fixed compiler warning
sql/sql_base.cc:
Fixed compiler warning
tests/mysql_client_test.c:
Fixed compiler warning
-rw-r--r-- | client/mysqldump.c | 2 | ||||
-rw-r--r-- | client/mysqltest.c | 1 | ||||
-rw-r--r-- | myisam/ft_boolean_search.c | 1 | ||||
-rw-r--r-- | myisammrg/myrg_static.c | 2 | ||||
-rw-r--r-- | mysql-test/r/rpl_drop_temp.result | 1 | ||||
-rw-r--r-- | mysql-test/t/rpl_drop_temp.test | 2 | ||||
-rw-r--r-- | ndb/src/common/logger/LogHandler.cpp | 2 | ||||
-rw-r--r-- | sql/field.cc | 2 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 1 | ||||
-rw-r--r-- | sql/sql_base.cc | 1 | ||||
-rw-r--r-- | tests/mysql_client_test.c | 5 |
11 files changed, 14 insertions, 6 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index d29667052ee..69f323fd8ec 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -2370,7 +2370,7 @@ static int do_show_master_status(MYSQL *mysql_con) { /* SHOW MASTER STATUS reports nothing and --force is not enabled */ my_printf_error(0, "Error: Binlogging on server not active", - MYF(0), mysql_error(mysql_con)); + MYF(0)); mysql_free_result(master); return 1; } diff --git a/client/mysqltest.c b/client/mysqltest.c index b23b77e9bca..29ccbc3e1b8 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2654,6 +2654,7 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags) if (!disable_result_log) { ulong affected_rows; /* Ok to be undef if 'disable_info' is set */ + LINT_INIT(affected_rows); if (res) { diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 8045ddd4657..f1ff8f6d886 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -210,6 +210,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) MI_INFO *info=ftb->info; uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength; byte *lastkey_buf=ftbw->word+ftbw->off; + LINT_INIT(off); if (ftbw->flags & FTB_FLAG_TRUNC) lastkey_buf+=ftbw->len; diff --git a/myisammrg/myrg_static.c b/myisammrg/myrg_static.c index b21b834ac24..9e76cbae07b 100644 --- a/myisammrg/myrg_static.c +++ b/myisammrg/myrg_static.c @@ -27,4 +27,4 @@ LIST *myrg_open_list=0; static const char *merge_insert_methods[] = { "FIRST", "LAST", NullS }; TYPELIB merge_insert_method= { array_elements(merge_insert_methods)-1,"", - merge_insert_methods}; + merge_insert_methods, 0}; diff --git a/mysql-test/r/rpl_drop_temp.result b/mysql-test/r/rpl_drop_temp.result index e00309cac8f..04fe094ea26 100644 --- a/mysql-test/r/rpl_drop_temp.result +++ b/mysql-test/r/rpl_drop_temp.result @@ -10,3 +10,4 @@ create temporary table mysqltest.t2 (n int); show status like 'Slave_open_temp_tables'; Variable_name Value Slave_open_temp_tables 0 +drop database mysqltest; diff --git a/mysql-test/t/rpl_drop_temp.test b/mysql-test/t/rpl_drop_temp.test index e1c06ef4473..18fc17ed064 100644 --- a/mysql-test/t/rpl_drop_temp.test +++ b/mysql-test/t/rpl_drop_temp.test @@ -11,5 +11,7 @@ disconnect master; connection slave; --real_sleep 3; # time for DROP to be written show status like 'Slave_open_temp_tables'; +connection default; +drop database mysqltest; # End of 4.1 tests diff --git a/ndb/src/common/logger/LogHandler.cpp b/ndb/src/common/logger/LogHandler.cpp index a9d4512112f..521bd346fd3 100644 --- a/ndb/src/common/logger/LogHandler.cpp +++ b/ndb/src/common/logger/LogHandler.cpp @@ -58,7 +58,7 @@ LogHandler::append(const char* pCategory, Logger::LoggerLevel level, } else // repeated message { - if (now < m_last_log_time+m_max_repeat_frequency) + if (now < (time_t) (m_last_log_time+m_max_repeat_frequency)) { m_count_repeated_messages++; m_now= now; diff --git a/sql/field.cc b/sql/field.cc index 39a99830b14..6d2f92e27ea 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5003,7 +5003,7 @@ int Field_str::store(double nr) double anr= fabs(nr); int neg= (nr < 0.0) ? 1 : 0; if (char_length > 4 && char_length < 32 && - (anr < 1.0 ? anr > 1/(log_10[max(0,char_length-neg-2)]) /* -2 for "0." */ + (anr < 1.0 ? anr > 1/(log_10[max(0,(int) char_length-neg-2)]) /* -2 for "0." */ : anr < log_10[char_length-neg]-1)) use_scientific_notation= FALSE; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index e14d4b13311..6a8fde36e30 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2413,6 +2413,7 @@ void ha_ndbcluster::print_results() break; } case NdbDictionary::Column::Undefined: + default: fprintf(DBUG_FILE, "Unknown type: %d", col->getType()); break; } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index ed09af5e070..1cedc89ef97 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2186,6 +2186,7 @@ find_item_in_list(Item *find, List<Item> &items, uint *counter, bool found_unaliased_non_uniq= 0; uint unaliased_counter; + LINT_INIT(unaliased_counter); *unaliased= FALSE; if (find->type() == Item::FIELD_ITEM || find->type() == Item::REF_ITEM) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 139595a5471..37d6d951f96 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -6805,6 +6805,7 @@ static void test_set_option() bug #89 (reported by mark@mysql.com) */ +#ifndef EMBEDDED_LIBRARY static void test_prepare_grant() { int rc; @@ -6896,7 +6897,7 @@ static void test_prepare_grant() } } - +#endif /* EMBEDDED_LIBRARY */ /* Test a crash when invalid/corrupted .frm is used in the @@ -11566,7 +11567,7 @@ static void test_bug8330() const char *stmt_text; MYSQL_STMT *stmt[2]; int i, rc; - char *query= "select a,b from t1 where a=?"; + const char *query= "select a,b from t1 where a=?"; MYSQL_BIND bind[2]; long lval[2]; |