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

JSON_EXTRACT in query crashes server

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.14, 10.2(EOL), 10.3(EOL)
    • 10.2.16
    • JSON
    • None

    Description

      select * from reeher_oneappeal_db.contact_restriction_mapping where client_id=68 and contact_restriction_mapping.one_appeal_restriction='Do Not Mail'
      and contact_restriction_mapping.platform_restriction_description in (JSON_EXTRACT('{"SQI":"Square Inch (Opt In)","CWI":"Calvin World opt In","ND":"No Denomination Contact"}', '$.*'))
      

      Crashes server with following backtrace:

      Thread pointer: 0x7f0ce0050658
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f0dddf61d80 thread_stack 0x49000
      /usr/sbin/mysqld(my_print_stacktrace+0x2b)[0x7f1aa12d8fab]
      /usr/sbin/mysqld(handle_fatal_signal+0x535)[0x7f1aa0dad005]
      sigaction.c:0(__restore_rt)[0x7f1aa02cd7e0]
      sql/item_jsonfunc.cc:743(Item_func_json_extract::read_json(String*, json_value_types*, char**, int*))[0x7f1aa0efa2a6]
      sql/item_jsonfunc.cc:3204(Arg_comparator::compare_json_str_basic(Item*, Item*))[0x7f1aa0efaec9]
      sql/item_cmpfunc.cc:1144(Arg_comparator::compare_str_json())[0x7f1aa0dd98c6]
      sql/item_cmpfunc.cc:1775(Item_func_eq::val_int())[0x7f1aa0ddd160]
      sql/item.cc:112(Item::val_bool())[0x7f1aa0dbecdc]
      sql/item_cmpfunc.cc:4947(Item_cond_and::val_int())[0x7f1aa0dd8eba]
      sql/sql_select.cc:18789(evaluate_join_record)[0x7f1aa0c57c1d]
      sql/sql_select.cc:18699(sub_select(JOIN*, st_join_table*, bool))[0x7f1aa0c60264]
      sql/sql_select.cc:18236(do_select)[0x7f1aa0c7e559]
      sql/sql_select.cc:3362(JOIN::exec())[0x7f1aa0c7e78c]
      sql/sql_select.cc:3763(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x7f1aa0c7d69a]
      sql/sql_select.cc:376(handle_select(THD*, LEX*, select_result*, unsigned long))[0x7f1aa0c7e9a4]
      sql/sql_parse.cc:6469(execute_sqlcom_select)[0x7f1aa0b6e149]
      sql/sql_parse.cc:3479(mysql_execute_command(THD*))[0x7f1aa0c2dda1]
      sql/sql_parse.cc:7914(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x7f1aa0c327ca]
      sql/sql_parse.cc:7729(wsrep_mysql_parse)[0x7f1aa0c328c0]
      sql/sql_parse.cc:1797(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x7f1aa0c346fd]
      sql/sql_parse.cc:1371(do_command(THD*))[0x7f1aa0c350ee]
      sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x7f1aa0cf335f]
      sql/sql_connect.cc:1243(handle_one_connection)[0x7f1aa0cf3484]
      pthread_create.c:0(start_thread)[0x7f1aa02c5aa1]
      /lib64/libc.so.6(clone+0x6d)[0x7f1a9e9ddbcd]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f0ce005dc30): select * from reeher_oneappeal_db.contact_restriction_mapping where client_id=68 and contact_restriction_mapping.one_appeal_restriction='Do Not Mail'
      and contact_restriction_mapping.platform_restriction_description in (JSON_EXTRACT('{"SQI":"Square Inch (Opt In)","CWI":"Calvin World opt In","ND":"No Denomination Contact"}', '$.*'))
       
      Connection ID (thread ID): 322883
      Status: NOT_KILLED
      

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              kjoiner Kyle Joiner (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.