Commit 3f70f804 authored by unknown's avatar unknown

Merge mysql.com:/usr/home/bar/mysql-4.1.b10892

into  mysql.com:/usr/home/bar/mysql-5.0


mysql-test/t/grant.test:
  Auto merged
sql/item.cc:
  Auto merged
mysql-test/r/grant.result:
  using local copy
parents 630a23ba 00267b9f
......@@ -480,4 +480,11 @@ flush privileges;
delete from tables_priv where host = '' and user = 'mysqltest_1';
flush privileges;
#
# Bug #10892 user variables not auto cast for comparisons
# Check that we don't get illegal mix of collations
#
set @user123="non-existent";
select * from mysql.db where user=@user123;
# End of 4.1 tests
......@@ -1016,14 +1016,18 @@ bool DTCollation::aggregate(DTCollation &dt, uint flags)
; // Do nothing
}
else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) &&
derivation < dt.derivation &&
collation->state & MY_CS_UNICODE)
collation->state & MY_CS_UNICODE &&
(derivation < dt.derivation ||
(derivation == dt.derivation &&
!(dt.collation->state & MY_CS_UNICODE))))
{
// Do nothing
}
else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) &&
dt.derivation < derivation &&
dt.collation->state & MY_CS_UNICODE)
dt.collation->state & MY_CS_UNICODE &&
(dt.derivation < derivation ||
(dt.derivation == derivation &&
!(collation->state & MY_CS_UNICODE))))
{
set(dt);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment