LevelDB storage engine (MDEV-3841)

[MDEV-3967] [recreate] Server hangs on creating sort index in a re-created LevelDB table Created: 2012-12-22  Updated: 2013-02-04  Resolved: 2013-02-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Technical task Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: leveldb

Issue Links:
Relates

 Description   

It might well be related to MDEV-3965, but that task becomes somewhat difficult to read with the multiple scenarios, so I'll create a new one.

CREATE TABLE `t1` (
   `d` date NOT NULL,
   `dt` datetime DEFAULT NULL,
   `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `t` time DEFAULT NULL,
   `y` year(4) DEFAULT NULL,
   PRIMARY KEY `d` (`d`)
 ) ENGINE=LevelDB;
 
INSERT INTO t1 VALUES
 ('2012-04-09','2012-04-09 05:27:00','2012-04-09 05:27:00','05:27:00','2012');
 
DROP TABLE t1;
 
CREATE TABLE `t1` (
   `d` date DEFAULT NULL,
   `dt` datetime NOT NULL,
   `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `t` time DEFAULT NULL,
   `y` year(4) DEFAULT NULL,
   PRIMARY KEY `dt` (`dt`)
 ) ENGINE=LevelDB;
 
INSERT INTO t1 (d,dt,ts,t,y) VALUES
 ('2012-04-09','2012-04-09 05:27:00','2012-04-09 05:27:00','05:27:00','2012');
 
SELECT dt FROM t1 ORDER BY dt LIMIT 3;
 

Server hangs on the last statement, process list shows:

+----+------+-----------------+------+---------+------+---------------------+---------------------------------------+
| Id | User | Host            | db   | Command | Time | State               | Info                                  |
+----+------+-----------------+------+---------+------+---------------------+---------------------------------------+
|  3 | root | localhost:45920 | NULL | Query   |    0 | init                | show processlist                      |
|  1 | root | localhost       | test | Query   |  256 | Creating sort index | SELECT dt FROM t1 ORDER BY dt LIMIT 3 |
+----+------+-----------------+------+---------+------+---------------------+---------------------------------------+

Not sure if EXPLAIN is useful, but here it is anyway:

EXPLAIN EXTENDED
SELECT dt FROM t1 ORDER BY dt LIMIT 3;
id      select_type     table   type    possible_keys   key     key_len ref     rows    filtered        Extra
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    1000    100.00  Using filesort
Warnings:
Note    1003    /* select#1 */ select `test`.`t1`.`dt` AS `dt` from `test`.`t1` order by `test`.`t1`.`dt` limit 3
 



 Comments   
Comment by Sergei Petrunia [ 2012-12-24 ]

To be addressed when we have locking and ha_leveldb's DDL dictionary" truly supports table re-creates.

Comment by Sergei Petrunia [ 2013-02-04 ]

LevelDB SE now properly supports DROP+CREATE. The bug is no longer repeatable.

Generated at Thu Feb 08 06:52:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.