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

Bulk insert fails to apply buffered operation during CREATE..SELECT statment

    XMLWordPrintable

Details

    Description

      Hello.

      When creating a table using SQL query

      CREATE TABLE table_name SELECT field FROM table_source 
      

      creates an empty table without records, if you perform SELECT separately, you can see that there are rows, but they are not added to the table.

      The problem is floating, for example, if you remove any selection filter conditions, then the table is created with records. There are no errors in this case, so it is very difficult to know about the problem, as a result it leads to very serious problems in different areas of database application, for example, if it is a financial transaction, then it is a complete loss of information, the data as if there is, but in the table they are not.

      The problem was found on Mariadb version 10.11.9.
      We switched to Mariadb 11.4.3, which supposedly did not have this problem, but it turned out it does, with a different set of data and query conditions (added JOIN) the problem appeared again!

      How to repeat the problem. I provide queries and tables dump.

      DROP TABLE IF EXISTS problem_table;
       
      CREATE TABLE problem_table 
      SELECT product_id 
      FROM et_price_product t1 
      INNER JOIN et_price_import_setup t2 ON t2.price_id = t1.price_id AND t2.uuid_parent = '' AND t2.status=1 
      

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              cyberw Sergey Sotov
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.