Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32774

Error 124 "Wrong index given to a function" upon HANDLER after DISABLE KEYS

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL)
    • 10.5, 10.6, 10.11
    • Storage Engine - Aria
    • None

    Description

      CREATE TABLE t (a INT, KEY(a)) ENGINE=Aria;
      ALTER TABLE t DISABLE KEYS;
      HANDLER t OPEN;
      HANDLER t READ a NEXT;
       
      # Cleanup
      HANDLER t CLOSE;
      DROP TABLE t;
      

      10.4 9e321a44

      mysqltest: At line 4: query 'HANDLER t READ a NEXT' failed: 1030: Got error 124 "Wrong index given to a function" from storage engine Aria
      

      and in the error log

      2023-11-11  2:56:15 4 [ERROR] mysql_ha_read: Got error 124 when reading table 't'
      

      MyISAM works, so chances are something goes wrong with Aria here.

      Attachments

        Activity

          Thread 6 "mariadbd" hit Breakpoint 1, my_message_sql (error=1030, str=0x7ffff2ffc600 "Got error 124 \"Wrong index given to a function\" from storage engine Aria", MyFlags=0) at /home/sanja/maria/git/10.5/sql/mysqld.cc:3111
          (gdb) frame 3
          #3  0x0000555555f14d16 in mysql_ha_read (thd=0x7fffd4000dc8, tables=0x7fffd4015628, mode=RNEXT, keyname=0x7fffd4015d28 "a", key_expr=0x0, ha_rkey_mode=HA_READ_KEY_EXACT, cond=0x0, select_limit_cnt=1, offset_limit_cnt=0) at /home/sanja/maria/git/10.5/sql/sql_handler.cc:974
          (gdb) where
          #0  my_message_sql (error=1030, str=0x7ffff2ffc600 "Got error 124 \"Wrong index given to a function\" from storage engine Aria", MyFlags=0) at /home/sanja/maria/git/10.5/sql/mysqld.cc:3111
          #1  0x0000555556d74816 in my_error (nr=1030, MyFlags=0) at /home/sanja/maria/git/10.5/mysys/my_error.c:124
          #2  0x00005555563362f4 in handler::print_error (this=0x7fffd418c690, error=124, errflag=0) at /home/sanja/maria/git/10.5/sql/handler.cc:4354
          #3  0x0000555555f14d16 in mysql_ha_read (thd=0x7fffd4000dc8, tables=0x7fffd4015628, mode=RNEXT, keyname=0x7fffd4015d28 "a", key_expr=0x0, ha_rkey_mode=HA_READ_KEY_EXACT, cond=0x0, select_limit_cnt=1, offset_limit_cnt=0) at /home/sanja/maria/git/10.5/sql/sql_handler.cc:974
          #4  0x0000555555f755fe in mysql_execute_command (thd=0x7fffd4000dc8) at /home/sanja/maria/git/10.5/sql/sql_parse.cc:5774
          #5  0x0000555555f7d4fd in mysql_parse (thd=0x7fffd4000dc8, rawbuf=0x7fffd40154c0 "HANDLER t READ a NEXT", length=21, parser_state=0x7ffff2ffe370, is_com_multi=false, is_next_command=false) at /home/sanja/maria/git/10.5/sql/sql_parse.cc:8236
          #6  0x0000555555f682ee in dispatch_command (command=COM_QUERY, thd=0x7fffd4000dc8, packet=0x7fffd400b759 "", packet_length=21, is_com_multi=false, is_next_command=false) at /home/sanja/maria/git/10.5/sql/sql_parse.cc:1892
          #7  0x0000555555f66a7d in do_command (thd=0x7fffd4000dc8) at /home/sanja/maria/git/10.5/sql/sql_parse.cc:1376
          #8  0x00005555561344f3 in do_handle_one_connection (connect=0x555558ba80a8, put_in_cache=true) at /home/sanja/maria/git/10.5/sql/sql_connect.cc:1417
          #9  0x0000555556134263 in handle_one_connection (arg=0x555558c0dec8) at /home/sanja/maria/git/10.5/sql/sql_connect.cc:1319
          #10 0x00005555566dea3a in pfs_spawn_thread (arg=0x555558ba7cc8) at /home/sanja/maria/git/10.5/storage/perfschema/pfs.cc:2201
          #11 0x00007ffff789ca94 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
          #12 0x00007ffff7929c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
          

          sanja Oleksandr Byelkin added a comment - Thread 6 "mariadbd" hit Breakpoint 1, my_message_sql (error=1030, str=0x7ffff2ffc600 "Got error 124 \"Wrong index given to a function\" from storage engine Aria", MyFlags=0) at /home/sanja/maria/git/10.5/sql/mysqld.cc:3111 (gdb) frame 3 #3 0x0000555555f14d16 in mysql_ha_read (thd=0x7fffd4000dc8, tables=0x7fffd4015628, mode=RNEXT, keyname=0x7fffd4015d28 "a", key_expr=0x0, ha_rkey_mode=HA_READ_KEY_EXACT, cond=0x0, select_limit_cnt=1, offset_limit_cnt=0) at /home/sanja/maria/git/10.5/sql/sql_handler.cc:974 (gdb) where #0 my_message_sql (error=1030, str=0x7ffff2ffc600 "Got error 124 \"Wrong index given to a function\" from storage engine Aria", MyFlags=0) at /home/sanja/maria/git/10.5/sql/mysqld.cc:3111 #1 0x0000555556d74816 in my_error (nr=1030, MyFlags=0) at /home/sanja/maria/git/10.5/mysys/my_error.c:124 #2 0x00005555563362f4 in handler::print_error (this=0x7fffd418c690, error=124, errflag=0) at /home/sanja/maria/git/10.5/sql/handler.cc:4354 #3 0x0000555555f14d16 in mysql_ha_read (thd=0x7fffd4000dc8, tables=0x7fffd4015628, mode=RNEXT, keyname=0x7fffd4015d28 "a", key_expr=0x0, ha_rkey_mode=HA_READ_KEY_EXACT, cond=0x0, select_limit_cnt=1, offset_limit_cnt=0) at /home/sanja/maria/git/10.5/sql/sql_handler.cc:974 #4 0x0000555555f755fe in mysql_execute_command (thd=0x7fffd4000dc8) at /home/sanja/maria/git/10.5/sql/sql_parse.cc:5774 #5 0x0000555555f7d4fd in mysql_parse (thd=0x7fffd4000dc8, rawbuf=0x7fffd40154c0 "HANDLER t READ a NEXT", length=21, parser_state=0x7ffff2ffe370, is_com_multi=false, is_next_command=false) at /home/sanja/maria/git/10.5/sql/sql_parse.cc:8236 #6 0x0000555555f682ee in dispatch_command (command=COM_QUERY, thd=0x7fffd4000dc8, packet=0x7fffd400b759 "", packet_length=21, is_com_multi=false, is_next_command=false) at /home/sanja/maria/git/10.5/sql/sql_parse.cc:1892 #7 0x0000555555f66a7d in do_command (thd=0x7fffd4000dc8) at /home/sanja/maria/git/10.5/sql/sql_parse.cc:1376 #8 0x00005555561344f3 in do_handle_one_connection (connect=0x555558ba80a8, put_in_cache=true) at /home/sanja/maria/git/10.5/sql/sql_connect.cc:1417 #9 0x0000555556134263 in handle_one_connection (arg=0x555558c0dec8) at /home/sanja/maria/git/10.5/sql/sql_connect.cc:1319 #10 0x00005555566dea3a in pfs_spawn_thread (arg=0x555558ba7cc8) at /home/sanja/maria/git/10.5/storage/perfschema/pfs.cc:2201 #11 0x00007ffff789ca94 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447 #12 0x00007ffff7929c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.