maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #03564
Bls: ERROR 1242 (21000): Subquery returns more than 1 row
hi, tristan,are you sure your select record in the table only contain one row and different data?how about add limit 1
Pada Jumat, 29 April 2016 0:57, Tristan AURIOL <tristan@xxxxxxxxx> menulis:
Hi everyone,
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.11-MariaDB-1~jessie-log I have this error:
ERROR 1242 (21000): Subquery returns more than 1 row
Do you have an idea?
Thanks
--
Tristan AURIOL
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~maria-discuss
More help : https://help.launchpad.net/ListHelp
References