Merge branch 'release-1.0GA' into MAX-324

This commit is contained in:
Markus Makela
2015-01-08 14:11:19 +02:00
4 changed files with 24 additions and 5 deletions

View File

@ -25,8 +25,8 @@ target_link_libraries(test_service fullcore)
target_link_libraries(test_server fullcore)
target_link_libraries(test_users fullcore)
target_link_libraries(test_adminusers fullcore)
add_test(testMySQLUsers test_mysql_users)
target_link_libraries(testmemlog fullcore)
add_test(testMySQLUsers test_mysql_users)
add_test(TestHash test_hash)
add_test(TestHint test_hint)
add_test(TestSpinlock test_spinlock)
@ -35,8 +35,22 @@ add_test(TestBuffer test_buffer)
add_test(TestDCB test_dcb)
add_test(TestModutil test_modutil)
add_test(TestPoll test_poll)
add_test(TestService /bin/sh -c " MAXSCALE_HOME=${CMAKE_BINARY_DIR} && ${CMAKE_CURRENT_BINAR_DIR}/test_service")
add_test(TestService test_service)
add_test(TestServer test_server)
add_test(TestUsers test_users)
add_test(TestAdminUsers test_adminusers)
add_test(TestMemlog testmemlog)
set_tests_properties(testMySQLUsers
TestHash
TestHint
TestSpinlock
TestFilter
TestBuffer
TestDCB
TestModutil
TestPoll
TestService
TestServer
TestUsers
TestAdminUsers
TestMemlog PROPERTIES ENVIRONMENT MAXSCALE_HOME=${CMAKE_BINARY_DIR}/)

View File

@ -32,7 +32,7 @@
#include <string.h>
#include <maxscale_test.h>
#include <service.h>
#include <poll.h>
/**
* test1 Allocate a service and do lots of other things
*
@ -52,7 +52,7 @@ char* argv[] = {
NULL
};
skygw_logmanager_init(argc,argv);
poll_init();
/* Service tests */
ss_dfprintf(stderr,
"testservice : creating service called MyService with router nonexistent");

View File

@ -72,6 +72,11 @@ int result, count;
skygw_log_sync_all();
ss_info_dassert(NULL != authdata, "Fetch valid user must not return NULL");
ss_info_dassert(0 == strcmp("newauth", authdata), "User authorisation should be correctly updated");
ss_dfprintf(stderr, "\t..done\nAdd another user");
count = users_add(users, "username2", "authorisation2");
skygw_log_sync_all();
ss_info_dassert(1 == count, "Should add one user");
ss_dfprintf(stderr, "\t..done\nDelete a user.");
count = users_delete(users, "username");
skygw_log_sync_all();

View File

@ -3842,7 +3842,7 @@ static bool execute_sescmd_in_backend(
tmpbuf = scur->scmd_cur_cmd->my_sescmd_buf;
qlen = MYSQL_GET_PACKET_LEN((unsigned char*)tmpbuf->start);
memset(data->db,0,MYSQL_DATABASE_MAXLEN+1);
if(qlen > 0 && qlen < UINT_MAX)
if(qlen > 0 && qlen < MYSQL_DATABASE_MAXLEN+1)
strncpy(data->db,tmpbuf->start+5,qlen - 1);
}
/** Fallthrough */