Bug #18869 federated storage engine: error message missing
Submitted: 6 Apr 2006 22:21 Modified: 25 Sep 2006 21:15
Reporter: Timothy Smith Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Federated storage engine Severity:S3 (Non-critical)
Version:5.1.8 OS:Any (any)
Assigned to: Bugs System CPU Architecture:Any

[6 Apr 2006 22:21] Timothy Smith
Description:
The federated engine may deadlock, if creating a federated table which references an open table on the same server.  In that case, it currently gives an error which is evidently missing some part of the text.  The error says:

ERROR 1434 (HY000): Can't create federated table. Foreign data src error:  error: 1159  ''

Note the empty string in "error: 1159 ''".

How to repeat:
drop table if exists test, test1;
create table test(i int not null , j int not null, c varchar(30), primary key (i,j)) engine = myisam;
-- The following command causes a deadlock, which is OK.
-- But the error message is not OK.
create table test1(i int not null , j int not null, c varchar(30), primary key (i,j)) engine = federated connection='mysql://tim@127.0.0.1:33000/test/test';

mysql> drop table if exists test, test1;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> create table test(i int not null , j int not null, c varchar(30), primary key (i,j)) engine = myisam;
Query OK, 0 rows affected (0.00 sec)

mysql> create table test1(i int not null , j int not null, c varchar(30), primary key (i,j)) engine = federated connection='mysql://tim@127.0.0.1:33000/test/test';
*** NOTE: It pauses here for ~30 seconds before the error shows up. ***
ERROR 1434 (HY000): Can't create federated table. Foreign data src error:  error: 1159  ''
mysql> show variables like 'version%';
+-------------------------+---------------------------------------------------+
| Variable_name           | Value                                             |
+-------------------------+---------------------------------------------------+
| version                 | 5.1.9-beta-debug-log                              |
| version_comment         | Latest delta: 2006/04/06 1.2298 svoj@april.(none) |
| version_compile_machine | i386                                              |
| version_compile_os      | unknown-freebsd6.1                                |
+-------------------------+---------------------------------------------------+
4 rows in set (0.00 sec)

Note the empty string in "error: 1159 ''".

Suggested fix:

Perhaps a printf doesn't have enough arguments?
[25 Sep 2006 19:53] Roland Bouman
I think this is a duplicate of http://bugs.mysql.com/bug.php?id=18287
[25 Sep 2006 21:15] Calvin Sun
Dup of bug#18287.