Re: mysqlhotcopy problem

2003-07-31 Thread Martin Waite
On Wed, 2003-07-30 at 17:40, Vladimir Shiray wrote: How can I make hotcopy of my database if it have many tables (more than 1000) ??? mysqlhotcopy failed when it try to lock all tables ... How many tables can I lock at one time ? Can I increase this limit ? Hi, You probably ran out of

RE: Replication stops for no reason...

2003-07-08 Thread Martin Waite
Hi Jeff, We had similar problems caused by replication crossing a firewall with a 5 minute timeout on its access control list. If the replication stream went idle for 5 minutes, the firewall would drop the connection and MySQL wouldn't notice. Our workaround was to run a daemon on the master to

Re: I don'get binlogs to log properly

2003-06-23 Thread Martin Waite
On Thu, 2003-06-19 at 14:13, [EMAIL PROTECTED] wrote: binlog-do-db= test mysql Hi, There should only be one database per line: binlog-do-db= test binlog-do-db= mysql regards, Martin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql

replication error-code 1053 - what is it ?

2003-06-17 Thread Martin Waite
Hi, I have a busy MySQL slave which is directly updated by a periodic purge script which throws away irrelevant data. Occassionally, (er, a few times a day, actually), the slave quietly falls over, but ITS slaves trip with [SQL...] partially completed on the master and was aborted. There is

Re: mysqlhotcopy generates a segmentation fault

