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

table attributes with sysvar as a default value

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.0.2
    • Component/s: None
    • Labels:

      Description

      I've had the need for this few times already (e.g. Aria engine does that with the page checksum).
      It's a table attribute where the default value is not fixed, but set via a server variable. Like in

      SET SESSION opt_val=17;
      CREATE TABLE t1 ( .... ) opt_val=DEFAULT;
      CREATE TABLE t2 ( .... );
      CREATE TABLE t3 ( .... ) opt_val=10;
      

      for tables t1 and t2 the value of opt_val will be 17.

      Note that the value of opt_val is remembered when a table is created, later changes of the session variable don't affect the table.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            pushed in 10.0-base

            Show
            serg Sergei Golubchik added a comment - pushed in 10.0-base

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                serg Sergei Golubchik
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 days
                  3d
                  Remaining:
                  Time Spent - 2 days, 2 hours Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - 2 days, 2 hours Remaining Estimate - 6 hours
                  2d 2h