Describe the bug
There's an issue when searching for 'AND' and there are more results than default limit to be shown on a page.
The bug is in https://github.com/phpmyadmin/sql-parser
To Reproduce
Steps to reproduce the behavior:
- Create table
CREATE TABLE `test` (
`id` int(10) UNSIGNED NOT NULL,
`col` varchar(255) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `test` (`id`, `col`) VALUES
(1, 'AND'),
(2, 'AND'),
(3, 'AND'),
(4, 'AND'),
(5, 'AND'),
(6, 'AND'),
(7, 'AND'),
(8, 'AND'),
(9, 'AND'),
(10, 'AND'),
(11, 'AND'),
(12, 'AND'),
(13, 'AND'),
(14, 'AND'),
(15, 'AND'),
(16, 'AND'),
(17, 'AND'),
(18, 'AND'),
(19, 'AND'),
(20, 'AND'),
(21, 'AND'),
(22, 'AND'),
(23, 'AND'),
(24, 'AND'),
(25, 'AND'),
(26, 'AND');
ALTER TABLE `test`
ADD PRIMARY KEY (`id`);
ALTER TABLE `test`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;
COMMIT;
- Run
SELECT * FROM `test` WHERE `col` LIKE 'AND';
- See error
Error: #1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND ) as cnt' at line 1
Expected behavior
Query should be generated correctly.
Screenshots

Server configuration
- phpMyAdmin version: 5.2.2-dev, 6.0.0-dev
Describe the bug
There's an issue when searching for
'AND'and there are more results than default limit to be shown on a page.The bug is in https://github.com/phpmyadmin/sql-parser
To Reproduce
Steps to reproduce the behavior:
Error: #1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND ) as cnt' at line 1Expected behavior
Query should be generated correctly.
Screenshots
Server configuration