#0 JOIN::optimize (this=0x1f0df78) at /home/serg/Abk/mysql/5.5/sql/sql_select.cc:1069 #1 0x000000000062fa79 in mysql_derived_optimize (thd=0x1e1e6e0, lex=0x1ec7e68, derived=0x1ecb128) at /home/serg/Abk/mysql/5.5/sql/sql_derived.cc:754 #2 0x000000000062eb53 in mysql_handle_single_derived (lex=0x1ec7e68, derived=0x1ecb128, phases=4) at /home/serg/Abk/mysql/5.5/sql/sql_derived.cc:179 #3 0x000000000071b869 in TABLE_LIST::handle_derived (this=0x1ecb128, lex=0x1ec7e68, phases=4) at /home/serg/Abk/mysql/5.5/sql/table.cc:6173 #4 0x0000000000649e34 in st_select_lex::handle_derived (this=0x1ec70f8, lex=0x1ec7e68, phases=4) at /home/serg/Abk/mysql/5.5/sql/sql_lex.cc:3451 #5 0x00000000006819fd in JOIN::optimize (this=0x1f179b8) at /home/serg/Abk/mysql/5.5/sql/sql_select.cc:945 #6 0x000000000088d721 in subselect_single_select_engine::exec (this=0x1ecb6f0) at /home/serg/Abk/mysql/5.5/sql/item_subselect.cc:2930 #7 0x0000000000886e33 in Item_subselect::exec (this=0x1ec9d08) at /home/serg/Abk/mysql/5.5/sql/item_subselect.cc:597 #8 0x00000000008883a5 in Item_singlerow_subselect::val_int (this=0x1ec9d08) at /home/serg/Abk/mysql/5.5/sql/item_subselect.cc:1113 #9 0x0000000000812ffb in Item::save_in_field (this=0x1ec9d08, field= 0x1edc190, no_conversions=false) at /home/serg/Abk/mysql/5.5/sql/item.cc:5866 #10 0x000000000091b17c in sp_eval_expr (thd=0x1e1e6e0, result_field=0x1edc190, expr_item_ptr=0x1ecb768) at /home/serg/Abk/mysql/5.5/sql/sp_head.cc:394 #11 0x0000000000927772 in sp_rcontext::set_variable (this=0x1edb258, thd=0x1e1e6e0, field=0x1edc190, value=0x1ecb768) at /home/serg/Abk/mysql/5.5/sql/sp_rcontext.cc:482 #12 0x000000000092771c in sp_rcontext::set_variable (this=0x1edb258, thd=0x1e1e6e0, var_idx=2, value=0x1ecb768) at /home/serg/Abk/mysql/5.5/sql/sp_rcontext.cc:469 #13 0x0000000000921b36 in sp_instr_set::exec_core (this=0x1ecb730, thd=0x1e1e6e0, nextp=0x7fffe5d7aeb8) at /home/serg/Abk/mysql/5.5/sql/sp_head.cc:3213 #14 0x000000000092126f in sp_lex_keeper::reset_lex_and_exec_core ( this=0x1ecb778, thd=0x1e1e6e0, nextp=0x7fffe5d7aeb8, open_tables=true, instr=0x1ecb730) at /home/serg/Abk/mysql/5.5/sql/sp_head.cc:2983 #15 0x0000000000921af1 in sp_instr_set::execute (this=0x1ecb730, thd=0x1e1e6e0, nextp=0x7fffe5d7aeb8) at /home/serg/Abk/mysql/5.5/sql/sp_head.cc:3206 #16 0x000000000091d58a in sp_head::execute (this=0x1ec3898, thd=0x1e1e6e0, merge_da_on_success=true) at /home/serg/Abk/mysql/5.5/sql/sp_head.cc:1425 #17 0x000000000091e7a0 in sp_head::execute_function (this=0x1ec3898, thd=0x1e1e6e0, argp=0x1ead508, argcount=2, return_value_fld=0x1eaea00) at /home/serg/Abk/mysql/5.5/sql/sp_head.cc:1946 #18 0x0000000000864383 in Item_func_sp::execute_impl (this=0x1ead478, thd=0x1e1e6e0) at /home/serg/Abk/mysql/5.5/sql/item_func.cc:6627 #19 0x0000000000864124 in Item_func_sp::execute (this=0x1ead478) at /home/serg/Abk/mysql/5.5/sql/item_func.cc:6556 #20 0x0000000000866ad6 in Item_func_sp::val_int (this=0x1ead478) at /home/serg/Abk/mysql/5.5/sql/item_func.h:1905 #21 0x00000000008145cd in Item::send (this=0x1ead478, protocol=0x1e1eca0, buffer=0x7fffe5d7b7c0) at /home/serg/Abk/mysql/5.5/sql/item.cc:6327 #22 0x00000000005bca91 in Protocol::send_result_set_row (this=0x1e1eca0, row_items=0x1e211b8) at /home/serg/Abk/mysql/5.5/sql/protocol.cc:898 #23 0x000000000061d8e7 in select_send::send_data (this=0x1eae918, items=...) at /home/serg/Abk/mysql/5.5/sql/sql_class.cc:2282 #24 0x00000000006860bd in JOIN::exec (this=0x1ed30f8) at /home/serg/Abk/mysql/5.5/sql/sql_select.cc:2152 #25 0x0000000000688d0a in mysql_select (thd=0x1e1e6e0, rref_pointer_array=0x1e21300, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x1eae918, unit=0x1e209f8, select_lex=0x1e210b0) at /home/serg/Abk/mysql/5.5/sql/sql_select.cc:2951 #26 0x000000000067fdbe in handle_select (thd=0x1e1e6e0, lex=0x1e20948, result=0x1eae918, setup_tables_done_option=0) at /home/serg/Abk/mysql/5.5/sql/sql_select.cc:308 #27 0x0000000000659ec5 in execute_sqlcom_select (thd=0x1e1e6e0, all_tables=0x0) at /home/serg/Abk/mysql/5.5/sql/sql_parse.cc:4614 #28 0x0000000000652f25 in mysql_execute_command (thd=0x1e1e6e0) at /home/serg/Abk/mysql/5.5/sql/sql_parse.cc:2183 #29 0x000000000065c6d8 in mysql_parse (thd=0x1e1e6e0, rawbuf=0x1eacf98 "select f1(0, -1)", length=16, parser_state=0x7fffe5d7c670) at /home/serg/Abk/mysql/5.5/sql/sql_parse.cc:5728 #30 0x0000000000650593 in dispatch_command (command=COM_QUERY, thd=0x1e1e6e0, packet=0x1ea2951 "", packet_length=16) at /home/serg/Abk/mysql/5.5/sql/sql_parse.cc:1054 #31 0x000000000064f866 in do_command (thd=0x1e1e6e0) at /home/serg/Abk/mysql/5.5/sql/sql_parse.cc:793 #32 0x0000000000748bda in do_handle_one_connection (thd_arg=0x1e1e6e0) at /home/serg/Abk/mysql/5.5/sql/sql_connect.cc:1252 #33 0x00000000007486a0 in handle_one_connection (arg=0x1e1e6e0) at /home/serg/Abk/mysql/5.5/sql/sql_connect.cc:1167 #34 0x00007ffff7bc7c6c in start_thread () from /lib64/libpthread.so.0 #35 0x00007ffff690f4bd in clone () from /lib64/libc.so.6