List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:July 14 2008 12:52pm
Subject:bzr push into mysql-6.0 branch (Davi.Arnaut:2677 to 2678) Bug#36777, WL#3288
View as plain text  
 2678 Davi Arnaut	2008-07-14
      Bug#36777: Warnings are raised as errors
      
      Various warning conditions may be improperly pushed with a
      error level. This is wrong and unnecessary because it might
      be improperly handled (SP handlers) if not under strict mode
      and if strict mode is set, all warnings will be automatically
      elevated to errors.
      
      The solution is to issue warnings only with the warning a
      default severity level of 'warning' and let the error system
      elevate it to a error if necessary.
      
      The error codes for warnings that could possibly be raise
      with a error level are:
      
      ER_DIVISION_BY_ZERO                 1365
      ER_TRUNCATED_WRONG_VALUE            1292
      ER_BINLOG_PURGE_FATAL_ERR           1377
      ER_INVALID_CHARACTER_STRING         1300
      ER_WRONG_VALUE_FOR_TYPE             1411
      ER_ZLIB_Z_DATA_ERROR                1259
      ER_TOO_BIG_FOR_UNCOMPRESS           1256
      ER_WRONG_PARAMETERS_TO_NATIVE_FCT   1583
      ER_VIEW_CHECK_FAILED                1369
modified:
  mysql-test/r/binlog_index.result
  mysql-test/r/ctype_utf8.result
  mysql-test/r/date_formats.result
  mysql-test/r/func_compress.result
  mysql-test/r/func_digest.result
  mysql-test/r/func_encrypt.result
  mysql-test/r/func_math.result
  mysql-test/r/func_str.result
  mysql-test/r/merge.result
  mysql-test/r/myisam-system.result
  mysql-test/r/strict.result
  mysql-test/r/trigger.result
  mysql-test/r/type_newdecimal.result
  mysql-test/r/view.result
  mysql-test/suite/rpl/r/rpl_EE_err.result
  sql/field.cc
  sql/ha_ndbcluster.cc
  sql/ha_ndbcluster_binlog.cc
  sql/handler.cc
  sql/item.cc
  sql/item_func.cc
  sql/item_strfunc.cc
  sql/item_timefunc.cc
  sql/log.cc
  sql/my_decimal.cc
  sql/sql_table.cc
  sql/sql_tablespace.cc
  sql/table.cc
  storage/myisammrg/ha_myisammrg.cc

 2677 Konstantin Osipov	2008-07-11
      WL#3288, step 1: ensure that the SQL layer always closes an open
      cursor (rnd or index read) before closing a handler.
modified:
  sql/handler.cc
  sql/handler.h
  sql/sql_select.cc
  sql/sql_select.h

=== modified file 'mysql-test/r/binlog_index.result'
--- a/mysql-test/r/binlog_index.result	2008-04-01 10:36:20 +0000
+++ b/mysql-test/r/binlog_index.result	2008-07-14 12:49:19 +0000
@@ -33,7 +33,7 @@ purge binary logs TO 'master-bin.000002'
 ERROR HY000: Fatal error during log purge
 show warnings;
 Level	Code	Message
-Error	1377	a problem with deleting MYSQLTEST_VARDIR/log/master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files
+Warning	1377	a problem with deleting MYSQLTEST_VARDIR/log/master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files
 Error	1377	Fatal error during log purge
 reset master;
 End of tests

=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result	2008-04-07 13:56:56 +0000
+++ b/mysql-test/r/ctype_utf8.result	2008-07-14 12:49:19 +0000
@@ -1666,27 +1666,27 @@ select char(0xff,0x8f using utf8);
 char(0xff,0x8f using utf8)
 NULL
 Warnings:
-Error	1300	Invalid utf8 character string: 'FF8F'
+Warning	1300	Invalid utf8 character string: 'FF8F'
 select char(195 using utf8);
 char(195 using utf8)
 NULL
 Warnings:
-Error	1300	Invalid utf8 character string: 'C3'
+Warning	1300	Invalid utf8 character string: 'C3'
 select char(196 using utf8);
 char(196 using utf8)
 NULL
 Warnings:
-Error	1300	Invalid utf8 character string: 'C4'
+Warning	1300	Invalid utf8 character string: 'C4'
 select char(2557 using utf8);
 char(2557 using utf8)
 NULL
 Warnings:
-Error	1300	Invalid utf8 character string: 'FD'
+Warning	1300	Invalid utf8 character string: 'FD'
 select convert(char(0xff,0x8f) using utf8);
 convert(char(0xff,0x8f) using utf8)
 NULL
 Warnings:
-Error	1300	Invalid utf8 character string: 'FF8F'
+Warning	1300	Invalid utf8 character string: 'FF8F'
 select hex(convert(char(2557 using latin1) using utf8));
 hex(convert(char(2557 using latin1) using utf8))
 09C3BD
@@ -1850,12 +1850,12 @@ select hex(char(0xFF using utf8));
 hex(char(0xFF using utf8))
 NULL
 Warnings:
-Error	1300	Invalid utf8 character string: 'FF'
+Warning	1300	Invalid utf8 character string: 'FF'
 select hex(convert(0xFF using utf8));
 hex(convert(0xFF using utf8))
 NULL
 Warnings:
-Error	1300	Invalid utf8 character string: 'FF'
+Warning	1300	Invalid utf8 character string: 'FF'
 select hex(_utf8 0x616263FF);
 ERROR HY000: Invalid utf8 character string: 'FF'
 select hex(_utf8 X'616263FF');

