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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              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)
              
              Show
              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)
              Hide
              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

              Show
              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
              Hide
              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.

              Show
              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.
              Hide
              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.

              Show
              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.
              Hide
              jplindst Jan Lindström 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';
              
              Show
              jplindst Jan Lindström 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';
              Hide
              jplindst Jan Lindström 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.

              Show
              jplindst Jan Lindström 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.
              Hide
              jplindst Jan Lindström added a comment -

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

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

                People

                • Assignee:
                  jplindst Jan Lindström
                  Reporter:
                  f_razzoli Federico Razzoli
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated: