github.com/dolthub/go-mysql-server@v0.18.0/enginetest/queries/mysql_db_queries.go (about)

     1  // Copyright 2023 Dolthub, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package queries
    16  
    17  import "github.com/dolthub/go-mysql-server/sql"
    18  
    19  var MySqlDbTests = []ScriptTest{
    20  	{
    21  		Name: "test mysql database help_ tables ",
    22  		Assertions: []ScriptTestAssertion{
    23  			{
    24  				Query:    "show create table mysql.help_topic;",
    25  				Expected: []sql.Row{{"help_topic", "CREATE TABLE `help_topic` (\n  `help_topic_id` bigint unsigned NOT NULL,\n  `name` char(64) COLLATE utf8mb3_general_ci NOT NULL,\n  `help_category_id` tinyint unsigned NOT NULL,\n  `description` text COLLATE utf8mb3_general_ci NOT NULL,\n  `example` text COLLATE utf8mb3_general_ci NOT NULL,\n  `url` text COLLATE utf8mb3_general_ci NOT NULL,\n  PRIMARY KEY (`help_topic_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin"}},
    26  			},
    27  			{
    28  				Query:    "show create table mysql.help_category;",
    29  				Expected: []sql.Row{{"help_category", "CREATE TABLE `help_category` (\n  `help_category_id` tinyint unsigned NOT NULL,\n  `name` char(64) COLLATE utf8mb3_general_ci NOT NULL,\n  `parent_category_id` tinyint unsigned NOT NULL,\n  `url` text COLLATE utf8mb3_general_ci NOT NULL,\n  PRIMARY KEY (`help_category_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin"}},
    30  			},
    31  			{
    32  				Query:    "show create table mysql.help_keyword;",
    33  				Expected: []sql.Row{{"help_keyword", "CREATE TABLE `help_keyword` (\n  `help_keyword_id` bigint unsigned NOT NULL,\n  `name` char(64) COLLATE utf8mb3_general_ci NOT NULL,\n  PRIMARY KEY (`help_keyword_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin"}},
    34  			},
    35  			{
    36  				Query:    "show create table mysql.help_relation;",
    37  				Expected: []sql.Row{{"help_relation", "CREATE TABLE `help_relation` (\n  `help_keyword_id` bigint unsigned NOT NULL,\n  `help_topic_id` bigint unsigned NOT NULL,\n  PRIMARY KEY (`help_keyword_id`,`help_topic_id`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin"}},
    38  			},
    39  		},
    40  	},
    41  }