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

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

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

            cyberw Sergey Sotov created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s 11.6 [ 29515 ]
            alice Alice Sherepa made changes -
            Labels regression-10.11
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            Assignee Marko Mäkelä [ marko ]
            alice Alice Sherepa made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            marko Marko Mäkelä made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            marko Marko Mäkelä made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Thirunarayanan Balathandayuthapani [ thiru ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Summary When creating a table, there are no rows from SELECT Bulk insert fails to apply buffered operation during copy alter algorithm
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Marko Mäkelä [ marko ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Thirunarayanan Balathandayuthapani [ thiru ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Summary Bulk insert fails to apply buffered operation during copy alter algorithm Bulk insert fails to apply buffered operation during CREATE..SELECT statment
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Fix Version/s 10.11.10 [ 29904 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s 11.6 [ 29515 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 11.2.6 [ 29906 ]
            Fix Version/s 11.4.4 [ 29907 ]

            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.