[sbester@levovo mysql-5.5-security]$ bzr revno 3124 Built using: ./BUILD/compile-pentium-valgrind-max-no-ndb ^C[sbester@levovo mysql-5.5-security]$ gcc --version gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [sbester@levovo mysql-5.5-security]$ rpm -qa|grep glibc glibc-debuginfo-2.12-3.x86_64 glibc-common-2.12-3.x86_64 glibc-2.12-3.x86_64 glibc-devel-2.12-3.x86_64 glibc-headers-2.12-3.x86_64 glibc-2.12-3.i686 [sbester@levovo mysql-5.5-security]$ [sbester@levovo mysql-5.5-security]$ uname -a Linux levovo 2.6.33.3-85.fc13.x86_64 #1 SMP Thu May 6 18:09:49 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux [sbester@levovo mysql-5.5-security]$ drop table if exists `g32`; create table `g32` (`a` int,`b` int,`c` int,key `idx` (`a`,`c`,`b`)) engine=myisam default charset=latin1; insert into `g32` values (0,0,0),(0,0,0); select 1 from `g32` force index(`idx`) where `a` >= 1 and `b` <= 1 and `a` =`c` and `c` > 1; [Switching to Thread 0x7ffff406d710 (LWP 23220)] Breakpoint 1, SEL_ARG::test_use_count (this=0x7fffd42b7d00, root=0x7fffd4017590) at /home/sbester/build/bzr/mysql-5.5-security/sql/opt_range.cc:7481 7481 pos->next_key_part->use_count, count); (gdb) p pos->next_key_part->use_count $5 = 0 (gdb) p count $6 = 1 (gdb) p *pos->next_key_part $7 = { = { dummy = false }, members of SEL_ARG: min_flag = 4 '\004', max_flag = 0 '\000', maybe_flag = 0 '\000', part = 2 '\002', maybe_null = 1 '\001', elements = 1, use_count = 0, field = 0x7fffd40a0af0, min_value = 0xfc72b8 "\001", max_value = 0x7fffd41ba5e0 "", left = 0x124e760, right = 0x124e760, next = 0x0, prev = 0x0, parent = 0x7fffd40f1360, next_key_part = 0x0, color = SEL_ARG::BLACK, type = SEL_ARG::KEY_RANGE } (gdb) p *pos $8 = { = { dummy = false }, members of SEL_ARG: min_flag = 4 '\004', max_flag = 2 '\002', maybe_flag = 0 '\000', part = 1 '\001', maybe_null = 1 '\001', elements = 1, use_count = 1, field = 0x7fffd42a9a30, min_value = 0x7fffd400ac40 "", max_value = 0x7fffd41ba5c0 "", left = 0x124e760, right = 0x124e760, next = 0x0, prev = 0x0, parent = 0x0, next_key_part = 0x7fffd400afd0, color = SEL_ARG::BLACK, type = SEL_ARG::KEY_RANGE } (gdb) bt #0 SEL_ARG::test_use_count (this=0x7fffd42b7d00, root=0x7fffd4017590) at /home/sbester/build/bzr/mysql-5.5-security/sql/opt_range.cc:7481 #1 0x0000000000835327 in SEL_ARG::test_use_count (this=0x7fffd4017590, root=0x7fffd4017590) at /home/sbester/build/bzr/mysql-5.5-security/sql/opt_range.cc:7484 #2 0x000000000083239f in tree_and (param=0x7ffff40680d0, tree1=0x7fffd4004e70, tree2=0x7fffd400a9d0) at /home/sbester/build/bzr/mysql-5.5-security/sql/opt_range.cc:6236 #3 0x00000000008300be in get_mm_tree (param=0x7ffff40680d0, cond=0x7fffd4004bf0) at /home/sbester/build/bzr/mysql-5.5-security/sql/opt_range.cc:5541 #4 0x000000000082907f in SQL_SELECT::test_quick_select (this=0x7fffd417b830, thd=0x1d7c410, keys_to_use=..., prev_tables=0, limit=18446744073709551615, force_quick_range=false) at /home/sbester/build/bzr/mysql-5.5-security/sql/opt_range.cc:2275 #5 0x00000000006222aa in get_quick_record_count (thd=0x1d7c410, select=0x7fffd417b830, table=0x7fffd420d380, keys=0x7fffd402acc8, limit=18446744073709551615) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_select.cc:2605 #6 0x0000000000623ac4 in make_join_statistics (join=0x7fffd4210d40, tables_arg=0x7fffd48af5d0, conds=0x7fffd4004bf0, keyuse_array=0x7fffd4212320) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_select.cc:3039 #7 0x000000000061c6ef in JOIN::optimize (this=0x7fffd4210d40) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_select.cc:1050 #8 0x000000000062203e in mysql_select (thd=0x1d7c410, rref_pointer_array=0x1d7e908, tables=0x7fffd48af5d0, wild_num=0, fields=..., conds=0x7fffd4004bf0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fffd400d660, unit=0x1d7e0e0, select_lex=0x1d7e710) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_select.cc:2556 #9 0x000000000061a27c in handle_select (thd=0x1d7c410, lex=0x1d7e030, result=0x7fffd400d660, setup_tables_done_option=0) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_select.cc:297 #10 0x00000000005f6ecd in execute_sqlcom_select (thd=0x1d7c410, all_tables=0x7fffd48af5d0) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_parse.cc:4452 #11 0x00000000005efac2 in mysql_execute_command (thd=0x1d7c410) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_parse.cc:2046 #12 0x00000000005f905b in mysql_parse (thd=0x1d7c410, rawbuf=0x7fffd4004d60 "select 1 from `g32` force index(`idx`) where \n`a` >= 1 and `b` <= 1 and `a` =`c` and `c` > 1", length=93, parser_state=0x7ffff406c720) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_parse.cc:5496 #13 0x00000000005ed42a in dispatch_command (command=COM_QUERY, thd=0x1d7c410, packet=0x1db9871 "select 1 from `g32` force index(`idx`) where \n`a` >= 1 and `b` <= 1 and `a` =`c` and `c` > 1", packet_length=93) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_parse.cc:1032 #14 0x00000000005eca46 in do_command (thd=0x1d7c410) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_parse.cc:772 #15 0x00000000006c918a in do_handle_one_connection (thd_arg=0x1d7c410) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_connect.cc:745 #16 0x00000000006c8fc4 in handle_one_connection (arg=0x1d7c410) at /home/sbester/build/bzr/mysql-5.5-security/sql/sql_connect.cc:684 #17 0x00000030e1807761 in start_thread (arg=0x7ffff406d710) at pthread_create.c:301 #18 0x00000030e14e14ed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 (gdb)