diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-11-25 10:37:13 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-11-25 10:37:13 +0100 |
commit | 72a26125e21fc4c654a8a1c9c1841f79f62d4d7a (patch) | |
tree | b4d0c06710c6c673b5fabd60caa973c24dc58a4f /sql | |
parent | ad03b65d6fe143f07bc66d689cf0a0be451e19e5 (diff) | |
parent | edaae7c3e2b8809931a62eff04de55674a6a1f7a (diff) | |
download | mariadb-git-72a26125e21fc4c654a8a1c9c1841f79f62d4d7a.tar.gz |
merge
Diffstat (limited to 'sql')
-rw-r--r-- | sql/protocol.cc | 4 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 3 |
2 files changed, 4 insertions, 3 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)); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 7b264796b30..e5ea3d3de51 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4820,7 +4820,8 @@ create_table_option: ENGINE_SYM opt_equal storage_engines { Lex->create_info.db_type= $3; - Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE; + if ($3) + Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE; } | TYPE_SYM opt_equal storage_engines { |