dolthub / dolthub/dolt

A failed create table still creates a table but of a different specification

Open
#3,024 2 comments 0 reactions 1 assignee Claimed by @zachmu View on GitHub
bug correctness sql
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

```
test-busteroni $ dolt sql
# Welcome to the DoltSQL shell.
# Statements must be terminated with ';'.
# "exit" or "quit" (or Ctrl-D) to exit.
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)
-> );
cannot create an index over spatial type columns
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 |
+-------+--------------------------------------------------------------------------------------------------------------------------------------------+
```

When piped in as a SQL statement the table is not created as in #3023.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.