On Wed, Aug 14, 2019 at 9:10 AM John <phoenixoverr...@gmail.com> wrote:

> I tweaked the initial select statement from *,* to just *
>
> MariaDB [fawiki_p]> set @row_number = 0; set @row_number_2 = 0; select *
> from ( select (@row_number:=@row_number + 1) as rownumber, ipb_address from
> ipblocks where ipb_by_actor = 1789 order by ipb_range_start ) as ipb left
> join ( select (@row_number_2:=@row_number_2 + 1) as rownumber, ipb_address
> from ipblocks where ipb_by_actor = 1789 order by ipb_range_start ) as lead
> on lead.rownumber = ipb.rownumber + 1;
>

When I try the original Query 3 in the command line client, it works fine
for me:

MariaDB [fawiki_p]> set @row_number = 0;
Query OK, 0 rows affected (0.01 sec)

MariaDB [fawiki_p]> set @row_number_2 = 0;
Query OK, 0 rows affected (0.00 sec)

MariaDB [fawiki_p]>
MariaDB [fawiki_p]> select
    ->   ipb.*,
    ->   lead.*
    -> from
    -> (
    ->   select
    ->     (@row_number:=@row_number + 1) as rownumber,
    ->     ipb_address
    ->   from ipblocks
    ->   where ipb_by_actor = 1789 -- HujiBot
    ->   order by ipb_range_start
    -> ) as ipb
    -> left join
    -> (
    ->   select
    ->     (@row_number_2:=@row_number_2 + 1) as rownumber,
    ->     ipb_address
    ->   from ipblocks
    ->   where ipb_by_actor = 1789 -- HujiBot
    ->   order by ipb_range_start
    -> ) as lead
    ->   on lead.rownumber = ipb.rownumber + 1;
[...]
160 rows in set (0.04 sec)

So perhaps Quarry is doing something odd.

-- 
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Wikimedia Cloud Services mailing list
Cloud@lists.wikimedia.org (formerly lab...@lists.wikimedia.org)
https://lists.wikimedia.org/mailman/listinfo/cloud

Reply via email to