=== modified file 'mysql-test/r/date_formats.result'
--- a/mysql-test/r/date_formats.result	2008-02-12 19:09:16 +0000
+++ b/mysql-test/r/date_formats.result	2008-07-14 12:49:19 +0000
@@ -80,7 +80,7 @@ select STR_TO_DATE('2004.12.12 22.30.61'
 STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T')
 NULL
 Warnings:
-Error	1411	Incorrect time value: '22.30.61' for function str_to_date
+Warning	1411	Incorrect time value: '22.30.61' for function str_to_date
 create table t1 (date char(30), format char(30) not null);
 insert into t1 values
 ('2003-01-02 10:11:12', '%Y-%m-%d %H:%i:%S'),
@@ -352,21 +352,21 @@ Tuesday 52 2001	%W %u %x	NULL
 7 53 1998	%w %u %Y	NULL
 NULL	%m.%d.%Y	NULL
 Warnings:
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
-Error	1411	Incorrect datetime value: '10:20:10AM' for function str_to_date
-Error	1411	Incorrect datetime value: '15 Septembei 2001' for function str_to_date
-Error	1411	Incorrect datetime value: '15 Ju 2001' for function str_to_date
-Error	1411	Incorrect datetime value: 'Sund 15 MA' for function str_to_date
-Error	1411	Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date
-Error	1411	Incorrect datetime value: 'Sunday 01 2001' for function str_to_date
-Error	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error	1411	Incorrect datetime value: '7 53 1998' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
+Warning	1411	Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning	1411	Incorrect datetime value: '15 Septembei 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: '15 Ju 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Sund 15 MA' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Sunday 01 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: '7 53 1998' for function str_to_date
 select date,format,concat(str_to_date(date, format),'') as con from t1;
 date	format	con
 2003-01-02 10:11:12 PM	%Y-%m-%d %H:%i:%S %p	NULL
@@ -386,21 +386,21 @@ Tuesday 52 2001	%W %u %x	NULL
 7 53 1998	%w %u %Y	NULL
 NULL	%m.%d.%Y	NULL
 Warnings:
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date
-Error	1411	Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
-Error	1411	Incorrect datetime value: '10:20:10AM' for function str_to_date
-Error	1411	Incorrect datetime value: '15 Septembei 2001' for function str_to_date
-Error	1411	Incorrect datetime value: '15 Ju 2001' for function str_to_date
-Error	1411	Incorrect datetime value: 'Sund 15 MA' for function str_to_date
-Error	1411	Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date
-Error	1411	Incorrect datetime value: 'Sunday 01 2001' for function str_to_date
-Error	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
-Error	1411	Incorrect datetime value: '7 53 1998' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12.123456' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12AM' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12AN' for function str_to_date
+Warning	1411	Incorrect datetime value: '2003-01-02 10:11:12 PM' for function str_to_date
+Warning	1411	Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning	1411	Incorrect datetime value: '15 Septembei 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: '15 Ju 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Sund 15 MA' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Thursdai 12 1998' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Sunday 01 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: 'Tuesday 52 2001' for function str_to_date
+Warning	1411	Incorrect datetime value: '7 53 1998' for function str_to_date
 truncate table t1;
 insert into t1 values
 ('10:20:10AM', '%h:%i:%s'),
@@ -440,7 +440,7 @@ select str_to_date('15-01-2001 12:59:59'
 str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA'))
 NULL
 Warnings:
-Error	1411	Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_date
+Warning	1411	Incorrect datetime value: '15-01-2001 12:59:59' for function str_to_date
 explain extended select makedate(1997,1), addtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),subtime("31.12.97 11.59.59.999999 PM", "1 1.1.1.000002"),timediff("01.01.97 11:59:59.000001 PM","31.12.95 11:59:59.000002 PM"),cast(str_to_date("15-01-2001 12:59:59", "%d-%m-%Y %H:%i:%S") as TIME), maketime(23,11,12),microsecond("1997-12-31 23:59:59.000001");
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used

=== modified file 'mysql-test/r/func_compress.result'
--- a/mysql-test/r/func_compress.result	2006-10-13 14:33:28 +0000
+++ b/mysql-test/r/func_compress.result	2008-07-14 12:49:19 +0000
@@ -65,8 +65,8 @@ NULL
 50000
 NULL
 Warnings:
-Error	1259	ZLIB: Input data corrupted
-Error	1256	Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted)
+Warning	1259	ZLIB: Input data corrupted
+Warning	1256	Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted)
 drop table t1;
 set @@max_allowed_packet=1048576*100;
 select compress(repeat('aaaaaaaaaa', IF(XXX, 10, 10000000))) is null;
@@ -95,12 +95,12 @@ explain select * from t1 where uncompres
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	
 Warnings:
-Error	1259	ZLIB: Input data corrupted
+Warning	1259	ZLIB: Input data corrupted
 select * from t1 where uncompress(a) is null;
 a
 foo
 Warnings:
-Error	1259	ZLIB: Input data corrupted
+Warning	1259	ZLIB: Input data corrupted
 explain select *, uncompress(a) from t1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	
@@ -108,12 +108,12 @@ select *, uncompress(a) from t1;
 a	uncompress(a)
 foo	NULL
 Warnings:
-Error	1259	ZLIB: Input data corrupted
+Warning	1259	ZLIB: Input data corrupted
 select *, uncompress(a), uncompress(a) is null from t1;
 a	uncompress(a)	uncompress(a) is null
 foo	NULL	1
 Warnings:
-Error	1259	ZLIB: Input data corrupted
-Error	1259	ZLIB: Input data corrupted
+Warning	1259	ZLIB: Input data corrupted
+Warning	1259	ZLIB: Input data corrupted
 drop table t1;
 End of 5.0 tests

=== modified file 'mysql-test/r/func_digest.result'
--- a/mysql-test/r/func_digest.result	2007-12-18 17:27:22 +0000
+++ b/mysql-test/r/func_digest.result	2008-07-14 12:49:19 +0000
@@ -1346,32 +1346,32 @@ SELECT SHA2( x'ff', 1 );
 SHA2( x'ff', 1 )
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'sha2'
+Warning	1583	Incorrect parameters in the call to native function 'sha2'
 SELECT SHA2( x'ff', 2 );
 SHA2( x'ff', 2 )
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'sha2'
+Warning	1583	Incorrect parameters in the call to native function 'sha2'
 SELECT SHA2( x'ff', 223 );
 SHA2( x'ff', 223 )
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'sha2'
+Warning	1583	Incorrect parameters in the call to native function 'sha2'
 SELECT SHA2( x'ff', 511 );
 SHA2( x'ff', 511 )
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'sha2'
+Warning	1583	Incorrect parameters in the call to native function 'sha2'
 SELECT SHA2( x'ff', least(123, 42) );
 SHA2( x'ff', least(123, 42) )
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'sha2'
+Warning	1583	Incorrect parameters in the call to native function 'sha2'
 SELECT SHA2( x'ff', 10000000000000 );
 SHA2( x'ff', 10000000000000 )
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'sha2'
+Warning	1583	Incorrect parameters in the call to native function 'sha2'
 SELECT SHA2( SHA2( NULL, 224), 224 );
 SHA2( SHA2( NULL, 224), 224 )
 NULL

