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

Assertion `tab->join->order' fails upon vector search with DISTINCT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 11.7.1
    • Vector search
    • None

    Description

      CREATE TABLE t (a INT, v BLOB NOT NULL, VECTOR(v));
      INSERT INTO t VALUES(1,x'00000000'),(2,x'00000000');
      SELECT DISTINCT a FROM t ORDER BY VEC_DISTANCE_EUCLIDEAN(v,VEC_FROMTEXT('[1]')) LIMIT 1;
       
      # Cleanup
      DROP TABLE t;
      

      bb-11.6-MDEV-32887-vector d9037b762404ffed6de0cd3aaf392edc1a6e810a

      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:24760: int join_read_first(JOIN_TAB*): Assertion `tab->join->order' failed.
      241008 20:27:47 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f5b6da53e32 in __GI___assert_fail (assertion=0x55e99c06cdc0 "tab->join->order", file=0x55e99c05d880 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc", line=24760, function=0x55e99c06cca0 "int join_read_first(JOIN_TAB*)") at ./assert/assert.c:101
      #10 0x000055e999e7a39a in join_read_first (tab=0x62900026c238) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:24760
      #11 0x000055e999e71eff in sub_select (join=0x6290000e7fd8, join_tab=0x62900026c238, end_of_records=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:23650
      #12 0x000055e999e6f94f in do_select (join=0x6290000e7fd8, procedure=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:23164
      #13 0x000055e999deddd2 in JOIN::exec_inner (this=0x6290000e7fd8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:5025
      #14 0x000055e999deb15c in JOIN::exec (this=0x6290000e7fd8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:4808
      #15 0x000055e999def88b in mysql_select (thd=0x62c0000c0218, tables=0x6290000e69d8, fields=..., conds=0x0, og_num=1, order=0x6290000e7e10, group=0x0, having=0x0, proc_param=0x0, select_options=2164525825, result=0x6290000e7fa8, unit=0x62c0000c4710, select_lex=0x6290000e6350) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:5341
      #16 0x000055e999dbdf43 in handle_select (thd=0x62c0000c0218, lex=0x62c0000c4630, result=0x6290000e7fa8, setup_tables_done_option=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_select.cc:624
      #17 0x000055e999ce0af9 in execute_sqlcom_select (thd=0x62c0000c0218, all_tables=0x6290000e69d8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:6151
      #18 0x000055e999cd0724 in mysql_execute_command (thd=0x62c0000c0218, is_called_from_prepared_stmt=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:3953
      #19 0x000055e999ceb54a in mysql_parse (thd=0x62c0000c0218, rawbuf=0x6290000e6238 "SELECT DISTINCT a FROM t ORDER BY VEC_DISTANCE_EUCLIDEAN(v,VEC_FROMTEXT('[1]')) LIMIT 1", length=87, parser_state=0x7f5b628499f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:7873
      #20 0x000055e999cc256c in dispatch_command (command=COM_QUERY, thd=0x62c0000c0218, packet=0x629000253219 "", packet_length=87, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1892
      #21 0x000055e999cbf280 in do_command (thd=0x62c0000c0218, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_parse.cc:1405
      #22 0x000055e99a1aec89 in do_handle_one_connection (connect=0x6080000034b8, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1448
      #23 0x000055e99a1ae64a in handle_one_connection (arg=0x608000003438) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/sql/sql_connect.cc:1350
      #24 0x000055e99ae519de in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-asan/storage/perfschema/pfs.cc:2198
      #25 0x00007f5b6daa8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #26 0x00007f5b6db2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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