From d2524007593289f6db5d997704c78045597d1789 Mon Sep 17 00:00:00 2001 From: Radu Berinde Date: Wed, 20 Jan 2021 06:51:18 -0800 Subject: [PATCH] opt: fix autocommit_nonmetamorphic Another instance of a test that was not updated because it didn't run in the original CI or bors run. Release note: None --- .../testdata/autocommit_nonmetamorphic | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pkg/sql/opt/exec/execbuilder/testdata/autocommit_nonmetamorphic b/pkg/sql/opt/exec/execbuilder/testdata/autocommit_nonmetamorphic index f52fa55cec6c..0cab227f9c67 100644 --- a/pkg/sql/opt/exec/execbuilder/testdata/autocommit_nonmetamorphic +++ b/pkg/sql/opt/exec/execbuilder/testdata/autocommit_nonmetamorphic @@ -110,6 +110,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- +dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 2 CPut, 1 EndTxn to (n1,s1):1 # TODO(radu): allow non-side-effecting projections. @@ -133,6 +134,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND operation NOT LIKE '%async%' ---- dist sender send r35: sending batch 2 CPut to (n1,s1):1 +dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 # Insert with RETURNING statement with side-effects should not auto-commit. @@ -157,6 +159,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND operation NOT LIKE '%async%' ---- dist sender send r35: sending batch 2 CPut to (n1,s1):1 +dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 # Another way to test the scenario above: generate an error and ensure that the @@ -192,6 +195,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- +dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 1 Put, 1 EndTxn to (n1,s1):1 # Multi-row upsert should auto-commit. @@ -213,6 +217,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- +dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 2 Put, 1 EndTxn to (n1,s1):1 # No auto-commit inside a transaction. @@ -261,6 +266,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- +dist sender send r35: sending batch 2 Put to (n1,s1):1 dist sender send r35: sending batch 2 Put, 1 EndTxn to (n1,s1):1 # TODO(radu): allow non-side-effecting projections. @@ -284,6 +290,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND operation NOT LIKE '%async%' ---- dist sender send r35: sending batch 2 Put to (n1,s1):1 +dist sender send r35: sending batch 2 Put to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 # Upsert with RETURNING statement with side-effects should not auto-commit. @@ -308,6 +315,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND operation NOT LIKE '%async%' ---- dist sender send r35: sending batch 2 Put to (n1,s1):1 +dist sender send r35: sending batch 2 Put to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 # Another way to test the scenario above: generate an error and ensure that the @@ -343,6 +351,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- +dist sender send r35: sending batch 2 Put to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 2 Put, 1 EndTxn to (n1,s1):1 @@ -394,6 +403,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' ---- dist sender send r35: sending batch 1 Scan to (n1,s1):1 +dist sender send r35: sending batch 2 Put to (n1,s1):1 +dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 2 Put, 1 EndTxn to (n1,s1):1 # TODO(radu): allow non-side-effecting projections. @@ -418,6 +429,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' ---- dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 2 Put to (n1,s1):1 +dist sender send r35: sending batch 1 Scan to (n1,s1):1 +dist sender send r35: sending batch 2 Put to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 # Update with RETURNING statement with side-effects should not auto-commit. @@ -443,6 +456,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' ---- dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 2 Put to (n1,s1):1 +dist sender send r35: sending batch 1 Scan to (n1,s1):1 +dist sender send r35: sending batch 2 Put to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 # Another way to test the scenario above: generate an error and ensure that the @@ -478,6 +493,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- +dist sender send r35: sending batch 1 Scan to (n1,s1):1 +dist sender send r35: sending batch 2 Put to (n1,s1):1 dist sender send r35: sending batch 1 DelRng, 1 EndTxn to (n1,s1):1 # Multi-row delete should auto-commit. @@ -499,6 +516,8 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- +dist sender send r35: sending batch 1 Scan to (n1,s1):1 +dist sender send r35: sending batch 2 Put to (n1,s1):1 dist sender send r35: sending batch 1 DelRng, 1 EndTxn to (n1,s1):1 # No auto-commit inside a transaction. @@ -547,6 +566,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%PushTxn%' AND message NOT LIKE '%QueryTxn%' ---- +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 2 Del, 1 EndTxn to (n1,s1):1 @@ -570,6 +590,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 2 Del to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 @@ -595,6 +616,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 2 Del to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 @@ -644,6 +666,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 2 Scan to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 @@ -667,6 +690,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 1 Put to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 @@ -692,6 +716,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 1 Del to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 @@ -720,6 +745,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND operation NOT LIKE '%async%' ---- dist sender send r35: sending batch 1 DelRng to (n1,s1):1 +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 1 Scan to (n1,s1):1 dist sender send r35: sending batch 1 Del, 1 EndTxn to (n1,s1):1 @@ -749,6 +775,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1 @@ -774,6 +801,7 @@ WHERE message LIKE '%r$rangeid: sending batch%' AND message NOT LIKE '%QueryTxn%' AND operation NOT LIKE '%async%' ---- +dist sender send r35: sending batch 1 DelRng to (n1,s1):1 dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 2 CPut to (n1,s1):1 dist sender send r35: sending batch 1 EndTxn to (n1,s1):1