[MDEV-6146] Can't mix (latin1_swedish_ci,NUMERIC) and (utf8_unicode_ci,IMPLICIT) for MATCH Created: 2014-04-21  Updated: 2023-09-28  Resolved: 2014-04-29

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.36, 10.0.10
Fix Version/s: 5.5.38, 10.0.11

Type: Bug Priority: Major
Reporter: Olaf van der Spek Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: upstream
Environment:

Debian



 Description   

Shouldn't it be able to mix numbers and strings in a match query?

CREATE TABLE `sitelog` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `added` datetime NOT NULL,
  `txt` text COLLATE utf8_unicode_ci NOT NULL,
  `uid` int(11) NOT NULL,
  `id2` int(11) NOT NULL,
  `id2_type` char(1) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`),
  KEY `id2` (`id2`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
select txt, unix_timestamp(added), uid, id2, id2_type    from sitelog    where match (id2, uid, txt) against ('' in boolean mode); 

ERROR 1270 (HY000): Illegal mix of collations (latin1_swedish_ci,NUMERIC), (latin1_swedish_ci,NUMERIC), (utf8_unicode_ci,IMPLICIT) for operation 'match'



 Comments   
Comment by Elena Stepanova [ 2014-04-21 ]

Thank you for the report.

Reproducible on MySQL 5.5-5.7, MariaDB 5.5, 10.0.
Not reproducible on MariaDB 5.1-5.3, MySQL 5.1.

I haven't found in documentation any explanation why it shouldn't work.
bar,
Could you please take a look?

Comment by Alexander Barkov [ 2014-04-22 ]

Looks like a bug.

Comment by Alexander Barkov [ 2014-04-23 ]

Pushed into 5.5.

Comment by Sergei Golubchik [ 2014-04-28 ]

This broke the fulltext test in the --ps-protocol mode.
Reopening.

Comment by Alexander Barkov [ 2014-04-29 ]

Pushed an additional patch fixing the "mtr --ps fulltext" failure.

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