nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: kbknapp/clap-rs
Pull request #1040 (2017-09-06 23:37:03)

fix: avoid panic generating default help msg if term width set to 0 due to issue in textwrap 0.7.0
Generating a default help message where `set_term_width(0)` had been applied caused the app to panic due to [this line](https://github.com/mgeisler/textwrap/blob/0.7.0/src/lib.rs#L355) in textwrap 0.7.0.  In this case, `self.width` would be `usize::MAX` and the call would result in an 'attempt to divide by zero' or 'attempt to add with overflow' panic depending on the build type.

This issue no longer exists in textwrap 0.8.0 (hence I didn't file an issue there).  Tagging @mgeisler for info.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kbknapp/clap-rs/1040)
<!-- Reviewable:end -->



Patch:
diff --git a/Cargo.toml b/Cargo.toml
index b71f25c5..40e798f1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,8 +23,8 @@ appveyor = { repository = "kbknapp/clap-rs" }
 bitflags              = "0.9"
 vec_map               = "0.8"
 unicode-width         = "0.1.4"
-unicode-segmentation  = "1.2.0" 
-textwrap              = "0.7.0"
+unicode-segmentation  = "1.2.0"
+textwrap              = "0.8.0"
 strsim    = { version = "0.6.0",  optional = true }
 ansi_term = { version = "0.9.0",  optional = true }
 term_size = { version = "0.3.0",  optional = true }


Test patch:
diff --git a/tests/help.rs b/tests/help.rs
index ef354ca9..f84580d0 100644
--- a/tests/help.rs
+++ b/tests/help.rs
@@ -431,6 +431,15 @@ ARGS:
     <FIRST>...     First
     <SECOND>...    Second";
 
+static DEFAULT_HELP: &'static str = "ctest 
+
+USAGE:
+    ctest
+
+FLAGS:
+    -h, --help       Prints help information
+    -V, --version    Prints version information";
+
 #[test]
 fn help_short() {
     let m = App::new("test")
@@ -592,6 +601,12 @@ fn no_wrap_help() {
     assert!(test::compare_output(app, "ctest --help", MULTI_SC_HELP, false));
 }
 
+#[test]
+fn no_wrap_default_help() {
+    let app = App::new("ctest").set_term_width(0);
+    assert!(test::compare_output(app, "ctest --help", DEFAULT_HELP, false));
+}
+
 #[test]
 fn complex_subcommand_help_output() {
     let a = test::complex_app();
Repository: kbknapp/clap-rs
Pull request #1141 (2018-01-06 11:02:07)

Fix completion of long option values in Zsh
Long options take their argument either in the next word or after an equals sign, but the Zsh completion specified that they take it either in the same word with no separator or in the next word. See the documentation of the [Zsh _arguments function](http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Completion-Functions) for more information.

### Sample for testing
```rust
extern crate clap;

use std::io;
use clap::{App, Arg, Shell};

fn build_cli() -> App<'static, 'static> {
    App::new("clap-test")
        .arg(Arg::with_name("wat")
            .long("wat")
            .takes_value(true)
            .possible_values(&["foo", "bar"]))
        .arg(Arg::with_name("completions")
            .long("completions"))
}

fn main() {
    let matches = build_cli().get_matches();

    if matches.is_present("completions") {
        build_cli().gen_completions_to("clap-test", Shell::Zsh, &mut io::stdout())
    }

    if let Some(wat) = matches.value_of("wat") {
        println!("{}", wat);
    }
}
```

Related #850

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kbknapp/clap-rs/1141)
<!-- Reviewable:end -->

  

mention-bot: @segevfiner, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kbknapp to be a potential reviewer.

Patch:
diff --git a/src/completions/zsh.rs b/src/completions/zsh.rs
index 8fbc1ff6..c73a9878 100644
--- a/src/completions/zsh.rs
+++ b/src/completions/zsh.rs
@@ -371,7 +371,7 @@ fn write_opts_of(p: &Parser) -> String {
         }
         if let Some(long) = o.long() {
             let l = format!(
-                "'{conflicts}{multiple}--{arg}+[{help}]{possible_values}' \\",
+                "'{conflicts}{multiple}--{arg}=[{help}]{possible_values}' \\",
                 conflicts = conflicts,
                 multiple = multiple,
                 arg = long,


Test patch:
diff --git a/tests/completions.rs b/tests/completions.rs
index 31e0532f..91c454b1 100644
--- a/tests/completions.rs
+++ b/tests/completions.rs
@@ -108,7 +108,7 @@ _myapp() {
         case $line[1] in
             (test)
 _arguments -s -S -C \
-'--case+[the case to test]' \
+'--case=[the case to test]' \
 '-h[Prints help information]' \
 '--help[Prints help information]' \
 '-V[Prints version information]' \
@@ -397,7 +397,7 @@ _my_app() {
         case $line[1] in
             (test)
 _arguments -s -S -C \
-'--case+[the case to test]' \
+'--case=[the case to test]' \
 '-h[Prints help information]' \
 '--help[Prints help information]' \
 '-V[Prints version information]' \
@@ -406,7 +406,7 @@ _arguments -s -S -C \
 ;;
 (some_cmd)
 _arguments -s -S -C \
-'--config+[the other case to test]' \
+'--config=[the other case to test]' \
 '-h[Prints help information]' \
 '--help[Prints help information]' \
 '-V[Prints version information]' \
Repository: kbknapp/clap-rs
Pull request #1167 (2018-02-06 03:28:50)

style: Issue #1160
Changed error message according to Issue #1160

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kbknapp/clap-rs/1167)
<!-- Reviewable:end -->



Patch:
diff --git a/src/errors.rs b/src/errors.rs
index 664819d6..1c870341 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -496,7 +496,7 @@ impl Error {
         Error {
             message: format!(
                 "{} '{}' isn't a valid value for '{}'\n\t\
-                 [values: {}]\n\
+                 [possible values: {}]\n\
                  {}\n\n\
                  {}\n\n\
                  For more information try {}",


Test patch:
diff --git a/tests/possible_values.rs b/tests/possible_values.rs
index 4939a7d7..1bee9bf5 100644
--- a/tests/possible_values.rs
+++ b/tests/possible_values.rs
@@ -10,7 +10,7 @@ use clap::{App, Arg, ErrorKind};
 
 #[cfg(feature = "suggestions")]
 static PV_ERROR: &'static str = "error: 'slo' isn't a valid value for '--Option <option3>'
-\t[values: fast, slow]
+\t[possible values: fast, slow]
 
 \tDid you mean 'slow'?
 
@@ -21,7 +21,7 @@ For more information try --help";
 
 #[cfg(not(feature = "suggestions"))]
 static PV_ERROR: &'static str = "error: 'slo' isn't a valid value for '--Option <option3>'
-\t[values: fast, slow]
+\t[possible values: fast, slow]
 
 
 USAGE:
Repository: kbknapp/clap-rs
Pull request #1227 (2018-03-21 04:02:12)

fix(Suggestions): disables suggestions when AllowExternalSubcommand i…
…s set

Implements #1215 on v3

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kbknapp/clap-rs/1227)
<!-- Reviewable:end -->



Patch:
diff --git a/src/app/parser.rs b/src/app/parser.rs
index e8729292..75c6fa5a 100644
--- a/src/app/parser.rs
+++ b/src/app/parser.rs
@@ -472,7 +472,7 @@ where
             }
 
             if !(self.is_set(AS::ArgsNegateSubcommands) && self.is_set(AS::ValidArgFound))
-                && !self.is_set(AS::InferSubcommands)
+                && !self.is_set(AS::InferSubcommands) && !self.is_set(AS::AllowExternalSubcommands)
             {
                 if let Some(cdate) =
                     suggestions::did_you_mean(&*arg_os.to_string_lossy(), sc_names!(self.app))


Test patch:
diff --git a/tests/app_settings.rs b/tests/app_settings.rs
index 0a4cb62f..24281d0f 100644
--- a/tests/app_settings.rs
+++ b/tests/app_settings.rs
@@ -762,6 +762,24 @@ fn issue_1093_allow_ext_sc() {
     ));
 }
 
+#[test]
+fn external_subcommand_looks_like_built_in() {
+    let res = App::new("cargo")
+        .version("1.26.0")
+        .setting(AppSettings::AllowExternalSubcommands)
+        .subcommand(SubCommand::with_name("install"))
+        .get_matches_from_safe(vec!["cargo", "install-update", "foo"]);
+    assert!(res.is_ok());
+    let m = res.unwrap();
+    match m.subcommand() {
+        (name, Some(args)) => {
+            assert_eq!(name, "install-update");
+            assert_eq!(args.values_of_lossy(""), Some(vec!["foo".to_string()]));
+        }
+        _ => assert!(false),
+    }
+}
+
 #[test]
 fn aaos_flags() {
     // flags
Repository: kbknapp/clap-rs
Pull request #1242 (2018-04-04 15:11:32)

Allow deprecated to remove warnings for rustc 1.26 onwards
Currently using `arg_enum` macro on `nightly` will trigger the following warning:

```bash
use of deprecated item 'std::ascii::AsciiExt': use inherent methods instead
```

This is due to <https://github.com/rust-lang/rust/blob/master/src/libstd/ascii.rs#L55>. Projects will fail to compile on `nightly` if `#![deny(warnings)]` is set.

Resolve by appending `#[allow(deprecated)]` to affected parts to prevent warnings from bubbling up to the projects using the library.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kbknapp/clap-rs/1242)
<!-- Reviewable:end -->



Patch:
diff --git a/src/app/settings.rs b/src/app/settings.rs
index 4358e126..4aa64d33 100644
--- a/src/app/settings.rs
+++ b/src/app/settings.rs
@@ -1,5 +1,5 @@
 // Std
-#[allow(unused_imports)]
+#[allow(deprecated, unused_imports)]
 use std::ascii::AsciiExt;
 use std::str::FromStr;
 use std::ops::BitOr;
diff --git a/src/app/validator.rs b/src/app/validator.rs
index 6c297f6d..1d8e8077 100644
--- a/src/app/validator.rs
+++ b/src/app/validator.rs
@@ -1,6 +1,6 @@
 // std
 use std::fmt::Display;
-#[allow(unused_imports)]
+#[allow(deprecated, unused_imports)]
 use std::ascii::AsciiExt;
 
 // Internal
diff --git a/src/args/settings.rs b/src/args/settings.rs
index f5e3e376..864dd903 100644
--- a/src/args/settings.rs
+++ b/src/args/settings.rs
@@ -1,5 +1,5 @@
 // Std
-#[allow(unused_imports)]
+#[allow(deprecated, unused_imports)]
 use std::ascii::AsciiExt;
 use std::str::FromStr;
 
diff --git a/src/completions/shell.rs b/src/completions/shell.rs
index 75b7d360..ceec9ff5 100644
--- a/src/completions/shell.rs
+++ b/src/completions/shell.rs
@@ -1,4 +1,4 @@
-#[allow(unused_imports)]
+#[allow(deprecated, unused_imports)]
 use std::ascii::AsciiExt;
 use std::str::FromStr;
 use std::fmt;
diff --git a/src/completions/zsh.rs b/src/completions/zsh.rs
index 4c66ce44..5d23fd28 100644
--- a/src/completions/zsh.rs
+++ b/src/completions/zsh.rs
@@ -1,6 +1,6 @@
 // Std
 use std::io::Write;
-#[allow(unused_imports)]
+#[allow(deprecated, unused_imports)]
 use std::ascii::AsciiExt;
 
 // Internal
diff --git a/src/macros.rs b/src/macros.rs
index e55554b8..66778ffc 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -314,7 +314,7 @@ macro_rules! arg_enum {
             type Err = String;
 
             fn from_str(s: &str) -> ::std::result::Result<Self,Self::Err> {
-                #[allow(unused_imports)]
+                #[allow(deprecated, unused_imports)]
                 use ::std::ascii::AsciiExt;
                 match s {
                     $(stringify!($v) |


Test patch:
diff --git a/tests/possible_values.rs b/tests/possible_values.rs
index 1bee9bf5..80772bd2 100644
--- a/tests/possible_values.rs
+++ b/tests/possible_values.rs
@@ -3,7 +3,7 @@ extern crate regex;
 
 include!("../clap-test.rs");
 
-#[allow(unused_imports)]
+#[allow(deprecated, unused_imports)]
 use std::ascii::AsciiExt;
 
 use clap::{App, Arg, ErrorKind};
Repository: kbknapp/clap-rs
Pull request #1243 (2018-04-05 00:47:53)

imp: make Arg::validator more flexible (v3)
From #1088.

Makes the validator functions more flexible by changing the return type from `Result<(), String>` to `Result<O, E>` where `O` is anything and `E` is anything convertible to a `String`.

This allows, for example, using the same function for validating and parsing your argument.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kbknapp/clap-rs/1243)
<!-- Reviewable:end -->



Patch:
diff --git a/src/args/arg.rs b/src/args/arg.rs
index 824c862b..d827826f 100644
--- a/src/args/arg.rs
+++ b/src/args/arg.rs
@@ -1830,11 +1830,11 @@ impl<'a, 'b> Arg<'a, 'b> {
     /// [`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html
     /// [`Err(String)`]: https://doc.rust-lang.org/std/result/enum.Result.html#variant.Err
     /// [`Rc`]: https://doc.rust-lang.org/std/rc/struct.Rc.html
-    pub fn validator<F>(mut self, f: F) -> Self
-    where
-        F: Fn(String) -> Result<(), String> + 'static,
+    pub fn validator<F, O, E>(mut self, f: F) -> Self
+        where F: Fn(String) -> Result<O, E> + 'static,
+              E: ToString
     {
-        self.validator = Some(Rc::new(f));
+        self.validator = Some(Rc::new(move |s| f(s).map(|_| ()).map_err(|e| e.to_string())));
         self
     }
 
@@ -1868,11 +1868,10 @@ impl<'a, 'b> Arg<'a, 'b> {
     /// [`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html
     /// [`Err(String)`]: https://doc.rust-lang.org/std/result/enum.Result.html#variant.Err
     /// [`Rc`]: https://doc.rust-lang.org/std/rc/struct.Rc.html
-    pub fn validator_os<F>(mut self, f: F) -> Self
-    where
-        F: Fn(&OsStr) -> Result<(), OsString> + 'static,
+    pub fn validator_os<F, O>(mut self, f: F) -> Self
+        where F: Fn(&OsStr) -> Result<O, OsString> + 'static
     {
-        self.validator_os = Some(Rc::new(f));
+        self.validator_os = Some(Rc::new(move |s| f(s).map(|_| ())));
         self
     }
 


Test patch:
diff --git a/tests/env.rs b/tests/env.rs
index aded47bd..431a0211 100644
--- a/tests/env.rs
+++ b/tests/env.rs
@@ -240,6 +240,21 @@ fn validator() {
     assert_eq!(m.value_of("arg").unwrap(), "env");
 }
 
+#[test]
+fn validator_output() {
+    env::set_var("CLP_TEST_ENV", "42");
+
+    let r = App::new("df")
+        .arg(
+            Arg::from_usage("[arg] 'some opt'")
+                .env("CLP_TEST_ENV")
+                .validator(|s| s.parse::<i32>())
+        )
+        .get_matches_from_safe(vec![""]);
+
+    assert_eq!(r.unwrap().value_of("arg").unwrap().parse(), Ok(42));
+}
+
 #[test]
 fn validator_invalid() {
     env::set_var("CLP_TEST_ENV", "env");
Repository: vitessio/vitess
Pull request #6109 (2020-04-24 13:59:07)

Fixed error message on database ddl query execution
Signed-off-by: Harshit Gangal <harshit@planetscale.com>


Patch:
diff --git a/go/vt/vtgate/planbuilder/builder.go b/go/vt/vtgate/planbuilder/builder.go
index 54b076790e..95ec66d36b 100644
--- a/go/vt/vtgate/planbuilder/builder.go
+++ b/go/vt/vtgate/planbuilder/builder.go
@@ -305,7 +305,9 @@ func BuildFromStmt(query string, stmt sqlparser.Statement, vschema ContextVSchem
 		instruction, err = buildOtherReadAndAdmin(query, vschema)
 	case *sqlparser.Set:
 		instruction, err = buildSetPlan(query, stmt, vschema)
-	case *sqlparser.Show, *sqlparser.DBDDL, *sqlparser.SetTransaction:
+	case *sqlparser.DBDDL:
+		return nil, vterrors.Errorf(vtrpcpb.Code_UNIMPLEMENTED, "unsupported: Database DDL %v", sqlparser.String(stmt))
+	case *sqlparser.Show, *sqlparser.SetTransaction:
 		return nil, ErrPlanNotSupported
 	case *sqlparser.Begin, *sqlparser.Commit, *sqlparser.Rollback:
 		// Empty by design. Not executed by a plan


Test patch:
diff --git a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.txt b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.txt
index d2bc6dac7d..4bd698c490 100644
--- a/go/vt/vtgate/planbuilder/testdata/unsupported_cases.txt
+++ b/go/vt/vtgate/planbuilder/testdata/unsupported_cases.txt
@@ -411,3 +411,7 @@
 # delete with multi-table targets
 "delete music,user from music inner join user where music.id = user.id"
 "unsupported: multi-shard or vindex write statement"
+
+# Database DDL
+"create database foo"
+"unsupported: Database DDL create database foo"
Repository: vitessio/vitess
Pull request #6746 (2020-09-18 13:56:25)

Backport: Turn off schema tracker by default
Backporting #6712 

Signed-off-by: Rohit Nayak <rohit@planetscale.com>


Patch:
diff --git a/go/vt/vttablet/tabletserver/tabletenv/config.go b/go/vt/vttablet/tabletserver/tabletenv/config.go
index f68e8da3c0..1e19541472 100644
--- a/go/vt/vttablet/tabletserver/tabletenv/config.go
+++ b/go/vt/vttablet/tabletserver/tabletenv/config.go
@@ -117,7 +117,7 @@ func init() {
 	flag.BoolVar(&currentConfig.TerseErrors, "queryserver-config-terse-errors", defaultConfig.TerseErrors, "prevent bind vars from escaping in returned errors")
 	flag.StringVar(&deprecatedPoolNamePrefix, "pool-name-prefix", "", "Deprecated")
 	flag.BoolVar(&currentConfig.WatchReplication, "watch_replication_stream", false, "When enabled, vttablet will stream the MySQL replication stream from the local server, and use it to update schema when it sees a DDL.")
-	flag.BoolVar(&currentConfig.TrackSchemaVersions, "track_schema_versions", true, "When enabled, vttablet will store versions of schemas at each position that a DDL is applied and allow retrieval of the schema corresponding to a position")
+	flag.BoolVar(&currentConfig.TrackSchemaVersions, "track_schema_versions", false, "When enabled, vttablet will store versions of schemas at each position that a DDL is applied and allow retrieval of the schema corresponding to a position")
 	flag.BoolVar(&deprecatedAutocommit, "enable-autocommit", true, "This flag is deprecated. Autocommit is always allowed.")
 	flag.BoolVar(&currentConfig.TwoPCEnable, "twopc_enable", defaultConfig.TwoPCEnable, "if the flag is on, 2pc is enabled. Other 2pc flags must be supplied.")
 	flag.StringVar(&currentConfig.TwoPCCoordinatorAddress, "twopc_coordinator_address", defaultConfig.TwoPCCoordinatorAddress, "address of the (VTGate) process(es) that will be used to notify of abandoned transactions.")


Test patch:
diff --git a/go/vt/vttablet/tabletserver/tabletenv/config_test.go b/go/vt/vttablet/tabletserver/tabletenv/config_test.go
index bcb5e684a3..082c02c794 100644
--- a/go/vt/vttablet/tabletserver/tabletenv/config_test.go
+++ b/go/vt/vttablet/tabletserver/tabletenv/config_test.go
@@ -190,7 +190,7 @@ func TestFlags(t *testing.T) {
 		StreamBufferSize:            32768,
 		QueryCacheSize:              5000,
 		SchemaReloadIntervalSeconds: 1800,
-		TrackSchemaVersions:         true,
+		TrackSchemaVersions:         false,
 		MessagePostponeParallelism:  4,
 		CacheResultFields:           true,
 		TxThrottlerConfig:           "target_replication_lag_sec: 2\nmax_replication_lag_sec: 10\ninitial_rate: 100\nmax_increase: 1\nemergency_decrease: 0.5\nmin_duration_between_increases_sec: 40\nmax_duration_between_increases_sec: 62\nmin_duration_between_decreases_sec: 20\nspread_backlog_across_sec: 20\nage_bad_rate_after_sec: 180\nbad_rate_increase: 0.1\nmax_rate_approach_threshold: 0.9\n",
Repository: vitessio/vitess
Pull request #6504 (2020-07-30 11:06:37)

Backport: HandleSet in executor to handle multiple settings in single set statement
Backport #6495 


Patch:
diff --git a/go/vt/vtgate/executor.go b/go/vt/vtgate/executor.go
index 048af33dfb..1233faeb7b 100644
--- a/go/vt/vtgate/executor.go
+++ b/go/vt/vtgate/executor.go
@@ -375,6 +375,7 @@ func (e *Executor) handleSet(ctx context.Context, safeSession *SafeSession, sql
 		logStats.ExecuteTime = time.Since(execStart)
 	}()
 
+	var value interface{}
 	for _, expr := range set.Exprs {
 		// This is what correctly allows us to handle queries such as "set @@session.`autocommit`=1"
 		// it will remove backticks and double quotes that might surround the part after the first period
@@ -384,13 +385,13 @@ func (e *Executor) handleSet(ctx context.Context, safeSession *SafeSession, sql
 		case sqlparser.GlobalStr:
 			return nil, vterrors.New(vtrpcpb.Code_INVALID_ARGUMENT, "unsupported in set: global")
 		case sqlparser.SessionStr:
-			value, err := getValueFor(expr)
+			value, err = getValueFor(expr)
 			if err != nil {
 				return nil, err
 			}
-			return &sqltypes.Result{}, handleSessionSetting(ctx, name, safeSession, value, e.txConn, sql)
+			err = handleSessionSetting(ctx, name, safeSession, value, e.txConn, sql)
 		case sqlparser.VitessMetadataStr:
-			value, err := getValueFor(expr)
+			value, err = getValueFor(expr)
 			if err != nil {
 				return nil, err
 			}
@@ -398,11 +399,14 @@ func (e *Executor) handleSet(ctx context.Context, safeSession *SafeSession, sql
 			if !ok {
 				return nil, vterrors.Errorf(vtrpcpb.Code_INVALID_ARGUMENT, "unexpected value type for charset: %v", value)
 			}
-			return e.handleSetVitessMetadata(ctx, name, val)
+			_, err = e.handleSetVitessMetadata(ctx, name, val)
 		case "": // we should only get here with UDVs
 			return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "should have been handled by planning")
 
 		}
+		if err != nil {
+			return nil, err
+		}
 	}
 
 	return &sqltypes.Result{}, nil


Test patch:
diff --git a/go/vt/vtgate/executor_set_test.go b/go/vt/vtgate/executor_set_test.go
index b77c12f6b3..42cd9c5876 100644
--- a/go/vt/vtgate/executor_set_test.go
+++ b/go/vt/vtgate/executor_set_test.go
@@ -45,8 +45,8 @@ func TestExecutorSet(t *testing.T) {
 		out *vtgatepb.Session
 		err string
 	}{{
-		in:  "set autocommit = 1",
-		out: &vtgatepb.Session{Autocommit: true},
+		in:  "set autocommit = 1, client_found_rows = 1",
+		out: &vtgatepb.Session{Autocommit: true, Options: &querypb.ExecuteOptions{ClientFoundRows: true}},
 	}, {
 		in:  "set @@autocommit = true",
 		out: &vtgatepb.Session{Autocommit: true},