So i have this method that contains a geometry function from mysql :
select *, (SELECT SUM(t_o.value) FROM tree_operations t_o WHERE t_o.operation_id = operations.id) operationTreeValue, (SELECT COUNT(t_o.id) FROM `tree_operations` t_o WHERE t_o.operation_id = operations.id) operationTreeNumber, (CASEr WHEN operations.type = 'pieces' THEN (SELECT GROUP_CONCAT(p.name) FROM `pieces` p WHERE p.id IN (SELECT piece_id FROM `piece_row_operations` WHERE operation_id = operations.id))r WHEN operations.type = 'rows' THEN (SELECT GROUP_CONCAT(r.number) FROM `rows` r WHERE r.id IN (SELECT row_id FROM `piece_row_operations` WHERE operation_id = operations.id))r END) AS typeName from `operations` where operations.id IN (SELECT t_o.operation_id FROM `tree_operations` t_o WHERE t_o.tree_id IN (SELECT t.id FROM `trees` t WHERE t.coordinates IN (Contains(GeomFromText('POLYGON(49.816472 35.971209,49.7868 35.970981,49.788668 35.947219,49.15201 35.947905,49.816472 35.971209)'))))) order by `operations`.`id` desc
But surprisingly it doesn't work on server (while it's perfectly fine in local) After spending chunk load of time (running query on different environments and so on ) i couldn't get any solid answer . is there anything wrong with my query or is it the functions that are not working anymore?? p.s : my mysql version in the local is 5.7 and server is mariadb 10.2