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

Misleading message text "uses a LIMIT clause" after Update Rerturning Into

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • N/A
    • 13.2
    • Server
    • None
    • Q4/2026 Server Maintenance

    Description

      --source include/have_log_bin.inc
      --source include/have_binlog_format_statement.inc
       
      CREATE TABLE t1 (a INT);
      INSERT INTO t1 VALUES (1);
       
      DELIMITER $$;
      CREATE PROCEDURE p1()
      BEGIN
        DECLARE v INT;
        UPDATE t1 SET a=a+1 RETURNING a INTO v;
        SELECT v;
      END;
      $$
      DELIMITER ;$$
       
      --error ER_WRONG_USAGE
      CALL p1();
       
      SELECT * FROM t1;
       
      DROP PROCEDURE p1;
      DROP TABLE t1;
       
      --let $binlog_file = LAST
      source include/show_binlog_events.inc;
      

      2026-09-22 11:04:03 5 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. Statement: CALL p1()
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h 58m
                  4h 58m
                  Remaining:
                  Remaining Estimate - 4h 58m
                  4h 58m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Git Integration

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