我在 MariaDB 10.1.25 中有一个数据库,其中有许多表和 20 个视图。当我尝试使用 mysqldump 备份数据库时,它对于表工作正常,但在视图定义中,它无法像表那样创建创建语句。生成的代码是这样的:
--
-- Temporary table structure for view `qry_clientes`
--
DROP TABLE IF EXISTS `qry_clientes`;
/*!50001 DROP VIEW IF EXISTS `qry_clientes`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `qry_clientes` (
`Id` tinyint NOT NULL,
`Cliente` tinyint NOT NULL,
`Direccion` tinyint NOT NULL,
`Ciudad` tinyint NOT NULL,
`Fono` tinyint NOT NULL,
`Fax` tinyint NOT NULL,
`Email` tinyint NOT NULL,
`Ruc` tinyint NOT NULL,
`tipo` tinyint NOT NULL
) ENGINE=MyISAM */; …Run Code Online (Sandbox Code Playgroud)