Bug #18825 Segmentation fault with mysqldump
Submitted: 6 Apr 2006 0:03 Modified: 28 May 2006 18:33
Reporter: Sathya Parthasarathy Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.0.18 OS:Linux (Fedora linux 4.0)
Assigned to: CPU Architecture:Any

[6 Apr 2006 0:03] Sathya Parthasarathy
Description:
Running the command "mysqldump --opt -u username --password=password db_name" on a mysql 5.0.18 installation for Fedora linux, causes segmentation fault. The command outputs an incomplete dump, stopping with a segmentation fault.

How to repeat:
Run "mysqldump" command on a 5.0.18 mysql installation for fedora linux 4.0.
[6 Apr 2006 10:37] Valeriy Kravchuk
Thank you for a problem report. Is that segmentation fault repeatable for any database, db_name? Does it depent on database content? Can you try to repeat with a newer version of server, 5.0.19, and inform about the results?
[6 Apr 2006 22:55] Sathya Parthasarathy
I was able to reproduce the bug with a different database too. The segmentation fault seems to occur, when the mysqldump command is trying to output data for a view. I did not get any segmentation fault, when using mysqldump on a database with only tables and NO views. Below is the output I got on running the mysqldump on a database with both tables and views, notice the segmentation fault at the end when it is trying to dump data for a view.

[fmms@linux1 test_db]$ mysqldump --opt --flush-logs --databases -u root --passwo
rd="mysqlroot" test
-- MySQL dump 10.9
--
-- Host: localhost    Database: test
-- ------------------------------------------------------
-- Server version       5.0.18-standard

/*!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' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Current Database: `test`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l
atin1 */;

USE `test`;

--
-- Table structure for table `test_table`
--

DROP TABLE IF EXISTS `test_table`;
CREATE TABLE `test_table` (
  `test_column` int(10) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `test_table`
--

/*!40000 ALTER TABLE `test_table` DISABLE KEYS */;
LOCK TABLES `test_table` WRITE;
INSERT INTO `test_table` VALUES (1);
UNLOCK TABLES;
/*!40000 ALTER TABLE `test_table` ENABLE KEYS */;

--
-- Table structure for table `test_view`
--

DROP TABLE IF EXISTS `test_view`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW                                                                            `test_view` AS select `test_table`.`test_column` AS `test_column` from `test_tab                                                                           le`;
Segmentation fault
[28 Apr 2006 18:33] Valeriy Kravchuk
Please, try to repeat with a newer version, 5.0.20a, and inform about the results.
[18 May 2006 15:27] john danilson
I found this same bug on mysql 5.0.18 on linux rh enterprise 4es update 3.
The problem seemed to be related to views in the database.   
Upgrading to mysql 5.0.21 solved the problem.
[28 May 2006 23:02] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".