Bug #38389 | Falcon Storage overflow | ||
---|---|---|---|
Submitted: | 26 Jul 2008 13:37 | Modified: | 27 Jul 2008 20:24 |
Reporter: | Marian Lander | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S3 (Non-critical) |
Version: | 6.0.5-alpha | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[26 Jul 2008 13:37]
Marian Lander
[27 Jul 2008 10:39]
Sveta Smirnova
Thank you for the report. Could you please change your procedure to: create procedure baby() begin declare counter int default 1; start transaction; while 1 < 10 do insert into babies values('Jhon','Smith'); select counter; set counter = counter + 1; end while; end; $$ So it will print number of row inserted and we can guess how many rows were in the table when you stop execution.
[27 Jul 2008 18:51]
Marian Lander
I did the following: mysql> create tablespace parent -> add datafile 'parent.fts' -> engine = falcon; Query OK, 0 rows affected (0.12 sec) mysql> create table babies( -> name char(20), -> lastname char(20)) engine = archive; Query OK, 0 rows affected (0.10 sec) mysql> delimiter $$ mysql> create procedure baby() -> begin -> declare counter int default 1; -> start transaction; -> while 1 < 10 do -> insert into babies values('Jhon','Smith'); -> select counter; -> set counter = counter + 1; -> end while; -> end; -> $$ Query OK, 0 rows affected (0.00 sec) mysql> delimiter ; mysql> call baby; mysql> select count(*) from babies; +----------+ | count(*) | +----------+ | 471216 | +----------+ 1 row in set (1.67 sec) mysql> exit; bye Login again and select from babies; mysql> select count(*) from babies; +----------+ | count(*) | +----------+ | 471216 | +----------+ I drop the table babies, and create it again this time with 'Falcon' as storage engine and 'Parents' as their tablespace. mysql> show create table babies; +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | babies | CREATE TABLE `babies` ( `name` char(20) DEFAULT NULL, `lastname` char(20) DEFAULT NULL ) /*!50100 TABLESPACE `parent` */ ENGINE=Falcon DEFAULT CHARSET=latin1 | +--------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) I execute the stored procedure 'baby' and Ctrl-C to cancel the procedure and this time I was able to select results; mysql> call baby; ^CQuery aborted by Ctrl+C ERROR 1317 (70100): Query execution was interrupted mysql> select count(*) from babies; +----------+ | count(*) | +----------+ | 535986 | +----------+ 1 row in set (0.00 sec) But... after log out and log in again the table babies was reset to zero : mysql> select count(*) from babies; +----------+ | count(*) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec) I run again the stored procedure and fill up some rows; mysql> call baby; ^CQuery aborted by Ctrl+C ERROR 1317 (70100): Query execution was interrupted mysql> select count(*) from babies; +----------+ | count(*) | +----------+ | 240144 | +----------+ 1 row in set (0.26 sec) mysql> exit Bye After log in again, table babies was empty: Database changed mysql> select count(*) from babies; +----------+ | count(*) | +----------+ | 0 | +----------+ 1 row in set (0.00 sec) This issue happens with Falcon and InnoDB (Both transactional) even if I set autocommit = 1, this doesn't happen with (Myisam, archive, federated).
[27 Jul 2008 20:24]
Sveta Smirnova
Thank you for the feedback. Different result of count(*) is not a bug: you call start transaction; in the stored procedure. So when you kill its execution transaction doesn't rollback, but rollbacks when you leave mysql command line client.