diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-21 16:39:19 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-21 16:39:19 +0200 |
commit | b7b5f6f1ab49948b0e15b762266d4640b3d6b7fb (patch) | |
tree | 7c302c2025184dbd053aa6135f0ff28c8ce6f359 /storage/perfschema/unittest/pfs-t.cc | |
parent | 5f6380adde2dac3f32b40339b9b702c0135eb7d6 (diff) | |
parent | c1d6a2d7e194225ccc19a68ea5d0f368632620d0 (diff) | |
download | mariadb-git-b7b5f6f1ab49948b0e15b762266d4640b3d6b7fb.tar.gz |
10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
Diffstat (limited to 'storage/perfschema/unittest/pfs-t.cc')
-rw-r--r-- | storage/perfschema/unittest/pfs-t.cc | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc index c673582ba53..9211443bcca 100644 --- a/storage/perfschema/unittest/pfs-t.cc +++ b/storage/perfschema/unittest/pfs-t.cc @@ -111,6 +111,7 @@ void test_bootstrap() param.m_events_statements_history_sizing= 0; param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; + param.m_session_connect_attrs_sizing= 0; boot= initialize_performance_schema(& param); ok(boot != NULL, "boot"); @@ -168,6 +169,7 @@ PSI * load_perfschema() param.m_events_statements_history_sizing= 0; param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; + param.m_session_connect_attrs_sizing= 0; /* test_bootstrap() covered this, assuming it just works */ boot= initialize_performance_schema(& param); @@ -759,21 +761,21 @@ void test_init_disabled() /* disabled S-A + disabled T-1: no instrumentation */ socket_class_A->m_enabled= false; - socket_A1= psi->init_socket(socket_key_A, NULL); + socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0); ok(socket_A1 == NULL, "socket_A1 not instrumented"); /* enabled S-A + disabled T-1: instrumentation (for later) */ socket_class_A->m_enabled= true; - socket_A1= psi->init_socket(socket_key_A, NULL); + socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0); ok(socket_A1 != NULL, "socket_A1 instrumented"); /* broken key + disabled T-1: no instrumentation */ socket_class_A->m_enabled= true; - socket_A1= psi->init_socket(0, NULL); + socket_A1= psi->init_socket(0, NULL, NULL, 0); ok(socket_A1 == NULL, "socket key 0 not instrumented"); - socket_A1= psi->init_socket(99, NULL); + socket_A1= psi->init_socket(99, NULL, NULL, 0); ok(socket_A1 == NULL, "broken socket key not instrumented"); /* Pretend thread T-1 is enabled */ @@ -892,16 +894,16 @@ void test_init_disabled() /* enabled S-A + enabled T-1: instrumentation */ socket_class_A->m_enabled= true; - socket_A1= psi->init_socket(socket_key_A, NULL); + socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0); ok(socket_A1 != NULL, "instrumented"); psi->destroy_socket(socket_A1); /* broken key + enabled T-1: no instrumentation */ socket_class_A->m_enabled= true; - socket_A1= psi->init_socket(0, NULL); + socket_A1= psi->init_socket(0, NULL, NULL, 0); ok(socket_A1 == NULL, "not instrumented"); - socket_A1= psi->init_socket(99, NULL); + socket_A1= psi->init_socket(99, NULL, NULL, 0); ok(socket_A1 == NULL, "not instrumented"); /* Pretend the running thread is not instrumented */ @@ -996,21 +998,21 @@ void test_init_disabled() /* disabled S-A + unknown thread: no instrumentation */ socket_class_A->m_enabled= false; - socket_A1= psi->init_socket(socket_key_A, NULL); + socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0); ok(socket_A1 == NULL, "socket_A1 not instrumented"); /* enabled S-A + unknown thread: instrumentation (for later) */ socket_class_A->m_enabled= true; - socket_A1= psi->init_socket(socket_key_A, NULL); + socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0); ok(socket_A1 != NULL, "socket_A1 instrumented"); /* broken key + unknown thread: no instrumentation */ socket_class_A->m_enabled= true; - socket_A1= psi->init_socket(0, NULL); + socket_A1= psi->init_socket(0, NULL, NULL, 0); ok(socket_A1 == NULL, "socket key 0 not instrumented"); - socket_A1= psi->init_socket(99, NULL); + socket_A1= psi->init_socket(99, NULL, NULL, 0); ok(socket_A1 == NULL, "broken socket key not instrumented"); shutdown_performance_schema(); @@ -1126,7 +1128,7 @@ void test_locker_disabled() ok(file_A1 != NULL, "instrumented"); socket_class_A->m_enabled= true; - socket_A1= psi->init_socket(socket_key_A, NULL); + socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0); ok(socket_A1 != NULL, "instrumented"); /* Socket lockers require a thread owner */ @@ -1294,10 +1296,10 @@ void test_locker_disabled() cond_locker= psi->start_cond_wait(&cond_state, cond_A1, mutex_A1, PSI_COND_WAIT, __FILE__, __LINE__); ok(cond_locker != NULL, "locker"); psi->end_cond_wait(cond_locker, 0); - file_locker= psi->get_thread_file_name_locker(&file_state, file_key_A, PSI_FILE_OPEN, "xxx", NULL); + file_locker= psi->get_thread_file_name_locker(&file_state, file_key_A, PSI_FILE_STREAM_OPEN, "xxx", NULL); ok(file_locker != NULL, "locker"); psi->start_file_open_wait(file_locker, __FILE__, __LINE__); - psi->end_file_open_wait(file_locker); + psi->end_file_open_wait(file_locker, NULL); file_locker= psi->get_thread_file_stream_locker(&file_state, file_A1, PSI_FILE_READ); ok(file_locker != NULL, "locker"); psi->start_file_wait(file_locker, 10, __FILE__, __LINE__); @@ -1314,7 +1316,7 @@ void test_locker_disabled() /* ---------------------------------------------- */ socket_class_A->m_enabled= true; - socket_A1= psi->init_socket(socket_key_A, NULL); + socket_A1= psi->init_socket(socket_key_A, NULL, NULL, 0); ok(socket_A1 != NULL, "instrumented"); /* Socket thread owner has not been set */ socket_locker= psi->start_socket_wait(&socket_state, socket_A1, PSI_SOCKET_SEND, 12, "foo.cc", 12); @@ -1485,6 +1487,8 @@ void test_event_name_index() memset(& param, 0xFF, sizeof(param)); param.m_enabled= true; + /* NOTE: Need to add 3 to each index: table io, table lock, idle */ + /* Per mutex info waits should be at [0..9] */ param.m_mutex_class_sizing= 10; /* Per rwlock info waits should be at [10..29] */ @@ -1509,6 +1513,7 @@ void test_event_name_index() param.m_events_statements_history_sizing= 0; param.m_events_statements_history_long_sizing= 0; param.m_digest_sizing= 0; + param.m_session_connect_attrs_sizing= 0; param.m_mutex_sizing= 0; param.m_rwlock_sizing= 0; @@ -1540,10 +1545,10 @@ void test_event_name_index() psi->register_mutex("X", dummy_mutexes, 2); mutex_class= find_mutex_class(dummy_mutex_key_1); ok(mutex_class != NULL, "mutex class 1"); - ok(mutex_class->m_event_name_index == 0, "index 0"); + ok(mutex_class->m_event_name_index == 3, "index 3"); mutex_class= find_mutex_class(dummy_mutex_key_2); ok(mutex_class != NULL, "mutex class 2"); - ok(mutex_class->m_event_name_index == 1, "index 1"); + ok(mutex_class->m_event_name_index == 4, "index 4"); PFS_rwlock_class *rwlock_class; PSI_rwlock_key dummy_rwlock_key_1; @@ -1557,10 +1562,10 @@ void test_event_name_index() psi->register_rwlock("X", dummy_rwlocks, 2); rwlock_class= find_rwlock_class(dummy_rwlock_key_1); ok(rwlock_class != NULL, "rwlock class 1"); - ok(rwlock_class->m_event_name_index == 10, "index 10"); + ok(rwlock_class->m_event_name_index == 13, "index 13"); rwlock_class= find_rwlock_class(dummy_rwlock_key_2); ok(rwlock_class != NULL, "rwlock class 2"); - ok(rwlock_class->m_event_name_index == 11, "index 11"); + ok(rwlock_class->m_event_name_index == 14, "index 14"); PFS_cond_class *cond_class; PSI_cond_key dummy_cond_key_1; @@ -1574,10 +1579,10 @@ void test_event_name_index() psi->register_cond("X", dummy_conds, 2); cond_class= find_cond_class(dummy_cond_key_1); ok(cond_class != NULL, "cond class 1"); - ok(cond_class->m_event_name_index == 30, "index 30"); + ok(cond_class->m_event_name_index == 33, "index 33"); cond_class= find_cond_class(dummy_cond_key_2); ok(cond_class != NULL, "cond class 2"); - ok(cond_class->m_event_name_index == 31, "index 31"); + ok(cond_class->m_event_name_index == 34, "index 34"); PFS_file_class *file_class; PSI_file_key dummy_file_key_1; @@ -1591,10 +1596,10 @@ void test_event_name_index() psi->register_file("X", dummy_files, 2); file_class= find_file_class(dummy_file_key_1); ok(file_class != NULL, "file class 1"); - ok(file_class->m_event_name_index == 70, "index 70"); + ok(file_class->m_event_name_index == 73, "index 73"); file_class= find_file_class(dummy_file_key_2); ok(file_class != NULL, "file class 2"); - ok(file_class->m_event_name_index == 71, "index 71"); + ok(file_class->m_event_name_index == 74, "index 74"); PFS_socket_class *socket_class; PSI_socket_key dummy_socket_key_1; @@ -1608,13 +1613,13 @@ void test_event_name_index() psi->register_socket("X", dummy_sockets, 2); socket_class= find_socket_class(dummy_socket_key_1); ok(socket_class != NULL, "socket class 1"); - ok(socket_class->m_event_name_index == 150, "index 150"); + ok(socket_class->m_event_name_index == 153, "index 153"); socket_class= find_socket_class(dummy_socket_key_2); ok(socket_class != NULL, "socket class 2"); - ok(socket_class->m_event_name_index == 151, "index 151"); + ok(socket_class->m_event_name_index == 154, "index 154"); - ok(global_table_io_class.m_event_name_index == 310, "index 310"); - ok(global_table_lock_class.m_event_name_index == 311, "index 311"); + ok(global_table_io_class.m_event_name_index == 0, "index 0"); + ok(global_table_lock_class.m_event_name_index == 1, "index 1"); ok(wait_class_max= 313, "313 event names"); // 3 global classes } |