Percona-QA/pquery

pquery build is failing with PS-5.6 : error: ‘MYSQL_OPT_MAX_ALLOWED_PACKET’ was not declared in this scope

rameshvs02 opened this issue · 7 comments

ramesh@qaserver-06:/qa/ps/ps_56/pquery$ cmake . -DPERCONASERVER=ON -DBASEDIR=/qa/ps/PS080818-percona-server-5.6.41-84.1-linux-x86_64-debug
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.7.4")
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Architecture is x86_64
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.2g")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- * BASEDIR is set, looking for Percona Server in /qa/ps/PS080818-percona-server-5.6.41-84.1-linux-x86_64-debug
-- * Found Percona Server library: /qa/ps/PS080818-percona-server-5.6.41-84.1-linux-x86_64-debug/lib/libperconaserverclient.a
-- * Found Percona Server include directory: /qa/ps/PS080818-percona-server-5.6.41-84.1-linux-x86_64-debug/include
-- * PQuery revision is: 8891396
-- Configuring done
-- Generating done
-- Build files have been written to: /qa/ps/ps_56/pquery
ramesh@qaserver-06:/qa/ps/ps_56/pquery$ make
Scanning dependencies of target inih++
[ 12%] Building C object src/third_party/inih++/lib/CMakeFiles/inih++.dir/ini.c.o
[ 25%] Building CXX object src/third_party/inih++/lib/CMakeFiles/inih++.dir/INIReader.cpp.o
[ 37%] Linking CXX static library libinih++.a
[ 37%] Built target inih++
Scanning dependencies of target pquery2-ps
[ 50%] Building CXX object src/CMakeFiles/pquery2-ps.dir/pquery.cpp.o
[ 62%] Building CXX object src/CMakeFiles/pquery2-ps.dir/help.cpp.o
[ 75%] Building CXX object src/CMakeFiles/pquery2-ps.dir/node.cpp.o
[ 87%] Building CXX object src/CMakeFiles/pquery2-ps.dir/thread.cpp.o
/qa/ps/ps_56/pquery/src/thread.cpp: In member function ‘void Node::workerThread(int)’:
/qa/ps/ps_56/pquery/src/thread.cpp:76:25: error: ‘MYSQL_OPT_MAX_ALLOWED_PACKET’ was not declared in this scope
     mysql_options(conn, MYSQL_OPT_MAX_ALLOWED_PACKET, &myParams.maxpacket);
                         ^
src/CMakeFiles/pquery2-ps.dir/build.make:134: recipe for target 'src/CMakeFiles/pquery2-ps.dir/thread.cpp.o' failed
make[2]: *** [src/CMakeFiles/pquery2-ps.dir/thread.cpp.o] Error 1
CMakeFiles/Makefile2:87: recipe for target 'src/CMakeFiles/pquery2-ps.dir/all' failed
make[1]: *** [src/CMakeFiles/pquery2-ps.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
ramesh@qaserver-06:/qa/ps/ps_56/pquery$ 

@rameshvs02 assume it's still current?
@abychko any ideas on a fix?

MYSQL_OPT_MAX_ALLOWED_PACKET is not present in MariaDB and in latest MySQL IIRC. it defaults to max packet value, so it removed in pquery-3.
I can do the same fix for pquery-2

@abychko seems to make sense, yes. Thanks

do you need that fix in pquery-2?

Yes please.

Oh wait. Perhaps not.
@rameshvs02 your thoughts?

@RoelVdP @abychko Since we will be using updated pquery-3 version for future QA, fix is not needed for pquery-2.