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

ER_NEED_REPREPARE on SELECT DEFAULT(name) FROM table1_containing_sequence

    XMLWordPrintable

Details

    Description

      from: https://stackoverflow.com/questions/78807751/error-1615-hy000-prepared-statement-needs-to-be-re-prepared-error-occures-o

      create sequence seq;
      create table table1
      (
          id   int          default nextval(`seq`) not null primary key,
          name varchar(200) default 'auto'                   not null
      );
      

      And run:

      for a in `seq 1000`; do client/mariadb -S /tmp/build-mariadb-server-rebase.sock  -Be 'execute immediate "SELECT
              DEFAULT(name)
              FROM table1";execute immediate "SELECT
              DEFAULT(name)
              FROM table1";execute immediate "SELECT
              DEFAULT(name)' &
      done
      

      Need to start server with rasied max-connection (2k) and potentially more execute immediate SQL statements in the command line to trigger the race condition.

      Will cause connection to error

       1615 (HY000)        FROM table1";' test
       at line 1: Prepared statement needs to be re-prepared
      

      Attachments

        Activity

          People

            danblack Daniel Black
            danblack Daniel Black
            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.