mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
rename of net_pkg.cc to protocol.cc
Class for sending data from server to client (Protocol) This handles both the old ( <= 4.0 ) protocol and then new binary protocol that is used for prepared statements. libmysql/libmysql.c: Jump over reserved bits in the binary protocol libmysqld/Makefile.am: rename of net_pkg.cc to protocol.cc mysql-test/r/case.result: Fixed previously wrong test mysql-test/r/cast.result: Fixed previously wrong test sql/Makefile.am: Rename of net_pkg.cc to protocol.cc sql/field.cc: Binary protocol Added key handling functions for new VARCHAR type sql/field.h: New protocol sql/ha_berkeley.cc: New protocol sql/ha_berkeley.h: New protocol sql/ha_innodb.cc: New protocol sql/ha_myisam.cc: New protocol sql/item.cc: New protocol sql/item.h: New protocol sql/item_func.cc: Removed old code from 3.23 sql/item_func.h: Set cached_result_type as it was previosly used before set sql/item_subselect.cc: Standard make_field() is now good enough sql/item_subselect.h: Use default make_field() sql/item_sum.cc: Clean up Item_sum::make_field() sql/item_sum.h: Use standard make_field() sql/item_timefunc.h: return correct types for casts() Use standard make_field() sql/log_event.cc: New protocol sql/log_event.h: New protocol sql/mysql_priv.h: Move things to protocol.h sql/opt_range.cc: Indentation cleanups + small optimization sql/procedure.h: Use MYSQL_TYPE instead of FIELD_TYPE sql/protocol.cc: Class for sending data from server to client. This handles both the old ( <= 4.0 ) protocol and then new binary protocol that is used for prepared statements. sql/repl_failsafe.cc: New protocol sql/slave.cc: New protocol sql/sql_acl.cc: New protocol sql/sql_base.cc: Move send_fields() to protocol.cc sql/sql_class.cc: New protocol sql/sql_class.h: New protocol sql/sql_db.cc: New protocol sql/sql_error.cc: New protocol sql/sql_handler.cc: New protocol sql/sql_help.cc: New protocol sql/sql_parse.cc: Remove wrong assert (variable was not initalized at this point) sql/sql_prepare.cc: New protocol sql/sql_repl.cc: New protocol sql/sql_select.cc: New protocol sql/sql_show.cc: New protocol sql/sql_string.h: New functions used by the protocol functions sql/sql_table.cc: New protocol sql/structs.h: Make second_part ulong to prepare for ANSI sub-seconds sql/time.cc: New convert function needed by the new protocol functions
This commit is contained in:
@ -2776,6 +2776,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
|
||||
int error = 0;
|
||||
ACL_USER *acl_user; ACL_DB *acl_db;
|
||||
char buff[1024];
|
||||
Protocol *protocol= thd->protocol;
|
||||
DBUG_ENTER("mysql_show_grants");
|
||||
|
||||
LINT_INIT(acl_user);
|
||||
@ -2822,7 +2823,7 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
|
||||
strxmov(buff,"Grants for ",lex_user->user.str,"@",
|
||||
lex_user->host.str,NullS);
|
||||
field_list.push_back(field);
|
||||
if (send_fields(thd,field_list,1))
|
||||
if (protocol->send_fields(&field_list,1))
|
||||
DBUG_RETURN(-1);
|
||||
|
||||
rw_wrlock(&LOCK_grant);
|
||||
@ -2931,12 +2932,12 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
|
||||
global.append(buff,p-buff);
|
||||
}
|
||||
}
|
||||
thd->packet.length(0);
|
||||
net_store_data(&thd->packet,global.ptr(),global.length());
|
||||
if (my_net_write(&thd->net,(char*) thd->packet.ptr(),
|
||||
thd->packet.length()))
|
||||
protocol->prepare_for_resend();
|
||||
protocol->store(global.ptr(),global.length());
|
||||
if (protocol->write())
|
||||
{
|
||||
error=-1; goto end;
|
||||
error=-1;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2987,10 +2988,9 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
|
||||
db.append ('\'');
|
||||
if (want_access & GRANT_ACL)
|
||||
db.append(" WITH GRANT OPTION",18);
|
||||
thd->packet.length(0);
|
||||
net_store_data(&thd->packet,db.ptr(),db.length());
|
||||
if (my_net_write(&thd->net,(char*) thd->packet.ptr(),
|
||||
thd->packet.length()))
|
||||
protocol->prepare_for_resend();
|
||||
protocol->store(db.ptr(),db.length());
|
||||
if (protocol->write())
|
||||
{
|
||||
error=-1;
|
||||
goto end;
|
||||
@ -3075,10 +3075,9 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
|
||||
global.append('\'');
|
||||
if (want_access & GRANT_ACL)
|
||||
global.append(" WITH GRANT OPTION",18);
|
||||
thd->packet.length(0);
|
||||
net_store_data(&thd->packet,global.ptr(),global.length());
|
||||
if (my_net_write(&thd->net,(char*) thd->packet.ptr(),
|
||||
thd->packet.length()))
|
||||
protocol->prepare_for_resend();
|
||||
protocol->store(global.ptr(),global.length());
|
||||
if (protocol->write())
|
||||
{
|
||||
error= -1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user