Bug #44817 Error 157 still reported as "unknown error code" by server
Submitted: 12 May 2009 8:24 Modified: 31 Oct 2013 10:49
Reporter: Hartmut Holzgraefe Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Linux
Assigned to: CPU Architecture:Any
Tags: mysql-5.1.31-ndb-6.3.22, mysql-5.1.32-ndb-7.0.4

[12 May 2009 8:24] Hartmut Holzgraefe
Description:
Trying to read from a cluster table while the cluster is down raises error 157 "Could not connect to storage engine".

For a while the perror tool could not resolve that error code and would report "unknown error code" instead of "Could not connect to storage engine", this has been fixed though, see Bug #25177

But when trying to access a cluster table using the MySQL client API the server still returns "Got error 157 'Unknown error code' from NDBCLUSTER"

How to repeat:
- on working cluster create table t1
- see that "SELECT * FROM t1;" is working
- shut down all data nodes, then:

$ mysql -u root -e "select * from t1" test
ERROR 1296 (HY000) at line 1: Got error 157 'Unknown error code' from NDBCLUSTER

$ perror 157
MySQL error code 157: Could not connect to storage engine

Suggested fix:
Report the actual "Could not connect to storage engine" reason instead of "unknown error code"
[7 Aug 2012 8:18] Hegy Pascal
Dear all,

Same error with mySQL Cluster version 7.2.7 using server 5.5.25

When we do the "shutdown" command in the mgm, and then when we try to issue a command like SELECT * from table; we have the issue :
Error Code: 1296. Got error 157 'Unknown error code' from NDBCLUSTER
instead of "Could not connect to storage engine"

Hegyre
[31 Oct 2013 10:47] Hartmut Holzgraefe
still reproducible with 7.2.13, 7.3.2 ... :(
[31 Oct 2013 10:49] Hartmut Holzgraefe
Maybe this should be re-categorized as "storage engine unavailable" can happen with other remote storage engines, too?