[MDEV-2436] LP:794005 - Crash in st_table::mark_virtual_columns_for_write with views Created: 2011-06-07  Updated: 2015-02-02  Resolved: 2012-10-04

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

Type: Bug Priority: Critical
Reporter: Philip Stoev (Inactive) Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug794005.xml    

 Description   

Reproducible on maria-5.2 , maria-5.3, maria-5.3-wl106. Not reproducible on mysql-5.5.

backtrace:

#4 <signal handler called>
#5 0x082e5a55 in st_table::mark_virtual_columns_for_write (this=0xae72a498, insert_fl=false) at table.cc:5163
#6 0x082e5715 in st_table::mark_columns_needed_for_update (this=0xae72a498) at table.cc:5066
#7 0x0832bc4e in mysql_update (thd=0xa34ab10, table_list=0xae712eb8, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615,
handle_duplicates=DUP_ERROR, ignore=false) at sql_update.cc:382
#8 0x082855e2 in mysql_execute_command (thd=0xa34ab10) at sql_parse.cc:3110
#9 0x0828e704 in mysql_parse (thd=0xa34ab10, rawbuf=0xae712e00 "UPDATE view1 SET field1 = 'really'", length=34, found_semicolon=0xae8ff228)
at sql_parse.cc:6138
#10 0x08280c88 in dispatch_command (command=COM_QUERY, thd=0xa34ab10, packet=0xa3a34c1 "UPDATE view1 SET field1 = 'really'", packet_length=34)
at sql_parse.cc:1213
#11 0x08280125 in do_command (thd=0xa34ab10) at sql_parse.cc:903
#12 0x0827d1c5 in handle_one_connection (arg=0xa34ab10) at sql_connect.cc:1177
#13 0x00821919 in start_thread () from /lib/libpthread.so.0
#14 0x0076acce in clone () from /lib/libc.so.6

test case:

CREATE TABLE t1 (field1 INTEGER);
CREATE TABLE t2 (field1 INTEGER);

CREATE OR REPLACE ALGORITHM = MERGE VIEW view2 AS SELECT * FROM t2;
CREATE OR REPLACE ALGORITHM = MERGE VIEW view1 AS SELECT * FROM view2;
CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW view2 AS SELECT * FROM t1;
UPDATE view1 SET field1 = 'really';



 Comments   
Comment by Oleksandr Byelkin [ 2012-02-01 ]

Re: Crash in st_table::mark_virtual_columns_for_write with views
It should return error (probably check of updateability is not correct)

Comment by Rasmus Johansson (Inactive) [ 2012-02-03 ]

Launchpad bug id: 794005

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