Loading mysql-test/r/limit.result +9 −0 Original line number Diff line number Diff line Loading @@ -67,3 +67,12 @@ SELECT * FROM t1; id id2 3 0 DROP TABLE t1; create table t1 (a integer); insert into t1 values (1); select 1 as a from t1 union all select 1 from dual limit 1; a 1 (select 1 as a from t1) union all (select 1 from dual) limit 1; a 1 drop table t1; mysql-test/r/ndb_basic.result +34 −0 Original line number Diff line number Diff line Loading @@ -573,3 +573,37 @@ select * from t1 where a12345678901234567890123456789a1234567890=2; a1234567890123456789012345678901234567890 a12345678901234567890123456789a1234567890 5 2 drop table t1; create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a,b,c,d)) engine=ndb max_rows=200000000; Warnings: Warning 1105 Ndb might have problems storing the max amount of rows specified insert into t1 values (1,2,3,4),(2,3,4,5),(3,4,5,6), (3,2,3,4),(1,3,4,5),(2,4,5,6), (1,2,3,5),(2,3,4,8),(3,4,5,9), (3,2,3,5),(1,3,4,8),(2,4,5,9), (1,2,3,6),(2,3,4,6),(3,4,5,7), (3,2,3,6),(1,3,4,6),(2,4,5,7), (1,2,3,7),(2,3,4,7),(3,4,5,8), (3,2,3,7),(1,3,4,7),(2,4,5,8), (1,3,3,4),(2,4,4,5),(3,5,5,6), (3,3,3,4),(1,4,4,5),(2,5,5,6), (1,3,3,5),(2,4,4,8),(3,5,5,9), (3,3,3,5),(1,4,4,8),(2,5,5,9), (1,3,3,6),(2,4,4,6),(3,5,5,7), (3,3,3,6),(1,4,4,6),(2,5,5,7), (1,3,3,7),(2,4,4,7),(3,5,5,8), (3,3,3,7),(1,4,4,7),(2,5,5,8); select count(*) from t1; count(*) 48 drop table t1; create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a)) engine=ndb max_rows=1; drop table t1; mysql-test/t/limit.test +10 −0 Original line number Diff line number Diff line Loading @@ -49,3 +49,13 @@ SELECT * FROM t1; DELETE FROM t1 WHERE id2 = 0 ORDER BY id desc LIMIT 1; SELECT * FROM t1; DROP TABLE t1; # # Bug#8023 - limit on UNION with from DUAL, causes syntax error # create table t1 (a integer); insert into t1 values (1); # both queries must return one row select 1 as a from t1 union all select 1 from dual limit 1; (select 1 as a from t1) union all (select 1 from dual) limit 1; drop table t1; mysql-test/t/ndb_basic.test +38 −0 Original line number Diff line number Diff line Loading @@ -539,3 +539,41 @@ insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); explain select * from t1 where a12345678901234567890123456789a1234567890=2; select * from t1 where a12345678901234567890123456789a1234567890=2; drop table t1; # # test fragment creation # # first a table with _many_ fragments per node group # then a table with just one fragment per node group # create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a,b,c,d)) engine=ndb max_rows=200000000; insert into t1 values (1,2,3,4),(2,3,4,5),(3,4,5,6), (3,2,3,4),(1,3,4,5),(2,4,5,6), (1,2,3,5),(2,3,4,8),(3,4,5,9), (3,2,3,5),(1,3,4,8),(2,4,5,9), (1,2,3,6),(2,3,4,6),(3,4,5,7), (3,2,3,6),(1,3,4,6),(2,4,5,7), (1,2,3,7),(2,3,4,7),(3,4,5,8), (3,2,3,7),(1,3,4,7),(2,4,5,8), (1,3,3,4),(2,4,4,5),(3,5,5,6), (3,3,3,4),(1,4,4,5),(2,5,5,6), (1,3,3,5),(2,4,4,8),(3,5,5,9), (3,3,3,5),(1,4,4,8),(2,5,5,9), (1,3,3,6),(2,4,4,6),(3,5,5,7), (3,3,3,6),(1,4,4,6),(2,5,5,7), (1,3,3,7),(2,4,4,7),(3,5,5,8), (3,3,3,7),(1,4,4,7),(2,5,5,8); select count(*) from t1; drop table t1; create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a)) engine=ndb max_rows=1; drop table t1; ndb/include/ndbapi/NdbDictionary.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -140,9 +140,9 @@ public: enum FragmentType { FragUndefined = 0, ///< Fragmentation type undefined or default FragSingle = 1, ///< Only one fragment FragAllSmall = 2, ///< One fragment per node group FragAllMedium = 3, ///< Default value. Two fragments per node group. FragAllLarge = 4 ///< Eight fragments per node group. FragAllSmall = 2, ///< One fragment per node, default FragAllMedium = 3, ///< two fragments per node FragAllLarge = 4 ///< Four fragments per node. }; }; Loading Loading
mysql-test/r/limit.result +9 −0 Original line number Diff line number Diff line Loading @@ -67,3 +67,12 @@ SELECT * FROM t1; id id2 3 0 DROP TABLE t1; create table t1 (a integer); insert into t1 values (1); select 1 as a from t1 union all select 1 from dual limit 1; a 1 (select 1 as a from t1) union all (select 1 from dual) limit 1; a 1 drop table t1;
mysql-test/r/ndb_basic.result +34 −0 Original line number Diff line number Diff line Loading @@ -573,3 +573,37 @@ select * from t1 where a12345678901234567890123456789a1234567890=2; a1234567890123456789012345678901234567890 a12345678901234567890123456789a1234567890 5 2 drop table t1; create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a,b,c,d)) engine=ndb max_rows=200000000; Warnings: Warning 1105 Ndb might have problems storing the max amount of rows specified insert into t1 values (1,2,3,4),(2,3,4,5),(3,4,5,6), (3,2,3,4),(1,3,4,5),(2,4,5,6), (1,2,3,5),(2,3,4,8),(3,4,5,9), (3,2,3,5),(1,3,4,8),(2,4,5,9), (1,2,3,6),(2,3,4,6),(3,4,5,7), (3,2,3,6),(1,3,4,6),(2,4,5,7), (1,2,3,7),(2,3,4,7),(3,4,5,8), (3,2,3,7),(1,3,4,7),(2,4,5,8), (1,3,3,4),(2,4,4,5),(3,5,5,6), (3,3,3,4),(1,4,4,5),(2,5,5,6), (1,3,3,5),(2,4,4,8),(3,5,5,9), (3,3,3,5),(1,4,4,8),(2,5,5,9), (1,3,3,6),(2,4,4,6),(3,5,5,7), (3,3,3,6),(1,4,4,6),(2,5,5,7), (1,3,3,7),(2,4,4,7),(3,5,5,8), (3,3,3,7),(1,4,4,7),(2,5,5,8); select count(*) from t1; count(*) 48 drop table t1; create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a)) engine=ndb max_rows=1; drop table t1;
mysql-test/t/limit.test +10 −0 Original line number Diff line number Diff line Loading @@ -49,3 +49,13 @@ SELECT * FROM t1; DELETE FROM t1 WHERE id2 = 0 ORDER BY id desc LIMIT 1; SELECT * FROM t1; DROP TABLE t1; # # Bug#8023 - limit on UNION with from DUAL, causes syntax error # create table t1 (a integer); insert into t1 values (1); # both queries must return one row select 1 as a from t1 union all select 1 from dual limit 1; (select 1 as a from t1) union all (select 1 from dual) limit 1; drop table t1;
mysql-test/t/ndb_basic.test +38 −0 Original line number Diff line number Diff line Loading @@ -539,3 +539,41 @@ insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1); explain select * from t1 where a12345678901234567890123456789a1234567890=2; select * from t1 where a12345678901234567890123456789a1234567890=2; drop table t1; # # test fragment creation # # first a table with _many_ fragments per node group # then a table with just one fragment per node group # create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a,b,c,d)) engine=ndb max_rows=200000000; insert into t1 values (1,2,3,4),(2,3,4,5),(3,4,5,6), (3,2,3,4),(1,3,4,5),(2,4,5,6), (1,2,3,5),(2,3,4,8),(3,4,5,9), (3,2,3,5),(1,3,4,8),(2,4,5,9), (1,2,3,6),(2,3,4,6),(3,4,5,7), (3,2,3,6),(1,3,4,6),(2,4,5,7), (1,2,3,7),(2,3,4,7),(3,4,5,8), (3,2,3,7),(1,3,4,7),(2,4,5,8), (1,3,3,4),(2,4,4,5),(3,5,5,6), (3,3,3,4),(1,4,4,5),(2,5,5,6), (1,3,3,5),(2,4,4,8),(3,5,5,9), (3,3,3,5),(1,4,4,8),(2,5,5,9), (1,3,3,6),(2,4,4,6),(3,5,5,7), (3,3,3,6),(1,4,4,6),(2,5,5,7), (1,3,3,7),(2,4,4,7),(3,5,5,8), (3,3,3,7),(1,4,4,7),(2,5,5,8); select count(*) from t1; drop table t1; create table t1 (a bigint, b bigint, c bigint, d bigint, primary key (a)) engine=ndb max_rows=1; drop table t1;
ndb/include/ndbapi/NdbDictionary.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -140,9 +140,9 @@ public: enum FragmentType { FragUndefined = 0, ///< Fragmentation type undefined or default FragSingle = 1, ///< Only one fragment FragAllSmall = 2, ///< One fragment per node group FragAllMedium = 3, ///< Default value. Two fragments per node group. FragAllLarge = 4 ///< Eight fragments per node group. FragAllSmall = 2, ///< One fragment per node, default FragAllMedium = 3, ///< two fragments per node FragAllLarge = 4 ///< Four fragments per node. }; }; Loading