Bug#28505: mysql_affected_rows() may return wrong result if CLIENT_FOUND_ROWS
flag is set. When the CLIENT_FOUND_ROWS flag is set then the server should return found number of rows independently whether they were updated or not. But this wasn't the case for the INSERT statement which always returned number of rows that were actually changed thus providing wrong info to the user. Now the select_insert::send_eof method and the mysql_insert function are sending the number of touched rows if the CLIENT_FOUND_ROWS flag is set. tests/mysql_client_test.c: Added a test case for the bug#28505: mysql_affected_rows() may return wrong result if CLIENT_FOUND_ROWS flag is set. sql/sql_insert.cc: Bug#28505: mysql_affected_rows() may return wrong result if CLIENT_FOUND_ROWS flag is set. Now the select_insert::send_eof method and the mysql_insert function are sending the number of touched rows if the CLIENT_FOUND_ROWS flag is set.
Showing
Please register or sign in to comment