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

ALTER VIEW not replicated in some cases

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.20-galera
    • 10.0.21-galera, 5.5.45-galera
    • Galera, Views
    • None
    • 3 MariaDB Galera nodes v10.0.20 on Gentoo Linux

    Description

      I've tried to change the DEFINER of a VIEW and therefore executed the following statement on the first node, which has a correct syntax:

      ALTER DEFINER=`someuser`@`localhost` VIEW someview AS <select_statement>

      The statement has been replicated to the other nodes as follows:

      ALTER ALGORITHM=DEFINER=`someuser`@`localhost` SQL SECURITY DEFINER VIEW `someview` AS <select_statement>

      Which is a incorrect syntax and therefore could not be commited on the other nodes:

      150714 13:06:38 [ERROR] Slave SQL: Error '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 'DEFINER=`someuser`@`localhost` SQL SECURITY DEFINER VIEW `someview' at line 1' on query. Default database: 'somedb'. Query: 'ALTER ALGORITHM=DEFINER=`someuser`@`localhost` SQL SECURITY DEFINER VIEW someview` AS <selectstatement>
      150714 13:06:38 [Warning] WSREP: RBR event 1 Query apply warning: 1, 2546
      150714 13:06:38 [Warning] WSREP: Ignoring error for TO isolated action: source: c7ba1dcd-26e4-11e5-b1d1-c72d7419d838 version: 3 local: 0 state: APPLYING flags: 65 conn_id: 105519 trx_id: -1 seqnos (l: 3740, g:
       2546, s: 2545, d: 2545, ts: 1358234290006683)

      A workaround is to explicitly set the algorithm like:

      ALTER ALGORITHM=UNDEFINED DEFINER=`someuser`@`localhost` VIEW someview AS <select_statement>

      Attachments

        Activity

          People

            nirbhay_c Nirbhay Choubey (Inactive)
            paescuj Pascal Jufer
            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.