RE: replication problem

2002-09-24 Thread David Piasecki

Adding a new discovery to this topic:

The replication error only occurs on one of the 2 slave servers. There
is no difference between the two in configuration. Hardware-wise, there
is only one difference: the server which has the problem has 1 gig of
RAM, and the one that does not experience the problem has 2 gigs. This
being the only difference, I can only guess that it is the source of the
problem. The table is very large that I am dealing with - the physical
size is just over 1 gig. My only guess would be perhaps it is trying to
do a CREATE TABLE before the DROP completes. 

David Piasecki


-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 24, 2002 8:34 AM
To: [EMAIL PROTECTED]
Subject: re: replication problem

David,
Monday, September 23, 2002, 6:03:58 PM, you wrote:

DP We are having a problem which seems to have appeared recently with
DP replication on our mysql servers. 

DP - We have 3 servers set up with mysql 3.23.52 (they were running .49
but
DP we upgraded in an attempt to fix this problem, which did not work),
set
DP up as a master and 2 slaves to the master.

DP - There is a large script that runs on the master server. This
script
DP DROPs a large table, then recreates it. It is basically a DROP
followed
DP by a CREATE and many INSERTs.

DP - Up until recently we have had no issues with this problem. Lately
DP however the slave servers are not updating. The error we see in the
logs
DP is the table which it attempts to create already exists, therefore
from
DP that point on the replication stops. We can't understand why
suddenly
DP the DROP TABLE doesn't get replicated.

David, does it happen every time when you drop the table or only
sometimes? Is DROP TABLE statement 
present in binary logs?

I tested on 3.23.52 and DROP TABLE replicated fine for me.


-- 
For technical support contracts, goto
https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





-
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



-
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




replication problem

2002-09-23 Thread David Piasecki

We are having a problem which seems to have appeared recently with
replication on our mysql servers. 

- We have 3 servers set up with mysql 3.23.52 (they were running .49 but
we upgraded in an attempt to fix this problem, which did not work), set
up as a master and 2 slaves to the master.

- There is a large script that runs on the master server. This script
DROPs a large table, then recreates it. It is basically a DROP followed
by a CREATE and many INSERTs.

- Up until recently we have had no issues with this problem. Lately
however the slave servers are not updating. The error we see in the logs
is the table which it attempts to create already exists, therefore from
that point on the replication stops. We can't understand why suddenly
the DROP TABLE doesn't get replicated.

Does anyone have any experience with such a problem? 

Thanks.


David Piasecki



-
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: MySQL InnoDB startup problem

2002-05-22 Thread David Piasecki

I have been using .49 for well over 1 month now. Not sure how it was
corrupted but it happened. I followed the instructions with some
variation and was able to recover everything. In my.cnf I added '
set-variable = innodb_force_recovery=4'. I was then able to start the
database, and did a mysqldump to dump the affected tables/databases into
files. I then stopped the database, and deleted the innodb files. I
removed the line from my.cnf, restarted mysql. It recreated the innodb
files and I dumped the data back in. Perhaps there may have been a
faster way, but this way seemed to go smoothly.

David Piasecki
Software Engineer

