From 53802ae6ca0ea2d95c9d24b8c07a27213406131e Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 5 Mar 2009 08:20:01 -0300 Subject: Bug#41465: confusing error message when comment is too long The problem was that the server was trying to use the unknown error format string (ER_UNKNOWN_ERROR) to print messages about comments being too long, but the said format string does not accept arguments and will always default to "Unknown error". The solution is to introduce new error messages which are specific to the error conditions so that server wants to signal -- this also means that it's possible to translate those messages. mysql-test/r/strict.result: Update test case result. mysql-test/t/strict.test: Update test case with new errors. sql/share/errmsg.txt: Introduce new errors for long comments. sql/unireg.cc: Use new errors. --- mysql-test/t/strict.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/strict.test') diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index f2ce045840c..5779ea97bc2 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -1163,11 +1163,11 @@ set @@sql_mode= @org_mode; # Bug #13934 Silent truncation of table comments # set @@sql_mode='traditional'; ---error 1105 +--error ER_TOO_LONG_TABLE_COMMENT create table t1 (i int) comment '123456789*123456789*123456789*123456789*123456789* 123456789*123456789*123456789*123456789*123456789*'; ---error 1105 +--error ER_TOO_LONG_FIELD_COMMENT create table t1 ( i int comment '123456789*123456789*123456789*123456789* -- cgit v1.2.1