Bug #4972 mysqldump crashes with views

Submitted: 10 Aug 2004 11:57 Modified: 26 Sep 2004 16:18
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S1 (Critical)
Version:5.0.2 OS:Linux (Linux Suse 9.0)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[10 Aug 2004 11:57] Georg Richter
Description:
when trying to dump a database which contains views mysqldump segfaults.

Also the command DROP TABLE is wrong (should be DROP VIEW)

How to repeat:
5.0.2-alpha-debug-log
[11:49] root@test> create database test;
Query OK, 1 row affected (0.04 sec)

5.0.2-alpha-debug-log
[11:50] root@test> use test;
Database changed

5.0.2-alpha-debug-log
[11:50] root@test> create table xxx (a int);
Query OK, 0 rows affected (0.11 sec)

5.0.2-alpha-debug-log
[11:50] root@test> create view vvv as select * from xxx;
Query OK, 0 rows affected (0.01 sec)

georg@beethoven:~/work/mysql> /usr/local/mysql-5.0/bin/mysqldump test -uroot --skip-lock
-- MySQL dump 10.7
--
-- Host: localhost    Database: test
-- ------------------------------------------------------
-- Server version       5.0.2-alpha-debug-log

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */;

--
-- Table structure for table `vvv`
--

DROP TABLE IF EXISTS `vvv`;
CREATE VIEW test.vvv AS select `test`.`xxx`.`a` AS `a` from `test`.`xxx`;
Speicherzugriffsfehler
[13 Aug 2004 15:39] Alexander Keremidarski
(gdb) bt
#0  0x4e3f11e8 in strcmp () from /lib/tls/libc.so.6
#1  0x0804d9ed in check_if_ignore_table (table_name=0x804e801 "MRG_MyISAM") at mysqldump.c:2044
#2  0x0804c12c in dumpTable (numFields=1, table=0x805d874 "vvv") at mysqldump.c:1364
#3  0x0804d446 in dump_all_tables_in_db (database=0xbffffb5d "test") at mysqldump.c:1864
#4  0x0804d0e5 in dump_databases (db_names=0x80564f4) at mysqldump.c:1766
#5  0x0804dbac in main (argc=1, argv=0x80564f4) at mysqldump.c:2101
[24 Sep 2004 7:05] Oleksandr Byelkin
ChangeSet 
  1.1686 04/09/24 12:50:10 bell@sanja.is.com.ua +6 -0 
  new show create view output 
  mysqldump view support (BUG#4972) 
  workaround to allow view work after LOCK TABLES
[26 Sep 2004 16:18] Oleksandr Byelkin
Thank you for bugreport! Bug is fixed patch is pushed to source repository.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.