[MDEV-13042] Index prefix is ignored (Connect engine) Created: 2017-06-09  Updated: 2017-06-27  Resolved: 2017-06-27

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.2.6
Fix Version/s: 10.1.25, 10.0.32, 10.2.7

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Olivier Bertrand
Resolution: Fixed Votes: 0
Labels: None
Environment:

Ubuntu 16.04



 Description   

When using col_name(length) syntax to specify an index prefix length, Connect engine ignores prefix and build whole index

create table t1 (
	id int not null,
  `name` varchar(150) NOT NULL,
  b varbinary (50) NOT NULL,
  c char (20) NOT NULL,
index (name(5)),
index (b(5)),
index (c(5))
)engine=CONNECT;
Query OK, 0 rows affected, 2 warnings (0.05 sec)
 
show create table t1;
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                                                                                                                        |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t1    | CREATE TABLE `t1` (
  `id` int(11) NOT NULL,
  `name` varchar(150) NOT NULL,
  `b` varbinary(50) NOT NULL,
  `c` char(20) NOT NULL,
  KEY `name` (`name`),
  KEY `b` (`b`),
  KEY `c` (`c`)
) ENGINE=CONNECT DEFAULT CHARSET=latin1 |



 Comments   
Comment by Olivier Bertrand [ 2017-06-26 ]

Indeed prefix indexing is not supported by CONNECT. However, this is missing in the documentation.

Comment by Ian Gilfillan [ 2017-06-27 ]

This has been added to the docs:
https://mariadb.com/kb/en/mariadb/using-connect-indexing/+revision/55927/32697/?diff_type=unified

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