Bug #68211 SET default_storage_engine = IF(..) produces ER_TRUNCATED_WRONG_VALUE
Submitted: 29 Jan 2013 0:12 Modified: 8 Mar 2018 23:27
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.5, 5.6 OS:Any
Assigned to: CPU Architecture:Any

[29 Jan 2013 0:12] Elena Stepanova
Description:
MySQL [(none)]> set @@default_storage_engine = IF(2=1,'MyISAM','InnoDB');
Query OK, 0 rows affected, 1 warning (0.00 sec)

MySQL [(none)]> show warnings;
+---------+------+---------------------------------------------+
| Level   | Code | Message                                     |
+---------+------+---------------------------------------------+
| Warning | 1292 | Truncated incorrect INTEGER value: 'InnoDB' |
+---------+------+---------------------------------------------+
1 row in set (0.00 sec)

MySQL [(none)]> select @@default_storage_engine;
+--------------------------+
| @@default_storage_engine |
+--------------------------+
| InnoDB                   |
+--------------------------+
1 row in set (0.00 sec)

MySQL [(none)]> set @@default_storage_engine = IF(2=2,'MyISAM','InnoDB');
Query OK, 0 rows affected, 1 warning (0.00 sec)

MySQL [(none)]> show warnings;
+---------+------+---------------------------------------------+
| Level   | Code | Message                                     |
+---------+------+---------------------------------------------+
| Warning | 1292 | Truncated incorrect INTEGER value: 'MyISAM' |
+---------+------+---------------------------------------------+
1 row in set (0.00 sec)

MySQL [(none)]> select @@default_storage_engine;
+--------------------------+
| @@default_storage_engine |
+--------------------------+
| MyISAM                   |
+--------------------------+
1 row in set (0.00 sec)

It's harmless as it seems, just weird how it comes up with INTEGER. 

How to repeat:
set @@default_storage_engine = IF(2=1,'MyISAM','InnoDB');
[29 Jan 2013 0:34] MySQL Verification Team
Thank you for the bug report.
[8 Mar 2018 23:27] Roy Lyseng
Posted by developer:
 
Fixed in release 8.0.5 and up.