-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
62050: sql: allow VIEW and SEQUENCEs for multi-region databases r=ajstorm a=otan Refs #61382 -- missing materialized views. Release note (bug fix): Allow VIEWs and SEQUENCEs in multi-region databases. They will have REGIONAL BY TABLE set. Co-authored-by: Oliver Tan <otan@cockroachlabs.com>
- Loading branch information
Showing
13 changed files
with
378 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
pkg/ccl/importccl/testdata/mysqldump/views_and_sequences.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
-- MySQL dump 10.13 Distrib 8.0.23, for osx10.15 (x86_64) | ||
-- | ||
-- Host: localhost Database: bob | ||
-- ------------------------------------------------------ | ||
-- Server version 8.0.23 | ||
|
||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | ||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | ||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | ||
/*!50503 SET NAMES utf8mb4 */; | ||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; | ||
/*!40103 SET TIME_ZONE='+00:00' */; | ||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; | ||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; | ||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; | ||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; | ||
|
||
-- | ||
-- Table structure for table `tbl` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `tbl`; | ||
/*!40101 SET @saved_cs_client = @@character_set_client */; | ||
/*!50503 SET character_set_client = utf8mb4 */; | ||
CREATE TABLE `tbl` ( | ||
`id` int NOT NULL AUTO_INCREMENT, | ||
`a` int DEFAULT NULL, | ||
PRIMARY KEY (`id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; | ||
/*!40101 SET character_set_client = @saved_cs_client */; | ||
|
||
-- | ||
-- Dumping data for table `tbl` | ||
-- | ||
|
||
LOCK TABLES `tbl` WRITE; | ||
/*!40000 ALTER TABLE `tbl` DISABLE KEYS */; | ||
/*!40000 ALTER TABLE `tbl` ENABLE KEYS */; | ||
UNLOCK TABLES; | ||
|
||
-- | ||
-- Temporary view structure for view `v` | ||
-- | ||
|
||
DROP TABLE IF EXISTS `v`; | ||
/*!50001 DROP VIEW IF EXISTS `v`*/; | ||
SET @saved_cs_client = @@character_set_client; | ||
/*!50503 SET character_set_client = utf8mb4 */; | ||
/*!50001 CREATE VIEW `v` AS SELECT | ||
1 AS `id`, | ||
1 AS `a`*/; | ||
SET character_set_client = @saved_cs_client; | ||
|
||
-- | ||
-- Final view structure for view `v` | ||
-- | ||
|
||
/*!50001 DROP VIEW IF EXISTS `v`*/; | ||
/*!50001 SET @saved_cs_client = @@character_set_client */; | ||
/*!50001 SET @saved_cs_results = @@character_set_results */; | ||
/*!50001 SET @saved_col_connection = @@collation_connection */; | ||
/*!50001 SET character_set_client = utf8mb4 */; | ||
/*!50001 SET character_set_results = utf8mb4 */; | ||
/*!50001 SET collation_connection = utf8mb4_0900_ai_ci */; | ||
/*!50001 CREATE ALGORITHM=UNDEFINED */ | ||
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ | ||
/*!50001 VIEW `v` AS select `tbl`.`id` AS `id`,`tbl`.`a` AS `a` from `tbl` */; | ||
/*!50001 SET character_set_client = @saved_cs_client */; | ||
/*!50001 SET character_set_results = @saved_cs_results */; | ||
/*!50001 SET collation_connection = @saved_col_connection */; | ||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; | ||
|
||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; | ||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; | ||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; | ||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; | ||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; | ||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; | ||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; | ||
|
||
-- Dump completed on 2021-03-17 8:23:08 |
Oops, something went wrong.