List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:January 21 2011 2:27pm
Subject:bzr commit into mysql-5.5-telco-7.0 branch (magnus.blaudd:3148)
View as plain text  
#At file:///home/msvensson/mysql/5.5-telco-7.0/ based on revid:magnus.blaudd@strippedwvrwx

 3148 Magnus Blåudd	2011-01-21
      ndb
       - It's no longer allowed to push a warning(with push_warning() or push_warning_printf()) with warning level WARN_lEVEL_ERROR in 5.5. 
       - change ha_ndb* to use WARN_LEVEL_WARNING or WARN_LEVEL_NOTE instead.
       - update .result files

    modified:
      mysql-test/suite/ndb/r/ndb_bitfield.result
      mysql-test/suite/ndb/r/ndb_dd_basic.result
      mysql-test/suite/ndb/r/ndb_dd_ddl.result
      mysql-test/suite/ndb/r/ndb_hidden_pk.result
      mysql-test/suite/ndb/r/ndb_partition_error.result
      mysql-test/suite/ndb/r/ndb_single_user.result
      mysql-test/suite/ndb/r/ndbinfo.result
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster_binlog.cc
      sql/ha_ndbinfo.cc
      sql/sql_error.cc
=== modified file 'mysql-test/suite/ndb/r/ndb_bitfield.result'
--- a/mysql-test/suite/ndb/r/ndb_bitfield.result	2010-10-27 11:32:32 +0000
+++ b/mysql-test/suite/ndb/r/ndb_bitfield.result	2011-01-21 14:27:30 +0000
@@ -226,7 +226,7 @@ b int
 ERROR HY000: Can't create table 'test.t1' (errno: 906)
 show warnings;
 Level	Code	Message
