[wp-trac] [WordPress Trac] #35361: Error in SQL syntax search page

WordPress Trac noreply at wordpress.org
Fri Jan 8 19:40:34 UTC 2016


#35361: Error in SQL syntax search page
----------------------------+------------------------------
 Reporter:  salvoaranzulla  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Query           |     Version:  4.4.1
 Severity:  normal          |  Resolution:
 Keywords:  dev-feedback    |     Focuses:
----------------------------+------------------------------
Description changed by SergeyBiryukov:

Old description:

> Hi,
>
> After I have updated Wordpress to last version WordPress 4.4.1, Wordpress
> sometimes crashes on search page:
>
> [07-Jan-2016 13:05:32 UTC] WordPress errore sul database You have an
> error in your SQL syntax; check the manual that corresponds to your MySQL
> server version for the right syntax to use near 'ELSE 5 END),
> sa2013_posts.post_date DESC LIMIT 0, 25' at line 1 per la query SELECT
> SQL_CALC_FOUND_ROWS  sa2013_posts.ID FROM sa2013_posts  WHERE 1=1  AND
> (((sa2013_posts.post_title LIKE '%lenovo%') OR (sa2013_posts.post_content
> LIKE '%lenovo%')) AND ((sa2013_posts.post_title LIKE '%lenovo%') OR
> (sa2013_posts.post_content LIKE '%lenovo%')) AND
> ((sa2013_posts.post_title LIKE '%tab%') OR (sa2013_posts.post_content
> LIKE '%tab%')) AND ((sa2013_posts.post_title LIKE '%2%') OR
> (sa2013_posts.post_content LIKE '%2%')) AND ((sa2013_posts.post_title
> LIKE '%a10-70l%') OR (sa2013_posts.post_content LIKE '%a10-70l%')) AND
> ((sa2013_posts.post_title LIKE '%za010058de%') OR
> (sa2013_posts.post_content LIKE '%za010058de%')) AND
> ((sa2013_posts.post_title NOT LIKE '%%') AND (sa2013_posts.post_content
> NOT LIKE '%%')) AND ((sa2013_posts.post_title LIKE '%blu%') OR
> (sa2013_posts.post_content LIKE '%blu%')))  AND
> (sa2013_posts.post_password = '')  AND sa2013_posts.post_type = 'post'
> AND (sa2013_posts.post_status = 'publish')  ORDER BY (CASE ELSE 5 END),
> sa2013_posts.post_date DESC LIMIT 0, 25 fatta da require('wp-blog-
> header.php'), wp, WP->main, WP->query_posts, WP_Query->query,
> WP_Query->get_posts
> [07-Jan-2016 16:57:01 UTC] WordPress errore sul database You have an
> error in your SQL syntax; check the manual that corresponds to your MySQL
> server version for the right syntax to use near 'ELSE 5 END),
> sa2013_posts.post_date DESC LIMIT 0, 25' at line 1 per la query SELECT
> SQL_CALC_FOUND_ROWS  sa2013_posts.ID FROM sa2013_posts  WHERE 1=1  AND
> (((sa2013_posts.post_title LIKE '%Rito%') OR (sa2013_posts.post_content
> LIKE '%Rito%')) AND ((sa2013_posts.post_title LIKE '%Trailer%') OR
> (sa2013_posts.post_content LIKE '%Trailer%')) AND
> ((sa2013_posts.post_title LIKE '%Italiano%') OR
> (sa2013_posts.post_content LIKE '%Italiano%')) AND
> ((sa2013_posts.post_title LIKE '%Finale%') OR (sa2013_posts.post_content
> LIKE '%Finale%')) AND ((sa2013_posts.post_title LIKE '%Ufficiale%') OR
> (sa2013_posts.post_content LIKE '%Ufficiale%')) AND
> ((sa2013_posts.post_title LIKE '%HD%') OR (sa2013_posts.post_content LIKE
> '%HD%')) AND ((sa2013_posts.post_title NOT LIKE '%%') AND
> (sa2013_posts.post_content NOT LIKE '%%')) AND ((sa2013_posts.post_title
> LIKE '%TopCinema.it%') OR (sa2013_posts.post_content LIKE
> '%TopCinema.it%')))  AND (sa2013_posts.post_password = '')  AND
> sa2013_posts.post_type = 'post' AND (sa2013_posts.post_status =
> 'publish')  ORDER BY (CASE ELSE 5 END), sa2013_posts.post_date DESC LIMIT
> 0, 25 fatta da require('wp-blog-header.php'), wp, WP->main,
> WP->query_posts, WP_Query->query, WP_Query->get_posts

New description:

 Hi,

 After I have updated Wordpress to last version WordPress 4.4.1, Wordpress
 sometimes crashes on search page:
 {{{
 [07-Jan-2016 13:05:32 UTC] WordPress errore sul database You have an error
 in your SQL syntax; check the manual that corresponds to your MySQL server
 version for the right syntax to use near 'ELSE 5 END),
 sa2013_posts.post_date DESC LIMIT 0, 25' at line 1 per la query SELECT
 SQL_CALC_FOUND_ROWS  sa2013_posts.ID FROM sa2013_posts  WHERE 1=1  AND
 (((sa2013_posts.post_title LIKE '%lenovo%') OR (sa2013_posts.post_content
 LIKE '%lenovo%')) AND ((sa2013_posts.post_title LIKE '%lenovo%') OR
 (sa2013_posts.post_content LIKE '%lenovo%')) AND ((sa2013_posts.post_title
 LIKE '%tab%') OR (sa2013_posts.post_content LIKE '%tab%')) AND
 ((sa2013_posts.post_title LIKE '%2%') OR (sa2013_posts.post_content LIKE
 '%2%')) AND ((sa2013_posts.post_title LIKE '%a10-70l%') OR
 (sa2013_posts.post_content LIKE '%a10-70l%')) AND
 ((sa2013_posts.post_title LIKE '%za010058de%') OR
 (sa2013_posts.post_content LIKE '%za010058de%')) AND
 ((sa2013_posts.post_title NOT LIKE '%%') AND (sa2013_posts.post_content
 NOT LIKE '%%')) AND ((sa2013_posts.post_title LIKE '%blu%') OR
 (sa2013_posts.post_content LIKE '%blu%')))  AND
 (sa2013_posts.post_password = '')  AND sa2013_posts.post_type = 'post' AND
 (sa2013_posts.post_status = 'publish')  ORDER BY (CASE ELSE 5 END),
 sa2013_posts.post_date DESC LIMIT 0, 25 fatta da require('wp-blog-
 header.php'), wp, WP->main, WP->query_posts, WP_Query->query,
 WP_Query->get_posts
 [07-Jan-2016 16:57:01 UTC] WordPress errore sul database You have an error
 in your SQL syntax; check the manual that corresponds to your MySQL server
 version for the right syntax to use near 'ELSE 5 END),
 sa2013_posts.post_date DESC LIMIT 0, 25' at line 1 per la query SELECT
 SQL_CALC_FOUND_ROWS  sa2013_posts.ID FROM sa2013_posts  WHERE 1=1  AND
 (((sa2013_posts.post_title LIKE '%Rito%') OR (sa2013_posts.post_content
 LIKE '%Rito%')) AND ((sa2013_posts.post_title LIKE '%Trailer%') OR
 (sa2013_posts.post_content LIKE '%Trailer%')) AND
 ((sa2013_posts.post_title LIKE '%Italiano%') OR (sa2013_posts.post_content
 LIKE '%Italiano%')) AND ((sa2013_posts.post_title LIKE '%Finale%') OR
 (sa2013_posts.post_content LIKE '%Finale%')) AND ((sa2013_posts.post_title
 LIKE '%Ufficiale%') OR (sa2013_posts.post_content LIKE '%Ufficiale%')) AND
 ((sa2013_posts.post_title LIKE '%HD%') OR (sa2013_posts.post_content LIKE
 '%HD%')) AND ((sa2013_posts.post_title NOT LIKE '%%') AND
 (sa2013_posts.post_content NOT LIKE '%%')) AND ((sa2013_posts.post_title
 LIKE '%TopCinema.it%') OR (sa2013_posts.post_content LIKE
 '%TopCinema.it%')))  AND (sa2013_posts.post_password = '')  AND
 sa2013_posts.post_type = 'post' AND (sa2013_posts.post_status = 'publish')
 ORDER BY (CASE ELSE 5 END), sa2013_posts.post_date DESC LIMIT 0, 25 fatta
 da require('wp-blog-header.php'), wp, WP->main, WP->query_posts,
 WP_Query->query, WP_Query->get_posts
 }}}

--

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35361#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list