diff options
author | monty@narttu.mysql.fi <> | 2003-06-04 18:28:51 +0300 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2003-06-04 18:28:51 +0300 |
commit | 23145cfed72954c29f5a47e82af22898164be4b0 (patch) | |
tree | f2e86edc169afb1fed9cecefdecd9f13561780c9 /sql/protocol.cc | |
parent | 7df5635ff2845bd708711f6b790997a3c68d5f2a (diff) | |
download | mariadb-git-23145cfed72954c29f5a47e82af22898164be4b0.tar.gz |
Added SQLSTATE to client/server protocol
bmove_allign -> bmove_align
Added OLAP function ROLLUP
Split mysql_fix_privilege_tables to a script and a .sql data file
Added new (MEMROOT*) functions to avoid calling current_thd() when creating some common objects.
Added table_alias_charset, for easier --lower-case-table-name handling
Better SQL_MODE handling (Setting complex options also sets sub options)
New (faster) assembler string functions for x86
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 848321c1576..dc61046aa20 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -102,7 +102,8 @@ void send_error(THD *thd, uint sql_errno, const char *err) if (thd->client_capabilities & CLIENT_PROTOCOL_41) { /* The first # is to make the protocol backward compatible */ - strmov(buff+2, "#000000"); + buff[2]= '#'; + strmov(buff+3, mysql_errno_to_sqlstate(sql_errno)); pos= buff + 2 + SQLSTATE_LENGTH +1; } length= (uint) (strmake(pos, err, MYSQL_ERRMSG_SIZE-1) - buff); @@ -222,8 +223,8 @@ net_printf(THD *thd, uint errcode, ...) int2store(pos, errcode); if (thd->client_capabilities & CLIENT_PROTOCOL_41) { - /* The first # is to make the protocol backward compatible */ - memcpy(pos+2, "#000000", SQLSTATE_LENGTH +1); + pos[2]= '#'; /* To make the protocol backward compatible */ + memcpy(pos+3, mysql_errno_to_sqlstate(errcode), SQLSTATE_LENGTH); } } VOID(net_real_write(net,(char*) net->buff,length+head_length+1+offset)); |