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

Cannot use a table containing special chars for InnoDB stopwords

Details

    Description

      The statement below fails because the new table contains a special char (dash):

      MariaDB [eshop]> CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
      Query OK, 36 rows affected (0.53 sec)
      Records: 36  Duplicates: 0  Warnings: 0
      MariaDB [eshop]> SET @@global.innodb_ft_server_stopword_table = 'eshop/stop_it-IT';
      ERROR 1231 (42000): Variable 'innodb_ft_server_stopword_table' can't be set to the value of 'eshop/stop_it-IT'

      Without special char, it works:

      MariaDB [eshop]> CREATE TABLE stop_it ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
      Query OK, 36 rows affected (0.51 sec)
      Records: 36  Duplicates: 0  Warnings: 0
      MariaDB [eshop]> SET @@global.innodb_ft_server_stopword_table = 'eshop/stop_it';
      Query OK, 0 rows affected (0.00 sec)

      Sorry, I didn't try on MySQL because I currently don't have it installed on development.

      Attachments

        Activity

          Yes, it's reproducible on MySQL 5.6 and 5.7.
          I haven't found a bug report about it at bugs.mysql.com, are you willing to
          submit one?

          MySQL [test]> CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
          Query OK, 36 rows affected (0.93 sec)
          Records: 36  Duplicates: 0  Warnings: 0
           
          MySQL [test]> SET @@global.innodb_ft_server_stopword_table = 'test/stop_it-IT';
          ERROR 1231 (42000): Variable 'innodb_ft_server_stopword_table' can't be set to the value of 'test/stop_it-IT'
          MySQL [test]> CREATE TABLE stop_it ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
          Query OK, 36 rows affected (1.34 sec)
          Records: 36  Duplicates: 0  Warnings: 0
           
          MySQL [test]> SET @@global.innodb_ft_server_stopword_table = 'test/stop_it';
          Query OK, 0 rows affected (0.00 sec)
           
          MySQL [test]> select @@version;
          +--------------+
          | @@version    |
          +--------------+
          | 5.6.22-debug |
          +--------------+
          1 row in set (0.00 sec)

          MySQL [test]> CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
          Query OK, 36 rows affected (1.45 sec)
          Records: 36  Duplicates: 0  Warnings: 0
           
          MySQL [test]> SET @@global.innodb_ft_server_stopword_table = 'test/stop_it-IT';
          ERROR 1231 (42000): Variable 'innodb_ft_server_stopword_table' can't be set to the value of 'test/stop_it-IT'
          MySQL [test]> select @@version;
          +-----------------+
          | @@version       |
          +-----------------+
          | 5.7.5-m15-debug |
          +-----------------+
          1 row in set (0.00 sec)

          elenst Elena Stepanova added a comment - Yes, it's reproducible on MySQL 5.6 and 5.7. I haven't found a bug report about it at bugs.mysql.com, are you willing to submit one? MySQL [test]> CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD; Query OK, 36 rows affected (0.93 sec) Records: 36 Duplicates: 0 Warnings: 0   MySQL [test]> SET @@ global .innodb_ft_server_stopword_table = 'test/stop_it-IT' ; ERROR 1231 (42000): Variable 'innodb_ft_server_stopword_table' can 't be set to the value of ' test/stop_it-IT ' MySQL [test]> CREATE TABLE stop_it ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD; Query OK, 36 rows affected (1.34 sec) Records: 36 Duplicates: 0 Warnings: 0   MySQL [test]> SET @@global.innodb_ft_server_stopword_table = ' test/stop_it'; Query OK, 0 rows affected (0.00 sec)   MySQL [test]> select @@version; + --------------+ | @@version | + --------------+ | 5.6.22-debug | + --------------+ 1 row in set (0.00 sec) MySQL [test]> CREATE TABLE `stop_it-IT` ENGINE = InnoDB SELECT * FROM information_schema.INNODB_FT_DEFAULT_STOPWORD; Query OK, 36 rows affected (1.45 sec) Records: 36 Duplicates: 0 Warnings: 0   MySQL [test]> SET @@ global .innodb_ft_server_stopword_table = 'test/stop_it-IT' ; ERROR 1231 (42000): Variable 'innodb_ft_server_stopword_table' can 't be set to the value of ' test/stop_it-IT' MySQL [test]> select @@version; + -----------------+ | @@version | + -----------------+ | 5.7.5-m15-debug | + -----------------+ 1 row in set (0.00 sec)

          Ok. I still don't have it installed, so I hope that everything is correct.

          http://bugs.mysql.com/bug.php?id=75451

          f_razzoli Federico Razzoli added a comment - Ok. I still don't have it installed, so I hope that everything is correct. http://bugs.mysql.com/bug.php?id=75451
          rkgudboy Rohit Kashyap added a comment -

          influence the list of stop-words through a special table:
          set the value of the innodb_ft_server_stopword_table *option to a value in the *form db_name/table_name before creating the full-text index. The stopword table must have a single VARCHAR column named value.

          rkgudboy Rohit Kashyap added a comment - influence the list of stop-words through a special table: set the value of the innodb_ft_server_stopword_table *option to a value in the *form db_name/table_name before creating the full-text index. The stopword table must have a single VARCHAR column named value.
          f_razzoli Federico Razzoli added a comment - - edited

          Rohit, as you can see from the tests, I know how to do this. But there is no rule about the table's name, so the first test should work.

          f_razzoli Federico Razzoli added a comment - - edited Rohit, as you can see from the tests, I know how to do this. But there is no rule about the table's name, so the first test should work.

          That create table does not create table named `stop_it-IT` instead table named `test/stop_it@002dIT` is created, thus try

          SET @@global.innodb_ft_server_stopword_table = 'test/stop_it@002dIT';

          jplindst Jan Lindström (Inactive) added a comment - That create table does not create table named `stop_it-IT` instead table named `test/stop_it@002dIT` is created, thus try SET @@global.innodb_ft_server_stopword_table = 'test/stop_it@002dIT';

          Background: '-' character is not permitted characters in unquoted identifiers, in quoted identifiers it is but that does not mean that actual created table has exactly the name provided. See http://dev.mysql.com/doc/refman/5.6/en/identifiers.html

          Hmm, let me see if I can improve this anyway.

          jplindst Jan Lindström (Inactive) added a comment - Background: '-' character is not permitted characters in unquoted identifiers, in quoted identifiers it is but that does not mean that actual created table has exactly the name provided. See http://dev.mysql.com/doc/refman/5.6/en/identifiers.html Hmm, let me see if I can improve this anyway.

          My suggested fix, but we will wait upstream fix to avoid unnecessary re-fixing.

          jplindst Jan Lindström (Inactive) added a comment - My suggested fix, but we will wait upstream fix to avoid unnecessary re-fixing.

          10.0 was EOLed in March 2019

          serg Sergei Golubchik added a comment - 10.0 was EOLed in March 2019

          People

            jplindst Jan Lindström (Inactive)
            f_razzoli Federico Razzoli
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.