[Bug report] Databases disappear from the server - (vi.recover)

2001-06-27 Thread Rafael Martinez

Description:
-
This morning we were unable to access our databases from our applications.
After a closed check in the mysql-server, I found out that all the
databases had disappear. A show databases returned only ONE DB named
vi.recover , Is the first time I see this DB in our server.

If I tryed to access this DB, use vi.recover I got an error 
ERROR 1102: Incorrect database name 'vi.recover'.

All the files from the different DB where still in the HD.
After a shutdown of the mysql-server, check of the DB and starting the
mysql-server again, all my DB where back and vi.recover disappear.

- We use iasam tables.
- Some of them are some GB big with some millions entries.
- This is the first time I see this happend with the server and I am
  very worried, because these DB are a central part of our system and must
  be running all the time.

If you need more info, just ask me about it.
In advance, thank you for your help.


How-To-Repeat:
---
No idea. No errors log anywhere.

Fix:
-
The only way to get all the databases back is to shutdown the
mysql-server, run myisamchk in all the databases and start the
mysql-server again.

Submitter-Id:
--
Rafael Martinez

Originator:
Organization:

MySQL support: [none]
Synopsis: Databases disappear from the server but Mysql server does not
crash.

Severity:  [ critical ]
Priority:  [ high ]
Category:  mysql
Class: [ sw-bug ]
Release:   mysql-3.23.38 (Source distribution)

Environment:
-   
System: FreeBSD name.domain 4.3-RELEASE FreeBSD 4.3-RELEASE #0:
Fri May 11 00:13:53 CEST 2001
/usr/src/sys/compile/MYKERNEL  i386


Some paths:  /usr/bin/perl /usr/bin/make /usr/local/bin/gmake /usr/bin/gcc
/usr/bin/cc

GCC: Using builtin specs.
gcc version 2.95.3 [FreeBSD] 20010315 (release)

Compilation info: CC='cc'  CFLAGS='-O -pipe  -D__USE_UNIX98 -D_REENTRANT
-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads'  CXX='c++' 
CXXFLAGS='-O -pipe  -D__USE_UNIX98 -D_REENTRANT -D_THREAD_SAFE
-I/usr/local/include/pthread/linuxthreads -felide-constructors -fno-rtti
-fno-exceptions'  LDFLAGS=''

LIBC: 
-r--r--r--  1 root  wheel  1174570 Apr 21 11:05 /usr/lib/libc.a
lrwxrwxrwx  1 root  wheel  9 May 10 03:58 /usr/lib/libc.so - libc.so.4
-r--r--r--  1 root  wheel  561580 Apr 21 11:05 /usr/lib/libc.so.4

Configure command: ./configure  --localstatedir=/usr/local/mysql/var
--without-perl --without-debug --without-readline --without-bench
--with-mit-threads=no --with-libwrap --with-low-memory --enable-assembler
--with-berkeley-db
'--with-named-thread-libs=-DHAVE_GLIBC2_STYLE_GETHOSTBYNAME_R
-D_THREAD_SAFE -I/usr/local/include/pthread/linuxthreads -L/usr/local/lib
-llthread -llgcc_r' --prefix=/usr/local i386--freebsd4.3

Perl: This is perl, version 5.005_03 built for i386-freebsd




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re[2]: databases disappear...

2001-06-27 Thread Werner Stuerenburg

 In any case, the problem is not with Mysql - perhaps if you were to
 enquire on the PHP list with a code sample?

Also, it is a good idea to shut down mysql and restart it to see
changes written to disk, which is fine to recover memory leaks
unde Win, too. I wrote a batch

cd c:\mysql\bin
mysqladmin shutdown
mysqld

and put that on my start bar, so that is just a click.


-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 ยท Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




databases disappear...

2001-06-27 Thread Marco Bleeker

[No David, the result set that suddenly goes to 0 is, or should not be 
empty, it is the result of a SELECT with no WHERE - and there were no 
deletes yet]

For the first time developing a PHP-MySQL system, I am experiencing strange 
things. Perhaps it is the off-line mode (Localhost) I am running Apache in, 
or my Wintel 98SE Pentium3. So I create and populate 3 small tables in a 
database with a standard little PHP script. Then I start working on my 
other PHP scripts and testing them out. Of course there are mistakes, like 
forgotten semicolons or a left bracket where it should be a right one 
(parse errors), and I correct them, untill I get a nice output on my 
screen. But suddenly - Offset 0 is not valid for this result set. This is 
a mysql_data_seek() error, but that is probably a coincidence. The point 
is: MySQL suddenly thinks that the database is empty, as if it was destroyed.

When I look in my MYSQL directory tree, I find my database in the \data 
subdirectory. So it is present (3 files for each table). When I look at the 
date stamps for the files, all maintain their creation date/time, although 
I did make changes to the tables during testing - except one table, with 
just one row in it (my user/password), did change the timestamp, but I did 
not access that one (it does not work under Windows)!

It get weirder. I must physically delete the database from the MySQL data 
directory, before I can create them anew, with the same little script I 
mentioned above. Usually I can access the tabels again then, but quite 
often, I don't see the newly created tables, but the changed version from a 
previous test - although I deleted those from my hard disk.

So I presume there is a cache somewhere, maintained by Windows, Apache, 
MySQL or PHP. Can I flush that cache? How can I stop this weird behaviour? 
I hope I am not really damaging my database, because when I will be working 
with the real thing later on, I can not afford to have to start from 
scratch over and over again. Is there a workaround?

Thanks, Marco
|
| Marco Bleeker, Amsterdam
| [EMAIL PROTECTED]
| http://www.euronet.nl/users/mbleeker/
|
| Attachments only after prior notice please.
| Don't put me on any kind of mailing list.
|
| I am now receiving the Snowhite virus 4x a day
| - some of you must be infected, please check !
| (No, you did not get it from me, I use Eudora)
| __@
|   _`\,_
|__(*)/ (*)Ah, op DIE fiets !



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




databases disappear...

2001-06-26 Thread Marco Bleeker

For the first time developing a PHP-MySQL system, I am experiencing strange 
things. Perhaps it is the off-line mode (Localhost) I am running Apache in, 
or my Wintel 98SE Pentium3. So I create and populate 3 small tables in a 
database with a standard little PHP script. Then I start working on my 
other PHP scripts and testing them out. Of course there are mistakes, like 
forgotten semicolons or a left bracket where it should be a right one 
(parse errors), and I correct them, untill I get a nice output on my 
screen. But suddenly - Offset 0 is not valid for this result set. This is 
a mysql_data_seek() error, but that is probably a coincidence. The point 
is: MySQL suddenly thinks that the database is empty, as if it was destroyed.

When I look in my MYSQL directory tree, I find my database in the \data 
subdirectory. So it is present (3 files for each table). When I look at the 
date stamps for the files, all maintain their creation date/time, although 
I did make changes to the tables during testing - except one table, with 
just one row in it (my user/password), did change the timestamp, but I did 
not access that one (it does not work under Windows)!

It get weirder. I must physically delete the database from the MySQL data 
directory, before I can create them anew, with the same little script I 
mentioned above. Usually I can access the tabels again then, but quite 
often, I don't see the newly created tables, but the changed version from a 
previous test - although I deleted those from my hard disk.

So I presume there is a cache somewhere, maintained by Windows, Apache, 
MySQL or PHP. Can I flush that cache? How can I stop this weird behaviour? 
I hope I am not really damaging my database, because when I will be working 
with the real thing later on, I can not afford to have to start from 
scratch over and over again. Is there a workaround?

Thanks, Marco (please mail me directly, I am not on the list)
|
| Marco Bleeker, Amsterdam
| [EMAIL PROTECTED]
| http://www.euronet.nl/users/mbleeker/
|
| Attachments only after prior notice please.
| Don't put me on any kind of mailing list.
|
| I am now receiving the Snowhite virus 4x a day
| - some of you must be infected, please check !
| (No, you did not get it from me, I use Eudora)
| __@
|   _`\,_
|__(*)/ (*)Ah, op DIE fiets !



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




databases disappear...

2001-06-26 Thread Marco Bleeker

For the first time developing a PHP-MySQL system, I am experiencing strange 
things. Perhaps it is the off-line mode (Localhost) I am running Apache in, 
or my Wintel 98SE Pentium3. So I create and populate 3 small tables in a 
database with a standard little PHP script. Then I start working on my 
other PHP scripts and testing them out. Of course there are mistakes, like 
forgotten semicolons or a left bracket where it should be a right one 
(parse errors), and I correct them, untill I get a nice output on my 
screen. But suddenly - Offset 0 is not valid for this result set. This is 
a mysql_data_seek() error, but that is probably a coincidence. The point 
is: MySQL suddenly thinks that the database is empty, as if it was destroyed.

When I look in my MYSQL directory tree, I find my database in the \data 
subdirectory. So it is present (3 files for each table). When I look at the 
date stamps for the files, all maintain their creation date/time, although 
I did make changes to the tables during testing - except one table, with 
just one row in it (my user/password), did change the timestamp, but I did 
not access that one (it does not work under Windows)!

It get weirder. I must physically delete the database from the MySQL data 
directory, before I can create them anew, with the same little script I 
mentioned above. Usually I can access the tabels again then, but quite 
often, I don't see the newly created tables, but the changed version from a 
previous test - although I deleted those from my hard disk.

So I presume there is a cache somewhere, maintained by Windows, Apache, 
MySQL or PHP. Can I flush that cache? How can I stop this weird behaviour? 
I hope I am not really damaging my database, because when I will be working 
with the real thing later on, I can not afford to have to start from 
scratch over and over again. Is there a workaround?

Thanks, Marco (please mail me directly, I am not on the list)
|
| Marco Bleeker, Amsterdam
| [EMAIL PROTECTED]
| http://www.euronet.nl/users/mbleeker/
|
| Attachments only after prior notice please.
| Don't put me on any kind of mailing list.
|
| I am now receiving the Snowhite virus 4x a day
| - some of you must be infected, please check !
| (No, you did not get it from me, I use Eudora)
| __@
|   _`\,_
|__(*)/ (*)Ah, op DIE fiets !



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: databases disappear...

2001-06-26 Thread David Robley

On Wed, 27 Jun 2001 12:34, Marco Bleeker wrote:
 For the first time developing a PHP-MySQL system, I am experiencing
 strange things. Perhaps it is the off-line mode (Localhost) I am
 running Apache in, or my Wintel 98SE Pentium3. So I create and populate
 3 small tables in a database with a standard little PHP script. Then I
 start working on my other PHP scripts and testing them out. Of course
 there are mistakes, like forgotten semicolons or a left bracket where
 it should be a right one (parse errors), and I correct them, untill I
 get a nice output on my screen. But suddenly - Offset 0 is not valid
 for this result set. This is a mysql_data_seek() error, but that is
 probably a coincidence. The point is: MySQL suddenly thinks that the
 database is empty, as if it was destroyed.

You are making a wrong assumption here. In fact, the result set returned 
by the query (not the database itself) has a problem - quite likely you 
are trying to cycle through an empty result set. Perhaps you need to trap 
the case where your query returns no results?  Or perhaps you may be able 
to structure your PHP code better.

In any case, the problem is not with Mysql - perhaps if you were to 
enquire on the PHP list with a code sample?


-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   I was arrested for selling illegal sized paper.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php