From c1caca223b148c8b1378bc2502086a0f7a181fdb Mon Sep 17 00:00:00 2001 From: D3Hunter Date: Wed, 6 Dec 2023 11:22:19 +0800 Subject: [PATCH 1/2] This is an automated cherry-pick of #49207 Signed-off-by: ti-chi-bot --- errno/errname.go | 5 +++++ errors.toml | 4 ++++ executor/loadremotetest/error_test.go | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/errno/errname.go b/errno/errname.go index d6f124ac49d11..c949224acf917 100644 --- a/errno/errname.go +++ b/errno/errname.go @@ -1044,8 +1044,13 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{ ErrLoadParquetFromLocal: mysql.Message("Do not support loading parquet files from local. Please try to load the parquet files from the cloud storage", nil), ErrLoadDataEmptyPath: mysql.Message("The value of INFILE must not be empty when LOAD DATA from LOCAL", nil), ErrLoadDataUnsupportedFormat: mysql.Message("The FORMAT '%s' is not supported", nil), +<<<<<<< HEAD:errno/errname.go ErrLoadDataInvalidURI: mysql.Message("The URI of INFILE is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access_key_id={your_access_key_id ID}&secret_access_key={your_secret_access_key}&session_token={your_session_token}'", nil), ErrLoadDataCantAccess: mysql.Message("Access to the source file has been denied. Reason: %s. Please check the URI, access key and secret access key are correct", nil), +======= + ErrLoadDataInvalidURI: mysql.Message("The URI of %s is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access-key={your_access_key_id ID}&secret-access-key={your_secret_access_key}&session-token={your_session_token}'", nil), + ErrLoadDataCantAccess: mysql.Message("Access to the %s has been denied. Reason: %s. Please check the URI, access key and secret access key are correct", nil), +>>>>>>> d932d907f80 (errmsg: fix example s3 url in error msg (#49207)):pkg/errno/errname.go ErrLoadDataCantRead: mysql.Message("Failed to read source files. Reason: %s. %s", nil), ErrLoadDataWrongFormatConfig: mysql.Message("", nil), ErrUnknownOption: mysql.Message("Unknown option %s", nil), diff --git a/errors.toml b/errors.toml index 46ac796446aa1..fc8ba4ad45835 100644 --- a/errors.toml +++ b/errors.toml @@ -1733,7 +1733,11 @@ The FORMAT '%s' is not supported ["executor:8158"] error = ''' +<<<<<<< HEAD The URI of INFILE is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access_key_id={your_access_key_id ID}&secret_access_key={your_secret_access_key}&session_token={your_session_token}' +======= +The URI of %s is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access-key={your_access_key_id ID}&secret-access-key={your_secret_access_key}&session-token={your_session_token}' +>>>>>>> d932d907f80 (errmsg: fix example s3 url in error msg (#49207)) ''' ["executor:8159"] diff --git a/executor/loadremotetest/error_test.go b/executor/loadremotetest/error_test.go index 2b476914a54b8..7d98318e8b051 100644 --- a/executor/loadremotetest/error_test.go +++ b/executor/loadremotetest/error_test.go @@ -54,7 +54,11 @@ func (s *mockGCSSuite) TestErrorMessage() { checkClientErrorMessage(s.T(), err, "ERROR 1054 (42S22): Unknown column 'wrong' in 'field list'") err = s.tk.ExecToErr("LOAD DATA INFILE 'abc://1' INTO TABLE t;") checkClientErrorMessage(s.T(), err, +<<<<<<< HEAD:executor/loadremotetest/error_test.go "ERROR 8158 (HY000): The URI of INFILE is invalid. Reason: storage abc not support yet. Please provide a valid URI, such as 's3://import/test.csv?access_key_id={your_access_key_id ID}&secret_access_key={your_secret_access_key}&session_token={your_session_token}'") +======= + "ERROR 8158 (HY000): The URI of data source is invalid. Reason: storage abc not support yet. Please provide a valid URI, such as") +>>>>>>> d932d907f80 (errmsg: fix example s3 url in error msg (#49207)):pkg/executor/test/loadremotetest/error_test.go err = s.tk.ExecToErr("LOAD DATA INFILE 's3://no-network' INTO TABLE t;") checkClientErrorMessage(s.T(), err, "ERROR 8159 (HY000): Access to the source file has been denied. Reason: failed to get region of bucket no-network. Please check the URI, access key and secret access key are correct") From deb7be0b4379e76fb7362c8a76e1387ca9c8e5d4 Mon Sep 17 00:00:00 2001 From: D3Hunter Date: Wed, 6 Dec 2023 12:34:34 +0800 Subject: [PATCH 2/2] fix conflict --- errno/errname.go | 7 +------ errors.toml | 6 +----- executor/loadremotetest/error_test.go | 6 +----- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/errno/errname.go b/errno/errname.go index c949224acf917..7bc5e929dbbf2 100644 --- a/errno/errname.go +++ b/errno/errname.go @@ -1044,13 +1044,8 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{ ErrLoadParquetFromLocal: mysql.Message("Do not support loading parquet files from local. Please try to load the parquet files from the cloud storage", nil), ErrLoadDataEmptyPath: mysql.Message("The value of INFILE must not be empty when LOAD DATA from LOCAL", nil), ErrLoadDataUnsupportedFormat: mysql.Message("The FORMAT '%s' is not supported", nil), -<<<<<<< HEAD:errno/errname.go - ErrLoadDataInvalidURI: mysql.Message("The URI of INFILE is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access_key_id={your_access_key_id ID}&secret_access_key={your_secret_access_key}&session_token={your_session_token}'", nil), + ErrLoadDataInvalidURI: mysql.Message("The URI of INFILE is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access-key={your_access_key_id ID}&secret-access-key={your_secret_access_key}&session-token={your_session_token}'", nil), ErrLoadDataCantAccess: mysql.Message("Access to the source file has been denied. Reason: %s. Please check the URI, access key and secret access key are correct", nil), -======= - ErrLoadDataInvalidURI: mysql.Message("The URI of %s is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access-key={your_access_key_id ID}&secret-access-key={your_secret_access_key}&session-token={your_session_token}'", nil), - ErrLoadDataCantAccess: mysql.Message("Access to the %s has been denied. Reason: %s. Please check the URI, access key and secret access key are correct", nil), ->>>>>>> d932d907f80 (errmsg: fix example s3 url in error msg (#49207)):pkg/errno/errname.go ErrLoadDataCantRead: mysql.Message("Failed to read source files. Reason: %s. %s", nil), ErrLoadDataWrongFormatConfig: mysql.Message("", nil), ErrUnknownOption: mysql.Message("Unknown option %s", nil), diff --git a/errors.toml b/errors.toml index fc8ba4ad45835..757fa81a07a0c 100644 --- a/errors.toml +++ b/errors.toml @@ -1733,11 +1733,7 @@ The FORMAT '%s' is not supported ["executor:8158"] error = ''' -<<<<<<< HEAD -The URI of INFILE is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access_key_id={your_access_key_id ID}&secret_access_key={your_secret_access_key}&session_token={your_session_token}' -======= -The URI of %s is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access-key={your_access_key_id ID}&secret-access-key={your_secret_access_key}&session-token={your_session_token}' ->>>>>>> d932d907f80 (errmsg: fix example s3 url in error msg (#49207)) +The URI of INFILE is invalid. Reason: %s. Please provide a valid URI, such as 's3://import/test.csv?access-key={your_access_key_id ID}&secret-access-key={your_secret_access_key}&session-token={your_session_token}' ''' ["executor:8159"] diff --git a/executor/loadremotetest/error_test.go b/executor/loadremotetest/error_test.go index 7d98318e8b051..42d3cb0f9d2a2 100644 --- a/executor/loadremotetest/error_test.go +++ b/executor/loadremotetest/error_test.go @@ -54,11 +54,7 @@ func (s *mockGCSSuite) TestErrorMessage() { checkClientErrorMessage(s.T(), err, "ERROR 1054 (42S22): Unknown column 'wrong' in 'field list'") err = s.tk.ExecToErr("LOAD DATA INFILE 'abc://1' INTO TABLE t;") checkClientErrorMessage(s.T(), err, -<<<<<<< HEAD:executor/loadremotetest/error_test.go - "ERROR 8158 (HY000): The URI of INFILE is invalid. Reason: storage abc not support yet. Please provide a valid URI, such as 's3://import/test.csv?access_key_id={your_access_key_id ID}&secret_access_key={your_secret_access_key}&session_token={your_session_token}'") -======= - "ERROR 8158 (HY000): The URI of data source is invalid. Reason: storage abc not support yet. Please provide a valid URI, such as") ->>>>>>> d932d907f80 (errmsg: fix example s3 url in error msg (#49207)):pkg/executor/test/loadremotetest/error_test.go + "ERROR 8158 (HY000): The URI of INFILE is invalid. Reason: storage abc not support yet. Please provide a valid URI, such as") err = s.tk.ExecToErr("LOAD DATA INFILE 's3://no-network' INTO TABLE t;") checkClientErrorMessage(s.T(), err, "ERROR 8159 (HY000): Access to the source file has been denied. Reason: failed to get region of bucket no-network. Please check the URI, access key and secret access key are correct")