You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`root@ubuntu:/opt/sqlAdvisor/SQLAdvisor/sqladvisor# make
Scanning dependencies of target sqladvisor
[ 50%] Building CXX object CMakeFiles/sqladvisor.dir/main.cc.o
In file included from /usr/local/sqlparser/include/sql/item.h:2470:0,
from /usr/local/sqlparser/include/sql/sql_class.h:39,
from /opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc:7:
/usr/local/sqlparser/include/sql/item_timefunc.h: In member function 'virtual longlong Item_time_func::val_int()':
/usr/local/sqlparser/include/sql/item_timefunc.h:533:12: warning: converting to non-pointer type 'longlong {aka long long int}' from NULL [-Wconversion-null]
return NULL;
^
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc: In function 'void final_table_drived()':
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc:333:37: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::set<TABLE_LIST*>::size_type {aka long unsigned int}' [-Wformat=]
TABLE_DRIVERD.size());
^
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc:353:126: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::set<TABLE_LIST*>::size_type {aka long unsigned int}' [-Wformat=]
sql_print_information("第%d步:侯选驱动表个数:%d,但无法确定驱动表 \n", STEP_CNT++,TABLE_DRIVERD.size());
^
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc: In function 'int mysql_sql_parse_field_cardinality_new(Item_field*, const char*)':
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc:604:76: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ulonglong {aka long long unsigned int}' [-Wformat=]
tablename, table_count, rand_rows, field_print, cardinality);
^
[100%] Linking CXX executable sqladvisor
[100%] Built target sqladvisor
root@ubuntu:/opt/sqlAdvisor/SQLAdvisor/sqladvisor# ./sqladvisor
2018-06-13 18:45:10 5781 [ERROR] setlocale 有错
root@ubuntu:/opt/sqlAdvisor/SQLAdvisor/sqladvisor# uname -a
Linux ubuntu 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
`root@ubuntu:/opt/sqlAdvisor/SQLAdvisor/sqladvisor# make
Scanning dependencies of target sqladvisor
[ 50%] Building CXX object CMakeFiles/sqladvisor.dir/main.cc.o
In file included from /usr/local/sqlparser/include/sql/item.h:2470:0,
from /usr/local/sqlparser/include/sql/sql_class.h:39,
from /opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc:7:
/usr/local/sqlparser/include/sql/item_timefunc.h: In member function 'virtual longlong Item_time_func::val_int()':
/usr/local/sqlparser/include/sql/item_timefunc.h:533:12: warning: converting to non-pointer type 'longlong {aka long long int}' from NULL [-Wconversion-null]
return NULL;
^
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc: In function 'void final_table_drived()':
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc:333:37: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::set<TABLE_LIST*>::size_type {aka long unsigned int}' [-Wformat=]
TABLE_DRIVERD.size());
^
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc:353:126: warning: format '%d' expects argument of type 'int', but argument 3 has type 'std::set<TABLE_LIST*>::size_type {aka long unsigned int}' [-Wformat=]
sql_print_information("第%d步:侯选驱动表个数:%d,但无法确定驱动表 \n", STEP_CNT++,TABLE_DRIVERD.size());
^
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc: In function 'int mysql_sql_parse_field_cardinality_new(Item_field*, const char*)':
/opt/sqlAdvisor/SQLAdvisor/sqladvisor/main.cc:604:76: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ulonglong {aka long long unsigned int}' [-Wformat=]
tablename, table_count, rand_rows, field_print, cardinality);
^
[100%] Linking CXX executable sqladvisor
[100%] Built target sqladvisor
root@ubuntu:/opt/sqlAdvisor/SQLAdvisor/sqladvisor# ./sqladvisor
2018-06-13 18:45:10 5781 [ERROR] setlocale 有错
root@ubuntu:/opt/sqlAdvisor/SQLAdvisor/sqladvisor# ./sqladvisor --help
2018-06-13 18:46:11 5783 [ERROR] setlocale 有错`
到最后一步,make后,生成了可以执行的sqladvisor,
执行 ./sqladvisor --help的结果提示错误,如上面所示。
SQLAdvisor/sqladvisor/CMakeList.txt的内容如下:
`root@ubuntu:/opt/sqlAdvisor/SQLAdvisor/sqladvisor# more CMakeLists.txt
cmake_minimum_required (VERSION 2.6)
project(sqladvisor)
include_directories("/usr/local/sqlparser/include")
include_directories("/usr/local/sqlparser/include/regex")
include_directories("/usr/lib/x86_64-linux-gnu/glib-2.0/include")
include_directories("/usr/include/glib-2.0")
link_directories("/usr/local/sqlparser/lib")
link_directories("/usr/lib64")
set(TEST_SRC main.cc)
add_executable(sqladvisor ${TEST_SRC})
target_link_libraries(sqladvisor sqlparser-debug)
target_link_libraries(sqladvisor perconaserverclient_r)
target_link_libraries(sqladvisor glib-2.0)
`
The text was updated successfully, but these errors were encountered: