Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-10007

ERROR 1242 (21000): Subquery returns more than 1 row

    XMLWordPrintable

Details

    Description

      I have a big problem with my application.
      My application execute this request :

      INSERT INTO `mydb`.`service_request` (  `id_z`,  `id_app`,  `request_time`,  `priority` )
      (  SELECT sc.`id_z`,         sc.`id_app`,         NOW(),         0 
         FROM `mydb`.`service_connection` sc 
         JOIN `mydb`.`service` s ON ( s.`id_service` = sc.`id_service` ) 
         WHERE 1=1   
         AND sc.`id_app` = _utf8'afr'   
         AND s.`status` = 'available'   
         AND (  sc.`last_synchronized_time` < SUBDATE( NOW(), INTERVAL 600 SECOND )  OR sc.`last_synchronized_time` IS NULL )   
         AND sc.`nb_errors` < 2  
         AND sc.`id_z` NOT IN (
                   SELECT sr.`id_z`
                   FROM `mydb`.`service_request` sr
                   WHERE sr.`id_app` = _utf8'afr'
                   AND sr.`status` IN ( 'waiting thu', 'waiting sez', 'in progress' )
                 )
       ) ;
      

      This request works well into MySQL 5.6.25-1~dotdeb+7.1 but when I run into 10.1.13-MariaDB-1~jessie-log I have this error:
      ERROR 1242 (21000): Subquery returns more than 1 row

      Attachments

        Activity

          People

            Unassigned Unassigned
            tauriol Tristan AURIOL
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.