Note that there are some explanatory texts on larger screens.

plurals
  1. POIllegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT)
    primarykey
    data
    text
    <p>Can anyone help me on how could i fix this error</p> <pre><code>Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'locate' </code></pre> <p>I have executed my stored procedure on the server1 and it's work fine, but it will throw an error on the server2. I've checked all the tables and stored procedure on both servers and it's all the same.</p> <p>Can anyone help me on what is this problem and the resolution for it.</p> <p>Here is the stored procedure.</p> <pre><code>DELIMITER $$ DROP PROCEDURE IF EXISTS `UPDATEPASSWORD` $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `UPDATEPASSWORD`(IN empn CHAR(9), IN oldpassword VARCHAR(255), IN newpassword VARCHAR(255)) main:BEGIN DECLARE diction INT; DECLARE prevpass INT; DECLARE len INT; DROP TABLE IF EXISTS passwordstatus; CREATE TEMPORARY TABLE passwordstatus ( `passwordstatus` VARCHAR(127) ); PREPARE stmt1 FROM "select count(seqid) into @diction from dictionary where instr(?,word)&gt;0 or instr(REVERSE(?),REVERSE(word))&gt;0 "; SET @a = newpassword; SET @b = newpassword; EXECUTE stmt1 USING @a,@b; DEALLOCATE PREPARE stmt1; IF @diction &gt; 0 THEN START TRANSACTION; PREPARE stmt1 FROM "INSERT INTO passwordstatus VALUES (?)"; SET @a = "PASSWORD CONTAINS COMMONLY USED WORDS"; EXECUTE stmt1 USING @a; DEALLOCATE PREPARE stmt1; COMMIT; SELECT * FROM passwordstatus; LEAVE main; END IF; PREPARE stmt1 FROM "select count(seqid) into @prevpass from prevpass where (instr(sha1(?),passwd)&gt;0 or instr(REVERSE(sha1(?)),REVERSE(passwd))&gt;0)and empno = ?"; SET @a = newpassword; SET @b =empn; EXECUTE stmt1 USING @a, @a, @b; DEALLOCATE PREPARE stmt1; IF @prevpass &gt; 0 THEN START TRANSACTION; PREPARE stmt1 FROM "INSERT INTO passwordstatus VALUES (?)"; SET @a = "PASSWORD CONTAINS PREVIOUSLY USED PASSWORDS"; EXECUTE stmt1 USING @a; DEALLOCATE PREPARE stmt1; COMMIT; SELECT * FROM passwordstatus; LEAVE main; END IF; PREPARE STMT1 FROM " SELECT COUNT(seqid) INTO @prevpass FROM prevpass where empno = ? "; SET @a = empn; EXECUTE STMT1 USING @a; DEALLOCATE PREPARE STMT1; START TRANSACTION; IF @prevpass = 6 THEN PREPARE STMT1 FROM "DELETE FROM prevpass WHERE EMPNO = ? ORDER BY seqid LIMIT 1"; SET @a = empn; EXECUTE STMT1 USING @a; DEALLOCATE PREPARE STMT1; END IF; PREPARE STMT FROM " UPDATE emppass SET passwd = sha1(?),lastupdate = now() WHERE empno = ? "; SET @a = newpassword; SET @b = empn; EXECUTE STMT USING @a,@b; DEALLOCATE PREPARE STMT; PREPARE STMT1 FROM " INSERT INTO prevpass (empno,passwd,createdate) VALUES (?,sha1(?),now())"; SET @a = empn; SET @b = newpassword; EXECUTE STMT1 USING @a,@b; DEALLOCATE PREPARE STMT1; PREPARE stmt1 FROM "INSERT INTO passwordstatus VALUES (?)"; SET @a = "PASSWORD UPDATED SUCCESSFULLY"; EXECUTE stmt1 USING @a; DEALLOCATE PREPARE stmt1; COMMIT; SELECT * FROM passwordstatus; END $$ DELIMITER ; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload