What kind of error codes does Clustrix return?

Ryan Lecha -

There are two error tables in the ClustrixDB system database:

error_codes: list of clustrix errors
mysql_error_codes: maps clustrix error_codes to mysql error codes where they exist in clustrix. 

sql> describe system.error_codes;
+-------------+------------------+------+-----+---------+-------+
| Field       | Type             | Null | Key | Default | Extra |
+-------------+------------------+------+-----+---------+-------+
| result_code | int(11) unsigned | NO   | PRI | NULL    |       | 
| family      | varchar(256)     | YES  |     | NULL    |       | 
| code        | varchar(256)     | YES  |     | NULL    |       | 
| message     | varchar(256)     | YES  |     | NULL    |       | 
+-------------+------------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

sql> describe system.mysql_error_codes;
+------------------+------------------+------+-----+---------+-------+
| Field            | Type             | Null | Key | Default | Extra |
+------------------+------------------+------+-----+---------+-------+
| result_code      | int(11) unsigned | NO   | PRI | NULL    |       | 
| mysql_error_code | int(11) unsigned | YES  |     | NULL    |       | 
+------------------+------------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

To get a list of error codes in ClustrixDB you can use:

select * from system.error_codes order by 1;

To map mysql error codes to comparable items in MySQL you can use:

SELECT   * 
FROM     system.mysql_error_codes AS mec 
JOIN     system.error_codes ec 
where    mec.result_code=ec.result_code 
ORDER BY mec.mysql_error_code;
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk