Bug #16850 Database gets unusable
Submitted: 27 Jan 2006 18:24 Modified: 28 Feb 2006 11:46
Reporter: Haktan Bulut Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.18 OS:FreeBSD (FreeBSD 6.0 + Windows XP Pro)
Assigned to: CPU Architecture:Any

[27 Jan 2006 18:24] Haktan Bulut
Description:
I have made a database where I need to be able to "time warp" in order to simulate how things will happen in future. I have made a simple function that should replace the NOW()-function with a datetime that I can define. This is defined as:

DELIMITER $$
DROP FUNCTION IF EXISTS fr.sysnow $$
CREATE FUNCTION fr.sysnow() RETURNS DATETIME
BEGIN
  RETURN NOW(); 
END
$$
DELIMITER ;

Now I have tables & views that uses SYSNOW() like

"WHERE end_date <= SYSNOW()..."

When I load my database with DDL and static-data, i goes fine, but connecting to the database produces (from log-file):

mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8388600
read_buffer_size=131072
max_used_connections=2
max_connections=100
threads_connected=2
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225791 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

060127 19:12:22  mysqld restarted
060127 19:12:22  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
060127 19:12:22  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43685.
InnoDB: Doing recovery: scanned up to log sequence number 0 43685
060127 19:12:22  InnoDB: Started; log sequence number 0 43685
060127 19:12:22 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.18'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.18

How to repeat:
I happens every time!
[28 Jan 2006 11:46] Valeriy Kravchuk
Thank you for a problem report. Please, send a smallest possible sequence of statements to reproduce the behaviour you described. If you can do it only with proprietary tables and data, you may upload you test case as private file, using the File tab.
[1 Mar 2006 0:00] 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".