Backported fix for ccache

Fixed compiler warnings
Added --big-test to tokudb change_column_char & change_column_bin
This commit is contained in:
Monty 2016-01-03 12:48:55 +02:00
parent ae7b39a13a
commit 4b4777ab63
7 changed files with 19 additions and 4 deletions

View file

@ -31,6 +31,7 @@ Usage: $0 [-h|-n] [configure-options]
-h, --help Show this help message. -h, --help Show this help message.
-n, --just-print Don't actually run any commands; just print them. -n, --just-print Don't actually run any commands; just print them.
-c, --just-configure Stop after running configure. -c, --just-configure Stop after running configure.
Combined with --just-print shows configure options.
--extra-configs=xxx Add this to configure options --extra-configs=xxx Add this to configure options
--extra-flags=xxx Add this C and CXX flags --extra-flags=xxx Add this C and CXX flags
--extra-cflags=xxx Add this to C flags --extra-cflags=xxx Add this to C flags
@ -257,6 +258,10 @@ fi
# (http://samba.org/ccache) is installed, use it. # (http://samba.org/ccache) is installed, use it.
# We use 'grep' and hope 'grep' will work as expected # We use 'grep' and hope 'grep' will work as expected
# (returns 0 if finds lines) # (returns 0 if finds lines)
# As cmake doesn't like CC and CXX with a space, use symlinks from
# /usr/lib64/ccache if they exits.
if test "$USING_GCOV" != "1" if test "$USING_GCOV" != "1"
then then
# Not using gcov; Safe to use ccache # Not using gcov; Safe to use ccache
@ -265,8 +270,14 @@ fi
if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" = "1" if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" = "1"
then then
echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC" if test -x /usr/lib64/ccache/gcc
echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX" then
CC=/usr/lib64/ccache/gcc
fi
if test -x /usr/lib64/ccache/g++
then
CXX=/usr/lib64/ccache/g++
fi
fi fi
# gcov # gcov

View file

@ -594,7 +594,7 @@ PSZ Serialize(PGLOBAL g, PJSON jsp, char *fn, int pretty)
if (fs) { if (fs) {
fputs(EL, fs); fputs(EL, fs);
fclose(fs); fclose(fs);
str = (err) ? NULL : "Ok"; str = (err) ? NULL : (char*) "Ok";
} else if (!err) { } else if (!err) {
str = ((JOUTSTR*)jp)->Strp; str = ((JOUTSTR*)jp)->Strp;
jp->WriteChr('\0'); jp->WriteChr('\0');

View file

@ -3365,7 +3365,7 @@ my_bool jsoncontains_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
long long jsoncontains(UDF_INIT *initid, UDF_ARGS *args, char *result, long long jsoncontains(UDF_INIT *initid, UDF_ARGS *args, char *result,
unsigned long *res_length, char *is_null, char *error) unsigned long *res_length, char *is_null, char *error)
{ {
char *p, res[256]; char *p __attribute__((unused)), res[256];
long long n; long long n;
unsigned long reslen; unsigned long reslen;

View file

@ -24,6 +24,7 @@ def gen_test(n):
def main(): def main():
print "# this test is generated by change_bin.py" print "# this test is generated by change_bin.py"
print "# test binary expansion is hot" print "# test binary expansion is hot"
print "--source include/big_test.inc"
print "--disable_warnings" print "--disable_warnings"
print "DROP TABLE IF EXISTS t,ti;" print "DROP TABLE IF EXISTS t,ti;"
print "--enable_warnings" print "--enable_warnings"

View file

@ -1,6 +1,7 @@
source include/have_tokudb.inc; source include/have_tokudb.inc;
# this test is generated by change_bin.py # this test is generated by change_bin.py
# test binary expansion is hot # test binary expansion is hot
--source include/big_test.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t,ti; DROP TABLE IF EXISTS t,ti;
--enable_warnings --enable_warnings

View file

@ -24,6 +24,7 @@ def gen_test(n):
def main(): def main():
print "# this test is generated by change_char.py" print "# this test is generated by change_char.py"
print "# test char expansion" print "# test char expansion"
print "--source include/big_test.inc"
print "--disable_warnings" print "--disable_warnings"
print "DROP TABLE IF EXISTS t,ti;" print "DROP TABLE IF EXISTS t,ti;"
print "--enable_warnings" print "--enable_warnings"

View file

@ -1,6 +1,7 @@
source include/have_tokudb.inc; source include/have_tokudb.inc;
# this test is generated by change_char.py # this test is generated by change_char.py
# test char expansion # test char expansion
--source include/big_test.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t,ti; DROP TABLE IF EXISTS t,ti;
--enable_warnings --enable_warnings