MySQL 4.0.15 : Foreign Key - ERROR 1005 (errno: 150)

2004-05-05 Thread Andy Jefferson
Hi, I've got 2 tables in a circular dependency as follows CREATE TABLE USERDETAILS ( USERDETAILS_ID BIGINT NOT NULL, FORENAME VARCHAR(30) BINARY NULL, SURNAME VARCHAR(30) BINARY NULL, USER_USER_ID_OID BIGINT NULL, PRIMARY KEY (USERDETAILS_ID) ) TYPE=INNODB CREATE TABLE `USER`

Question on Modifying MySQL

2004-05-05 Thread Jason Weiss
Hello Sir or Madam, As for my class project, I need to implement a function to calculate miss ratio. But I am having a such problem where to start. I appreciate if you can give me any advice how to do modify the codes and where to start. Thank you. 최대 50MB, 더이상 용량

Newbie question: difference between MySQL shipped w/ Linux distro and downloading from mysql.com

2004-05-05 Thread bsavard
Hi folks. I've got MySQL running on a W2K dev box and want to run it on a production Linux box. Being new to Linux, I'm wondering what's the difference between the version of MySQL that ships with a Linux distro and downloading it from the MySQL website. By way of example: The SuSE website s

Re: Should I trust my data after an InnoDB recovery?

2004-05-05 Thread Daniel Kasak
Jeremy Zawodny wrote: My question is: should I trust my data now? Yes. InnoDB is fully ACID compliant. So anyway, should I bother with a restore? What's the chance of having data corrupted / missing after a power 'failure' and recovery as above? The on

Re: Two way replication lock protocol

2004-05-05 Thread Luis R. Rodriguez
On Wed, May 05, 2004 at 04:22:12PM -0700, Jeremy Zawodny wrote: > On Wed, May 05, 2004 at 03:44:00PM -0400, Luis R. Rodriguez wrote: > > On Wed, May 05, 2004 at 12:01:27PM -0700, Jeremy Zawodny wrote: > > > On Wed, May 05, 2004 at 01:07:58PM -0400, Luis R. Rodriguez wrote: > > > > > > > > Hello, >

Re: [Fwd: Re: Last inserted ID]

2004-05-05 Thread Paul DuBois
At 22:39 -0400 5/5/04, Nathan Jones wrote: > Hi there, I seem to be having a problem retrieving the last inserted ID for a table. The query I am using is as follows: It's far easier than anyone else has mentioned, as of my writing. Just use the PHP function 'mysql_insert_id()' after your inse

[Fwd: Re: Last inserted ID]

2004-05-05 Thread Nathan Jones
> Hi there, > > I seem to be having a problem retrieving the last inserted ID for a > table. > > The query I am using is as follows: > It's far easier than anyone else has mentioned, as of my writing. Just use the PHP function 'mysql_insert_id()' after your insert query. This function has bee

Re: Export query to text file

2004-05-05 Thread Michael Kruckenberg
Add the -t option to ensure you're getting the table output stuck into your file. mysql -t -uuser -N -e"select date_format('2004-02-29','%X')" > sample2.txt Yingyos wrote: Hi Victor Pendleton , I type this command line. mysql -uuser -N -e"select date_format('2004-02-29','%X')" > sample2.txt Wh

Re: Re: Export query to text file ***[SPAM]*** **SPAM HTMLM**

2004-05-05 Thread Yingyos
Hi Victor Pendleton , I type this command line. mysql -uuser -N -e"select date_format('2004-02-29','%X')" > sample2.txt When i open in text editor,it show that '2004' only. But i want format display on text file. mysql> select date_format('2004-02-29','%X'); ++

Re: Last inserted ID

2004-05-05 Thread Paul DuBois
At 20:34 -0500 5/5/04, Paul DuBois wrote: At 21:11 -0400 5/5/04, Erich Beyrent wrote: Hi there, I seem to be having a problem retrieving the last inserted ID for a table. The query I am using is as follows: mysql> select distinct LAST_INSERT_ID() as LastID from listings; This can be simplified as

Re: Last inserted ID

2004-05-05 Thread Paul DuBois
At 21:11 -0400 5/5/04, Erich Beyrent wrote: Hi there, I seem to be having a problem retrieving the last inserted ID for a table. The query I am using is as follows: mysql> select distinct LAST_INSERT_ID() as LastID from listings; This can be simplified as SELECT LAST_INSERT_ID as LastID; no need

Re: Last inserted ID

