diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-03-11 19:07:02 +0100 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-03-11 19:07:02 +0100 |
commit | b0b699dc278faa7cfbc0f54766d02cee762663a9 (patch) | |
tree | f1dbf58e7c5c1184b1b94c46469bcb5e9f60bc7a /sql/sql_test.cc | |
parent | 5611c0e29d39a93dd2480786caf23bcb2e7068ab (diff) | |
download | mariadb-git-b0b699dc278faa7cfbc0f54766d02cee762663a9.tar.gz |
Debugging aid: Add T* List<T>::elem(int n) which returns N-th element in the list.
- There was List<N>::nth_element() but it didn't work because linker removed it.
- Now, removal by linker is prevented for important values of T, and function is renamed.
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r-- | sql/sql_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 311400c0c6c..ec426e39ee3 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -409,6 +409,15 @@ void print_sjm(SJ_MATERIALIZATION_INFO *sjm) } /* purecov: end */ +/* + Debugging help: force List<...>::elem function not be removed as unused. +*/ +Item* (List<Item>:: *dbug_list_item_elem_ptr)(int)= &List<Item>::elem; +Item_equal* (List<Item_equal>:: *dbug_list_item_equal_elem_ptr)(int)= + &List<Item_equal>::elem; +TABLE_LIST* (List<TABLE_LIST>:: *dbug_list_table_list_elem_ptr)(int) = + &List<TABLE_LIST>::elem; + #endif typedef struct st_debug_lock |