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

Second execution of prepare statement with ESCAPE clause fails with message "Incorrect arguments to ESCAPE"

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 11.0(EOL), 11.1(EOL)
    • 10.5, 10.6
    • Prepared Statements
    • None

    Description

      Testcase:

      create table t1(f1 int);
      insert into t1 values(1);
       
      prepare stmt1 from "select * from (select 1 like 2 escape (1 in (select 1 from t1))) x";
       
      execute stmt1;
      execute stmt1;
       
      deallocate prepare stmt1;
       
      DROP TABLE t1;
      

      Actual result:

      execute stmt1;
      1 like 2 escape (1 in (select 1 from t1))
      0
      execute stmt1;
       
      mysqltest: At line 7: query 'execute stmt1' failed: 1210: Incorrect arguments to ESCAPE
      

      Expected result:

      execute stmt1;
      1 like 2 escape (1 in (select 1 from t1))
      0
      execute stmt1;
      1 like 2 escape (1 in (select 1 from t1))
      0
      

      Attachments

        Issue Links

          Activity

            People

              shulga Dmitry Shulga
              lstartseva Lena Startseva
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.