summaryrefslogtreecommitdiff
path: root/client/mysql.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-01-24 15:48:25 +0100
committerunknown <serg@serg.mylan>2005-01-24 15:48:25 +0100
commit8bdb500105f97e3007e652f73d99c373d38f2aad (patch)
treed0b61b703f3c601368669e4acab45d7567a4669b /client/mysql.cc
parent3671fe1f72e02393d2a42c4defead8b5633c4394 (diff)
downloadmariadb-git-8bdb500105f97e3007e652f73d99c373d38f2aad.tar.gz
fixes/cleanups according to Coverity report
Diffstat (limited to 'client/mysql.cc')
-rw-r--r--client/mysql.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index 480a0deb347..635973e946c 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1430,12 +1430,6 @@ static void build_completion_hash(bool rehash, bool write_info)
if (status.batch || quick || !current_db)
DBUG_VOID_RETURN; // We don't need completion in batches
- if (tables)
- {
- mysql_free_result(tables);
- tables=0;
- }
-
/* hash SQL commands */
while (cmd->name) {
add_word(&ht,(char*) cmd->name);
@@ -1681,8 +1675,8 @@ static int com_server_help(String *buffer __attribute__((unused)),
else if (num_fields >= 2 && num_rows)
{
init_pager();
- char last_char;
-
+ char last_char= 0;
+
int num_name= 0, num_cat= 0;
LINT_INIT(num_name);
LINT_INIT(num_cat);
@@ -1693,7 +1687,6 @@ static int com_server_help(String *buffer __attribute__((unused)),
put_info("To make a more specific request, please type 'help <item>',\nwhere <item> is one of the following", INFO_INFO);
num_name= 0;
num_cat= 1;
- last_char= '_';
}
else if ((cur= mysql_fetch_row(result)))
{
@@ -1703,7 +1696,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
num_cat= 2;
print_help_item(&cur,1,2,&last_char);
}
-
+
while ((cur= mysql_fetch_row(result)))
print_help_item(&cur,num_name,num_cat,&last_char);
tee_fprintf(PAGER, "\n");