Search before asking
Version
2.1.10
What's Wrong?
sql_select_limit for INSERT..SELECT/CREATE TABLE AS SELECT behaves different on master/non-master fe.
On master fe, sql_select_limit can affect the number of inserted rows.
On non-master fe, sql_select_limit does not affect the number of inserted rows.
What You Expected?
No matter master fe or non-masterfe, sql_select_limit should have the same effect for INSERT..SELECT/CREATE TABLE AS SELECT.
How to Reproduce?
run SQLs:
createtabletest(id int);
insert into test values(1),(2),(3),(4),(5),(6);
createtabletest_new(id int);
set sql_select_limit=1;
select*from test;
insert into test_new select*from test;
On master:
mysql>set sql_select_limit=1;
Query OK, 0 rows affected (0.00 sec)
mysql>select*from test;
+------+
| id |
+------+
| 1 |
+------+1 row inset (0.04 sec)
mysql>insert into test_new select*from test;
Query OK, 1 row affected (0.59 sec)
{'label':'label_fdfe0bf2ed284b79_95d186162027f898', 'status':'VISIBLE', 'txnId':'46'}On non-master fe:
mysql>set sql_select_limit=1;
Query OK, 0 rows affected (0.00 sec)
mysql>select*from test;
+------+
| id |
+------+
| 1 |
+------+1 row inset (0.04 sec)
mysql>insert into test_new select*from test;
Query OK, 6 rows affected (0.67 sec)
{'label':'label_58eb29f33a52411a_a1a2654648bffbe3', 'status':'VISIBLE', 'txnId':'38'}Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
Search before asking
Version
2.1.10
What's Wrong?
sql_select_limitforINSERT..SELECT/CREATE TABLE AS SELECTbehaves different on master/non-master fe.On master fe,
sql_select_limitcan affect the number of inserted rows.On non-master fe,
sql_select_limitdoes not affect the number of inserted rows.What You Expected?
No matter master fe or non-masterfe,
sql_select_limitshould have the same effect forINSERT..SELECT/CREATE TABLE AS SELECT.How to Reproduce?
run SQLs:
On master:
On non-master fe:
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct