diff options
author | magnus@neptunus.(none) <> | 2004-10-07 14:19:46 +0200 |
---|---|---|
committer | magnus@neptunus.(none) <> | 2004-10-07 14:19:46 +0200 |
commit | d55efe332d7eb5fb9344bf395a78adf03ffc5242 (patch) | |
tree | 30f4c241bae8e23922629ba32af9d352594cd9ee /sql/ha_ndbcluster.cc | |
parent | ac9016df919a42aa77a6a9db42cd17b3674a3bce (diff) | |
download | mariadb-git-d55efe332d7eb5fb9344bf395a78adf03ffc5242.tar.gz |
Sned original NDB error as warning to client
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 218b615b60d..e501a2b118d 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -134,8 +134,13 @@ static int ndb_to_mysql_error(const NdbError *err) uint i; for (i=0 ; err_map[i].ndb_err != err->code ; i++) { - if (err_map[i].my_err == -1) + if (err_map[i].my_err == -1){ + // Push the NDB error message as warning + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_GET_ERRMSG, ER(ER_GET_ERRMSG), + err->code, err->message, "NDB"); return err->code; + } } return err_map[i].my_err; } @@ -2188,7 +2193,7 @@ int ha_ndbcluster::index_read(byte *buf, default: case UNDEFINED_INDEX: DBUG_ASSERT(false); - return 1; + DBUG_RETURN(1); break; } |