[MDEV-4738] INSERT DELAYED on a SPIDER table doesn't produce ER_DELAYED_NOT_SUPPORTED, doesn't work like delayed, and doesn't honor lock_wait_timeout like normal INSERT Created: 2013-06-30  Updated: 2013-09-23  Resolved: 2013-09-23

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

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: spider

Issue Links:
Relates
relates to MDEV-4438 Spider storage engine Closed

 Description   

INSERT DELAYED might work differently depending on an engine. For example, on MyISAM it works in a classic way (returns and leaves the delayed operation in a separate thread). On InnoDB it produces ER_DELAYED_NOT_SUPPORTED. It would also be understandable if, when not supported, it worked as a normal INSERT.

However with SPIDER, it doesn't do either of this. It doesn't return an error, doesn't spawn a delayed operation, and doesn't work as normal INSERT. For normal INSERT, SPIDER honors lock_wait_timeout, but for INSERT DELAYED it doesn't.

Test case:

	CREATE TABLE mysql.spider_tables(
 db_name char(64) not null default '',
 table_name char(64) not null default '',
 link_id int not null default 0,
 priority bigint not null default 0,
 server char(64) default null,
 scheme char(64) default null,
 host char(64) default null,
 port char(5) default null,
 socket text default null,
 username char(64) default null,
 password char(64) default null,
 ssl_ca text default null,
 ssl_capath text default null,
 ssl_cert text default null,
 ssl_cipher char(64) default null,
 ssl_key text default null,
 ssl_verify_server_cert tinyint not null default 0,
 default_file text default null,
 default_group char(64) default null,
 tgt_db_name char(64) default null,
 tgt_table_name char(64) default null,
 link_status tinyint not null default 1,
 PRIMARY KEY (db_name, table_name, link_id),
 KEY idx1 (priority)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 
install soname 'ha_spider.so';
create database remote;
 
CREATE TABLE remote.t1 (i INT) ENGINE=MyISAM;
 
eval CREATE TABLE t1 (i INT) 
ENGINE=SPIDER 
CONNECTION='host "localhost", socket "$MASTER_MYSOCK", user "root", password "", prt "2000000"' 
COMMENT='database "remote", table "t1"';
 
LOCK TABLE t1 READ;
 
--connect (con1,localhost,root,,)
 
SET lock_wait_timeout=1;
--echo # It hangs here
INSERT DELAYED INTO t1 VALUES (1);

bzr version-info

revision-id: svoj@mariadb.org-20130627111848-b8kc0z60ywwpqavz
revno: 3762
branch-nick: 10.0



 Comments   
Comment by Sergey Vojtovich [ 2013-09-23 ]

Fixed in 10.0.5, revision-id: svoj@mariadb.org-20130923122231-78nh409e4s8j45k2

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