random1 Posted June 3, 2010 Share Posted June 3, 2010 I have the stored procedure: CREATE PROCEDURE `procedure_currency_update`(IN `pRate` FLOAT, IN `pCurrencyAbr` TINYTEXT) LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT 'Updates a currency in the \'currency\' table with new rate info.' BEGIN /* Version 1.0a */ /* Update a currency with a new exchange rate and the last edited datetime */ UPDATE `currency` SET `currency_exchange_rate` = pRate, `currency_datetime_utc_last_edited` = UTC_TIMESTAMP() WHERE `currency_abbreviation` = pCurrencyAbr; END I call it like: CALL procedure_currency_update(1.4641, 'AUD'); The error that MySQL reports is: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' I checked the 'currency' table and it is utf8_unicode_ci. Any ideas why there is a mismatch of collations? Help with this would be much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/203712-illegal-mix-of-collations/ Share on other sites More sharing options...
random1 Posted June 3, 2010 Author Share Posted June 3, 2010 By the way I ran: show variables like 'colla%'; on the database and I get: utf8_unicode_ci for all the variables. Quote Link to comment https://forums.phpfreaks.com/topic/203712-illegal-mix-of-collations/#findComment-1066988 Share on other sites More sharing options...
random1 Posted June 4, 2010 Author Share Posted June 4, 2010 Anyone with some ideas? Quote Link to comment https://forums.phpfreaks.com/topic/203712-illegal-mix-of-collations/#findComment-1067689 Share on other sites More sharing options...
Mchl Posted June 4, 2010 Share Posted June 4, 2010 Perhaps try like this: WHERE `currency_abbreviation` = pCurrencyAbr COLLATE utf8_unicode_ci ; Quote Link to comment https://forums.phpfreaks.com/topic/203712-illegal-mix-of-collations/#findComment-1067694 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.