2003-06-11 Thread Martin Waite
On Wed, 2003-06-11 at 01:55, Danny Cron wrote: I have three boxes. Mysqlhotcopy works on box1, but it generates a segmentation fault on box2 and box3. I want it to work on all boxes. I am prepared to upgrade them all to the level of box3 (but mysqlhotcopy doesn't work with that

Re: Join with no matches on other table

2003-06-11 Thread Martin Waite
On Wed, 2003-06-11 at 13:48, Ville Mattila wrote: Hello, I have two tables, other having information of cottages and other including information when each cottage is booked. The table structures are following: Cottages: - code - name - equipment Reservations: - cottagecode -

Re: Printing table descriptions

2003-06-11 Thread Martin Waite
On Wed, 2003-06-11 at 14:29, Fernando Gerent wrote: Hi! I need to print the description of all tables in my database. The problem is, there are about 200 of them, and the only way I know to do this is send each of the screens to a file, an then print the file. Isn't there any easier way,

RE: problem with DBI connection interaction with sub-process

2003-06-10 Thread Martin Waite
Hi, I reworked my code so that my parent process opened the DBI connection after the child was forked, and everything works fine. So it looks like Robin is right. The one thing I don't understand just now is how the parent automatically re-connected to MySQL after the child clobbered the

Re: Help! How to generate a list of consecutive numbers with a SELECT?

2003-06-10 Thread Martin Waite
Here's a quick hack, but you need to have another table guaranteed to contain 1000 or more rows: create temp table n( i int auto_increment not null, primary key(i)); insert into n select null from BIG_TABLE limit 1000; regards, Martin On Mon, 2003-06-09 at 15:00, Martin Szabo wrote: I've

Re: is it possible to get around 4 billion row limit

2003-06-10 Thread Martin Waite
Message - From: Martin Waite [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Monday, 09 June, 2003 04:45 Subject: is it possible to get around 4 billion row limit Hi, I want to create a table with a lot (8 billion) small fixed-length records. I thought setting

What is the maximum number of rows per table ?

2003-06-10 Thread Martin Waite
Hi, I can't find any mention of this in the MySQL manual. It discusses the maximum file size, but what I want to know is if there is some limitation (perhaps in the index file format) on the number of rows a MyISAM or INNODB table can hold ? regards, Martin -- MySQL General Mailing List For

is it possible to get around 4 billion row limit

2003-06-09 Thread Martin Waite
Hi, I want to create a table with a lot (8 billion) small fixed-length records. I thought setting MAX_ROWS in the create table would do this for me, but it looks like it quietly ignores values over 4.2 billion. Is this a hard-limit in MySQL ? Does MySQL 4.0.x have the same limitation ?

problem with DBI connection interaction with sub-process

2003-06-09 Thread Martin Waite
Hi, Maybe this is a DBI question rather than MySQL, but here goes... I have a perl script which forks in order to work around a memory leak in XML::Parser. The child parses the data and the parent reads the results back from the child to populate some temporary tables in the database. What

RE: problem with DBI connection interaction with sub-process

2003-06-09 Thread Martin Waite
and closing connection. However, any resources you create after the fork will be your own. Hope it helps (bit of a guess really), Robin Keech Java Developer Synectics Ltd -Original Message- From: Martin Waite [mailto:[EMAIL PROTECTED] Sent: 09 June 2003 12:10 To: MySQL List Subject

Re: another replication question..

2003-06-05 Thread Martin Waite
Hi Ross, On Wed, 2003-06-04 at 16:44, Ross Simpson wrote: I have another question that doesn't seem to be addressed in the mysql manual. Does any sort of locking occur while a slave is updating it's local databases? Can I still read any/all tables while this process is occurring?

RE: table copying/replication

2003-06-05 Thread Martin Waite
Hi Ross, On Wed, 2003-06-04 at 16:35, Ross Simpson wrote: This sounds like the best idea yet :) I have a couple of questions: - I need to keep the data in x_shadow while still creating table x.. will copying accomplish the same thing? I'm guessing it will be slower, but keeping the

RE: table copying/replication

2003-06-04 Thread Martin Waite
On Tue, 2003-06-03 at 22:44, Ross Simpson wrote: Thanks for the reply. I didn't explain properly :) A diagram should help: || |-| 1 || 2 | || |stage| -- |prod| -- |-| || |-| || |-|replicas|

Re: [repost] Finding table name when using Union

2003-03-11 Thread Martin Waite
On Tue, 2003-03-11 at 07:33, Richard Taubo wrote: When using the Union statement in MySQL, is it possible to retrieve the corresponding table name for a given row? The reason I need to know this is that I present info from different tables in their own way. I know I can create a column in

Re: too many open files, error 24, but max-files is large

2003-03-06 Thread Martin Waite
On Wed, 2003-03-05 at 15:16, Johannes Ullrich wrote: on mysql 4.0.10-gamma (rpm install, Redhat advanced server), I am running into 'too many open files' issues ( error 24 ). I am using a rather large merge table (30 distinct tables merged), which is likely the culprit. The error

re: trouble setting key_buffer_size on a debian slave

2003-02-28 Thread Martin Waite
Hi, I'm using the same MySQL version on debian and have no problem setting the key_buffer size. I take it you are setting key_buffer and not key_buffer_size in the my.cnf file ? eg. set-variable= key_buffer=32M I don't know why it has a different name in the 'show variables' list. Are

setting maximum threads for MySQL under Linux

2003-02-04 Thread Martin Waite
Hi, Is there any better way of setting the thread/process limit on Linux than by hacking the safe_mysqld script ? Have I missed a configuration variable somewhere that will tell MySQL to attempt to raise the process limit ? I would have thought MySQL would figure it out based on the

file-descriptor limits for linux

2003-01-28 Thread Martin Waite
Hi, Does anyone know what the story is for file-descriptor limits on Linux ? I read in http://www.xenoclast.org/doc/benchmark/HTTP-benchmarking-HOWTO/node7.html that root needs to set /proc/sys/fs/file-max to a high value in order that ulimit -n will work. However, on a Debian Woody

Re: Joins are slow

2003-01-22 Thread Martin Waite
On Wed, 2003-01-22 at 03:18, Steve Quezadas wrote: ([Defendant] Query WITH a join - 8.79 seconds! EXPLAIN SELECT Defendants.CaseNumber FROM Defendants, Cases WHERE Cases.CaseNumber = Defendants.CaseNumber AND Filed = 1999-01-01 AND (Defendant LIKE owen% OR Defendant LIKE pitts% OR

Re: replication - queries out of order or dropped?

2003-01-15 Thread Martin Waite
- sql,query On Tue, 2003-01-14 at 23:55, Jeremy Zawodny wrote: What do the relevant sections of the my.cnf files on the master and slave look like? -- Hi, I've had the same issue - but always assumed that replication was meant to ignore create database I've looked into it further,

Re: Year Lists

2002-12-31 Thread Martin Waite
On Tue, 2002-12-31 at 14:53, Steve Vernon wrote: Hiya, I have a database about projects in a company, they all have a start year and end year. If the projects have not ended then they get a end year of . I have made a SQL command, given a year, works out with projects are running in

Re: take one database offline

2002-12-05 Thread Martin Waite
On Wed, 2002-12-04 at 22:32, Richardson, David E (MVC Corporation) wrote: On a single Linux box w/mysql 3.23.52 I have mysqld running and there are about 20 databases live in the environment. I want to take one of the databases offline but leave mysqld running with the other db's - without

Re: Recovery with binary logs.

2002-11-28 Thread Martin Waite
Hi Manuel, On Tue, 2002-11-26 at 21:38, Manuel Villasante wrote: Hi, I have a few questions regarding recovery of a database using binary logs. 1) If you have a set of binary logs in your directory mylog-bin.001 to mylog-bin.nmp, is there an easy way to find out which logs you need to

Re: listing a count of unique ips by day

2002-11-19 Thread Martin Waite
On Mon, 2002-11-18 at 17:01, OYNot wrote: [snip] //The following was supposed to create a count, by day, of the unique ip addresses. You can use the date_format() to convert timestamps and dates into whatever format you want. I think you only need a single query like: select ip,

Re: Are there ANY terminal-based frontends for Linux?

2002-10-14 Thread Martin Waite
On Mon, 2002-10-14 at 03:55, Chip Rose wrote: Are there ANY MySQL terminal-based frontends (for Linux) that will allow inputting data via forms, queries,reports? There are a lot of administration tools - that's not what I want. How do I set something up for inputting and simple queries that

Re: Performance when using two BETWEEN statements in the WHEREclause multiple times

2002-10-14 Thread Martin Waite
On Fri, 2002-10-11 at 16:08, Chris Stoughton wrote: I sent a similar question a few days ago. I don't think there was a response. If there was, sorry that I missed it. I have worked around the issue, but would like to know whether there is something I can do to improve the orignal

RE: HA of MySQL

2002-10-08 Thread Martin Waite
On Mon, 2002-10-07 at 22:02, Jeremy Tinley wrote: The problem isn't so much with the failover. It's with data integrity. Binlogs control replication. You can place a failover master in between the master and slaves. In the event of a master failure, you eliminate the loss of writes by

Error 1053 stalling replication

2002-09-11 Thread Martin Waite
Mysql, sql, etc. Hi, I am using a slave to perform backups using mysqlhotcopy. This locks all tables in my database for 10 minutes. Sometimes the replication is aborted during the period that the tables are locked. The error message in the slave's log is: ERROR: 1053 Server shutdown in

Re: Query problem in Perl

2002-09-02 Thread Martin Waite
Hi, You need to use two separate database and statement handles - you can only have one active query per handle. eg. $dbh1 = DBI-connect(...); $dbh2 = DBI-connect(...); $sth1 = $dbh1-prepare( ... ); $sth1-execute(...); while ( $sth1-fetch() ) { $sth2 = $dbh2-prepare( ... );

Re: Query problem in Perl

2002-09-02 Thread Martin Waite
On Mon, 2002-09-02 at 11:37, Harald Fuchs wrote: In article 1030961610.8175.5.camel@pascal, Martin Waite [EMAIL PROTECTED] writes: Hi, You need to use two separate database and statement handles - you can only have one active query per handle. eg. $dbh1 = DBI-connect

strange behaviour of aggregate functions in if() clauses

2002-08-13 Thread Martin Waite
MySQL v3.23.49 linux Hi, We came across something strange here. select count(*), user from mysql.user; is illegal (ERROR 1140: Mixing of GROUP columns ... if there is no GROUP BY clause). But, select if( count(*) and user, 1, 0 ) from mysql.user; actually works. Is this a bug or

Large File support on linux 2.2

2002-08-01 Thread Martin Waite
Mysql, SQL, etc. Hi, Does anyone have experience of compiling in large file support for Linux ? I just want to know what is the scope of the change: do I have to recompile the kernel and every single library and application ? thanks, Martin

Re: Problem with subqueries

2002-07-31 Thread Martin Waite
On Wed, 2002-07-31 at 12:03, Luis Rodrigues wrote: hi, I have some sql code that I need to use with mysql it uses nested queries and since mysql doesn't implement them I would like to know how to do this. SELECT * FROM apartamentos WHERE vendido=0 AND Concelho=$row[ConcelhoP] AND

replication privleges issue

2002-07-18 Thread Martin Waite
Hi, SQL, MySQL. I want my master to contain only recent data, but my slave to hold a long-term archive. My plan to do this is to use a merge table on the master to provide an alias for the underlying real table. I then perform updates and inserts on the real table, and deletes on the merge

Re: mysqlhotcopy

2002-03-26 Thread Martin Waite
On Tue, 2002-03-26 at 07:24, Hans Kind wrote: Dear Martin, I tried that option, but it returns a errono 24: ../bin/mysqlhotcopy -u username -p password --flushlog --allowold --regexp='.*' /d1/terminal-a/mysql/ 'mail' is an empty database 'opt' is an empty database 'oveas' is an empty

Re: mysqlhotcopy

2002-03-25 Thread Martin Waite
On Sat, 2002-03-23 at 15:19, Hans Kind wrote: Hi, What is the correct syntax to use to backup all databases in the /usr/local/mysql/var directory. We tried a number of different options, but at best we get only 1 database, backup completely. Using a wildcard, *, only creates the

Re: mysqlhotcopy in 4.0.1

2002-02-13 Thread Martin Waite
On Mon, 2002-02-11 at 02:04, Jeremy Zawodny wrote: On Mon, Feb 11, 2002 at 03:04:47PM +1300, Ian Collins wrote: In mysqlhotcopy, function copy_files, there is a line, my @non_raid = grep { $_ !~ m:\d\d/: } @$files; (dont you just love perl?). If the database name in question is,

Re: Multiples instances of MySQL

2001-12-31 Thread Martin Waite
On Mon, 2001-12-31 at 10:08, Emmanuel van der Meulen wrote: Hello all, I'm in a spot, I'm managing to successfully run several instances of MySQL, say on port=3306 and port=3308. When I use shutdown, the instance which started first shuts down. To shutdown the instance started on port

Re: Multiples instances of MySQL

2001-12-31 Thread Martin Waite
On Mon, 2001-12-31 at 10:50, Emmanuel van der Meulen wrote: As suggested, I used -S instead of -P, but still the first instance shuts down. I'm running on Win2K Pro. Is there a different way for Windows? Please advise any further pointers? Ok. Try to explicitly set the host on the

RE: Multiples instances of MySQL

2001-12-31 Thread Martin Waite
On Mon, 2001-12-31 at 14:01, Emmanuel van der Meulen wrote: Hello Martin, [snip] Ok. Try to explicitly set the host on the command line: eg: mysqladmin -h 127.0.0.1 -P 2000 . Note that you should use the ip address of your host or its network name. Using 'localhost' won't

feature request: privileged connection quotas

2001-12-12 Thread Martin Waite
Hi, I'd like to be able to reserve some connections to the MySQL server for emergencies - eg. someone issued a slow query and locked out several hundred updates from several hundred other connections. Currently in this sort of situation, it is possible to completely run out of connections and

hanging slaves and slave_read_timeout

2001-11-22 Thread Martin Waite
Hi, We're replicating databases across a firewall with a 300 second reflective ACL timeout set. This causes occasional problems with replication, where if the master is idle for more than 300 seconds, the connections are closed by the firewall in such a way that the slaves never notice.