[MDEV-16189] misleading error when partitioning a table with an utf8 space after backticks on partition names Created: 2018-05-16  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Parser, Server
Affects Version/s: 5.5, 10.0, 10.1, 10.1.33, 10.2.14, 10.2, 10.3
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Rick Pizzi Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: upstream


 Description   

mysql -A
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 13
Server version: 10.1.33-MariaDB MariaDB Server
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]> use test
Database changed
MariaDB [test]> CREATE TABLE actor_backticks_around_p1 (   actor_id smallint(5) unsigned NOT NULL AUTO_INCREMENT,   first_name varchar(45) NOT NULL,   last_name varchar(45) NOT NULL,   last_update timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),   PRIMARY KEY (actor_id,last_update),   KEY idx_actor_last_name (last_name),   KEY last_update (last_update) ) ENGINE=InnoDB DEFAULT CHARSET=utf8  PARTITION BY RANGE (unix_timestamp(last_update)) (PARTITION p0  VALUES LESS THAN (1522900800) ENGINE = InnoDB,  PARTITION `p1`  VALUES LESS THAN (1522987200) ENGINE = InnoDB);
ERROR 1479 (HY000): Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition

Can be reproduced on 10.1 and 10.2
Will work fine if no backticks around 'p1'



 Comments   
Comment by Elena Stepanova [ 2018-05-16 ]

As per serg's finding, the query has `0xC2 0xA0` after the second backtick. If the space is removed, backticks work all right.
If backticks are removed, the space alone also works all right.

So all in all, there is a bug in there, as the space shouldn't cause the trouble – it's an old upstream issue, reproducible on all of MariaDB 5.5-10.3 and MySQL 5.5-5.7, but it's not about backticks as such.

Comment by Rick Pizzi [ 2018-05-16 ]

As @marko pointed out this is a non breaking space that can be entered on Mac with Alt + SPACE
Maybe we should handle that?

Thanks again for your time guys

Generated at Thu Feb 08 08:27:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.