[MDEV-5261] Cannot use indexes with HTML tables in CONNECT storage engine Created: 2013-11-08 Updated: 2013-12-05 Resolved: 2013-12-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.5, 10.0.6 |
| Fix Version/s: | 10.0.6, 10.0.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | Ivan Zoratti (Inactive) | Assignee: | Olivier Bertrand |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | connect-engine | ||
| Environment: |
CentOS 6.4 x86_64 |
||
| Description |
|
I have created a couple of HTML tables from an InnoDB table (employees and departments) - the original tables are from the employees DB used in MySQL training - https://dev.mysql.com/doc/employee/en/. The tables are:
and:
As you can see, I have added indexes with no problems. When I try to use the indexes, I have all sort of problems:
The index from employees is not used and I cannot drop it. Thanks! |
| Comments |
| Comment by Ivan Zoratti (Inactive) [ 2013-11-08 ] |
|
Note: CSV files work fine with indexes. |
| Comment by Elena Stepanova [ 2013-12-03 ] |
|
Indeed, while one cannot create an indexed table... MariaDB [test]> create table t1 (i int not null, unique one can add an index to an existing table: MariaDB [test]> create table t1 (i int not null) engine=CONNECT table_type=XML file_name='/home/elenst/bzr/10.0/data/test.xml'; MariaDB [test]> alter table t1 add unique Further problems as described: MariaDB [test]> select * from t1 where i = 0; #3 <signal handler called> |
| Comment by Olivier Bertrand [ 2013-12-04 ] |
|
The CONNECT documentation clearly indicates what table types are not indexable and why. If not (I will check that) it is reported as an error in the CREATE TABLE statement. However, the fact that a wrong (void) one is created using ALTER (and perhaps CREATE INDEX) and that trying to drop it cause a crash of the server is a bug indeed. Thanks to have reported it. Until it is fixed (soon), a simple bypass is not to try fooling the system with ALTER and to use those not indexable table types with no index. |
| Comment by Olivier Bertrand [ 2013-12-04 ] |
|
All ALTER, CREATE or DROP statement trying to act on index for a table type that is not indexable now result in error or warning (for DROP) |