From ebde9b56481228faec19644a2412de7ad71becde Mon Sep 17 00:00:00 2001 From: "aleksei.bukhalov" Date: Wed, 3 Sep 2025 17:34:32 +0200 Subject: [PATCH 1/8] fix(tests): add deterministic ordering for failing mtrs --- .../basic/r/func_jsonarrayagg.result | 48 +- .../basic/r/mcol641-aggregate.result | 36 +- .../columnstore/basic/r/mcol_4617.result | 14 +- .../r/mcs31_update_table_negative.result | 6 +- .../basic/r/mcs34_select_order_by.result | 776 +++++++++--------- .../basic/r/mcs65_crossengine_order_by.result | 74 +- .../basic/r/mcs85_derived_table.result | 28 +- .../basic/r/mcs97_group_concat.result | 22 +- .../basic/t/func_jsonarrayagg.test | 16 +- .../basic/t/mcol641-aggregate.test | 24 +- mysql-test/columnstore/basic/t/mcol_4617.test | 16 +- .../basic/t/mcs31_update_table_negative.test | 4 +- .../basic/t/mcs34_select_order_by.test | 125 ++- .../basic/t/mcs65_crossengine_order_by.test | 50 +- .../basic/t/mcs85_derived_table.test | 22 +- .../basic/t/mcs97_group_concat.test | 8 +- 16 files changed, 610 insertions(+), 659 deletions(-) diff --git a/mysql-test/columnstore/basic/r/func_jsonarrayagg.result b/mysql-test/columnstore/basic/r/func_jsonarrayagg.result index a61f1e88a..6160fb43b 100644 --- a/mysql-test/columnstore/basic/r/func_jsonarrayagg.result +++ b/mysql-test/columnstore/basic/r/func_jsonarrayagg.result @@ -102,18 +102,18 @@ JSON_ARRAYAGG(b LIMIT 2) ["Hello","World","Hello","World"] ["This","Will","Work","!","This","Will","Work","!"] [null,null] -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; -JSON_ARRAYAGG(DISTINCT a) -[3,2,1] -SELECT JSON_ARRAYAGG(DISTINCT b) FROM t1; -JSON_ARRAYAGG(DISTINCT b) -["Will","World","Work",null,"!","This","Hello"] -SELECT JSON_ARRAYAGG(DISTINCT a LIMIT 2) FROM t1; -JSON_ARRAYAGG(DISTINCT a LIMIT 2) -[3,2,1] -SELECT JSON_ARRAYAGG(DISTINCT b LIMIT 2) FROM t1; -JSON_ARRAYAGG(DISTINCT b LIMIT 2) -["Will","World","Work",null,"!","This","Hello"] +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; +JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) +[1,2,3] +SELECT JSON_ARRAYAGG(DISTINCT b ORDER BY b ASC) FROM t1; +JSON_ARRAYAGG(DISTINCT b ORDER BY b ASC) +[null,"!","Hello","This","Will","Work","World"] +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC LIMIT 2) FROM t1; +JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC LIMIT 2) +[1,2,3] +SELECT JSON_ARRAYAGG(DISTINCT b ORDER BY b ASC LIMIT 2) FROM t1; +JSON_ARRAYAGG(DISTINCT b ORDER BY b ASC LIMIT 2) +[null,"!","Hello","This","Will","Work","World"] # # JSON aggregation # @@ -189,16 +189,16 @@ INSERT INTO t1 VALUES (1,1), (2,2), (3,3); SELECT JSON_ARRAYAGG(a) FROM t1; JSON_ARRAYAGG(a) [1,2,3,1,2,3] -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; -JSON_ARRAYAGG(DISTINCT a) -[3,2,1] +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; +JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) +[1,2,3] INSERT INTO t1 VALUES (NULL,NULL), (NULL,NULL); SELECT JSON_ARRAYAGG(a) FROM t1; JSON_ARRAYAGG(a) [1,2,3,1,2,3,null,null] -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; -JSON_ARRAYAGG(DISTINCT a) -[null,2,3,1] +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; +JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) +[null,1,2,3] DROP TABLE t1; CREATE TABLE t1(a VARCHAR(10), b INT)ENGINE=COLUMNSTORE; INSERT INTO t1 VALUES (1,1), (2,2), (3,3); @@ -206,16 +206,16 @@ INSERT INTO t1 VALUES (1,1), (2,2), (3,3); SELECT JSON_ARRAYAGG(a) FROM t1; JSON_ARRAYAGG(a) [1,2,3,1,2,3] -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; -JSON_ARRAYAGG(DISTINCT a) -[3,2,1] +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; +JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) +[1,2,3] INSERT INTO t1 VALUES (NULL,NULL), (NULL,NULL); SELECT JSON_ARRAYAGG(a) FROM t1; JSON_ARRAYAGG(a) [1,2,3,1,2,3,null,null] -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; -JSON_ARRAYAGG(DISTINCT a) -[null,2,3,1] +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; +JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) +[null,1,2,3] DROP TABLE t1; # # diff --git a/mysql-test/columnstore/basic/r/mcol641-aggregate.result b/mysql-test/columnstore/basic/r/mcol641-aggregate.result index bf2ec4f80..ec35c42a4 100644 --- a/mysql-test/columnstore/basic/r/mcol641-aggregate.result +++ b/mysql-test/columnstore/basic/r/mcol641-aggregate.result @@ -12,7 +12,7 @@ CREATE TABLE cs3 (d1 DECIMAL(19), d2 DECIMAL(19,10), d3 DECIMAL(19,19), d4 DECIM CREATE TABLE cs4 (d1 DECIMAL(19) UNSIGNED, d2 DECIMAL(19,10) UNSIGNED, d3 DECIMAL(19,19) UNSIGNED, d4 DECIMAL(19) UNSIGNED,d5 DECIMAL(19),i1 INT) ENGINE=columnstore; CREATE TABLE cs5(d DECIMAL(25,19)) ENGINE=columnstore; INSERT INTO cs1 VALUES -(1234,5678,-0.12345678901234567890123456789018,2,1,1), +(1234,5678,-0.12345678901234567890123456789018,2,1,1), (1234,-5678,0.1234567890123456789012345,2,1,1), (12345678901234567890123,1234567890123456789012.9012345678,0.123456789012345678901234567890,2,1,1), (NULL,NULL,NULL,2,1,1), @@ -26,7 +26,7 @@ INSERT INTO cs1 VALUES (1234,5678,-0.12345678901234567890123456789018,11111111111111111111111111111111,1,1), (1234,5678,-0.12345678901234567890123456789018,11111111111111111111111111111112,1,1); INSERT INTO cs2 VALUES -(1234,5678,0.12345678901234567890123456789018,2,1,1), +(1234,5678,0.12345678901234567890123456789018,2,1,1), (1234,5678,0.1234567890123456789012345,2,1,1), (12345678901234567890123,1234567890123456789012.9012345678,0.123456789012345678901234567890,2,1,1), (NULL,NULL,NULL,2,1,1), @@ -40,7 +40,7 @@ INSERT INTO cs2 VALUES (1234,5678,0.12345678901234567890123456789018,11111111111111111111111111111111,1,1), (1234,5678,0.12345678901234567890123456789018,11111111111111111111111111111112,1,1); INSERT INTO cs3 VALUES -(1234,5678,-0.12345678901234,2,1,1), +(1234,5678,-0.12345678901234,2,1,1), (1234,-5678,0.12345678901234,2,1,1), (12345678901,12345678.90128,0.1234567890123,2,1,1), (NULL,NULL,NULL,2,1,1), @@ -51,7 +51,7 @@ INSERT INTO cs3 VALUES (NULL,NULL,NULL,3,2,2), (0,0,0,3,2,2); INSERT INTO cs4 VALUES -(1234,5678,0.12345678901234,2,1,1), +(1234,5678,0.12345678901234,2,1,1), (1234,5678,0.12345678901234,2,1,1), (12345678901,12345678.90128,0.1234567890123,2,1,1), (NULL,NULL,NULL,2,1,1), @@ -188,9 +188,9 @@ min(38)_test2 0 0.0000000000 0.00000000000000000000000000000000000000 SELECT "max(38)_test2", max(d1),max(d2),max(d3) FROM cs2; max(38)_test2 max(d1) max(d2) max(d3) max(38)_test2 12345678901234567890901 1234567890123478901234.9012345678 0.12345678901234567890123456789080000000 -SELECT "group_concat(38)_test2", group_concat(d1),group_concat(d2),group_concat(d3) FROM cs2; -group_concat(38)_test2 group_concat(d1) group_concat(d2) group_concat(d3) -group_concat(38)_test2 1234,1234,12345678901234567890123,0,1234,123456789123456789123,12345678901234567890901,0,1234,1234,1234 5678.0000000000,5678.0000000000,1234567890123456789012.9012345678,0.0000000000,5678.0000000000,5678.0000000000,1234567890123478901234.9012345678,0.0000000000,5678.0000000000,5678.0000000000,5678.0000000000 0.12345678901234567890123456789018000000,0.12345678901234567890123450000000000000,0.12345678901234567890123456789000000000,0.00000000000000000000000000000000000000,0.12345678901234567834567890123456780000,0.12345678901234567345678901234567800000,0.12345678901234567890123456789080000000,0.00000000000000000000000000000000000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000 +SELECT "group_concat(38)_test2", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM cs2; +group_concat(38)_test2 group_concat(d1 ORDER BY d1) group_concat(d2 ORDER BY d2) group_concat(d3 ORDER BY d3) +group_concat(38)_test2 0,0,1234,1234,1234,1234,1234,1234,123456789123456789123,12345678901234567890123,12345678901234567890901 0.0000000000,0.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,1234567890123456789012.9012345678,1234567890123478901234.9012345678 0.00000000000000000000000000000000000000,0.00000000000000000000000000000000000000,0.12345678901234567345678901234567800000,0.12345678901234567834567890123456780000,0.12345678901234567890123450000000000000,0.12345678901234567890123456789000000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789080000000 SELECT "count(distinct 38)_test2", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs2; count(distinct 38)_test2 count(distinct d1) count(distinct d2) count(distinct d3) count(distinct 38)_test2 5 4 7 @@ -209,9 +209,9 @@ min(38)_test2 0 0.0000000000 0.00000000000000000000000000000000000000 SELECT "max(38)_test2", max(d1),max(d2),max(d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; max(38)_test2 max(d1) max(d2) max(d3) max(38)_test2 12345678901234567890901 1234567890123478901234.9012345678 0.12345678901234567890123456789080000000 -SELECT "group_concat(38)_test2", group_concat(d1),group_concat(d2),group_concat(d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; -group_concat(38)_test2 group_concat(d1) group_concat(d2) group_concat(d3) -group_concat(38)_test2 1234,1234,12345678901234567890123,0,1234,123456789123456789123,12345678901234567890901,0,1234,1234,1234 5678.0000000000,5678.0000000000,1234567890123456789012.9012345678,0.0000000000,5678.0000000000,5678.0000000000,1234567890123478901234.9012345678,0.0000000000,5678.0000000000,5678.0000000000,5678.0000000000 0.12345678901234567890123456789018000000,0.12345678901234567890123450000000000000,0.12345678901234567890123456789000000000,0.00000000000000000000000000000000000000,0.12345678901234567834567890123456780000,0.12345678901234567345678901234567800000,0.12345678901234567890123456789080000000,0.00000000000000000000000000000000000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000 +SELECT "group_concat(38)_test2", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; +group_concat(38)_test2 group_concat(d1 ORDER BY d1) group_concat(d2 ORDER BY d2) group_concat(d3 ORDER BY d3) +group_concat(38)_test2 0,0,1234,1234,1234,1234,1234,1234,123456789123456789123,12345678901234567890123,12345678901234567890901 0.0000000000,0.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,1234567890123456789012.9012345678,1234567890123478901234.9012345678 0.00000000000000000000000000000000000000,0.00000000000000000000000000000000000000,0.12345678901234567345678901234567800000,0.12345678901234567834567890123456780000,0.12345678901234567890123450000000000000,0.12345678901234567890123456789000000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789080000000 SELECT "count(distinct 38)_test2", count(distinct d1),count(distinct d2),count(distinct d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; count(distinct 38)_test2 count(distinct d1) count(distinct d2) count(distinct d3) count(distinct 38)_test2 5 4 7 @@ -277,10 +277,10 @@ SELECT "max(38)_GB(8)_test2" ,i1,max(d1),max(d2),max(d3) FROM cs2 GROUP BY i1 OR max(38)_GB(8)_test2 i1 max(d1) max(d2) max(d3) max(38)_GB(8)_test2 1 12345678901234567890123 1234567890123456789012.9012345678 0.12345678901234567890123456789018000000 max(38)_GB(8)_test2 2 12345678901234567890901 1234567890123478901234.9012345678 0.12345678901234567890123456789080000000 -SELECT "group_concat(38)_GB(8)_test2", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d1),group_concat(d3 ORDER BY d1) FROM cs2 GROUP BY i1 ORDER BY 2,3; -group_concat(38)_GB(8)_test2 group_concat(d1 ORDER BY d1) group_concat(d2 ORDER BY d1) group_concat(d3 ORDER BY d1) -group_concat(38)_GB(8)_test2 0,1234,1234,1234,1234,1234,12345678901234567890123 0.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,1234567890123456789012.9012345678 0.00000000000000000000000000000000000000,0.12345678901234567890123450000000000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789000000000 -group_concat(38)_GB(8)_test2 0,1234,123456789123456789123,12345678901234567890901 0.0000000000,5678.0000000000,5678.0000000000,1234567890123478901234.9012345678 0.00000000000000000000000000000000000000,0.12345678901234567834567890123456780000,0.12345678901234567345678901234567800000,0.12345678901234567890123456789080000000 +SELECT "group_concat(38)_GB(8)_test2", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM cs2 GROUP BY i1 ORDER BY 2,3; +group_concat(38)_GB(8)_test2 group_concat(d1 ORDER BY d1) group_concat(d2 ORDER BY d2) group_concat(d3 ORDER BY d3) +group_concat(38)_GB(8)_test2 0,1234,1234,1234,1234,1234,12345678901234567890123 0.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,5678.0000000000,1234567890123456789012.9012345678 0.00000000000000000000000000000000000000,0.12345678901234567890123450000000000000,0.12345678901234567890123456789000000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000,0.12345678901234567890123456789018000000 +group_concat(38)_GB(8)_test2 0,1234,123456789123456789123,12345678901234567890901 0.0000000000,5678.0000000000,5678.0000000000,1234567890123478901234.9012345678 0.00000000000000000000000000000000000000,0.12345678901234567345678901234567800000,0.12345678901234567834567890123456780000,0.12345678901234567890123456789080000000 SELECT "count(distinct 38)_GB(8)_test2", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs2 GROUP BY i1 ORDER BY 2,3; count(distinct 38)_GB(8)_test2 count(distinct d1) count(distinct d2) count(distinct d3) count(distinct 38)_GB(8)_test2 3 3 4 @@ -300,9 +300,9 @@ min(19)_test3 -1234567899 -5678.0000000000 -0.1234567890123400000 SELECT "max(19)_test3", max(d1),max(d2),max(d3) FROM cs3; max(19)_test3 max(d1) max(d2) max(d3) max(19)_test3 12345678901 12345678.9012800000 0.1234567890123400000 -SELECT "group_concat(38)_test3", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d1),group_concat(d3 ORDER BY d1) FROM cs3; -group_concat(38)_test3 group_concat(d1 ORDER BY d1) group_concat(d2 ORDER BY d1) group_concat(d3 ORDER BY d1) -group_concat(38)_test3 -1234567899,0,0,1234,1234,1234,12345678901,12345678901 -5678.0000000000,0.0000000000,0.0000000000,5678.0000000000,-5678.0000000000,5678.0000000000,12345678.9012000000,12345678.9012800000 0.1234567890123000000,0.0000000000000000000,0.0000000000000000000,0.1234567890123400000,0.1234567890123400000,-0.1234567890123400000,0.1234567890123000000,0.1234567890123000000 +SELECT "group_concat(38)_test3", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM cs3; +group_concat(38)_test3 group_concat(d1 ORDER BY d1) group_concat(d2 ORDER BY d2) group_concat(d3 ORDER BY d3) +group_concat(38)_test3 -1234567899,0,0,1234,1234,1234,12345678901,12345678901 -5678.0000000000,-5678.0000000000,0.0000000000,0.0000000000,5678.0000000000,5678.0000000000,12345678.9012000000,12345678.9012800000 -0.1234567890123400000,0.0000000000000000000,0.0000000000000000000,0.1234567890123000000,0.1234567890123000000,0.1234567890123000000,0.1234567890123400000,0.1234567890123400000 SELECT "count(distinct 38)_test3", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs3; count(distinct 38)_test3 count(distinct d1) count(distinct d2) count(distinct d3) count(distinct 38)_test3 4 5 4 @@ -318,7 +318,7 @@ count(19)_test3 8 8 8 SELECT "min(19)_test3", min(d1),min(d2),min(d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; min(19)_test3 min(d1) min(d2) min(d3) min(19)_test3 -1234567899 -5678.0000000000 -0.1234567890123400000 -SELECT "max(19)_test3", max(d1),max(d2),max(d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; +SELECT "max(19)_test3", max(d1),max(d2),max(d3) FROM cs3; max(19)_test3 max(d1) max(d2) max(d3) max(19)_test3 12345678901 12345678.9012800000 0.1234567890123400000 SELECT "group_concat(38)_test3", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; diff --git a/mysql-test/columnstore/basic/r/mcol_4617.result b/mysql-test/columnstore/basic/r/mcol_4617.result index b63a58c8d..7b9c884c5 100644 --- a/mysql-test/columnstore/basic/r/mcol_4617.result +++ b/mysql-test/columnstore/basic/r/mcol_4617.result @@ -112,7 +112,7 @@ a 1 2 3 -select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select b from cs2); +select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select b from cs2) order by cs1.a, cs2.b, cs2.c; a b c 1 1 100 1 1 101 @@ -120,11 +120,11 @@ a b c 3 3 300 3 3 301 3 3 302 -select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select b from cs2) and cs1.a=1; +select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select b from cs2) and cs1.a=1 order by cs1.a, cs2.b, cs2.c; a b c 1 1 100 1 1 101 -select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select t1.b from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.b=1); +select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select t1.b from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.b=1) order by cs1.a, cs2.b, cs2.c; a b c 1 1 100 1 1 101 @@ -348,21 +348,21 @@ select * from cs1 where (a,d) in (select t1.b,t1.c from cs2 t1 join cs2 t2 on t1 a d 1 100 3 302 -select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select b,c from cs2); +select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select b,c from cs2) order by cs1.a, cs1.d, cs2.b, cs2.c; a d b c 1 100 1 100 1 100 1 101 3 302 3 300 3 302 3 301 3 302 3 302 -select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select b,c from cs2) and cs1.a=1; +select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select b,c from cs2) and cs1.a=1 order by cs1.a, cs1.d, cs2.b, cs2.c; a d b c 1 100 1 100 1 100 1 101 -select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select t1.b,t1.c from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.b=1); +select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select t1.b,t1.c from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.b=1) order by cs1.a, cs1.d, cs2.b, cs2.c; a d b c -1 100 1 101 1 100 1 100 +1 100 1 101 drop table cs1; create table cs1 (a int); insert into cs1 values (1), (2), (3), (4), (null); diff --git a/mysql-test/columnstore/basic/r/mcs31_update_table_negative.result b/mysql-test/columnstore/basic/r/mcs31_update_table_negative.result index e298e4e02..0be609996 100644 --- a/mysql-test/columnstore/basic/r/mcs31_update_table_negative.result +++ b/mysql-test/columnstore/basic/r/mcs31_update_table_negative.result @@ -17,13 +17,13 @@ UPDATE t1 SET a = NULL, b =1; ERROR HY000: Internal error: CAL0002: Update Failed: MCS-4015: Column 'a' cannot be null. UPDATE t1 SET a = ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 -SELECT * FROm t1 ORDER BY a; +SELECT * FROm t1 ORDER BY a, b; a b -1 3 1 1 1 2 +1 3 3 1 3 2 -SELECT * FROm t2 ORDER BY a; +SELECT * FROm t2 ORDER BY a, b; a b DROP DATABASE IF EXISTS mcs31_db1; diff --git a/mysql-test/columnstore/basic/r/mcs34_select_order_by.result b/mysql-test/columnstore/basic/r/mcs34_select_order_by.result index 68e49cfd5..a8232832b 100644 --- a/mysql-test/columnstore/basic/r/mcs34_select_order_by.result +++ b/mysql-test/columnstore/basic/r/mcs34_select_order_by.result @@ -3,6 +3,7 @@ CREATE DATABASE mcs34_db1; USE mcs34_db1; CREATE TABLE t1 ( +id INT, t1_tinyint TINYINT DEFAULT 0, t1_int INT DEFAULT NULL, t1_bigint BIGINT, @@ -14,539 +15,494 @@ t1_char CHAR(1), t1_varchar VARCHAR(255) DEFAULT 'hello world!', t1_datetime DATETIME )ENGINE=Columnstore; -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(203685477580676, -3.797693231E+108, -7.402866E+18, repeat('b',100), repeat('b',100), 'b', '2387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(303685477580676, -4.797693231, -8.402866, repeat('b',101), repeat('b',101), 'b', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) -VALUES(403685477580676, +54.797693231, +8.402866, repeat('2',102), repeat('d',102), 'd', '4387-11-08 11:22:30.123'); -INSERT INTO t1 VALUES(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -SELECT * FROM t1; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_tinyint; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_tinyint ASC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_tinyint DESC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_int; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_int ASC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_int DESC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_bigint; +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) +VALUES(1, 203685477580676, -3.797693231E+108, -7.402866E+18, repeat('b',100), repeat('b',100), 'b', '2387-11-08 11:22:30'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) +VALUES(2, 303685477580676, -4.797693231, -8.402866, repeat('b',101), repeat('b',101), 'b', '3387-11-08 11:22:30'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) +VALUES(3, 403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) +VALUES(4, 403685477580677, +54.797693232, +8.402867, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:31'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) +VALUES(5, 403685477580678, +54.797693233, +8.402868, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:32'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) +VALUES(6, 403685477580679, +54.797693234, +8.402869, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:33'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) +VALUES(7, 403685477580680, +54.797693235, +8.402870, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:34'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) +VALUES(8, 503685477580676, +64.797693231, +9.402866, repeat('2',102), repeat('d',102), 'd', '4387-11-08 11:22:30'); +INSERT INTO t1 VALUES(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1,2,3,4,5,8,9,10, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_bigint ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_bigint DESC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_double; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_double ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 2, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_double DESC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_float; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 2 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_float ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 2 DESC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_float DESC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_blob; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_blob ASC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_blob DESC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_text; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 3, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_text ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 3 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_text DESC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 3 DESC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_char; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_char ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_char DESC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4 DESC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_varchar; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_varchar ASC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_varchar DESC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_datetime; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_datetime ASC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_datetime DESC; -t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 -0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 ORDER BY t1_tinyint, t1_int, t1_bigint; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 5, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_tinyint, t1_int, t1_bigint ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 5 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_tinyint, t1_int, t1_bigint DESC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 5 DESC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime -NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_double, t1_float; +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_double, t1_float ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_double, t1_float DESC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6 DESC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_blob, t1_text, t1_char; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 7, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_blob, t1_text, t1_char ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 7 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 7 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_blob, t1_text, t1_char DESC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 8, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_varchar, t1_datetime; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 8 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 8 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_varchar, t1_datetime ASC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9, id; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -SELECT * FROM t1 ORDER BY t1_varchar, t1_datetime DESC; +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9 ASC, id ASC; t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL -0 NULL 403685477580676 54.797693231 8.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 -0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 10, id; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 10 ASC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 10 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1, 2, 3, id; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1, 2, 3 ASC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1, 2, 3 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4, 5, id; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4, 5 ASC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4, 5 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6, 7, 8, id; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6, 7, 8 ASC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6, 7, 8 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9, 10, id; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9, 10 ASC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 +0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9, 10 DESC, id ASC; +t1_tinyint t1_int t1_bigint t1_double t1_float t1_blob t1_text t1_char t1_varchar t1_datetime +NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL +0 NULL 503685477580676 64.797693231 9.40287 222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d hello world! 4387-11-08 11:22:30 +0 NULL 403685477580680 54.797693235 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:34 +0 NULL 403685477580679 54.797693234 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:33 +0 NULL 403685477580678 54.797693233 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:32 +0 NULL 403685477580677 54.797693232 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:31 +0 NULL 303685477580676 -4.797693231 -8.40287 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 3387-11-08 11:22:30 0 NULL 403685477580676 54.797693231 8.40287 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c hello world! 3387-11-08 11:22:30 0 NULL 203685477580676 -3.797693231e108 -7.40287e18 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb b hello world! 2387-11-08 11:22:30 DROP DATABASE IF EXISTS mcs34_db1; diff --git a/mysql-test/columnstore/basic/r/mcs65_crossengine_order_by.result b/mysql-test/columnstore/basic/r/mcs65_crossengine_order_by.result index 2fdce2a2b..363f154df 100644 --- a/mysql-test/columnstore/basic/r/mcs65_crossengine_order_by.result +++ b/mysql-test/columnstore/basic/r/mcs65_crossengine_order_by.result @@ -8,55 +8,55 @@ CREATE TABLE t1 (t1_int INT, t1_char CHAR(5))ENGINE=Innodb; CREATE TABLE t2 (t2_int INT, t2_char CHAR(5))ENGINE=Columnstore; INSERT INTO t1 VALUES (NULL,NULL),(1,'ddd'),(2,'bbb'),(3,'fffff'),(4,'eee'),(5,'a'),(6,'ccc'),(7,'ggg'); INSERT INTO t2 VALUES (NULL,NULL),(1,'ooo'),(3,'iii'),(5,'hhh'),(7,'nnnnn'),(9,'kkkk'),(11,'mm'),(13,'j'); -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 1; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_int, t2.t2_int, t1.t1_char, t2.t2_char; t1_int t1_char t2_int t2_char 1 ddd 1 ooo 3 fffff 3 iii 5 a 5 hhh 7 ggg 7 nnnnn -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 1 ASC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC, t2.t2_int ASC, t1.t1_char ASC; t1_int t1_char t2_int t2_char 1 ddd 1 ooo 3 fffff 3 iii 5 a 5 hhh 7 ggg 7 nnnnn -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 1 DESC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC, t2.t2_int DESC, t1.t1_char DESC; t1_int t1_char t2_int t2_char 7 ggg 7 nnnnn 5 a 5 hhh 3 fffff 3 iii 1 ddd 1 ooo -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 2; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_char, t1.t1_int, t2.t2_int; t1_int t1_char t2_int t2_char 5 a 5 hhh 1 ddd 1 ooo 3 fffff 3 iii 7 ggg 7 nnnnn -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 2 DESC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC, t1.t1_int DESC, t2.t2_int DESC; t1_int t1_char t2_int t2_char 7 ggg 7 nnnnn 3 fffff 3 iii 1 ddd 1 ooo 5 a 5 hhh -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 3; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t2.t2_int, t1.t1_int, t2.t2_char; t1_int t1_char t2_int t2_char 1 ddd 1 ooo 3 fffff 3 iii 5 a 5 hhh 7 ggg 7 nnnnn -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 3 DESC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC, t1.t1_int DESC, t2.t2_char DESC; t1_int t1_char t2_int t2_char 7 ggg 7 nnnnn 5 a 5 hhh 3 fffff 3 iii 1 ddd 1 ooo -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 4 ASC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC, t2.t2_int, t1.t1_int; t1_int t1_char t2_int t2_char 5 a 5 hhh 3 fffff 3 iii 7 ggg 7 nnnnn 1 ddd 1 ooo -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 4 DESC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC, t2.t2_int DESC, t1.t1_int DESC; t1_int t1_char t2_int t2_char 1 ddd 1 ooo 7 ggg 7 nnnnn @@ -68,7 +68,7 @@ SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 0; ERROR 42S22: Unknown column '0' in 'ORDER BY' SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 5; ERROR 42S22: Unknown column '5' in 'ORDER BY' -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC, t2.t2_int DESC, t1.t1_char DESC; t1_int t1_char t2_int t2_char 7 ggg 7 nnnnn 6 ccc NULL NULL @@ -78,7 +78,7 @@ t1_int t1_char t2_int t2_char 2 bbb NULL NULL 1 ddd 1 ooo NULL NULL NULL NULL -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC, t2.t2_int ASC, t1.t1_char ASC; t1_int t1_char t2_int t2_char NULL NULL NULL NULL 1 ddd 1 ooo @@ -88,7 +88,7 @@ NULL NULL NULL NULL 5 a 5 hhh 6 ccc NULL NULL 7 ggg 7 nnnnn -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC, t1.t1_int DESC, t2.t2_int DESC; t1_int t1_char t2_int t2_char 7 ggg 7 nnnnn 3 fffff 3 iii @@ -98,7 +98,7 @@ t1_int t1_char t2_int t2_char 2 bbb NULL NULL 5 a 5 hhh NULL NULL NULL NULL -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char ASC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char ASC, t1.t1_int ASC, t2.t2_int ASC; t1_int t1_char t2_int t2_char NULL NULL NULL NULL 5 a 5 hhh @@ -108,87 +108,87 @@ NULL NULL NULL NULL 4 eee NULL NULL 3 fffff 3 iii 7 ggg 7 nnnnn -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC, t1.t1_int DESC, t2.t2_char DESC; t1_int t1_char t2_int t2_char 7 ggg 7 nnnnn 5 a 5 hhh 3 fffff 3 iii 1 ddd 1 ooo -2 bbb NULL NULL -4 eee NULL NULL -NULL NULL NULL NULL 6 ccc NULL NULL -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int ASC; +4 eee NULL NULL +2 bbb NULL NULL +NULL NULL NULL NULL +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int ASC, t1.t1_int ASC, t2.t2_char ASC; t1_int t1_char t2_int t2_char NULL NULL NULL NULL -4 eee NULL NULL 2 bbb NULL NULL +4 eee NULL NULL 6 ccc NULL NULL 1 ddd 1 ooo 3 fffff 3 iii 5 a 5 hhh 7 ggg 7 nnnnn -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC, t2.t2_int DESC, t1.t1_int DESC; t1_int t1_char t2_int t2_char 1 ddd 1 ooo 7 ggg 7 nnnnn 3 fffff 3 iii 5 a 5 hhh -2 bbb NULL NULL -4 eee NULL NULL -NULL NULL NULL NULL 6 ccc NULL NULL -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC; +4 eee NULL NULL +2 bbb NULL NULL +NULL NULL NULL NULL +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC, t2.t2_int ASC, t1.t1_int ASC; t1_int t1_char t2_int t2_char NULL NULL NULL NULL -4 eee NULL NULL 2 bbb NULL NULL +4 eee NULL NULL 6 ccc NULL NULL 5 a 5 hhh 3 fffff 3 iii 7 ggg 7 nnnnn 1 ddd 1 ooo -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC, t2.t2_int DESC, t1.t1_char DESC; t1_int t1_char t2_int t2_char 7 ggg 7 nnnnn 5 a 5 hhh 3 fffff 3 iii 1 ddd 1 ooo -NULL NULL 9 kkkk NULL NULL 13 j NULL NULL 11 mm +NULL NULL 9 kkkk NULL NULL NULL NULL -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC, t2.t2_int ASC, t1.t1_char ASC; t1_int t1_char t2_int t2_char -NULL NULL 11 mm NULL NULL NULL NULL NULL NULL 9 kkkk +NULL NULL 11 mm NULL NULL 13 j 1 ddd 1 ooo 3 fffff 3 iii 5 a 5 hhh 7 ggg 7 nnnnn -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC, t1.t1_int DESC, t2.t2_int DESC; t1_int t1_char t2_int t2_char 7 ggg 7 nnnnn 3 fffff 3 iii 1 ddd 1 ooo 5 a 5 hhh -NULL NULL NULL NULL NULL NULL 13 j NULL NULL 11 mm NULL NULL 9 kkkk -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char ASC; +NULL NULL NULL NULL +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char ASC, t1.t1_int ASC, t2.t2_int ASC; t1_int t1_char t2_int t2_char -NULL NULL 11 mm NULL NULL NULL NULL NULL NULL 9 kkkk +NULL NULL 11 mm NULL NULL 13 j 5 a 5 hhh 1 ddd 1 ooo 3 fffff 3 iii 7 ggg 7 nnnnn -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC, t1.t1_int DESC, t2.t2_char DESC; t1_int t1_char t2_int t2_char NULL NULL 13 j NULL NULL 11 mm @@ -198,7 +198,7 @@ NULL NULL 9 kkkk 3 fffff 3 iii 1 ddd 1 ooo NULL NULL NULL NULL -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int ASC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int ASC, t1.t1_int ASC, t2.t2_char ASC; t1_int t1_char t2_int t2_char NULL NULL NULL NULL 1 ddd 1 ooo @@ -208,7 +208,7 @@ NULL NULL NULL NULL NULL NULL 9 kkkk NULL NULL 11 mm NULL NULL 13 j -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC, t2.t2_int DESC, t1.t1_int DESC; t1_int t1_char t2_int t2_char 1 ddd 1 ooo 7 ggg 7 nnnnn @@ -218,7 +218,7 @@ NULL NULL 13 j 3 fffff 3 iii 5 a 5 hhh NULL NULL NULL NULL -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC, t2.t2_int ASC, t1.t1_int ASC; t1_int t1_char t2_int t2_char NULL NULL NULL NULL 5 a 5 hhh diff --git a/mysql-test/columnstore/basic/r/mcs85_derived_table.result b/mysql-test/columnstore/basic/r/mcs85_derived_table.result index 2c9cb12cd..16e2d3a24 100644 --- a/mysql-test/columnstore/basic/r/mcs85_derived_table.result +++ b/mysql-test/columnstore/basic/r/mcs85_derived_table.result @@ -8,47 +8,47 @@ CREATE TABLE t1 (a INT, b CHAR(5))ENGINE=Columnstore; CREATE TABLE t2 (a INT, b CHAR(5))ENGINE=Columnstore; INSERT INTO t1 VALUES (NULL, ''),(1, 'aaa'),(2, 'aaa'),(3, 'ccc'),(4, 'ddd'),(5, 'aaa'),(6, ''),(7, 'eee'); INSERT INTO t2 VALUES (NULL, ''),(1, 'eee'),(3, 'ccc'),(5, 'jjj'),(6, ''),(7, 'ccc'),(9, 'eee'),(11, 'nnn'); -SELECT t1.a,t3.y FROM t1,(SELECT a AS y FROM t2 WHERE b='ccc') AS t3 WHERE t1.a = t3.y; +SELECT t1.a,t3.y FROM t1,(SELECT a AS y FROM t2 WHERE b='ccc') AS t3 WHERE t1.a = t3.y ORDER BY t1.a, t3.y; a y 3 3 7 7 -SELECT t1.a,t3.a FROM t1,(SELECT * FROM t2 WHERE b='ccc') t3 WHERE t1.a = t3.a; +SELECT t1.a,t3.a FROM t1,(SELECT * FROM t2 WHERE b='ccc') t3 WHERE t1.a = t3.a ORDER BY t1.a, t3.a; a a 3 3 7 7 -SELECT t1.a,t3.a FROM t1 JOIN (SELECT * FROM t2 WHERE b='ccc') t3 ON t1.a = t3.a ORDER BY t1.a; +SELECT t1.a,t3.a FROM t1 JOIN (SELECT * FROM t2 WHERE b='ccc') t3 ON t1.a = t3.a ORDER BY t1.a, t3.a; a a 3 3 7 7 -SELECT t1.a,t3.a FROM t1 LEFT JOIN (SELECT * FROM t2) t3 ON t1.a = t3.a ORDER BY t3.a; +SELECT t1.a,t3.a FROM t1 LEFT JOIN (SELECT * FROM t2) t3 ON t1.a = t3.a ORDER BY t3.a, t1.a; a a -2 NULL NULL NULL +2 NULL 4 NULL 1 1 3 3 5 5 6 6 7 7 -SELECT t1.a,t3.a FROM t1 RIGHT JOIN (SELECT * FROM t2) t3 ON t1.a = t3.a ORDER BY 1; +SELECT t1.a,t3.a FROM t1 RIGHT JOIN (SELECT * FROM t2) t3 ON t1.a = t3.a ORDER BY t3.a, t1.a; a a NULL NULL -NULL 9 -NULL 11 1 1 3 3 5 5 6 6 7 7 +NULL 9 +NULL 11 CREATE TABLE t3 (a INT, b CHAR(5))ENGINE=Innodb; CREATE TABLE t4 (a INT, b CHAR(5))ENGINE=Myisam; INSERT INTO t3 SELECT * FROM t2; INSERT INTO t4 SELECT * FROM t1; -SELECT t3.a, t.a FROM t3 JOIN (SELECT * FROM t2 WHERE b='ccc') t ON t.a = t3.a ORDER BY t.a; +SELECT t3.a, t.a FROM t3 JOIN (SELECT * FROM t2 WHERE b='ccc') t ON t.a = t3.a ORDER BY t.a, t3.a; a a 3 3 7 7 -SELECT t3.a, t.a FROM t3 LEFT JOIN (SELECT * FROM t2) t ON t.a = t3.a ORDER BY t3.a; +SELECT t3.a, t.a FROM t3 LEFT JOIN (SELECT * FROM t2) t ON t.a = t3.a ORDER BY t3.a, t.a; a a NULL NULL 1 1 @@ -58,7 +58,7 @@ NULL NULL 7 7 9 9 11 11 -SELECT t3.a, t.a FROM t3 RIGHT JOIN (SELECT * FROM t2) t ON t.a = t3.a ORDER BY 1; +SELECT t3.a, t.a FROM t3 RIGHT JOIN (SELECT * FROM t2) t ON t.a = t3.a ORDER BY t.a, t3.a; a a NULL NULL 1 1 @@ -68,11 +68,11 @@ NULL NULL 7 7 9 9 11 11 -SELECT t4.a, t.a FROM t4 JOIN (SELECT * FROM t2 WHERE b='ccc') t ON t.a = t4.a ORDER BY t.a; +SELECT t4.a, t.a FROM t4 JOIN (SELECT * FROM t2 WHERE b='ccc') t ON t.a = t4.a ORDER BY t.a, t4.a; a a 3 3 7 7 -SELECT t4.a, t.a FROM t4 LEFT JOIN (SELECT * FROM t2) t ON t.a = t4.a ORDER BY t4.a; +SELECT t4.a, t.a FROM t4 LEFT JOIN (SELECT * FROM t2) t ON t.a = t4.a ORDER BY t4.a, t.a; a a NULL NULL 1 1 @@ -82,7 +82,7 @@ NULL NULL 5 5 6 6 7 7 -SELECT t4.a, t.a FROM t4 RIGHT JOIN (SELECT * FROM t2) t ON t.a = t4.a ORDER BY 2; +SELECT t4.a, t.a FROM t4 RIGHT JOIN (SELECT * FROM t2) t ON t.a = t4.a ORDER BY t.a, t4.a; a a NULL NULL 1 1 diff --git a/mysql-test/columnstore/basic/r/mcs97_group_concat.result b/mysql-test/columnstore/basic/r/mcs97_group_concat.result index cf80e82d9..f96305e08 100644 --- a/mysql-test/columnstore/basic/r/mcs97_group_concat.result +++ b/mysql-test/columnstore/basic/r/mcs97_group_concat.result @@ -3,21 +3,21 @@ CREATE DATABASE mcs97_db; USE mcs97_db; CREATE TABLE t1 (a INT, b CHAR(5))ENGINE=Columnstore; INSERT INTO t1 VALUES (NULL, NULL),(1, 'aaa'),(2, 'aaa'),(3, 'ccc'),(4, 'ddd'),(5, 'aaa'),(6, 'ddd'),(7, 'eee'); -SELECT GROUP_CONCAT(a) FROM t1; -GROUP_CONCAT(a) +SELECT GROUP_CONCAT(a ORDER BY a) FROM t1; +GROUP_CONCAT(a ORDER BY a) 1,2,3,4,5,6,7 -SELECT GROUP_CONCAT(a SEPARATOR ';') FROM t1 ORDER BY a DESC; -GROUP_CONCAT(a SEPARATOR ';') -1;2;3;4;5;6;7 SELECT GROUP_CONCAT(a ORDER BY a DESC SEPARATOR ';') FROM t1; GROUP_CONCAT(a ORDER BY a DESC SEPARATOR ';') 7;6;5;4;3;2;1 -SELECT GROUP_CONCAT(b) FROM t1; -GROUP_CONCAT(b) -aaa,aaa,ccc,ddd,aaa,ddd,eee -SELECT GROUP_CONCAT(DISTINCT b SEPARATOR ';') FROM t1 ORDER BY b ASC; -GROUP_CONCAT(DISTINCT b SEPARATOR ';') -eee;ccc;ddd;aaa +SELECT GROUP_CONCAT(a ORDER BY a DESC SEPARATOR ';') FROM t1; +GROUP_CONCAT(a ORDER BY a DESC SEPARATOR ';') +7;6;5;4;3;2;1 +SELECT GROUP_CONCAT(b ORDER BY b) FROM t1; +GROUP_CONCAT(b ORDER BY b) +aaa,aaa,aaa,ccc,ddd,ddd,eee +SELECT GROUP_CONCAT(DISTINCT b ORDER BY b ASC SEPARATOR ';') FROM t1; +GROUP_CONCAT(DISTINCT b ORDER BY b ASC SEPARATOR ';') +aaa;ccc;ddd;eee SELECT GROUP_CONCAT(b ORDER BY b DESC SEPARATOR ';') FROM t1; GROUP_CONCAT(b ORDER BY b DESC SEPARATOR ';') eee;ddd;ddd;ccc;aaa;aaa;aaa diff --git a/mysql-test/columnstore/basic/t/func_jsonarrayagg.test b/mysql-test/columnstore/basic/t/func_jsonarrayagg.test index 24c660226..d12f9f79b 100644 --- a/mysql-test/columnstore/basic/t/func_jsonarrayagg.test +++ b/mysql-test/columnstore/basic/t/func_jsonarrayagg.test @@ -75,13 +75,13 @@ SELECT JSON_ARRAYAGG(b LIMIT 1) FROM t1 GROUP BY b; sorted_result; SELECT JSON_ARRAYAGG(b LIMIT 2) FROM t1 GROUP BY a; sorted_result; -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; sorted_result; -SELECT JSON_ARRAYAGG(DISTINCT b) FROM t1; +SELECT JSON_ARRAYAGG(DISTINCT b ORDER BY b ASC) FROM t1; sorted_result; -SELECT JSON_ARRAYAGG(DISTINCT a LIMIT 2) FROM t1; +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC LIMIT 2) FROM t1; sorted_result; -SELECT JSON_ARRAYAGG(DISTINCT b LIMIT 2) FROM t1; +SELECT JSON_ARRAYAGG(DISTINCT b ORDER BY b ASC LIMIT 2) FROM t1; -- echo # -- echo # JSON aggregation @@ -156,14 +156,14 @@ INSERT INTO t1 VALUES (1,1), (2,2), (3,3); sorted_result; SELECT JSON_ARRAYAGG(a) FROM t1; sorted_result; -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; INSERT INTO t1 VALUES (NULL,NULL), (NULL,NULL); sorted_result; SELECT JSON_ARRAYAGG(a) FROM t1; sorted_result; -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; DROP TABLE t1; CREATE TABLE t1(a VARCHAR(10), b INT)ENGINE=COLUMNSTORE; @@ -173,13 +173,13 @@ INSERT INTO t1 VALUES (1,1), (2,2), (3,3); sorted_result; SELECT JSON_ARRAYAGG(a) FROM t1; sorted_result; -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; INSERT INTO t1 VALUES (NULL,NULL), (NULL,NULL); sorted_result; SELECT JSON_ARRAYAGG(a) FROM t1; sorted_result; -SELECT JSON_ARRAYAGG(DISTINCT a) FROM t1; +SELECT JSON_ARRAYAGG(DISTINCT a ORDER BY a ASC) FROM t1; DROP TABLE t1; diff --git a/mysql-test/columnstore/basic/t/mcol641-aggregate.test b/mysql-test/columnstore/basic/t/mcol641-aggregate.test index 642287152..0a0479b3c 100644 --- a/mysql-test/columnstore/basic/t/mcol641-aggregate.test +++ b/mysql-test/columnstore/basic/t/mcol641-aggregate.test @@ -22,7 +22,7 @@ CREATE TABLE cs4 (d1 DECIMAL(19) UNSIGNED, d2 DECIMAL(19,10) UNSIGNED, d3 DECIMA CREATE TABLE cs5(d DECIMAL(25,19)) ENGINE=columnstore; INSERT INTO cs1 VALUES - (1234,5678,-0.12345678901234567890123456789018,2,1,1), + (1234,5678,-0.12345678901234567890123456789018,2,1,1), (1234,-5678,0.1234567890123456789012345,2,1,1), (12345678901234567890123,1234567890123456789012.9012345678,0.123456789012345678901234567890,2,1,1), (NULL,NULL,NULL,2,1,1), @@ -34,9 +34,9 @@ INSERT INTO cs1 VALUES (0,0,0,3,2,2), (1234,5678,-0.12345678901234567890123456789018,11111111111111111111111111111111,1,1), (1234,5678,-0.12345678901234567890123456789018,11111111111111111111111111111111,1,1), - (1234,5678,-0.12345678901234567890123456789018,11111111111111111111111111111112,1,1); + (1234,5678,-0.12345678901234567890123456789018,11111111111111111111111111111112,1,1); INSERT INTO cs2 VALUES - (1234,5678,0.12345678901234567890123456789018,2,1,1), + (1234,5678,0.12345678901234567890123456789018,2,1,1), (1234,5678,0.1234567890123456789012345,2,1,1), (12345678901234567890123,1234567890123456789012.9012345678,0.123456789012345678901234567890,2,1,1), (NULL,NULL,NULL,2,1,1), @@ -48,9 +48,9 @@ INSERT INTO cs2 VALUES (0,0,0,3,2,2), (1234,5678,0.12345678901234567890123456789018,11111111111111111111111111111111,1,1), (1234,5678,0.12345678901234567890123456789018,11111111111111111111111111111111,1,1), - (1234,5678,0.12345678901234567890123456789018,11111111111111111111111111111112,1,1); + (1234,5678,0.12345678901234567890123456789018,11111111111111111111111111111112,1,1); INSERT INTO cs3 VALUES - (1234,5678,-0.12345678901234,2,1,1), + (1234,5678,-0.12345678901234,2,1,1), (1234,-5678,0.12345678901234,2,1,1), (12345678901,12345678.90128,0.1234567890123,2,1,1), (NULL,NULL,NULL,2,1,1), @@ -61,7 +61,7 @@ INSERT INTO cs3 VALUES (NULL,NULL,NULL,3,2,2), (0,0,0,3,2,2); INSERT INTO cs4 VALUES - (1234,5678,0.12345678901234,2,1,1), + (1234,5678,0.12345678901234,2,1,1), (1234,5678,0.12345678901234,2,1,1), (12345678901,12345678.90128,0.1234567890123,2,1,1), (NULL,NULL,NULL,2,1,1), @@ -112,7 +112,7 @@ SELECT "avg(38)_test2", avg(d1),avg(d2),avg(d3) FROM cs2; SELECT "count(38)_test2", count(d1),count(d2),count(d3) FROM cs2; SELECT "min(38)_test2", min(d1),min(d2),min(d3) FROM cs2; SELECT "max(38)_test2", max(d1),max(d2),max(d3) FROM cs2; -SELECT "group_concat(38)_test2", group_concat(d1),group_concat(d2),group_concat(d3) FROM cs2; +SELECT "group_concat(38)_test2", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM cs2; SELECT "count(distinct 38)_test2", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs2; #no GROUP BY UDECIMAL(38) UM 1phase aggregates SELECT "sum(38)_test2", sum(d1),sum(d2),sum(d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; @@ -120,7 +120,7 @@ SELECT "avg(38)_test2", avg(d1),avg(d2),avg(d3) FROM (SELECT d1,d2,d3 FROM cs2)a SELECT "count(38)_test2", count(d1),count(d2),count(d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; SELECT "min(38)_test2", min(d1),min(d2),min(d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; SELECT "max(38)_test2", max(d1),max(d2),max(d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; -SELECT "group_concat(38)_test2", group_concat(d1),group_concat(d2),group_concat(d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; +SELECT "group_concat(38)_test2", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; SELECT "count(distinct 38)_test2", count(distinct d1),count(distinct d2),count(distinct d3) FROM (SELECT d1,d2,d3 FROM cs2)a1; #GROUP BY DECIMAL(38) SELECT "sum(38)_GB(38)_test2" ,d4,d5,sum(d1),sum(d2),sum(d3) FROM cs2 GROUP BY d4,d5 ORDER BY 2,3; @@ -136,7 +136,7 @@ SELECT "avg(38)_GB(8)_test2" ,i1,avg(d1),avg(d2),avg(d3) FROM cs2 GROUP BY i1 OR SELECT "count(38)_GB(8)_test2" ,i1,count(d1),count(d2),count(d3) FROM cs2 GROUP BY i1 ORDER BY 2,3; SELECT "min(38)_GB(8)_test2" ,i1,min(d1),min(d2),min(d3) FROM cs2 GROUP BY i1 ORDER BY 2,3; SELECT "max(38)_GB(8)_test2" ,i1,max(d1),max(d2),max(d3) FROM cs2 GROUP BY i1 ORDER BY 2,3; -SELECT "group_concat(38)_GB(8)_test2", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d1),group_concat(d3 ORDER BY d1) FROM cs2 GROUP BY i1 ORDER BY 2,3; +SELECT "group_concat(38)_GB(8)_test2", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM cs2 GROUP BY i1 ORDER BY 2,3; SELECT "count(distinct 38)_GB(8)_test2", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs2 GROUP BY i1 ORDER BY 2,3; #no GROUP BY DECIMAL(19) @@ -145,14 +145,14 @@ SELECT "avg(19)_test3", avg(d1),avg(d2),avg(d3) FROM cs3; SELECT "count(19)_test3", count(d1),count(d2),count(d3) FROM cs3; SELECT "min(19)_test3", min(d1),min(d2),min(d3) FROM cs3; SELECT "max(19)_test3", max(d1),max(d2),max(d3) FROM cs3; -SELECT "group_concat(38)_test3", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d1),group_concat(d3 ORDER BY d1) FROM cs3; +SELECT "group_concat(38)_test3", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM cs3; SELECT "count(distinct 38)_test3", count(distinct d1),count(distinct d2),count(distinct d3) FROM cs3; #no GROUP BY DECIMAL(19) UM 1phase aggregates SELECT "sum(19)_test3", sum(d1),sum(d2),sum(d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; SELECT "avg(19)_test3", avg(d1),avg(d2),avg(d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; SELECT "count(19)_test3", count(d1),count(d2),count(d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; SELECT "min(19)_test3", min(d1),min(d2),min(d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; -SELECT "max(19)_test3", max(d1),max(d2),max(d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; +SELECT "max(19)_test3", max(d1),max(d2),max(d3) FROM cs3; SELECT "group_concat(38)_test3", group_concat(d1 ORDER BY d1),group_concat(d2 ORDER BY d2),group_concat(d3 ORDER BY d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; SELECT "count(distinct 38)_test3", count(distinct d1),count(distinct d2),count(distinct d3) FROM (SELECT d1,d2,d3 FROM cs3)a1; #GROUP BY DECIMAL(38) @@ -214,7 +214,7 @@ SELECT avg(d) FROM cs5; UPDATE cs5 SET d=-d; SELECT avg(d) FROM cs5; -#Add HAVING with GB +#Add HAVING with GB DROP TABLE cs1; DROP TABLE cs2; diff --git a/mysql-test/columnstore/basic/t/mcol_4617.test b/mysql-test/columnstore/basic/t/mcol_4617.test index 39a102125..9270d3a7b 100644 --- a/mysql-test/columnstore/basic/t/mcol_4617.test +++ b/mysql-test/columnstore/basic/t/mcol_4617.test @@ -69,13 +69,11 @@ select * from cs1 where a in (select t1.b from cs2 t1, cs2 t2 where t1.b=t2.b an select * from cs1 where a in (select t1.b from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.c=t2.c); ### Outer query containing joins ---sorted_result -select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select b from cs2); -select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select b from cs2) and cs1.a=1; +select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select b from cs2) order by cs1.a, cs2.b, cs2.c; +select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select b from cs2) and cs1.a=1 order by cs1.a, cs2.b, cs2.c; ### Both IN subquery and outer queries containing joins ---sorted_result -select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select t1.b from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.b=1); +select * from cs1 join cs2 on cs1.a=cs2.b and cs1.a in (select t1.b from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.b=1) order by cs1.a, cs2.b, cs2.c; ## NOT IN subquery ### Basic tests @@ -217,13 +215,11 @@ select * from cs1 where (a,d) in (select t1.b,t1.c from cs2 t1, cs2 t2 where t1. select * from cs1 where (a,d) in (select t1.b,t1.c from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.c=t2.c); ### Outer query containing joins ---sorted_result -select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select b,c from cs2); ---sorted_result -select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select b,c from cs2) and cs1.a=1; +select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select b,c from cs2) order by cs1.a, cs1.d, cs2.b, cs2.c; +select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select b,c from cs2) and cs1.a=1 order by cs1.a, cs1.d, cs2.b, cs2.c; ### Both IN subquery and outer queries containing joins -select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select t1.b,t1.c from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.b=1); +select * from cs1 join cs2 on cs1.a=cs2.b and (cs1.a,cs1.d) in (select t1.b,t1.c from cs2 t1 join cs2 t2 on t1.b=t2.b and t1.b=1) order by cs1.a, cs1.d, cs2.b, cs2.c; # Prepared statement tests drop table cs1; diff --git a/mysql-test/columnstore/basic/t/mcs31_update_table_negative.test b/mysql-test/columnstore/basic/t/mcs31_update_table_negative.test index fac5a09b4..55d7a508d 100644 --- a/mysql-test/columnstore/basic/t/mcs31_update_table_negative.test +++ b/mysql-test/columnstore/basic/t/mcs31_update_table_negative.test @@ -36,8 +36,8 @@ UPDATE t1 SET a = NULL, b =1; --error 1064 UPDATE t1 SET a = ; -SELECT * FROm t1 ORDER BY a; -SELECT * FROm t2 ORDER BY a; +SELECT * FROm t1 ORDER BY a, b; +SELECT * FROm t2 ORDER BY a, b; # Clean up --disable_warnings diff --git a/mysql-test/columnstore/basic/t/mcs34_select_order_by.test b/mysql-test/columnstore/basic/t/mcs34_select_order_by.test index 313451632..21b37b8af 100644 --- a/mysql-test/columnstore/basic/t/mcs34_select_order_by.test +++ b/mysql-test/columnstore/basic/t/mcs34_select_order_by.test @@ -15,6 +15,7 @@ USE mcs34_db1; #Test with mixed datatypes CREATE TABLE t1 ( + id INT, t1_tinyint TINYINT DEFAULT 0, t1_int INT DEFAULT NULL, t1_bigint BIGINT, @@ -27,85 +28,83 @@ CREATE TABLE t1 t1_datetime DATETIME )ENGINE=Columnstore; -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(203685477580676, -3.797693231E+108, -7.402866E+18, repeat('b',100), repeat('b',100), 'b', '2387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(303685477580676, -4.797693231, -8.402866, repeat('b',101), repeat('b',101), 'b', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30.123'); -INSERT INTO t1 (t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) - VALUES(403685477580676, +54.797693231, +8.402866, repeat('2',102), repeat('d',102), 'd', '4387-11-08 11:22:30.123'); -INSERT INTO t1 VALUES(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) + VALUES(1, 203685477580676, -3.797693231E+108, -7.402866E+18, repeat('b',100), repeat('b',100), 'b', '2387-11-08 11:22:30'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) + VALUES(2, 303685477580676, -4.797693231, -8.402866, repeat('b',101), repeat('b',101), 'b', '3387-11-08 11:22:30'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) + VALUES(3, 403685477580676, +54.797693231, +8.402866, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:30'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) + VALUES(4, 403685477580677, +54.797693232, +8.402867, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:31'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) + VALUES(5, 403685477580678, +54.797693233, +8.402868, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:32'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) + VALUES(6, 403685477580679, +54.797693234, +8.402869, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:33'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) + VALUES(7, 403685477580680, +54.797693235, +8.402870, repeat('c',101), repeat('c',101), 'c', '3387-11-08 11:22:34'); +INSERT INTO t1 (id, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_datetime) + VALUES(8, 503685477580676, +64.797693231, +9.402866, repeat('2',102), repeat('d',102), 'd', '4387-11-08 11:22:30'); +INSERT INTO t1 VALUES(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -SELECT * FROM t1; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1,2,3,4,5,8,9,10, id; -SELECT * FROM t1 ORDER BY t1_tinyint; -SELECT * FROM t1 ORDER BY t1_tinyint ASC; -SELECT * FROM t1 ORDER BY t1_tinyint DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_int; -SELECT * FROM t1 ORDER BY t1_int ASC; -SELECT * FROM t1 ORDER BY t1_int DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 2, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 2 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 2 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_bigint; -SELECT * FROM t1 ORDER BY t1_bigint ASC; -SELECT * FROM t1 ORDER BY t1_bigint DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 3, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 3 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 3 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_double; -SELECT * FROM t1 ORDER BY t1_double ASC; -SELECT * FROM t1 ORDER BY t1_double DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_float; -SELECT * FROM t1 ORDER BY t1_float ASC; -SELECT * FROM t1 ORDER BY t1_float DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 5, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 5 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 5 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_blob; -SELECT * FROM t1 ORDER BY t1_blob ASC; -SELECT * FROM t1 ORDER BY t1_blob DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_text; -SELECT * FROM t1 ORDER BY t1_text ASC; -SELECT * FROM t1 ORDER BY t1_text DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 7, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 7 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 7 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_char; -SELECT * FROM t1 ORDER BY t1_char ASC; -SELECT * FROM t1 ORDER BY t1_char DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 8, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 8 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 8 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_varchar; -SELECT * FROM t1 ORDER BY t1_varchar ASC; -SELECT * FROM t1 ORDER BY t1_varchar DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_datetime; -SELECT * FROM t1 ORDER BY t1_datetime ASC; -SELECT * FROM t1 ORDER BY t1_datetime DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 10, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 10 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 10 DESC, id ASC; #ORDER BY multiple columns -SELECT * FROM t1 ORDER BY t1_tinyint, t1_int, t1_bigint; -SELECT * FROM t1 ORDER BY t1_tinyint, t1_int, t1_bigint ASC; -SELECT * FROM t1 ORDER BY t1_tinyint, t1_int, t1_bigint DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1, 2, 3, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1, 2, 3 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 1, 2, 3 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_double, t1_float; -SELECT * FROM t1 ORDER BY t1_double, t1_float ASC; -SELECT * FROM t1 ORDER BY t1_double, t1_float DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4, 5, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4, 5 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 4, 5 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_blob, t1_text, t1_char; -SELECT * FROM t1 ORDER BY t1_blob, t1_text, t1_char ASC; -SELECT * FROM t1 ORDER BY t1_blob, t1_text, t1_char DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6, 7, 8, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6, 7, 8 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 6, 7, 8 DESC, id ASC; -SELECT * FROM t1 ORDER BY t1_varchar, t1_datetime; -SELECT * FROM t1 ORDER BY t1_varchar, t1_datetime ASC; -SELECT * FROM t1 ORDER BY t1_varchar, t1_datetime DESC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9, 10, id; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9, 10 ASC, id ASC; +SELECT t1_tinyint, t1_int, t1_bigint, t1_double, t1_float, t1_blob, t1_text, t1_char, t1_varchar, t1_datetime FROM t1 ORDER BY 9, 10 DESC, id ASC; #Clean up -DROP DATABASE IF EXISTS mcs34_db1; +DROP DATABASE IF EXISTS mcs34_db1; \ No newline at end of file diff --git a/mysql-test/columnstore/basic/t/mcs65_crossengine_order_by.test b/mysql-test/columnstore/basic/t/mcs65_crossengine_order_by.test index 7aebe0fd2..fc2ce6f09 100644 --- a/mysql-test/columnstore/basic/t/mcs65_crossengine_order_by.test +++ b/mysql-test/columnstore/basic/t/mcs65_crossengine_order_by.test @@ -41,15 +41,15 @@ CREATE TABLE t2 (t2_int INT, t2_char CHAR(5))ENGINE=Columnstore; INSERT INTO t1 VALUES (NULL,NULL),(1,'ddd'),(2,'bbb'),(3,'fffff'),(4,'eee'),(5,'a'),(6,'ccc'),(7,'ggg'); INSERT INTO t2 VALUES (NULL,NULL),(1,'ooo'),(3,'iii'),(5,'hhh'),(7,'nnnnn'),(9,'kkkk'),(11,'mm'),(13,'j'); -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 1; -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 1 ASC; -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 1 DESC; -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 2; -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 2 DESC; -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 3; -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 3 DESC; -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 4 ASC; -SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 4 DESC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_int, t2.t2_int, t1.t1_char, t2.t2_char; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC, t2.t2_int ASC, t1.t1_char ASC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC, t2.t2_int DESC, t1.t1_char DESC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_char, t1.t1_int, t2.t2_int; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC, t1.t1_int DESC, t2.t2_int DESC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t2.t2_int, t1.t1_int, t2.t2_char; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC, t1.t1_int DESC, t2.t2_char DESC; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC, t2.t2_int, t1.t1_int; +SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC, t2.t2_int DESC, t1.t1_int DESC; --error ER_BAD_FIELD_ERROR SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY -1; --error ER_BAD_FIELD_ERROR @@ -57,23 +57,23 @@ SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 0; --error ER_BAD_FIELD_ERROR SELECT * FROM t1, t2 WHERE t1.t1_int = t2.t2_int ORDER BY 5; -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC; -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC; -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC; -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char ASC; -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC; -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int ASC; -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC; -SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC, t2.t2_int DESC, t1.t1_char DESC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC, t2.t2_int ASC, t1.t1_char ASC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC, t1.t1_int DESC, t2.t2_int DESC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char ASC, t1.t1_int ASC, t2.t2_int ASC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC, t1.t1_int DESC, t2.t2_char DESC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int ASC, t1.t1_int ASC, t2.t2_char ASC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC, t2.t2_int DESC, t1.t1_int DESC; +SELECT * FROM t1 LEFT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC, t2.t2_int ASC, t1.t1_int ASC; -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC; -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC; -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC; -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char ASC; -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC; -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int ASC; -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC; -SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int DESC, t2.t2_int DESC, t1.t1_char DESC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_int ASC, t2.t2_int ASC, t1.t1_char ASC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char DESC, t1.t1_int DESC, t2.t2_int DESC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t1.t1_char ASC, t1.t1_int ASC, t2.t2_int ASC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int DESC, t1.t1_int DESC, t2.t2_char DESC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_int ASC, t1.t1_int ASC, t2.t2_char ASC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char DESC, t2.t2_int DESC, t1.t1_int DESC; +SELECT * FROM t1 RIGHT JOIN t2 ON t1.t1_int = t2.t2_int ORDER BY t2.t2_char ASC, t2.t2_int ASC, t1.t1_int ASC; # Clean UP DROP USER 'cejuser'@'localhost'; diff --git a/mysql-test/columnstore/basic/t/mcs85_derived_table.test b/mysql-test/columnstore/basic/t/mcs85_derived_table.test index 1ffc8a4fb..5c4a0dafe 100644 --- a/mysql-test/columnstore/basic/t/mcs85_derived_table.test +++ b/mysql-test/columnstore/basic/t/mcs85_derived_table.test @@ -41,11 +41,11 @@ CREATE TABLE t2 (a INT, b CHAR(5))ENGINE=Columnstore; INSERT INTO t1 VALUES (NULL, ''),(1, 'aaa'),(2, 'aaa'),(3, 'ccc'),(4, 'ddd'),(5, 'aaa'),(6, ''),(7, 'eee'); INSERT INTO t2 VALUES (NULL, ''),(1, 'eee'),(3, 'ccc'),(5, 'jjj'),(6, ''),(7, 'ccc'),(9, 'eee'),(11, 'nnn'); -SELECT t1.a,t3.y FROM t1,(SELECT a AS y FROM t2 WHERE b='ccc') AS t3 WHERE t1.a = t3.y; -SELECT t1.a,t3.a FROM t1,(SELECT * FROM t2 WHERE b='ccc') t3 WHERE t1.a = t3.a; -SELECT t1.a,t3.a FROM t1 JOIN (SELECT * FROM t2 WHERE b='ccc') t3 ON t1.a = t3.a ORDER BY t1.a; -SELECT t1.a,t3.a FROM t1 LEFT JOIN (SELECT * FROM t2) t3 ON t1.a = t3.a ORDER BY t3.a; -SELECT t1.a,t3.a FROM t1 RIGHT JOIN (SELECT * FROM t2) t3 ON t1.a = t3.a ORDER BY 1; +SELECT t1.a,t3.y FROM t1,(SELECT a AS y FROM t2 WHERE b='ccc') AS t3 WHERE t1.a = t3.y ORDER BY t1.a, t3.y; +SELECT t1.a,t3.a FROM t1,(SELECT * FROM t2 WHERE b='ccc') t3 WHERE t1.a = t3.a ORDER BY t1.a, t3.a; +SELECT t1.a,t3.a FROM t1 JOIN (SELECT * FROM t2 WHERE b='ccc') t3 ON t1.a = t3.a ORDER BY t1.a, t3.a; +SELECT t1.a,t3.a FROM t1 LEFT JOIN (SELECT * FROM t2) t3 ON t1.a = t3.a ORDER BY t3.a, t1.a; +SELECT t1.a,t3.a FROM t1 RIGHT JOIN (SELECT * FROM t2) t3 ON t1.a = t3.a ORDER BY t3.a, t1.a; # cross engine CREATE TABLE t3 (a INT, b CHAR(5))ENGINE=Innodb; @@ -53,12 +53,12 @@ CREATE TABLE t4 (a INT, b CHAR(5))ENGINE=Myisam; INSERT INTO t3 SELECT * FROM t2; INSERT INTO t4 SELECT * FROM t1; -SELECT t3.a, t.a FROM t3 JOIN (SELECT * FROM t2 WHERE b='ccc') t ON t.a = t3.a ORDER BY t.a; -SELECT t3.a, t.a FROM t3 LEFT JOIN (SELECT * FROM t2) t ON t.a = t3.a ORDER BY t3.a; -SELECT t3.a, t.a FROM t3 RIGHT JOIN (SELECT * FROM t2) t ON t.a = t3.a ORDER BY 1; -SELECT t4.a, t.a FROM t4 JOIN (SELECT * FROM t2 WHERE b='ccc') t ON t.a = t4.a ORDER BY t.a; -SELECT t4.a, t.a FROM t4 LEFT JOIN (SELECT * FROM t2) t ON t.a = t4.a ORDER BY t4.a; -SELECT t4.a, t.a FROM t4 RIGHT JOIN (SELECT * FROM t2) t ON t.a = t4.a ORDER BY 2; +SELECT t3.a, t.a FROM t3 JOIN (SELECT * FROM t2 WHERE b='ccc') t ON t.a = t3.a ORDER BY t.a, t3.a; +SELECT t3.a, t.a FROM t3 LEFT JOIN (SELECT * FROM t2) t ON t.a = t3.a ORDER BY t3.a, t.a; +SELECT t3.a, t.a FROM t3 RIGHT JOIN (SELECT * FROM t2) t ON t.a = t3.a ORDER BY t.a, t3.a; +SELECT t4.a, t.a FROM t4 JOIN (SELECT * FROM t2 WHERE b='ccc') t ON t.a = t4.a ORDER BY t.a, t4.a; +SELECT t4.a, t.a FROM t4 LEFT JOIN (SELECT * FROM t2) t ON t.a = t4.a ORDER BY t4.a, t.a; +SELECT t4.a, t.a FROM t4 RIGHT JOIN (SELECT * FROM t2) t ON t.a = t4.a ORDER BY t.a, t4.a; # Clean UP DROP USER 'cejuser'@'localhost'; diff --git a/mysql-test/columnstore/basic/t/mcs97_group_concat.test b/mysql-test/columnstore/basic/t/mcs97_group_concat.test index 2c3697f93..e1a077ee0 100644 --- a/mysql-test/columnstore/basic/t/mcs97_group_concat.test +++ b/mysql-test/columnstore/basic/t/mcs97_group_concat.test @@ -14,11 +14,11 @@ USE mcs97_db; CREATE TABLE t1 (a INT, b CHAR(5))ENGINE=Columnstore; INSERT INTO t1 VALUES (NULL, NULL),(1, 'aaa'),(2, 'aaa'),(3, 'ccc'),(4, 'ddd'),(5, 'aaa'),(6, 'ddd'),(7, 'eee'); -SELECT GROUP_CONCAT(a) FROM t1; -SELECT GROUP_CONCAT(a SEPARATOR ';') FROM t1 ORDER BY a DESC; +SELECT GROUP_CONCAT(a ORDER BY a) FROM t1; SELECT GROUP_CONCAT(a ORDER BY a DESC SEPARATOR ';') FROM t1; -SELECT GROUP_CONCAT(b) FROM t1; -SELECT GROUP_CONCAT(DISTINCT b SEPARATOR ';') FROM t1 ORDER BY b ASC; +SELECT GROUP_CONCAT(a ORDER BY a DESC SEPARATOR ';') FROM t1; +SELECT GROUP_CONCAT(b ORDER BY b) FROM t1; +SELECT GROUP_CONCAT(DISTINCT b ORDER BY b ASC SEPARATOR ';') FROM t1; SELECT GROUP_CONCAT(b ORDER BY b DESC SEPARATOR ';') FROM t1; # Clean UP From 3a316181e7109a5698240bd599272952101c38e4 Mon Sep 17 00:00:00 2001 From: Aleksei Antipovskii Date: Tue, 26 Aug 2025 02:44:56 +0200 Subject: [PATCH 2/8] feat(joblist): MCOL-5756 MCOL-5222 ORDER BY on UNIONs in outer select --- dbcon/joblist/jlf_tuplejoblist.cpp | 9 +- dbcon/joblist/jlf_tuplejoblist.h | 2 +- dbcon/joblist/joblistfactory.cpp | 191 ++++++++++++++++++++++++-- dbcon/joblist/tupleunion.cpp | 7 +- dbcon/joblist/tupleunion.h | 3 +- dbcon/mysql/ha_mcs_execplan.cpp | 167 +++++++++++++++------- dbcon/mysql/ha_mcs_execplan_walks.cpp | 2 +- dbcon/mysql/ha_mcs_impl_if.h | 27 ++-- dbcon/mysql/ha_mcs_pushdown.cpp | 17 --- dbcon/mysql/ha_pseudocolumn.cpp | 2 +- 10 files changed, 334 insertions(+), 93 deletions(-) diff --git a/dbcon/joblist/jlf_tuplejoblist.cpp b/dbcon/joblist/jlf_tuplejoblist.cpp index 96add786b..c256351ec 100644 --- a/dbcon/joblist/jlf_tuplejoblist.cpp +++ b/dbcon/joblist/jlf_tuplejoblist.cpp @@ -5049,7 +5049,7 @@ void associateTupleJobSteps(JobStepVector& querySteps, JobStepVector& projectSte adjustLastStep(querySteps, deliverySteps, jobInfo); // to match the select clause } -SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo& jobInfo) +SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo& jobInfo, uint32_t keyCount) { vector inputRGs; vector distinct; @@ -5124,7 +5124,7 @@ SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo& dl->OID(CNX_VTABLE_ID); JobStepAssociation jsa; jsa.outAdd(spdl); - TupleUnion* unionStep = new TupleUnion(CNX_VTABLE_ID, jobInfo); + TupleUnion* unionStep = new TupleUnion(CNX_VTABLE_ID, jobInfo, keyCount); unionStep->inputAssociation(jsaToUnion); unionStep->outputAssociation(jsa); @@ -5167,6 +5167,11 @@ SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo& for (size_t i = 0; i < jobInfo.deliveredCols.size(); i++) { + auto* cc = dynamic_cast(jobInfo.deliveredCols[i].get()); + if (cc) + { + jobInfo.deliveredCols[i].reset(new SimpleColumn(*jobInfo.deliveredCols[i])); + } CalpontSystemCatalog::ColType ct = jobInfo.deliveredCols[i]->resultType(); // XXX remove after connector change ct.colDataType = types[i]; diff --git a/dbcon/joblist/jlf_tuplejoblist.h b/dbcon/joblist/jlf_tuplejoblist.h index 8514f6443..b49c9840c 100644 --- a/dbcon/joblist/jlf_tuplejoblist.h +++ b/dbcon/joblist/jlf_tuplejoblist.h @@ -129,7 +129,7 @@ void associateTupleJobSteps(JobStepVector& querySteps, JobStepVector& projectSte void orExpresssion(const execplan::Operator* op, JobInfo& jobInfo); // union the queries and return the tuple union step -SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo& jobInfo); +SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo& jobInfo, uint32_t keyCount); // Used for join graph analysis. // WHITE - node is not processed. diff --git a/dbcon/joblist/joblistfactory.cpp b/dbcon/joblist/joblistfactory.cpp index d68119f8b..c4e85005c 100644 --- a/dbcon/joblist/joblistfactory.cpp +++ b/dbcon/joblist/joblistfactory.cpp @@ -1985,29 +1985,200 @@ void makeJobSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobStepVec makeVtableModeSteps(csep, jobInfo, querySteps, projectSteps, deliverySteps); } -void makeUnionJobSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobStepVector& querySteps, - JobStepVector&, DeliveredTableMap& deliverySteps) +void fixUnionExpressionCol(ParseTree* tree, void* obj) { - CalpontSelectExecutionPlan::SelectList& selectVec = csep->unionVec(); + if (tree->left() || tree->right()) + { + return; + } + auto* ac = dynamic_cast(tree->data()); + if (ac && ac->expression()) + { + ac->expression()->walk(fixUnionExpressionCol, obj); + ac->setSimpleColumnList(); + return; + } + auto* fc = dynamic_cast(tree->data()); + if (fc && !fc->functionParms().empty()) + { + for (auto& parm : fc->functionParms()) + { + parm->walk(fixUnionExpressionCol, obj); + } + fc->setSimpleColumnList(); + return; + } + auto* csep = static_cast(obj); + auto* rc = dynamic_cast(tree->data()); + if (rc) + { + if (dynamic_cast(rc) || rc->orderPos() == -1ull) + { + return; + } + auto* newrc = csep->returnedCols()[rc->orderPos()]->clone(); + csep->returnedCols()[rc->orderPos()]->incRefCount(); + tree->data(newrc); + } +} + +void makeUnionJobSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobStepVector& querySteps, + JobStepVector& /*projectSteps*/, DeliveredTableMap& deliverySteps) +{ + CalpontSelectExecutionPlan::SelectList& unionVec = csep->unionVec(); uint8_t distinctUnionNum = csep->distinctUnionNum(); - RetColsVector unionRetCols = csep->returnedCols(); + uint32_t unionRetColsCount = csep->returnedCols().size(); JobStepVector unionFeeders; - for (CalpontSelectExecutionPlan::SelectList::iterator cit = selectVec.begin(); cit != selectVec.end(); - cit++) + std::decay_torderByCols())> expOrderByCols; + for (auto& obc : csep->orderByCols()) { - // @bug4848, enhance and unify limit handling. - SJSTEP sub = doUnionSub(cit->get(), jobInfo); + if (obc->orderPos() != -1ull) + { + continue; + } + if (dynamic_cast(obc.get()) == nullptr && + dynamic_cast(obc.get()) == nullptr) + { + // Arithmetic & function columns need special processing + expOrderByCols.push_back(obc); + } + } + + for (auto& unionSub : unionVec) + { + auto* unionCSEP = dynamic_cast(unionSub.get()); + for (auto& obc : expOrderByCols) + { + // Replace any leaf of expressions in the ORDER BY list with the corresponding column for each table in + // the UNION, and add the expression to the returned columns. + auto* col = obc->clone(); + auto* ac = dynamic_cast(col); + auto* fc = dynamic_cast(col); + if (ac) + { + ac->expression()->walk(fixUnionExpressionCol, unionCSEP); + ac->setSimpleColumnList(); + } + else if (fc) + { + for (auto& parm : fc->functionParms()) + { + parm->walk(fixUnionExpressionCol, unionCSEP); + } + fc->setSimpleColumnList(); + } + unionCSEP->returnedCols().emplace_back(col); + } + SJSTEP sub = doUnionSub(unionSub.get(), jobInfo); querySteps.push_back(sub); unionFeeders.push_back(sub); } - jobInfo.deliveredCols = unionRetCols; - SJSTEP unionStep(unionQueries(unionFeeders, distinctUnionNum, jobInfo)); + for (auto& obc : expOrderByCols) + { + // Add a SimpleColumn to the outer query for the every ORDER BY expression + auto* sc = new SimpleColumn(*obc.get()); + csep->returnedCols().emplace_back(sc); + sc->colPosition(csep->returnedCols().size() - 1); + sc->orderPos(csep->returnedCols().size() - 1); + obc->orderPos(csep->returnedCols().size() - 1); + } + + jobInfo.deliveredCols = csep->returnedCols(); + SJSTEP unionStep(unionQueries(unionFeeders, distinctUnionNum, jobInfo, unionRetColsCount)); querySteps.push_back(unionStep); uint16_t stepNo = jobInfo.subId * 10000; numberSteps(querySteps, stepNo, jobInfo.traceFlags); deliverySteps[execplan::CNX_VTABLE_ID] = unionStep; + if (!csep->orderByCols().empty() || csep->limitStart() != 0 || csep->limitNum() != -1ull) + { + jobInfo.limitStart = csep->limitStart(); + jobInfo.limitCount = csep->limitNum(); + jobInfo.orderByThreads = csep->orderByThreads(); + for (auto& obc : csep->orderByCols()) + { + auto* osc = dynamic_cast(obc.get()); + if (osc) + { + auto* sc = dynamic_cast(jobInfo.deliveredCols[obc->orderPos()].get()); + idbassert(sc); + sc->schemaName(""); + sc->tableAlias(querySteps[0]->alias()); + sc->colPosition(obc->orderPos()); + sc->oid(tableOid(sc, jobInfo.csc) + 1 + obc->orderPos()); + jobInfo.orderByColVec.emplace_back(getTupleKey(jobInfo, sc), obc->asc()); + } + else + { + auto* tus = dynamic_cast(unionStep.get()); + auto& keys = tus->getOutputRowGroup().getKeys(); + idbassert(obc->orderPos() < keys.size()); + jobInfo.orderByColVec.emplace_back(keys[obc->orderPos()], obc->asc()); + } + } + + for (auto& rc : csep->returnedCols()) + { + // Replace ConstantColumns with SimpleColumns and fix OIDs + auto* sc = dynamic_cast(rc.get()); + if (sc) + { + sc->schemaName(""); + sc->tableAlias(querySteps[0]->alias()); + sc->oid(tableOid(sc, jobInfo.csc) + 1 + rc->colPosition()); + } + else + { + sc = new SimpleColumn(*rc.get()); + rc.reset(sc); + sc->schemaName(""); + sc->tableAlias(querySteps[0]->alias()); + sc->oid(tableOid(sc, jobInfo.csc) + 1 + rc->colPosition()); + } + } + doProject(csep->returnedCols(), jobInfo); + checkReturnedColumns(csep, jobInfo); + auto* tas = new TupleAnnexStep(jobInfo); + jobInfo.annexStep.reset(tas); + tas->setLimit(jobInfo.limitStart, jobInfo.limitCount); + if (!jobInfo.orderByColVec.empty()) + { + tas->addOrderBy(new LimitedOrderBy()); + if (jobInfo.orderByThreads > 1) + { + tas->setParallelOp(); + } + tas->setMaxThreads(jobInfo.orderByThreads); + } + auto* tds = dynamic_cast(unionStep.get()); + RowGroup rg = tds->getDeliveredRowGroup(); + + AnyDataListSPtr spdlIn(new AnyDataList()); + RowGroupDL* dlIn; + if (!jobInfo.orderByColVec.empty()) + dlIn = new RowGroupDL(jobInfo.orderByThreads, jobInfo.fifoSize); + else + dlIn = new RowGroupDL(1, jobInfo.fifoSize); + dlIn->OID(CNX_VTABLE_ID); + spdlIn->rowGroupDL(dlIn); + JobStepAssociation jsaIn; + jsaIn.outAdd(spdlIn); + dynamic_cast(tds)->outputAssociation(jsaIn); + jobInfo.annexStep->inputAssociation(jsaIn); + + AnyDataListSPtr spdlOut(new AnyDataList()); + RowGroupDL* dlOut = new RowGroupDL(1, jobInfo.fifoSize); + dlOut->OID(CNX_VTABLE_ID); + spdlOut->rowGroupDL(dlOut); + JobStepAssociation jsaOut; + jsaOut.outAdd(spdlOut); + jobInfo.annexStep->outputAssociation(jsaOut); + + querySteps.push_back(jobInfo.annexStep); + dynamic_cast(jobInfo.annexStep.get())->initialize(rg, jobInfo); + deliverySteps[CNX_VTABLE_ID] = jobInfo.annexStep; + } } } // namespace joblist diff --git a/dbcon/joblist/tupleunion.cpp b/dbcon/joblist/tupleunion.cpp index cde15c308..fd9212702 100644 --- a/dbcon/joblist/tupleunion.cpp +++ b/dbcon/joblist/tupleunion.cpp @@ -1305,7 +1305,7 @@ inline uint64_t TupleUnion::Hasher::operator()(const RowPosition& p) const else ts->rowMemory[p.group].getRow(p.row, &row); - return row.hash(); + return row.hash(ts->fLastCol); } inline bool TupleUnion::Eq::operator()(const RowPosition& d1, const RowPosition& d2) const @@ -1322,10 +1322,10 @@ inline bool TupleUnion::Eq::operator()(const RowPosition& d1, const RowPosition& else ts->rowMemory[d2.group].getRow(d2.row, &r2); - return r1.equals(r2); + return r1.equals(r2, ts->fLastCol); } -TupleUnion::TupleUnion(CalpontSystemCatalog::OID tableOID, const JobInfo& jobInfo) +TupleUnion::TupleUnion(CalpontSystemCatalog::OID tableOID, const JobInfo& jobInfo, uint32_t keyCount) : JobStep(jobInfo) , fTableOID(tableOID) , output(NULL) @@ -1340,6 +1340,7 @@ TupleUnion::TupleUnion(CalpontSystemCatalog::OID tableOID, const JobInfo& jobInf , joinRan(false) , sessionMemLimit(jobInfo.umMemLimit) , fTimeZone(jobInfo.timeZone) + , fLastCol(keyCount - 1) { uniquer.reset(new Uniquer_t(10, Hasher(this), Eq(this), allocator)); fExtendedInfo = "TUN: "; diff --git a/dbcon/joblist/tupleunion.h b/dbcon/joblist/tupleunion.h index 551642b99..248ae2fd5 100644 --- a/dbcon/joblist/tupleunion.h +++ b/dbcon/joblist/tupleunion.h @@ -43,7 +43,7 @@ using normalizeFunctionsT = class TupleUnion : public JobStep, public TupleDeliveryStep { public: - TupleUnion(execplan::CalpontSystemCatalog::OID tableOID, const JobInfo& jobInfo); + TupleUnion(execplan::CalpontSystemCatalog::OID tableOID, const JobInfo& jobInfo, uint32_t keyCount); ~TupleUnion() override; void run() override; @@ -200,6 +200,7 @@ class TupleUnion : public JobStep, public TupleDeliveryStep boost::shared_ptr sessionMemLimit; long fTimeZone; + uint32_t fLastCol; }; } // namespace joblist diff --git a/dbcon/mysql/ha_mcs_execplan.cpp b/dbcon/mysql/ha_mcs_execplan.cpp index 683021a6b..a6715e26a 100644 --- a/dbcon/mysql/ha_mcs_execplan.cpp +++ b/dbcon/mysql/ha_mcs_execplan.cpp @@ -505,7 +505,6 @@ bool sortItemIsInGroupRec(Item* sort_item, Item* group_item) Item* ifp_sort_arg = ifp_sort->arguments()[i]; if (ifp_sort_arg->type() == Item::FUNC_ITEM || ifp_sort_arg->type() == Item::FIELD_ITEM) { - Item* ifp_sort_arg = ifp_sort->arguments()[i]; found = sortItemIsInGroupRec(ifp_sort_arg, group_item); } else if (ifp_sort_arg->type() == Item::REF_ITEM) @@ -2736,7 +2735,8 @@ ReturnedColumn* buildReturnedColumnNull(gp_walk_info& gwi) return rc; } -ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& nonSupport, bool /*isRefItem*/) +ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& nonSupport, bool /*isRefItem*/, + bool isUnion) { ReturnedColumn* rc = NULL; @@ -2758,7 +2758,7 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non { Item_field* ifp = (Item_field*)item; - return wrapIntoAggregate(buildSimpleColumn(ifp, gwi), gwi, ifp); + return wrapIntoAggregate(buildSimpleColumn(ifp, gwi, isUnion), gwi, ifp); } case Item::NULL_ITEM: return buildReturnedColumnNull(gwi); case Item::CONST_ITEM: @@ -2797,10 +2797,10 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non } if (func_name == "+" || func_name == "-" || func_name == "*" || func_name == "/") - return buildArithmeticColumn(ifp, gwi, nonSupport); + return buildArithmeticColumn(ifp, gwi, nonSupport, isUnion); else { - return buildFunctionColumn(ifp, gwi, nonSupport); + return buildFunctionColumn(ifp, gwi, nonSupport, false, isUnion); } } @@ -2817,11 +2817,13 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non { case Item::SUM_FUNC_ITEM: return buildAggregateColumn(*(ref->ref), gwi); - case Item::FIELD_ITEM: return buildReturnedColumn(*(ref->ref), gwi, nonSupport); + case Item::FIELD_ITEM: return buildReturnedColumn(*(ref->ref), gwi, nonSupport, false, isUnion); - case Item::REF_ITEM: return buildReturnedColumn(*(((Item_ref*)(*(ref->ref)))->ref), gwi, nonSupport); + case Item::REF_ITEM: + return buildReturnedColumn(*(((Item_ref*)(*(ref->ref)))->ref), gwi, nonSupport, false, isUnion); - case Item::FUNC_ITEM: return buildFunctionColumn((Item_func*)(*(ref->ref)), gwi, nonSupport); + case Item::FUNC_ITEM: + return buildFunctionColumn((Item_func*)(*(ref->ref)), gwi, nonSupport, false, isUnion); case Item::WINDOW_FUNC_ITEM: return buildWindowFunctionColumn(*(ref->ref), gwi, nonSupport); @@ -2833,7 +2835,7 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non default: if (ref->ref_type() == Item_ref::DIRECT_REF) { - return buildReturnedColumn(ref->real_item(), gwi, nonSupport); + return buildReturnedColumn(ref->real_item(), gwi, nonSupport, false, isUnion); } gwi.fatalParseError = true; gwi.parseErrorText = "Unknown REF item"; @@ -2922,11 +2924,12 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non return rc; } -ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupport, bool isRefItem) +ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupport, bool isRefItem, + bool isUnion) { bool disableWrapping = gwi.disableWrapping; gwi.disableWrapping = gwi.disableWrapping || itemDisablesWrapping(item, gwi); - ReturnedColumn* rc = buildReturnedColumnBody(item, gwi, nonSupport, isRefItem); + ReturnedColumn* rc = buildReturnedColumnBody(item, gwi, nonSupport, isRefItem, isUnion); gwi.disableWrapping = disableWrapping; return rc; } @@ -2960,7 +2963,7 @@ ReturnedColumn* buildBooleanConstantColumn(Item* item, gp_walk_info& gwi, bool& return cc; } -ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bool& nonSupport) +ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bool& nonSupport, bool isUnion) { if (get_fe_conn_info_ptr() == NULL) { @@ -2989,7 +2992,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo if (gwi.clauseType == SELECT || /*gwi.clauseType == HAVING || */ gwi.clauseType == GROUP_BY || gwi.clauseType == FROM) // select list { - lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport)); + lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); if (!lhs->data() && (sfitempp[0]->type() == Item::FUNC_ITEM)) { @@ -3004,12 +3007,12 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo gwi.fatalParseError = false; // ReturnedColumn* rc = buildAggFrmTempField(sfitempp[0], gwi); - ReturnedColumn* rc = buildReturnedColumn(sfitempp[0], gwi, nonSupport); + ReturnedColumn* rc = buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion); if (rc) lhs = new ParseTree(rc); } - rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, isUnion)); if (!rhs->data() && (sfitempp[1]->type() == Item::FUNC_ITEM)) { @@ -3024,7 +3027,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo gwi.fatalParseError = false; // ReturnedColumn* rc = buildAggFrmTempField(sfitempp[1], gwi); - ReturnedColumn* rc = buildReturnedColumn(sfitempp[1], gwi, nonSupport); + ReturnedColumn* rc = buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, isUnion); if (rc) rhs = new ParseTree(rc); } @@ -3035,7 +3038,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo { if (gwi.ptWorkStack.empty()) { - rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, isUnion)); } else { @@ -3047,7 +3050,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo { if (gwi.rcWorkStack.empty()) { - rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, isUnion)); } else { @@ -3060,7 +3063,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo { if (gwi.ptWorkStack.empty()) { - lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport)); + lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); } else { @@ -3072,7 +3075,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo { if (gwi.rcWorkStack.empty()) { - lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport)); + lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); } else { @@ -3105,13 +3108,13 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo if (gwi.clauseType == SELECT || gwi.clauseType == HAVING || gwi.clauseType == GROUP_BY) // select clause { - rhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); } else { if (gwi.rcWorkStack.empty()) { - rhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); } else { @@ -3233,17 +3236,17 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo } return ac; } -ReturnedColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport) +ReturnedColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport, bool isUnion) { bool disableWrapping = gwi.disableWrapping; gwi.disableWrapping = gwi.disableWrapping || itemDisablesWrapping(item, gwi); - ReturnedColumn* rc = buildArithmeticColumnBody(item, gwi, nonSupport); + ReturnedColumn* rc = buildArithmeticColumnBody(item, gwi, nonSupport, isUnion); gwi.disableWrapping = disableWrapping; return rc; } ReturnedColumn* buildFunctionColumnBody(Item_func* ifp, gp_walk_info& gwi, bool& nonSupport, - bool selectBetweenIn) + bool selectBetweenIn, bool isUnion) { if (get_fe_conn_info_ptr() == NULL) { @@ -3306,12 +3309,12 @@ ReturnedColumn* buildFunctionColumnBody(Item_func* ifp, gp_walk_info& gwi, bool& // Arithmetic exp if (funcName == "+" || funcName == "-" || funcName == "*" || funcName == "/") { - return buildArithmeticColumn(ifp, gwi, nonSupport); + return buildArithmeticColumn(ifp, gwi, nonSupport, isUnion); } else if (funcName == "case") { - fc = buildCaseFunction(ifp, gwi, nonSupport); + fc = buildCaseFunction(ifp, gwi, nonSupport, isUnion); } else if ((funcName == "charset" || funcName == "collation") && ifp->argument_count() == 1 && @@ -3486,7 +3489,7 @@ ReturnedColumn* buildFunctionColumnBody(Item_func* ifp, gp_walk_info& gwi, bool& rc = buildBooleanConstantColumn(ifp->arguments()[i], gwi, nonSupport); else { - rc = buildReturnedColumn(ifp->arguments()[i], gwi, nonSupport); + rc = buildReturnedColumn(ifp->arguments()[i], gwi, nonSupport, false, isUnion); } // MCOL-1510 It must be a temp table field, so find the corresponding column. @@ -3853,16 +3856,17 @@ ReturnedColumn* buildFunctionColumnBody(Item_func* ifp, gp_walk_info& gwi, bool& return fc; } -ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& nonSupport, bool selectBetweenIn) +ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& nonSupport, bool selectBetweenIn, + bool isUnion) { bool disableWrapping = gwi.disableWrapping; gwi.disableWrapping = gwi.disableWrapping || itemDisablesWrapping(ifp, gwi); - ReturnedColumn* rc = buildFunctionColumnBody(ifp, gwi, nonSupport, selectBetweenIn); + ReturnedColumn* rc = buildFunctionColumnBody(ifp, gwi, nonSupport, selectBetweenIn, isUnion); gwi.disableWrapping = disableWrapping; return rc; } -FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonSupport) +FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonSupport, bool isUnion) { if (get_fe_conn_info_ptr() == NULL) { @@ -3945,7 +3949,7 @@ FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonS // rwWorkStack or ptWorkStack. // For example, simple predicates, such as 1=1 or 1=0, land in the // ptWorkStack but other stuff might land in the rwWorkStack - ReturnedColumn* parm = buildReturnedColumn(item->arguments()[i], gwi, nonSupport); + ReturnedColumn* parm = buildReturnedColumn(item->arguments()[i], gwi, nonSupport, false, isUnion); if (parm) { @@ -4085,7 +4089,7 @@ ConstantColumn* buildDecimalColumn(const Item* idp, const std::string& valStr, g return cc; } -SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) +SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi, bool isUnion) { if (!gwi.csc) { @@ -4100,6 +4104,14 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi) strcmp(ifp->cached_table->db.str, "information_schema") == 0) isInformationSchema = true; + if (isUnion && !isInformationSchema) + { + auto* rc = gwi.returnedCols[ifp->field->field_index]->clone(); + rc->orderPos(ifp->field->field_index); + gwi.returnedCols[ifp->field->field_index]->incRefCount(); + return dynamic_cast(rc); + } + // support FRPM subquery. columns from the derived table has no definition if ((!ifp->field || !ifp->db_name.str || strlen(ifp->db_name.str) == 0) && !isInformationSchema) return buildSimpleColFromDerivedTable(gwi, ifp); @@ -4557,7 +4569,7 @@ ReturnedColumn* buildAggregateColumnBody(Item* item, gp_walk_info& gwi) case Item::FIELD_ITEM: { Item_field* ifp = static_cast(sfitemp); - SimpleColumn* sc = buildSimpleColumn(ifp, gwi); + SimpleColumn* sc = buildSimpleColumn(ifp, gwi, false); if (!sc) { @@ -5674,7 +5686,7 @@ int processGroupBy(SELECT_LEX& select_lex, gp_walk_info& gwi, const bool withRol { Item_field* ifp = (Item_field*)groupItem; // this GB col could be an alias of F&E on the SELECT clause, not necessarily a field. - ReturnedColumn* rc = buildSimpleColumn(ifp, gwi); + ReturnedColumn* rc = buildSimpleColumn(ifp, gwi, false); SimpleColumn* sc = dynamic_cast(rc); if (sc) @@ -6310,7 +6322,8 @@ void extractColumnStatistics(Item_field* ifp, gp_walk_info& gwi) auto* histogram = dynamic_cast(ifp->field->read_stats->histogram); if (histogram) { - SchemaAndTableName tableName = {ifp->field->table->s->db.str, ifp->field->table->s->table_name.str}; + SchemaAndTableName tableName = {ifp->field->table->s->db.str, + ifp->field->table->s->table_name.str}; gwi.tableStatisticsMap[tableName][ifp->field->field_name.str] = *histogram; } } @@ -6420,7 +6433,7 @@ int processSelect(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, vector collectAllCols(gwi, ifp); break; } - SimpleColumn* sc = buildSimpleColumn(ifp, gwi); + SimpleColumn* sc = buildSimpleColumn(ifp, gwi, false); if (sc) { @@ -7015,32 +7028,90 @@ int processOrderBy(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, gwi.returnedCols.push_back(minSc); } - // ORDER BY translation part + // process UNION ORDER BY part if (!isUnion && !gwi.hasWindowFunc && gwi.subSelectType == CalpontSelectExecutionPlan::MAIN_SELECT) { + if (unionSel) { - if (unionSel) - order_list = select_lex.master_unit()->global_parameters()->order_list; - + order_list = select_lex.master_unit()->global_parameters()->order_list; ordercol = static_cast(order_list.first); for (; ordercol; ordercol = ordercol->next) { - Item* ord_item = *(ordercol->item); + ReturnedColumn* rc = NULL; - if (ord_item->name.length) + if (ordercol->in_field_list && ordercol->item && + (ordercol->counter_used || (*ordercol->item)->type() == Item::FIELD_ITEM)) { - // for union order by 1 case. For unknown reason, it doesn't show in_field_list - if (ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) + auto* ifp = dynamic_cast(*ordercol->item); + auto pos = ordercol->counter_used ? ordercol->counter - 1 : ifp->field->field_index; + rc = gwi.returnedCols[pos]->clone(); + rc->orderPos(pos); + // can not be optimized off if used in order by with counter. + // set with self derived table alias if it's derived table + gwi.returnedCols[pos]->incRefCount(); + } + else + { + Item* ord_item = *(ordercol->item); + + // ignore not_used column on order by. + if ((ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) && + ord_item->full_name() && !strcmp(ord_item->full_name(), "Not_used")) { + continue; + } + else if (ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) + { + // DRRTUY This section looks useless b/c there is no + // way to put constant INT into an ORDER BY list + rc = gwi.returnedCols[((Item_int*)ord_item)->val_int() - 1]->clone(); } else if (ord_item->type() == Item::SUBSELECT_ITEM) { + gwi.fatalParseError = true; + } + else if ((ord_item->type() == Item::FUNC_ITEM) && + (((Item_func*)ord_item)->functype() == Item_func::COLLATE_FUNC)) + { + push_warning(gwi.thd, Sql_condition::WARN_LEVEL_NOTE, WARN_OPTION_IGNORED, + "COLLATE is ignored in ColumnStore"); + continue; } else { + rc = buildReturnedColumn(ord_item, gwi, gwi.fatalParseError, false, true); + + rc = wrapIntoAggregate(rc, gwi, ord_item); + } + // @bug5501 try item_ptr if item can not be fixed. For some + // weird dml statement state, item can not be fixed but the + // infomation is available in item_ptr. + if (!rc || gwi.fatalParseError) + { + Item* item_ptr = ordercol->item_ptr; + + while (item_ptr->type() == Item::REF_ITEM) + item_ptr = *(((Item_ref*)item_ptr)->ref); + + rc = buildReturnedColumn(item_ptr, gwi, gwi.fatalParseError, false, true); + } + + if (!rc) + { + string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); + gwi.parseErrorText = emsg; + setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi); + return ER_CHECK_NOT_IMPLEMENTED; } } + + if (ordercol->direction == ORDER::ORDER_ASC) + rc->asc(true); + else + rc->asc(false); + + gwi.orderByCols.push_back(SRCP(rc)); } } @@ -7137,7 +7208,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i for (uint32_t i = 0; i < funcFieldVec.size(); i++) { - SimpleColumn* sc = buildSimpleColumn(funcFieldVec[i], gwi); + SimpleColumn* sc = buildSimpleColumn(funcFieldVec[i], gwi, false); if (!sc || gwi.fatalParseError) { @@ -7196,10 +7267,10 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i bool unionSel = (!isUnion && select_lex.master_unit()->is_unit_op()) ? true : false; + gwi.clauseType = GROUP_BY; // Group by list. not valid for union main query if (!unionSel) { - gwi.clauseType = GROUP_BY; if ((rc = processGroupBy(select_lex, gwi, withRollup))) { return rc; @@ -7234,6 +7305,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i minSc = gwi.returnedCols[0]; else if (!gwi.additionalRetCols.empty()) minSc = gwi.additionalRetCols[0]; + minSc->orderPos(0); } // @bug3523, count(*) on subquery always pick column[0]. @@ -7250,6 +7322,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i sc1->viewName(sc->viewName()); sc1->partitions(sc->partitions()); sc1->colPosition(0); + sc1->orderPos(0); sc1->timeZone(gwi.timeZone); minSc.reset(sc1); } diff --git a/dbcon/mysql/ha_mcs_execplan_walks.cpp b/dbcon/mysql/ha_mcs_execplan_walks.cpp index 802f382c6..204bd290e 100644 --- a/dbcon/mysql/ha_mcs_execplan_walks.cpp +++ b/dbcon/mysql/ha_mcs_execplan_walks.cpp @@ -119,7 +119,7 @@ void gp_walk(const Item* item, void* arg) if (ifp) { // XXX: this looks awfuly wrong. - execplan::SimpleColumn* scp = buildSimpleColumn(ifp, *gwip); + execplan::SimpleColumn* scp = buildSimpleColumn(ifp, *gwip, false); if (!scp) break; diff --git a/dbcon/mysql/ha_mcs_impl_if.h b/dbcon/mysql/ha_mcs_impl_if.h index e520a79e9..8e2a53fad 100644 --- a/dbcon/mysql/ha_mcs_impl_if.h +++ b/dbcon/mysql/ha_mcs_impl_if.h @@ -95,16 +95,20 @@ enum ClauseType ORDER_BY }; -struct SchemaAndTableName { +struct SchemaAndTableName +{ std::string schema; std::string table; - bool operator==(const SchemaAndTableName& other) const { + bool operator==(const SchemaAndTableName& other) const + { return schema == other.schema && table == other.table; } }; -struct SchemaAndTableNameHash { - std::size_t operator()(const SchemaAndTableName& k) const { +struct SchemaAndTableNameHash +{ + std::size_t operator()(const SchemaAndTableName& k) const + { return std::hash()(k.schema + k.table); } }; @@ -117,7 +121,8 @@ typedef std::tr1::unordered_map> TableOnExprList typedef std::tr1::unordered_map TableOuterJoinMap; using ColumnName = std::string; using ColumnStatisticsMap = std::unordered_map; -using TableStatisticsMap = std::unordered_map; +using TableStatisticsMap = + std::unordered_map; // This structure is used to store MDB AST -> CSEP translation context. // There is a column statistics for some columns in a query. @@ -434,13 +439,15 @@ const std::string bestTableName(const Item_field* ifp); // execution plan util functions prototypes execplan::ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupport, - bool isRefItem = false); + bool isRefItem = false, bool isUnion = false); execplan::ReturnedColumn* buildFunctionColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport, - bool selectBetweenIn = false); -execplan::ReturnedColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport); + bool selectBetweenIn = false, bool isUnion = false); +execplan::ReturnedColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport, + bool isUnion); execplan::ConstantColumn* buildDecimalColumn(const Item* item, const std::string& str, gp_walk_info& gwi); -execplan::SimpleColumn* buildSimpleColumn(Item_field* item, gp_walk_info& gwi); -execplan::FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonSupport); +execplan::SimpleColumn* buildSimpleColumn(Item_field* item, gp_walk_info& gwi, bool isUnion); +execplan::FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonSupport, + bool isUnion); execplan::ParseTree* buildParseTree(Item* item, gp_walk_info& gwi, bool& nonSupport); execplan::ReturnedColumn* buildAggregateColumn(Item* item, gp_walk_info& gwi); execplan::ReturnedColumn* buildWindowFunctionColumn(Item* item, gp_walk_info& gwi, bool& nonSupport); diff --git a/dbcon/mysql/ha_mcs_pushdown.cpp b/dbcon/mysql/ha_mcs_pushdown.cpp index 55681af49..134188dce 100644 --- a/dbcon/mysql/ha_mcs_pushdown.cpp +++ b/dbcon/mysql/ha_mcs_pushdown.cpp @@ -633,15 +633,6 @@ select_handler* create_columnstore_select_handler_(THD* thd, SELECT_LEX* sel_lex return nullptr; } - // MCOL-5432 Disable partial pushdown of the UNION operation if the query - // involves an order by or a limit clause. - if (sel_lex && sel_unit && - (sel_unit->global_parameters()->limit_params.explicit_limit == true || - sel_unit->global_parameters()->order_list.elements != 0)) - { - return nullptr; - } - std::vector select_lex_vec; if (sel_unit && !sel_lex) @@ -912,14 +903,6 @@ select_handler* create_columnstore_unit_handler(THD* thd, SELECT_LEX_UNIT* sel_u return nullptr; } - // MCOL-5432 Disable UNION pushdown if the query involves an order by - // or a limit clause. - if (sel_unit->global_parameters()->limit_params.explicit_limit == true || - sel_unit->global_parameters()->order_list.elements != 0) - { - return nullptr; - } - return create_columnstore_select_handler_(thd, 0, sel_unit); } diff --git a/dbcon/mysql/ha_pseudocolumn.cpp b/dbcon/mysql/ha_pseudocolumn.cpp index e9053b5ac..8ac34be45 100644 --- a/dbcon/mysql/ha_pseudocolumn.cpp +++ b/dbcon/mysql/ha_pseudocolumn.cpp @@ -423,7 +423,7 @@ execplan::ReturnedColumn* buildPseudoColumn(Item* item, gp_walk_info& gwi, bool& if (!field->field || !field->db_name.str || strlen(field->db_name.str) == 0) return nullOnError(gwi, funcName); - SimpleColumn* sc = buildSimpleColumn(field, gwi); + SimpleColumn* sc = buildSimpleColumn(field, gwi, false); if (!sc) return nullOnError(gwi, funcName); From 3d26e4d6fd32c5b5d0f5c25654cde68907ce2916 Mon Sep 17 00:00:00 2001 From: Aleksei Antipovskii Date: Wed, 27 Aug 2025 23:17:23 +0200 Subject: [PATCH 3/8] fix tests --- .../columnstore/basic/r/mdev-25080.result | 77 +++++++++---------- .../columnstore/basic/t/mdev-25080.test | 72 ++++++++--------- 2 files changed, 70 insertions(+), 79 deletions(-) diff --git a/mysql-test/columnstore/basic/r/mdev-25080.result b/mysql-test/columnstore/basic/r/mdev-25080.result index e69b3ad30..12f668740 100644 --- a/mysql-test/columnstore/basic/r/mdev-25080.result +++ b/mysql-test/columnstore/basic/r/mdev-25080.result @@ -1,10 +1,6 @@ # # MDEV-25080: Allow pushdown of queries involving UNIONs # in outer select to foreign engines -# -# Remove the sorted_result MTR qualifier and add ORDER BY -# clause after MCOL-5222 is fixed -# CREATE USER IF NOT EXISTS'cejuser'@'localhost' IDENTIFIED BY 'Vagrant1|0000001'; GRANT ALL PRIVILEGES ON *.* TO 'cejuser'@'localhost'; FLUSH PRIVILEGES; @@ -20,17 +16,17 @@ INSERT INTO t2 VALUES ('bcd'), ('cde'), ('def'), ('efg'); INSERT INTO t3 VALUES ('t3_myisam1'), ('t3_myisam2'), ('t3_myisam3'); INSERT INTO t4 VALUES ('t4_myisam1'), ('t4_myisam2'), ('t4_myisam3'); # Pushdown of the whole UNION -SELECT * FROM t1 UNION SELECT * FROM t2; +SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY 1; a abc bcd cde def efg -EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t2; +EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY 1; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL -SELECT * FROM t1 UNION ALL SELECT * FROM t2; +SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY 1; a abc bcd @@ -39,11 +35,11 @@ cde cde def efg -EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2; +EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY 1; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL # UNION with a foreign engine -SELECT * FROM t1 UNION SELECT * FROM t3; +SELECT * FROM t1 UNION SELECT * FROM t3 ORDER BY 1; a abc bcd @@ -51,13 +47,14 @@ cde t3_myisam1 t3_myisam2 t3_myisam3 -EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t3; +EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t3 ORDER BY 1; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL # More than two SELECTs in a UNIT: SELECT * FROM t1 UNION SELECT * FROM t2 UNION ALL -SELECT * FROM t1; +SELECT * FROM t1 +ORDER BY 1; a abc abc @@ -69,12 +66,14 @@ def efg EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t2 UNION ALL -SELECT * FROM t1; +SELECT * FROM t1 +ORDER BY 1; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL -SELECT * FROM t1; +SELECT * FROM t1 +ORDER BY 1; a abc abc @@ -86,13 +85,15 @@ def efg EXPLAIN (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL -SELECT * FROM t1; +SELECT * FROM t1 +ORDER BY 1; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL SELECT * FROM t1 UNION SELECT * FROM t2 UNION ALL SELECT * FROM t3 UNION -SELECT * FROM t4; +SELECT * FROM t4 +ORDER BY 1; a abc bcd @@ -108,13 +109,15 @@ t4_myisam3 EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t2 UNION ALL SELECT * FROM t3 UNION -SELECT * FROM t4; +SELECT * FROM t4 +ORDER BY 1; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL (SELECT * FROM t3 UNION -SELECT * FROM t4); +SELECT * FROM t4) +ORDER BY 1; a abc bcd @@ -130,23 +133,26 @@ t4_myisam3 EXPLAIN (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL (SELECT * FROM t3 UNION -SELECT * FROM t4); +SELECT * FROM t4) +ORDER BY 1; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL SELECT count(*) FROM t1 UNION SELECT count(*) FROM t2 UNION ALL SELECT count(*)+20 FROM t2 UNION -SELECT count(*)+5 FROM t1; +SELECT count(*)+5 FROM t1 +ORDER BY 1; count(*) -24 3 4 8 +24 EXPLAIN SELECT count(*) FROM t1 UNION SELECT count(*) FROM t2 UNION ALL SELECT count(*)+20 FROM t2 UNION -SELECT count(*)+5 FROM t1; +SELECT count(*)+5 FROM t1 +ORDER BY 1; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL # UNION inside a derived table: the whole derived table must be pushed @@ -181,7 +187,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PUSHED SELECT NULL NULL NULL NULL NULL NULL NULL NULL # Prepared statements PREPARE stmt FROM "SELECT * FROM t1 UNION - SELECT * FROM t2"; + SELECT * FROM t2 ORDER BY 1"; EXECUTE stmt; a abc @@ -204,7 +210,7 @@ cde def efg PREPARE stmt FROM "EXPLAIN SELECT * FROM t1 UNION - SELECT * FROM t2"; + SELECT * FROM t2 ORDER BY 1"; EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL @@ -214,7 +220,7 @@ NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL PREPARE stmt FROM "(SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL (SELECT * FROM t1 UNION - SELECT * FROM t2)"; + SELECT * FROM t2) ORDER BY 1"; EXECUTE stmt; a abc @@ -254,7 +260,7 @@ efg PREPARE stmt FROM "EXPLAIN (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL (SELECT * FROM t1 UNION - SELECT * FROM t2)"; + SELECT * FROM t2) ORDER BY 1"; EXECUTE stmt; id select_type table type possible_keys key key_len ref rows Extra NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL @@ -274,18 +280,15 @@ def efg EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2000 -2 UNION t2 ALL NULL NULL NULL NULL 2000 -NULL UNION RESULT ALL NULL NULL NULL NULL NULL Using filesort -SELECT * FROM t1 UNION ALL SELECT * FROM t2 LIMIT 3; +NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL +SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 3; a abc bcd -cde -EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 LIMIT 3; +bcd +EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 3; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2000 -2 UNION t2 ALL NULL NULL NULL NULL 2000 +NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a DESC LIMIT 5; a efg @@ -295,9 +298,7 @@ cde bcd EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a DESC LIMIT 5; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2000 -2 UNION t2 ALL NULL NULL NULL NULL 2000 -NULL UNION RESULT ALL NULL NULL NULL NULL NULL Using filesort +NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 3 OFFSET 2; a bcd @@ -305,9 +306,7 @@ cde cde EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 3 OFFSET 2; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 2000 -2 UNION t2 ALL NULL NULL NULL NULL 2000 -NULL UNION RESULT ALL NULL NULL NULL NULL NULL Using filesort +NULL PUSHED UNION NULL NULL NULL NULL NULL NULL NULL NULL DROP USER 'cejuser'@'localhost'; DROP TABLE t1, t2, t3, t4; DROP DATABASE mdev25080; diff --git a/mysql-test/columnstore/basic/t/mdev-25080.test b/mysql-test/columnstore/basic/t/mdev-25080.test index 98ac13802..7c5c50246 100644 --- a/mysql-test/columnstore/basic/t/mdev-25080.test +++ b/mysql-test/columnstore/basic/t/mdev-25080.test @@ -1,10 +1,6 @@ --echo # --echo # MDEV-25080: Allow pushdown of queries involving UNIONs --echo # in outer select to foreign engines ---echo # ---echo # Remove the sorted_result MTR qualifier and add ORDER BY ---echo # clause after MCOL-5222 is fixed ---echo # --source ../include/have_columnstore.inc @@ -51,71 +47,73 @@ INSERT INTO t3 VALUES ('t3_myisam1'), ('t3_myisam2'), ('t3_myisam3'); INSERT INTO t4 VALUES ('t4_myisam1'), ('t4_myisam2'), ('t4_myisam3'); --echo # Pushdown of the whole UNION ---sorted_result -SELECT * FROM t1 UNION SELECT * FROM t2; -EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t2; +SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY 1; +EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY 1; ---sorted_result -SELECT * FROM t1 UNION ALL SELECT * FROM t2; -EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2; +SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY 1; +EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY 1; --echo # UNION with a foreign engine ---sorted_result -SELECT * FROM t1 UNION SELECT * FROM t3; -EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t3; +SELECT * FROM t1 UNION SELECT * FROM t3 ORDER BY 1; +EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t3 ORDER BY 1; --echo # More than two SELECTs in a UNIT: ---sorted_result SELECT * FROM t1 UNION SELECT * FROM t2 UNION ALL - SELECT * FROM t1; + SELECT * FROM t1 +ORDER BY 1; EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t2 UNION ALL - SELECT * FROM t1; + SELECT * FROM t1 +ORDER BY 1; ---sorted_result (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL - SELECT * FROM t1; + SELECT * FROM t1 +ORDER BY 1; EXPLAIN (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL - SELECT * FROM t1; + SELECT * FROM t1 +ORDER BY 1; ---sorted_result SELECT * FROM t1 UNION SELECT * FROM t2 UNION ALL SELECT * FROM t3 UNION - SELECT * FROM t4; + SELECT * FROM t4 +ORDER BY 1; EXPLAIN SELECT * FROM t1 UNION SELECT * FROM t2 UNION ALL SELECT * FROM t3 UNION - SELECT * FROM t4; + SELECT * FROM t4 +ORDER BY 1; ---sorted_result (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL (SELECT * FROM t3 UNION - SELECT * FROM t4); + SELECT * FROM t4) +ORDER BY 1; EXPLAIN (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL (SELECT * FROM t3 UNION - SELECT * FROM t4); + SELECT * FROM t4) +ORDER BY 1; ---sorted_result SELECT count(*) FROM t1 UNION SELECT count(*) FROM t2 UNION ALL SELECT count(*)+20 FROM t2 UNION - SELECT count(*)+5 FROM t1; + SELECT count(*)+5 FROM t1 +ORDER BY 1; EXPLAIN SELECT count(*) FROM t1 UNION SELECT count(*) FROM t2 UNION ALL SELECT count(*)+20 FROM t2 UNION - SELECT count(*)+5 FROM t1; + SELECT count(*)+5 FROM t1 +ORDER BY 1; --echo # UNION inside a derived table: the whole derived table must be pushed SELECT a FROM @@ -134,17 +132,14 @@ EXPLAIN --echo # Prepared statements PREPARE stmt FROM "SELECT * FROM t1 UNION - SELECT * FROM t2"; + SELECT * FROM t2 ORDER BY 1"; ---sorted_result EXECUTE stmt; ---sorted_result EXECUTE stmt; ---sorted_result EXECUTE stmt; PREPARE stmt FROM "EXPLAIN SELECT * FROM t1 UNION - SELECT * FROM t2"; + SELECT * FROM t2 ORDER BY 1"; EXECUTE stmt; EXECUTE stmt; @@ -152,19 +147,16 @@ EXECUTE stmt; PREPARE stmt FROM "(SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL (SELECT * FROM t1 UNION - SELECT * FROM t2)"; + SELECT * FROM t2) ORDER BY 1"; ---sorted_result EXECUTE stmt; ---sorted_result EXECUTE stmt; ---sorted_result EXECUTE stmt; PREPARE stmt FROM "EXPLAIN (SELECT * FROM t1 UNION SELECT * FROM t2) UNION ALL (SELECT * FROM t1 UNION - SELECT * FROM t2)"; + SELECT * FROM t2) ORDER BY 1"; EXECUTE stmt; EXECUTE stmt; @@ -173,8 +165,8 @@ EXECUTE stmt; --echo # clause is involved, until MCOL-5222 is fixed. SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a; EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a; -SELECT * FROM t1 UNION ALL SELECT * FROM t2 LIMIT 3; -EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 LIMIT 3; +SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 3; +EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 3; SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a DESC LIMIT 5; EXPLAIN SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a DESC LIMIT 5; SELECT * FROM t1 UNION ALL SELECT * FROM t2 ORDER BY a LIMIT 3 OFFSET 2; From 378f964cca6d536a10c27b2abf1a85bec0c00f0e Mon Sep 17 00:00:00 2001 From: Aleksei Antipovskii Date: Sun, 31 Aug 2025 22:32:17 +0200 Subject: [PATCH 4/8] Fix queries like `(SELECT * FROM t ORDER BY 1) UNION (SELECT ...)` --- dbcon/mysql/ha_mcs_execplan.cpp | 158 ++++++++++++++++---------------- 1 file changed, 81 insertions(+), 77 deletions(-) diff --git a/dbcon/mysql/ha_mcs_execplan.cpp b/dbcon/mysql/ha_mcs_execplan.cpp index a6715e26a..22aa1d267 100644 --- a/dbcon/mysql/ha_mcs_execplan.cpp +++ b/dbcon/mysql/ha_mcs_execplan.cpp @@ -6208,23 +6208,24 @@ int processLimitAndOffset(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep We therefore do not allow limit set to 1 here for such queries. */ if (gwi.subSelectType != CalpontSelectExecutionPlan::IN_SUBS && - gwi.subSelectType != CalpontSelectExecutionPlan::EXISTS_SUBS && - select_lex.master_unit()->global_parameters()->limit_params.explicit_limit) + gwi.subSelectType != CalpontSelectExecutionPlan::EXISTS_SUBS) { - if (select_lex.master_unit()->global_parameters()->limit_params.offset_limit) - { - Item_int* offset = - (Item_int*)select_lex.master_unit()->global_parameters()->limit_params.offset_limit; - csep->limitStart(offset->val_int()); - } + if (select_lex.master_unit()->global_parameters()->limit_params.explicit_limit) { + if (select_lex.master_unit()->global_parameters()->limit_params.offset_limit) + { + Item_int* offset = + (Item_int*)select_lex.master_unit()->global_parameters()->limit_params.offset_limit; + csep->limitStart(offset->val_int()); + } - if (select_lex.master_unit()->global_parameters()->limit_params.select_limit) - { - Item_int* select = - (Item_int*)select_lex.master_unit()->global_parameters()->limit_params.select_limit; - csep->limitNum(select->val_int()); - // MCOL-894 Activate parallel ORDER BY - csep->orderByThreads(get_orderby_threads(gwi.thd)); + if (select_lex.master_unit()->global_parameters()->limit_params.select_limit) + { + Item_int* select = + (Item_int*)select_lex.master_unit()->global_parameters()->limit_params.select_limit; + csep->limitNum(select->val_int()); + // MCOL-894 Activate parallel ORDER BY + csep->orderByThreads(get_orderby_threads(gwi.thd)); + } } } } @@ -6878,82 +6879,85 @@ int processOrderBy(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, } } - // re-visit the first of ordercol list - ordercol = static_cast(order_list.first); - - for (; ordercol; ordercol = ordercol->next) + if (!unionSel) { - ReturnedColumn* rc = NULL; + // re-visit the first of ordercol list + ordercol = static_cast(order_list.first); - if (ordercol->in_field_list && ordercol->counter_used) + for (; ordercol; ordercol = ordercol->next) { - rc = gwi.returnedCols[ordercol->counter - 1]->clone(); - rc->orderPos(ordercol->counter - 1); - // can not be optimized off if used in order by with counter. - // set with self derived table alias if it's derived table - gwi.returnedCols[ordercol->counter - 1]->incRefCount(); - } - else - { - Item* ord_item = *(ordercol->item); + ReturnedColumn* rc = NULL; - // ignore not_used column on order by. - if ((ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) && - ord_item->full_name() && !strcmp(ord_item->full_name(), "Not_used")) + if (ordercol->in_field_list && ordercol->counter_used) { - continue; - } - else if (ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) - { - // DRRTUY This section looks useless b/c there is no - // way to put constant INT into an ORDER BY list - rc = gwi.returnedCols[((Item_int*)ord_item)->val_int() - 1]->clone(); - } - else if (ord_item->type() == Item::SUBSELECT_ITEM) - { - gwi.fatalParseError = true; - } - else if ((ord_item->type() == Item::FUNC_ITEM) && - (((Item_func*)ord_item)->functype() == Item_func::COLLATE_FUNC)) - { - push_warning(gwi.thd, Sql_condition::WARN_LEVEL_NOTE, WARN_OPTION_IGNORED, - "COLLATE is ignored in ColumnStore"); - continue; + rc = gwi.returnedCols[ordercol->counter - 1]->clone(); + rc->orderPos(ordercol->counter - 1); + // can not be optimized off if used in order by with counter. + // set with self derived table alias if it's derived table + gwi.returnedCols[ordercol->counter - 1]->incRefCount(); } else { - rc = buildReturnedColumn(ord_item, gwi, gwi.fatalParseError); + Item* ord_item = *(ordercol->item); - rc = wrapIntoAggregate(rc, gwi, ord_item); - } - // @bug5501 try item_ptr if item can not be fixed. For some - // weird dml statement state, item can not be fixed but the - // infomation is available in item_ptr. - if (!rc || gwi.fatalParseError) - { - Item* item_ptr = ordercol->item_ptr; + // ignore not_used column on order by. + if ((ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) && + ord_item->full_name() && !strcmp(ord_item->full_name(), "Not_used")) + { + continue; + } + else if (ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) + { + // DRRTUY This section looks useless b/c there is no + // way to put constant INT into an ORDER BY list + rc = gwi.returnedCols[((Item_int*)ord_item)->val_int() - 1]->clone(); + } + else if (ord_item->type() == Item::SUBSELECT_ITEM) + { + gwi.fatalParseError = true; + } + else if ((ord_item->type() == Item::FUNC_ITEM) && + (((Item_func*)ord_item)->functype() == Item_func::COLLATE_FUNC)) + { + push_warning(gwi.thd, Sql_condition::WARN_LEVEL_NOTE, WARN_OPTION_IGNORED, + "COLLATE is ignored in ColumnStore"); + continue; + } + else + { + rc = buildReturnedColumn(ord_item, gwi, gwi.fatalParseError); - while (item_ptr->type() == Item::REF_ITEM) - item_ptr = *(((Item_ref*)item_ptr)->ref); + rc = wrapIntoAggregate(rc, gwi, ord_item); + } + // @bug5501 try item_ptr if item can not be fixed. For some + // weird dml statement state, item can not be fixed but the + // infomation is available in item_ptr. + if (!rc || gwi.fatalParseError) + { + Item* item_ptr = ordercol->item_ptr; - rc = buildReturnedColumn(item_ptr, gwi, gwi.fatalParseError); + while (item_ptr->type() == Item::REF_ITEM) + item_ptr = *(((Item_ref*)item_ptr)->ref); + + rc = buildReturnedColumn(item_ptr, gwi, gwi.fatalParseError); + } + + if (!rc) + { + string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); + gwi.parseErrorText = emsg; + setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi); + return ER_CHECK_NOT_IMPLEMENTED; + } } - if (!rc) - { - string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); - gwi.parseErrorText = emsg; - setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi); - return ER_CHECK_NOT_IMPLEMENTED; - } + if (ordercol->direction == ORDER::ORDER_ASC) + rc->asc(true); + else + rc->asc(false); + + gwi.orderByCols.push_back(SRCP(rc)); } - - if (ordercol->direction == ORDER::ORDER_ASC) - rc->asc(true); - else - rc->asc(false); - - gwi.orderByCols.push_back(SRCP(rc)); } // make sure columnmap, returnedcols and count(*) arg_list are not empty From da3cc95077609f476cb9d768f28b9fd1f591da60 Mon Sep 17 00:00:00 2001 From: Aleksei Antipovskii Date: Tue, 2 Sep 2025 02:40:52 +0200 Subject: [PATCH 5/8] Prefer to use floating point instead of decimal to match server behaviour. --- utils/dataconvert/dataconvert.cpp | 33 ++++++------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/utils/dataconvert/dataconvert.cpp b/utils/dataconvert/dataconvert.cpp index 44f671447..86e0174df 100644 --- a/utils/dataconvert/dataconvert.cpp +++ b/utils/dataconvert/dataconvert.cpp @@ -2949,7 +2949,7 @@ void DataConvert::joinColTypeForUnion(datatypes::SystemCatalog::TypeHolderStd& u case datatypes::SystemCatalog::UINT: case datatypes::SystemCatalog::UBIGINT: case datatypes::SystemCatalog::UDECIMAL: - + { if (type.scale != 0 && (unionedType.scale != 0 || isDecimal(unionedType.colDataType))) { const unsigned int digitsBeforeDecimal = type.precision - type.scale; @@ -3012,7 +3012,7 @@ void DataConvert::joinColTypeForUnion(datatypes::SystemCatalog::TypeHolderStd& u } break; - + } case datatypes::SystemCatalog::DATE: unionedType.colDataType = datatypes::SystemCatalog::CHAR; unionedType.colWidth = 20; @@ -3042,10 +3042,6 @@ void DataConvert::joinColTypeForUnion(datatypes::SystemCatalog::TypeHolderStd& u case datatypes::SystemCatalog::UFLOAT: case datatypes::SystemCatalog::UDOUBLE: case datatypes::SystemCatalog::LONGDOUBLE: - if (datatypes::isWideDecimalType(type.colDataType, type.colWidth)) - unionedType = type; - break; - default: break; } @@ -3249,21 +3245,13 @@ void DataConvert::joinColTypeForUnion(datatypes::SystemCatalog::TypeHolderStd& u case datatypes::SystemCatalog::UBIGINT: case datatypes::SystemCatalog::UFLOAT: case datatypes::SystemCatalog::UDOUBLE: + case datatypes::SystemCatalog::DECIMAL: + case datatypes::SystemCatalog::UDECIMAL: unionedType.colDataType = datatypes::SystemCatalog::DOUBLE; unionedType.scale = 0; unionedType.colWidth = sizeof(double); break; - case datatypes::SystemCatalog::DECIMAL: - case datatypes::SystemCatalog::UDECIMAL: - if (unionedType.colWidth != datatypes::MAXDECIMALWIDTH) - { - unionedType.colDataType = datatypes::SystemCatalog::DOUBLE; - unionedType.scale = 0; - unionedType.colWidth = sizeof(double); - } - break; - default: break; } @@ -3313,23 +3301,14 @@ void DataConvert::joinColTypeForUnion(datatypes::SystemCatalog::TypeHolderStd& u case datatypes::SystemCatalog::UFLOAT: case datatypes::SystemCatalog::UDOUBLE: case datatypes::SystemCatalog::LONGDOUBLE: + case datatypes::SystemCatalog::DECIMAL: + case datatypes::SystemCatalog::UDECIMAL: unionedType.colDataType = datatypes::SystemCatalog::LONGDOUBLE; unionedType.scale = (type.scale > unionedType.scale) ? type.scale : unionedType.scale; unionedType.colWidth = sizeof(long double); unionedType.precision = -1; break; - case datatypes::SystemCatalog::DECIMAL: - case datatypes::SystemCatalog::UDECIMAL: - if (unionedType.colWidth != datatypes::MAXDECIMALWIDTH) - { - unionedType.colDataType = datatypes::SystemCatalog::LONGDOUBLE; - unionedType.scale = (type.scale > unionedType.scale) ? type.scale : unionedType.scale; - unionedType.colWidth = sizeof(long double); - unionedType.precision = -1; - } - break; - default: break; } From 5bdeaa65554498aa7329f920c8c34a05d20a0795 Mon Sep 17 00:00:00 2001 From: Aleksei Antipovskii Date: Tue, 2 Sep 2025 02:47:01 +0200 Subject: [PATCH 6/8] Fix normalization FP -> string to match server behaviour. --- dbcon/joblist/tupleunion.cpp | 47 +++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/dbcon/joblist/tupleunion.cpp b/dbcon/joblist/tupleunion.cpp index fd9212702..6d96a6fbf 100644 --- a/dbcon/joblist/tupleunion.cpp +++ b/dbcon/joblist/tupleunion.cpp @@ -35,6 +35,8 @@ using namespace querytele; #include "resourcemanager.h" #include "tupleunion.h" +#include "m_string.h" + using namespace std; using namespace std::tr1; using namespace boost; @@ -124,20 +126,19 @@ namespace void normalizeIntToStringWithScale(const Row& in, Row* out, uint32_t i) { - ostringstream os; double d = in.getIntField(i); d /= exp10(in.getScale(i)); - os.precision(15); - os << d; - utils::NullString ns(os.str()); + char buf[datatypes::INT128MAXPRECISION + 1]; + my_bool error = 0; + auto len = my_gcvt(d, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); + idbassert(error == 0 && len <= sizeof(buf)); + utils::NullString ns(buf); out->setStringField(ns, i); } void normalizeIntToStringNoScale(const Row& in, Row* out, uint32_t i) { - ostringstream os; - os << in.getIntField(i); - utils::NullString ns(os.str()); + utils::NullString ns(std::to_string(in.getIntField(i))); out->setStringField(ns, i); } @@ -203,20 +204,19 @@ namespace void normalizeUintToStringWithScale(const Row& in, Row* out, uint32_t i) { - ostringstream os; double d = in.getUintField(i); d /= exp10(in.getScale(i)); - os.precision(15); - os << d; - utils::NullString ns(os.str()); + char buf[datatypes::INT128MAXPRECISION + 1]; + my_bool error = 0; + auto len = my_gcvt(d, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); + idbassert(error == 0 && len <= sizeof(buf)); + utils::NullString ns(buf); out->setStringField(ns, i); } void normalizeUintToStringNoScale(const Row& in, Row* out, uint32_t i) { - ostringstream os; - os << in.getUintField(i); - utils::NullString ns(os.str()); + utils::NullString ns(std::to_string(in.getUintField(i))); out->setStringField(ns, i); } @@ -514,20 +514,22 @@ namespace void normalizeXFloatToString(const Row& in, Row* out, uint32_t i) { double val = in.getFloatField(i); - ostringstream os; - os.precision(15); // to match mysql's output - os << val; - utils::NullString ns(os.str()); + char buf[datatypes::INT128MAXPRECISION + 1]; + my_bool error = 0; + auto len = my_gcvt(val, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); + idbassert(error == 0 && len <= sizeof(buf)); + utils::NullString ns(buf); out->setStringField(ns, i); } void normalizeXDoubleToString(const Row& in, Row* out, uint32_t i) { double val = in.getDoubleField(i); - ostringstream os; - os.precision(15); // to match mysql's output - os << val; - utils::NullString ns(os.str()); + char buf[datatypes::INT128MAXPRECISION + 1]; + my_bool error = 0; + auto len = my_gcvt(val, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); + idbassert(error == 0 && len <= sizeof(buf)); + utils::NullString ns(buf); out->setStringField(ns, i); } @@ -599,6 +601,7 @@ namespace void normalizeLongDoubleToString(const Row& in, Row* out, uint32_t i) { + // FIXME: ostream output looks like '1.234e+56' while MDB output is '1.234e56' long double val = in.getLongDoubleField(i); ostringstream os; os.precision(15); // to match mysql's output From 76f135b2ac3099829b9e4b295d4da29d91863044 Mon Sep 17 00:00:00 2001 From: Aleksei Antipovskii Date: Tue, 2 Sep 2025 22:29:26 +0200 Subject: [PATCH 7/8] Code cleanup and deduplication --- dbcon/execplan/calpontselectexecutionplan.cpp | 31 +- dbcon/execplan/calpontselectexecutionplan.h | 40 +-- dbcon/joblist/jlf_tuplejoblist.cpp | 134 ++++---- dbcon/joblist/jlf_tuplejoblist.h | 3 + dbcon/joblist/joblistfactory.cpp | 124 +++---- dbcon/mysql/ha_mcs_execplan.cpp | 312 +++++++----------- dbcon/mysql/ha_mcs_execplan_walks.cpp | 2 +- dbcon/mysql/ha_mcs_impl.cpp | 40 +-- dbcon/mysql/ha_mcs_impl_if.h | 23 +- dbcon/mysql/ha_pseudocolumn.cpp | 3 +- 10 files changed, 307 insertions(+), 405 deletions(-) diff --git a/dbcon/execplan/calpontselectexecutionplan.cpp b/dbcon/execplan/calpontselectexecutionplan.cpp index a45436baf..41ef90d05 100644 --- a/dbcon/execplan/calpontselectexecutionplan.cpp +++ b/dbcon/execplan/calpontselectexecutionplan.cpp @@ -84,7 +84,7 @@ CalpontSelectExecutionPlan::CalpontSelectExecutionPlan(int location) , fLimitNum(-1) , fHasOrderBy(false) , fStringScanThreshold(ULONG_MAX) - , fQueryType(SELECT) + , fQueryType(IDBQueryType::SELECT) , fPriority(querystats::DEFAULT_USER_PRIORITY_LEVEL) , fStringTableThreshold(20) , fOrderByThreads(1) @@ -491,27 +491,20 @@ string CalpontSelectExecutionPlan::toString(const size_t ident) const return output.str(); } -string CalpontSelectExecutionPlan::queryTypeToString(const uint32_t queryType) +string CalpontSelectExecutionPlan::queryTypeToString(const IDBQueryType queryType) { switch (queryType) { - case SELECT: return "SELECT"; - - case UPDATE: return "UPDATE"; - - case DELETE: return "DELETE"; - - case INSERT_SELECT: return "INSERT_SELECT"; - - case CREATE_TABLE: return "CREATE_TABLE"; - - case DROP_TABLE: return "DROP_TABLE"; - - case ALTER_TABLE: return "ALTER_TABLE"; - - case INSERT: return "INSERT"; - - case LOAD_DATA_INFILE: return "LOAD_DATA_INFILE"; + case IDBQueryType::SELECT: return "SELECT"; + case IDBQueryType::UPDATE: return "UPDATE"; + case IDBQueryType::DELETE: return "DELETE"; + case IDBQueryType::INSERT_SELECT: return "INSERT_SELECT"; + case IDBQueryType::CREATE_TABLE: return "CREATE_TABLE"; + case IDBQueryType::DROP_TABLE: return "DROP_TABLE"; + case IDBQueryType::ALTER_TABLE: return "ALTER_TABLE"; + case IDBQueryType::INSERT: return "INSERT"; + case IDBQueryType::LOAD_DATA_INFILE: return "LOAD_DATA_INFILE"; + case IDBQueryType::UNION: return "UNION"; } return "UNKNOWN"; diff --git a/dbcon/execplan/calpontselectexecutionplan.h b/dbcon/execplan/calpontselectexecutionplan.h index 9e540b9ba..127e06bd9 100644 --- a/dbcon/execplan/calpontselectexecutionplan.h +++ b/dbcon/execplan/calpontselectexecutionplan.h @@ -55,6 +55,23 @@ enum RM_PARMS UMSMALLSIDEMEMORY, }; +// query type of select plan. +// TODO: move it somewhere? +#undef DELETE // Windows defines this... +enum class IDBQueryType : uint32_t +{ + SELECT, + UPDATE, + DELETE, + INSERT_SELECT, + CREATE_TABLE, + DROP_TABLE, + ALTER_TABLE, + INSERT, + LOAD_DATA_INFILE, + UNION +}; + struct RMParam { RMParam(uint32_t s, uint16_t i, uint64_t v) : sessionId(s), id(i), value(v) @@ -97,21 +114,6 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan typedef std::vector RMParmVec; - // query type of this select plan. -#undef DELETE // Windows defines this... - enum IDB_QUERYTYPE - { - SELECT, - UPDATE, - DELETE, - INSERT_SELECT, - CREATE_TABLE, - DROP_TABLE, - ALTER_TABLE, - INSERT, - LOAD_DATA_INFILE - }; - enum SE_LOCATION { MAIN, @@ -641,7 +643,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan } // query type. return string for easy stats insert - void queryType(const uint32_t queryType) + void queryType(const IDBQueryType queryType) { fQueryType = queryType; } @@ -649,7 +651,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan { return queryTypeToString(fQueryType); } - static std::string queryTypeToString(const uint32_t queryType); + static std::string queryTypeToString(const IDBQueryType queryType); void priority(uint32_t p) { @@ -709,7 +711,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan { fDJSMaxPartitionTreeDepth = value; } - uint64_t djsMaxPartitionTreeDepth() + uint64_t djsMaxPartitionTreeDepth() const { return fDJSMaxPartitionTreeDepth; } @@ -947,7 +949,7 @@ class CalpontSelectExecutionPlan : public CalpontExecutionPlan uint64_t fStringScanThreshold = ULONG_MAX; // query type - uint32_t fQueryType = SELECT; + IDBQueryType fQueryType{IDBQueryType::SELECT}; uint32_t fPriority; uint32_t fStringTableThreshold = 20; diff --git a/dbcon/joblist/jlf_tuplejoblist.cpp b/dbcon/joblist/jlf_tuplejoblist.cpp index c256351ec..0296f6d60 100644 --- a/dbcon/joblist/jlf_tuplejoblist.cpp +++ b/dbcon/joblist/jlf_tuplejoblist.cpp @@ -499,67 +499,7 @@ void adjustLastStep(JobStepVector& querySteps, DeliveredTableMap& deliverySteps, deliverySteps[CNX_VTABLE_ID] = ws; } - // TODO MCOL-894 we don't need to run sorting|distinct - // every time - // if ((jobInfo.limitCount != (uint64_t) - 1) || - // (jobInfo.constantCol == CONST_COL_EXIST) || - // (jobInfo.hasDistinct)) - // { - if (jobInfo.annexStep.get() == NULL) - jobInfo.annexStep.reset(new TupleAnnexStep(jobInfo)); - - TupleAnnexStep* tas = dynamic_cast(jobInfo.annexStep.get()); - tas->setLimit(jobInfo.limitStart, jobInfo.limitCount); - - if (jobInfo.orderByColVec.size() > 0) - { - tas->addOrderBy(new LimitedOrderBy()); - if (jobInfo.orderByThreads > 1) - tas->setParallelOp(); - tas->setMaxThreads(jobInfo.orderByThreads); - } - - if (jobInfo.constantCol == CONST_COL_EXIST) - tas->addConstant(new TupleConstantStep(jobInfo)); - - if (jobInfo.hasDistinct) - tas->setDistinct(); - - // } - - if (jobInfo.annexStep) - { - TupleDeliveryStep* ds = dynamic_cast(deliverySteps[CNX_VTABLE_ID].get()); - RowGroup rg2 = ds->getDeliveredRowGroup(); - - if (jobInfo.trace) - cout << "Output RowGroup 2: " << rg2.toString() << endl; - - AnyDataListSPtr spdlIn(new AnyDataList()); - RowGroupDL* dlIn; - if (jobInfo.orderByColVec.size() > 0) - dlIn = new RowGroupDL(jobInfo.orderByThreads, jobInfo.fifoSize); - else - dlIn = new RowGroupDL(1, jobInfo.fifoSize); - dlIn->OID(CNX_VTABLE_ID); - spdlIn->rowGroupDL(dlIn); - JobStepAssociation jsaIn; - jsaIn.outAdd(spdlIn); - dynamic_cast(ds)->outputAssociation(jsaIn); - jobInfo.annexStep->inputAssociation(jsaIn); - - AnyDataListSPtr spdlOut(new AnyDataList()); - RowGroupDL* dlOut = new RowGroupDL(1, jobInfo.fifoSize); - dlOut->OID(CNX_VTABLE_ID); - spdlOut->rowGroupDL(dlOut); - JobStepAssociation jsaOut; - jsaOut.outAdd(spdlOut); - jobInfo.annexStep->outputAssociation(jsaOut); - - querySteps.push_back(jobInfo.annexStep); - dynamic_cast(jobInfo.annexStep.get())->initialize(rg2, jobInfo); - deliverySteps[CNX_VTABLE_ID] = jobInfo.annexStep; - } + addAnnexStep(querySteps, deliverySteps, jobInfo); // Check if constant false if (jobInfo.constantFalse) @@ -4407,6 +4347,78 @@ void makeNoTableJobStep(JobStepVector& querySteps, JobStepVector& projectSteps, namespace joblist { + +void addAnnexStep(JobStepVector& querySteps, DeliveredTableMap& deliverySteps, JobInfo& jobInfo, + IDBQueryType queryType) +{ + // TODO MCOL-894 we don't need to run sorting|distinct + // every time + // if ((jobInfo.limitCount != (uint64_t) - 1) || + // (jobInfo.constantCol == CONST_COL_EXIST) || + // (jobInfo.hasDistinct)) + // { + if (!jobInfo.annexStep) + { + jobInfo.annexStep.reset(new TupleAnnexStep(jobInfo)); + } + + auto* tas = dynamic_cast(jobInfo.annexStep.get()); + tas->setLimit(jobInfo.limitStart, jobInfo.limitCount); + + if (!jobInfo.orderByColVec.empty()) + { + tas->addOrderBy(new LimitedOrderBy()); + if (jobInfo.orderByThreads > 1) + tas->setParallelOp(); + tas->setMaxThreads(jobInfo.orderByThreads); + } + + if (queryType != IDBQueryType::UNION) + { + if (jobInfo.constantCol == CONST_COL_EXIST) + tas->addConstant(new TupleConstantStep(jobInfo)); + + if (jobInfo.hasDistinct) + tas->setDistinct(); + } + // } + + auto* tds = dynamic_cast(deliverySteps[CNX_VTABLE_ID].get()); + RowGroup rg = tds->getDeliveredRowGroup(); + + if (jobInfo.trace) + cout << "Output RowGroup 2: " << rg.toString() << endl; + + AnyDataListSPtr spdlIn(new AnyDataList()); + RowGroupDL* dlIn; + if (jobInfo.orderByColVec.empty()) + { + dlIn = new RowGroupDL(1, jobInfo.fifoSize); + } + else + { + dlIn = new RowGroupDL(jobInfo.orderByThreads, jobInfo.fifoSize); + } + dlIn->OID(CNX_VTABLE_ID); + spdlIn->rowGroupDL(dlIn); + JobStepAssociation jsaIn; + jsaIn.outAdd(spdlIn); + dynamic_cast(tds)->outputAssociation(jsaIn); + jobInfo.annexStep->inputAssociation(jsaIn); + + AnyDataListSPtr spdlOut(new AnyDataList()); + RowGroupDL* dlOut = new RowGroupDL(1, jobInfo.fifoSize); + dlOut->OID(CNX_VTABLE_ID); + spdlOut->rowGroupDL(dlOut); + JobStepAssociation jsaOut; + jsaOut.outAdd(spdlOut); + jobInfo.annexStep->outputAssociation(jsaOut); + + querySteps.push_back(jobInfo.annexStep); + dynamic_cast(jobInfo.annexStep.get())->initialize(rg, jobInfo); + deliverySteps[CNX_VTABLE_ID] = jobInfo.annexStep; +} + void associateTupleJobSteps(JobStepVector& querySteps, JobStepVector& projectSteps, DeliveredTableMap& deliverySteps, JobInfo& jobInfo, const bool overrideLargeSideEstimate) diff --git a/dbcon/joblist/jlf_tuplejoblist.h b/dbcon/joblist/jlf_tuplejoblist.h index b49c9840c..423c9cf1c 100644 --- a/dbcon/joblist/jlf_tuplejoblist.h +++ b/dbcon/joblist/jlf_tuplejoblist.h @@ -131,6 +131,9 @@ void orExpresssion(const execplan::Operator* op, JobInfo& jobInfo); // union the queries and return the tuple union step SJSTEP unionQueries(JobStepVector& queries, uint64_t distinctUnionNum, JobInfo& jobInfo, uint32_t keyCount); +void addAnnexStep(JobStepVector& querySteps, DeliveredTableMap& deliverySteps, JobInfo& jobInfo, + IDBQueryType queryType = execplan::IDBQueryType::SELECT); + // Used for join graph analysis. // WHITE - node is not processed. // GREY - node is in process. diff --git a/dbcon/joblist/joblistfactory.cpp b/dbcon/joblist/joblistfactory.cpp index c4e85005c..5b833327d 100644 --- a/dbcon/joblist/joblistfactory.cpp +++ b/dbcon/joblist/joblistfactory.cpp @@ -42,11 +42,7 @@ using namespace boost; #include "mcsanalyzetableexecutionplan.h" #include "calpontsystemcatalog.h" #include "dbrm.h" -#include "filter.h" #include "simplefilter.h" -#include "constantfilter.h" -#include "existsfilter.h" -#include "selectfilter.h" #include "returnedcolumn.h" #include "aggregatecolumn.h" #include "windowfunctioncolumn.h" @@ -57,7 +53,6 @@ using namespace boost; #include "pseudocolumn.h" #include "simplecolumn.h" #include "rowcolumn.h" -#include "treenodeimpl.h" #include "udafcolumn.h" using namespace execplan; @@ -73,11 +68,9 @@ using namespace logging; #include "primitivestep.h" #include "jl_logger.h" #include "jlf_execplantojoblist.h" -#include "rowaggregation.h" #include "tuplehashjoin.h" #include "tupleunion.h" #include "expressionstep.h" -#include "tupleconstantstep.h" #include "tuplehavingstep.h" #include "windowfunctionstep.h" #include "tupleannexstep.h" @@ -1944,6 +1937,43 @@ void makeAnalyzeTableJobSteps(MCSAnalyzeTableExecutionPlan* caep, JobInfo& jobIn } } +void fixUnionExpressionCol(ParseTree* tree, void* obj) +{ + if (tree->left() || tree->right()) + { + return; + } + auto* ac = dynamic_cast(tree->data()); + if (ac && ac->expression()) + { + ac->expression()->walk(fixUnionExpressionCol, obj); + ac->setSimpleColumnList(); + return; + } + auto* fc = dynamic_cast(tree->data()); + if (fc && !fc->functionParms().empty()) + { + for (auto& parm : fc->functionParms()) + { + parm->walk(fixUnionExpressionCol, obj); + } + fc->setSimpleColumnList(); + return; + } + auto* csep = static_cast(obj); + auto* rc = dynamic_cast(tree->data()); + if (rc) + { + if (dynamic_cast(rc) || rc->orderPos() == -1ull) + { + return; + } + auto* newrc = csep->returnedCols()[rc->orderPos()]->clone(); + csep->returnedCols()[rc->orderPos()]->incRefCount(); + tree->data(newrc); + } +} + } // namespace namespace joblist @@ -1985,43 +2015,6 @@ void makeJobSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobStepVec makeVtableModeSteps(csep, jobInfo, querySteps, projectSteps, deliverySteps); } -void fixUnionExpressionCol(ParseTree* tree, void* obj) -{ - if (tree->left() || tree->right()) - { - return; - } - auto* ac = dynamic_cast(tree->data()); - if (ac && ac->expression()) - { - ac->expression()->walk(fixUnionExpressionCol, obj); - ac->setSimpleColumnList(); - return; - } - auto* fc = dynamic_cast(tree->data()); - if (fc && !fc->functionParms().empty()) - { - for (auto& parm : fc->functionParms()) - { - parm->walk(fixUnionExpressionCol, obj); - } - fc->setSimpleColumnList(); - return; - } - auto* csep = static_cast(obj); - auto* rc = dynamic_cast(tree->data()); - if (rc) - { - if (dynamic_cast(rc) || rc->orderPos() == -1ull) - { - return; - } - auto* newrc = csep->returnedCols()[rc->orderPos()]->clone(); - csep->returnedCols()[rc->orderPos()]->incRefCount(); - tree->data(newrc); - } -} - void makeUnionJobSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobStepVector& querySteps, JobStepVector& /*projectSteps*/, DeliveredTableMap& deliverySteps) { @@ -2030,7 +2023,7 @@ void makeUnionJobSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobSt uint32_t unionRetColsCount = csep->returnedCols().size(); JobStepVector unionFeeders; - std::decay_torderByCols())> expOrderByCols; + std::remove_cv_torderByCols())>> expOrderByCols; for (auto& obc : csep->orderByCols()) { if (obc->orderPos() != -1ull) @@ -2091,6 +2084,7 @@ void makeUnionJobSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobSt uint16_t stepNo = jobInfo.subId * 10000; numberSteps(querySteps, stepNo, jobInfo.traceFlags); deliverySteps[execplan::CNX_VTABLE_ID] = unionStep; + if (!csep->orderByCols().empty() || csep->limitStart() != 0 || csep->limitNum() != -1ull) { jobInfo.limitStart = csep->limitStart(); @@ -2139,45 +2133,7 @@ void makeUnionJobSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobSt } doProject(csep->returnedCols(), jobInfo); checkReturnedColumns(csep, jobInfo); - auto* tas = new TupleAnnexStep(jobInfo); - jobInfo.annexStep.reset(tas); - tas->setLimit(jobInfo.limitStart, jobInfo.limitCount); - if (!jobInfo.orderByColVec.empty()) - { - tas->addOrderBy(new LimitedOrderBy()); - if (jobInfo.orderByThreads > 1) - { - tas->setParallelOp(); - } - tas->setMaxThreads(jobInfo.orderByThreads); - } - auto* tds = dynamic_cast(unionStep.get()); - RowGroup rg = tds->getDeliveredRowGroup(); - - AnyDataListSPtr spdlIn(new AnyDataList()); - RowGroupDL* dlIn; - if (!jobInfo.orderByColVec.empty()) - dlIn = new RowGroupDL(jobInfo.orderByThreads, jobInfo.fifoSize); - else - dlIn = new RowGroupDL(1, jobInfo.fifoSize); - dlIn->OID(CNX_VTABLE_ID); - spdlIn->rowGroupDL(dlIn); - JobStepAssociation jsaIn; - jsaIn.outAdd(spdlIn); - dynamic_cast(tds)->outputAssociation(jsaIn); - jobInfo.annexStep->inputAssociation(jsaIn); - - AnyDataListSPtr spdlOut(new AnyDataList()); - RowGroupDL* dlOut = new RowGroupDL(1, jobInfo.fifoSize); - dlOut->OID(CNX_VTABLE_ID); - spdlOut->rowGroupDL(dlOut); - JobStepAssociation jsaOut; - jsaOut.outAdd(spdlOut); - jobInfo.annexStep->outputAssociation(jsaOut); - - querySteps.push_back(jobInfo.annexStep); - dynamic_cast(jobInfo.annexStep.get())->initialize(rg, jobInfo); - deliverySteps[CNX_VTABLE_ID] = jobInfo.annexStep; + addAnnexStep(querySteps, deliverySteps, jobInfo, IDBQueryType::UNION); } } } // namespace joblist diff --git a/dbcon/mysql/ha_mcs_execplan.cpp b/dbcon/mysql/ha_mcs_execplan.cpp index 22aa1d267..4f7c117c7 100644 --- a/dbcon/mysql/ha_mcs_execplan.cpp +++ b/dbcon/mysql/ha_mcs_execplan.cpp @@ -60,7 +60,6 @@ using namespace logging; #include "ha_subquery.h" #include "ha_mcs_pushdown.h" #include "ha_tzinfo.h" -#include "ha_mcs_logging.h" using namespace cal_impl_if; #include "aggregatecolumn.h" @@ -70,7 +69,6 @@ using namespace cal_impl_if; #include "calpontsystemcatalog.h" #include "constantcolumn.h" #include "constantfilter.h" -#include "existsfilter.h" #include "functioncolumn.h" #include "groupconcatcolumn.h" #include "intervalcolumn.h" @@ -80,10 +78,8 @@ using namespace cal_impl_if; #include "rewrites.h" #include "rowcolumn.h" #include "rulebased_optimizer.h" -#include "selectfilter.h" #include "simplecolumn_decimal.h" #include "simplecolumn_int.h" -#include "simplecolumn_uint.h" #include "simplefilter.h" #include "udafcolumn.h" using namespace execplan; @@ -2736,7 +2732,7 @@ ReturnedColumn* buildReturnedColumnNull(gp_walk_info& gwi) } ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& nonSupport, bool /*isRefItem*/, - bool isUnion) + IDBQueryType queryType) { ReturnedColumn* rc = NULL; @@ -2758,7 +2754,7 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non { Item_field* ifp = (Item_field*)item; - return wrapIntoAggregate(buildSimpleColumn(ifp, gwi, isUnion), gwi, ifp); + return wrapIntoAggregate(buildSimpleColumn(ifp, gwi, queryType), gwi, ifp); } case Item::NULL_ITEM: return buildReturnedColumnNull(gwi); case Item::CONST_ITEM: @@ -2797,10 +2793,10 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non } if (func_name == "+" || func_name == "-" || func_name == "*" || func_name == "/") - return buildArithmeticColumn(ifp, gwi, nonSupport, isUnion); + return buildArithmeticColumn(ifp, gwi, nonSupport, queryType); else { - return buildFunctionColumn(ifp, gwi, nonSupport, false, isUnion); + return buildFunctionColumn(ifp, gwi, nonSupport, false, queryType); } } @@ -2817,13 +2813,13 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non { case Item::SUM_FUNC_ITEM: return buildAggregateColumn(*(ref->ref), gwi); - case Item::FIELD_ITEM: return buildReturnedColumn(*(ref->ref), gwi, nonSupport, false, isUnion); + case Item::FIELD_ITEM: return buildReturnedColumn(*(ref->ref), gwi, nonSupport, false, queryType); case Item::REF_ITEM: - return buildReturnedColumn(*(((Item_ref*)(*(ref->ref)))->ref), gwi, nonSupport, false, isUnion); + return buildReturnedColumn(*(((Item_ref*)(*(ref->ref)))->ref), gwi, nonSupport, false, queryType); case Item::FUNC_ITEM: - return buildFunctionColumn((Item_func*)(*(ref->ref)), gwi, nonSupport, false, isUnion); + return buildFunctionColumn((Item_func*)(*(ref->ref)), gwi, nonSupport, false, queryType); case Item::WINDOW_FUNC_ITEM: return buildWindowFunctionColumn(*(ref->ref), gwi, nonSupport); @@ -2835,7 +2831,7 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non default: if (ref->ref_type() == Item_ref::DIRECT_REF) { - return buildReturnedColumn(ref->real_item(), gwi, nonSupport, false, isUnion); + return buildReturnedColumn(ref->real_item(), gwi, nonSupport, false, queryType); } gwi.fatalParseError = true; gwi.parseErrorText = "Unknown REF item"; @@ -2925,11 +2921,11 @@ ReturnedColumn* buildReturnedColumnBody(Item* item, gp_walk_info& gwi, bool& non return rc; } ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupport, bool isRefItem, - bool isUnion) + IDBQueryType queryType) { bool disableWrapping = gwi.disableWrapping; gwi.disableWrapping = gwi.disableWrapping || itemDisablesWrapping(item, gwi); - ReturnedColumn* rc = buildReturnedColumnBody(item, gwi, nonSupport, isRefItem, isUnion); + ReturnedColumn* rc = buildReturnedColumnBody(item, gwi, nonSupport, isRefItem, queryType); gwi.disableWrapping = disableWrapping; return rc; } @@ -2963,7 +2959,8 @@ ReturnedColumn* buildBooleanConstantColumn(Item* item, gp_walk_info& gwi, bool& return cc; } -ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bool& nonSupport, bool isUnion) +ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bool& nonSupport, + IDBQueryType queryType) { if (get_fe_conn_info_ptr() == NULL) { @@ -2992,7 +2989,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo if (gwi.clauseType == SELECT || /*gwi.clauseType == HAVING || */ gwi.clauseType == GROUP_BY || gwi.clauseType == FROM) // select list { - lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); + lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, queryType)); if (!lhs->data() && (sfitempp[0]->type() == Item::FUNC_ITEM)) { @@ -3007,12 +3004,12 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo gwi.fatalParseError = false; // ReturnedColumn* rc = buildAggFrmTempField(sfitempp[0], gwi); - ReturnedColumn* rc = buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion); + ReturnedColumn* rc = buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, queryType); if (rc) lhs = new ParseTree(rc); } - rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, isUnion)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, queryType)); if (!rhs->data() && (sfitempp[1]->type() == Item::FUNC_ITEM)) { @@ -3027,7 +3024,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo gwi.fatalParseError = false; // ReturnedColumn* rc = buildAggFrmTempField(sfitempp[1], gwi); - ReturnedColumn* rc = buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, isUnion); + ReturnedColumn* rc = buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, queryType); if (rc) rhs = new ParseTree(rc); } @@ -3038,7 +3035,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo { if (gwi.ptWorkStack.empty()) { - rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, isUnion)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, queryType)); } else { @@ -3050,7 +3047,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo { if (gwi.rcWorkStack.empty()) { - rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, isUnion)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[1], gwi, nonSupport, false, queryType)); } else { @@ -3063,7 +3060,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo { if (gwi.ptWorkStack.empty()) { - lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); + lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, queryType)); } else { @@ -3075,7 +3072,7 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo { if (gwi.rcWorkStack.empty()) { - lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); + lhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, queryType)); } else { @@ -3108,13 +3105,13 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo if (gwi.clauseType == SELECT || gwi.clauseType == HAVING || gwi.clauseType == GROUP_BY) // select clause { - rhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, queryType)); } else { if (gwi.rcWorkStack.empty()) { - rhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, isUnion)); + rhs = new ParseTree(buildReturnedColumn(sfitempp[0], gwi, nonSupport, false, queryType)); } else { @@ -3236,17 +3233,18 @@ ReturnedColumn* buildArithmeticColumnBody(Item_func* item, gp_walk_info& gwi, bo } return ac; } -ReturnedColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport, bool isUnion) +ReturnedColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport, + IDBQueryType queryType) { bool disableWrapping = gwi.disableWrapping; gwi.disableWrapping = gwi.disableWrapping || itemDisablesWrapping(item, gwi); - ReturnedColumn* rc = buildArithmeticColumnBody(item, gwi, nonSupport, isUnion); + ReturnedColumn* rc = buildArithmeticColumnBody(item, gwi, nonSupport, queryType); gwi.disableWrapping = disableWrapping; return rc; } ReturnedColumn* buildFunctionColumnBody(Item_func* ifp, gp_walk_info& gwi, bool& nonSupport, - bool selectBetweenIn, bool isUnion) + bool selectBetweenIn, IDBQueryType queryType) { if (get_fe_conn_info_ptr() == NULL) { @@ -3309,12 +3307,12 @@ ReturnedColumn* buildFunctionColumnBody(Item_func* ifp, gp_walk_info& gwi, bool& // Arithmetic exp if (funcName == "+" || funcName == "-" || funcName == "*" || funcName == "/") { - return buildArithmeticColumn(ifp, gwi, nonSupport, isUnion); + return buildArithmeticColumn(ifp, gwi, nonSupport, queryType); } else if (funcName == "case") { - fc = buildCaseFunction(ifp, gwi, nonSupport, isUnion); + fc = buildCaseFunction(ifp, gwi, nonSupport, queryType); } else if ((funcName == "charset" || funcName == "collation") && ifp->argument_count() == 1 && @@ -3489,7 +3487,7 @@ ReturnedColumn* buildFunctionColumnBody(Item_func* ifp, gp_walk_info& gwi, bool& rc = buildBooleanConstantColumn(ifp->arguments()[i], gwi, nonSupport); else { - rc = buildReturnedColumn(ifp->arguments()[i], gwi, nonSupport, false, isUnion); + rc = buildReturnedColumn(ifp->arguments()[i], gwi, nonSupport, false, queryType); } // MCOL-1510 It must be a temp table field, so find the corresponding column. @@ -3857,16 +3855,17 @@ ReturnedColumn* buildFunctionColumnBody(Item_func* ifp, gp_walk_info& gwi, bool& return fc; } ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& nonSupport, bool selectBetweenIn, - bool isUnion) + IDBQueryType queryType) { bool disableWrapping = gwi.disableWrapping; gwi.disableWrapping = gwi.disableWrapping || itemDisablesWrapping(ifp, gwi); - ReturnedColumn* rc = buildFunctionColumnBody(ifp, gwi, nonSupport, selectBetweenIn, isUnion); + ReturnedColumn* rc = buildFunctionColumnBody(ifp, gwi, nonSupport, selectBetweenIn, queryType); gwi.disableWrapping = disableWrapping; return rc; } -FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonSupport, bool isUnion) +FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonSupport, + IDBQueryType queryType) { if (get_fe_conn_info_ptr() == NULL) { @@ -3949,7 +3948,7 @@ FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonS // rwWorkStack or ptWorkStack. // For example, simple predicates, such as 1=1 or 1=0, land in the // ptWorkStack but other stuff might land in the rwWorkStack - ReturnedColumn* parm = buildReturnedColumn(item->arguments()[i], gwi, nonSupport, false, isUnion); + ReturnedColumn* parm = buildReturnedColumn(item->arguments()[i], gwi, nonSupport, false, queryType); if (parm) { @@ -4089,7 +4088,7 @@ ConstantColumn* buildDecimalColumn(const Item* idp, const std::string& valStr, g return cc; } -SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi, bool isUnion) +SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi, IDBQueryType queryType) { if (!gwi.csc) { @@ -4104,7 +4103,7 @@ SimpleColumn* buildSimpleColumn(Item_field* ifp, gp_walk_info& gwi, bool isUnion strcmp(ifp->cached_table->db.str, "information_schema") == 0) isInformationSchema = true; - if (isUnion && !isInformationSchema) + if (queryType == IDBQueryType::UNION && !isInformationSchema) { auto* rc = gwi.returnedCols[ifp->field->field_index]->clone(); rc->orderPos(ifp->field->field_index); @@ -4569,7 +4568,7 @@ ReturnedColumn* buildAggregateColumnBody(Item* item, gp_walk_info& gwi) case Item::FIELD_ITEM: { Item_field* ifp = static_cast(sfitemp); - SimpleColumn* sc = buildSimpleColumn(ifp, gwi, false); + SimpleColumn* sc = buildSimpleColumn(ifp, gwi); if (!sc) { @@ -5686,7 +5685,7 @@ int processGroupBy(SELECT_LEX& select_lex, gp_walk_info& gwi, const bool withRol { Item_field* ifp = (Item_field*)groupItem; // this GB col could be an alias of F&E on the SELECT clause, not necessarily a field. - ReturnedColumn* rc = buildSimpleColumn(ifp, gwi, false); + ReturnedColumn* rc = buildSimpleColumn(ifp, gwi); SimpleColumn* sc = dynamic_cast(rc); if (sc) @@ -6210,7 +6209,8 @@ int processLimitAndOffset(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep if (gwi.subSelectType != CalpontSelectExecutionPlan::IN_SUBS && gwi.subSelectType != CalpontSelectExecutionPlan::EXISTS_SUBS) { - if (select_lex.master_unit()->global_parameters()->limit_params.explicit_limit) { + if (select_lex.master_unit()->global_parameters()->limit_params.explicit_limit) + { if (select_lex.master_unit()->global_parameters()->limit_params.offset_limit) { Item_int* offset = @@ -6434,7 +6434,7 @@ int processSelect(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, vector collectAllCols(gwi, ifp); break; } - SimpleColumn* sc = buildSimpleColumn(ifp, gwi, false); + SimpleColumn* sc = buildSimpleColumn(ifp, gwi); if (sc) { @@ -6840,6 +6840,85 @@ int processSelect(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, vector return 0; } +int processOrderByCol(const ORDER* ordercol, gp_walk_info& gwi, IDBQueryType queryType = IDBQueryType::SELECT) +{ + ReturnedColumn* rc = nullptr; + + if (ordercol->in_field_list && (ordercol->counter_used || ((*ordercol->item)->type() == Item::FIELD_ITEM && + queryType == IDBQueryType::UNION))) + { + auto* ifp = dynamic_cast(*ordercol->item); + auto pos = ordercol->counter_used ? ordercol->counter - 1 : ifp->field->field_index; + rc = gwi.returnedCols[pos]->clone(); + rc->orderPos(pos); + // can not be optimized off if used in order by with counter. + // set with self derived table alias if it's derived table + gwi.returnedCols[pos]->incRefCount(); + } + else + { + Item* ord_item = *ordercol->item; + + // ignore not_used column on order by. + if ((ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) && + ord_item->full_name() && !strcmp(ord_item->full_name(), "Not_used")) + { + return 0; + } + else if (ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) + { + // DRRTUY This section looks useless b/c there is no + // way to put constant INT into an ORDER BY list + rc = gwi.returnedCols[((Item_int*)ord_item)->val_int() - 1]->clone(); + } + else if (ord_item->type() == Item::SUBSELECT_ITEM) + { + gwi.fatalParseError = true; + } + else if ((ord_item->type() == Item::FUNC_ITEM) && + (((Item_func*)ord_item)->functype() == Item_func::COLLATE_FUNC)) + { + push_warning(gwi.thd, Sql_condition::WARN_LEVEL_NOTE, WARN_OPTION_IGNORED, + "COLLATE is ignored in ColumnStore"); + return 0; + } + else + { + rc = buildReturnedColumn(ord_item, gwi, gwi.fatalParseError, false, queryType); + + rc = wrapIntoAggregate(rc, gwi, ord_item); + } + // @bug5501 try item_ptr if item can not be fixed. For some + // weird dml statement state, item can not be fixed but the + // infomation is available in item_ptr. + if (!rc || gwi.fatalParseError) + { + Item* item_ptr = ordercol->item_ptr; + + while (item_ptr->type() == Item::REF_ITEM) + item_ptr = *((Item_ref*)item_ptr)->ref; + + rc = buildReturnedColumn(item_ptr, gwi, gwi.fatalParseError, false, queryType); + } + + if (!rc) + { + string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); + gwi.parseErrorText = emsg; + setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi); + return ER_CHECK_NOT_IMPLEMENTED; + } + } + + if (ordercol->direction == ORDER::ORDER_ASC) + rc->asc(true); + else + rc->asc(false); + + gwi.orderByCols.emplace_back(rc); + return 0; +} + /*@brief Process ORDER BY part of a query or sub-query */ /*********************************************************** * DESCRIPTION: @@ -6886,77 +6965,11 @@ int processOrderBy(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, for (; ordercol; ordercol = ordercol->next) { - ReturnedColumn* rc = NULL; - - if (ordercol->in_field_list && ordercol->counter_used) + if (auto ret = processOrderByCol(ordercol, gwi); ret != 0) { - rc = gwi.returnedCols[ordercol->counter - 1]->clone(); - rc->orderPos(ordercol->counter - 1); - // can not be optimized off if used in order by with counter. - // set with self derived table alias if it's derived table - gwi.returnedCols[ordercol->counter - 1]->incRefCount(); + // Errors have already been reported. + return ret; } - else - { - Item* ord_item = *(ordercol->item); - - // ignore not_used column on order by. - if ((ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) && - ord_item->full_name() && !strcmp(ord_item->full_name(), "Not_used")) - { - continue; - } - else if (ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) - { - // DRRTUY This section looks useless b/c there is no - // way to put constant INT into an ORDER BY list - rc = gwi.returnedCols[((Item_int*)ord_item)->val_int() - 1]->clone(); - } - else if (ord_item->type() == Item::SUBSELECT_ITEM) - { - gwi.fatalParseError = true; - } - else if ((ord_item->type() == Item::FUNC_ITEM) && - (((Item_func*)ord_item)->functype() == Item_func::COLLATE_FUNC)) - { - push_warning(gwi.thd, Sql_condition::WARN_LEVEL_NOTE, WARN_OPTION_IGNORED, - "COLLATE is ignored in ColumnStore"); - continue; - } - else - { - rc = buildReturnedColumn(ord_item, gwi, gwi.fatalParseError); - - rc = wrapIntoAggregate(rc, gwi, ord_item); - } - // @bug5501 try item_ptr if item can not be fixed. For some - // weird dml statement state, item can not be fixed but the - // infomation is available in item_ptr. - if (!rc || gwi.fatalParseError) - { - Item* item_ptr = ordercol->item_ptr; - - while (item_ptr->type() == Item::REF_ITEM) - item_ptr = *(((Item_ref*)item_ptr)->ref); - - rc = buildReturnedColumn(item_ptr, gwi, gwi.fatalParseError); - } - - if (!rc) - { - string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); - gwi.parseErrorText = emsg; - setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi); - return ER_CHECK_NOT_IMPLEMENTED; - } - } - - if (ordercol->direction == ORDER::ORDER_ASC) - rc->asc(true); - else - rc->asc(false); - - gwi.orderByCols.push_back(SRCP(rc)); } } @@ -7042,80 +7055,11 @@ int processOrderBy(SELECT_LEX& select_lex, gp_walk_info& gwi, SCSEP& csep, for (; ordercol; ordercol = ordercol->next) { - ReturnedColumn* rc = NULL; - - if (ordercol->in_field_list && ordercol->item && - (ordercol->counter_used || (*ordercol->item)->type() == Item::FIELD_ITEM)) + if (auto ret = processOrderByCol(ordercol, gwi, IDBQueryType::UNION); ret != 0) { - auto* ifp = dynamic_cast(*ordercol->item); - auto pos = ordercol->counter_used ? ordercol->counter - 1 : ifp->field->field_index; - rc = gwi.returnedCols[pos]->clone(); - rc->orderPos(pos); - // can not be optimized off if used in order by with counter. - // set with self derived table alias if it's derived table - gwi.returnedCols[pos]->incRefCount(); + // Errors have already been reported. + return ret; } - else - { - Item* ord_item = *(ordercol->item); - - // ignore not_used column on order by. - if ((ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) && - ord_item->full_name() && !strcmp(ord_item->full_name(), "Not_used")) - { - continue; - } - else if (ord_item->type() == Item::CONST_ITEM && ord_item->cmp_type() == INT_RESULT) - { - // DRRTUY This section looks useless b/c there is no - // way to put constant INT into an ORDER BY list - rc = gwi.returnedCols[((Item_int*)ord_item)->val_int() - 1]->clone(); - } - else if (ord_item->type() == Item::SUBSELECT_ITEM) - { - gwi.fatalParseError = true; - } - else if ((ord_item->type() == Item::FUNC_ITEM) && - (((Item_func*)ord_item)->functype() == Item_func::COLLATE_FUNC)) - { - push_warning(gwi.thd, Sql_condition::WARN_LEVEL_NOTE, WARN_OPTION_IGNORED, - "COLLATE is ignored in ColumnStore"); - continue; - } - else - { - rc = buildReturnedColumn(ord_item, gwi, gwi.fatalParseError, false, true); - - rc = wrapIntoAggregate(rc, gwi, ord_item); - } - // @bug5501 try item_ptr if item can not be fixed. For some - // weird dml statement state, item can not be fixed but the - // infomation is available in item_ptr. - if (!rc || gwi.fatalParseError) - { - Item* item_ptr = ordercol->item_ptr; - - while (item_ptr->type() == Item::REF_ITEM) - item_ptr = *(((Item_ref*)item_ptr)->ref); - - rc = buildReturnedColumn(item_ptr, gwi, gwi.fatalParseError, false, true); - } - - if (!rc) - { - string emsg = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORT_ORDER_BY); - gwi.parseErrorText = emsg; - setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, emsg, gwi); - return ER_CHECK_NOT_IMPLEMENTED; - } - } - - if (ordercol->direction == ORDER::ORDER_ASC) - rc->asc(true); - else - rc->asc(false); - - gwi.orderByCols.push_back(SRCP(rc)); } } @@ -7212,7 +7156,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i for (uint32_t i = 0; i < funcFieldVec.size(); i++) { - SimpleColumn* sc = buildSimpleColumn(funcFieldVec[i], gwi, false); + SimpleColumn* sc = buildSimpleColumn(funcFieldVec[i], gwi); if (!sc || gwi.fatalParseError) { @@ -7269,7 +7213,7 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i SRCP minSc; // min width projected column. for count(*) use - bool unionSel = (!isUnion && select_lex.master_unit()->is_unit_op()) ? true : false; + bool unionSel = !isUnion && select_lex.master_unit()->is_unit_op(); gwi.clauseType = GROUP_BY; // Group by list. not valid for union main query diff --git a/dbcon/mysql/ha_mcs_execplan_walks.cpp b/dbcon/mysql/ha_mcs_execplan_walks.cpp index 204bd290e..802f382c6 100644 --- a/dbcon/mysql/ha_mcs_execplan_walks.cpp +++ b/dbcon/mysql/ha_mcs_execplan_walks.cpp @@ -119,7 +119,7 @@ void gp_walk(const Item* item, void* arg) if (ifp) { // XXX: this looks awfuly wrong. - execplan::SimpleColumn* scp = buildSimpleColumn(ifp, *gwip, false); + execplan::SimpleColumn* scp = buildSimpleColumn(ifp, *gwip); if (!scp) break; diff --git a/dbcon/mysql/ha_mcs_impl.cpp b/dbcon/mysql/ha_mcs_impl.cpp index 193ad38ea..81fb89338 100644 --- a/dbcon/mysql/ha_mcs_impl.cpp +++ b/dbcon/mysql/ha_mcs_impl.cpp @@ -30,8 +30,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -41,7 +40,6 @@ #include #include -#include "mcs_basic_types.h" #include "idb_mysql.h" #define NEED_CALPONT_INTERFACE @@ -68,7 +66,6 @@ using namespace messageqcpp; #include "dmlpackage.h" #include "calpontdmlpackage.h" -#include "insertdmlpackage.h" #include "vendordmlstatement.h" #include "calpontdmlfactory.h" using namespace dmlpackage; @@ -88,28 +85,19 @@ using namespace BRM; #include "querystats.h" using namespace querystats; -#include "calpontselectexecutionplan.h" #include "mcsanalyzetableexecutionplan.h" #include "calpontsystemcatalog.h" #include "simplecolumn_int.h" #include "simplecolumn_decimal.h" -#include "aggregatecolumn.h" #include "constantcolumn.h" #include "simplefilter.h" -#include "constantfilter.h" -#include "functioncolumn.h" -#include "arithmeticcolumn.h" #include "arithmeticoperator.h" -#include "logicoperator.h" #include "predicateoperator.h" #include "rowcolumn.h" -#include "selectfilter.h" using namespace execplan; -#include "joblisttypes.h" using namespace joblist; -#include "cacheutils.h" #include "errorcodes.h" #include "idberrorinfo.h" @@ -118,13 +106,10 @@ using namespace logging; #include "resourcemanager.h" -#include "funcexp.h" #include "functor.h" using namespace funcexp; #include "installdir.h" -#include "columnstoreversion.h" -#include "ha_mcs_sysvars.h" #include "ha_mcs_datatype.h" #include "statistics.h" @@ -139,7 +124,7 @@ extern bool nonConstFunc(Item_func* ifp); void gp_walk_info::mergeTableStatistics(const TableStatisticsMap& aTableStatisticsMap) { - for (auto& [schemaAndTableName, aColumnStatisticsMap]: aTableStatisticsMap) + for (auto& [schemaAndTableName, aColumnStatisticsMap] : aTableStatisticsMap) { auto tableStatisticsMapIt = tableStatisticsMap.find(schemaAndTableName); if (tableStatisticsMapIt == tableStatisticsMap.end()) @@ -148,7 +133,7 @@ void gp_walk_info::mergeTableStatistics(const TableStatisticsMap& aTableStatisti } else { - for (auto& [columnName, histogram]: aColumnStatisticsMap) + for (auto& [columnName, histogram] : aColumnStatisticsMap) { tableStatisticsMapIt->second[columnName] = histogram; } @@ -156,7 +141,8 @@ void gp_walk_info::mergeTableStatistics(const TableStatisticsMap& aTableStatisti } } -std::optional gp_walk_info::findStatisticsForATable(SchemaAndTableName& schemaAndTableName) +std::optional gp_walk_info::findStatisticsForATable( + SchemaAndTableName& schemaAndTableName) { auto tableStatisticsMapIt = tableStatisticsMap.find(schemaAndTableName); if (tableStatisticsMapIt == tableStatisticsMap.end()) @@ -167,7 +153,7 @@ std::optional gp_walk_info::findStatisticsForATable(SchemaA return {tableStatisticsMapIt->second}; } -} +} // namespace cal_impl_if namespace { @@ -927,7 +913,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector& c Item_field* item; List_iterator_fast field_it(thd->lex->first_select_lex()->item_list); List_iterator_fast value_it(thd->lex->value_list); - updateCP->queryType(CalpontSelectExecutionPlan::UPDATE); + updateCP->queryType(IDBQueryType::UPDATE); ci->stats.fQueryType = updateCP->queryType(); tr1::unordered_set timeStampColumnNames; @@ -1211,7 +1197,7 @@ uint32_t doUpdateDelete(THD* thd, gp_walk_info& gwi, const std::vector& c #endif else { - updateCP->queryType(CalpontSelectExecutionPlan::DELETE); + updateCP->queryType(IDBQueryType::DELETE); ci->stats.fQueryType = updateCP->queryType(); } @@ -3383,11 +3369,13 @@ void ha_mcs_impl_start_bulk_insert(ha_rows rows, TABLE* table, bool is_cache_ins } if ((thd->lex)->sql_command == SQLCOM_INSERT) - ci->stats.fQueryType = - CalpontSelectExecutionPlan::queryTypeToString(CalpontSelectExecutionPlan::INSERT); + { + ci->stats.fQueryType = CalpontSelectExecutionPlan::queryTypeToString(IDBQueryType::INSERT); + } else if ((thd->lex)->sql_command == SQLCOM_LOAD) - ci->stats.fQueryType = - CalpontSelectExecutionPlan::queryTypeToString(CalpontSelectExecutionPlan::LOAD_DATA_INFILE); + { + ci->stats.fQueryType = CalpontSelectExecutionPlan::queryTypeToString(IDBQueryType::LOAD_DATA_INFILE); + } //@Bug 4387. Check BRM status before start statement. boost::scoped_ptr dbrmp(new DBRM()); diff --git a/dbcon/mysql/ha_mcs_impl_if.h b/dbcon/mysql/ha_mcs_impl_if.h index 8e2a53fad..4ad672251 100644 --- a/dbcon/mysql/ha_mcs_impl_if.h +++ b/dbcon/mysql/ha_mcs_impl_if.h @@ -438,16 +438,21 @@ void parse_item(Item* item, std::vector& field_vec, bool& hasNonSup const std::string bestTableName(const Item_field* ifp); // execution plan util functions prototypes -execplan::ReturnedColumn* buildReturnedColumn(Item* item, gp_walk_info& gwi, bool& nonSupport, - bool isRefItem = false, bool isUnion = false); -execplan::ReturnedColumn* buildFunctionColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport, - bool selectBetweenIn = false, bool isUnion = false); -execplan::ReturnedColumn* buildArithmeticColumn(Item_func* item, gp_walk_info& gwi, bool& nonSupport, - bool isUnion); +execplan::ReturnedColumn* buildReturnedColumn( + Item* item, gp_walk_info& gwi, bool& nonSupport, bool isRefItem = false, + execplan::IDBQueryType queryType = execplan::IDBQueryType::SELECT); +execplan::ReturnedColumn* buildFunctionColumn( + Item_func* item, gp_walk_info& gwi, bool& nonSupport, bool selectBetweenIn = false, + execplan::IDBQueryType queryType = execplan::IDBQueryType::SELECT); +execplan::ReturnedColumn* buildArithmeticColumn( + Item_func* item, gp_walk_info& gwi, bool& nonSupport, + execplan::IDBQueryType queryType = execplan::IDBQueryType::SELECT); execplan::ConstantColumn* buildDecimalColumn(const Item* item, const std::string& str, gp_walk_info& gwi); -execplan::SimpleColumn* buildSimpleColumn(Item_field* item, gp_walk_info& gwi, bool isUnion); -execplan::FunctionColumn* buildCaseFunction(Item_func* item, gp_walk_info& gwi, bool& nonSupport, - bool isUnion); +execplan::SimpleColumn* buildSimpleColumn(Item_field* item, gp_walk_info& gwi, + execplan::IDBQueryType queryType = execplan::IDBQueryType::SELECT); +execplan::FunctionColumn* buildCaseFunction( + Item_func* item, gp_walk_info& gwi, bool& nonSupport, + execplan::IDBQueryType queryType = execplan::IDBQueryType::SELECT); execplan::ParseTree* buildParseTree(Item* item, gp_walk_info& gwi, bool& nonSupport); execplan::ReturnedColumn* buildAggregateColumn(Item* item, gp_walk_info& gwi); execplan::ReturnedColumn* buildWindowFunctionColumn(Item* item, gp_walk_info& gwi, bool& nonSupport); diff --git a/dbcon/mysql/ha_pseudocolumn.cpp b/dbcon/mysql/ha_pseudocolumn.cpp index 8ac34be45..5556e52fe 100644 --- a/dbcon/mysql/ha_pseudocolumn.cpp +++ b/dbcon/mysql/ha_pseudocolumn.cpp @@ -8,7 +8,6 @@ #include "errorids.h" #include "idberrorinfo.h" -#include "exceptclasses.h" using namespace logging; #include "pseudocolumn.h" @@ -423,7 +422,7 @@ execplan::ReturnedColumn* buildPseudoColumn(Item* item, gp_walk_info& gwi, bool& if (!field->field || !field->db_name.str || strlen(field->db_name.str) == 0) return nullOnError(gwi, funcName); - SimpleColumn* sc = buildSimpleColumn(field, gwi, false); + SimpleColumn* sc = buildSimpleColumn(field, gwi); if (!sc) return nullOnError(gwi, funcName); From 95901fcd19a59748a72ca8712c71b2f7ee543943 Mon Sep 17 00:00:00 2001 From: Aleksei Antipovskii Date: Fri, 5 Sep 2025 00:16:35 +0200 Subject: [PATCH 8/8] review fixes --- dbcon/execplan/calpontselectexecutionplan.h | 1 - dbcon/joblist/tupleunion.cpp | 37 ++++++++------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/dbcon/execplan/calpontselectexecutionplan.h b/dbcon/execplan/calpontselectexecutionplan.h index 127e06bd9..cd3b90e0c 100644 --- a/dbcon/execplan/calpontselectexecutionplan.h +++ b/dbcon/execplan/calpontselectexecutionplan.h @@ -57,7 +57,6 @@ enum RM_PARMS // query type of select plan. // TODO: move it somewhere? -#undef DELETE // Windows defines this... enum class IDBQueryType : uint32_t { SELECT, diff --git a/dbcon/joblist/tupleunion.cpp b/dbcon/joblist/tupleunion.cpp index 6d96a6fbf..655454497 100644 --- a/dbcon/joblist/tupleunion.cpp +++ b/dbcon/joblist/tupleunion.cpp @@ -82,6 +82,15 @@ namespace return ival; } + NullString formatDouble(double val) + { + char buf[datatypes::INT128MAXPRECISION + 1]; + my_bool error = 0; + auto len = my_gcvt(val, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); + idbassert(error == 0 && len <= sizeof(buf)); + return {buf, len}; + } + void normalizeIntToIntNoScale(const Row& in, Row* out, uint32_t i) { out->setIntField(in.getIntField(i), i); @@ -128,12 +137,7 @@ namespace { double d = in.getIntField(i); d /= exp10(in.getScale(i)); - char buf[datatypes::INT128MAXPRECISION + 1]; - my_bool error = 0; - auto len = my_gcvt(d, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); - idbassert(error == 0 && len <= sizeof(buf)); - utils::NullString ns(buf); - out->setStringField(ns, i); + out->setStringField(formatDouble(d), i); } void normalizeIntToStringNoScale(const Row& in, Row* out, uint32_t i) @@ -206,12 +210,7 @@ namespace { double d = in.getUintField(i); d /= exp10(in.getScale(i)); - char buf[datatypes::INT128MAXPRECISION + 1]; - my_bool error = 0; - auto len = my_gcvt(d, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); - idbassert(error == 0 && len <= sizeof(buf)); - utils::NullString ns(buf); - out->setStringField(ns, i); + out->setStringField(formatDouble(d), i); } void normalizeUintToStringNoScale(const Row& in, Row* out, uint32_t i) @@ -514,23 +513,13 @@ namespace void normalizeXFloatToString(const Row& in, Row* out, uint32_t i) { double val = in.getFloatField(i); - char buf[datatypes::INT128MAXPRECISION + 1]; - my_bool error = 0; - auto len = my_gcvt(val, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); - idbassert(error == 0 && len <= sizeof(buf)); - utils::NullString ns(buf); - out->setStringField(ns, i); + out->setStringField(formatDouble(val), i); } void normalizeXDoubleToString(const Row& in, Row* out, uint32_t i) { double val = in.getDoubleField(i); - char buf[datatypes::INT128MAXPRECISION + 1]; - my_bool error = 0; - auto len = my_gcvt(val, MY_GCVT_ARG_DOUBLE, sizeof(buf) - 1, buf, &error); - idbassert(error == 0 && len <= sizeof(buf)); - utils::NullString ns(buf); - out->setStringField(ns, i); + out->setStringField(formatDouble(val), i); } void normalizeXFloatToWideXDecimal(const Row& in, Row* out, uint32_t i)