2004-05-05 Thread Daniel Kasak
Erich Beyrent wrote: Hi there, I seem to be having a problem retrieving the last inserted ID for a table. The query I am using is as follows: mysql> select distinct LAST_INSERT_ID() as LastID from listings; ++ | LastID | ++ | 3575 | ++ 1 row in set (0.00 sec) Ho

Re: Last inserted ID

2004-05-05 Thread Joshua J. Kugler
Well, you don't need the distinct. Are you inserting with your PHP script? LAST_INSERT_ID(), as per the manual, only returns the id from the last insert on that connect. You cannot get the LAST_INSERT_ID() for another connection. j- k- On Wednesday 05 May 2004 05:11 pm, Erich Beyrent

Re: Importing Fixed Length Text Files

2004-05-05 Thread Daniel Kasak
Allen Weeks wrote: Hello All, Maybe I am not searching the documentation correctly or am I correct in finding there is not method of directing importing a fixed length text file into a MySQL table? I hope I just missed the reference. Could someone point me to it. Any assistance is greatl

Last inserted ID

2004-05-05 Thread Erich Beyrent
Hi there, I seem to be having a problem retrieving the last inserted ID for a table. The query I am using is as follows: mysql> select distinct LAST_INSERT_ID() as LastID from listings; ++ | LastID | ++ | 3575 | ++ 1 row in set (0.00 sec) However, when I run this from

Importing Fixed Length Text Files

2004-05-05 Thread Allen Weeks
Hello All, Maybe I am not searching the documentation correctly or am I correct in finding there is not method of directing importing a fixed length text file into a MySQL table? I hope I just missed the reference. Could someone point me to it. Any assistance is greatly appreciated. Allen

