Bug #32221 bug25714, mytest, mysql_client_test complaints and crashes
Submitted: 9 Nov 2007 11:17 Modified: 9 Jan 2008 15:06
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.0.50, 6.0.3, 5.1.22 OS:Windows
Assigned to: Alexey Kopytov CPU Architecture:Any
Tags: bug25714, mysql_client_test, mysqlslap, mytest

[9 Nov 2007 11:17] Shane Bester
Description:
I tried to find out what is mytest.exe in the distributions.

mytest --help crashed.

libmysql.dll!mysql_fetch_field(st_mysql_res * result=0x0000000000000000)
myTest.exe!main(int argc=0x00000002, char * * argv=0x000000000038ed40)
myTest.exe!__tmainCRTStartup()
myTest.exe!mainCRTStartup()
kernel32.dll!BaseProcessStart()

else
{
    printf("Got error %s when retreiving processlist\n",mysql_error(myData));
}
//....
res = mysql_list_tables( myData, "%" ) ; l = 1 ;
  for ( x = 0 ; fd = mysql_fetch_field( res ) ; x++ )

res was zero.

How to repeat:
start a mysql server on port 3306.

mytest.exe --help
mytest.exe a
mytest.exe b

Suggested fix:
fix the typo s/retreiving/retrieving/
fix the crash. add some help text, or 'about' .. ? or don't package this app?
[9 Nov 2007 11:22] MySQL Verification Team
why is bug25714.exe included in the distros?  What does it do?

E:\mysql-6.0.3-alpha-win32\bin>bug25714.exe --help

0 inserted
0 inserted
[9 Nov 2007 11:29] MySQL Verification Team
5.1.22 and 6.0.3:  mysqlslap.exe crashes apon execution with no parameters.
[9 Nov 2007 11:31] MySQL Verification Team
imho, this is embarrassing.  what are all these low quality programs going in our distributions for?? either they must be written properly or removed...
[9 Nov 2007 11:34] MySQL Verification Team
mysql_client_test crashes too.

E:\mysql-6.0.3-alpha-win32\bin>mysql_client_test.exe -uroot

#####################################
client_connect
#####################################

 Establishing a connection to '' ...OK
Connected to MySQL server version: 5.0.45-community-debug-log (50045)

 Creating a test database 'client_test_db' ...OK

#####################################
1 of (1/1): test_view_sp_list_fields
#####################################

 [MySQL-5.0.45-community-debug-log][1307] Failed to CREATE FUNCTION f1
.\mysql_client_test.c:13232: check failed: 'r == 0'

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
[16 Nov 2007 14:32] MySQL Verification Team
mysqlslap crash handled in bug #31173
[19 Nov 2007 15:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/38076

ChangeSet@1.2548, 2007-11-19 18:59:25+03:00, kaa@polly.(none) +13 -0
  Fix for bug #32221: bug25714, mytest, mysql_client_test complaints and
  crashes.
  
  MySQL distributions contain a number of programs that are used only by
  the MySQL test suite internally, i.e. they are not indended to be
  invoked directly by a user. As a result, such programs are not
  documented, do not have any built-in help or proper error reporting,
  which may confuse users.
  
  This patch fixes the problem with the following changes:
  - mytest, libmysqltest and all references to them were removed from the
  distribution since they are not used anymore
  - bug25714 now displays an error message when run with incorrect
  arguments or with the --help option
  - mysql_client_test now does not call abort() in case of errors,
  instead it does a clean exit() with a proper error status.
[22 Nov 2007 14:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/38281

ChangeSet@1.2549, 2007-11-22 17:13:12+03:00, kaa@polly.(none) +1 -0
  Fixed build failures on Windows introduced by the patch for bug #32221.
  We do not have any executables in libmysql/release/ anymore.
[14 Dec 2007 8:15] Bugs System
Pushed into 5.0.54
[14 Dec 2007 8:18] Bugs System
Pushed into 5.1.23-rc
[14 Dec 2007 8:21] Bugs System
Pushed into 6.0.5-alpha
[9 Jan 2008 15:06] Paul DuBois
Noted in 5.0.54, 5.1.23, 6.0.5 changelogs.

Various test program cleanups were made: 1) mytest and libmysqltest
were removed. 2) bug25714 displays an error message when invoked with
incorrect arguments or the --help option. 3) mysql_client_test exits
cleanly with a proper error status.