summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-11-24 12:08:04 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2009-11-24 12:08:04 +0100
commit9561a29b2f65cbbad014496f771f4c9261fb0619 (patch)
tree2c29ceb5006df7d9f3b7ca72eff46ab876370d46 /sql/protocol.cc
parent3937a79886f9c3a1e0c998e66565a71b4a87d984 (diff)
downloadmariadb-git-9561a29b2f65cbbad014496f771f4c9261fb0619.tar.gz
merge of bug#35765 into mysql-next-mr-bugfixing
mysql-test/r/log_tables.result: Bug #35765 ALTER TABLE produces wrong error when non-existent storage engine used Updated result mysql-test/r/partition.result: Bug #35765 ALTER TABLE produces wrong error when non-existent storage engine used Updated result mysql-test/r/partition_innodb.result: Bug #35765 ALTER TABLE produces wrong error when non-existent storage engine used Updated result mysql-test/t/log_tables.test: Bug #35765 ALTER TABLE produces wrong error when non-existent storage engine used Updated test mysql-test/t/partition.test: Bug #35765 ALTER TABLE produces wrong error when non-existent storage engine used Added test case mysql-test/t/partition_innodb.test: Bug #35765 ALTER TABLE produces wrong error when non-existent storage engine used Updated test sql/protocol.cc: Bug #35765 ALTER TABLE produces wrong error when non-existent storage engine used (fix of bug#48939 to avoid test failures on my test build). sql/sql_yacc.yy: Bug #35765 ALTER TABLE produces wrong error when non-existent storage engine used if no existing engine was given, don't set HA_CREATE_USED_ENGINE
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 5990f0f001a..ca6aa3a6052 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -411,8 +411,8 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
thd->variables.character_set_results,
err, strlen(err),
system_charset_info, &error);
- length= (uint) (strmake((char*) pos, (char*)converted_err, MYSQL_ERRMSG_SIZE) -
- (char*) buff);
+ length= (uint) (strmake((char*) pos, (char*)converted_err,
+ MYSQL_ERRMSG_SIZE - 1) - (char*) buff);
err= (char*) buff;
DBUG_RETURN(net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) err,
length));