Please Help ! this might be simple but not for me :(

2004-05-05 Thread amjoe11-3
Hi All Perl Gurus ! I'm in the middle of this and i'm not able to figure out what is wrong ! I have a html file and i want to do a grep for the accourance of " -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROT

can't load library

2004-05-05 Thread Bob DeBolt
Greets I have installed mysql 4.0.18 on an OpenBSD 3.4 box using the D/L from the mysql.com site. All compiled / installed well and in fact nearly everything works. The problem I have is when attempting to use mysql I get the following error. mysql: can't load library ../libmysql/.libs/libmysq

Re: Should I trust my data after an InnoDB recovery?

2004-05-05 Thread Jeremy Zawodny
On Thu, May 06, 2004 at 09:55:30AM +1000, Daniel Kasak wrote: > Hi all. > > My boss just pulled the power on our MySQL server. > Yes, I've already thanked him. > > It's a 4.0.18 server, with MyISAM tables and InnoDB tables, running on a > 2.6.5 kernel and XFS filesystem. > > The XFS recovery pr

Should I trust my data after an InnoDB recovery?

2004-05-05 Thread Daniel Kasak
Hi all. My boss just pulled the power on our MySQL server. Yes, I've already thanked him. It's a 4.0.18 server, with MyISAM tables and InnoDB tables, running on a 2.6.5 kernel and XFS filesystem. The XFS recovery proceeded without any complaints. The InnoDB recovery also seemed to go smoothl

Re: Data dump using perl with mysql won't update

2004-05-05 Thread smrtalec
> If you want them set to NULL using DBI, you have to bind undef to the > proper parameter. Is that what you're doing, or are you binding > something else, such as 0 or the empty string? > No the initial values in the DB are set to null, with the exception of one field. I'm trying to assign th

Re: into outfile

2004-05-05 Thread Paul DuBois
At 18:25 -0400 5/5/04, [EMAIL PROTECTED] wrote: hi, when i use the into outfile query in mysql to put the records in a text file, and when i open the file that the records are stored in, i dont see each record on one line. each record is seperated by the square symbol. Is there a way in mysql th

Re: Data dump using perl with mysql won't update

2004-05-05 Thread Paul DuBois
At 15:02 -0700 5/5/04, [EMAIL PROTECTED] wrote: before I begin sorry for the cross post but i'm desperate The routine in question is below. It's pretty straight forward its a series of loops which basically matches the row then dumps data stored in hash ref into the DB. for some reason the script

Re: Two way replication lock protocol

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 03:44:00PM -0400, Luis R. Rodriguez wrote: > On Wed, May 05, 2004 at 12:01:27PM -0700, Jeremy Zawodny wrote: > > On Wed, May 05, 2004 at 01:07:58PM -0400, Luis R. Rodriguez wrote: > > > > > > Hello, > > > > > > I am wondering if anyone is currently working on a two way rep

Re: Is there a way to make mysql sgml aware?

2004-05-05 Thread Paul DuBois
At 11:48 -0700 5/5/04, Jeremy Zawodny wrote: On Wed, May 05, 2004 at 02:00:31PM -0300, Leonardo Javier Belén wrote: Hi folks, Is there a way to make mysql sgml aware or any plan to do it in the near time? I think the answer is "no" but I don't really know what that question means. Can you

into outfile

2004-05-05 Thread lga2
hi, when i use the into outfile query in mysql to put the records in a text file, and when i open the file that the records are stored in, i dont see each record on one line. each record is seperated by the square symbol. Is there a way in mysql that i can specify that i need one record per l

Re: Complicated query problem

2004-05-05 Thread beacker
>The query as written works just fine although I'm certain there's got to be >a more efficient way of doing the same thing. I'm relatively new to MySQL >so I took the brute force approach. > >My problem is that I want to produce totals of each of the columns and can't >figure out how to do it. An

Data dump using perl with mysql won't update

2004-05-05 Thread smrtalec
before I begin sorry for the cross post but i'm desperate The routine in question is below. It's pretty straight forward its a series of loops which basically matches the row then dumps data stored in hash ref into the DB. for some reason the script runs with no errors (ran with strict) I can ve

Re: Html and mysql..

2004-05-05 Thread beacker
Josh Trutwin writes: >Javascript is a client-side language, the code is executed by the user's >browser. It has no way to connect to the database server and run queries >so you need to use a server-side programming language like Java (JDBC), >PhP, Perl, etc. Tomcat is a decent servlet engine with

RE: Title Case Problem

2004-05-05 Thread Brian Mansell
As far as I know INITCAP() isn't a valid function in MySQL. I believe it is supported in Oracle (sqlplus). --bmansell -Original Message- From: Michael J. Pawlowsky [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 1:00 PM To: [EMAIL PROTECTED] Subject: RE: Title Case Problem Us

RE: Title Case Problem

2004-05-05 Thread Michael J. Pawlowsky
Use INITCAP. SELECT name, INITCAP(name) new_name FROM customer WHERE firstname IS NULL *** REPLY SEPARATOR *** On 5/5/2004 at 12:43 PM Brian Mansell wrote: >I may be wrong, but there isn't an easy method for completing this in >SQL alone. -- MySQL General Mailing List

Re: AVG function in order by clause

2004-05-05 Thread Paul DuBois
At 19:41 +0200 5/5/04, Julien Martin wrote: Hello, Thanks a lot for the replies. I have changed the query as follows: ** SELECT DB_ESTABLISHMENT_NAME, AVG(DB_GRADE) FROM ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ON ES.DB_ESTABLISHMENT_ID=GR.DB_EST

Re: Two way replication lock protocol

2004-05-05 Thread Luis R. Rodriguez
On Wed, May 05, 2004 at 12:01:27PM -0700, Jeremy Zawodny wrote: > On Wed, May 05, 2004 at 01:07:58PM -0400, Luis R. Rodriguez wrote: > > > > Hello, > > > > I am wondering if anyone is currently working on a two way replication > > lock protocol. If so, what's the status. I understand there's litt

RE: Title Case Problem

2004-05-05 Thread Brian Mansell
I may be wrong, but there isn't an easy method for completing this in SQL alone. If you're using PHP, process the field with ucwords( ) http://www.php.net/ucwords on the other hand, capwords() in Python does something similar, but replaces multiple spaces with individual spaces. --bmansell -

Complicated query problem

2004-05-05 Thread Jack Coxen
I've got the following query that produces a large table for me. SELECT router.name AS Router, SUM(IF(speed<='64000',1,0)) AS 64K, SUM(IF(speed='128000',1,0)) AS 128K, SUM(IF(speed='192000',1,0)) AS 192K, SUM(IF(speed='256000',1,0)) AS 256K, SUM(IF(speed='384000',1,0)) AS 3

Re: MySQL 100% CPU Spikes

2004-05-05 Thread Peter J Milanese
Did I miss something, or is this not concerning a 1 second spike to 100%? I do not see why this is problematic, and I'm a bit curious as to how it is... I mean, the DB does use 100% CPU if it's available. And for a 1 second period, it could very well just be the sample time for the tool monitor

mysql_install_db.sh mini patch

2004-05-05 Thread Hans-Peter Grimm
Hi, I tried to install 4.1 (Bitkeeper tree) on SPARC Solaris 9 today. There is a line in mysql_install_db that is bash-specific and does not run with /bin/sh (at least not on my system): # scripts/mysql_install_db Installing all prepared tables scripts/mysql_install_db: syntax error at line 215

GRANT to DB access

2004-05-05 Thread Ron Gilbert
Is there a way to create a GRANT for a DB so that only one user can access to the database? The only way I can see to do it involves taking every user and GRANT them access to every other database, but not this one. The problem I face is that I share a server with three friends, and we all cr

Re: Two way replication lock protocol

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 01:07:58PM -0400, Luis R. Rodriguez wrote: > > Hello, > > I am wondering if anyone is currently working on a two way replication > lock protocol. If so, what's the status. I understand there's little > gain in having two way replication but -- I am just curious. What exa

Re: Range query on datetime with index - any optimization?

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 10:53:13AM -0400, Pete McNeil wrote: > Hello folks, > > I'm usinng MySQL 4.0.17. > > I have a table something like: > > RuleID int, > GMTBase datetime, > Credited bigint, > ... > > I have an index built on GMTBase. > I have rougly 8 million rows. > > GMTBase stores a da

Re: mysqld too busy to check its grant tables?

2004-05-05 Thread Jeremy Zawodny
On Wednesday, May 5, 2004, at 11:48 US/Pacific, Atle wrote: What versions are you seeing this on? We've seen it exclusively on 3.23.58, with or without LinuxThreads enabled. Various versions of 4.0.xx. We don't run 3.23.xx much of anywhere anymore. Jeremy -- MySQL General Mailing List For list

Re: MySQL 100% CPU Spikes

2004-05-05 Thread Scott Pippin
>Any information on how I can go about doing this, or maybe some >documentation on improving the speed. >The problem is two of the databases I think, both are around 1.1MB each and: Try putting an explain before your select statement: http://dev.mysql.com/doc/mysql/en/EXPLAIN.html this will sho

Re: Title Case

2004-05-05 Thread Dan Nelson
In the last episode (May 05), Andrew Braithwaite said: > I have a table with upper case text. I want to use a function in my > select statement the puts this text in title case so "MORE FOO YOU > WIBBLE" becomes "More Foo You Wibble". MySQL doesn't provides a function to do that. If you know C,

Re: Is there a way to make mysql sgml aware?

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 02:00:31PM -0300, Leonardo Javier Belén wrote: > Hi folks, > Is there a way to make mysql sgml aware or any plan to do it in the near > time? I think the answer is "no" but I don't really know what that question means. Can you elaborate? Jeremy -- Jeremy D. Zawodny

RE: mysqld too busy to check its grant tables?

2004-05-05 Thread Atle
What versions are you seeing this on? We've seen it exclusively on 3.23.58, with or without LinuxThreads enabled. See: http://lists.mysql.com/mysql/164717 Atle - Flying Crocodile Inc, Junior Unix Systems Administrator On Mon, 26 Apr 2004, Donny Simonton wrote: > Jeremy, > We have also seen the

Re: MySQL hotcopy problem (poor man's replication)

2004-05-05 Thread Sasha Pachev
Andrew Loughe wrote: Hello, MySQL version: 3.23.58 Each week I make a hotcopy of numerous database files. I tar them and gzip them, and move them to an archive machine. I then use a second machine to read from the archive, untar and ungzip the files, and presto! I have exact copies of my database

Re: optimization needed

2004-05-05 Thread Sasha Pachev
Brent Baisley wrote: Basically, you can't, it's a limitation of the InnoDB format. If you change the table type to MyISAM, that query would be almost instantaneous. But you are probably using InnoDB for a reason, so you may be stuck if you want a record count. As Brent said, there is no way to o

Re: MySQL 100% CPU Spikes

2004-05-05 Thread Sasha Pachev
Nick A. Sugiero wrote: Jeremy, Any information on how I can go about doing this, or maybe some documentation on improving the speed. The problem is two of the databases I think, both are around 1.1MB each and: Database1: 13736 data records Database2: 77312 data records. Is this excessive ? Nick:

Re: Range query on datetime with index - any optimization?

2004-05-05 Thread Pete McNeil
At 01:30 PM 5/5/2004, Daniel Clark wrote: I wonder if mysql isn't trying to process where GMTBase > DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY) What about doing this date subtracting in PHP and adding the result to the SQL statement. Nice try - but it's not the problem. Replacing the equation with a c

Title Case Problem

2004-05-05 Thread Andrew Braithwaite
Hi All, I have a table with upper case text. I want to use a function in my select statement the puts this text in title case so "MORE FOO YOU WIBBLE" becomes "More Foo You Wibble". Thanks for any help Cheers, Andrew Sql, query -- MySQL General Mailing List For list archives: http://lis

Re: Backup strategy

2004-05-05 Thread Jeremy Zawodny
On Tue, May 04, 2004 at 02:44:26PM -0700, Ron Gilbert wrote: > > I am wondering what the best backup strategy is for my database. > > The database is used to store a very large number of binary files, > ranging from a few K to 20MB's. The database stores thousands of these > files. I can not

Title Case

2004-05-05 Thread Andrew Braithwaite
Hi All, I have a table with upper case text. I want to use a function in my select statement the puts this text in title case so "MORE FOO YOU WIBBLE" becomes "More Foo You Wibble". Thanks for any help Cheers, Andrew Sql, query -- MySQL General Mailing List For list archives: http://lis

Re: AVG function in order by clause

2004-05-05 Thread Carsten R. Dreesbach
Pretty simple, declare an alias in your query and use it in the ORDER BY, i.e.:   SELECT  DB_ESTABLISHMENT_NAME, AVG(DB_GRADE) AS AVGGRADEFROM  ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ONES.DB_ESTABLISHMENT_ID=GR.DB_ESTABLISHMENT_IDGROUP BY  ES.DB_ESTABLISHMENT_IDHAVING  AVG(DB_GRADE) > 2ORDER B

Re: AVG function in order by clause

2004-05-05 Thread Daniel Clark
In Oracle you can reference the second field AVG() by the field #. ORDER BY 2 > Thanks a lot for the replies. I have changed the query as follows: > > ** > SELECT > DB_ESTABLISHMENT_NAME, > AVG(DB_GRADE) > > FROM > ESTABLISHMENTS ES LEFT OUTER JOIN GRADES

Re: AVG function in order by clause

2004-05-05 Thread Josh Trutwin
On Wed, 5 May 2004 19:41:32 +0200 Julien Martin <[EMAIL PROTECTED]> wrote: > Hello, > > Thanks a lot for the replies. I have changed the query as follows: > > ** > SELECT > DB_ESTABLISHMENT_NAME, > AVG(DB_GRADE) > > FROM > ESTABLISHMENTS ES L

AVG function in order by clause

2004-05-05 Thread Julien Martin
Thank you all for your replies. Everything works now!! Julien. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: MySQL Control Center - One quick question...

2004-05-05 Thread Kevin Cowley
The simple answer is "yes". You need to read chapters 4 & 5 in the Mysql manual, You can download it as a PDF from the documentation page of developer resources. I'm assuming you're installing from a binary rpm? You then need to run the install_mysql_db script, start the server using mysqld_safe,

RE: AVG function in order by clause

2004-05-05 Thread Victor Pendleton
What kind of problem are you having? You can use the ordinal postion. ORDER BY 2 [ASC|DESC]. 2 represents the second column. -Original Message- From: Julien Martin To: '[EMAIL PROTECTED]' Sent: 5/5/04 12:41 PM Subject: AVG function in order by clause Hello, Thanks a lot for the replies.

Re: Use of AVG in where clause

2004-05-05 Thread Stephen E. Bacher
Julien Martin <[EMAIL PROTECTED]> wrote: >I have a sql query as follows: > >** >SELECT > DB_ESTABLISHMENT_NAME, > AVG(DB_GRADE) > >FROM > ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ON >ES.DB_ESTABLISHMENT_ID=GR.DB_ESTABLISHMENT_ID > >WHERE > AV

Re: Use of AVG in where clause

2004-05-05 Thread Daniel Clark
I believe you have to add your AVG() to your GROUP BY clause. > I have a sql query as follows: > > ** > SELECT > DB_ESTABLISHMENT_NAME, > AVG(DB_GRADE) > > FROM > ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ON > ES.DB_ESTABLISHMENT_ID=GR.DB_ESTABLISHMENT_I

AVG function in order by clause

2004-05-05 Thread Julien Martin
Hello, Thanks a lot for the replies. I have changed the query as follows: ** SELECT DB_ESTABLISHMENT_NAME, AVG(DB_GRADE) FROM ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ON ES.DB_ESTABLISHMENT_ID=GR.DB_ESTABLISHMENT_ID GROUP BY ES.D

RE: Use of AVG in where clause

2004-05-05 Thread Victor Pendleton
Your where clause is confusion. Are you wanting to retrieve rows where the DB_Grade is greater than 2? AVG(DB_GRADE) is not a valid restriction. Are you wanting HAVING AVG(DB_GRADE) > 2 ? -Original Message- From: Julien Martin To: '[EMAIL PROTECTED]' Sent: 5/5/04 12:12 PM Subject: Use of A

Two way replication lock protocol

2004-05-05 Thread Luis R. Rodriguez
Hello, I am wondering if anyone is currently working on a two way replication lock protocol. If so, what's the status. I understand there's little gain in having two way replication but -- I am just curious. If no one is working on it, I may poke at it. Luis -- GnuPG Key fingerprint

Re: Use of AVG in where clause

2004-05-05 Thread Josh Trutwin
On Wed, 5 May 2004 19:12:00 +0200 Julien Martin <[EMAIL PROTECTED]> wrote: > Hello, > > I have a sql query as follows: > > ** > SELECT > DB_ESTABLISHMENT_NAME, > AVG(DB_GRADE) > > FROM > ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ON > ES.DB_

Re: Use of AVG in where clause

2004-05-05 Thread Paul DuBois
At 19:12 +0200 5/5/04, Julien Martin wrote: Hello, I have a sql query as follows: ** SELECT DB_ESTABLISHMENT_NAME, AVG(DB_GRADE) FROM ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ON ES.DB_ESTABLISHMENT_ID=GR.DB_ESTABLISHMENT_ID WHERE AVG(DB_G

Re: Range query on datetime with index - any optimization?

2004-05-05 Thread Daniel Clark
I wonder if mysql isn't trying to process where GMTBase > DATE_SUB(CURRENT_DATE, INTERVAL 2 DAY) What about doing this date subtracting in PHP and adding the result to the SQL statement. > Hello folks, > > I'm usinng MySQL 4.0.17. > > I have a table something like: > > RuleID int, > GMTBase da

Re: Backup strategy

2004-05-05 Thread beacker
>You may wish to also look into replication, which is a cinch to setup >with MySQL. Unfortunately replication does not handle point in time recovery. This is usually required to happen when someone accidentally drops a table or deletes too many rows from the database inadvertently. Under replica

Re: MySQL 100% CPU Spikes

2004-05-05 Thread Peter J Milanese
You may be able to limit resource usage for mysql. I am not sure how to do it in windows though. 100% for a second while it executes the query is not abnormal in my opinion. "Nick A. Sugiero" <[EMAIL PROTECTED]> 05/05/2004 01:12 PM To: <[EMAIL PROTECTED]> cc:

RE: Html and mysql..

2004-05-05 Thread Victor Pendleton
Depending on who your intended audience is and what you are attempting to achieve two possibilities are using LiveWire, http://developer.netscape.com/viewsource/kuslich_javascript.html, or you could use Applets that talk to servlets, http://www.onjava.com/pub/a/onjava/2002/02/20/applets.html.

Use of AVG in where clause

2004-05-05 Thread Julien Martin
Hello, I have a sql query as follows: ** SELECT DB_ESTABLISHMENT_NAME, AVG(DB_GRADE) FROM ESTABLISHMENTS ES LEFT OUTER JOIN GRADES GR ON ES.DB_ESTABLISHMENT_ID=GR.DB_ESTABLISHMENT_ID WHERE AVG(DB_GRADE) > 2 GROUP BY ES.DB_

Re: MySQL 100% CPU Spikes

2004-05-05 Thread Nick A. Sugiero
Jeremy, Any information on how I can go about doing this, or maybe some documentation on improving the speed. The problem is two of the databases I think, both are around 1.1MB each and: Database1: 13736 data records Database2: 77312 data records. Is this excessive ? When my .asp pages request

Re: MySQL 100% CPU Spikes

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 03:25:14PM +0100, Nick A. Sugiero wrote: > Hi, > > I recently installed MySQL on a Windows 2003 Server last night to pull some > stats from a online game I run, however everytime a query is sent to the > database it uses 100% cpu causing a 100% cpu spike for a breif second

Re: optimization needed

2004-05-05 Thread Brent Baisley
Basically, you can't, it's a limitation of the InnoDB format. If you change the table type to MyISAM, that query would be almost instantaneous. But you are probably using InnoDB for a reason, so you may be stuck if you want a record count. On May 5, 2004, at 10:01 AM, Vladimir Romanovski wrote:

Re: Replication Issue

2004-05-05 Thread Jeremy Zawodny
On Wed, May 05, 2004 at 06:44:09PM +0200, Mechain Marc wrote: > Hello, > > Why such a SQL request running well on the master is not correctly replicated on the > slave, > > set @providerId='012345'; > insert into DATA_TYPE values (1,@providerId,'DATA_TYPE',1); > > Here is an extract of the Sla

Is there a way to make mysql sgml aware?

2004-05-05 Thread Leonardo Javier Belén
Hi folks, Is there a way to make mysql sgml aware or any plan to do it in the near time? Leonardo J. Belen mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql query sql mysql quer

Replication Issue

2004-05-05 Thread Mechain Marc
Hello, Why such a SQL request running well on the master is not correctly replicated on the slave, set @providerId='012345'; insert into DATA_TYPE values (1,@providerId,'DATA_TYPE',1); Here is an extract of the Slave Logfile: MYBCK.log.1:ERROR: 1048 Column 'PROVIDER_ID' cannot be null MYBCK.

Re: Html and mysql..

2004-05-05 Thread Josh Trutwin
On Wed, 5 May 2004 09:18:01 -0700 (PDT) My Sql <[EMAIL PROTECTED]> wrote: > Hi all, > I have got one serious doubt. > Can we access mysql database from the front end html. If it all it > is possible, we have to right in javascript. ofcourse we can write > it using JDBC(provided we have a servlet

Re: Html and mysql..

2004-05-05 Thread Peter J Milanese
Javascript is a client side language. I seriously doubt it alone would do anything for you. My Sql <[EMAIL PROTECTED]> 05/05/2004 12:18 PM To: [EMAIL PROTECTED] cc: Subject:Html and mysql.. Hi all, I have got one serious doubt. Can we access mysql dat

DISTINCT DATETIME question

2004-05-05 Thread Ron Gilbert
I am trying to get a distinct dates (not time) from a column. I am currently doing this: SELECT DISTINCT DATE_FORMAT(DateAdded, '%Y-%m-%d') FROM Bla Is this the best way to be doing this? Seems very inefficient do to the call to DATE_FORMAT for every row. Is there a way to have a query only

Html and mysql..

2004-05-05 Thread My Sql
Hi all, I have got one serious doubt. Can we access mysql database from the front end html. If it all it is possible, we have to right in javascript. ofcourse we can write it using JDBC(provided we have a servlet engine integrated with a webserver). My question is can we access mysql database f

Re: if exists

2004-05-05 Thread Michael Stassen
I think this is half the answer (though you've implied the other half). First, you prevent mysql from accepting duplicate rows by defining a PRIMARY KEY or UNIQUE INDEX on whatever column or columns determine uniqueness. See for the details.

Re: if exists

2004-05-05 Thread Paul DuBois
At 12:12 +0200 5/5/04, Gerhard Gaupp wrote: Hello I'm looking for something like if not exists( select 1 from PERSON where NAME = 'Test' ) then insert into PERSON ( NAME ) values ( 'Test'); end if; I did it with Sybase Database. I need to get Data from Excel and have to be shure that there is

Re: DBD::MySQL on RH8

2004-05-05 Thread Leon Sonntag
At 08:04 AM 5/5/04, Rudy Lippan wrote: On Mon, 3 May 2004, Leon Sonntag wrote: > I am having problems with installing the DBD::MySQL Perl module. My system > is: RedHat 8 (patched current) Perl 5.8.4 (installed from RPM but upgraded > manually) Apache 2.0.40 Modperl 1.99 > > I am heading toward b

RE: if exists

2004-05-05 Thread emierzwa
Silently ignore duplicate index inserts... insert IGNORE into PERSON ( NAME ) values ( 'Test') Ed -Original Message- From: Gerhard Gaupp [mailto:[EMAIL PROTECTED] Hello I'm looking for something like if not exists( select 1 from PERSON where NAME = 'Test' ) then insert into PERSON (

if exists

2004-05-05 Thread Gerhard Gaupp
Hello I'm looking for something like if not exists( select 1 from PERSON where NAME = 'Test' ) then insert into PERSON ( NAME ) values ( 'Test'); end if; I did it with Sybase Database. I need to get Data from Excel and have to be shure that there is no data more than once in the table. So I

Range query on datetime with index - any optimization?

2004-05-05 Thread Pete McNeil
Hello folks, I'm usinng MySQL 4.0.17. I have a table something like: RuleID int, GMTBase datetime, Credited bigint, ... I have an index built on GMTBase. I have rougly 8 million rows. GMTBase stores a datetime for the top of the hour on a given date. I want to build a summary of the last 2 days

MySQL Control Center - One quick question...

2004-05-05 Thread Scott Fletcher
One quick question here. I just installed the MySQL Control Center and get the "host not allowed" connection error. So, do the database have to exist on MySQL Server and set-up permission for that database in order for MySQL Control Center's connection to work?? I'm new here as I switched fro

RE: comparison of timestamps

2004-05-05 Thread emierzwa
My guess is because 200400 is an illegal time. If you try a legal time, January 1, midnight (2004010100) it should work. You can also convert the time to integer and then compare values. select last from users where last > 2004010100 select last from users where cast(last as SIGNE

MySQL 100% CPU Spikes

2004-05-05 Thread Nick A. Sugiero
Hi, I recently installed MySQL on a Windows 2003 Server last night to pull some stats from a online game I run, however everytime a query is sent to the database it uses 100% cpu causing a 100% cpu spike for a breif second - I'm using .asp pages if that helps. Is there anyway to avoid this at all

optimization needed

2004-05-05 Thread Vladimir Romanovski
Hi All! We use MySQL 3.23.54 on dual-processor DELL running ReadHat 8.0 . Performance of operations with one of the tables is very low . For example : mysql> select count(*) from protocol; +--+ | count(*) | +--+ | 2266 | +--+ 1 row in set (28.93 sec) The table is creat

Re: DBD::MySQL on RH8

2004-05-05 Thread Rudy Lippan
On Mon, 3 May 2004, Leon Sonntag wrote: > I am having problems with installing the DBD::MySQL Perl module. My system > is: RedHat 8 (patched current) Perl 5.8.4 (installed from RPM but upgraded > manually) Apache 2.0.40 Modperl 1.99 > > I am heading toward being able to install Best Practicals "

Re: 'drop database' failing silently? - solved.

2004-05-05 Thread Kevin O' Riordan
> > this morning, I had a problem dropping a database from within mysql. [snip] > > The solution I used was to stop mysqld and then rm the database from the > > filesystem. > Are there any non-mysql files in the directory of the database 'mis'? After a while, I realised you weren't asking a ques

Re: Backup strategy

2004-05-05 Thread Josh Trutwin
On Tue, 04 May 2004 14:44:26 -0700 Ron Gilbert <[EMAIL PROTECTED]> wrote: > Is there a better way to be doing this given the huge amount of > binary data I have? You may wish to also look into replication, which is a cinch to setup with MySQL. Josh -- MySQL General Mailing List For list archiv

Re: 'drop database' failing silently?

2004-05-05 Thread Kevin O' Riordan
> > this morning, I had a problem dropping a database from within mysql. > Are there any non-mysql files in the directory of the database 'mis'? Should've added this. There was only one file in the 'mis' directory: -rw-rw-rw-1 mysqlmysql 44 Apr 30 09:51 file.out Which con

RE: Export query to text file

2004-05-05 Thread Victor Pendleton
mysql -uuser -N -e"select date_format('2004-02-29','%X')" > sample2.txt -Original Message- From: Yingyos To: Victor Pendleton Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 5/4/04 11:04 PM Subject: Re: Export query to text file Victor Pendleton wrote: >The `INTO OUTFILE` clause is expec

Re: 'drop database' failing silently?

2004-05-05 Thread Victoria Reznichenko
Kevin O' Riordan <[EMAIL PROTECTED]> wrote: > this morning, I had a problem dropping a database from within mysql. > >mysql> drop database mis; >Query OK, 0 rows affected (0.00 sec) > >mysql> show databases; >+--+ >| Database | >+--+ >| mis | >

Re: InnoDB - Foreign Key - Error 150.

2004-05-05 Thread Victoria Reznichenko
"Tucker, Gabriel" <[EMAIL PROTECTED]> wrote: > Victoria=20 > > That seemed to work well, thank you. > > However, I received another error that I am not sure how to troubleshoot = > during the restore: >ERROR 1114 at line 83 in file: = > '/bb/bin/mysql/backups/archive_4320.sql': The table

'drop database' failing silently?

2004-05-05 Thread Kevin O' Riordan
Hi all, this morning, I had a problem dropping a database from within mysql. mysql> drop database mis; Query OK, 0 rows affected (0.00 sec) mysql> show databases; +--+ | Database | +--+ | mis | | mysql| +--+ 2 rows in

Re: INSERT into HEAP table

2004-05-05 Thread Egor Egorov
"Vladimir Romanovski" <[EMAIL PROTECTED]> wrote: > Hi All! > > We use MySQL 3.23.54 on ReadHat 8.0. > What error code is returned for inserting into heat table over > memory(row) limit? > > You will get something like: ERROR 1114 : The table 'tbl_name' is full -- For technical sup

INSERT into HEAP table

2004-05-05 Thread Vladimir Romanovski
Hi All! We use MySQL 3.23.54 on ReadHat 8.0. What error code is returned for inserting into heat table over memory(row) limit? Many thanks! Vladimir -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

  1   2   >