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

JSON_TABLE: Assertion `fixed == 1' failed in Item_load_file::val_str on 2nd execution of PS

    XMLWordPrintable

Details

    Description

      PREPARE stmt FROM "SELECT * FROM (SELECT * FROM JSON_TABLE(LOAD_FILE('x'), '$' COLUMNS (a FOR ORDINALITY)) AS t) AS sq";
      EXECUTE stmt;
      EXECUTE stmt;
      

      bb-10.6-mdev17399-psergey2 8b533cc1d5

      mysqld: /data/src/bb-10.6-mdev17399-psergey2/sql/item_strfunc.cc:3837: virtual String* Item_load_file::val_str(String*): Assertion `fixed == 1' failed.
      210315 17:40:49 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f44284aaf36 in __GI___assert_fail (assertion=0x55d9f72a1a7b "fixed == 1", file=0x55d9f72a1d30 "/data/src/bb-10.6-mdev17399-psergey2/sql/item_strfunc.cc", line=3837, function=0x55d9f72a3018 "virtual String* Item_load_file::val_str(String*)") at assert.c:101
      #8  0x000055d9f67433b5 in Item_load_file::val_str (this=0x7f43d4027638, str=0x7f43d401be48) at /data/src/bb-10.6-mdev17399-psergey2/sql/item_strfunc.cc:3837
      #9  0x000055d9f658fbae in ha_json_table::rnd_init (this=0x7f43d401b960, scan=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/json_table.cc:210
      #10 0x000055d9f62a1a81 in handler::ha_rnd_init (this=0x7f43d401b960, scan=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/handler.h:3433
      #11 0x000055d9f6670aff in handler::ha_rnd_init_with_error (this=0x7f43d401b960, scan=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/handler.cc:3287
      #12 0x000055d9f6834525 in init_read_record (info=0x7f43d40150f8, thd=0x7f43d4000db8, table=0x7f43d4022fc0, select=0x7f43d4015980, filesort=0x0, use_record_cache=1, print_error=true, disable_rr_cache=false) at /data/src/bb-10.6-mdev17399-psergey2/sql/records.cc:328
      #13 0x000055d9f637b8c7 in join_init_read_record (tab=0x7f43d4015030) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:21728
      #14 0x000055d9f63793a2 in sub_select (join=0x7f43d4013ea0, join_tab=0x7f43d4015030, end_of_records=false) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:20764
      #15 0x000055d9f6378910 in do_select (join=0x7f43d4013ea0, procedure=0x0) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:20314
      #16 0x000055d9f634c040 in JOIN::exec_inner (this=0x7f43d4013ea0) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:4488
      #17 0x000055d9f634b161 in JOIN::exec (this=0x7f43d4013ea0) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:4268
      #18 0x000055d9f634c9ad in mysql_select (thd=0x7f43d4000db8, tables=0x7f43d4029628, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2201171004160, result=0x7f43d402a538, unit=0x7f43d4024d70, select_lex=0x7f43d4026998) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:4744
      #19 0x000055d9f633c2db in handle_select (thd=0x7f43d4000db8, lex=0x7f43d4024ca8, result=0x7f43d402a538, setup_tables_done_option=0) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_select.cc:417
      #20 0x000055d9f62fedd7 in execute_sqlcom_select (thd=0x7f43d4000db8, all_tables=0x7f43d4029628) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:6230
      #21 0x000055d9f62f6037 in mysql_execute_command (thd=0x7f43d4000db8) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:3926
      #22 0x000055d9f6324f0b in Prepared_statement::execute (this=0x7f43d4008078, expanded_query=0x7f4410bb0d70, open_cursor=false) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_prepare.cc:5038
      #23 0x000055d9f632320d in Prepared_statement::execute_loop (this=0x7f43d4008078, expanded_query=0x7f4410bb0d70, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_prepare.cc:4500
      #24 0x000055d9f6320aab in mysql_sql_stmt_execute (thd=0x7f43d4000db8) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_prepare.cc:3577
      #25 0x000055d9f62f607c in mysql_execute_command (thd=0x7f43d4000db8) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:3942
      #26 0x000055d9f6303c24 in mysql_parse (thd=0x7f43d4000db8, rawbuf=0x7f43d4013d60 "EXECUTE stmt", length=12, parser_state=0x7f4410bb1510) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:8001
      #27 0x000055d9f62f0042 in dispatch_command (command=COM_QUERY, thd=0x7f43d4000db8, packet=0x7f43d400b379 "", packet_length=12, blocking=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:1886
      #28 0x000055d9f62ee9e9 in do_command (thd=0x7f43d4000db8, blocking=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_parse.cc:1397
      #29 0x000055d9f649cf98 in do_handle_one_connection (connect=0x55d9fa11de68, put_in_cache=true) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_connect.cc:1410
      #30 0x000055d9f649ccf4 in handle_one_connection (arg=0x55d9fa236ea8) at /data/src/bb-10.6-mdev17399-psergey2/sql/sql_connect.cc:1312
      #31 0x000055d9f69ff987 in pfs_spawn_thread (arg=0x55d9fa11b678) at /data/src/bb-10.6-mdev17399-psergey2/storage/perfschema/pfs.cc:2201
      #32 0x00007f44289c2609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #33 0x00007f4428596293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      It makes no difference whether the file in LOAD_FILE exists or not, same failure occurs.

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              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.