-Error	1296	Got error 906 'Unsupported attribute type in index' from NDB
+Warning	1296	Got error 906 'Unsupported attribute type in index' from NDB
 Error	1005	Can't create table 'test.t1' (errno: 906)
 create table t1 (
 pk1 int not null primary key,
@@ -236,7 +236,7 @@ key(b)
 ERROR HY000: Can't create table 'test.t1' (errno: 906)
 show warnings;
 Level	Code	Message
-Error	1296	Got error 906 'Unsupported attribute type in index' from NDB
+Warning	1296	Got error 906 'Unsupported attribute type in index' from NDB
 Error	1005	Can't create table 'test.t1' (errno: 906)
 create table t1 (
 pk1 int primary key,
@@ -248,5 +248,5 @@ create table bigbits ( k int unsigned pr
 ERROR HY000: Can't create table 'test.bigbits' (errno: 140)
 show warnings;
 Level	Code	Message
-Error	1296	Got error 791 'Too many total bits in bitfields' from NDB
+Warning	1296	Got error 791 'Too many total bits in bitfields' from NDB
 Error	1005	Can't create table 'test.bigbits' (errno: 140)

=== modified file 'mysql-test/suite/ndb/r/ndb_dd_basic.result'
--- a/mysql-test/suite/ndb/r/ndb_dd_basic.result	2010-10-27 11:32:32 +0000
+++ b/mysql-test/suite/ndb/r/ndb_dd_basic.result	2011-01-21 14:27:30 +0000
@@ -562,7 +562,7 @@ engine ndb;
 ERROR HY000: Failed to create DATAFILE
 show warnings;
 Level	Code	Message
-Error	1296	Got error 1516 'File too small' from NDB
+Warning	1296	Got error 1516 'File too small' from NDB
 Error	1528	Failed to create DATAFILE
 create tablespace ts1
 add datafile 'datafile.dat'
@@ -577,7 +577,7 @@ engine ndb;
 ERROR HY000: Failed to alter:  CREATE DATAFILE
 show warnings;
 Level	Code	Message
-Error	1296	Got error 1516 'File too small' from NDB
+Warning	1296	Got error 1516 'File too small' from NDB
 Error	1533	Failed to alter:  CREATE DATAFILE
 alter tablespace ts1
 drop datafile 'datafile.dat'

=== modified file 'mysql-test/suite/ndb/r/ndb_dd_ddl.result'
--- a/mysql-test/suite/ndb/r/ndb_dd_ddl.result	2010-10-27 11:32:32 +0000
+++ b/mysql-test/suite/ndb/r/ndb_dd_ddl.result	2011-01-21 14:27:30 +0000
@@ -15,7 +15,7 @@ ENGINE NDB;
 ERROR HY000: Failed to create LOGFILE GROUP
 SHOW WARNINGS;
 Level	Code	Message
-Error	1296	Got error 1514 'Currently there is a limit of one logfile group' from NDB
+Warning	1296	Got error 1514 'Currently there is a limit of one logfile group' from NDB
 Error	1528	Failed to create LOGFILE GROUP
 CREATE LOGFILE GROUP lg1
 ADD UNDOFILE 'undofile.dat'

=== modified file 'mysql-test/suite/ndb/r/ndb_hidden_pk.result'
--- a/mysql-test/suite/ndb/r/ndb_hidden_pk.result	2008-06-26 09:35:14 +0000
+++ b/mysql-test/suite/ndb/r/ndb_hidden_pk.result	2011-01-21 14:27:30 +0000
@@ -158,7 +158,7 @@ CREATE TABLE t1 (
 b blob
 ) ENGINE=ndbcluster;
 Warnings:
-Error	1478	Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
+Warning	1478	Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
 insert into t1 values (NULL), (NULL), ('Something'), (''), (REPEAT('Lots', 2000));
 select * from t1 order by b;
 b

=== modified file 'mysql-test/suite/ndb/r/ndb_partition_error.result'
--- a/mysql-test/suite/ndb/r/ndb_partition_error.result	2011-01-21 12:43:19 +0000
+++ b/mysql-test/suite/ndb/r/ndb_partition_error.result	2011-01-21 14:27:30 +0000
@@ -14,7 +14,7 @@ partition x3 values less than (20) nodeg
 ERROR HY000: Can't create table 'test.t1' (errno: 140)
 show warnings;
 Level	Code	Message
-Error	1296	Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB
+Warning	1296	Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB
 Error	1005	Can't create table 'test.t1' (errno: 140)
 CREATE TABLE t1 (
 a int not null,

=== modified file 'mysql-test/suite/ndb/r/ndb_single_user.result'
--- a/mysql-test/suite/ndb/r/ndb_single_user.result	2010-10-27 11:32:32 +0000
+++ b/mysql-test/suite/ndb/r/ndb_single_user.result	2011-01-21 14:27:30 +0000
@@ -9,7 +9,7 @@ ENGINE=NDB;
 ERROR HY000: Failed to create LOGFILE GROUP
 show warnings;
 Level	Code	Message
-Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
 Error	1528	Failed to create LOGFILE GROUP
 create table t1 (a int key, b int unique, c int) engine ndb;
 CREATE LOGFILE GROUP lg1
@@ -25,14 +25,14 @@ ENGINE NDB;
 ERROR HY000: Failed to create TABLESPACE
 show warnings;
 Level	Code	Message
-Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
 Error	1528	Failed to create TABLESPACE
 DROP LOGFILE GROUP lg1 
 ENGINE =NDB;
 ERROR HY000: Failed to drop LOGFILE GROUP
 show warnings;
 Level	Code	Message
-Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
 Error	1529	Failed to drop LOGFILE GROUP
 CREATE TABLESPACE ts1
 ADD DATAFILE 'datafile.dat'
@@ -45,7 +45,7 @@ ENGINE NDB;
 ERROR HY000: Failed to alter:  DROP DATAFILE
 show warnings;
 Level	Code	Message
-Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
 Error	1533	Failed to alter:  DROP DATAFILE
 ALTER TABLESPACE ts1
 DROP DATAFILE 'datafile.dat'
@@ -55,7 +55,7 @@ ENGINE NDB;
 ERROR HY000: Failed to drop TABLESPACE
 show warnings;
 Level	Code	Message
-Error	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
+Warning	1296	Got error 299 'Operation not allowed or aborted due to single user mode' from NDB
 Error	1529	Failed to drop TABLESPACE
 DROP TABLESPACE ts1
 ENGINE NDB;

=== modified file 'mysql-test/suite/ndb/r/ndbinfo.result'
--- a/mysql-test/suite/ndb/r/ndbinfo.result	2010-11-03 09:48:25 +0000
+++ b/mysql-test/suite/ndb/r/ndbinfo.result	2011-01-21 14:27:30 +0000
@@ -187,7 +187,7 @@ SELECT * FROM ndb$test;
 ERROR HY000: Got error 40001 'Incompatible table definitions' from NDBINFO
 SHOW WARNINGS;
 Level	Code	Message
-Error	40001	Table 'ndb$test' is defined differently in NDB, column 'non_existing' does not exist. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
+Warning	40001	Table 'ndb$test' is defined differently in NDB, column 'non_existing' does not exist. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
 Error	1296	Got error 40001 'Incompatible table definitions' from NDBINFO
 
 ## 3) Incompatible column type -> error, with warning
@@ -198,7 +198,7 @@ SELECT * FROM ndb$test;
 ERROR HY000: Got error 40001 'Incompatible table definitions' from NDBINFO
 SHOW WARNINGS;
 Level	Code	Message
-Error	40001	Table 'ndb$test' is defined differently in NDB, column 'counter2' is not compatible. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
+Warning	40001	Table 'ndb$test' is defined differently in NDB, column 'counter2' is not compatible. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
 Error	1296	Got error 40001 'Incompatible table definitions' from NDBINFO
 ## 3b) bigint instead of int
 DROP TABLE ndb$test;
@@ -207,7 +207,7 @@ SELECT * FROM ndb$test;
 ERROR HY000: Got error 40001 'Incompatible table definitions' from NDBINFO
 SHOW WARNINGS;
 Level	Code	Message
-Error	40001	Table 'ndb$test' is defined differently in NDB, column 'node_id' is not compatible. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
+Warning	40001	Table 'ndb$test' is defined differently in NDB, column 'node_id' is not compatible. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
 Error	1296	Got error 40001 'Incompatible table definitions' from NDBINFO
 ## 3c) varchar instead of int
 DROP TABLE ndb$test;
@@ -216,7 +216,7 @@ SELECT * FROM ndb$test;
 ERROR HY000: Got error 40001 'Incompatible table definitions' from NDBINFO
 SHOW WARNINGS;
 Level	Code	Message
-Error	40001	Table 'ndb$test' is defined differently in NDB, column 'node_id' is not compatible. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
+Warning	40001	Table 'ndb$test' is defined differently in NDB, column 'node_id' is not compatible. The SQL to regenerate is: 'CREATE TABLE `ndbinfo`.`ndb$test` (`node_id` INT UNSIGNED, `block_number` INT UNSIGNED, `block_instance` INT UNSIGNED, `counter` INT UNSIGNED, `counter2` BIGINT UNSIGNED) ENGINE=NDBINFO'
 Error	1296	Got error 40001 'Incompatible table definitions' from NDBINFO
 DROP TABLE ndb$test;
 

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2011-01-21 12:43:19 +0000
+++ b/sql/ha_ndbcluster.cc	2011-01-21 14:27:30 +0000
@@ -504,11 +504,11 @@ static int ndb_to_mysql_error(const NdbE
       - Used by replication to see if the error was temporary
     */
     if (ndberr->status == NdbError::TemporaryError)
-      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_GET_TEMPORARY_ERRMSG, ER(ER_GET_TEMPORARY_ERRMSG),
                           ndberr->code, ndberr->message, "NDB");
     else
-      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                           ndberr->code, ndberr->message, "NDB");
   }
@@ -663,7 +663,7 @@ check_completed_operations_pre_commit(Th
               }
               else
               {
-                push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+                push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                                     ER_EXCEPTIONS_WRITE_ERROR,
                                     ER(ER_EXCEPTIONS_WRITE_ERROR), msg);
                 /* Slave will stop replication. */
@@ -1038,7 +1038,7 @@ static void set_ndb_err(THD *thd, const
   {
     char buf[FN_REFLEN];
     ndb_error_string(thd_ndb->m_error_code, buf, sizeof(buf));
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 			ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
 			thd_ndb->m_error_code, buf, "NDB");
   }
@@ -6452,7 +6452,7 @@ int ha_ndbcluster::start_statement(THD *
     /* lockThisTable(); */
     DBUG_PRINT("info", ("Locking the table..." ));
 #ifdef NOT_YET
-    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_GET_ERRMSG, ER(ER_GET_ERRMSG), 0,
                         "Table only locked locally in this mysqld", "NDB");
 #endif
@@ -7836,7 +7836,7 @@ int ha_ndbcluster::create(const char *na
   else if (create_info->tablespace && 
            create_info->storage_media == HA_SM_MEMORY)
   {
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_ILLEGAL_HA_CREATE_OPTION,
                         ER(ER_ILLEGAL_HA_CREATE_OPTION),
                         ndbcluster_hton_name,
@@ -7861,7 +7861,7 @@ int ha_ndbcluster::create(const char *na
 #ifndef NDB_WITHOUT_COLUMN_FORMAT
       if (key_part->field->field_storage_type() == HA_SM_DISK)
       {
-        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_ILLEGAL_HA_CREATE_OPTION,
                             ER(ER_ILLEGAL_HA_CREATE_OPTION),
                             ndbcluster_hton_name,
@@ -8246,7 +8246,7 @@ int ha_ndbcluster::create_index(THD *thd
   case ORDERED_INDEX:
     if (key_info->algorithm == HA_KEY_ALG_HASH)
     {
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 			  ER_ILLEGAL_HA_CREATE_OPTION,
 			  ER(ER_ILLEGAL_HA_CREATE_OPTION),
 			  ndbcluster_hton_name,
@@ -8328,7 +8328,7 @@ int ha_ndbcluster::create_ndb_index(THD
 #ifndef NDB_WITHOUT_COLUMN_FORMAT
     if (field->field_storage_type() == HA_SM_DISK)
     {
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_ILLEGAL_HA_CREATE_OPTION,
                           ER(ER_ILLEGAL_HA_CREATE_OPTION),
                           ndbcluster_hton_name,
@@ -13138,7 +13138,7 @@ uint ha_ndbcluster::set_up_partition_inf
   {
     if (!current_thd->variables.new_mode)
     {
-      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_ILLEGAL_HA_CREATE_OPTION,
                           ER(ER_ILLEGAL_HA_CREATE_OPTION),
                           ndbcluster_hton_name,

=== modified file 'sql/ha_ndbcluster_binlog.cc'
--- a/sql/ha_ndbcluster_binlog.cc	2011-01-21 12:43:19 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2011-01-21 14:27:30 +0000
@@ -1026,7 +1026,7 @@ static int ndbcluster_global_schema_lock
   {
     sql_print_warning("NDB: Could not acquire global schema lock (%d)%s",
                       ndb_error.code, ndb_error.message);
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                         ndb_error.code, ndb_error.message,
                         "NDB. Could not acquire global schema lock");
@@ -1075,7 +1075,7 @@ static int ndbcluster_global_schema_unlo
     {
       sql_print_warning("NDB: Releasing global schema lock (%d)%s",
                         ndb_error.code, ndb_error.message);
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                           ndb_error.code,
                           ndb_error.message,
@@ -1914,7 +1914,7 @@ ndbcluster_update_slock(THD *thd,
   }
 
   if (ndb_error)
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                         ndb_error->code,
                         ndb_error->message,
@@ -2327,7 +2327,7 @@ err:
   }
 end:
   if (ndb_error)
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                         ndb_error->code,
                         ndb_error->message,
@@ -4235,7 +4235,7 @@ err:
                       error, error_str, ndberror.code));
   if (error > 0)
   {
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_CONFLICT_FN_PARSE_ERROR,
                         ER(ER_CONFLICT_FN_PARSE_ERROR),
                         error_str);
@@ -4255,7 +4255,7 @@ err:
       default:
         abort();
     }
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_NDB_REPLICATION_SCHEMA_ERROR,
                         ER(ER_NDB_REPLICATION_SCHEMA_ERROR),
                         msg);
@@ -4267,7 +4267,7 @@ err:
     my_snprintf(msg, sizeof(msg), "Unable to retrieve %s.%s, logging and "
              "conflict resolution may not function as intended (%s)",
              ndb_rep_db, ndb_replication_table, tmp_buf);
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_ILLEGAL_HA_CREATE_OPTION,
                         ER(ER_ILLEGAL_HA_CREATE_OPTION),
                         ndbcluster_hton_name, msg);  
@@ -4537,7 +4537,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
                       "with BLOB attribute and no PK is not supported",
                       share->key);
       if (push_warning)
-        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_ILLEGAL_HA_CREATE_OPTION,
                             ER(ER_ILLEGAL_HA_CREATE_OPTION),
                             ndbcluster_hton_name,
@@ -4597,7 +4597,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
         failed, print a warning
       */
       if (push_warning > 1)
-        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                             dict->getNdbError().code,
                             dict->getNdbError().message, "NDB");
@@ -4625,7 +4625,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
         dict->dropEvent(my_event.getName(), 1))
     {
       if (push_warning > 1)
-        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                             dict->getNdbError().code,
                             dict->getNdbError().message, "NDB");
@@ -4644,7 +4644,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
     if (dict->createEvent(my_event))
     {
       if (push_warning > 1)
-        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                             dict->getNdbError().code,
                             dict->getNdbError().message, "NDB");
@@ -4657,7 +4657,7 @@ ndbcluster_create_event(THD *thd, Ndb *n
       DBUG_RETURN(-1);
     }
 #ifdef NDB_BINLOG_EXTRA_WARNINGS
-    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                         0, "NDB Binlog: Removed trailing event",
                         "NDB");
@@ -4779,7 +4779,7 @@ ndbcluster_create_event_ops(THD *thd, ND
     {
       sql_print_error("NDB Binlog: Creating NdbEventOperation failed for"
                       " %s",event_name);
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                           ndb->getNdbError().code,
                           ndb->getNdbError().message,
@@ -4840,7 +4840,7 @@ ndbcluster_create_event_ops(THD *thd, ND
             sql_print_error("NDB Binlog: Creating NdbEventOperation"
                             " blob field %u handles failed (code=%d) for %s",
                             j, op->getNdbError().code, event_name);
-            push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+            push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                                 ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                                 op->getNdbError().code,
                                 op->getNdbError().message,
@@ -4880,7 +4880,7 @@ ndbcluster_create_event_ops(THD *thd, ND
         retries= 0;
       if (retries == 0)
       {
-        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_GET_ERRMSG, ER(ER_GET_ERRMSG), 
                             op->getNdbError().code, op->getNdbError().message,
                             "NDB");
@@ -4957,7 +4957,7 @@ ndbcluster_drop_event(THD *thd, Ndb *ndb
         dict->getNdbError().code != 1419)
     {
       /* drop event failed for some reason, issue a warning */
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_GET_ERRMSG, ER(ER_GET_ERRMSG),
                           dict->getNdbError().code,
                           dict->getNdbError().message, "NDB");

=== modified file 'sql/ha_ndbinfo.cc'
--- a/sql/ha_ndbinfo.cc	2010-11-10 14:17:13 +0000
+++ b/sql/ha_ndbinfo.cc	2011-01-21 14:27:30 +0000
@@ -188,7 +188,7 @@ static int err2mysql(int error)
   default:
     break;
   }
-  push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+  push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                       ER_GET_ERRNO, ER(ER_GET_ERRNO), error);
   DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
 }
@@ -269,7 +269,7 @@ warn_incompatible(const NdbInfo::Table*
   generate_sql(ndb_tab, msg);
 
   const MYSQL_ERROR::enum_warning_level level =
-    (fatal ? MYSQL_ERROR::WARN_LEVEL_ERROR : MYSQL_ERROR::WARN_LEVEL_WARN);
+    (fatal ? MYSQL_ERROR::WARN_LEVEL_WARN : MYSQL_ERROR::WARN_LEVEL_NOTE);
   push_warning(current_thd, level, ERR_INCOMPAT_TABLE_DEF, msg.c_str());
 
   DBUG_VOID_RETURN;

=== modified file 'sql/sql_error.cc'
--- a/sql/sql_error.cc	2011-01-19 15:09:32 +0000
+++ b/sql/sql_error.cc	2011-01-21 14:27:30 +0000
@@ -579,14 +579,12 @@ void push_warning(THD *thd, MYSQL_ERROR:
   DBUG_ENTER("push_warning");
   DBUG_PRINT("enter", ("code: %d, msg: %s", code, msg));
 
-#ifdef MCP_BUGXXX
   /*
     Calling push_warning/push_warning_printf with a level of
     WARN_LEVEL_ERROR *is* a bug.  Either use my_printf_error(),
     my_error(), or WARN_LEVEL_WARN.
   */
   DBUG_ASSERT(level != MYSQL_ERROR::WARN_LEVEL_ERROR);
-#endif
 
   if (level == MYSQL_ERROR::WARN_LEVEL_ERROR)
     level= MYSQL_ERROR::WARN_LEVEL_WARN;

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110121142730-wfvgzybtxxftsitt.bundle
Thread
bzr commit into mysql-5.5-telco-7.0 branch (magnus.blaudd:3148) Magnus Blåudd21 Jan