[MDEV-5298]  Illegal mix of collations on timestamp Created: 2013-11-15  Updated: 2016-12-19  Resolved: 2013-12-10

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.5
Fix Version/s: 10.0.7

Type: Bug Priority: Minor
Reporter: kacper.rowinski Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
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)



 Comments   
Comment by Alexander Barkov [ 2013-11-18 ]

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;

Comment by Alexander Barkov [ 2013-12-10 ]

Pushed into 10.0.

Generated at Thu Feb 08 07:03:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.