summaryrefslogtreecommitdiff
path: root/innobase/rem
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2002-02-07 12:05:02 +0200
committerunknown <heikki@donna.mysql.fi>2002-02-07 12:05:02 +0200
commit9a052e273ff4404528ab0bc75b16fce7f199d0a7 (patch)
tree24871c34e29ee7afa2dbd75899cd83d2929f028a /innobase/rem
parent70634523d4c5e4b7c236ed61c48d4539bf825954 (diff)
downloadmariadb-git-9a052e273ff4404528ab0bc75b16fce7f199d0a7.tar.gz
rem0cmp.c:
Prevent a foreign key constraint references between INT columns where the signedness is different innobase/rem/rem0cmp.c: Prevent a foreign key constraint references between INT columns where the signedness is different
Diffstat (limited to 'innobase/rem')
-rw-r--r--innobase/rem/rem0cmp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/innobase/rem/rem0cmp.c b/innobase/rem/rem0cmp.c
index 363bb013ac9..60828b122ba 100644
--- a/innobase/rem/rem0cmp.c
+++ b/innobase/rem/rem0cmp.c
@@ -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) {