From 66eb9774e43dc96e7d45d800b4860354f81d258d Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 31 Aug 2017 12:33:46 +0000 Subject: [PATCH 1/2] MDEV-13691 : my_write() sets inappropriate errno for ERROR_FILE_SYSTEM_LIMITATON ERROR_FILE_SYSTEM_LIMITATION was seen by support when backing up large file. However mariabackup error message was not very helpful, since it mapped the error to generic catch-all EINVAL. With the patch, ERROR_FILE_SYSTEM_LIMITATION will be mapped to more appropriate EFBIG. Also add mapping from ERROR_NO_SYSTEM_RESOURCES to ENOMEM. --- mysys/my_winerr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysys/my_winerr.c b/mysys/my_winerr.c index 15f52dd7f37..9577db09eaf 100644 --- a/mysys/my_winerr.c +++ b/mysys/my_winerr.c @@ -75,7 +75,9 @@ static struct errentry errtable[]= { { ERROR_ALREADY_EXISTS, EEXIST }, /* 183 */ { ERROR_FILENAME_EXCED_RANGE, ENOENT }, /* 206 */ { ERROR_NESTING_NOT_ALLOWED, EAGAIN }, /* 215 */ - { ERROR_NOT_ENOUGH_QUOTA, ENOMEM } /* 1816 */ + { ERROR_FILE_SYSTEM_LIMITATION, EFBIG }, /* 665 */ + { ERROR_NO_SYSTEM_RESOURCES, ENOMEM }, /* 1450 */ + { ERROR_NOT_ENOUGH_QUOTA, ENOMEM } /* 1816 */ }; /* size of the table */ From 6be93c3b8a1d8c080d73750e3804752ad80f56d1 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 31 Aug 2017 14:50:45 +0000 Subject: [PATCH 2/2] MDEV-13693 : Fix parameter passing to my_error. char* parameter is expected by the message ER_KEY_COLUMN_DOES_NOT_EXITS, thus pass char*, rather than LEX_STRING. --- sql/sql_class.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index da1a0e43ac1..eedda8579e7 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -230,7 +230,7 @@ bool Foreign_key::validate(List &table_fields) sql_field->field_name)) {} if (!sql_field) { - my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), column->field_name); + my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), column->field_name.str); DBUG_RETURN(TRUE); } if (type == Key::FOREIGN_KEY && sql_field->vcol_info)