search using operator LIKE on backslash needs \\ protection.
Phpmyadmin does only \
Test case :
CREATE TABLE mytab
(
id
int(11) NOT NULL AUTO_INCREMENT,
caption
varchar(255) NOT NULL,
PRIMARY KEY (id
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO zzzz
.mytab
(
id
,
caption
)
VALUES (
NULL , './\.'
);
Try to recover this line using search menu and LIKE %....% option will not enough protected backslash
The right sequence should be
SELECT *
FROM
mytab
WHERE
caption
LIKE '%./\\\\.%';Last edit: Siby 2013-04-02
I don't understand your test case. After the INSERT, here is what gets inserted (tested in MySQL 5.6.4):
Insert is ok
The issue is when we try to recover insered line using phpmyadmin screen search interface.
Unfortunately, some backslash are removed using this text box :(
So, i will use screenshots to avoid misunderstanding.
On screen 1 area A, the content of table with only 1 row --> ok
On screen 2, i try to recover this row using phpmyadmin search screen ( area B )
area C i use Like %..% operator
area D input exact sequence like display in screen 1 area A
Then running query by left click on screen 2 area E
On screen 3 area F, phpmyadmin return no line
--> Here we have the issue because line exists in table as shown by screen 1 area A
The problem is that backslash digit was only replace by double backslash ( as we can see in screen 3 area F close after to LIKE operator )
For me, the right sequence is four backslash replacement for each backslash in string to find ( example on screen 4 area F )
Hope that help
Last edit: Siby 2013-04-03
Could you attach a small export of your table's structure and test data?
Sure
Only one row in my table
Fixed by https://github.com/phpmyadmin/phpmyadmin/pull/231 in 4.0 and master.