Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4736

Assertion `! is_set()' fails in Diagnostics_area::set_ok_status on UPDATE which violates constraint on a remote table

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.4
    • 10.0.5
    • None

    Description

      0.0/sql/sql_error.cc", line=<optimized out>, function=<optimized out>) at assert.c:94
      #7  0x00007f79d2a77192 in __GI___assert_fail (assertion=0xe7044f "! is_set()", file=0xe70380 "10.0/sql/sql_error.cc", line=362, function=0xe708e0 "void Diagnostics_area::set_ok_status(THD*, ulonglong, ulonglong, const char*)") at assert.c:103
      #8  0x00000000005fdd8a in Diagnostics_area::set_ok_status (this=0x3a06258, thd=0x3a013a8, affected_rows_arg=0, last_insert_id_arg=0, message_arg=0x7f79d0076850 "Rows matched: 1  Changed: 0  Warnings: 1") at 10.0/sql/sql_error.cc:362
      #9  0x00000000005babfa in my_ok (thd=0x3a013a8, affected_rows=0, id=0, message=0x7f79d0076850 "Rows matched: 1  Changed: 0  Warnings: 1") at 10.0/sql/sql_class.h:3376
      #10 0x00000000006ebe2d in mysql_update (thd=0x3a013a8, table_list=0x7f79b4056810, fields=..., values=..., conds=0x7f79b4084200, order_num=0, order=0x0, limit=18446744073709551614, handle_duplicates=DUP_ERROR, ignore=false, found_return=0x7f79d0076e00, updated_return=0x7f79d0076e08) at 10.0/sql/sql_update.cc:937
      #11 0x0000000000625087 in mysql_execute_command (thd=0x3a013a8) at 10.0/sql/sql_parse.cc:3204
      #12 0x000000000062d680 in mysql_parse (thd=0x3a013a8, rawbuf=0x7f79b40449c0 "UPDATE t1 SET a=1 WHERE a=2", length=27, parser_state=0x7f79d0077500) at 10.0/sql/sql_parse.cc:6176
      #13 0x0000000000620556 in dispatch_command (command=COM_QUERY, thd=0x3a013a8, packet=0x3a065a9 "UPDATE t1 SET a=1 WHERE a=2", packet_length=27) at 10.0/sql/sql_parse.cc:1274
      #14 0x000000000061f9cc in do_command (thd=0x3a013a8) at 10.0/sql/sql_parse.cc:983
      #15 0x000000000073d820 in do_handle_one_connection (thd_arg=0x3a013a8) at 10.0/sql/sql_connect.cc:1267
      #16 0x000000000073d573 in handle_one_connection (arg=0x3a013a8) at 10.0/sql/sql_connect.cc:1181
      #17 0x00000000009d32b4 in pfs_spawn_thread (arg=0x3875eb8) at 10.0/storage/perfschema/pfs.cc:1800
      #18 0x00007f79d3a5de9a in start_thread (arg=0x7f79d0078700) at pthread_create.c:308
      #19 0x00007f79d2b3bcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      bzr version-info

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

      Test case:

      	DROP TABLE IF EXISTS mysql.spider_xa;
      	CREATE TABLE mysql.spider_xa(
       format_id int not null default 0,
       gtrid_length int not null default 0,
       bqual_length int not null default 0,
       data char(128) charset binary not null default '',
       status char(8) not null default '',
       PRIMARY KEY (data, format_id, gtrid_length),
       KEY idx1 (status)
       ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
      	DROP TABLE IF EXISTS mysql.spider_xa_member;
      	CREATE TABLE mysql.spider_xa_member(
       format_id int not null default 0,
       gtrid_length int not null default 0,
       bqual_length int not null default 0,
       data char(128) charset binary not null default '',
       scheme char(64) not null default '',
       host char(64) not null default '',
       port char(5) not null default '',
       socket text not null default '',
       username char(64) not null default '',
       password char(64) not null default '',
       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,
       KEY idx1 (data, format_id, gtrid_length, host)
       ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
      	DROP TABLE IF EXISTS mysql.spider_tables;
      	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;
      	DROP TABLE IF EXISTS mysql.spider_link_mon_servers;
      	CREATE TABLE mysql.spider_link_mon_servers(
       db_name char(64) not null default '',
       table_name char(64) not null default '',
       link_id char(5) not null default '',
       sid int 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,
       PRIMARY KEY (db_name, table_name, link_id, sid)
       ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
      	DROP TABLE IF EXISTS mysql.spider_link_failed_log;
      	CREATE TABLE mysql.spider_link_failed_log(
       db_name char(64) not null default '',
       table_name char(64) not null default '',
       link_id int not null default 0,
       failed_time timestamp not null default current_timestamp
       ) ENGINE=MYISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
       
      install soname 'ha_spider.so';
      create database remote;
       
      CREATE TABLE remote.t1 (a INT(11), b CHAR(8), UNIQUE INDEX(a)) ENGINE=MyISAM;
      eval CREATE TABLE t1 (a INT(11), b CHAR(8)) ENGINE=SPIDER CONNECTION='host "localhost", socket "$MASTER_MYSOCK", user "root", password "", prt "2000000"' COMMENT='database "remote", table "t1"';
       
      INSERT INTO t1 (a,b) VALUES (1,'a'),(2,'b');
      UPDATE t1 SET a=1 WHERE a=2;

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.