=== modified file 'mysql-test/r/signal.result'
--- a/mysql-test/r/signal.result	2008-07-18 01:21:18 +0000
+++ b/mysql-test/r/signal.result	2008-07-21 23:16:03 +0000
@@ -63,8 +63,6 @@
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'signal int)' at line 1
 create table test_reserved (resignal int);
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'resignal int)' at line 1
-create table test_reserved (get int);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'get int)' at line 1
 create table test_reserved (condition int);
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition int)' at line 1
 drop procedure if exists test_invalid;
@@ -1105,17 +1103,17 @@
 end $$
 call test_signal() $$
 Warnings:
-Warning	1733	Data truncated for condition item CLASS_ORIGIN
-Warning	1733	Data truncated for condition item SUBCLASS_ORIGIN
-Warning	1733	Data truncated for condition item CONSTRAINT_CATALOG
-Warning	1733	Data truncated for condition item CONSTRAINT_SCHEMA
-Warning	1733	Data truncated for condition item CONSTRAINT_NAME
-Warning	1733	Data truncated for condition item CATALOG_NAME
-Warning	1733	Data truncated for condition item SCHEMA_NAME
-Warning	1733	Data truncated for condition item TABLE_NAME
-Warning	1733	Data truncated for condition item COLUMN_NAME
-Warning	1733	Data truncated for condition item CURSOR_NAME
-Warning	1733	Data truncated for condition item MESSAGE_TEXT
+Warning	1731	Data truncated for condition item CLASS_ORIGIN
+Warning	1731	Data truncated for condition item SUBCLASS_ORIGIN
+Warning	1731	Data truncated for condition item CONSTRAINT_CATALOG
+Warning	1731	Data truncated for condition item CONSTRAINT_SCHEMA
+Warning	1731	Data truncated for condition item CONSTRAINT_NAME
+Warning	1731	Data truncated for condition item CATALOG_NAME
+Warning	1731	Data truncated for condition item SCHEMA_NAME
+Warning	1731	Data truncated for condition item TABLE_NAME
+Warning	1731	Data truncated for condition item COLUMN_NAME
+Warning	1731	Data truncated for condition item CURSOR_NAME
+Warning	1731	Data truncated for condition item MESSAGE_TEXT
 Warning	10000	11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222288888888
 drop procedure test_signal $$
 create procedure test_signal()

=== modified file 'mysql-test/t/signal.test'
--- a/mysql-test/t/signal.test	2008-07-18 01:21:18 +0000
+++ b/mysql-test/t/signal.test	2008-07-21 23:16:03 +0000
@@ -114,9 +114,6 @@
 create table test_reserved (resignal int);
 
 --error ER_PARSE_ERROR
-create table test_reserved (get int);
-
---error ER_PARSE_ERROR
 create table test_reserved (condition int);
 
 #

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2008-07-01 19:52:47 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2008-07-21 23:16:03 +0000
@@ -972,7 +972,7 @@
   List_iterator_fast<SQL_condition> it(thd->main_da.m_stmt_area.warn_list);
   SQL_condition *cond;
   while ((cond= it++))
