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

Mariadb match against a view (fulltext search) fails; succeeds in MySql

    Details

    • Type: Bug
    • Status: Confirmed
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.3.12, 10.0.21, 10.1, 10.0, 5.5
    • Fix Version/s: 10.1, 10.0
    • Component/s: Optimizer
    • Labels:
      None
    • Environment:
      ubuntu 14.04 lts (digital ocean)
      compared sql version 5.1.73-cll (which is why I'm migrating)

      Description

      I was invited by sergii on mariadb.com kb to submit the following bug (steps to reproduce are at bottom):

      DESCRIPTION:

      The fulltext search query below fails in mariadb, but succeeds in mysql (mariadb database imported from mysql database using phpmyadmin).

      If a base table is substituted, the query succeeds in both mariadb and mysql. So apparently mariadb cannot match against views.

      Is there a solution to this? It's messing up my migration. Using 10.0.21.

      Thanks.

      SELECT Title FROM Nodes_View WHERE (MATCH(Title,Caption,Description,Location,Body) AGAINST ('something'))

      TO REPRODUCE:

      1. Create test database with attached sql script in both mariadb and mysql.

      2. in mariadb run the folliowing query:

      SELECT `Title` FROM `Nodes_View` WHERE (MATCH(`Title`,`Caption`,`Description`,`Location`,`Body`) AGAINST('something'))

      note that this is run against a view

      3. observe that this generates the following error

      #1210 - Incorrect arguments to AGAINST

      4. run the same query in mysql

      5. observe that there is no error

      6. run the following query in the mariadb database:

      SELECT `Title` FROM `Articles` WHERE (MATCH(`Title`,`Caption`,`Description`,`Location`,`Body`) AGAINST('something'))

      note that this is run against a base table

      7. observe that the query succeeds

      8. run the same query in mysql

      9. observe that the query succeeds

      Therefore, it appears that fulltext search fails in mariadb against a view

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Thanks for the report and the test case.

            Reproducible both with InnoDB and MyISAM tables.
            Not reproducible on 5.2, reproducible on 5.3.

            Show
            elenst Elena Stepanova added a comment - Thanks for the report and the test case. Reproducible both with InnoDB and MyISAM tables. Not reproducible on 5.2, reproducible on 5.3.
            Hide
            Henrik Henrik Bechmann added a comment -

            you're very welcome, and thanks for your quick response!

            Show
            Henrik Henrik Bechmann added a comment - you're very welcome, and thanks for your quick response!

              People

              • Assignee:
                sanja Oleksandr Byelkin
                Reporter:
                Henrik Henrik Bechmann
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: