Commit 89c2b7fc authored by heikki@donna.mysql.fi's avatar heikki@donna.mysql.fi

rem0cmp.c:

  Prevent a foreign key constraint references between INT columns where the signedness is different
parent 44a2ef6c
......@@ -113,6 +113,16 @@ cmp_types_are_equal(
return(FALSE);
}
if (type1->mtype == DATA_INT
&& (type1->prtype & DATA_UNSIGNED)
!= (type2->prtype & DATA_UNSIGNED)) {
/* The storage format of an unsigned integer is different
from a signed integer: in a signed integer we OR
0x8000... to the value of positive integers. */
return(FALSE);
}
if (type1->mtype == DATA_MYSQL
|| type1->mtype == DATA_VARMYSQL) {
......
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