[MCOL-218] DROP DATABASE on a database with all empty tables is not accepted Created: 2016-06-28  Updated: 2016-11-11  Resolved: 2016-11-11

Status: Closed
Project: MariaDB ColumnStore
Component/s: DDLProc
Affects Version/s: None
Fix Version/s: 1.0.5

Type: Bug Priority: Major
Reporter: Dipti Joshi (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Duplicate
duplicates MCOL-154 Storage engine does not properly supp... Closed
duplicates MCOL-155 Bad english in error for DROP DATABAS... Closed
Sprint: 2016-19, 2016-20, 2016-21, 2016-22

 Description   

This is from an alpha user

I cannot seem to drop a ColumnStore database that has tables - even if all the tables are empty.
I truncated all the tables, but from the error message I just received, it doesn’t seem as though I can drop the database without first iterating over all the tables

MariaDB [(none)]> drop database shared;
ERROR 1178 (42000): The storage engine for the table doesn't support Non-empty database can not be dropped.



 Comments   
Comment by Dipti Joshi (Inactive) [ 2016-06-28 ]

dleeyh First assigning you to test if this is also InfiniDB behavior.

Comment by Justin Swanhart (Inactive) [ 2016-08-07 ]

@dshjoshi - haha - of course it doesn't work. don't you remember our lengthy "conversation" about how DROP DATABASE doesn't work in columnstore. YOU didn't think it was important (and neither did anyone else).

Have you noticed other people reporting the problems I was complaining about, because I HAVE.

Comment by Daniel Lee (Inactive) [ 2016-09-13 ]

This is a InfiniDB (and Columnstore) behavior by design.

Comment by Justin Swanhart (Inactive) [ 2016-09-14 ]

Not being able to drop a schema in a database violates the SQL standard. Just because the engineers were too lazy to implement dropping a database, it does not make it "by design".

Comment by Andrew Hutchings (Inactive) [ 2016-09-14 ]

I believe Daniel's point was in InfiniDB they didn't want to have it so a user could accidentally drop a lot of data in one go. So "by design" means they never intended to implement it.

Now we are ColumnStore and part of MariaDB, this will be implemented so that it is inline with the behaviour of other storage engines as much as possible.

Comment by David Thompson (Inactive) [ 2016-10-18 ]

target for beta2

Comment by Andrew Hutchings (Inactive) [ 2016-10-27 ]

Great work, seems to work really well.

Comment by Daniel Lee (Inactive) [ 2016-11-11 ]

Build verified:

mcsadmin> getsoft
getsoftwareinfo Fri Nov 11 16:39:51 2016

Name : mariadb-columnstore-platform
Version : 1.0.5
Release : 1
Architecture: x86_64
Install Date: Fri 11 Nov 2016 03:09:12 PM UTC
Group : Applications/Databases
Size : 9987818
License : Copyright (c) 2016 MariaDB Corporation Ab., all rights reserved; redistributable under the terms of the GPL, see the file COPYING for details.
Signature : (none)
Source RPM : mariadb-columnstore-platform-1.0.5-1.src.rpm
Build Date : Thu 10 Nov 2016 04:31:29 PM UTC
Build Host : centos7

Tested on a 1um2pm stack and verified:

1) calpontsys
2) extent map
3) systemFile directory in both PMs (checked directory size only)
4) 000.dir (checked directory list and size. Found one extra empty directory on pm2. That's is ok)
5) mysql local schema

Steps uses to test

1) gathered info before test
2) created 10 dbt3 database and cpimport data
3) gathered info after cpimport
4) drop database
5) gathered info after dropping database

Generated at Thu Feb 08 02:19:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.