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

Session user variables tracker

    XMLWordPrintable

    Details

      Description

      When using a proxy, such as MaxScale to do read/write split, It is not easy to keep session state consistent between different backends, especially for session user variables; When execute stored procedure, or do some select with user variable modification,It is hard for proxy to notice that a variable was changed, and get the lasted value;
      For example,

      select a, b from (select (@id:=@id+1) as id, a, b from t group by c order by d) tt where id < 10;
      select @a:=b, c from t
      ...
      

      Currently, Maxscale route these queries to every backends or route all to master, it is not efficient and sometimes not correct;

      So we suggest that server provide a session user variables tracker to inform proxy the what variable changed, and the lasted value, then propagate the results to other backends.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svoj Sergey Vojtovich
              Reporter:
              dapeng dapeng huang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: