id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 36649,Right-hand CAST in a MySQL query produces DB error,ericlewis,ericlewis,"A right-hand CAST like this {{{ #!php get_results( ""SELECT * FROM $wpdb->postmeta WHERE meta_value=CAST('default' AS CHAR);""); }); }}} produces this error {{{ WordPress database error: [Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='] SELECT * FROM wp_postmeta WHERE meta_value=CAST('default' AS CHAR); }}}",defect (bug),closed,normal,4.6,Database,2.8,normal,fixed,has-patch needs-testing has-unit-tests,,