Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
liugddx committed Feb 26, 2024
1 parent 7714770 commit dec7988
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Maxlen: Maximum byte length.
### Example

```sql
mysql> show collation;
mysql> show chatset;

| Charset | Description | Default collation | Maxlen |
|-----------|-----------------|-------------------|--------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Maxlen:最大字节长度
### Example

```sql
mysql> show collation;
mysql> show chatset;

| Charset | Description | Default collation | Maxlen |
|-----------|-----------------|-------------------|--------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1662,9 +1662,9 @@ private void handleShowCharset() throws AnalysisException {
List<List<String>> rows = Lists.newArrayList();
List<String> row = Lists.newArrayList();
// | utf8mb4 | UTF-8 Unicode | utf8mb4_general_ci | 4|
row.add("utf8mb4");
row.add(ctx.getSessionVariable().getCharsetServer());
row.add("UTF-8 Unicode");
row.add("utf8mb4_0900_bin");
row.add(ctx.getSessionVariable().getCollationConnection());
row.add("4");
rows.add(row);
resultSet = new ShowResultSet(showStmt.getMetaData(), rows);
Expand All @@ -1676,8 +1676,8 @@ private void handleShowCollation() throws AnalysisException {
List<List<String>> rows = Lists.newArrayList();
List<String> row = Lists.newArrayList();
// | utf8mb4_0900_bin | utf8mb4 | 309 | Yes | Yes | 1 |
row.add("utf8mb4_0900_bin");
row.add("utf8mb4");
row.add(ctx.getSessionVariable().getCollationConnection());
row.add(ctx.getSessionVariable().getCharsetServer());
row.add("309");
row.add("Yes");
row.add("Yes");
Expand Down
4 changes: 4 additions & 0 deletions regression-test/data/show_p0/test_show_char_set.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !show --
utf8mb4 UTF-8 Unicode utf8mb4_0900_bin 4

20 changes: 20 additions & 0 deletions regression-test/suites/show_p0/test_show_char_set.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

suite("test_show_char_set") {
qt_show """show charset;"""
}

0 comments on commit dec7988

Please sign in to comment.