diff options
author | unknown <monty@mysql.com> | 2004-11-02 20:13:27 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-11-02 20:13:27 +0200 |
commit | 505caa28796f0fe13a0a4eb004fe70a084d64c85 (patch) | |
tree | e98dace641bd58871866d0d787418defc800bc9f /sql/sql_prepare.cc | |
parent | 3200d66f8544dad77dc7ba8448550f3a15fa8eac (diff) | |
download | mariadb-git-505caa28796f0fe13a0a4eb004fe70a084d64c85.tar.gz |
Remove usage of !$ from mysql-tests
Added protocol::flush() for easier embedded-server code
Increase block allocation variables a bit as they where a bit too small for MySQL 4.1
Added option --silent to client_test
client/mysqltest.c:
Removed compiler warning
Fixed identation & comments from earlier push
Renamed variable 'disable_abort_on_error' to 'abort_on_error'
Ensure that '$mysql_errno' also with --ps-protocol
include/mysql_com.h:
Removed special handling of net_flush for embedded server
mysql-test/r/mysqltest.result:
Remove usage of !$ in tests
mysql-test/t/client_test.test:
Use --silent
mysql-test/t/comments.test:
Remove usage of !$ in tests
mysql-test/t/join_outer.test:
Remove usage of !$ in tests
mysql-test/t/key.test:
Remove usage of !$ in tests
mysql-test/t/mysqltest.test:
Remove usage of !$ in tests
mysql-test/t/show_check.test:
Remove usage of !$ in tests
mysql-test/t/temp_table.test:
Remove usage of !$ in tests
mysql-test/t/type_ranges.test:
Remove usage of !$ in tests
sql/mysqld.cc:
Increase block allocation variables a bit as they where a bit too small for MySQL 4.1
sql/net_serv.cc:
Remove special usage of net_flush in embedded server
sql/protocol.cc:
Added protocol::flush() for easier embedded-server code
sql/protocol.h:
Added protocol::flush() for easier embedded-server code
sql/sql_prepare.cc:
Added protocol::flush() for easier embedded-server code
Remove one extra flush() for prepared statements
sql/sql_show.cc:
Added protocol::flush() for easier embedded-server code
tests/client_test.c:
Added option --silent
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r-- | sql/sql_prepare.cc | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index b5e12c4d208..4ae69e40342 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -153,6 +153,8 @@ static bool send_prep_stmt(Prepared_statement *stmt, uint columns) { NET *net= &stmt->thd->net; char buff[9]; + DBUG_ENTER("send_prep_stmt"); + buff[0]= 0; /* OK packet indicator */ int4store(buff+1, stmt->id); int2store(buff+5, columns); @@ -161,12 +163,11 @@ static bool send_prep_stmt(Prepared_statement *stmt, uint columns) Send types and names of placeholders to the client XXX: fix this nasty upcast from List<Item_param> to List<Item> */ - return my_net_write(net, buff, sizeof(buff)) || - (stmt->param_count && - stmt->thd->protocol_simple.send_fields((List<Item> *) - &stmt->lex->param_list, 0)) || - net_flush(net); - return 0; + DBUG_RETURN(my_net_write(net, buff, sizeof(buff)) || + (stmt->param_count && + stmt->thd->protocol_simple.send_fields((List<Item> *) + &stmt->lex->param_list, + 0))); } #else static bool send_prep_stmt(Prepared_statement *stmt, @@ -1088,7 +1089,7 @@ static int mysql_test_select(Prepared_statement *stmt, { if (lex->describe) { - if (send_prep_stmt(stmt, 0)) + if (send_prep_stmt(stmt, 0) || thd->protocol->flush()) goto err_prep; } else @@ -1106,11 +1107,8 @@ static int mysql_test_select(Prepared_statement *stmt, prepared in unit->prepare call above. */ if (send_prep_stmt(stmt, lex->result->field_count(fields)) || - lex->result->send_fields(fields, 0) -#ifndef EMBEDDED_LIBRARY - || net_flush(&thd->net) -#endif - ) + lex->result->send_fields(fields, 0) || + thd->protocol->flush()) goto err_prep; } } @@ -1389,7 +1387,6 @@ static int send_prepare_results(Prepared_statement *stmt, bool text_protocol) enum enum_sql_command sql_command= lex->sql_command; int res= 0; DBUG_ENTER("send_prepare_results"); - DBUG_PRINT("enter",("command: %d, param_count: %ld", sql_command, stmt->param_count)); @@ -1475,7 +1472,8 @@ static int send_prepare_results(Prepared_statement *stmt, bool text_protocol) goto error; } if (res == 0) - DBUG_RETURN(text_protocol? 0 : send_prep_stmt(stmt, 0)); + DBUG_RETURN(text_protocol? 0 : (send_prep_stmt(stmt, 0) || + thd->protocol->flush())); error: if (res < 0) send_error(thd, thd->killed ? ER_SERVER_SHUTDOWN : 0); |