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

Illegal mix of collations on timestamp

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.5
    • Fix Version/s: 10.0.7
    • Component/s: None
    • Labels:
      None
    • Environment:

      Distributor ID: Ubuntu
      Description: Ubuntu 13.10
      Release: 13.10
      Codename: saucy

      Description

      MariaDB [test]> set charset latin2;
      Query OK, 0 rows affected (0.00 sec)
      
      MariaDB [test]> DELETE FROM  annonce  WHERE  `created_on` <= '2013-11-15 00:41:28' - INTERVAL 7 DAY;
      ERROR 1267 (HY000): Illegal mix of collations (latin1_swedish_ci,NUMERIC) and (latin2_general_ci,NUMERIC) for operation '<='
      MariaDB [test]> desc annonce;
      +------------+------------------------+------+-----+-------------------+----------------+
      | Field      | Type                   | Null | Key | Default           | Extra          |
      +------------+------------------------+------+-----+-------------------+----------------+
      | id         | mediumint(8) unsigned  | NO   | PRI | NULL              | auto_increment |
      | users_id   | mediumint(8) unsigned  | NO   | MUL | NULL              |                
      | note       | text                   | NO   |     | NULL              |                |
      | created_on | timestamp              | NO   | MUL | CURRENT_TIMESTAMP |                |
      +------------+------------------------+------+-----+-------------------+----------------+
      4 rows in set (0.00 sec)
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            bar Alexander Barkov added a comment -

            The full script how to reproduce the problem:

            set names latin2;
            drop table if exists t1;
            create table t1 (created timestamp not null);
            select * from t1 where created < '2013-11-15 00:41:28' - INTERVAL 7 DAY;

            Show
            bar Alexander Barkov added a comment - The full script how to reproduce the problem: set names latin2; drop table if exists t1; create table t1 (created timestamp not null); select * from t1 where created < '2013-11-15 00:41:28' - INTERVAL 7 DAY;
            Hide
            bar Alexander Barkov added a comment -

            Pushed into 10.0.

            Show
            bar Alexander Barkov added a comment - Pushed into 10.0.

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                fazi kacper.rowinski
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: