diff --git a/include/mysql.h b/include/mysql.h index 2a96effcf93..3bc07d9c480 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -148,6 +148,7 @@ typedef unsigned long long my_ulonglong; #define ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN #define ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN #define ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS ER_UNSUPPORTED_ENGINE_FOR_GENERATED_COLUMNS +#define ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT ER_QUERY_RESULT_INCOMPLETE typedef struct st_mysql_rows { struct st_mysql_rows *next; /* list of rows */ diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index 6686d451dd8..2160eee08a7 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -2228,7 +2228,7 @@ SCHEMA_NAME SELECT * FROM INFORMATION_SCHEMA.`COLUMNS` LIMIT ROWS EXAMINED 10; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION Warnings: -Warning 1931 Query execution was interrupted. The query examined at least ### rows, which exceeds LIMIT ROWS EXAMINED (10). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 10. The query result may be incomplete # # MDEV-24179: AAssertion `m_status == DA_ERROR || m_status == DA_OK || # m_status == DA_OK_BULK' failed in Diagnostics_area::message() diff --git a/mysql-test/main/limit_rows_examined.result b/mysql-test/main/limit_rows_examined.result index e87dd25cac9..dfeb61043f9 100644 --- a/mysql-test/main/limit_rows_examined.result +++ b/mysql-test/main/limit_rows_examined.result @@ -22,7 +22,7 @@ select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 2; c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete explain select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 4; id select_type table type possible_keys key key_len ref rows Extra @@ -32,7 +32,7 @@ select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 4; c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 5 rows, which exceeds LIMIT ROWS EXAMINED (4). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 4. The query result may be incomplete Blocked nested loops join, empty result set because of blocking set @@join_cache_level=1; explain @@ -44,7 +44,7 @@ select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 6; c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete explain select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6; id select_type table type possible_keys key key_len ref rows Extra @@ -55,7 +55,7 @@ c1 c2 bb bb cc cc Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete set @@join_cache_level=6; explain select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 3; @@ -65,7 +65,7 @@ id select_type table type possible_keys key key_len ref rows Extra select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 3; c1 c2 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 4 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 3. The query result may be incomplete explain select * from t1i, t2i where c1 = c2 LIMIT ROWS EXAMINED 6; id select_type table type possible_keys key key_len ref rows Extra @@ -76,7 +76,7 @@ c1 c2 bb bb cc cc Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete Mix LIMIT ROWS EXAMINED with LIMIT set @@join_cache_level=0; explain @@ -125,7 +125,7 @@ id select_type table type possible_keys key key_len ref rows Extra select * from t0, t1 where c0 = 'bb' and c1 > c0 LIMIT ROWS EXAMINED 0; c0 c1 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 2 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete set @@join_cache_level = @save_join_cache_level; drop table t0; ========================================================================= @@ -139,7 +139,7 @@ execute st1 using @l; c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete deallocate prepare st1; User variable (not supported for LIMIT in MariaDB 5.3/MySQL 5.1) select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED @l; @@ -153,7 +153,7 @@ call test_limit_rows(3); c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 4 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 3. The query result may be incomplete drop procedure test_limit_rows; set @@join_cache_level = @save_join_cache_level; ========================================================================= @@ -165,14 +165,14 @@ UNION c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete (select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0) UNION (select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 6); c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0 UNION select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 6; @@ -185,7 +185,7 @@ LIMIT ROWS EXAMINED 6; c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete (select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0) UNION (select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 0) @@ -193,7 +193,7 @@ LIMIT 1 ROWS EXAMINED 6; c1 c2 bb bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete (select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0) UNION (select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 0) @@ -202,7 +202,7 @@ c1 c2 bb bb cc cc Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (10). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 10. The query result may be incomplete ========================================================================= Subqueries (with several LIMIT ROWS EXAMINED clauses) ========================================================================= @@ -219,7 +219,7 @@ where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 11); c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete explain select * from t1 where c1 IN (select * from t2 where c2 > ' ') @@ -234,7 +234,7 @@ LIMIT ROWS EXAMINED 11; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete explain select * from t1 where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0) @@ -249,7 +249,7 @@ LIMIT ROWS EXAMINED 11; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete explain select * from t1i where c1 IN (select * from t2i where c2 > ' ') @@ -264,7 +264,7 @@ c1 bb cc Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete Subqueries with IN-TO-EXISTS set @@optimizer_switch='semijoin=off,in_to_exists=on,materialization=off'; explain @@ -278,7 +278,7 @@ where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 4); c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 5 rows, which exceeds LIMIT ROWS EXAMINED (4). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 4. The query result may be incomplete explain select * from t1 where c1 IN (select * from t2 where c2 > ' ') @@ -292,7 +292,7 @@ LIMIT ROWS EXAMINED 4; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 5 rows, which exceeds LIMIT ROWS EXAMINED (4). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 4. The query result may be incomplete explain select * from t1 where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0) @@ -306,7 +306,7 @@ LIMIT ROWS EXAMINED 4; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 5 rows, which exceeds LIMIT ROWS EXAMINED (4). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 4. The query result may be incomplete explain select * from t1i where c1 IN (select * from t2i where c2 > ' ') @@ -320,7 +320,7 @@ LIMIT ROWS EXAMINED 9; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (9). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 9. The query result may be incomplete Same as above, without subquery cache set @@optimizer_switch='subquery_cache=off'; select * from t1 @@ -328,28 +328,28 @@ where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 2); c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete select * from t1 where c1 IN (select * from t2 where c2 > ' ') LIMIT ROWS EXAMINED 2; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete select * from t1 where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0) LIMIT ROWS EXAMINED 2; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete select * from t1i where c1 IN (select * from t2i where c2 > ' ') LIMIT ROWS EXAMINED 5; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 7 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete Subqueries with materialization set @@optimizer_switch='semijoin=off,in_to_exists=off,materialization=on,subquery_cache=on'; explain @@ -363,7 +363,7 @@ where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 13); c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 14 rows, which exceeds LIMIT ROWS EXAMINED (13). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 13. The query result may be incomplete explain select * from t1 where c1 IN (select * from t2 where c2 > ' ') LIMIT ROWS EXAMINED 13; @@ -375,7 +375,7 @@ where c1 IN (select * from t2 where c2 > ' ') LIMIT ROWS EXAMINED 13; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 14 rows, which exceeds LIMIT ROWS EXAMINED (13). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 13. The query result may be incomplete explain select * from t1 where c1 IN (select * from t2 where c2 > ' ' LIMIT ROWS EXAMINED 0) @@ -389,7 +389,7 @@ LIMIT ROWS EXAMINED 13; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 14 rows, which exceeds LIMIT ROWS EXAMINED (13). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 13. The query result may be incomplete explain select * from t1i where c1 IN (select * from t2i where c2 > ' ') LIMIT ROWS EXAMINED 17; @@ -401,7 +401,7 @@ where c1 IN (select * from t2i where c2 > ' ') LIMIT ROWS EXAMINED 17; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 18 rows, which exceeds LIMIT ROWS EXAMINED (17). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 17. The query result may be incomplete set @@optimizer_switch='default'; ========================================================================= Views and derived tables @@ -422,18 +422,18 @@ bb cc dd Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 18 rows, which exceeds LIMIT ROWS EXAMINED (17). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 17. The query result may be incomplete select * from v1 LIMIT ROWS EXAMINED 16; c1 bb cc Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 17 rows, which exceeds LIMIT ROWS EXAMINED (16). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 16. The query result may be incomplete select * from v1 LIMIT ROWS EXAMINED 11; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete drop view v1; explain select * @@ -451,7 +451,7 @@ LIMIT ROWS EXAMINED 11; c1 bb Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (11). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 11. The query result may be incomplete ========================================================================= Aggregation ========================================================================= @@ -474,16 +474,16 @@ id select_type table type possible_keys key key_len ref rows Extra select c1, sum(c2) from t3 group by c1 LIMIT ROWS EXAMINED 0; c1 sum(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete select c1, sum(c2) from t3 group by c1 LIMIT ROWS EXAMINED 1; c1 sum(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (1). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 1. The query result may be incomplete select c1, sum(c2) from t3 group by c1 LIMIT ROWS EXAMINED 20; c1 sum(c2) aa 3 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 21 rows, which exceeds LIMIT ROWS EXAMINED (20). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 20. The query result may be incomplete select c1, sum(c2) from t3 group by c1 LIMIT ROWS EXAMINED 21; c1 sum(c2) aa 3 @@ -501,16 +501,16 @@ id select_type table type possible_keys key key_len ref rows Extra select c1, sum(c2) from t3i group by c1 LIMIT ROWS EXAMINED 0; c1 sum(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete select c1, sum(c2) from t3i group by c1 LIMIT ROWS EXAMINED 1; c1 sum(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (1). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 1. The query result may be incomplete select c1, sum(c2) from t3i group by c1 LIMIT ROWS EXAMINED 20; c1 sum(c2) aa 3 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 21 rows, which exceeds LIMIT ROWS EXAMINED (20). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 20. The query result may be incomplete select c1, sum(c2) from t3i group by c1 LIMIT ROWS EXAMINED 21; c1 sum(c2) aa 3 @@ -523,14 +523,14 @@ id select_type table type possible_keys key key_len ref rows Extra select min(c2) from t3 LIMIT ROWS EXAMINED 5; min(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete select max(c2) from t3 LIMIT ROWS EXAMINED 6; max(c2) 5 select max(c2) from t3 LIMIT ROWS EXAMINED 0; max(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete explain select max(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 5; id select_type table type possible_keys key key_len ref rows Extra @@ -538,14 +538,14 @@ id select_type table type possible_keys key key_len ref rows Extra select max(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 5; max(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete select max(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 6; max(c2) NULL select max(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 0; max(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete explain select count(c2) from t3 LIMIT ROWS EXAMINED 5; id select_type table type possible_keys key key_len ref rows Extra @@ -553,14 +553,14 @@ id select_type table type possible_keys key key_len ref rows Extra select count(c2) from t3 LIMIT ROWS EXAMINED 5; count(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete select count(c2) from t3 LIMIT ROWS EXAMINED 6; count(c2) 5 select count(c2) from t3 LIMIT ROWS EXAMINED 0; count(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete explain select count(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 5; id select_type table type possible_keys key key_len ref rows Extra @@ -568,7 +568,7 @@ id select_type table type possible_keys key key_len ref rows Extra select count(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 5; count(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete select count(c2) from t3 where c2 > 10 LIMIT ROWS EXAMINED 6; count(c2) 0 @@ -579,7 +579,7 @@ id select_type table type possible_keys key key_len ref rows Extra select sum(c2) from t3 LIMIT ROWS EXAMINED 5; sum(c2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 6 rows, which exceeds LIMIT ROWS EXAMINED (5). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 5. The query result may be incomplete select sum(c2) from t3 LIMIT ROWS EXAMINED 6; sum(c2) 15 @@ -618,7 +618,7 @@ c1 c2 aa 1 aa 2 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete explain select c1, c2 from t3i order by c2, c1 desc LIMIT ROWS EXAMINED 2; id select_type table type possible_keys key key_len ref rows Extra @@ -634,14 +634,14 @@ CREATE TABLE t4 (a int); INSERT INTO t4 values (1), (2); INSERT IGNORE INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 0; Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 0. The query result may be incomplete select * from t4; a 1 2 INSERT INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 6; Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 6. The query result may be incomplete select * from t4; a 1 @@ -692,7 +692,7 @@ WHERE EXISTS (SELECT c FROM t3 LEFT JOIN t2 ON b = d) HAVING field1 > 'aaa' LIMIT ROWS EXAMINED 20; field1 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 21 rows, which exceeds LIMIT ROWS EXAMINED (20). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 20. The query result may be incomplete EXPLAIN SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 14; id select_type table type possible_keys key key_len ref rows Extra @@ -702,13 +702,13 @@ SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 14; a USA Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 15 rows, which exceeds LIMIT ROWS EXAMINED (14). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 14. The query result may be incomplete SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 15; a USA CAN Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 16 rows, which exceeds LIMIT ROWS EXAMINED (15). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 15. The query result may be incomplete SELECT DISTINCT a FROM t1, t2 HAVING a > ' ' LIMIT ROWS EXAMINED 16; a USA @@ -753,7 +753,7 @@ GROUP BY field1, field2, field3, field4, field5 LIMIT ROWS EXAMINED 120; field1 field2 field3 field4 field5 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 121 rows, which exceeds LIMIT ROWS EXAMINED (120). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 120. The query result may be incomplete SHOW STATUS LIKE 'Handler_read%'; Variable_name Value Handler_read_first 1 @@ -778,8 +778,8 @@ GROUP BY field1, field2, field3, field4, field5 LIMIT ROWS EXAMINED 124; field1 field2 field3 field4 field5 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 125 rows, which exceeds LIMIT ROWS EXAMINED (124). The query result may be incomplete -Warning 1931 Query execution was interrupted. The query examined at least 127 rows, which exceeds LIMIT ROWS EXAMINED (124). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 124. The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 124. The query result may be incomplete SHOW STATUS LIKE 'Handler_read%'; Variable_name Value Handler_read_first 1 @@ -822,7 +822,7 @@ WHERE b <= alias1.b OR e != alias2.c ) LIMIT ROWS EXAMINED 20; a b c Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 25 rows, which exceeds LIMIT ROWS EXAMINED (20). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 20. The query result may be incomplete drop table t1, t2, t3; MDEV-174: LIMIT ROWS EXAMINED: Assertion `0' failed in net_end_statement(THD*) @@ -839,7 +839,7 @@ WHERE c = (SELECT MAX(b) FROM t2) LIMIT ROWS EXAMINED 3; (SELECT MAX(c) FROM t1, t2) Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 12 rows, which exceeds LIMIT ROWS EXAMINED (3). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 3. The query result may be incomplete drop table t1, t2; MDEV-178: LIMIT ROWS EXAMINED: Assertion `0' failed in net_end_statement(THD*) on the @@ -856,12 +856,12 @@ EXECUTE ps; a 3 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 22 rows, which exceeds LIMIT ROWS EXAMINED (21). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 21. The query result may be incomplete EXECUTE ps; a 3 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 22 rows, which exceeds LIMIT ROWS EXAMINED (21). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 21. The query result may be incomplete drop view v; drop table t1, t2; # @@ -876,7 +876,7 @@ INSERT INTO t1 (k,c) VALUES(0,'0'), (0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,'0'),(0,' SET @@sql_mode='STRICT_TRANS_TABLES'; INSERT INTO t1 (c) SELECT k FROM t1 LIMIT ROWS EXAMINED 2; Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3 rows, which exceeds LIMIT ROWS EXAMINED (2). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 2. The query result may be incomplete SET @@sql_mode=@old_mode; DROP TABLE t1; # diff --git a/mysql-test/main/subselect4.result b/mysql-test/main/subselect4.result index 259337cf646..9dcf05c8565 100644 --- a/mysql-test/main/subselect4.result +++ b/mysql-test/main/subselect4.result @@ -2760,7 +2760,7 @@ from t2 join t1 on ('i','w') not in (select t1.v1,t4.v2 from t4,t1,t3 where t3.v2 = t1.v1) LIMIT ROWS EXAMINED 500; 1 Warnings: -Warning 1931 Query execution was interrupted. The query examined at least 3020 rows, which exceeds LIMIT ROWS EXAMINED (500). The query result may be incomplete +Warning 1931 Query execution was interrupted. The query exceeded LIMIT ROWS EXAMINED 500. The query result may be incomplete SET join_cache_level= @save_join_cache_level; DROP TABLE t1,t2,t3,t4; # diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index dff2319a99c..eda61fbe218 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -8084,9 +8084,8 @@ ER_INSIDE_TRANSACTION_PREVENTS_SWITCH_SKIP_REPLICATION ER_STORED_FUNCTION_PREVENTS_SWITCH_SKIP_REPLICATION chi "无法修改存储函数或触发器内的@@session.skip_replication" eng "Cannot modify @@session.skip_replication inside a stored function or trigger" -ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT - chi "查询执行被中断。查询检查至少%llu行,超过限制行(%llu)。查询结果可能是不完整的" - eng "Query execution was interrupted. The query examined at least %llu rows, which exceeds LIMIT ROWS EXAMINED (%llu). The query result may be incomplete" +ER_QUERY_RESULT_INCOMPLETE + eng "Query execution was interrupted. The query exceeded %s %llu. The query result may be incomplete" ER_NO_SUCH_TABLE_IN_ENGINE 42S02 chi "表'%-.192s.%-.192s'在引擎中不存在" eng "Table '%-.192s.%-.192s' doesn't exist in engine" diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 821394cf6d0..5955cbef8dd 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -467,9 +467,9 @@ bool handle_select(THD *thd, LEX *lex, select_result *result, bool saved_abort_on_warning= thd->abort_on_warning; thd->abort_on_warning= false; push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT, - ER_THD(thd, ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT), - thd->accessed_rows_and_keys, + ER_QUERY_RESULT_INCOMPLETE, + ER_THD(thd, ER_QUERY_RESULT_INCOMPLETE), + "LIMIT ROWS EXAMINED", thd->lex->limit_rows_examined->val_uint()); thd->abort_on_warning= saved_abort_on_warning; thd->reset_killed(); diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 0f218b73b16..bc33f827084 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -1658,9 +1658,9 @@ bool st_select_lex_unit::exec() the current result. */ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT, - ER_THD(thd, ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT), - thd->accessed_rows_and_keys, + ER_QUERY_RESULT_INCOMPLETE, + ER_THD(thd, ER_QUERY_RESULT_INCOMPLETE), + "LIMIT ROWS EXAMINED", thd->lex->limit_rows_examined->val_uint()); thd->reset_killed(); break;