diff options
author | unknown <monty@donna.mysql.fi> | 2001-04-25 22:44:27 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-04-25 22:44:27 +0300 |
commit | 97907ee8d723a9143734655151153e2c6243ab28 (patch) | |
tree | 681105409812886e617023277721945b0d24d385 /client/mysqladmin.c | |
parent | 028c259d0cf1c9b7d1d0819c10c689e602bb8482 (diff) | |
download | mariadb-git-97907ee8d723a9143734655151153e2c6243ab28.tar.gz |
Portability fixes for Ia64 and Sgi compiler
DROP DATABASE in mysqladmin asks for confirmation (again)
Added examined_rows to slow query log
SHOW CREATE for TEMPORARY table
BitKeeper/deleted/.del-shw000001.result~8b20b03d8319b9a5:
Delete: mysql-test/r/shw000001.result
BitKeeper/deleted/.del-shw000001.test~770d96a2c1c65b20:
Delete: mysql-test/t/shw000001.test
Docs/manual.texi:
Added information about InnoDB and TEMPORARY tables
acinclude.m4:
Portability fixes
client/errmsg.c:
merge with libmysqd/errmsg.c
client/mysqladmin.c:
DROP DATABASE asks for confirmation (again)
client/mysqltest.c:
Portability fixes
configure.in:
Portability fixes for SGI compiler on Ia64
extra/resolve_stack_dump.c:
Portability fixes
include/global.h:
Portability fixes
isam/_dbug.c:
Portability fixes
mysql-test/mysql-test-run.sh:
Portability fixes
mysql-test/r/show_check.result:
New test for SHOW CREATE
mysql-test/t/show_check.test:
New test for SHOW CREATE
scripts/make_binary_distribution.sh:
Added missing files
sql/filesort.cc:
Added examined_rows to slow query log
sql/log.cc:
Added examined_rows to slow query log
sql/mysql_priv.h:
Added examined_rows to slow query log
sql/mysqlbinlog.cc:
Fixed core dump when using wrong option
sql/mysqld.cc:
Removed not used argument
sql/sql_base.cc:
Fixed name problem with SHOW CREATE for TEMPORARY table
sql/sql_class.h:
Added examined_rows to slow query log
sql/sql_parse.cc:
Added examined_rows to slow query log
sql/sql_select.cc:
Added examined_rows to slow query log
sql/sql_select.h:
Added examined_rows to slow query log
sql/sql_show.cc:
Fixed SHOW CREATE for TEMPORARY table
sql/sql_table.cc:
Added examined_rows to slow query log
Diffstat (limited to 'client/mysqladmin.c')
-rw-r--r-- | client/mysqladmin.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c index bda86c881e3..007be803cfc 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -28,7 +28,7 @@ #include <my_pthread.h> /* because of signal() */ #endif -#define ADMIN_VERSION "8.19" +#define ADMIN_VERSION "8.20" #define MAX_MYSQL_VAR 64 #define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */ #define MAX_TRUNC_LENGTH 3 @@ -423,13 +423,8 @@ static my_bool execute_commands(MYSQL *mysql,int argc, char **argv) my_printf_error(0,"Too few arguments to drop",MYF(ME_BELL)); return 1; } - sprintf(buff,"drop database `%.*s`",FN_REFLEN,argv[1]); - if (mysql_query(mysql,buff)) - { - my_printf_error(0,"DROP DATABASE failed; error: '%-.200s'", - MYF(ME_BELL), mysql_error(mysql)); + if (drop_db(mysql,argv[1])) return 1; - } argc--; argv++; break; } @@ -867,7 +862,8 @@ static int drop_db(MYSQL *mysql, const char *db) { puts("Dropping the database is potentially a very bad thing to do."); puts("Any data stored in the database will be destroyed.\n"); - printf("Do you really want to drop the '%s' database [y/N]\n",db); + printf("Do you really want to drop the '%s' database [y/N] ",db); + fflush(stdout); VOID(fgets(buf,sizeof(buf)-1,stdin)); if ((*buf != 'y') && (*buf != 'Y')) { @@ -878,7 +874,7 @@ static int drop_db(MYSQL *mysql, const char *db) sprintf(name_buff,"drop database %.*s",FN_REFLEN,db); if (mysql_query(mysql,name_buff)) { - my_printf_error(0,"drop of '%s' failed;\nerror: '%s'",MYF(ME_BELL), + my_printf_error(0,"DROP DATABASE %s failed;\nerror: '%s'",MYF(ME_BELL), db,mysql_error(mysql)); return 1; } |