Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4107

SET default_storage_engine = IF(..) produces ER_TRUNCATED_WRONG_VALUE

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 10.0.1, 5.5.29
    • Fix Version/s: 10.0, 5.5
    • Component/s: None
    • Labels:

      Description

      The problem is reproducible on MySQL 5.5-5.6 and filed as http://bugs.mysql.com/bug.php?id=68211

      set @@default_storage_engine = IF(2=1,'MyISAM','InnoDB');
      Query OK, 0 rows affected, 1 warning (0.00 sec)
      
      show warnings;
      +---------+------+---------------------------------------------+
      | Level   | Code | Message                                     |
      +---------+------+---------------------------------------------+
      | Warning | 1292 | Truncated incorrect INTEGER value: 'InnoDB' |
      +---------+------+---------------------------------------------+
      1 row in set (0.00 sec)
      
      select @@default_storage_engine;
      +--------------------------+
      | @@default_storage_engine |
      +--------------------------+
      | InnoDB                   |
      +--------------------------+
      1 row in set (0.00 sec)
      
      set @@default_storage_engine = IF(2=2,'MyISAM','InnoDB');
      Query OK, 0 rows affected, 1 warning (0.00 sec)
      
      show warnings;
      +---------+------+---------------------------------------------+
      | Level   | Code | Message                                     |
      +---------+------+---------------------------------------------+
      | Warning | 1292 | Truncated incorrect INTEGER value: 'MyISAM' |
      +---------+------+---------------------------------------------+
      1 row in set (0.00 sec)
      
      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.

      Test case:

      set @@default_storage_engine = IF(2=1,'MyISAM','InnoDB');
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: