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

compat/oracle.sp-package fails on replay

    XMLWordPrintable

Details

    • Unexpected results
    • Q3/2026 Server Maintenance

    Description

      compat/oracle.sp-package fails on replay

       EXPLAIN EXTENDED SELECT 'Deterministic function', COUNT(*) FROM t1 WHERE c1 = f1_deterministic();
      -id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
      -1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
      -Warnings:
      -Note	1003	select 'Deterministic function' AS "Deterministic function",count(0) AS "COUNT(*)" from "test"."t1" where 0
      +ReplayTest: Query error: EXPLAIN EXTENDED SELECT 'Deterministic function', COUNT(*) FROM t1 WHERE c1 = f1_deterministic() :FUNCTION test.f1_deterministic does not exist
      

      MTR testcase to repro issue: (Say example.test)

      --source include/default_charset.inc
       
      SET sql_mode=ORACLE;
       
      CREATE TABLE t1 (c1 CHAR(1));
       
      DELIMITER //;
      CREATE FUNCTION f1_deterministic()
      RETURN CHAR(1)
      DETERMINISTIC
      IS
      BEGIN
         RETURN 'X';
      END;
      //
       
      DELIMITER ;//
       
      EXPLAIN EXTENDED SELECT 'Deterministic function', COUNT(*) FROM t1 WHERE c1 = f1_deterministic();
       
      DROP TABLE t1;
      DROP FUNCTION f1_deterministic;
      

      How to repro

      ./mtr example.test  --record
      ./mtr example.test  --replay-server
      

      Attachments

        Issue Links

          Activity

            People

              bsrikanth Srikanth Bondalapati
              mariadb-pavithrapandith Pavithra Pandith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1d
                  1d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.25d Time Not Required
                  0.25d

                  Git Integration

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