Bug #6781 mySQL crashes from executing init_file

Submitted: 23 Nov 2004 21:02 Modified: 19 Jan 2005 11:36
Reporter: Dathan Pattishall Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.20 OS:Linux (Linux dbcountmstr1 2.4.21-215-sm)
Assigned to: CPU Architecture:Any

[23 Nov 2004 21:02] Dathan Pattishall
Description:
mySQL-4.0.20 crashes on startup when the following events.

Use this my.cnf

# The following options will be passed to all MySQL clients
# $Id: my.cnf.tmpl,v 1.1 2004/11/22 23:06:21 dathan Exp $
[client]
port>--->---= 3306
socket>->---= /var/lib/mysql/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket>->---= /var/lib/mysql/mysql.sock
skip-external-locking
skip-name-resolve
skip-innodb
skip-bdb
key_buffer=1024M
max_allowed_packet=16M
table_cache=512
tmp_table_size  = 64M
sort_buffer_size=4M
read_buffer_size=4M
read_rnd_buffer_size=4M
thread_cache=20
myisam_sort_buffer_size=32M
query_cache_type = 1
query_cache_size = 64M
#init_file crashes mysql at startup
#init_file=dbcntinit.sql

# Replication settings (must be unique across master and all slaves)
server-id>--= %SERVERID%

# Table Filters (only replicate these tables - only used for slow-read slaves)
slave-skip-errors=1062

# Create slow query log (WARNING: can consume a lot of disk on slow-read slaves)
long_query_time=10
max_connections=300
max_connect_errors=999999
wait_timeout=120

# Point the following paths to different dedicated disks
tmpdir>->---    = /tmp/>>---
relay-log >-    = /var/lib/mysql/dbslave-relay-bin
master-info-file    = /var/lib/mysql/master.info
relay-log-index>    = /var/lib/mysql/dbslave-relay-bin.index
relay-log-info-file = /var/lib/mysql/relay-log.info
log-slave-updates
log-bin             = /var/lib/mysql/dbcnt-bin

[mysqldump]
quick
max_allowed_packet=4M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer=256M
sort_buffer=256M
read_buffer=2M
write_buffer=2M

[myisamchk]
key_buffer=256M
sort_buffer=256M
read_buffer=2M
write_buffer=2M

[mysqlhotcopy]
interactive-timeout

slave stop;
CREATE DATABASE IF NOT EXISTS clickcounts;
use clickcounts;
CREATE TABLE IF NOT EXISTS profile_view_count_sum
(
 user_id int NOT NULL PRIMARY KEY,
 count_total smallint  unsigned NOT NULL DEFAULT 0,
 count_since date default NULL
)  TYPE=MYISAM DATA DIRECTORY = '/dev/shm/clickcounts' INDEX DIRECTORY = '/dev/s
hm/clickcounts';

--
-- 4 + 4 + 4 = 16 bytes per row: 20 million users is 228 MB
--
CREATE TABLE IF NOT EXISTS profile_view_count_detail
(
 viewed_id int not null,
 viewer_id int not null,
 viewdate  date default null,
 PRIMARY KEY (viewed_id,viewer_id,viewdate)
) TYPE=MYISAM DATA DIRECTORY = '/dev/shm/clickcounts' INDEX DIRECTORY = '/dev/sh
m/clickcounts';

slave start

The slave is not configured

How to repeat:
Look above

Suggested fix:
look at the init_file code in src/sql
[7 Dec 2004 19:43] MySQL Verification Team
Hi,

Thank you for the report. I tested your example with 4.0.23-debug-log and MySQL server started successfully with init_file.
Does MySQL server crash if you comment init_file option in the my.cnf?
[7 Dec 2004 20:10] Dathan Pattishall
The server does not crash if I comment out the init_file field  in my.cnf

In fact I had to resort to starting mysqld then in the init script process use the client to apply the changes of the init_file sql file.

i.e.

mysql -uroot  mydatabase < init_file.sql
[19 Dec 2004 11:36] Hartmut Holzgraefe
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://www.mysql.com/doc/en/Making_trace_files.html

Once you have generated a backtrace, please submit it to this bug
report and change the status back to 'Open'. Thank you for helping
us make our products better.
[14 Feb 2005 22:54] 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".

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

Page generated in 0.041 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.