diff --git a/src/SQLite3_Server.cpp b/src/SQLite3_Server.cpp index 91b5f8676..2e780cb4e 100644 --- a/src/SQLite3_Server.cpp +++ b/src/SQLite3_Server.cpp @@ -65,6 +65,7 @@ } while (rc==SQLITE_LOCKED || rc==SQLITE_BUSY);\ } while (0) +/* struct cpu_timer { cpu_timer() { @@ -80,6 +81,7 @@ struct cpu_timer }; unsigned long long begin; }; +*/ static char *s_strdup(char *s) { char *ret=NULL; @@ -234,6 +236,7 @@ class sqlite3server_main_loop_listeners { static sqlite3server_main_loop_listeners S_amll; +#ifdef TEST_GROUPREP /** * @brief Helper function that checks if the supplied string * is a number. @@ -308,6 +311,7 @@ bool match_monitor_query(const std::string& monitor_query, const std::string& qu return is_number(number); } } +#endif // TEST_GROUPREP void SQLite3_Server_session_handler(MySQL_Session *sess, void *_pa, PtrSize_t *pkt) { @@ -1356,7 +1360,7 @@ void SQLite3_Server::print_version() { }; bool SQLite3_Server::init() { - cpu_timer cpt; + //cpu_timer cpt; #ifdef TEST_AURORA tables_defs_aurora = new std::vector; diff --git a/test/tap/tests/test_sqlite3_server-t.cpp b/test/tap/tests/test_sqlite3_server-t.cpp index 49832c3e7..13c10651e 100644 --- a/test/tap/tests/test_sqlite3_server-t.cpp +++ b/test/tap/tests/test_sqlite3_server-t.cpp @@ -118,8 +118,11 @@ std::vector successful_queries { std::make_tuple("SHOW SCHEMAS", 0), std::make_tuple("SHOW DATABASES", 0), std::make_tuple("SELECT DATABASE()", 0), + std::make_tuple("SELECT DATABASE() AS name", 0), std::make_tuple("SELECT DATABASE(), USER() LIMIT 1", 0), std::make_tuple("SELECT @@version_comment LIMIT 1", 0), + std::make_tuple("SELECT @@version", 0), + std::make_tuple("SELECT version()", 0), std::make_tuple( "SELECT @@character_set_client, @@character_set_connection," " @@character_set_server, @@character_set_database LIMIT 1", @@ -134,6 +137,7 @@ std::vector successful_queries { 0 ), std::make_tuple("SHOW CREATE TABLE test_sqlite3_server_p0712", 0), + std::make_tuple("SHOW CREATE TABLE `test_sqlite3_server_p0712`", 0), std::make_tuple("SHOW TABLES", 0), std::make_tuple( "INSERT INTO test_sqlite3_server_p0712" @@ -149,8 +153,15 @@ std::vector successful_queries { "DELETE FROM test_sqlite3_server_p0712", 0 ), + std::make_tuple("SHOW TABLES FROM main", 0), + std::make_tuple("SHOW TABLES LIKE test_sqlite3_server_p0712", 0), + std::make_tuple("SHOW TABLES LIKE 'test_sqlite3_server_p0712'", 0), std::make_tuple("DROP TABLE test_sqlite3_server_p0712", 0), std::make_tuple("SHOW TABLES", 0), + std::make_tuple("START TRANSACTION", 0), + std::make_tuple("COMMIT", 0), + std::make_tuple("BEGIN", 0), + std::make_tuple("ROLLBACK", 0), }; /** @@ -160,6 +171,7 @@ std::vector successful_queries { std::vector unsuccessful_queries { std::make_tuple("SHOW CHEMAS", 1045), std::make_tuple("SHOW DAABASES", 1045), + std::make_tuple("PRAGMA synchronous=0", 1045), std::make_tuple("SELECT DAABASE()", 1045), std::make_tuple("SELECT DAABASE(), USER() LIMIT 1", 1045), std::make_tuple("SHOW CREATE TABLE test_sqlite3_server_p0712", 0),