From 83f485968f643cc87573d57be6944ff32b18d79a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Jun 2004 23:50:04 +0200 Subject: API change: mysql_shutdown() now requires a 2nd argument, the shutdown level. mysqld >=4.1.3 will however understand shutdown requests sent by clients <4.1.3. And mysqld <4.1.3 will understand shutdown requests sent by clients >=4.1.3 (it will ignore the level). Those shutdown level are just PLACEHOLDERS now. So this change is just to make the 4.1 API suitable before it is frozen. Later we will actually implement the shutdown levels. VC++Files/winmysqladmin/main.cpp: 2nd argument to mysql_shutdown() VC++Files/winmysqladmin/mysql.h: 2nd argument to mysql_shutdown() VC++Files/winmysqladmin/mysql_com.h: Several types of shutdown now. include/mysql_com.h: SHUTDOWN_DEFAULT is now 0 instead of 255, this saves one test in sql_parse.cc libmysql/libmysql.c: correcting mistake (how come that my tests still all worked with this? - should recheck, for curiosity). sql/sql_parse.cc: with SHUTDOWN_DEFAULT==0, no need for testing packet_length. --- libmysql/libmysql.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libmysql') diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 1e8244e670b..7135488aade 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1290,8 +1290,7 @@ mysql_shutdown(MYSQL *mysql, enum enum_shutdown_level shutdown_level) uchar level[1]; level[0]= (uchar) shutdown_level; DBUG_ENTER("mysql_shutdown"); - DBUG_RETURN(simple_command(mysql, COM_SHUTDOWN, - &level, 1, 0)); + DBUG_RETURN(simple_command(mysql, COM_SHUTDOWN, (char *)level, 1, 0)); } -- cgit v1.2.1