-1

I have downloaded and built Cryptdb and it works well. Most of queries on encrypted database run without any issue but, the query with LIKE key word receives an error.

mysql> select * from pptbl;
+------+-------+
| id   | name  |
+------+-------+
| 1    | ali   |
| 2    | arbab |
| 3    | ava   |
| 4    | azim  |
+------+-------+
4 rows in set (0.12 sec)

mysql> select * from pptbl where name LIKE '%ali%';
ERROR 1105 (07000): Identifier not found: 'oINVALID'
FILE: main/Analysis.cc
LINE: 782

and Related encrypted results:

QUERY: select * from pptbl  
NEW QUERY: select `pbpcr`.`table_JMVMTSUOXQ`.`FETRAWCXAQoEq`,
`pbpcr`.`table_JMVMTSUOXQ`.`cdb_saltEDYOFRHNTM`,
`pbpcr`.`table_JMVMTSUOXQ`.`LGDQMZOLRAoEq` from `pbpcr`.`table_JMVMTSUOXQ`
ENCRYPTED RESULTS:
+--------------------+--------------------+--------------------+
|FETRAWCXAQoEq       |cdb_saltEDYOFRHNTM  |LGDQMZOLRAoEq       |
+--------------------+--------------------+--------------------+
|6564397473536819806 |13839409992861282053|?]???i?Q0?o~?????rqw??$\??3??c6?|
    |4201181374583641407 |5838989347444454725 |?$@ur?????????????[?^9??V S_5??^|
|1649188046741762720 |9525321359430614429 |``???L??w|??f?C>?????4<????[????|
|16881031136507617701|7294557497133907357 |p?r?my?[???E`?2cLE/?.???E??????~|
+--------------------+--------------------+--------------------+

and the result of following query:

mysql> set @cryptdb='show';
+-----------+--------+--------+--------+--------+------+
| _database | _table | _field | _onion | _level | id   |
+-----------+--------+--------+--------+--------+------+
| pbpcr     | pptbl  | id     | oEq    | RND    | 1082 |
| pbpcr     | pptbl  | id     | oOrder | RND    | 1083 |
| pbpcr     | pptbl  | id     | oADD   | HOM    | 1084 |
| pbpcr     | pptbl  | name   | oEq    | DET    | 1085 |
| pbpcr     | pptbl  | name   | oOrder | RND    | 1086 |
+-----------+--------+--------+--------+--------+------+
5 rows in set (0.43 sec)
sashank
  • 6,234
  • 4
  • 36
  • 68

2 Answers2

2

The following is the main contributor reply:

The latest released version of CryptDB no longer supports the LIKE operation. Feel free to contribute to CryptDB and extend it to support this operation. You can find an older implementation (disabled) in the code, which we did not have the chance to port to the latest system.

mikeazo
  • 39,117
  • 9
  • 118
  • 183
1

Cryptdb doesn't support LIKE queries. You can try using in and not in queries. It supports update, in and not in queries but not like.

mikeazo
  • 39,117
  • 9
  • 118
  • 183
Prakruti
  • 11
  • 1