创建表失败仍会创建一张表,但规格不同
作者: timsehn创建于 2022年3月17日更新于 2026年9月14日
标签bugsqlcorrectness
test-busteroni $ dolt sql
歡迎使用 DoltSQL 命令行。# 语句必须以 ';' 结束。# 使用 "exit" 或 "quit" (或 Ctrl-D) 退出。test_busteroni> CREATE DATABASE test;test_busteroni> CREATE TABLE IF NOT EXISTS restaurants ( id INT PRIMARY KEY, coordinate POINT );test_busteroni> CREATE TABLE IF NOT EXISTS hours ( restaurant_id INT PRIMARY KEY AUTO_INCREMENT, FOREIGN KEY (restaurant_id) REFERENCES restaurants(id) );无法为空间类型的列创建索引test_busteroni> show tables;+-------------+| Table |+-------------+| hours || restaurants |+-------------+test_busteroni> show create table hours;+-------+--------------------------------------------------------------------------------------------------------------------------------------------+| Table | Create Table |+-------+--------------------------------------------------------------------------------------------------------------------------------------------+| hours | CREATE TABLE hours ( restaurant_id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (restaurant_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 |+-------+--------------------------------------------------------------------------------------------------------------------------------------------+
内容来源: dolthub/dolt