[MDEV-7408] Cannot use a table containing special chars for InnoDB stopwords Created: 2015-01-05  Updated: 2023-08-08  Resolved: 2022-09-12

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.0.15
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Federico Razzoli Assignee: Jan Lindström (Inactive)
Resolution: Won't Fix Votes: 0
Labels: special_chars, upstream, verified

Attachments: File mdev7408.diff    

 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.



 Comments   
Comment by Elena Stepanova [ 2015-01-08 ]

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)

Comment by Federico Razzoli [ 2015-01-08 ]

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

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

Comment by Rohit Kashyap [ 2015-02-12 ]

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.

Comment by Federico Razzoli [ 2015-02-12 ]

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.

Comment by Jan Lindström (Inactive) [ 2015-02-18 ]

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';

Comment by Jan Lindström (Inactive) [ 2015-02-18 ]

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.

Comment by Jan Lindström (Inactive) [ 2015-02-18 ]

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

Comment by Sergei Golubchik [ 2022-09-12 ]

10.0 was EOLed in March 2019

Generated at Thu Feb 08 07:19:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.