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

Server crash in TABLE_SHARE::init_from_sql_statement_string upon table discovery with non-existent database

    XMLWordPrintable

Details

    Description

      If you create a ENGINE=Connect Table_Type=ODBC Table, and try to save it to a Non-Existant Database, the Server Crashes.

      For example, the following query causes the Server to Crash, whenever the Database ("db_name_non_existant") in which the created Connect ODBC Table to be saved does not exists:

      CREATE OR REPLACE TABLE db_name_non_existant.tb_name_new
           ENGINE=CONNECT
           TABLE_TYPE=ODBC 
           CONNECTION='dsn_name'
           OPTION_LIST='UseDSN=Yes,User=user_name,Password=*******************'
           TABNAME='db_name.schema_name.tb_name';      
      

      The Error Log Backtrace is the following:

      180918 15:30:56 [ERROR] mysqld got exception 0xc0000005 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.3.9-MariaDB
      key_buffer_size=65536
      read_buffer_size=262144
      max_used_connections=12
      max_threads=65537
      thread_count=4
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1560 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x4f324d018
      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...
      mysqld.exe!TABLE_SHARE::init_from_sql_statement_string()[table.cc:2810]
      ha_connect.dll!?Val@FILTER@@QEAAAEAPEAVVALUE@@H@Z()
      ha_connect.dll!?Val@FILTER@@QEAAAEAPEAVVALUE@@H@Z()
      mysqld.exe!create_table_impl()[sql_table.cc:4942]
      mysqld.exe!mysql_create_table_no_lock()[sql_table.cc:5096]
      mysqld.exe!mysql_create_table()[sql_table.cc:5188]
      mysqld.exe!mysql_execute_command()[sql_parse.cc:4282]
      mysqld.exe!mysql_parse()[sql_parse.cc:8093]
      mysqld.exe!dispatch_command()[sql_parse.cc:1852]
      mysqld.exe!do_command()[sql_parse.cc:1394]
      mysqld.exe!threadpool_process_request()[threadpool_common.cc:358]
      mysqld.exe!tp_callback()[threadpool_common.cc:186]
      ntdll.dll!RtlDllShutdownInProgress()
      ntdll.dll!DbgUiRemoteBreakin()
      kernel32.dll!BaseThreadInitThunk()
      ntdll.dll!RtlUserThreadStart()
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x3915a46a0): CREATE OR REPLACE TABLE MasterDataTurbine.vCountry_CONNECT        ENGINE = CONNECT        TABLE_TYPE = ODBC        CONNECTION = 'SQLServerParallelDataWarehouse'        OPTION_LIST='UseDSN=Yes,User=TableauAPS_Prod,Password=*********************'        TABNAME = "MasterDataTurbine.General.vCountry"
      Connection ID (thread ID): 490
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
       
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.
      

      Attachments

        1. Error Log.txt
          3 kB
        2. my.ini
          43 kB

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              Juan Juan Telleria
              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.