From c05d76f52a84368bb4c34885ce1ee2b50eb60f7b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 15 Oct 2026 14:32:59 +0200 Subject: [PATCH] loclized for ER_JSON_OPTIMIZER_REPLAY_CONTEXT_MATCH_FAILED and a test --- .../main/opt_context_load_stats_basic.result | 20 +++++++++++-------- .../main/opt_context_load_stats_basic.test | 4 ++++ sql/share/errmsg-utf8.txt | 1 + 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/mysql-test/main/opt_context_load_stats_basic.result b/mysql-test/main/opt_context_load_stats_basic.result index e4ed80a9583..a3af558ba39 100644 --- a/mysql-test/main/opt_context_load_stats_basic.result +++ b/mysql-test/main/opt_context_load_stats_basic.result @@ -348,18 +348,22 @@ a b Warnings: Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1.t1_idx_a doesn't exist in list of range contexts Warning 4270 Failed to match the stats from replay context with the optimizer stats: the given list of ranges i.e. [(10) < (a), ] doesn't exist in the list of ranges for table_name db1.t1 and index_name t1_idx_ab +set character_set_results=utf8mb4; +set lc_messages=hi_IN; set @opt_context=json_replace(@saved_opt_context_1, '$.tables[0].name', 'db2.t1'); select * from t1 where a > 10; a b Warnings: -Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1 doesn't exist in list of table contexts -Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1.t1_idx_a doesn't exist in list of index contexts -Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1.t1_idx_b doesn't exist in list of index contexts -Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1.t1_idx_ab doesn't exist in list of index contexts -Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1 doesn't exist in list of table contexts -Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1.t1_idx_a doesn't exist in list of range contexts -Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1.t1_idx_ab doesn't exist in list of range contexts -Warning 4270 Failed to match the stats from replay context with the optimizer stats: db1.t1 doesn't exist in list of table contexts +Warning 4270 रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: list of table contexts में db1.t1 मौजूद नहीं है +Warning 4270 रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: list of index contexts में db1.t1.t1_idx_a मौजूद नहीं है +Warning 4270 रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: list of index contexts में db1.t1.t1_idx_b मौजूद नहीं है +Warning 4270 रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: list of index contexts में db1.t1.t1_idx_ab मौजूद नहीं है +Warning 4270 रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: list of table contexts में db1.t1 मौजूद नहीं है +Warning 4270 रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: list of range contexts में db1.t1.t1_idx_a मौजूद नहीं है +Warning 4270 रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: list of range contexts में db1.t1.t1_idx_ab मौजूद नहीं है +Warning 4270 रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: list of table contexts में db1.t1 मौजूद नहीं है +set lc_messages=default; +set character_set_results=default; set optimizer_replay_context=""; explain select tt1.a, tt2.b from t1 tt1, t1 tt2 where tt1.a = tt2.a; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/main/opt_context_load_stats_basic.test b/mysql-test/main/opt_context_load_stats_basic.test index edcefa73f26..70c66d07055 100644 --- a/mysql-test/main/opt_context_load_stats_basic.test +++ b/mysql-test/main/opt_context_load_stats_basic.test @@ -246,8 +246,12 @@ select * from t1 where a > 10; set @opt_context=json_remove(@saved_opt_context_1, '$.tables[0].multi_range_read_info_const_calls[0]'); select * from t1 where a > 10; +set character_set_results=utf8mb4; +set lc_messages=hi_IN; set @opt_context=json_replace(@saved_opt_context_1, '$.tables[0].name', 'db2.t1'); select * from t1 where a > 10; +set lc_messages=default; +set character_set_results=default; set optimizer_replay_context=""; diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt index d6436255da7..c8c676de312 100644 --- a/sql/share/errmsg-utf8.txt +++ b/sql/share/errmsg-utf8.txt @@ -12418,3 +12418,4 @@ ER_JSON_OPTIMIZER_REPLAY_CONTEXT_PARSE_FAILED eng "Failed to parse saved optimizer context: %s at offset %d." ER_JSON_OPTIMIZER_REPLAY_CONTEXT_MATCH_FAILED eng "Failed to match the stats from replay context with the optimizer stats: %s doesn't exist in %s" + hindi "रीप्ले कॉन्टेक्स्ट के आँकड़ों का ऑप्टिमाइज़र के आँकड़ों से मिलान नहीं हो सका: %2$s में %1$s मौजूद नहीं है"