-    sql_print_warning("NDB Binlog: (%d)%s", cond->m_sqlcode,
+    sql_print_warning("NDB Binlog: (%d)%s", cond->m_sql_errno,
                       cond->get_message_text());
 }
 

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2008-07-15 16:37:03 +0000
+++ b/sql/log_event.cc	2008-07-21 23:16:03 +0000
@@ -141,7 +141,7 @@
   {
     len= my_snprintf(slider, buff_end - slider,
                      " %s, Error_code: %d;", cond->get_message_text(),
-                     cond->m_sqlcode);
+                     cond->m_sql_errno);
   }
 
   rli->report(level, thd->is_error()? thd->main_da.sql_errno() : 0,

=== modified file 'sql/share/errmsg.txt'
--- a/sql/share/errmsg.txt	2008-07-17 17:36:22 +0000
+++ b/sql/share/errmsg.txt	2008-07-21 23:16:03 +0000
@@ -6388,12 +6388,6 @@
 ER_RESIGNAL_NO_HANDLER 0K000
         eng "RESIGNAL when handler not active"
 
-ER_STACKED_DIAG_NO_HANDLER 0Z002
-        eng "STACKED DIAGNOSTICS accessed without active handler"
-
-ER_INVALID_COND_NUMBER 35000
-        eng "Invalid condition number"
-
 ER_SIGNAL_BAD_CONDITION_TYPE
         eng "SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE"
 
@@ -6403,3 +6397,9 @@
 ER_COND_ITEM_TOO_LONG
         eng "Data too long for condition item %s"
 
+ER_STACKED_DIAG_NO_HANDLER 0Z002
+        eng "STACKED DIAGNOSTICS accessed without active handler"
+
+ER_INVALID_COND_NUMBER 35000
+        eng "Invalid condition number"
+

=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2008-07-15 16:37:03 +0000
+++ b/sql/slave.cc	2008-07-21 23:16:03 +0000
@@ -1664,9 +1664,9 @@
   SQL_condition *cond;
   while ((cond= it++))
   {
-    DBUG_PRINT("info", ("has condition %d %s", cond->m_sqlcode,
+    DBUG_PRINT("info", ("has condition %d %s", cond->m_sql_errno,
                         cond->get_message_text()));
-    switch (cond->m_sqlcode)
+    switch (cond->m_sql_errno)
     {
     case ER_GET_TEMPORARY_ERRMSG:
       DBUG_RETURN(1);
@@ -2585,10 +2585,10 @@
         bool udf_error = false;
         while ((cond= it++))
         {
-          if (cond->m_sqlcode == ER_CANT_OPEN_LIBRARY)
+          if (cond->m_sql_errno == ER_CANT_OPEN_LIBRARY)
             udf_error = true;
           sql_print_warning("Slave: %s Error_code: %d",
-                            cond->get_message_text(), cond->m_sqlcode);
+                            cond->get_message_text(), cond->m_sql_errno);
         }
         if (udf_error)
           sql_print_error("Error loading user-defined library, slave SQL "

=== modified file 'sql/sp.cc'
--- a/sql/sp.cc	2008-07-01 19:52:47 +0000
+++ b/sql/sp.cc	2008-07-21 23:16:03 +0000
@@ -503,7 +503,7 @@
 Silence_deprecated_warning::handle_condition(THD *thd,
                                              const SQL_condition *cond)
 {
-  if (cond->m_sqlcode == ER_WARN_DEPRECATED_SYNTAX &&
+  if (cond->m_sql_errno == ER_WARN_DEPRECATED_SYNTAX &&
       cond->m_level == MYSQL_ERROR::WARN_LEVEL_WARN)
     return TRUE;
 

=== modified file 'sql/sp_rcontext.cc'
--- a/sql/sp_rcontext.cc	2008-07-14 21:29:41 +0000
+++ b/sql/sp_rcontext.cc	2008-07-21 23:16:03 +0000
@@ -210,7 +210,7 @@
   if (m_hfound >= 0)
     return 1;			// Already got one
 
-  uint sql_errno= cond->m_sqlcode;
+  uint sql_errno= cond->m_sql_errno;
   MYSQL_ERROR::enum_warning_level level= cond->m_level;
 
   const char *sqlstate= cond->get_sqlstate();
@@ -320,7 +320,7 @@
       thd->really_abort_on_warning())
   {
     SQL_condition elevated_cond(thd->mem_root);
-    elevated_cond.set(thd, cond->m_sqlcode,
+    elevated_cond.set(thd, cond->m_sql_errno,
                       cond->get_message_text(),
                       MYSQL_ERROR::WARN_LEVEL_ERROR,
                       MYF(0));

=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc	2008-07-01 19:52:47 +0000
+++ b/sql/sql_acl.cc	2008-07-21 23:16:03 +0000
@@ -6146,12 +6146,12 @@
 {
   if (cond->m_level == MYSQL_ERROR::WARN_LEVEL_ERROR)
   {
-    switch (cond->m_sqlcode)
+    switch (cond->m_sql_errno)
     {
       case ER_NONEXISTING_PROC_GRANT:
         /* Convert the error into a warning. */
         push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
-                     cond->m_sqlcode, cond->get_message_text());
+                     cond->m_sql_errno, cond->get_message_text());
         return TRUE;
       default:
         is_grave= TRUE;

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2008-07-17 17:36:22 +0000
+++ b/sql/sql_base.cc	2008-07-21 23:16:03 +0000
@@ -57,7 +57,7 @@
 bool
 Prelock_error_handler::handle_condition(THD *, const SQL_condition *cond)
 {
-  if (cond->m_sqlcode == ER_NO_SUCH_TABLE)
+  if (cond->m_sql_errno == ER_NO_SUCH_TABLE)
   {
     m_handled_errors++;
     return TRUE;

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2008-07-18 01:21:18 +0000
+++ b/sql/sql_class.cc	2008-07-21 23:16:03 +0000
@@ -856,7 +856,7 @@
                   (int) is_fatal_error));
     }
     else if (! main_da.is_error())
-      main_da.set_error_status(this, cond->m_sqlcode,
+      main_da.set_error_status(this, cond->m_sql_errno,
                                msg, cond->get_sqlstate());
   }
 

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2008-07-18 21:26:53 +0000
+++ b/sql/sql_class.h	2008-07-21 23:16:03 +0000
@@ -1413,7 +1413,7 @@
 
 public:
   /** MySQL extension, MYSQL_ERRNO condition item. */
-  int m_sqlcode;
+  int m_sql_errno;
 
   /** SQL CONDITION_IDENTIFIER condition item. */
   UTF8String64 m_condition_identifier;

=== modified file 'sql/sql_error.cc'
--- a/sql/sql_error.cc	2008-07-14 21:29:41 +0000
+++ b/sql/sql_error.cc	2008-07-21 23:16:03 +0000
@@ -222,7 +222,7 @@
     protocol->store(warning_level_names[cond->m_level].str,
 		    warning_level_names[cond->m_level].length,
                     system_charset_info);
-    protocol->store((uint32) cond->m_sqlcode);
+    protocol->store((uint32) cond->m_sql_errno);
     protocol->store(cond->get_message_text(),
                     cond->get_message_octet_length(),
                     system_charset_info);

=== modified file 'sql/sql_signal.cc'
--- a/sql/sql_signal.cc	2008-07-21 17:34:06 +0000
+++ b/sql/sql_signal.cc	2008-07-21 23:16:03 +0000
@@ -89,7 +89,7 @@
    m_column_name(mem_root),
    m_cursor_name(mem_root),
    m_message_text(),
-   m_sqlcode(0),
+   m_sql_errno(0),
    m_condition_identifier(mem_root),
    m_connection_name(mem_root),
    m_parameter_mode(mem_root),
@@ -150,7 +150,7 @@
   m_table_name.copy(& cond->m_table_name);
   m_column_name.copy(& cond->m_column_name);
   m_cursor_name.copy(& cond->m_cursor_name);
-  m_sqlcode= cond->m_sqlcode;
+  m_sql_errno= cond->m_sql_errno;
   m_condition_identifier.copy(& cond->m_condition_identifier);
   m_connection_name.copy(& cond->m_connection_name);
   m_parameter_mode.copy(& cond->m_parameter_mode);
@@ -199,9 +199,9 @@
     code= ER_UNKNOWN_ERROR;
   if (str == NULL)
     str= ER(code);
-  m_sqlcode= code;
+  m_sql_errno= code;
 
-  sqlstate= mysql_errno_to_sqlstate(m_sqlcode);
+  sqlstate= mysql_errno_to_sqlstate(m_sql_errno);
   memcpy(m_returned_sqlstate, sqlstate, SQLSTATE_LENGTH);
   m_returned_sqlstate[SQLSTATE_LENGTH]= '\0';
 
@@ -294,7 +294,7 @@
   */
   DBUG_ASSERT(m_cond->type == sp_cond_type::state);
 
-  cond->m_sqlcode= 0;
+  cond->m_sql_errno= 0;
   cond->set_sqlstate(m_cond->sqlstate);
 
   return 0;
@@ -311,23 +311,23 @@
     /* SQLSTATE class "01": warning */
     cond->set_builtin_message_text(ER(ER_SIGNAL_WARN));
     cond->m_level= MYSQL_ERROR::WARN_LEVEL_WARN;
-    if (cond->m_sqlcode == 0)
-      cond->m_sqlcode= ER_SIGNAL_WARN;
+    if (cond->m_sql_errno == 0)
+      cond->m_sql_errno= ER_SIGNAL_WARN;
   }
   else if ((sqlstate[0] == '0') && (sqlstate[1] == '2'))
   {
     /* SQLSTATE class "02": not found */
     cond->set_builtin_message_text(ER(ER_SIGNAL_NOT_FOUND));
     cond->m_level= MYSQL_ERROR::WARN_LEVEL_ERROR;
-    if (cond->m_sqlcode == 0)
-      cond->m_sqlcode= ER_SIGNAL_NOT_FOUND;
+    if (cond->m_sql_errno == 0)
+      cond->m_sql_errno= ER_SIGNAL_NOT_FOUND;
   }
   else
   {
     cond->set_builtin_message_text(ER(ER_SIGNAL_EXCEPTION));
     cond->m_level= MYSQL_ERROR::WARN_LEVEL_ERROR;
-    if (cond->m_sqlcode == 0)
-      cond->m_sqlcode= ER_SIGNAL_EXCEPTION;
+    if (cond->m_sql_errno == 0)
+      cond->m_sql_errno= ER_SIGNAL_EXCEPTION;
   }
 
   return 0;
@@ -532,7 +532,7 @@
                "MYSQL_ERRNO", str->c_ptr_safe());
       goto end;
     }
-    cond->m_sqlcode= (int) code;
+    cond->m_sql_errno= (int) code;
   }
 
   /*
@@ -802,7 +802,7 @@
                                            utf8_text.charset());
     break;
   case DIAG_MYSQL_ERRNO:
-    int_value= cond->m_sqlcode;
+    int_value= cond->m_sql_errno;
     value= new (thd->mem_root) Item_int(int_value);
     break;
   case DIAG_CONDITION_IDENTIFIER:

=== modified file 'sql/unireg.cc'
--- a/sql/unireg.cc	2008-07-01 19:52:47 +0000
+++ b/sql/unireg.cc	2008-07-21 23:16:03 +0000
@@ -66,7 +66,7 @@
 Pack_header_error_handler::
 handle_condition(THD *, const SQL_condition *cond)
 {
-  is_handled= (cond->m_sqlcode == ER_TOO_MANY_FIELDS);
+  is_handled= (cond->m_sql_errno == ER_TOO_MANY_FIELDS);
   return is_handled;
 }
 



