Hello Sergei Actually I was prototyping for blob and varchar for aria and myisam storage engine. My prototype worked for complex definations like craete table(abc int primary key, blob_col blob unique, varchar_col varchar(1000) unique) engine=myisam; Solved the issue of frm file incosistance. As you suggested for doing it for innodb i am current working on it.Innodb does not natively support hash based index. when we run select distinct column from tbl; it use create_internal_tmp_table() which uses maria storage engine for creating tmp table. But query like this works MariaDB [sachin]> create table iu2(abc blob unique); Query OK, 0 rows affected (0.04 sec) MariaDB [sachin]> insert into iu2 values(1); Query OK, 1 row affected (0.03 sec) MariaDB [sachin]> insert into iu2 values(1); ERROR 1062 (23000): Duplicate entry '1' for key 'abc' this query does not use hash but it simply compares values Will write a proposal shortly. On Tue, Mar 22, 2016 at 4:20 PM, Sachin Setia <sachinsetia1001@gmail.com> wrote:
Hello Sergi Actually I was prototyping for blob and varchar for aria and myisam storage engine. My prototype worked for complex definations like craete table(abc int primary key, blob_col blob unique, varchar_col varchar(1000) unique) engine=myisam; Solved the issue of frm file incosistance.
As you suggested for doing it for innodb i am current working on it.Innodb does not natively support hash based index. when we run select distinct column from tbl; it use create_internal_tmp_table() which uses maria storage engine for creating tmp table. But query like this works MariaDB [sachin]> create table iu2(abc blob unique); Query OK, 0 rows affected (0.04 sec)
MariaDB [sachin]> insert into iu2 values(1); Query OK, 1 row affected (0.03 sec)
MariaDB [sachin]> insert into iu2 values(1); ERROR 1062 (23000): Duplicate entry '1' for key 'abc' this query does not use hash but it simply compares values Will write a proposal shortly.
Regards sachin
On Sat, Mar 19, 2016 at 1:52 AM, Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Sachin!
On Mar 18, Sachin Setia wrote:
ERROR 1030 (HY000): Got error 190 "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump an" from storage engine MyISAM
We are getting this becuase in mi_create for each unique_def it creates
keydef and writes it.And this creates two problem 1. frm keydef algorithm is different from saved kefdef algorithm(always zero) for the time I have solved this problem .
2.Mismatch between keydef's keysegs the reason for this is when mi_create creates keyseg for unique_def it did not keeps the orignal uniquedef's keyseg parameters in mind like language start length which creates
one problem
in check_definition function in ha_myisam.cc.I am currently working on it Once again sorry for this foolish mistake. Regars sachin
No problem, everyone makes mistakes :)
It's a prototype, after all. It's much more important that you understand how the code works and why it doesn't work.
Regards, Sergei Chief Architect MariaDB and security@mariadb.org