summaryrefslogtreecommitdiff
path: root/sql/key.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-01-15 16:38:16 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-01-15 16:38:16 +0200
commit9c6fc7b644da912a0e68c720f2234a8554bbfeb9 (patch)
tree7052c2eeac6b430de19f3e47892dfa525f68e4e3 /sql/key.cc
parent27b6b2625e570b68577d74834d45062987e63bcf (diff)
downloadmariadb-git-9c6fc7b644da912a0e68c720f2234a8554bbfeb9.tar.gz
Fix -Wsign-compare introduced by Compilation speed (#546)
Diffstat (limited to 'sql/key.cc')
-rw-r--r--sql/key.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/key.cc b/sql/key.cc
index af473d85847..0040647b5c7 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -1,4 +1,5 @@
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2018, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -132,7 +133,7 @@ void key_copy(uchar *to_key, uchar *from_record, KEY *key_info,
Don't copy data for null values
The -1 below is to subtract the null byte which is already handled
*/
- length= MY_MIN(key_length, key_part->store_length-1);
+ length= MY_MIN(key_length, uint(key_part->store_length)-1);
if (with_zerofill)
bzero((char*) to_key, length);
continue;
@@ -202,7 +203,7 @@ void key_restore(uchar *to_record, const uchar *from_key, KEY *key_info,
Don't copy data for null bytes
The -1 below is to subtract the null byte which is already handled
*/
- length= MY_MIN(key_length, key_part->store_length-1);
+ length= MY_MIN(key_length, uint(key_part->store_length)-1);
continue;
}
}