X-Account-Key: account4 X-UIDL: 1153746480.180774 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 X-Mozilla-Keys: Return-Path: Received: from mailget.mysql.com ([unix socket]) by mailget (Cyrus v2.3.1-Invoca-RPM-2.3.1-2.8.fc5) with LMTPA; Wed, 23 Jul 2008 02:28:40 +0200 X-Sieve: CMU Sieve 2.3 Received: from mail.mysql.com (mail.mysql.com [10.100.1.21]) by mailget.mysql.com (8.13.8/8.13.8) with ESMTP id m6N0SeSF010473 for ; Wed, 23 Jul 2008 02:28:40 +0200 Received: from mailgate-b.mysql.com (mailgate-b.mysql.com [10.128.18.33]) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id m6N0SdYc009159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 Jul 2008 02:28:39 +0200 Received: from lists.mysql.com (lists.mysql.com [10.100.1.37]) by mailgate-b.mysql.com (8.13.8/8.13.8) with SMTP id m6N0SdsR014551 for ; Wed, 23 Jul 2008 02:28:39 +0200 Received: (qmail 24132 invoked by uid 510); 23 Jul 2008 00:28:38 -0000 Mailing-List: contact commits-help@lists.mysql.com; run by ezmlm List-ID: Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Archive: http://lists.mysql.com/commits/50238 Delivered-To: mailing list commits@lists.mysql.com Received: (qmail 24105 invoked by uid 509); 23 Jul 2008 00:28:38 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Marc Alff Subject: bzr commit into mysql-6.0-wl2110-review branch (marc.alff:2675) WL#2110 To: commits@lists.mysql.com User-Agent: Bazaar (1.4) X-CSetKey: marc.alff@sun.com-20080723002825-q0dcilphd3agcqui X-Worklog: 2110 X-bzr-action: commit X-bzr-revid: marc.alff@sun.com-20080723002825-q0dcilphd3agcqui X-bzr-revno: 2675 Message-Id: <20080723002831.8E9C42DCAB@lambda.WEBLAB> Date: Tue, 22 Jul 2008 18:28:31 -0600 (MDT) X-Cxn-Txn: 56108129,34985462 #At file:///home/malff/BZR-TREE/mysql-6.0-wl2110-review-part7/ 2675 Marc Alff 2008-07-22 WL#2110 (Stored Procedures: Implement SIGNAL) Formal review part 7/10: ER_NO_SUCH_TABLE This patch implements raising an error condition (ER_NO_SUCH_TABLE) that also modifies other condition items in the condition area. modified: sql/sql_base.cc sql/sql_view.cc sql/table.cc === modified file 'sql/sql_base.cc' --- a/sql/sql_base.cc 2008-07-09 14:27:18 +0000 +++ b/sql/sql_base.cc 2008-07-23 00:28:25 +0000 @@ -44,9 +44,7 @@ public: virtual ~Prelock_error_handler() {} - virtual bool handle_error(uint sql_errno, const char *message, - MYSQL_ERROR::enum_warning_level level, - THD *thd); + virtual bool handle_condition(THD *thd, const SQL_condition *cond); bool safely_trapped_errors(); @@ -57,12 +55,9 @@ private: bool -Prelock_error_handler::handle_error(uint sql_errno, - const char * /* message */, - MYSQL_ERROR::enum_warning_level /* level */, - THD * /* thd */) +Prelock_error_handler::handle_condition(THD *, const SQL_condition *cond) { - if (sql_errno == ER_NO_SUCH_TABLE) + if (cond->m_sql_errno == ER_NO_SUCH_TABLE) { m_handled_errors++; return TRUE; @@ -2381,7 +2376,7 @@ bool open_table(THD *thd, TABLE_LIST *ta if (flags & MYSQL_OPEN_TEMPORARY_ONLY) { - my_error(ER_NO_SUCH_TABLE, MYF(0), table_list->db, table_list->table_name); + thd->raise_ER_NO_SUCH_TABLE(table_list->db, table_list->table_name); DBUG_RETURN(TRUE); } @@ -2504,7 +2499,7 @@ bool open_table(THD *thd, TABLE_LIST *ta locked tables list was created. */ if (thd->locked_tables_mode == LTM_PRELOCKED) - my_error(ER_NO_SUCH_TABLE, MYF(0), table_list->db, table_list->alias); + thd->raise_ER_NO_SUCH_TABLE(table_list->db, table_list->alias); else my_error(ER_TABLE_NOT_LOCKED, MYF(0), alias); DBUG_RETURN(TRUE); === modified file 'sql/sql_view.cc' --- a/sql/sql_view.cc 2008-06-26 18:56:36 +0000 +++ b/sql/sql_view.cc 2008-07-23 00:28:25 +0000 @@ -482,7 +482,7 @@ bool mysql_create_view(THD *thd, TABLE_L strcmp(tbl->view_db.str, view->db) == 0 && strcmp(tbl->view_name.str, view->table_name) == 0) { - my_error(ER_NO_SUCH_TABLE, MYF(0), tbl->view_db.str, tbl->view_name.str); + thd->raise_ER_NO_SUCH_TABLE(tbl->view_db.str, tbl->view_name.str); res= TRUE; goto err; } @@ -935,7 +935,7 @@ loop_out: { if (mode == VIEW_ALTER) { - my_error(ER_NO_SUCH_TABLE, MYF(0), view->db, view->alias); + thd->raise_ER_NO_SUCH_TABLE(view->db, view->alias); error= -1; goto err; } === modified file 'sql/table.cc' --- a/sql/table.cc 2008-06-30 20:21:41 +0000 +++ b/sql/table.cc 2008-07-23 00:28:25 +0000 @@ -2280,7 +2280,7 @@ void open_table_error(TABLE_SHARE *share case 7: case 1: if (db_errno == ENOENT) - my_error(ER_NO_SUCH_TABLE, MYF(0), share->db.str, share->table_name.str); + current_thd->raise_ER_NO_SUCH_TABLE(share->db.str, share->table_name.str); else { strxmov(buff, share->normalized_path.str, reg_ext, NullS); -- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=marc.alff@mysql.com