Skip to content

Commit 4b4777a

Browse files
committed
Backported fix for ccache
Fixed compiler warnings Added --big-test to tokudb change_column_char & change_column_bin
1 parent ae7b39a commit 4b4777a

File tree

7 files changed

+19
-4
lines changed

7 files changed

+19
-4
lines changed

BUILD/SETUP.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Usage: $0 [-h|-n] [configure-options]
3131
-h, --help Show this help message.
3232
-n, --just-print Don't actually run any commands; just print them.
3333
-c, --just-configure Stop after running configure.
34+
Combined with --just-print shows configure options.
3435
--extra-configs=xxx Add this to configure options
3536
--extra-flags=xxx Add this C and CXX flags
3637
--extra-cflags=xxx Add this to C flags
@@ -257,6 +258,10 @@ fi
257258
# (http://samba.org/ccache) is installed, use it.
258259
# We use 'grep' and hope 'grep' will work as expected
259260
# (returns 0 if finds lines)
261+
262+
# As cmake doesn't like CC and CXX with a space, use symlinks from
263+
# /usr/lib64/ccache if they exits.
264+
260265
if test "$USING_GCOV" != "1"
261266
then
262267
# Not using gcov; Safe to use ccache
@@ -265,8 +270,14 @@ fi
265270

266271
if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" = "1"
267272
then
268-
echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC"
269-
echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX"
273+
if test -x /usr/lib64/ccache/gcc
274+
then
275+
CC=/usr/lib64/ccache/gcc
276+
fi
277+
if test -x /usr/lib64/ccache/g++
278+
then
279+
CXX=/usr/lib64/ccache/g++
280+
fi
270281
fi
271282

272283
# gcov

storage/connect/json.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, char *fn, int pretty)
594594
if (fs) {
595595
fputs(EL, fs);
596596
fclose(fs);
597-
str = (err) ? NULL : "Ok";
597+
str = (err) ? NULL : (char*) "Ok";
598598
} else if (!err) {
599599
str = ((JOUTSTR*)jp)->Strp;
600600
jp->WriteChr('\0');

storage/connect/jsonudf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3365,7 +3365,7 @@ my_bool jsoncontains_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
33653365
long long jsoncontains(UDF_INIT *initid, UDF_ARGS *args, char *result,
33663366
unsigned long *res_length, char *is_null, char *error)
33673367
{
3368-
char *p, res[256];
3368+
char *p __attribute__((unused)), res[256];
33693369
long long n;
33703370
unsigned long reslen;
33713371

storage/tokudb/mysql-test/tokudb/t/change_column_bin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def gen_test(n):
2424
def main():
2525
print "# this test is generated by change_bin.py"
2626
print "# test binary expansion is hot"
27+
print "--source include/big_test.inc"
2728
print "--disable_warnings"
2829
print "DROP TABLE IF EXISTS t,ti;"
2930
print "--enable_warnings"

storage/tokudb/mysql-test/tokudb/t/change_column_bin.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
source include/have_tokudb.inc;
22
# this test is generated by change_bin.py
33
# test binary expansion is hot
4+
--source include/big_test.inc
45
--disable_warnings
56
DROP TABLE IF EXISTS t,ti;
67
--enable_warnings

storage/tokudb/mysql-test/tokudb/t/change_column_char.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def gen_test(n):
2424
def main():
2525
print "# this test is generated by change_char.py"
2626
print "# test char expansion"
27+
print "--source include/big_test.inc"
2728
print "--disable_warnings"
2829
print "DROP TABLE IF EXISTS t,ti;"
2930
print "--enable_warnings"

storage/tokudb/mysql-test/tokudb/t/change_column_char.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
source include/have_tokudb.inc;
22
# this test is generated by change_char.py
33
# test char expansion
4+
--source include/big_test.inc
45
--disable_warnings
56
DROP TABLE IF EXISTS t,ti;
67
--enable_warnings

0 commit comments

Comments
 (0)