| Bug #18985 | mysqlslap test fails | ||
|---|---|---|---|
| Submitted: | 10 Apr 2006 19:59 | Modified: | 11 Apr 2006 20:48 |
| Reporter: | Brian Pontz | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.1.9-pre | OS: | sol10-amd64, sol10-sparc-64bit |
| Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[10 Apr 2006 19:59]
Brian Pontz
[11 Apr 2006 20:48]
Magnus Blåudd
child segfault when tring to call "mysql_error(NULL)", fiexed by not assigning "mysql" variable from return value of mysql_real_connect.
[12 Apr 2006 14:32]
Magnus Blåudd
diff -Nru a/client/mysqlslap.c b/client/mysqlslap.c
--- a/client/mysqlslap.c 2006-04-12 10:11:58 +02:00
+++ b/client/mysqlslap.c 2006-04-12 10:11:58 +02:00
@@ -1132,42 +1137,36 @@
my_lock(lock_file, F_RDLCK, 0, F_TO_EOF, MYF(0));
if (!opt_only_print)
{
- if (!(mysql= mysql_real_connect(mysql, host, user, opt_password,
- create_schema_string,
- opt_mysql_port,
- opt_mysql_unix_port,
- 0)))
+ if (!(mysql_real_connect(mysql, host, user, opt_password,
+ create_schema_string,
+ opt_mysql_port,
+ opt_mysql_unix_port,
+ 0)))
{
fprintf(stderr,"%s: %s\n",my_progname,mysql_error(mysql));
goto end;
}
}
DBUG_PRINT("info", ("connected."));