-Original Message-
From: Heikki Tuuri [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 21, 2002 11:45 PM
To: [EMAIL PROTECTED]
Subject: Re: MySQL InnoDB startup problem

David,

did you upgrade from a very old version of MySQL to .49? The sorting
order
of latin1 accent characters was changed about 8 months ago, and that may
cause the assertion you have encountered. You should dump and reimport
your
tables if you have accent characters.

Anyway, the B-tree index is now corrupt.

Please use the instructions of section 6.1 in
http://www.innodb.com/ibman.html to force recovery. Then dump + drop +
reimport.

Best regards,

Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on
InnoDB


- Original Message -
From: David Piasecki [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Wednesday, May 22, 2002 8:04 AM
Subject: MySQL InnoDB startup problem


 I'm running MySQL 3.23.49. Everything was going good until today. I
did
 a couple of large table reads/inserts/deletes on the InnoDB tables
which
 appeared to go fine. I then restarted MySQL which also appeared to go
 fine. From that point on, however, I kept losing connection with the
DB,
 and couldn't run any queries. A check of the error log reveals the
 following:

 ---start err log---
 020521 21:54:13  mysqld restarted
 020521 21:54:19  InnoDB: Database was not shut down normally.
 InnoDB: Starting recovery from log files...
 InnoDB: Starting log scan based on checkpoint at
 InnoDB: log sequence number 0 2556753944
 020521 21:54:19  InnoDB: Flushing modified pages from the buffer
pool...
 020521 21:54:19  InnoDB: Started
 /usr/local/mysql/libexec/mysqld: ready for connections
 InnoDB: Assertion failure in thread 508094464 in file btr0btr.c line
574
 InnoDB: We intentionally generate a memory trap.
 InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
 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 agaist 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=268431360
 record_buffer=131072
 sort_buffer=524280
 max_used_connections=0
 max_connections=400
 threads_connected=0
 It is possible that mysqld could use up to
 key_buffer_size + (record_buffer + sort_buffer)*max_connections =
518136
 K
 bytes of memory
 Hope that's ok, if not, decrease some variables in the equation
 ---end err log---

 I tried grabbing the latest source and recompiling the database, but
 still no go. Unfortunately I don't have a backup of the InnoDB tables,
 so there isn't a whole lot that I can do in that respect. The data
 appears to still be in the tables, because I can on occasion do a
select
 and it will return data before the database dies.

 Anyone have any experience with this sort of problem? Thanks.


 David Piasecki
 Software Engineer



 -
 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




-
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



-
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




MySQL InnoDB startup problem

2002-05-21 Thread David Piasecki

I'm running MySQL 3.23.49. Everything was going good until today. I did
a couple of large table reads/inserts/deletes on the InnoDB tables which
appeared to go fine. I then restarted MySQL which also appeared to go
fine. From that point on, however, I kept losing connection with the DB,
and couldn't run any queries. A check of the error log reveals the
following:

---start err log---
020521 21:54:13  mysqld restarted
020521 21:54:19  InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 2556753944
020521 21:54:19  InnoDB: Flushing modified pages from the buffer pool...
020521 21:54:19  InnoDB: Started
/usr/local/mysql/libexec/mysqld: ready for connections
InnoDB: Assertion failure in thread 508094464 in file btr0btr.c line 574
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to [EMAIL PROTECTED]
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 agaist 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=268431360
record_buffer=131072
sort_buffer=524280
max_used_connections=0
max_connections=400
threads_connected=0
It is possible that mysqld could use up to 
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 518136
K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation
---end err log---

I tried grabbing the latest source and recompiling the database, but
still no go. Unfortunately I don't have a backup of the InnoDB tables,
so there isn't a whole lot that I can do in that respect. The data
appears to still be in the tables, because I can on occasion do a select
and it will return data before the database dies. 

Anyone have any experience with this sort of problem? Thanks.


David Piasecki
Software Engineer



-
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




insert...select across multiple databases

2002-03-18 Thread David Piasecki

This one has been troubling me for some time now. For my project the
most ideal and quickest solution to archive data is to do an
insert...select followed by a delete on the original table. The problem
is, I'd like my archive tables to exist in another database (makes it a
lot easier on the programming side of things). That is, I have a
database, let's call it db1 and another, let's call it db2 which
would have the identically structured tables. Now ideally I'd like to do
a sql query something like this...

INSERT INTO db2.table1 SELECT * from db1.table1 WHERE date  (predefined
date);

Is something like this possible, or am I barking up the wrong tree?
Thanks.

David Piasecki


-
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: replication issue

2002-02-12 Thread David Piasecki

I've recently set up replication on one of my databases. Both master and
slave are running MySQL 3.23.46 on FreeBSD 4.1. The only tables that get
updated or inserted into hold approximately 140,000 records, growing at
a rate of around 50-100 every day. The issue is it is currently taking
approximately 20-30 minutes for an update/insert that occurs on the
master to show up on the slave. An insert operation on the master
usually only takes a second or so, so it doesn't make sense that it
should take so long for the slave to update. There is nothing
non-standard about either table - each contains approximately 20
columns, one auto-increment field, and one index.

Hoping someone has some insight into this matter... BTW, both servers
are on the same private network, literally being right next to each
other, so I know it's not a network issue.


David Piasecki



-
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


-
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: Determining day of year

2002-02-01 Thread David Piasecki

RTFM...

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html
#Date_and_time_functions


SELECT DATE_FORMAT(datefield,'%j') FROM table  


David Piasecki
Software Engineer
Netvolution.com, Inc.
http://www.netvolution.com
548 South Spring Street, Suite 814, Los Angeles CA 90013
Phone: 213-593-1090 x107
Fax: 213-593-1091


-Original Message-
From: Greg Peretti [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 01, 2002 12:57 PM
To: [EMAIL PROTECTED]
Subject: Determining day of year

Hi, folks.

I have what I hope is a simple problem. Hope someone can help.

I have a database with a date field in the form 2002-02-01. I would like
to be able to query the database to determine the day of year of an
entry (the $yday variable in the localtime function in Perl). February 1
would be the 32nd day of the year, for instance.

Is this simple and/or possible?



--

Greg Peretti
web developer
www.abqjournal.com
(505) 823-3888

---

The web of our life is of a mingled yarn, good and ill together.
-  William Shakespeare



-
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



-
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: Forcing Table Types

2001-12-28 Thread David Piasecki

Run the following query:

SHOW VARIABLES LIKE 'have_%';

You should see something like this:

+---+---+
| Variable_name | Value |
+---+---+
| have_bdb  | NO|
| have_gemini   | NO|
| have_innodb   | YES   |
| have_isam | YES   |
| have_raid | NO|
| have_openssl  | NO|
+---+---+
6 rows in set (0.00 sec)

It will tell you if BDB and/or InnoDB is active. It might say disabled,
if so you will need to enable in my.cnf 


-Original Message-
From: Ken Kinder [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 28, 2001 12:26 PM
To: Weaver, Walt; [EMAIL PROTECTED]
Subject: Re: Forcing Table Types

I am using the RPM's, but it didn't give an error so I'm assuming it is 
properly configured. The MySQL version is:

[ken@ken ken]$ mysql --version
mysql  Ver 11.15 Distrib 3.23.44, for pc-linux-gnu (i686)

Sorry -- I should have included that.

I'm assuming there's something wrong with my syntax as I can't create
Berkley 
tables either. Frankly I don't care what table type I use, I just want 
transactions -- and if I can get them, foreign keys w/ cascade deletes,
etc...

On Friday 28 December 2001 01:25 pm, Weaver, Walt wrote:
 Ken,

 When you configured/compiled MySQL, did you use the --with-innodb
option?
 What version of MySQL are you running?

 FWIW, I wasn't real impressed with the Berkeley tables, but the InnoDB
 tables work very well.

 --Walt Weaver
   Bozeman, Montana

 -Original Message-
 From: Ken Kinder [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 28, 2001 1:09 PM
 To: [EMAIL PROTECTED]
 Subject: Forcing Table Types


 This is getting really annoying. No matter what type of table I
create, it
 ends up being MyISAM. I _must_ have at least transactions and foreign
key
 support would be nice. Also, does anyone know how I can have
transactions
 on

 create table statements?

 Here the interaction with MySQL that is driving me crazy. It's kind of
 messy,
 but you'll notice my foo table ends up being MyISAM. The same thing
happens
 for Berkley tables.

 mysql create table foo (
 - foo_id int auto_increment not null,
 - whatever text,
 - primary key(foo_id)
 - ) type=InnoDB;
 Query OK, 0 rows affected (0.00 sec)

 mysql show create table foo;

+---+---
---
- --+

 | Table | Create Table


+---+---
---
- --+

 | foo   | CREATE TABLE `foo` (

   `foo_id` int(11) NOT NULL auto_increment,
   `whatever` text,
   PRIMARY KEY  (`foo_id`)
 ) TYPE=MyISAM |

 -
 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

-
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



-
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