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

create_temporary_table_binlog_formats treats numeric values differently

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • None
    • N/A
    • Variables
    • None

    Description

      1. Like binlog_format we can set numeric values in create_temporary_table_binlog_formats. But the way create_temporary_table_binlog_formats treats those are different from the way binlog_format does.

      binlog_format treats the numeric values as follows,

      0 = MIXED
      1 = STATEMENT
      2 = ROW
      

      create_temporary_table_binlog_formats treats the numeric values quite differently,

      11.8.1-opt>SET create_temporary_table_binlog_formats = 0;
      ERROR 1231 (42000): Variable 'create_temporary_table_binlog_formats' can't be set to the value of '0'
      11.8.1-opt>SET create_temporary_table_binlog_formats = 1;
      Query OK, 0 rows affected (0.000 sec)
       
      11.8.1-opt>SELECT @@create_temporary_table_binlog_formats;
      +-----------------------------------------+
      | @@create_temporary_table_binlog_formats |
      +-----------------------------------------+
      | MIXED,STATEMENT                         |
      +-----------------------------------------+
      1 row in set (0.000 sec)
       
      11.8.1-opt>SET create_temporary_table_binlog_formats = 2;
      Query OK, 0 rows affected (0.000 sec)
       
      11.8.1-opt>SELECT @@create_temporary_table_binlog_formats;
      +-----------------------------------------+
      | @@create_temporary_table_binlog_formats |
      +-----------------------------------------+
      | STATEMENT                               |
      +-----------------------------------------+
      1 row in set (0.000 sec)
       
      11.8.1-opt>SET create_temporary_table_binlog_formats = 3;
      Query OK, 0 rows affected (0.000 sec)
       
      11.8.1-opt>SELECT @@create_temporary_table_binlog_formats;
      +-----------------------------------------+
      | @@create_temporary_table_binlog_formats |
      +-----------------------------------------+
      | MIXED,STATEMENT                         |
      +-----------------------------------------+
      1 row in set (0.000 sec)
      

      2. create_temporary_table_binlog_formats is not accepting comma separated valid numeric values,

      11.8.1-opt>SET create_temporary_table_binlog_formats = 'MIXED,STATEMENT';
      Query OK, 0 rows affected (0.000 sec)
       
      11.8.1-opt>SET create_temporary_table_binlog_formats = 1,2;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '2' at line 1
      

      Expected behavior:
      1. create_temporary_table_binlog_formats should treat the numeric values exactly like binlog_format.
      2. create_temporary_table_binlog_formats should accept comma-separated numeric values.

      Attachments

        Issue Links

          Activity

            ParadoxV5 Jimmy Hú added a comment - - edited

            Cause: Sys_var_set instances – binlog_formats_create_tmp_names among them – are bitsets (A.K.A. bit arrays) rather than enum sets. That is, binlog_formats_create_tmp_names values are currently:

            • 0b00 = None (not accepted)
              • (On second thought, one could use this to disable logging TEMPORARYs generally.)
            • 0b01 = MIXED only (is converted to STATEMENT+MIXED automatically)
            • 0b10 = STATEMENT only
            • 0b11 = STATEMENT + MIXED
            ParadoxV5 Jimmy Hú added a comment - - edited Cause: Sys_var_set instances – binlog_formats_create_tmp_names among them – are bitsets (A.K.A. bit arrays ) rather than enum sets. That is, binlog_formats_create_tmp_names values are currently: 0b00 = None (not accepted) (On second thought, one could use this to disable logging TEMPORARYs generally.) 0b01 = MIXED only (is converted to STATEMENT+MIXED automatically) 0b10 = STATEMENT only 0b11 = STATEMENT + MIXED

            create_temporary_table_binlog_formats is not a numerical value like binlog_format. It is set.
            In other words, it cannot work as binlog_format!

            One cannot with binlog_format specify both statement and mixed.

            monty Michael Widenius added a comment - create_temporary_table_binlog_formats is not a numerical value like binlog_format. It is set. In other words, it cannot work as binlog_format! One cannot with binlog_format specify both statement and mixed.

            Works as designed and explained both in Jira and in the comment for the variable.

            monty Michael Widenius added a comment - Works as designed and explained both in Jira and in the comment for the variable.

            People

              monty Michael Widenius
              susil.behera Susil Behera
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.