=== modified file 'mysql-test/r/func_encrypt.result'
--- a/mysql-test/r/func_encrypt.result	2008-02-12 19:29:55 +0000
+++ b/mysql-test/r/func_encrypt.result	2008-07-14 12:49:19 +0000
@@ -124,7 +124,7 @@ select des_encrypt("hello",10);
 des_encrypt("hello",10)
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'des_encrypt'
+Warning	1583	Incorrect parameters in the call to native function 'des_encrypt'
 select des_encrypt(NULL);
 des_encrypt(NULL)
 NULL
@@ -138,12 +138,12 @@ select des_encrypt(10, NULL);
 des_encrypt(10, NULL)
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'des_encrypt'
+Warning	1583	Incorrect parameters in the call to native function 'des_encrypt'
 select des_encrypt("hello", NULL);
 des_encrypt("hello", NULL)
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'des_encrypt'
+Warning	1583	Incorrect parameters in the call to native function 'des_encrypt'
 select des_decrypt("hello",10);
 des_decrypt("hello",10)
 hello
@@ -177,7 +177,7 @@ select hex(des_decrypt(des_encrypt("hell
 hex(des_decrypt(des_encrypt("hello","hidden")))
 NULL
 Warnings:
-Error	1583	Incorrect parameters in the call to native function 'des_decrypt'
+Warning	1583	Incorrect parameters in the call to native function 'des_decrypt'
 explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden"));
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used

=== modified file 'mysql-test/r/func_math.result'
--- a/mysql-test/r/func_math.result	2008-04-07 18:25:19 +0000
+++ b/mysql-test/r/func_math.result	2008-07-14 12:49:19 +0000
@@ -225,27 +225,27 @@ select ln(-1);
 ln(-1)
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 select log10(-1);
 log10(-1)
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 select log2(-1);
 log2(-1)
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 select log(2,-1);
 log(2,-1)
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 select log(-2,1);
 log(-2,1)
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 set sql_mode='';
 select round(111,-10);
 round(111,-10)

=== modified file 'mysql-test/r/func_str.result'
--- a/mysql-test/r/func_str.result	2008-05-13 23:42:43 +0000
+++ b/mysql-test/r/func_str.result	2008-07-14 12:49:19 +0000
@@ -1435,7 +1435,7 @@ select benchmark(-1, 1);
 benchmark(-1, 1)
 NULL
 Warnings:
-Error	1411	Incorrect count value: '-1' for function benchmark
+Warning	1411	Incorrect count value: '-1' for function benchmark
 set @password="password";
 set @my_data="clear text to encode";
 select md5(encode(@my_data, "password"));
@@ -2271,12 +2271,12 @@ SELECT CHAR(0xff,0x8f USING utf8);
 CHAR(0xff,0x8f USING utf8)
 NULL
 Warnings:
-Error	1300	Invalid utf8 character string: 'FF8F'
+Warning	1300	Invalid utf8 character string: 'FF8F'
 SELECT CHAR(0xff,0x8f USING utf8) IS NULL;
 CHAR(0xff,0x8f USING utf8) IS NULL
 1
 Warnings:
-Error	1300	Invalid utf8 character string: 'FF8F'
+Warning	1300	Invalid utf8 character string: 'FF8F'
 SET SQL_MODE=@orig_sql_mode;
 select substring('abc', cast(2 as unsigned int));
 substring('abc', cast(2 as unsigned int))

=== modified file 'mysql-test/r/merge.result'
--- a/mysql-test/r/merge.result	2008-06-28 11:00:59 +0000
+++ b/mysql-test/r/merge.result	2008-07-14 12:49:19 +0000
@@ -914,7 +914,7 @@ SELECT * FROM tm1;
 ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
 CHECK TABLE tm1;
 Table	Op	Msg_type	Msg_text
-test.tm1	check	Error	Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
+test.tm1	check	Warning	Table 'test.t2' is differently defined or of non-MyISAM type or doesn't exist
 test.tm1	check	Error	Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
 test.tm1	check	error	Corrupt
 ALTER TABLE t2 MODIFY a INT;

=== modified file 'mysql-test/r/myisam-system.result'
--- a/mysql-test/r/myisam-system.result	2006-05-03 12:59:17 +0000
+++ b/mysql-test/r/myisam-system.result	2008-07-14 12:49:19 +0000
@@ -2,7 +2,7 @@ drop table if exists t1,t2;
 create table t1 (a int) engine=myisam;
 drop table if exists t1;
 Warnings:
-Error	2	Can't find file: 't1' (errno: 2)
+Warning	2	Can't find file: 't1' (errno: 2)
 create table t1 (a int) engine=myisam;
 drop table t1;
 Got one of the listed errors

=== modified file 'mysql-test/r/strict.result'
--- a/mysql-test/r/strict.result	2008-05-22 18:40:15 +0000
+++ b/mysql-test/r/strict.result	2008-07-14 12:49:19 +0000
@@ -315,8 +315,8 @@ MOD(col1,0)
 NULL
 NULL
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 INSERT INTO t1 (col1) VALUES(-129);
 ERROR 22003: Out of range value for column 'col1' at row 1
 INSERT INTO t1 (col1) VALUES(128);
@@ -343,7 +343,7 @@ SELECT MOD(col1,0) FROM t1 WHERE col1 > 
 MOD(col1,0)
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 UPDATE t1 SET col1 = col1 - 50 WHERE col1 < 0;
 ERROR 22003: Out of range value for column 'col1' at row 1
 UPDATE t1 SET col2=col2 + 50 WHERE col2 > 0;
@@ -353,16 +353,16 @@ ERROR 22012: Division by 0
 set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO';
 INSERT INTO t1 values (1/0,1/0);
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 set @@sql_mode='ansi,traditional';
 SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 2;
 MOD(col1,0)
 NULL
 NULL
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 INSERT INTO t1 (col1) VALUES ('');
 ERROR HY000: Incorrect integer value: '' for column 'col1' at row 1
 INSERT INTO t1 (col1) VALUES ('a59b');
@@ -374,8 +374,8 @@ Warnings:
 Warning	1265	Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 values (1/0,1/0);
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 set @@sql_mode='ansi';
 INSERT INTO t1 values (1/0,1/0);
 set @@sql_mode='ansi,traditional';
@@ -457,8 +457,8 @@ Warnings:
 Warning	1265	Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 values (1/0,1/0);
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 INSERT IGNORE INTO t1 VALUES(-32769,-1),(32768,65536);
 Warnings:
 Warning	1264	Out of range value for column 'col1' at row 1
@@ -541,8 +541,8 @@ Warnings:
 Warning	1265	Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 values (1/0,1/0);
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 INSERT IGNORE INTO t1 VALUES(-8388609,-1),(8388608,16777216);
 Warnings:
 Warning	1264	Out of range value for column 'col1' at row 1
@@ -625,8 +625,8 @@ Warnings:
 Warning	1265	Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 values (1/0,1/0);
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 INSERT IGNORE INTO t1 values (-2147483649, -1),(2147643648,4294967296);
 Warnings:
 Warning	1264	Out of range value for column 'col1' at row 1
@@ -707,8 +707,8 @@ Warnings:
 Warning	1265	Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 values (1/0,1/0);
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 INSERT IGNORE INTO t1 VALUES(-9223372036854775809,-1),(9223372036854775808,18446744073709551616);
 Warnings:
 Warning	1264	Out of range value for column 'col1' at row 1
@@ -794,7 +794,7 @@ Warnings:
 Note	1265	Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 values (1/0);
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 INSERT IGNORE INTO t1 VALUES(1000),(-1000);
 Warnings:
 Warning	1264	Out of range value for column 'col1' at row 1
@@ -861,7 +861,7 @@ Warnings:
 Warning	1265	Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 (col1) VALUES (1/0);
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 INSERT IGNORE INTO t1 VALUES (+3.4E+39,-3.4E+39);
 Warnings:
 Warning	1264	Out of range value for column 'col1' at row 1
@@ -910,7 +910,7 @@ Warnings:
 Warning	1265	Data truncated for column 'col1' at row 1
 INSERT IGNORE INTO t1 (col1) values (1/0);
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 INSERT IGNORE INTO t1 VALUES (+1.9E+309,-1.9E+309);
 ERROR 22007: Illegal double '1.9E+309' value found during parsing
 INSERT IGNORE INTO t1 VALUES ('+2.0E+309','-2.0E+309');
@@ -1080,13 +1080,13 @@ Warnings:
 Warning	1292	Truncated incorrect datetime value: '31.10.2004 15.30 abc'
 insert into t1 values(STR_TO_DATE('32.10.2004 15.30','%d.%m.%Y %H.%i'));
 Warnings:
-Error	1411	Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
+Warning	1411	Incorrect datetime value: '32.10.2004 15.30' for function str_to_date
 insert into t1 values(STR_TO_DATE('2004.12.12 22:22:33 AM','%Y.%m.%d %r'));
 Warnings:
-Error	1411	Incorrect time value: '22:22:33 AM' for function str_to_date
+Warning	1411	Incorrect time value: '22:22:33 AM' for function str_to_date
 insert into t1 values(STR_TO_DATE('2004.12.12 abc','%Y.%m.%d %T'));
 Warnings:
-Error	1411	Incorrect time value: 'abc' for function str_to_date
+Warning	1411	Incorrect time value: 'abc' for function str_to_date
 insert into t1 values(STR_TO_DATE('31.10.2004 15.30','%d.%m.%Y %H.%i'));
 insert into t1 values(STR_TO_DATE('2004.12.12 11:22:33 AM','%Y.%m.%d %r'));
 insert into t1 values(STR_TO_DATE('2004.12.12 10:22:59','%Y.%m.%d %T'));
@@ -1104,9 +1104,9 @@ select count(*) from t1 where STR_TO_DAT
 count(*)
 7
 Warnings:
-Error	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
-Error	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
-Error	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
+Warning	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
+Warning	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
+Warning	1411	Incorrect datetime value: '2004.12.12 10:22:61' for function str_to_date
 drop table t1;
 create table t1 (col1 char(3), col2 integer);
 insert into t1 (col1) values (cast(1000 as char(3)));

=== modified file 'mysql-test/r/trigger.result'
--- a/mysql-test/r/trigger.result	2008-04-08 16:01:20 +0000
+++ b/mysql-test/r/trigger.result	2008-07-14 12:49:19 +0000
@@ -1073,7 +1073,7 @@ NULL
 SET @x=2;
 UPDATE t1 SET i1 = @x;
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 SELECT @x;
 @x
 NULL
@@ -1086,8 +1086,8 @@ NULL
 SET @x=4;
 UPDATE t1 SET i1 = @x;
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 SELECT @x;
 @x
 NULL
@@ -1190,16 +1190,16 @@ create trigger t4_bu before update on t4
 insert into t1 values(10, 10)|
 set @a:=1/0|
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 select 1/0 from t1|
 1/0
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 create trigger t1_bi before insert on t1 for each row set @a:=1/0|
 insert into t1 values(20, 20)|
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 drop trigger t1_bi|
 create trigger t1_bi before insert on t1 for each row
 begin
@@ -1219,7 +1219,7 @@ end|
 set @check=0, @t4_bi_called=0, @t4_bu_called=0|
 insert into t1 values(30, 30)|
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 select @check, @t4_bi_called, @t4_bu_called|
 @check	@t4_bi_called	@t4_bu_called
 2	1	1

=== modified file 'mysql-test/r/type_newdecimal.result'
--- a/mysql-test/r/type_newdecimal.result	2008-05-13 23:42:43 +0000
+++ b/mysql-test/r/type_newdecimal.result	2008-07-14 12:49:19 +0000
@@ -185,7 +185,7 @@ select 1e10/0e0;
 1e10/0e0
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 create table wl1612 (col1 int, col2 decimal(38,10), col3 numeric(38,10));
 insert into wl1612 values(1,12345678901234567890.1234567890,12345678901234567890.1234567890);
 select * from wl1612;
@@ -205,27 +205,27 @@ NULL
 NULL
 NULL
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 select col2/0 from wl1612;
 col2/0
 NULL
 NULL
 NULL
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 select col3/0 from wl1612;
 col3/0
 NULL
 NULL
 NULL
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 insert into wl1612 values(5,5000.0005,5000.0005);
 insert into wl1612 values(6,5000.0005,5000.0005);
 select sum(col2),sum(col3) from wl1612;
@@ -788,12 +788,12 @@ select 1 / 1E-500;
 1 / 1E-500
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 select 1 / 0;
 1 / 0
 NULL
 Warnings:
-Error	1365	Division by 0
+Warning	1365	Division by 0
 set sql_mode='ansi,traditional';
 CREATE TABLE Sow6_2f (col1 NUMERIC(4,2));
 INSERT INTO Sow6_2f VALUES (10.55);
@@ -819,11 +819,11 @@ NULL
 NULL
 NULL
 Warnings:
-Error	1365	Division by 0
-Error	1365	Division by 0
-Error	1365	Division by 0
-Error	1365	Division by 0
-Error	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
+Warning	1365	Division by 0
 INSERT INTO Sow6_2f VALUES ('a59b');
 ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1
 drop table Sow6_2f;
@@ -1444,12 +1444,12 @@ select cast(11.1234 as DECIMAL(3,2));
 cast(11.1234 as DECIMAL(3,2))
 9.99
 Warnings:
-Error	1264	Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1
 select * from (select cast(11.1234 as DECIMAL(3,2))) t;
 cast(11.1234 as DECIMAL(3,2))
 9.99
 Warnings:
-Error	1264	Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(11.1234 as DECIMAL(3,2))' at row 1
 select cast(a as DECIMAL(3,2))
 from (select 11.1233 as a
 UNION select 11.1234
@@ -1460,9 +1460,9 @@ cast(a as DECIMAL(3,2))
 9.99
 9.99
 Warnings:
-Error	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
 select cast(a as DECIMAL(3,2)), count(*)
 from (select 11.1233 as a
 UNION select 11.1234
@@ -1471,10 +1471,10 @@ UNION select 12.1234
 cast(a as DECIMAL(3,2))	count(*)
 9.99	3
 Warnings:
-Error	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
-Error	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
+Warning	1264	Out of range value for column 'cast(a as DECIMAL(3,2))' at row 1
 create table t1 (s varchar(100));
 insert into t1 values (0.00000000010000000000000000364321973154977415791655470655996396089904010295867919921875);
 drop table t1;
@@ -1540,7 +1540,7 @@ select cast(143.481 as decimal(2,1));
 cast(143.481 as decimal(2,1))
 9.9
 Warnings:
-Error	1264	Out of range value for column 'cast(143.481 as decimal(2,1))' at row 1
+Warning	1264	Out of range value for column 'cast(143.481 as decimal(2,1))' at row 1
 select cast(-3.4 as decimal(2,1));
 cast(-3.4 as decimal(2,1))
 -3.4
@@ -1548,12 +1548,12 @@ select cast(99.6 as decimal(2,0));
 cast(99.6 as decimal(2,0))
 99
 Warnings:
-Error	1264	Out of range value for column 'cast(99.6 as decimal(2,0))' at row 1
+Warning	1264	Out of range value for column 'cast(99.6 as decimal(2,0))' at row 1
 select cast(-13.4 as decimal(2,1));
 cast(-13.4 as decimal(2,1))
 -9.9
 Warnings:
-Error	1264	Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1
+Warning	1264	Out of range value for column 'cast(-13.4 as decimal(2,1))' at row 1
 select cast(98.6 as decimal(2,0));
 cast(98.6 as decimal(2,0))
 99

=== modified file 'mysql-test/r/view.result'
--- a/mysql-test/r/view.result	2008-06-28 11:00:59 +0000
+++ b/mysql-test/r/view.result	2008-07-14 12:49:19 +0000
@@ -1112,8 +1112,8 @@ insert into v1 values(3);
 ERROR HY000: CHECK OPTION failed 'test.v1'
 insert ignore into v1 values (2),(3),(0);
 Warnings:
-Error	1369	CHECK OPTION failed 'test.v1'
-Error	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
 select * from t1;
 a
 1
@@ -1126,8 +1126,8 @@ create table t2 (a int);
 insert into t2 values (2),(3),(0);
 insert ignore into v1 SELECT a from t2;
 Warnings:
-Error	1369	CHECK OPTION failed 'test.v1'
-Error	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
 select * from t1 order by a desc;
 a
 1
@@ -1149,7 +1149,7 @@ a
 update v1 set a=a+1;
 update ignore v1,t2 set v1.a=v1.a+1 where v1.a=t2.a;
 Warnings:
-Error	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
 select * from t1;
 a
 1
@@ -1183,7 +1183,7 @@ insert into v1 values (1) on duplicate k
 ERROR HY000: CHECK OPTION failed 'test.v1'
 insert ignore into v1 values (1) on duplicate key update a=2;
 Warnings:
-Error	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
 select * from t1;
 a
 1
@@ -1284,7 +1284,7 @@ insert ignore into v1 values (6);
 ERROR HY000: CHECK OPTION failed 'test.v1'
 insert ignore into v1 values (6),(3);
 Warnings:
-Error	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
 select * from t1;
 s1
 3
@@ -1329,9 +1329,9 @@ delete from t1;
 load data infile '../std_data_ln/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines;
 Warnings:
 Warning	1366	Incorrect integer value: 'error      ' for column 'a' at row 3
-Error	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
 Warning	1366	Incorrect integer value: 'wrong end  ' for column 'a' at row 4
-Error	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
 select * from t1 order by a,b;
 a	b
 1	row 1
@@ -1355,7 +1355,7 @@ concat('|',a,'|')	concat('|',b,'|')
 delete from t1;
 load data infile '../std_data_ln/loaddata2.dat' ignore into table v1 fields terminated by ',' enclosed by '''';
 Warnings:
-Error	1369	CHECK OPTION failed 'test.v1'
+Warning	1369	CHECK OPTION failed 'test.v1'
 Warning	1261	Row 2 doesn't contain data for all columns
 select concat('|',a,'|'), concat('|',b,'|') from t1;
 concat('|',a,'|')	concat('|',b,'|')

=== modified file 'mysql-test/suite/rpl/r/rpl_EE_err.result'
--- a/mysql-test/suite/rpl/r/rpl_EE_err.result	2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl_EE_err.result	2008-07-14 12:49:19 +0000
@@ -8,4 +8,4 @@ create table t1 (a int) engine=myisam;
 flush tables;
 drop table if exists t1;
 Warnings:
-Error	2	Can't find file: 't1' (errno: 2)
+Warning	2	Can't find file: 't1' (errno: 2)

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2008-06-30 20:21:41 +0000
+++ b/sql/field.cc	2008-07-14 12:49:19 +0000
@@ -2590,7 +2590,7 @@ int Field_new_decimal::store(const char 
     String from_as_str;
     from_as_str.copy(from, length, &my_charset_bin);
 
-    push_warning_printf(table->in_use, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(table->in_use, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
                         ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
                         "decimal", from_as_str.c_ptr(), field_name,
@@ -6194,11 +6194,9 @@ check_string_copy_error(Field_str *field
     *t++= '.';
   }
   *t= '\0';
-  push_warning_printf(field->table->in_use, 
-                      field->table->in_use->abort_on_warning ?
-                      MYSQL_ERROR::WARN_LEVEL_ERROR :
+  push_warning_printf(field->table->in_use,
                       MYSQL_ERROR::WARN_LEVEL_WARN,
-                      ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, 
+                      ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
                       ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
                       "string", tmp, field->field_name,
                       (ulong) field->table->in_use->row_count);
@@ -6235,7 +6233,7 @@ Field_longstr::report_if_important_data(
     if (test_if_important_data(field_charset, ptr, end))
     {
       if (table->in_use->abort_on_warning)
-        set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+        set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_DATA_TOO_LONG, 1);
       else
         set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1);
       return 2;
@@ -6305,7 +6303,7 @@ int Field_str::store(double nr)
   if (error)
   {
     if (table->in_use->abort_on_warning)
-      set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_DATA_TOO_LONG, 1);
     else
       set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1);
   }
@@ -8707,7 +8705,7 @@ int Field_bit::store(const char *from, u
     set_rec_bits((1 << bit_len) - 1, bit_ptr, bit_ofs, bit_len);
     memset(ptr, 0xff, bytes_in_rec);
     if (table->in_use->really_abort_on_warning())
-      set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_DATA_TOO_LONG, 1);
     else
       set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
     return 1;
@@ -9117,7 +9115,7 @@ int Field_bit_as_char::store(const char 
     if (bits)
       *ptr&= ((1 << bits) - 1); /* set first uchar */
     if (table->in_use->really_abort_on_warning())
-      set_warning(MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DATA_TOO_LONG, 1);
+      set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_DATA_TOO_LONG, 1);
     else
       set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
     return 1;

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2008-06-28 11:00:59 +0000
+++ b/sql/ha_ndbcluster.cc	2008-07-14 12:49:19 +0000
@@ -239,11 +239,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");
   return error;
@@ -480,7 +480,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");
   }
@@ -5864,7 +5864,7 @@ int ha_ndbcluster::create(const char *na
   else if (create_info->tablespace && 
            create_info->default_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,
@@ -5887,7 +5887,7 @@ int ha_ndbcluster::create(const char *na
     {
       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,
@@ -6143,7 +6143,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,
@@ -6216,7 +6216,7 @@ int ha_ndbcluster::create_ndb_index(THD 
     Field *field= key_part->field;
     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,
@@ -10632,7 +10632,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	2008-06-20 13:11:20 +0000
+++ b/sql/ha_ndbcluster_binlog.cc	2008-07-14 12:49:19 +0000
@@ -1196,7 +1196,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,
@@ -1542,7 +1542,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,
@@ -2970,7 +2970,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,
@@ -3022,7 +3022,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");
@@ -3050,7 +3050,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");
@@ -3069,7 +3069,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");
@@ -3082,7 +3082,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");
@@ -3196,7 +3196,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,
@@ -3258,7 +3258,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,
@@ -3299,7 +3299,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");
@@ -3376,7 +3376,7 @@ ndbcluster_drop_event(THD *thd, Ndb *ndb
     if (dict->getNdbError().code != 4710)
     {
       /* 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/handler.cc'
--- a/sql/handler.cc	2008-07-11 16:22:44 +0000
+++ b/sql/handler.cc	2008-07-14 12:49:19 +0000
@@ -1933,7 +1933,7 @@ int ha_delete_table(THD *thd, handlerton
       XXX: should we convert *all* errors to warnings here?
       What if the error is fatal?
     */
-    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error,
+    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, error,
                 ha_delete_table_error_handler.buff);
   }
   delete file;

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2008-06-17 20:04:19 +0000
+++ b/sql/item.cc	2008-07-14 12:49:19 +0000
@@ -4509,7 +4509,6 @@ String *Item::check_well_formed_result(S
   {
     THD *thd= current_thd;
     char hexbuf[7];
-    enum MYSQL_ERROR::enum_warning_level level;
     uint diff= str->length() - wlen;
     set_if_smaller(diff, 3);
     octet2hex(hexbuf, str->ptr() + wlen, diff);
@@ -4522,17 +4521,16 @@ String *Item::check_well_formed_result(S
     if ((thd->variables.sql_mode &
          (MODE_STRICT_TRANS_TABLES | MODE_STRICT_ALL_TABLES)))
     {
-      level= MYSQL_ERROR::WARN_LEVEL_ERROR;
       null_value= 1;
       str= 0;
     }
     else
     {
-      level= MYSQL_ERROR::WARN_LEVEL_WARN;
       str->length(wlen);
     }
-    push_warning_printf(thd, level, ER_INVALID_CHARACTER_STRING,
-                        ER(ER_INVALID_CHARACTER_STRING), cs->csname, hexbuf);
+    push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+                        ER_INVALID_CHARACTER_STRING, ER(ER_INVALID_CHARACTER_STRING),
+                        cs->csname, hexbuf);
   }
   return str;
 }

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2008-06-17 20:04:19 +0000
+++ b/sql/item_func.cc	2008-07-14 12:49:19 +0000
@@ -619,7 +619,7 @@ void Item_func::signal_divide_by_null()
 {
   THD *thd= current_thd;
   if (thd->variables.sql_mode & MODE_ERROR_FOR_DIVISION_BY_ZERO)
-    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_DIVISION_BY_ZERO,
+    push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_DIVISION_BY_ZERO,
                  ER(ER_DIVISION_BY_ZERO));
   null_value= 1;
 }
@@ -1074,7 +1074,7 @@ my_decimal *Item_decimal_typecast::val_d
   return dec;
 
 err:
-  push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+  push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                       ER_WARN_DATA_OUT_OF_RANGE,
                       ER(ER_WARN_DATA_OUT_OF_RANGE),
                       name, 1);
@@ -3722,7 +3722,7 @@ longlong Item_func_benchmark::val_int()
     {
       char buff[22];
       llstr(((longlong) loop_count), buff);
-      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE),
                           "count", buff, "benchmark");
     }

=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc	2008-06-17 20:04:19 +0000
+++ b/sql/item_strfunc.cc	2008-07-14 12:49:19 +0000
@@ -249,7 +249,7 @@ String *Item_func_sha2::val_str(String *
   default:
     if (!args[1]->const_item())
       push_warning_printf(current_thd,
-        MYSQL_ERROR::WARN_LEVEL_ERROR,
+        MYSQL_ERROR::WARN_LEVEL_WARN,
         ER_WRONG_PARAMETERS_TO_NATIVE_FCT,
         ER(ER_WRONG_PARAMETERS_TO_NATIVE_FCT), "sha2");
     null_value= TRUE;
@@ -276,7 +276,7 @@ String *Item_func_sha2::val_str(String *
 
 #else
   push_warning_printf(current_thd,
-    MYSQL_ERROR::WARN_LEVEL_ERROR,
+    MYSQL_ERROR::WARN_LEVEL_WARN,
     ER_FEATURE_DISABLED,
     ER(ER_FEATURE_DISABLED),
     "sha2", "--with-ssl");
@@ -314,7 +314,7 @@ void Item_func_sha2::fix_length_and_dec(
 #endif
   default:
     push_warning_printf(current_thd,
-      MYSQL_ERROR::WARN_LEVEL_ERROR,
+      MYSQL_ERROR::WARN_LEVEL_WARN,
       ER_WRONG_PARAMETERS_TO_NATIVE_FCT,
       ER(ER_WRONG_PARAMETERS_TO_NATIVE_FCT), "sha2");
   }
@@ -333,7 +333,7 @@ void Item_func_sha2::fix_length_and_dec(
       DERIVATION_COERCIBLE);
 #else
   push_warning_printf(current_thd,
-    MYSQL_ERROR::WARN_LEVEL_ERROR,
+    MYSQL_ERROR::WARN_LEVEL_WARN,
     ER_FEATURE_DISABLED,
     ER(ER_FEATURE_DISABLED),
     "sha2", "--with-ssl");
@@ -671,11 +671,11 @@ String *Item_func_des_encrypt::val_str(S
   return &tmp_value;
 
 error:
-  push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+  push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
                           code, ER(code),
                           "des_encrypt");
 #else
-  push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+  push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
                       ER_FEATURE_DISABLED, ER(ER_FEATURE_DISABLED),
                       "des_encrypt", "--with-ssl");
 #endif	/* HAVE_OPENSSL */
@@ -748,12 +748,12 @@ String *Item_func_des_decrypt::val_str(S
   return &tmp_value;
 
 error:
-  push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+  push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
                           code, ER(code),
                           "des_decrypt");
 wrong_key:
 #else
-  push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+  push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
                       ER_FEATURE_DISABLED, ER(ER_FEATURE_DISABLED),
                       "des_decrypt", "--with-ssl");
 #endif	/* HAVE_OPENSSL */
@@ -3466,7 +3466,7 @@ String *Item_func_compress::val_str(Stri
 		     (const Bytef*)res->ptr(), res->length())) != Z_OK)
   {
     code= err==Z_MEM_ERROR ? ER_ZLIB_Z_MEM_ERROR : ER_ZLIB_Z_BUF_ERROR;
-    push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,code,ER(code));
+    push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,code,ER(code));
     null_value= 1;
     return 0;
   }
@@ -3504,7 +3504,7 @@ String *Item_func_uncompress::val_str(St
   /* If length is less than 4 bytes, data is corrupt */
   if (res->length() <= 4)
   {
-    push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
 			ER_ZLIB_Z_DATA_ERROR,
 			ER(ER_ZLIB_Z_DATA_ERROR));
     goto err;
@@ -3514,7 +3514,7 @@ String *Item_func_uncompress::val_str(St
   new_size= uint4korr(res->ptr()) & 0x3FFFFFFF;
   if (new_size > current_thd->variables.max_allowed_packet)
   {
-    push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,
 			ER_TOO_BIG_FOR_UNCOMPRESS,
 			ER(ER_TOO_BIG_FOR_UNCOMPRESS),
                         current_thd->variables.max_allowed_packet);
@@ -3532,7 +3532,7 @@ String *Item_func_uncompress::val_str(St
 
   code= ((err == Z_BUF_ERROR) ? ER_ZLIB_Z_BUF_ERROR :
 	 ((err == Z_MEM_ERROR) ? ER_ZLIB_Z_MEM_ERROR : ER_ZLIB_Z_DATA_ERROR));
-  push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_ERROR,code,ER(code));
+  push_warning(current_thd,MYSQL_ERROR::WARN_LEVEL_WARN,code,ER(code));
 
 err:
   null_value= 1;

=== modified file 'sql/item_timefunc.cc'
--- a/sql/item_timefunc.cc	2008-03-05 10:32:49 +0000
+++ b/sql/item_timefunc.cc	2008-07-14 12:49:19 +0000
@@ -602,7 +602,7 @@ err:
   {
     char buff[128];
     strmake(buff, val_begin, min(length, sizeof(buff)-1));
-    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                         ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE),
                         date_time_type, buff, "str_to_date");
   }

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2008-07-03 21:26:51 +0000
+++ b/sql/log.cc	2008-07-14 12:49:19 +0000
@@ -2875,7 +2875,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
       }
       else
       {
-        push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_BINLOG_PURGE_FATAL_ERR,
                             "a problem with deleting %s; "
                             "consider examining correspondence "
@@ -2906,7 +2906,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
     }
     else
     {
-      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_BINLOG_PURGE_FATAL_ERR,
                           "a problem with deleting %s; "
                           "consider examining correspondence "
@@ -3129,7 +3129,7 @@ int MYSQL_BIN_LOG::purge_logs(const char
         /*
           Other than ENOENT are fatal
         */
-        push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_BINLOG_PURGE_FATAL_ERR,
                             "a problem with getting info on being purged %s; "
                             "consider examining correspondence "
@@ -3161,7 +3161,7 @@ int MYSQL_BIN_LOG::purge_logs(const char
         }
         else
         {
-          push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+          push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                               ER_BINLOG_PURGE_FATAL_ERR,
                               "a problem with deleting %s; "
                               "consider examining correspondence "
@@ -3260,7 +3260,7 @@ int MYSQL_BIN_LOG::purge_logs_before_dat
         /*
           Other than ENOENT are fatal
         */
-        push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_BINLOG_PURGE_FATAL_ERR,
                             "a problem with getting info on being purged %s; "
                             "consider examining correspondence "
@@ -3289,7 +3289,7 @@ int MYSQL_BIN_LOG::purge_logs_before_dat
         }
         else
         {
-          push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+          push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                               ER_BINLOG_PURGE_FATAL_ERR,
                               "a problem with deleting %s; "
                               "consider examining correspondence "

=== modified file 'sql/my_decimal.cc'
--- a/sql/my_decimal.cc	2008-05-13 23:42:43 +0000
+++ b/sql/my_decimal.cc	2008-07-14 12:49:19 +0000
@@ -47,11 +47,11 @@ int decimal_operation_results(int result
 			"DECIMAL", "");
     break;
   case E_DEC_DIV_ZERO:
-    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 			ER_DIVISION_BY_ZERO, ER(ER_DIVISION_BY_ZERO));
     break;
   case E_DEC_BAD_NUM:
-    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 			ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
 			ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD),
 			"decimal", "", "", (long)-1);

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2008-06-30 09:59:59 +0000
+++ b/sql/sql_table.cc	2008-07-14 12:49:19 +0000
@@ -4247,12 +4247,12 @@ static bool mysql_admin_table(THD* thd, 
     {
       DBUG_PRINT("admin", ("open table failed"));
       if (!thd->warn_list.elements)
-        push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                      ER_CHECK_NO_SUCH_TABLE, ER(ER_CHECK_NO_SUCH_TABLE));
       /* if it was a view will check md5 sum */
       if (table->view &&
           view_checksum(thd, table) == HA_ADMIN_WRONG_CHECKSUM)
-        push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+        push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                      ER_VIEW_CHECKSUM, ER(ER_VIEW_CHECKSUM));
       result_code= HA_ADMIN_CORRUPT;
       goto send_result;
@@ -7160,7 +7160,7 @@ err:
     }
     bool save_abort_on_warning= thd->abort_on_warning;
     thd->abort_on_warning= TRUE;
-    make_truncated_value_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+    make_truncated_value_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                                  f_val, strlength(f_val), t_type,
                                  alter_info->datetime_field->field_name);
     thd->abort_on_warning= save_abort_on_warning;

=== modified file 'sql/sql_tablespace.cc'
--- a/sql/sql_tablespace.cc	2008-06-30 20:21:41 +0000
+++ b/sql/sql_tablespace.cc	2008-07-14 12:49:19 +0000
@@ -31,7 +31,7 @@ int mysql_alter_tablespace(THD *thd, st_
   {
     hton= ha_default_handlerton(thd);
     if (ts_info->storage_engine != 0)
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_WARN_USING_OTHER_HANDLER,
                           ER(ER_WARN_USING_OTHER_HANDLER),
                           hton_name(hton)->str,

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2008-06-30 20:21:41 +0000
+++ b/sql/table.cc	2008-07-14 12:49:19 +0000
@@ -1351,7 +1351,7 @@ static int open_binary_frm(THD *thd, TAB
                       "Please do \"ALTER TABLE '%s' FORCE\" to fix it!",
                       share->fieldnames.type_names[i], share->table_name.str,
                       share->table_name.str);
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_CRASHED_ON_USAGE,
                           "Found incompatible DECIMAL field '%s' in %s; "
                           "Please do \"ALTER TABLE '%s' FORCE\" to fix it!",
@@ -1554,7 +1554,7 @@ static int open_binary_frm(THD *thd, TAB
                             "Please do \"ALTER TABLE '%s' FORCE \" to fix it!",
                             share->table_name.str,
                             share->table_name.str);
-            push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+            push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                                 ER_CRASHED_ON_USAGE,
                                 "Found wrong key definition in %s; "
                                 "Please do \"ALTER TABLE '%s' FORCE\" to fix "
@@ -3497,7 +3497,7 @@ int TABLE_LIST::view_check_option(THD *t
     TABLE_LIST *main_view= top_table();
     if (ignore_failure)
     {
-      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                           ER_VIEW_CHECK_FAILED, ER(ER_VIEW_CHECK_FAILED),
                           main_view->view_db.str, main_view->view_name.str);
       return(VIEW_CHECK_SKIP);

=== modified file 'storage/myisammrg/ha_myisammrg.cc'
--- a/storage/myisammrg/ha_myisammrg.cc	2008-06-28 11:00:59 +0000
+++ b/storage/myisammrg/ha_myisammrg.cc	2008-07-14 12:49:19 +0000
@@ -153,7 +153,7 @@ extern "C" void myrg_print_wrong_table(c
   buf[db.length]= '.';
   memcpy(buf + db.length + 1, name.str, name.length);
   buf[db.length + name.length + 1]= 0;
-  push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+  push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                       ER_ADMIN_WRONG_MRG_TABLE, ER(ER_ADMIN_WRONG_MRG_TABLE),
                       buf);
 }

Thread
bzr push into mysql-6.0 branch (Davi.Arnaut:2677 to 2678) Bug#36777, WL#3288Davi Arnaut14 Jul