From 07f5a44bc0a525c99394536a436cc85fb00fc337 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 Aug 2004 14:35:04 +0300 Subject: Review of new pushed code (Indentation fixes and simple optimizations) Use 'mysqltest' as test database instead of test_$1 or test1,test2 to not accidently delete an important database Safety fix for mailformed MERGE files Build-tools/mysql-copyright: Print correct file name in case of errors Fixed indentation include/config-win.h: Removed unnecessary #ifdef myisammrg/myrg_open.c: Don't give a core if merge file contains INSERT_METHOD first (not legal but better safe than sorry) Don't set struct variables to zero that are already zero Indentation fixes mysql-test/r/create.result: Use 'mysqltest' as test database mysql-test/r/ndb_basic.result: Use 'mysqltest' as test database mysql-test/r/ndb_blob.result: Use 'mysqltest' as test database mysql-test/r/ndb_transaction.result: Use 'mysqltest' as test database mysql-test/r/ps_1general.result: Use 'mysqltest' as test database mysql-test/r/rpl_charset.result: Use 'mysqltest' as test database mysql-test/r/rpl_delete_all.result: Use 'mysqltest' as test database mysql-test/r/show_check.result: Use 'mysqltest' as test database mysql-test/t/create.test: Use 'mysqltest' as test database mysql-test/t/ndb_basic.test: Use 'mysqltest' as test database mysql-test/t/ndb_blob.test: Use 'mysqltest' as test database mysql-test/t/ndb_transaction.test: Use 'mysqltest' as test database mysql-test/t/ps_1general.test: Use 'mysqltest' as test database mysql-test/t/rpl_charset.test: Use 'mysqltest' as test database mysql-test/t/rpl_delete_all.test: Use 'mysqltest' as test database mysql-test/t/show_check.test: Use 'mysqltest' as test database sql/field.h: Mark functions that should be deleted as soon as we have a new prototype for store(longlong) sql/lock.cc: Indentation fix sql/sql_base.cc: Better comment. Break find_item_in_list in case of perfect match sql/sql_prepare.cc: Simple optimization sql/sql_select.cc: Portability fix --- sql/sql_prepare.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sql/sql_prepare.cc') diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index baff7bd604d..4b9f4162aff 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1041,7 +1041,7 @@ static int mysql_test_select(Prepared_statement *stmt, THD *thd= stmt->thd; LEX *lex= stmt->lex; SELECT_LEX_UNIT *unit= &lex->unit; - + int result= 1; DBUG_ENTER("mysql_test_select"); #ifndef NO_EMBEDDED_ACCESS_CHECKS @@ -1087,13 +1087,12 @@ static int mysql_test_select(Prepared_statement *stmt, goto err_prep; } } - unit->cleanup(); - DBUG_RETURN(0); + result= 0; // ok err_prep: unit->cleanup(); err: - DBUG_RETURN(1); + DBUG_RETURN(result); } -- cgit v1.2.1