SET FOREIGN_KEY_CHECKS = 0 Suggestion.

2003-02-21 Thread wertyu
Hello, everyone.

I'm using MySQL replication(Version 4.0.10)

Master and slave have FOREIGN KEY constration.
and I  back up data with mysqldump.
but mysqldump does not produce table and record invalid order for FK.

So,when I restore data,  I execute SET FOREIGN_KEY_CHECKS = 0; on master.

But, this command does not forwarded to Slave.
so, slave fails to insert record.

So my suggestion is SET FOREIGN_KEY_CHECKS = 0; forwarded to slave.

What do you think of this?

Have a nice weekend!

##
Heo, Jungsu Mr.
SimpleX Internet. http://www.simplexi.com

Filter : sql



-
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 mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: varchar and java string in sql query ?

2003-02-21 Thread Max Morawski
Jianping Zhu wrote:



I and using mysql-jdbc to do some program.

I can insert record to my db by following code:

-
stmt.executeUpdate(insert into apidbusers values('id',
'jp','zhu','em1','jian180'));
---
but
if i use 
--
String str=id;
stmt.executeUpdate(insert into apidbusers values(str, 'jp',
'zhu','em1','jtan180'));
 

In Java you would write it like this:

stmt.executeUpdate(insert into apidbusers values('+ str +', 'jp', 'zhu','em1','jtan180'));


Max

mysql, query



-
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




PHP / MYSQL Question

2003-02-21 Thread Mike Walth
Not sure if this can be done with just a MYSQL Query or if it needs to be
done in conjunction with a PHP script.  What I am trying to do is build a
dynamic FAQ section with PHP.  Here are the two tables

Topics
===
TopicID
TopicTitle
TopicDESC

FAQS
===
FAQID
Question
Answer
Topic

I'm trying to get it to display like this

Topic1
   Question1
   Question2
   Question3
   Question4

Topic2
   Question1
   Question2

So each topic would be listed with its set of questions below it.

Any help would be appreciated.

Mike Walth
CinoFusion



-
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]: Running scripts under Windows 98

2003-02-21 Thread Stefan Hinz
Julius,

 When running script under Windows NT as mysql -h host -u user
 --password=password scriptfile.sql I have no problems.  It connects
 to
 MySQL and send the script I have stored in scriptfile.sql.  However
 if I
 try the same thing under Windows98 it does not work.  It connects to
 the
 server then gives a MySQL prompt instead of sending the script file.

 Try putting a space between the  and the filename? I'm grasping at
 straws here...

This should work exactly as Julius said (without space before ).
Anyway, I would like to see all of this (DOS command line + mysql
login prompt).

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


-
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: MySQLGUI connection

2003-02-21 Thread Stefan Hinz
Steve,

 Can't connect to local MySQL server through socket '' (111)

 When I type 'mysql -u
 ddj -p' on a commandline, I can connect fine.

With mysql (the command line tool), you connect on the local host
(i.e. server and client are running on the same machine). With
MySQLGUI, you seem to do the same; is that right?

If so, obviously MySQLGUI tries to use a different socket than mysql.

By default, the server will establish a socket as /tmp/mysql.sock.
This can be changed by starting the server with --socket=(path),
either as a command line option, or in the [mysqld] section of my.cnf
(usually /etc/my.cnf).

Likewise, you can tell clients which sockets to use. For mysql, this
would either be mysql --socket=(path) or in the [client] section of
my.cnf. If it's configured nowhere, a default value will be used. To
find out which socket value is set, connect with mysql and issue:

mysql show variables like '%sock%';
+---+---+
| Variable_name | Value |
+---+---+
| socket| /var/lib/mysql/mysql.sock |
+---+---+

Then, tell MySQLGUI to use the same socket, and everything should be
fine.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


-
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 Bug Database

2003-02-21 Thread Egor Egorov
On Thursday 20 February 2003 17:39, Sunil Gavaskar wrote:

 I need to know the link for Mysql Bug Database.
 I tried a lot in google...but not yet got it.
 somebody send me the link plz...

There is no bugs tracking database for MySQL.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [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




re: Re: subselect

2003-02-21 Thread Victoria Reznichenko
On Friday 21 February 2003 09:16, kk wrote:

 You may have to wait until version 4.1 if I am not mistaken.

You are not mistaken. Subselects will come in 4.1


 - Original Message -
 From: geeta varu [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 4:09 PM
 Subject: subselect

  does mysql version 3.23 support subqueries ...if no
  does latest version 4.0 support...



-- 
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




Re: Mysql Bug Database

2003-02-21 Thread Sunil Gavaskar
hi,
 Thanks for the mail.
Ive got the link from Mr.Zak Greant-MySql Company.
The link is bugs.mysql.com
But Im not getting any result for my search here!!!:-))

Regards
Sunil Gavaskar
Egor Egorov wrote:


On Thursday 20 February 2003 17:39, Sunil Gavaskar wrote:

 

   I need to know the link for Mysql Bug Database.
I tried a lot in google...but not yet got it.
somebody send me the link plz...
   


There is no bugs tracking database for MySQL.



 





-
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




Suggestion REquired

2003-02-21 Thread Biruda Raju Srinivasa Raju
Hi,

I have got mysql-version.src.rpm downloaded and when i was trying to install
it

rpm --rebuild mysql-version.src.rom

** I got the following error***
*** Can some one drag me out of this error***
..
..
...
reating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... (cached) yes
checking for gcc... egcs
checking whether the C compiler (egcs  -O6 -fomit-frame-pointer  ) works...
no
configure: error: installation or configuration problem: C compiler cannot
create executables. *Error line
Bad exit status from /var/tmp/rpm-tmp.34552 (%build)  ** Error

Thanks,
-Srinivas.

-
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




Examples needed of MYSQl/PHP update, delete scripts and relevant forms

2003-02-21 Thread Scott
I am looking for a set of examples of the relevant form pages and the php
backends that connect to eitehr a YSQL or MSSQl database where the user can
select certain records and then delete or update them. I ma having a
nightmare designing one and examples always help me.

Does anyone know of any or any websites that show them. I have been
searching on google to no avail so far.

Scott





-
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: Examples needed of MYSQl/PHP update, delete scripts and relevantforms

2003-02-21 Thread Kamara Eric R-M
Hi Scott,

Can you please explicitly state what you want to be done otherwise it
seems that all you need to do is get the records from the database,display
them to the user and include something like a checkbox or radio button
that the user can select to show the records he wants deleted.

Then all your script will have to do is check if the checkbox is checked
and then delete those records with a simple sql query.

Regards,
Eric

===
Kamara Eric Rukidi Mpuuga
Computer Frontiers International
Plot 32 Lumumba Avenue
P.O Box 12510,Kampala
Tel  :256-41-340417/71
Email:[EMAIL PROTECTED]
Web  :http://www.cfi.co.ug

On Fri, 21 Feb 2003, Scott wrote:

 I am looking for a set of examples of the relevant form pages and the php
 backends that connect to eitehr a YSQL or MSSQl database where the user can
 select certain records and then delete or update them. I ma having a
 nightmare designing one and examples always help me.

 Does anyone know of any or any websites that show them. I have been
 searching on google to no avail so far.

 Scott





 -
 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: Examples needed of MYSQl/PHP update, delete scripts and relevant forms

2003-02-21 Thread Scott
Basically,

I have this table, about 7 columns, with a primary key.
At the monent I have a html form and a php script that allows users to iput
into the table.

What I also want them to do it being about the select a certain record eg
via the primary key number or even by the campaign column (named campaign) -
and then those fields get displayed of that record in say a form - where the
users can either have the option to update eg via a update button, or also
have a delete button that deletes that record.

Any ideas?

Scott
- Original Message -
From: Kamara Eric R-M [EMAIL PROTECTED]
To: Scott [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 11:46 AM
Subject: Re: Examples needed of MYSQl/PHP update, delete scripts and
relevant forms


 Hi Scott,

 Can you please explicitly state what you want to be done otherwise it
 seems that all you need to do is get the records from the database,display
 them to the user and include something like a checkbox or radio button
 that the user can select to show the records he wants deleted.

 Then all your script will have to do is check if the checkbox is checked
 and then delete those records with a simple sql query.

 Regards,
 Eric

 ===
 Kamara Eric Rukidi Mpuuga
 Computer Frontiers International
 Plot 32 Lumumba Avenue
 P.O Box 12510,Kampala
 Tel  :256-41-340417/71
 Email:[EMAIL PROTECTED]
 Web  :http://www.cfi.co.ug

 On Fri, 21 Feb 2003, Scott wrote:

  I am looking for a set of examples of the relevant form pages and the
php
  backends that connect to eitehr a YSQL or MSSQl database where the user
can
  select certain records and then delete or update them. I ma having a
  nightmare designing one and examples always help me.
 
  Does anyone know of any or any websites that show them. I have been
  searching on google to no avail so far.
 
  Scott
 
 
 
 
 
  -
  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




Suggestions required

2003-02-21 Thread Biruda Raju Srinivasa Raju
Hi,

Here is th efollowing error i'am gertting when trying to run configure gor
mysql

configure --prefix=/usr/local/mysql --without-server
and after this i ran make, which drove me to the following error

make[2]: *** [mysql.o] Error 1
make[2]: Leaving directory
`/usr/src/redhat/SOURCES/MYsql/mysql-3.22.30/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/SOURCES/MYsql/mysql-3.22.30'
make: *** [all-recursive-am] Error 2

Can some on eplease help me out.

Thanks for your Co-operatoin,
-Srinivas

-
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: Very poor Solaris benchmarks

2003-02-21 Thread Zak Greant
On Thu, Feb 20, 2003 at 02:38:45PM -, Campbell, David wrote:
 MYSQL Ver 8.23 Distrib 3.23.54, 
 sun-solaris2.8 [binary install]
 Sun E4500
 
 Hi we have some seriously bad benchmarks for MYSQL performance on a new
 cluster - The problem seems to be IO, but the box is doing nothing:

  Can you identify any major differences in system and/or database
  tuning? Perhaps you are using default config settings on the new
  server, but tuned settings on the old?

-- 
Zak Greant [EMAIL PROTECTED]
  MySQL AB Community Advocate
  Personal Blog: http://zak.fooassociates.com

MySQL Tip: Dump the structure and/or content of remote databases
  % mysqldump --host=example.com database_name
  See http://www.mysql.com/doc/en/mysqldump.html

-
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: Very poor Solaris benchmarks

2003-02-21 Thread Campbell, David
   Can you identify any major differences in system and/or database
   tuning? Perhaps you are using default config settings on the new
   server, but tuned settings on the old?

I have tuned MYSQL using my.cnf settings.  

Of the two benchmarks one comes from the tests we ran and the others are
provided by AB to compare.

Tuning MYSQL couldn't/shouldn't account from shocking IO performance should
it?

Dave


 -Original Message-
 From: Zak Greant [mailto:[EMAIL PROTECTED]]
 Sent: 21 February 2003 13:24
 To: Campbell, David
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: Very poor Solaris benchmarks
 
 
 On Thu, Feb 20, 2003 at 02:38:45PM -, Campbell, David wrote:
  MYSQL Ver 8.23 Distrib 3.23.54, 
  sun-solaris2.8 [binary install]
  Sun E4500
  
  Hi we have some seriously bad benchmarks for MYSQL 
 performance on a new
  cluster - The problem seems to be IO, but the box is doing nothing:
 
   Can you identify any major differences in system and/or database
   tuning? Perhaps you are using default config settings on the new
   server, but tuned settings on the old?
 
 -- 
 Zak Greant [EMAIL PROTECTED]
   MySQL AB Community Advocate
   Personal Blog: http://zak.fooassociates.com
 
 MySQL Tip: Dump the structure and/or content of remote databases
   % mysqldump --host=example.com database_name
   See http://www.mysql.com/doc/en/mysqldump.html
 


** 
Please visit the official Granada website at www.granadamedia.com
for the latest company news.

This email and any files transmitted are confidential and intended 
solely for the use of the individual or entity to which they are 
addressed.  If you have received this email in error, please notify 
[EMAIL PROTECTED] 

Thank you.
**


-
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: Bad field type translation

2003-02-21 Thread gerald_clark
Since you are comparing a string to a number, it probably can not use 
the index.
Perhaps you should be more careful with your queries.

Gatica, Mario Alberto wrote:

I found the following error with mysql server version 3.23.52.
mysql select snb,id_servicio from Abonados_Servicios where
snb=1144293549;
9 rows in set (0.01 sec)

mysql select snb,id_servicio from Abonados_Servicios where snb=1144293549;
9 rows in set (45.61 sec)

mysql describe Abonados_Servicios;

Field Type Null Key Default
Extra
snb   char(10)  PRI
id_servicio   char(2)   PRI
estadochar(1)   A
fecha_altadatetime  -00-00
00:00:00 
fecha_bajadatetime YES  NULL
fecha_ultima_modificacion datetime YES  NULL
User  char(8)

select count(*) from Abonados_Servicios;
1590987 

As you can see , the snb field is char(10) type.

When you run the first sql statement :
select snb,id_servicio from Abonados_Servicios where snb=1144293549;
it takes :
9 rows in set (0.01 sec)
to complete which is a good performance.

But when you run the second sql statement :
select snb,id_servicio from Abonados_Servicios where snb=1144293549;
it takes :
9 rows in set (45.61 sec)
to complete.

I'd like to ask you if it wouldn't be better to rise an error or a warning
for the second statement instead of taking such amount of time.

Thanks
Mario Gatica

-
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




Checkpoint FW1 logs into mysql

2003-02-21 Thread James Kelly
Hello all
I'm trying to work out how to import Checkpoint FW1 firewall logs into 
mysql.

Each line of the logs consists of 27 space deliminated fields.
Of the 27 fields, I want to ignore about 11 of these fields when I do 
the LOAD command on the log file.

I've already figured out I want to use:

TERMINATED BY ' '  to indicate that the fields are space deliminated
LINES TERMINATED BY '\n'   to indicate that each line is terminated by 
new lineagain I'm thinking here that
I may need to use a '\r' instead.

Question: how do I get mysql to ignore specified fields? I will be 
using a LOAD file to contain the load parameters and that the field 
options are top to bottom for fields left to right.

**When I come to a field I want mysql to ignore do I just use this 
parameter?
IGNORE


jim kelly


-
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: Very poor Solaris benchmarks

2003-02-21 Thread Zak Greant
On Fri, Feb 21, 2003 at 01:41:40PM -, Campbell, David wrote:
Can you identify any major differences in system and/or database
tuning? Perhaps you are using default config settings on the new
server, but tuned settings on the old?
 
 I have tuned MYSQL using my.cnf settings.  
 
 Of the two benchmarks one comes from the tests we ran and the others are
 provided by AB to compare.
 
 Tuning MYSQL couldn't/shouldn't account from shocking IO performance should
 it?

  Probably not.
  
  I admit that I scanned your message very quickly (I am in the middle
  of a few critical tasks right now) - I just noted that you had
  received no answers and wanted to see if I could get more details and
  work up some interest in your question at the same time.  :)

  Have you taken a look at the section of the crash-me source that
  handles Solaris - we may have tips in there.


  Cheers!
-- 
Zak Greant [EMAIL PROTECTED]
  MySQL AB Community Advocate
  Personal Blog: http://zak.fooassociates.com

MySQL Tip: Impress your friends with nifty MySQL one-liners
  % mysql --execute \u mysql; SELECT DISTINCT user FROM user ORDER BY user;

-
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: Suggestions required

2003-02-21 Thread Thomas Spahni
Hi Srinivas,

could it be that you're compiling a really prehistoric version?
Upgrade.

Thomas Spahni

On Fri, 21 Feb 2003, Biruda Raju Srinivasa Raju wrote:

 Hi,

 Here is th efollowing error i'am gertting when trying to run configure gor
 mysql

 configure --prefix=/usr/local/mysql --without-server
 and after this i ran make, which drove me to the following error

 make[2]: *** [mysql.o] Error 1
 make[2]: Leaving directory
 `/usr/src/redhat/SOURCES/MYsql/mysql-3.22.30/client'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/usr/src/redhat/SOURCES/MYsql/mysql-3.22.30'
 make: *** [all-recursive-am] Error 2

 Can some on eplease help me out.

 Thanks for your Co-operatoin,
 -Srinivas


-
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: could not make...

2003-02-21 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Thu, 20 Feb 2003 [EMAIL PROTECTED] wrote:

 # cc -V
 Compaq C V6.4-014 on Compaq Tru64 UNIX V5.1A (Rev. 1885)
 Compiler Driver V6.4-215 (sys) cc Driver
 # cxx -V
 ksh: cxx:  not found
  

 I couldn't find standard source so I used the gamma source. I'm getting
 further but it still won't install. Below is last output of make:

 cxx -pthread -DUNDEF_THREADS_HACK -I. -I. -I.. -I./../include -I../include -
 I./.. -I.. -I.. -O -DDBUG_OFF -O4 -ansi_alias -fast -inline speed -
 speculate all -noexceptions -nortti  -DUNDEF_HAVE_GETHOSTBYNAME_R -c -o mysql.o
 `test -f mysql.cc || echo './'`mysql.cc
 ../depcomp[402]: cxx:  not found
  

You don't have a C++ compiler installed. This is a requirement to compile
MySQL.

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /  Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/ Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+VjNqSVDhKrJykfIRAnRXAJ4zDb53bpC8v3ox9RaNJpWGqiPjBQCfaepw
IDvB6XwyRSSWToBmkI2CK0E=
=ePiA
-END PGP SIGNATURE-

-
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: Native XADataSource for MySQL

2003-02-21 Thread Sinisa Milivojevic
On Wed, 19 Feb 2003 10:43:49 -0600
Frank Gates [EMAIL PROTECTED] wrote:

 Hello,
 
 Earlier I asked Mark about XA and Connector/J.  He said that it was
 dropped from the 3.0 releases because MySQL doesn't natively support XA,
 but when it does he will add it back in.   Mark suggested that I ask for
 XA on these lists if I wish to expedite it in the pipeline.
 
 I am raising the flag here for XA, but not to exceed work on stored
 procedures and views.  I believe that two-phase commit with XA should be
 natively supported so that it will compete effectively with other
 database providers in those instances where two-phase is valuable.
 
 My personal requirement for it is minimal at this time.  I am developing
 an application server development framework (which is MySQL-centric) and
 so have need to support XA connection pooling and resources.   I had
 already developed an XAResource-wrapper for PooledConnection's when I
 discovered that XA was dropped from Connector/J 3.0.  It is a small task
 for me to wrap ConnectionPoolDataSource's with an XADataSource
 implementation for now.   But I do express my desire for native XA in
 MySQL.
 
 (The app server framework is intended to build customizable containers
 as well as EJB containers.   The motive for this framework is that there
 are some applications that fit the application server model but not the
 EJB model or only part of the J2EE model.)
 
 Frank Gates
 [EMAIL PROTECTED]
 
 

HI!

We shall definitely add support for XA, but I doubt it will be before 6.0.

We have so many other features to implement first.

--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   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




Re: Very poor Solaris benchmarks

2003-02-21 Thread Rodolphe Jouannet
Hi,

Sorry for my english ;-)

I've made some benchs on a SUN v880 with Solaris 8 (4 cpus). I must
enable direct IO on the file system whitch support the dataspace (for
innodb tables). If not, i've problems with threads (no more instances of
mysqld). Why ? i don't know, i just notice it.

Best regard.


-
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 got signal 10 when connecting with JDBC client

2003-02-21 Thread Mikael Larsson
Description:
 When connecting to mysql from a java client the mysql process is restarted.
Connecting from the mysql client is no problem.
The machine is an HP rp2470 with 2*CPU and 2GB memory.

Note that I don't have gcc installed on the machine, is this a requirement?

From the error log:
mysqld got signal 10;
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
record_buffer=131072
sort_buffer=2097144
max_used_connections=0
max_connections=200
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 443390 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

030221 04:54:19  mysqld restarted


Some kernel paramters:
Parameter Current Dyn PlannedModule
Version

===
NSTRBLKSCHED-  -  2
NSTREVENT  50  -  50
NSTRPUSH   16  -  16
NSTRSCHED   0  -  0
STRCTLSZ 1024  -  1024
STRMSGSZ65535  -  65535
acctresume  4  -  4
acctsuspend 2  -  2
aio_listio_max256  -  256
aio_max_ops  2048  -  2048
aio_physmem_pct10  -  10
aio_prio_delta_max 20  -  20
allocate_fs_swapmap 0  -  0
alwaysdump  1  -  1
bootspinlocks   -  -  256
bufcache_hash_locks   128  -  128
bufpages0  -  (NBUF*2)
chanq_hash_locks  256  -  256
core_addshmem_read  0  Y  0
core_addshmem_write 0  Y  0
create_fastlinks0  -  0
dbc_max_pct50  -  50
dbc_min_pct 5  -  5
default_disk_ir 0  -  0
desfree -  -  0
disksort_seconds0  -  0
dmp_rootdev_is_vol  0  -  0
dmp_swapdev_is_vol  0  -  0
dnlc_hash_locks   512  -  4*128
dontdump0  -  0
dskless_node-  -  0
dst 1  -  1
effective_maxpid-  -  ((NPROC=3)?3:(NPROC*5/4))
eisa_io_estimate-  -  0x300
enable_idds 0  -  0
eqmemsize  15  -  15
executable_stack1  -  1
fcp_large_config0  -  0
file_pad-  -  10
fs_async0  -  0
ftable_hash_locks  64  -  64
hdlpreg_hash_locks128  -  128
hfs_max_ra_blocks   8  -  8
hfs_max_revra_blocks8  -  8
hfs_ra_per_disk64  -  64
hfs_revra_per_disk 64  -  64
hp_hfs_mtra_enabled 1  -  1
hpux_aes_override   -  -  0
initmodmax 50  -  50
io_ports_hash_locks64  -  64
iomemsize   -  -  4
ksi_alloc_max   16384  -  (NPROC*8)
ksi_send_max   32  -  32
lotsfree-  -  0
max_async_ports50  -  50
max_fcp_reqs  512  -  512
max_mem_window  0  -  0
max_thread_proc  3000  -  3000
maxdsiz2063835136  -  2063835136
maxdsiz_64bit  0x4000  -  0x4000
maxfiles 2048  -  2048
maxfiles_lim 2048  Y  2048
maxqueuetime-  -  0
maxssiz  0x80  -  0x0080
maxssiz_64bit0x80  -  0x0080
maxswapchunks2048  -  2048
maxtsiz 0x400  Y  0x0400
maxtsiz_64bit  0x4000  Y  0x4000
maxuprc75  Y  75
maxusers  512  -  512
maxvgs 10  -  10
mesg1  -  1
minfree -  -  0
modstrmax 500  -  500
msgmap 42  -  (2+MSGTQL)
msgmax   8192  Y  8192
msgmnb  16384  Y  16384
msgmni 50  -  50
msgseg   2048  -  2048
msgssz  8  -  8
msgtql 40  -  40
nbuf0  -  0
ncallout 6000  -  6000
ncdnode   150  -  150
nclist   8292  -  (100+16*MAXUSERS)
ncsize   7848  -  (NINODE+VX_NCSIZE)+(8*DNLC_HASH_LOCKS)
ndilbuffers30  -  30
netisr_priority -  -  -1
netmemmax   -  -  0
nfile3000  -  3000
nflocks   200  -  200
nhtbl_scale 0  -  0
ninode   2728  -  ((NPROC+16+MAXUSERS)+32+(2*NPTY))
nkthread 6000  -  6000
nni -  -  2
no_lvm_disks  

Re: Checkpoint FW1 logs into mysql

2003-02-21 Thread 1LT John W. Holmes
 I'm trying to work out how to import Checkpoint FW1 firewall logs into
 mysql.

 Each line of the logs consists of 27 space deliminated fields.
 Of the 27 fields, I want to ignore about 11 of these fields when I do
 the LOAD command on the log file.

 I've already figured out I want to use:

 TERMINATED BY ' '  to indicate that the fields are space deliminated
 LINES TERMINATED BY '\n'   to indicate that each line is terminated by
 new lineagain I'm thinking here that
 I may need to use a '\r' instead.

 Question: how do I get mysql to ignore specified fields? I will be
 using a LOAD file to contain the load parameters and that the field
 options are top to bottom for fields left to right.

 **When I come to a field I want mysql to ignore do I just use this
 parameter?
 IGNORE

You can ignore a certain number of rows with LOAD DATA, but not columns.
Best you can probably do is insert it into a table with all of the fields
you want, then either drop those columns, or INSERT INTO ... SELECT and only
get the columns you want in a second table.

---John Holmes...


-
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: LOCK TABLES error , on a select without any update ?

2003-02-21 Thread Heikki Tuuri
Steff,

 We have our connection set to Autocommitt=1, and No table locks
 are ever explicitly being done on this table anyplace in any of our
 code modules.

in MySQL you have to do LOCK TABLES on EVERY table you use inside a LOCK
TABLES. You cannot lock just some table and use others unlocked.

I repeat that the error could be caused if your application has a bug and
uses the same connection to do the SELECT as it has used to LOCK some other
table.

Are you absolutely sure you do not mix connections in your application?

Did you have the general query log running at the time of the error? If yes,
can you check from it what was the number of the connection that issued the
query resulting in an error, and did that same connection earlier issue a
LOCK TABLES?

Regards,

Heikki
Innobase Oy
sql query

..
Subject: LOCK TABLES error , on a select without any update ?
From: Steff.envisage1.com
Date: Thu, 20 Feb 2003 17:25:43 -0500



Hi All,
Once again we have run into a situation where our production
database is throwing an error regarding  the use of table locks for
no apparent reason.

We are running MySql on windows with InnoDb. We have a section
of code which is working fine most of the time but occasionally will
through an error complaining that a table is not locked.

Based on the Java stack dump, the SQL statement which caused
this error to appear was
Select TransactionTypeID  From transactionheader Where
TransactionHeaderID =1234

The error reported was :
java.sql.SQLException: General error: Table 'transactionheader'
was not locked with LOCK TABLES

We have our connection set to Autocommitt=1, and No table locks
are ever explicitly being done on this table anyplace in any of our
code modules.

Will someone please help me understand why a select statement
without an update would ever cause a tables not Locked error ?

Thanks
Steff



--
Steff McGonagle
Envisage Information Systems, Inc.

Phone (315) 497-9202 x16
www.EnvisageSystems.com
www.Enveritus.com

...

Our SQL in this application follows the following pattern. (the following is
an section
from the MysQL log with just one instance of the application running):

030125 20:24:29   7 Query   SET autocommit=0
  7 Query   BEGIN
  7 Query   Select * from accountsprovided Where
ExternalID='I06'AND FinServProvID = 'C33'
  7 Query   UPDATE accountsprovided SET Enabled='Y'
WHERE
AccountID = 'CKCBSBF2994309'
  7 Query   Select * from account Where AccountID =
'CKCBSBF2994309'
  7 Query   UPDATE account SET PreLimit=1.00
WHERE
AccountID = 'CKCBSBF2994309'

 12 Query   Lock Table Control Write
 12 Query   Select * From Control
 12 Query   Update Control set NextID = 6999244
 12 Query   Unlock Tables

  7 Query   INSERT INTO productsowned ( VestedValue,
Quantity )
VALUES ( 7293.90, 7293.9)

...  About another 40 lines of SQL following this same general pattern but
using
different tables.

  7 Query   Update cachestatus Set UpdatedOn = null,
UpdatedBy =
'XMLWarehouseLoader' Where PrimaryID = 'CKCBSBF2994310' AND SecondaryID
= 'CKCBSBF2994311'
  7 Query   COMMIT
  7 Query   SET autocommit=1


-
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: Checkpoint FW1 logs into mysql

2003-02-21 Thread Jerry
I've do a whole load of log parsing/loading/analysis. And I mean A WHOLE
load :)

I found it better to use a pre parse (script/binary/program) to filter the
logs then dump out the SQL.

That way you can do some filtering and error checking on the logs before
they get near the dB.

Though for my application I had to be sure that the input was 100.00 % ok.


Jerry



- Original Message -
From: James Kelly [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 2:02 PM
Subject: Checkpoint FW1 logs into mysql


 Hello all
 I'm trying to work out how to import Checkpoint FW1 firewall logs into
 mysql.

 Each line of the logs consists of 27 space deliminated fields.
 Of the 27 fields, I want to ignore about 11 of these fields when I do
 the LOAD command on the log file.

 I've already figured out I want to use:

 TERMINATED BY ' '  to indicate that the fields are space deliminated
 LINES TERMINATED BY '\n'   to indicate that each line is terminated by
 new lineagain I'm thinking here that
 I may need to use a '\r' instead.

 Question: how do I get mysql to ignore specified fields? I will be
 using a LOAD file to contain the load parameters and that the field
 options are top to bottom for fields left to right.

 **When I come to a field I want mysql to ignore do I just use this
 parameter?
 IGNORE


 jim kelly


 -
 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




entries from 3 months disappeared without trace... What happened?

2003-02-21 Thread Arvid Gregersen
This is the most weird thing I have EVER tried. I went away for the weekend
and when I got home they were gone!!

Setting: Linux Redhat 7.2
Database Mysql 3.23.22
www: apache

Here is the chain of events as I recall them

thursday: I upgrade SSL on my machine
friday: I go away for the weekend
saturday: who knows
sunday:

some time during the day my httpd sets out

I come home. Sees the www is down. Thinks it may have been the adjustments I
made thursday decides to reboot just to be certain everything is in order

The server comes up, but the http is still down. I examine the logs and
finds out that it is the new SSL that messes things up. I disable SSL and
start up httpd. No problem

I find out that all entries made since 2002-11-13 are GONE. Not gone like
the table is corrupt, or like the harddisk messed it up. Gone like they
never existed!!

Every sunday I backup my tables figuring that something like this could
happen but THE ENTRIES ARE NOT REGISTERED THERE EITHER!!! The backupfile
is stored on another computer and it is af it has backed up the wrong
tables...

It is simply as if they never existed. Or rather it is as if they were
stored only in memory and with the reboot they were gone...

To make sure it's not too easy(hoho) a few tables are appearently
unaffected! I have 2 tables that uses each other. Each entry in table1
refers to an entry in table2. The funny thing is: all data in table1 is gone
down to 2002-11-13 but table2 is intact with last entry last week... What
does it mean???

How can this be? I know as a bonus information that I have used the alter
table command on all the tables that are intact, but what does THAT mean?
Nothing maybe. All I know is that now the entries are gone, and I want them
back. If I can't have them back I would really like a good explanation,
because I am really in the dark about this...

sincerely

Arvid


-
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: Checkpoint FW1 logs into mysql

2003-02-21 Thread Stefan Hinz
Jim,

 TERMINATED BY ' '  to indicate that the fields are space deliminated
 LINES TERMINATED BY '\n'   to indicate that each line is terminated by 
 new lineagain I'm thinking here that
 I may need to use a '\r' instead.

As a rule of thumb, depending on where your logs come from:

a) Windows: \r\n
b) Unix: \n
c) Mac OS: \r

 Question: how do I get mysql to ignore specified fields?

Read the manual? ;-) http://www.mysql.com/doc/en/LOAD_DATA.html

Well, in this case, this wouldn't help you too much, just make things
clear: You can have more columns in the table than fields in the
import file (you would just specify which columns you want to fill
with data), but not the other way around.

My suggestions:

a) Put some dummy columns in your table.

b) As an alternative, filter out the fields you don't need with some
application.

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


-
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 hangs on multi table update on innodb table.

2003-02-21 Thread Scott Wong

Version: Mysql  4.0.10-gamma

Description:  Mysql hangs and possibly can not recover from a query on an innodb 
table.  

How to Repeat :

drop table if exists parent;
drop table if exists child;

CREATE TABLE parent(id INT NOT NULL,
  PRIMARY KEY (id)) TYPE=INNODB;
CREATE TABLE child(id  INT PRIMARY KEY, parent_id INT,
  INDEX par_ind (parent_id),
  FOREIGN KEY (parent_id) REFERENCES parent(id)
  ON DELETE CASCADE
  ON UPDATE CASCADE
  ) TYPE=INNODB;

insert into parent set id=1;
insert into child set id=1, parent_id=1;
update parent,child set parent.id=parent.id+1, child.parent_id=parent.id+1;


Thank you for your time.
Scott Wong,
Meiko America, INC


-
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




help starting replication

2003-02-21 Thread fwellers
Hello,
I am trying to start replication from a 4.0.9 solaris master to a 4.0.8 linux slave.
I am already sucessfully replicating this master to another sun slave.
I followed the same procedures on the linux box but no joy.

The error log keeps saying :
030221 10:08:56  mysqld started
030221 10:08:56  InnoDB: Started
/usr/mysql/libexec/mysqld: ready for connections
030221 10:08:56  Slave I/O thread: connected to master 'replication@udd:3306',  
replication started in log 'udd-bin.008' at position 154
030221 10:08:56  Error updating slave list: Query error
030221 10:08:56  Slave I/O thread exiting, read up to log 'udd-bin.008', position 154


Show slave status yields that the Slave_SQL_Running value is 'yes', but the 
Slave_IO_Running values is 'No'.

Does anyone have any ideas to help troubleshoot this ?

Thanks,

Floyd Wellershaus


-
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: SET FOREIGN_KEY_CHECKS = 0 Suggestion.

2003-02-21 Thread Jeremy Tinley
Changing one local variable, IMO, shouldn't replicate.

I would much rather have a REPLICATE command that I could place before any SQL
command that causes it to replicate.  This keeps local variables local, but in
the event I need to replicate a change to all my slaves without going to each
one, I can.

-J

-Original Message-
From: wertyu [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 21, 2003 3:15 AM
To: [EMAIL PROTECTED]
Subject: SET FOREIGN_KEY_CHECKS = 0 Suggestion.

Hello, everyone.

I'm using MySQL replication(Version 4.0.10)

Master and slave have FOREIGN KEY constration.
and I  back up data with mysqldump.
but mysqldump does not produce table and record invalid order for FK.

So,when I restore data,  I execute SET FOREIGN_KEY_CHECKS = 0; on master.

But, this command does not forwarded to Slave.
so, slave fails to insert record.

So my suggestion is SET FOREIGN_KEY_CHECKS = 0; forwarded to slave.

What do you think of this?

Have a nice weekend!

##
Heo, Jungsu Mr.
SimpleX Internet. http://www.simplexi.com

Filter : sql



-
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 mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



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

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




mysql 4.0.11

2003-02-21 Thread Reetz, Wendy
Does anyone know when the release date for the mysql 4.0.11 version?  I
was just about to rebuild everything (apache,php,etc), but if it's next
week, I'd rather wait for it.

Thanks,
Wendy

-
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: Re: Bug with uppercased database in 3.23.55?

2003-02-21 Thread Victoria Reznichenko
On Thursday 20 February 2003 17:59, you wrote:

   C:\mysqlmysql -u b R
   ERROR 1044: Access denied for user: 'b@localhost' to database 'r'
 
  I guess no. In 3.23.55 by default lower_case_table_names=1 on Windows, so

 all

  table and database names are converted to lower case.

 I've guess that 'lower_case_table_names' is not affected on database names
 8(
Hi!

First of all answer to the mailing list, not to me directly, please.

Since 3.23.53 lower_case_table_names affected to the database names, too.


-- 
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




re: help starting replication

2003-02-21 Thread Egor Egorov
On Friday 21 February 2003 17:53, fwellers at vcampus dot com wrote:

 I am trying to start replication from a 4.0.9 solaris master to a 4.0.8
 linux slave. I am already sucessfully replicating this master to another
 sun slave. I followed the same procedures on the linux box but no joy.

 The error log keeps saying :
 030221 10:08:56  mysqld started
 030221 10:08:56  InnoDB: Started
 /usr/mysql/libexec/mysqld: ready for connections
 030221 10:08:56  Slave I/O thread: connected to master
 'replication@udd:3306',  replication started in log 'udd-bin.008' at
 position 154 030221 10:08:56  Error updating slave list: Query error
 030221 10:08:56  Slave I/O thread exiting, read up to log 'udd-bin.008',
 position 154


 Show slave status yields that the Slave_SQL_Running value is 'yes', but the
 Slave_IO_Running values is 'No'.

 Does anyone have any ideas to help troubleshoot this ?

Does replication user have REPLICATION SLAVE privilege?



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [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




Looking for Data Cube software which uses MySQL...

2003-02-21 Thread Martin, Rich
I was wondering if anybody out there knows of data cube software which makes
use of MySQL for its database/SQL engine? For a variety of reasons, we won't
use Microsoft SQL server, and Oracle is right out -- too expensive. Other
solutions (Sybase, etc.) are also unpalatable for various reasons. Our
developers are happy with MySQL, and so that's what our management has
decided to go with. Problem is, I'm having a hard time finding data cube
software out there that uses MySQL.
Any (constructive) references would be greatly appreciated...thanks in
advance for your time and consideration!

-Rich Martin

-
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




InnoDB Crash [help!]

2003-02-21 Thread Michael T. Babcock
I've got a nice MySQL crash that happened during the night last night and I 
can't seem to get it to come back online for me without --skip-innodb.

Version 3.23.55 compiled from sources with egcs-2.91.66.  Configure at end.

I'll be trying to watch my E-mail even though its authenticated via an InnoDB
table usually :-)

030221 12:22:55  InnoDB: Flushing modified pages from the buffer pool...
030221 12:22:55  InnoDB: Started
/usr/libexec/mysqld: ready for connections
030221 12:22:58  InnoDB: Assertion failure in thread 7176 in file ibuf0ibuf.c line 2538
[...]
Cannot determine thread, fp=0xbebff114, backtrace may not be correct.
Stack range sanity check OK, backtrace follows: [after resolving symbols]
0x80cd61f handle_segfault__Fi + 379
0x40029532 _end + 935704122
0x81dfc09 ibuf_merge_or_delete_for_page + 853
0x825749e buf_page_io_complete + 334
0x825f7a5 buf_read_page_low + 197
0x8260234 buf_read_ibuf_merge_pages + 116
0x81da802 ibuf_contract_ext + 1370
0x81da85b ibuf_contract_for_n_pages + 31
0x81b8c5d srv_master_thread + 937
0x40026b85 _end + 935693453
0x4015614a _end + 936936018

CC=gcc
CXX=gcc
CFLAGS=-O2 -march=pentium
CXXFLAGS=-O2 -march=pentium
LDFLAGS=-static

export CC CXX CFLAGS CXXFLAGS LDFLAGS

./configure \
--sysconfdir=/etc \
--prefix=/usr \
--localstatedir=/var/mysql \
--enable-assembler \
--with-berkeley-db \
--with-innodb \
--with-comment \
--enable-thread-safe-client

-- 
Michael T. Babcock
CTO, FibreSpeed Ltd. (Hosting, Security, Consultation, Database, etc)
http://www.fibrespeed.net/~mbabcock/

-
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




issues with mysql

2003-02-21 Thread Stéphane Pinel
I've installed 3.23.53 on a MacOS X box.

verything seems to be OK except:

when I use mysql like this :

/usr/local/bin/mysql test

..no problem.

but if I want to use any option like :

/usr/local/bin/mysql  test -u

I get a zillion lines that start with
./bin/mysql Ver 11.18 Distrib 3.23.53, for apple-darwin6.2 (powerpc)
Copyright (c) 2000 MySQL AB  MyQL AB Finland ...etc...

..then the lines continue with:

Usage: ./bin/mysql [OPTIONS] [database] ..ect ect ect...

...then I'm dropped back at:

[wallstreet:~] spinel%

I've never seen this before.

mysqld is running but I'm unable to create a user with privileges.

Any idea ?

Regards.

 
---
Stéphane Pinel
Information System
Equinox Partners Paris
iChat/AIM: s.pinel
 
---

-
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



From Win2000/IIS to Linux/Apache ?

2003-02-21 Thread Theisen, Gary
Hi all,

I have PHP  MySQL installed on a Win2000/IIS system.  I may be moving (due
to requirements at work) to a Linux/Apache system in the near future.

I'm wondering if it's a hassle, or even possible, to move the MySQL database
from the windows/IIS box to the Linux/Apache box?  Any corruption, or other
problems associated with this type of move?

Thanks!

P.S. I also have the option of leaving Win2000 in place but switching to
Apache service.  Would this be worth it?  In other words, would that setup
be a better web server environment (for PHP  MySQL) than the Win2000/IIS
setup?




-
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: From Win2000/IIS to Linux/Apache ?

2003-02-21 Thread Joe Stump
I would assume the Win version comes with mysqldump - just
mysqldump -uuser -ppassword -hhost database. You *might* be able to copy the
data directory (someone else should chime in on this).

--Joe


--
Joe Stump [EMAIL PROTECTED]
http://www.joestump.net
Label makers are proof God wants Sys Admins to be happy.

-Original Message-
From: Theisen, Gary [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 9:59 AM
To: '[EMAIL PROTECTED]'
Subject: From Win2000/IIS to Linux/Apache ?


Hi all,

I have PHP  MySQL installed on a Win2000/IIS system.  I may be moving (due
to requirements at work) to a Linux/Apache system in the near future.

I'm wondering if it's a hassle, or even possible, to move the MySQL database
from the windows/IIS box to the Linux/Apache box?  Any corruption, or other
problems associated with this type of move?

Thanks!

P.S. I also have the option of leaving Win2000 in place but switching to
Apache service.  Would this be worth it?  In other words, would that setup
be a better web server environment (for PHP  MySQL) than the Win2000/IIS
setup?




-
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: From Win2000/IIS to Linux/Apache ?

2003-02-21 Thread Danny Haworth
Joe Stump wrote:


I would assume the Win version comes with mysqldump - just
mysqldump -uuser -ppassword -hhost database. You *might* be able to copy the
data directory (someone else should chime in on this).
 

I known copying the data dir from Linux to Linux isn't a problem with 
MyISAM tables, i've never managed to get a straight InnoDB file copy to 
work though and im also not sure about Win - Linux.

-Original Message-
From: Theisen, Gary [mailto:[EMAIL PROTECTED]]

I'm wondering if it's a hassle, or even possible, to move the MySQL database
from the windows/IIS box to the Linux/Apache box?  Any corruption, or other
problems associated with this type of move?
 

I'd still use MySQL dump, if the win version doesn't come with 
mysqldump, just use the linux version ;-)

P.S. I also have the option of leaving Win2000 in place but switching to
Apache service.  Would this be worth it?  In other words, would that setup
be a better web server environment (for PHP  MySQL) than the Win2000/IIS
setup?
 

I started off using IIS + MySQL a couple of years back... about 10 
months ago I made the move to Linux + PHP (i've been a long time Linux 
fan)  because the IIS boxes were driving me up the wall (poor 
reliability, inflexibility and the torrent of fixes and patches).

Ever since then i've been a devout LAMP (Linux, Apache, MySQL  PHP) 
fan. The platform is rock solid and extensible beyone belief ;-)

HTH

danny


-
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: issues with mysql

2003-02-21 Thread gerald_clark


Stéphane Pinel wrote:


I've installed 3.23.53 on a MacOS X box.

verything seems to be OK except:

when I use mysql like this :

/usr/local/bin/mysql test

..no problem.

but if I want to use any option like :

/usr/local/bin/mysql  test -u 


This is not valid usage.
/usr/local/bin/mysql -u root test
on the other hand is.

The usage lines are printed to help you.
Please read them.




I get a zillion lines that start with
./bin/mysql Ver 11.18 Distrib 3.23.53, for apple-darwin6.2 (powerpc)
Copyright (c) 2000 MySQL AB  MyQL AB Finland ...etc...

..then the lines continue with:

Usage: ./bin/mysql [OPTIONS] [database] ..ect ect ect...

...then I'm dropped back at:

[wallstreet:~] spinel%

I've never seen this before.

mysqld is running but I'm unable to create a user with privileges.

Any idea ?

Regards.





-
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: From Win2000/IIS to Linux/Apache ?

2003-02-21 Thread John Griffin
Hi Gary,

Where I work we use Windows2000/Apache/MySQL/PHP in development and 
Linux/Apache/MySQL/PHP in production. We move any database stuff via mysqldump with no 
problems what so ever. BTW, the reason we went with Linux in production is that MySQL 
performance seems to be vastly superior on Linux, at least for the Web applications we 
are running on the hardware we are running. If at all possible, I would suggest you do 
some timing tests with both Linux and Windows and see which works better for you.

John Griffin

-Original Message-
From: Theisen, Gary [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 12:59 PM
To: '[EMAIL PROTECTED]'
Subject: From Win2000/IIS to Linux/Apache ?


Hi all,

I have PHP  MySQL installed on a Win2000/IIS system.  I may be moving (due
to requirements at work) to a Linux/Apache system in the near future.

I'm wondering if it's a hassle, or even possible, to move the MySQL database
from the windows/IIS box to the Linux/Apache box?  Any corruption, or other
problems associated with this type of move?

Thanks!

P.S. I also have the option of leaving Win2000 in place but switching to
Apache service.  Would this be worth it?  In other words, would that setup
be a better web server environment (for PHP  MySQL) than the Win2000/IIS
setup?




-
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: From Win2000/IIS to Linux/Apache ?

2003-02-21 Thread Tore Bostrup
Moving the database is childs play.  I'm sure other tools allow you to do
this, but when I recently started working with MySQL, I found PremiumSoft
MySQL Studio (30 day trial, $78 to purchase) from http://www.mysqlstudio.com
It is a pretty decent tool, and among other things includes a Backup/data
transfer wizard that lets you very easily move a database from one server to
another.

Add to that, I designed my first MySQL database on MySQL version 4 on my own
Win2k box, and transferred it to verion 3.23.xx on a Linux server across the
web (just make sure port 3306 is open on the target server).

Regards,
Tore.

- Original Message -
From: Theisen, Gary [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:59 PM
Subject: From Win2000/IIS to Linux/Apache ?


 Hi all,

 I have PHP  MySQL installed on a Win2000/IIS system.  I may be moving
(due
 to requirements at work) to a Linux/Apache system in the near future.

 I'm wondering if it's a hassle, or even possible, to move the MySQL
database
 from the windows/IIS box to the Linux/Apache box?  Any corruption, or
other
 problems associated with this type of move?

 Thanks!

 P.S. I also have the option of leaving Win2000 in place but switching to
 Apache service.  Would this be worth it?  In other words, would that
setup
 be a better web server environment (for PHP  MySQL) than the Win2000/IIS
 setup?




 -
 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: InnoDB Crash [more info]

2003-02-21 Thread Michael T. Babcock
Michael T. Babcock wrote:


I've got a nice MySQL crash that happened during the night last night and I 
can't seem to get it to come back online for me without --skip-innodb.
 


Follow-up with mysql's bug report:

MySQL support: none
Synopsis:InnoDB Crashing on Startup
Severity:critical
Priority:medium
Category:mysql
Class:sw-bug
Release:mysql-3.23.55 (yes)

Environment:
System: Linux web.fibrespeed.net 2.2.14-10.0 #21 Fri Apr 21 00:22:11 EDT 
2000 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc 
/usr/bin/cc
GCC: Reading specs from 
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

Compilation info: CC='gcc'  CFLAGS='-O2 -march=pentium'  CXX='gcc'  
CXXFLAGS='-O2 -march=pentium'  LDFLAGS='-static'

LIBC:
lrwxrwxrwx1 root root   13 Apr 10  2000 /lib/libc.so.6 
- libc-2.1.3.so
-rwxr-xr-x1 root root  4101836 Jan 15  2001 /lib/libc-2.1.3.so
-rw-r--r--1 root root 20273324 Jan 15  2001 /usr/lib/libc.a
-rw-r--r--1 root root  178 Jan 15  2001 /usr/lib/libc.so
lrwxrwxrwx1 root root   10 Jul 20  2001 
/usr/lib/libc-client.a - c-client.a

Configure command: ./configure '--sysconfdir=/etc' '--prefix=/usr' 
'--localstatedir=/var/mysql' '--enable-assembler' '--with-berkeley-db' 
'--with-innodb' '--with-comment' '--enable-thread-safe-client' 'CC=gcc' 
'CFLAGS=-O2 -march=pentium' 'CXXFLAGS=-O2 -march=pentium' 'CXX=gcc' 
'LDFLAGS=-static'

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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



Deleting duplicates that aren't exactly alike

2003-02-21 Thread Chris Corwin
Greetings,

I'm fairly new to MySQL--so I'm not sure if what I'm asking is simple 
or not.


I have a table that has duplicate records, but not really: the dupes 
are not necessarily exactly like the originals, it seems.


In any case, I have this table...

CREATE TABLE `dues` (
  `id` int(11) NOT NULL auto_increment,
  `userID` int(11) NOT NULL default '0',
  `dueYear` varchar(50) NOT NULL default '',
  `duePaid` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `Userid` (`userID`)
) TYPE=MyISAM;


Where...

dues.userID = users.id


And...

users.id can be in 0 or more records in the table dues.



Okay, by way of example -- this statement...


SELECT id, userID, dueYear, duePaid
FROM dues
WHERE userID = 218
ORDER BY dueYear


...yeilds:

id  userID  dueYear duePaid
2158 218 1995 Non-Member
2159 218 1996 Non-Member
2160 218 1997 Non-Member
2161 218 1998 Non-Member
2162 218 1999 Non-Member
2163 218 2000 Non-Member
2164 218 2001 Yes
2165 218 2002 Non-Member
2078 218 2003 Yes
2166 218 2003 Non-Member
2167 218 2004 Non-Member
2168 218 2005 Non-Member


You can see that I have a duplicate year (2003) for this user. I have 
lots of this in my dues table, but not for every user--it seems pretty 
random.

(how they got there is still to be tracked down, but is not a huge 
concern)



What I want to know is how do I find these double year records?


I want to be able to find all such instances of doubling up on the 
year for every `userID` easily--and then eventually to delete the 
extra one (either one, no matter).

(for every users.id, that is)

(I need to be able to save a list of which userIDs where infected, 
too so we can go back and make sure the dues information is correct.



I could write a web script to do this easily enough, but I really want 
to be able to do it in SQL statements.

I have tried and tried to figure it out on my own, but have failed.

Can anyone offer suggestions?

- me

==

In 5 months all Web Pages will be created with Lasso...
In 5 minutes you'll find out why...
In 5 days you'll wonder how your website ever existed without Lasso...
In 5 weeks you'll get a raise... 
Download Lasso Today!

- blueworld.com | December 10 1997

http://web.archive.org/web/19971210093857/http://www.blueworld.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




Re: query help

2003-02-21 Thread Sasha Pachev
On Thursday 20 February 2003 02:17 pm, Ajay Patel wrote:
 I have a host table where I save the platform model. The platform model
 can be saved in various ways. For example,
 
 Sun Enterprise 250 (2 x UltraSPARC 164MHz)
 Sun Enterprise 250 (2 x UltraSPARC-II 400MHz)
 Sun Enterprise 250 (2 x UltraSPARC-II 450MHz)
 Sun 250
 
 etc. I can get the count by:
 
 select platformmodel, count(*) from host
 where platformmodel like '%250'
 group by platformmodel;
 
 This gives me the counts for each of the above models. 
 
 Sun Enterprise 250 (2 x UltraSPARC 164MHz)4
 Sun Enterprise 250 (2 x UltraSPARC-II 400MHz) 100
 Sun Enterprise 250 (2 x UltraSPARC-II 450MHz) 3
 Sun 250   1000
 
 Since they are the same model I would rather have a single line output 
giving
 me the sum of all of the above counts. That is,
 
 Sun E250  1107
 
 Is there a quick and easy way to do this?
 
 To complicate it a little bit, how about getting the sum for all different
 platform types. The following query:
 
 select platformmodel, count(*) from host
 group by platformmodel;
 
 gives me this result:
 
 ++--+
 | platformmodel  | count(*) |
 ++--+
 | 16-slot Sun Enterprise 6000|  174 |
 | 16-slot Sun Enterprise E6500   |  728 |
 | 16-slot Ultra Enterprise 6000  |4 |
 | 4-slot Sun Enterprise 3000 |  310 |
 | 4-slot Ultra Enterprise 3000   |   17 |
 | 420R (4 X UltraSPARC-II 450MHz)|2 |
 | 5-slot Sun Enterprise E3500|  657 |
 | 8-slot Sun Enterprise 4000/5000|  659 |
 | 8-slot Sun Enterprise E4500/E5500  | 1939 |
 | 8-slot Ultra Enterprise 4000/5000  |   19 |
 
 and so on. As you can see, due to the platform type being entered
 differently, I cannot group them correctly. The preferred output
 would be:
 
 ++--+
 | platformmodel  | count(*) |
 ++--+
 | Sun Enterprise 6000|  178 |
 | 16-slot Sun Enterprise E6500   |  728 |
 | Sun Enterprise 3000|  317 |
 
 and so.
 
 Can this be done in SQL or would I have to script it?

Ajay:

You can try GROUP BY SUBSTRING(platformmodel, LOCATE(' ',platformmodel)+1))

A strategically more efficient although more labor-intensive solution would 
be to reorganize the data splitting the platformmodel column into smaller 
parts to facilitate searches.


-- 
MySQL Development Team
For technical support contracts, visit https://order.mysql.com/?ref=mspa
   __  ___ ___   __ 
  /  |/  /_ __/ __/ __ \/ /   Sasha Pachev [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Provo, Utah, USA
   ___/  

MySQL Users Conference and Expo
http://www.mysql.com/events/uc2003/

-
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




[Fwd: Re: Re: Examples needed of MYSQl/PHP update, delete scriptsand relevant]

2003-02-21 Thread Michael T. Babcock
Blah blah blah ...

 Original Message 
Received: (qmail 14594 invoked from network); 21 Feb 2003 19:30:26 -
Received: from unknown (HELO web.mysql.com) (213.136.49.183) by 
mail.fibrespeed.net with SMTP; 21 Feb 2003 19:30:26 -
Received: (from lists@localhost) by web.mysql.com (8.11.6/8.11.6) id 
h1LJVhi24085; Fri, 21 Feb 2003 20:31:43 +0100
Date: Fri, 21 Feb 2003 20:31:43 +0100
Message-Id: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
To: Michael T. Babcock [EMAIL PROTECTED]
Subject: Re: Re: Examples needed of MYSQl/PHP update, delete scripts and 
relevant



Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

sql,query,queries,smallint

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.

You have written the following:

Scott wrote:

sers can either have the option to update eg via a update button, or also
have a delete button that deletes that record.

Any ideas?
 


Several dozen, none of which bear typing in here when they're all on 
zend.com, php.com, webmonkey.com, or google.com (ok, the last one's 
cheating).

Search for php form source and see what you get :-)  Most pages that 
display results with PHP support this type of functionality.  I'll give 
you a hint; pump your primary key into the HREFs.

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock





--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
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: Deleting duplicates that aren't exactly alike

2003-02-21 Thread Keith C. Ivey
On 21 Feb 2003, at 14:23, Chris Corwin wrote:

 What I want to know is how do I find these double year records?

You can find the problem userID-dueYear combinations like this:

   SELECT userID, dueYear, COUNT(*)
   FROM dues
   GROUP BY userID, dueYear
   HAVING COUNT(*)  1;

You can eliminate them and avoid them in the future by adding a 
UNIQUE index on userID, dueYear.  You'll probably want to use ALTER  
IGNORE TABLE (see http://www.mysql.com/doc/en/ALTER_TABLE.html):

IGNORE is a MySQL extension to ANSI SQL92. It controls how ALTER
TABLE works if there are duplicates on unique keys in the new
table. If IGNORE isn't specified, the copy is aborted and rolled
back. If IGNORE is specified, then for rows with duplicates on a
unique key, only the first row is used; the others are deleted.

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

-
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: What is needed for ODBC?

2003-02-21 Thread Bryan Koschmann - GKT
Thank you!

I suppose I should have tried it first, I was just assuming there was
something more to be done. Works great!

Thanks,

Bryan

On Fri, 21 Feb 2003, KH Chiu wrote:

|All you need to do is set up a MySQL user that allow the Windows box to
|access the MySQL database.
|
|Regards,
|
|KH


-
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: decimal type

2003-02-21 Thread Bryan Koschmann - GKT
Hello,

I'm creating a table where one column will be prices. How is this type
supposed to work? I tried it, loaded the data, and it cuts it off at the
decimal when I run a query. How can I get this to store correctly?

Thanks,

Bryan



-
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: decimal type

2003-02-21 Thread 1LT John W. Holmes
 I'm creating a table where one column will be prices. How is this type
 supposed to work? I tried it, loaded the data, and it cuts it off at the
 decimal when I run a query. How can I get this to store correctly?

Use a column type such as DECIMAL.

http://www.mysql.com/doc/en/Column_types.html

---John Holmes...

-
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: InnoDB Crash [more info]

2003-02-21 Thread Heikki Tuuri
Michael,

your database is probably corrupt.

The normal procedure in this case is to use the my.cnf option

set-variable=innodb_force_recovery=4

and dump your tables and recreate the whole tablespace.

But, please do not do that yet. I will send you a new version of

/mysql/innobase/ibuf/ibuf0ibuf.c

which will print a lot of diagnostic information. I want to see what it
prints.

A general note: you are using a very old Linux kernel 2.2.14. Some
combinations of Linux + hardware seem to cause sporadic table corruption.
One user was able to resolve the problem by upgrading to a stock kernel
2.4.20.

Regards,

Heikki
Innobase Oy

sql query

- Original Message -
From: Michael T. Babcock [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Friday, February 21, 2003 9:23 PM
Subject: Re: InnoDB Crash [more info]


 Michael T. Babcock wrote:

 I've got a nice MySQL crash that happened during the night last night and
I
 can't seem to get it to come back online for me without --skip-innodb.
 
 

 Follow-up with mysql's bug report:

 MySQL support: none
 Synopsis:InnoDB Crashing on Startup
 Severity:critical
 Priority:medium
 Category:mysql
 Class:sw-bug
 Release:mysql-3.23.55 (yes)

 Environment:
 System: Linux web.fibrespeed.net 2.2.14-10.0 #21 Fri Apr 21 00:22:11 EDT
 2000 i686 unknown
 Architecture: i686

 Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
 /usr/bin/cc
 GCC: Reading specs from
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
 gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

 Compilation info: CC='gcc'  CFLAGS='-O2 -march=pentium'  CXX='gcc'
 CXXFLAGS='-O2 -march=pentium'  LDFLAGS='-static'

 LIBC:
 lrwxrwxrwx1 root root   13 Apr 10  2000 /lib/libc.so.6
 - libc-2.1.3.so
 -rwxr-xr-x1 root root  4101836 Jan 15  2001 /lib/libc-2.1.3.so
 -rw-r--r--1 root root 20273324 Jan 15  2001 /usr/lib/libc.a
 -rw-r--r--1 root root  178 Jan 15  2001 /usr/lib/libc.so
 lrwxrwxrwx1 root root   10 Jul 20  2001
 /usr/lib/libc-client.a - c-client.a

 Configure command: ./configure '--sysconfdir=/etc' '--prefix=/usr'
 '--localstatedir=/var/mysql' '--enable-assembler' '--with-berkeley-db'
 '--with-innodb' '--with-comment' '--enable-thread-safe-client' 'CC=gcc'
 'CFLAGS=-O2 -march=pentium' 'CXXFLAGS=-O2 -march=pentium' 'CXX=gcc'
 'LDFLAGS=-static'

 --
 Michael T. Babcock
 C.T.O., FibreSpeed Ltd.
 http://www.fibrespeed.net/~mbabcock



 -
 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: InnoDB Crash [more info]

2003-02-21 Thread Heikki Tuuri
Michael,

how do I send you email? A 'Spamcop' seems to block email to you.

Regards,

Heikki

- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: Michael T. Babcock [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 10:33 PM
Subject: Re: InnoDB Crash [more info]


 Michael,

 your database is probably corrupt.

 The normal procedure in this case is to use the my.cnf option

 set-variable=innodb_force_recovery=4

 and dump your tables and recreate the whole tablespace.

 But, please do not do that yet. I will send you a new version of

 /mysql/innobase/ibuf/ibuf0ibuf.c

 which will print a lot of diagnostic information. I want to see what it
 prints.

 A general note: you are using a very old Linux kernel 2.2.14. Some
 combinations of Linux + hardware seem to cause sporadic table corruption.
 One user was able to resolve the problem by upgrading to a stock kernel
 2.4.20.

 Regards,

 Heikki
 Innobase Oy

 sql query

 - Original Message -
 From: Michael T. Babcock [EMAIL PROTECTED]
 Newsgroups: mailing.database.mysql
 Sent: Friday, February 21, 2003 9:23 PM
 Subject: Re: InnoDB Crash [more info]


  Michael T. Babcock wrote:
 
  I've got a nice MySQL crash that happened during the night last night
and
 I
  can't seem to get it to come back online for me without --skip-innodb.
  
  
 
  Follow-up with mysql's bug report:
 
  MySQL support: none
  Synopsis:InnoDB Crashing on Startup
  Severity:critical
  Priority:medium
  Category:mysql
  Class:sw-bug
  Release:mysql-3.23.55 (yes)
 
  Environment:
  System: Linux web.fibrespeed.net 2.2.14-10.0 #21 Fri Apr 21 00:22:11 EDT
  2000 i686 unknown
  Architecture: i686
 
  Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
  /usr/bin/cc
  GCC: Reading specs from
  /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
  gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
 
  Compilation info: CC='gcc'  CFLAGS='-O2 -march=pentium'  CXX='gcc'
  CXXFLAGS='-O2 -march=pentium'  LDFLAGS='-static'
 
  LIBC:
  lrwxrwxrwx1 root root   13 Apr 10  2000 /lib/libc.so.6
  - libc-2.1.3.so
  -rwxr-xr-x1 root root  4101836 Jan 15  2001
/lib/libc-2.1.3.so
  -rw-r--r--1 root root 20273324 Jan 15  2001 /usr/lib/libc.a
  -rw-r--r--1 root root  178 Jan 15  2001 /usr/lib/libc.so
  lrwxrwxrwx1 root root   10 Jul 20  2001
  /usr/lib/libc-client.a - c-client.a
 
  Configure command: ./configure '--sysconfdir=/etc' '--prefix=/usr'
  '--localstatedir=/var/mysql' '--enable-assembler' '--with-berkeley-db'
  '--with-innodb' '--with-comment' '--enable-thread-safe-client' 'CC=gcc'
  'CFLAGS=-O2 -march=pentium' 'CXXFLAGS=-O2 -march=pentium' 'CXX=gcc'
  'LDFLAGS=-static'
 
  --
  Michael T. Babcock
  C.T.O., FibreSpeed Ltd.
  http://www.fibrespeed.net/~mbabcock
 
 
 
  -
  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 connectivity to Borland Paradox

2003-02-21 Thread dh
Hello Group:

Please tell me, will MySQL work with a Paradox 9 client?

Regards,

David Hofer


-
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: decimal type

2003-02-21 Thread gerald_clark
Show us.
We have no idea how you defined your tables,
loaded your data, or structured your query.

Bryan Koschmann - GKT wrote:


Hello,

I'm creating a table where one column will be prices. How is this type
supposed to work? I tried it, loaded the data, and it cuts it off at the
decimal when I run a query. How can I get this to store correctly?

Thanks,

	Bryan



-
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: decimal type

2003-02-21 Thread Bryan Koschmann - GKT
My Apologies,

table name is pricelist with 2 colums:
create table pricelist (product varchar(45), cost dec);


then

load data infile /home/omni/OmniPrice.csv into table pricelist fields terminated by 
',';

the datafile looks like this

Jaton Modem,15.5
Teac Floppy,7.5
Celeron 1.7,54.5
Logitech KB,11


but a query returns this:

mysql select * from pricelist;
+-+--+
| product | cost |
+-+--+
| Jaton Modem |   15 |
| Teac Floppy |7 |
| Celeron 1.7 |   54 |
| Logitech KB |   11 |
+-+--+
4 rows in set (0.00 sec)


I read the docs on the decimal type, but I dont quite understand it.

Thanks,

Bryan


On Fri, 21 Feb 2003, gerald_clark wrote:

|Show us.
|We have no idea how you defined your tables,
|loaded your data, or structured your query.
|
|Bryan Koschmann - GKT wrote:
|




-
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: decimal type

2003-02-21 Thread gerald_clark
Well, according to the manual decimal type is defined as
DECIMAL(M,D).
M is the  width not counting sign and decimals, and D is
the number of decimal positions.
D defaults to zero, and M to 10.
try:
cost DECIMAL(10,2)
or whatever width you need.
Bryan Koschmann - GKT wrote:

My Apologies,

table name is pricelist with 2 colums:
create table pricelist (product varchar(45), cost dec);
then

load data infile /home/omni/OmniPrice.csv into table pricelist fields terminated by ',';

the datafile looks like this

Jaton Modem,15.5
Teac Floppy,7.5
Celeron 1.7,54.5
Logitech KB,11
but a query returns this:

mysql select * from pricelist;
+-+--+
| product | cost |
+-+--+
| Jaton Modem |   15 |
| Teac Floppy |7 |
| Celeron 1.7 |   54 |
| Logitech KB |   11 |
+-+--+
4 rows in set (0.00 sec)
I read the docs on the decimal type, but I dont quite understand it.

Thanks,

	Bryan

On Fri, 21 Feb 2003, gerald_clark wrote:

|Show us.
|We have no idea how you defined your tables,
|loaded your data, or structured your query.
|
|Bryan Koschmann - GKT wrote:
|


-
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: decimal type

2003-02-21 Thread Tore Bostrup
When you don't specify the precision for a DECIMAL column, it is assumed to
be 0.  This is documented in the previously posted link.

create table pricelist (product varchar(45), cost dec(18, 2))

HTH,
Tore.

- Original Message -
From: Bryan Koschmann - GKT [EMAIL PROTECTED]
To: gerald_clark [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 4:00 PM
Subject: Re: decimal type


 My Apologies,

 table name is pricelist with 2 colums:
 create table pricelist (product varchar(45), cost dec);


 then

 load data infile /home/omni/OmniPrice.csv into table pricelist fields
terminated by ',';

 the datafile looks like this

 Jaton Modem,15.5
 Teac Floppy,7.5
 Celeron 1.7,54.5
 Logitech KB,11


 but a query returns this:

 mysql select * from pricelist;
 +-+--+
 | product | cost |
 +-+--+
 | Jaton Modem |   15 |
 | Teac Floppy |7 |
 | Celeron 1.7 |   54 |
 | Logitech KB |   11 |
 +-+--+
 4 rows in set (0.00 sec)


 I read the docs on the decimal type, but I dont quite understand it.

 Thanks,

 Bryan


 On Fri, 21 Feb 2003, gerald_clark wrote:

 |Show us.
 |We have no idea how you defined your tables,
 |loaded your data, or structured your query.
 |
 |Bryan Koschmann - GKT wrote:
 |




 -
 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: InnoDB Crash [more info]

2003-02-21 Thread Heikki Tuuri
Michael,

since the 'Spamcop':


  Recipient: [EMAIL PROTECTED]
  Reason:Blocked - see http://spamcop.net/bl.shtml?194.251.242.203


has blocked email to you, I post the patch here. This patch makes InnoDB to
print a lot of diagnostic info if it notices the failure you have. It also
tries to recover from the failure by discarding possible insert buffer
records for that page.

Best regards,

Heikki
Innobase Oy
sql query

--- 1.11/innobase/ibuf/ibuf0ibuf.c Mon Jul  8 19:27:47 2002
+++ 1.12/innobase/ibuf/ibuf0ibuf.c Fri Feb 21 23:11:10 2003
 -2483,7 +2483,9 
  ulint old_bits;
  ulint new_bits;
  dulint max_trx_id;
+ ibool corruption_noticed = FALSE;
  mtr_t mtr;
+ char err_buf[500];

  if (srv_force_recovery = SRV_FORCE_NO_IBUF_MERGE) {

 -2535,7 +2537,38 
  block = buf_block_align(page);
  rw_lock_x_lock_move_ownership((block-lock));

- ut_a(fil_page_get_type(page) == FIL_PAGE_INDEX);
+ if (fil_page_get_type(page) != FIL_PAGE_INDEX) {
+
+ corruption_noticed = TRUE;
+
+ ut_print_timestamp(stderr);
+
+ mtr_start(mtr);
+
+ fprintf(stderr,
+  InnoDB: Dump of the ibuf bitmap page:\n);
+
+ bitmap_page = ibuf_bitmap_get_map_page(space, page_no,
+ mtr);
+ buf_page_print(bitmap_page);
+
+ mtr_commit(mtr);
+
+ fprintf(stderr, \nInnoDB: Dump of the page:\n);
+
+ buf_page_print(page);
+
+ fprintf(stderr,
+InnoDB: Error: corruption in the tablespace. Bitmap shows insert\n
+InnoDB: buffer records to page n:o %lu though the page\n
+InnoDB: type is %lu, which is not an index page!\n
+InnoDB: We try to resolve the problem by skipping the insert buffer\n
+InnoDB: merge for this page. Please run CHECK TABLE on your tables\n
+InnoDB: to determine if they are corrupt after this.\n\n
+InnoDB: Please make a detailed bug report and send it to\n
+InnoDB: [EMAIL PROTECTED],
+ page_no, fil_page_get_type(page));
+ }
  }

  n_inserts = 0;
 -2578,8 +2611,14 

  goto reset_bit;
  }
+
+ if (corruption_noticed) {
+ rec_sprintf(err_buf, 450, ibuf_rec);
+
+ fprintf(stderr,
+InnoDB: Discarding record\n %s\n from the insert buffer!\n\n, err_buf);

-if (page) {
+} else if (page) {
  /* Now we have at pcur a record which should be
  inserted to the index page; NOTE that the call below
  copies pointers to fields in ibuf_rec, and we must

- Original Message -
From: Heikki Tuuri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 10:35 PM
Subject: Re: InnoDB Crash [more info]


 Michael,

 how do I send you email? A 'Spamcop' seems to block email to you.

 Regards,

 Heikki

 - Original Message -
 From: Heikki Tuuri [EMAIL PROTECTED]
 To: Michael T. Babcock [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 10:33 PM
 Subject: Re: InnoDB Crash [more info]


  Michael,
 
  your database is probably corrupt.
 
  The normal procedure in this case is to use the my.cnf option
 
  set-variable=innodb_force_recovery=4
 
  and dump your tables and recreate the whole tablespace.
 
  But, please do not do that yet. I will send you a new version of
 
  /mysql/innobase/ibuf/ibuf0ibuf.c
 
  which will print a lot of diagnostic information. I want to see what it
  prints.
 
  A general note: you are using a very old Linux kernel 2.2.14. Some
  combinations of Linux + hardware seem to cause sporadic table
corruption.
  One user was able to resolve the problem by upgrading to a stock kernel
  2.4.20.
 
  Regards,
 
  Heikki
  Innobase Oy
 
  sql query
 
  - Original Message -
  From: Michael T. Babcock [EMAIL PROTECTED]
  Newsgroups: mailing.database.mysql
  Sent: Friday, February 21, 2003 9:23 PM
  Subject: Re: InnoDB Crash [more info]
 
 
   Michael T. Babcock wrote:
  
   I've got a nice MySQL crash that happened during the night last night
 and
  I
   can't seem to get it to come back online for me
without --skip-innodb.
   
   
  
   Follow-up with mysql's bug report:
  
   MySQL support: none
   Synopsis:InnoDB Crashing on Startup
   Severity:critical
   Priority:medium
   Category:mysql
   Class:sw-bug
   Release:mysql-3.23.55 (yes)
  
   Environment:
   System: Linux web.fibrespeed.net 2.2.14-10.0 #21 Fri Apr 21 00:22:11
EDT
   2000 i686 unknown
   Architecture: i686
  
   Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
   /usr/bin/cc
   GCC: Reading specs from
   /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
   gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
  
   Compilation info: CC='gcc'  CFLAGS='-O2 -march=pentium'  CXX='gcc'
   CXXFLAGS='-O2 -march=pentium'  LDFLAGS='-static'
  
   LIBC:
   lrwxrwxrwx1 root root   13 Apr 10  2000 /lib/libc.so.6
   - libc-2.1.3.so
   -rwxr-xr-x1 root root  4101836 Jan 15  2001
 /lib/libc-2.1.3.so
   -rw-r--r--1 root root 20273324 Jan 15  2001
/usr/lib/libc.a
   -rw-r--r--1 root root  178 Jan 15  2001
/usr/lib/libc.so
   lrwxrwxrwx1 root root   10 Jul 20  2001
   

RE: From Win2000/IIS to Linux/Apache ?

2003-02-21 Thread Stitchin'
I just finished installing Apache, php and mySql on my Windows XP machine at
home and everything seems to be running just fine!

Renee Toth
Stitchin' Up A Storm
www.stitchinupastorm.com

-Original Message-
From: Theisen, Gary [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003 12:59 PM
To: '[EMAIL PROTECTED]'
Subject: From Win2000/IIS to Linux/Apache ?


Hi all,

I have PHP  MySQL installed on a Win2000/IIS system.  I may be moving (due
to requirements at work) to a Linux/Apache system in the near future.

I'm wondering if it's a hassle, or even possible, to move the MySQL database
from the windows/IIS box to the Linux/Apache box?  Any corruption, or other
problems associated with this type of move?

Thanks!

P.S. I also have the option of leaving Win2000 in place but switching to
Apache service.  Would this be worth it?  In other words, would that setup
be a better web server environment (for PHP  MySQL) than the Win2000/IIS
setup?




-
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



Loading data

2003-02-21 Thread Mamatha Balasubramanian
When I try to use
mysqlimport DatabaseName tablename.txt
from command line, it doesn't work. However, if I use the following command 
from mysql prompt

mysqlload data local infile /home//tablename.txt into table 
tablename.txt

it works. Can anyone tell me how I can load data from the command line?

Thank you.



_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

-
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: decimal type

2003-02-21 Thread Stitchin'
Why couldn't you use float(10,2) ... just an example ... where the first
number in the parentheses is the total characters for the number and the
second number represents how many of those are right of the decimal point?)

I'm a TOTAL newbie to this stuff, I just set up my first mySql database
today ... so I hope I'm not too far off base.

Renee
Stitchin' Up A Storm

-Original Message-
From: Bryan Koschmann - GKT [mailto:[EMAIL PROTECTED]
Sent: Friday, February 21, 2003 4:01 PM
To: gerald_clark
Cc: [EMAIL PROTECTED]
Subject: Re: decimal type


My Apologies,

table name is pricelist with 2 colums:
create table pricelist (product varchar(45), cost dec);


then

load data infile /home/omni/OmniPrice.csv into table pricelist fields
terminated by ',';

the datafile looks like this

Jaton Modem,15.5
Teac Floppy,7.5
Celeron 1.7,54.5
Logitech KB,11


but a query returns this:

mysql select * from pricelist;
+-+--+
| product | cost |
+-+--+
| Jaton Modem |   15 |
| Teac Floppy |7 |
| Celeron 1.7 |   54 |
| Logitech KB |   11 |
+-+--+
4 rows in set (0.00 sec)


I read the docs on the decimal type, but I dont quite understand it.

Thanks,

Bryan


On Fri, 21 Feb 2003, gerald_clark wrote:

|Show us.
|We have no idea how you defined your tables,
|loaded your data, or structured your query.
|
|Bryan Koschmann - GKT wrote:
|




-
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



create fails with on delete set null

2003-02-21 Thread Ross Davis
Simply said this works:
drop table if exists detail;
create table detail
(
detail_id int not null auto_increment
,  master_id int not null
,  name varchar(50) not null
,  primary key (detail_id)
,  index master_idx(master_id)
,  foreign key (master_id) references master (master_id) on delete cascade 
on update cascade
)
type=InnoDB; 

This doesn't:
drop table if exists detail;
create table detail
(
detail_id int not null auto_increment
,  master_id int not null
,  name varchar(50) not null
,  primary key (detail_id)
,  index master_idx(master_id)
,  foreign key (master_id) references master (master_id) on delete set null 
on update cascade
)
type=InnoDB; 

mysql 4.0.10 on Windows XP Pro 

Anyone else have this problem?  Is it a bug? 

Ross

-
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


Can't load data using mysqlimport

2003-02-21 Thread Mamatha Balasubramanian
When I tried loading data using the following command from command line:
mysqlimport DatabaseName tablename.txt
I got the following error:
mysqlimport: error : can't get stat of /home/./tablename.txt
However, when I used the following command from mysql prompt, I was able to 
load the data without any problem.

mysqlload data local infile /home//tablename.txt into table 
tablename.txt

I use MySQL 4.0.7 on Red Hat Linux.

Can anyone tell me why I have the above problem with mysqlimport and how I 
can fix it?

Thanks.



_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

-
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: decimal type

2003-02-21 Thread Tore
Floating point should not be used for money or for representing any other
discrete numeric values.  You will get in trouble because the floating point
value can deviate from the discrete value it is intended to represent.
Floating point introduces (small) rounding errors.

Say an account has a balance of $265.50 and the user wants to withdraw the
entire amount, if your code checks that the withdrawal amount is less or
equal to the balance, it MAY not allow the withdrawal.  Depending on how the
original value was established, you could see something like:

In the table AccountBalances

AccountID = 999
Balance = 265.49967(value for illustration purposes only)

Application screen shows two decimals:
Balance = $265.50

Customer withdrawal amount: $265.50

Query (or application logic with floating point values) that includes a
balance check:

UPDATE AccountBalances
SET Balance = Balance - 265.50
WHERE AccountID = 999
AND Balance = 265.50

This will affect 0 rows, which your code is smart enough to determine
meaning insufficient funds.

So, the moral of this story is to use fixed precision numerical values to
store information such as money... :-

HTH,
Tore.


- Original Message -
From: Stitchin' [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 5:00 PM
Subject: RE: decimal type


 Why couldn't you use float(10,2) ... just an example ... where the first
 number in the parentheses is the total characters for the number and the
 second number represents how many of those are right of the decimal
point?)

 I'm a TOTAL newbie to this stuff, I just set up my first mySql database
 today ... so I hope I'm not too far off base.

 Renee
 Stitchin' Up A Storm

 -Original Message-
 From: Bryan Koschmann - GKT [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 4:01 PM
 To: gerald_clark
 Cc: [EMAIL PROTECTED]
 Subject: Re: decimal type


 My Apologies,

 table name is pricelist with 2 colums:
 create table pricelist (product varchar(45), cost dec);


 then

 load data infile /home/omni/OmniPrice.csv into table pricelist fields
 terminated by ',';

 the datafile looks like this

 Jaton Modem,15.5
 Teac Floppy,7.5
 Celeron 1.7,54.5
 Logitech KB,11


 but a query returns this:

 mysql select * from pricelist;
 +-+--+
 | product | cost |
 +-+--+
 | Jaton Modem |   15 |
 | Teac Floppy |7 |
 | Celeron 1.7 |   54 |
 | Logitech KB |   11 |
 +-+--+
 4 rows in set (0.00 sec)


 I read the docs on the decimal type, but I dont quite understand it.

 Thanks,

 Bryan


 On Fri, 21 Feb 2003, gerald_clark wrote:

 |Show us.
 |We have no idea how you defined your tables,
 |loaded your data, or structured your query.
 |
 |Bryan Koschmann - GKT wrote:
 |




 -
 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



Re: create fails with on delete set null

2003-02-21 Thread Heikki Tuuri
Ross,

- Original Message -
From: Ross Davis [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Saturday, February 22, 2003 12:14 AM
Subject: create fails with on delete set null



 Simply said this works:
 drop table if exists detail;
 create table detail
 (
  detail_id int not null auto_increment
 ,  master_id int not null
 ,  name varchar(50) not null
 ,  primary key (detail_id)
 ,  index master_idx(master_id)
 ,  foreign key (master_id) references master (master_id) on delete cascade
 on update cascade
 )
 type=InnoDB;

 This doesn't:
 drop table if exists detail;
 create table detail
 (
  detail_id int not null auto_increment
 ,  master_id int not null
 ,  name varchar(50) not null
 ,  primary key (detail_id)
 ,  index master_idx(master_id)
 ,  foreign key (master_id) references master (master_id) on delete set
null
 on update cascade
 )
 type=InnoDB;

 mysql 4.0.10 on Windows XP Pro

 Anyone else have this problem?  Is it a bug?

you have defined master_id as not null, but want it to be set null on the
delete of the parent row. That is why InnoDB gives an error.

 Ross

Regards,

Heikki
Innobase Oy
sql query




-
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: create fails with on delete set null

2003-02-21 Thread Paul DuBois
At 22:07 + 2/21/03, Ross Davis wrote:
Simply said this works:
drop table if exists detail;
create table detail
(
detail_id int not null auto_increment
,  master_id int not null
,  name varchar(50) not null
,  primary key (detail_id)
,  index master_idx(master_id)
,  foreign key (master_id) references master (master_id) on delete 
cascade on update cascade
)
type=InnoDB;
This doesn't:
drop table if exists detail;
create table detail
(
detail_id int not null auto_increment
,  master_id int not null
,  name varchar(50) not null
,  primary key (detail_id)
,  index master_idx(master_id)
,  foreign key (master_id) references master (master_id) on delete 
set null on update cascade
)
type=InnoDB;
mysql 4.0.10 on Windows XP Pro
Anyone else have this problem?  Is it a bug?
It's a bug on your part. :-)

You've defined master_id as NOT NULL.  How to you expect it to be
set to NULL when you delete a parent table record?
Ross


-
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: SET FOREIGN_KEY_CHECKS = 0 Suggestion.

2003-02-21 Thread Heikki Tuuri
Jungsu, Jeremy,

it can be considered as a bug that MySQL/InnoDB does not replicate the
setting

SET FOREIGN_KEY_CHECKS=0

I am working on fixing this bug in 4.0.x.

Regards,

Heikki
Innobase Oy
sql query

- Original Message -
From: Jeremy Tinley [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Friday, February 21, 2003 6:01 PM
Subject: RE: SET FOREIGN_KEY_CHECKS = 0 Suggestion.


 Changing one local variable, IMO, shouldn't replicate.

 I would much rather have a REPLICATE command that I could place before =
 any SQL
 command that causes it to replicate.  This keeps local variables local, =
 but in
 the event I need to replicate a change to all my slaves without going to =
 each
 one, I can.

 -J

 -Original Message-
 From: wertyu [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 3:15 AM
 To: [EMAIL PROTECTED]
 Subject: SET FOREIGN_KEY_CHECKS =3D 0 Suggestion.

 Hello, everyone.

 I'm using MySQL replication(Version 4.0.10)

 Master and slave have FOREIGN KEY constration.
 and I  back up data with mysqldump.
 but mysqldump does not produce table and record invalid order for FK.

 So,when I restore data,  I execute SET FOREIGN_KEY_CHECKS =3D 0; on =
 master.

 But, this command does not forwarded to Slave.
 so, slave fails to insert record.

 So my suggestion is SET FOREIGN_KEY_CHECKS =3D 0; forwarded to slave.

 What do you think of this?

 Have a nice weekend!

 ##
 Heo, Jungsu Mr.
 SimpleX Internet. http://www.simplexi.com

 Filter : sql



 -
 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/doc/ (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/doc/ (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: Can't load data using mysqlimport

2003-02-21 Thread Paul DuBois
At 22:14 + 2/21/03, Mamatha Balasubramanian wrote:
When I tried loading data using the following command from command line:
mysqlimport DatabaseName tablename.txt
I got the following error:
mysqlimport: error : can't get stat of /home/./tablename.txt
However, when I used the following command from mysql prompt, I was 
able to load the data without any problem.

mysqlload data local infile /home//tablename.txt into table 
tablename.txt

I use MySQL 4.0.7 on Red Hat Linux.

Can anyone tell me why I have the above problem with mysqlimport and 
how I can fix it?
With LOAD DATA you specified LOCAL.  With mysqlimport, you didn't specify
--local.  As a result, it's the server that's trying to read the file
on the server host.  The server may not have permission to read the
file.
Run mysqlimport with the --local option.

Thanks.


-
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: Can't load data using mysqlimport

2003-02-21 Thread Mamatha Balasubramanian
Thanks a lot for your help. It works!






From: Paul DuBois [EMAIL PROTECTED]
To: Mamatha Balasubramanian 
[EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: Re: Can't load data using mysqlimport
Date: Fri, 21 Feb 2003 16:32:31 -0600

At 22:14 + 2/21/03, Mamatha Balasubramanian wrote:
When I tried loading data using the following command from command line:
mysqlimport DatabaseName tablename.txt
I got the following error:
mysqlimport: error : can't get stat of /home/./tablename.txt
However, when I used the following command from mysql prompt, I was able 
to load the data without any problem.

mysqlload data local infile /home//tablename.txt into table 
tablename.txt

I use MySQL 4.0.7 on Red Hat Linux.

Can anyone tell me why I have the above problem with mysqlimport and how I 
can fix it?
With LOAD DATA you specified LOCAL.  With mysqlimport, you didn't specify
--local.  As a result, it's the server that's trying to read the file
on the server host.  The server may not have permission to read the
file.
Run mysqlimport with the --local option.

Thanks.


-
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


_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

-
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: decimal type

2003-02-21 Thread Tore Bostrup
You are less likely to run into the issue when there are no calculations
involved, but I wouldn't guarantee it.  If you want to be on the safe side
when using floating pont, do not check for EQUAL to, but within a range (+/-
some small delta).  As a rule of thumb, avoid floating point except for
situations where you really need to represent very small fractions or
extremely large numbers with less than 100% accuracy, or for real number
math application (engineering, science).

Regards,
Tore.

- Original Message -
From: Stitchin' [EMAIL PROTECTED]
To: Tore [EMAIL PROTECTED]
Sent: Friday, February 21, 2003 5:35 PM
Subject: RE: decimal type


 OH THANK YOU SO MUCH for that info!!! My first little database I created
 today in mySql, I used that floating stuff on two columns, but they are
only
 to hold the height and width of my embroidery designs ... so I want to be
 able to enter 3.25 (as in inches) and 10.12 etc... I'm not planning on
 calculating with the fields, they're really just there for people to view
 and search on   if their embroidery machine can't do a design bigger
 than 4 x 4 they can search and make sure those width and height columns
 don't exceed 4.

 So is my usage of float ok?

 Renee :)

 -Original Message-
 From: Tore [mailto:[EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 5:29 PM
 To: mysql
 Subject: Re: decimal type


 Floating point should not be used for money or for representing any other
 discrete numeric values.  You will get in trouble because the floating
point
 value can deviate from the discrete value it is intended to represent.
 Floating point introduces (small) rounding errors.

 Say an account has a balance of $265.50 and the user wants to withdraw the
 entire amount, if your code checks that the withdrawal amount is less or
 equal to the balance, it MAY not allow the withdrawal.  Depending on how
the
 original value was established, you could see something like:

 In the table AccountBalances

 AccountID = 999
 Balance = 265.49967(value for illustration purposes only)

 Application screen shows two decimals:
 Balance = $265.50

 Customer withdrawal amount: $265.50

 Query (or application logic with floating point values) that includes a
 balance check:

 UPDATE AccountBalances
 SET Balance = Balance - 265.50
 WHERE AccountID = 999
 AND Balance = 265.50

 This will affect 0 rows, which your code is smart enough to determine
 meaning insufficient funds.

 So, the moral of this story is to use fixed precision numerical values to
 store information such as money... :-

 HTH,
 Tore.


 - Original Message -
 From: Stitchin' [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, February 21, 2003 5:00 PM
 Subject: RE: decimal type


  Why couldn't you use float(10,2) ... just an example ... where the first
  number in the parentheses is the total characters for the number and the
  second number represents how many of those are right of the decimal
 point?)
 
  I'm a TOTAL newbie to this stuff, I just set up my first mySql database
  today ... so I hope I'm not too far off base.
 
  Renee
  Stitchin' Up A Storm
 
  -Original Message-
  From: Bryan Koschmann - GKT [mailto:[EMAIL PROTECTED]
  Sent: Friday, February 21, 2003 4:01 PM
  To: gerald_clark
  Cc: [EMAIL PROTECTED]
  Subject: Re: decimal type
 
 
  My Apologies,
 
  table name is pricelist with 2 colums:
  create table pricelist (product varchar(45), cost dec);
 
 
  then
 
  load data infile /home/omni/OmniPrice.csv into table pricelist fields
  terminated by ',';
 
  the datafile looks like this
 
  Jaton Modem,15.5
  Teac Floppy,7.5
  Celeron 1.7,54.5
  Logitech KB,11
 
 
  but a query returns this:
 
  mysql select * from pricelist;
  +-+--+
  | product | cost |
  +-+--+
  | Jaton Modem |   15 |
  | Teac Floppy |7 |
  | Celeron 1.7 |   54 |
  | Logitech KB |   11 |
  +-+--+
  4 rows in set (0.00 sec)
 
 
  I read the docs on the decimal type, but I dont quite understand it.
 
  Thanks,
 
  Bryan
 
 
  On Fri, 21 Feb 2003, gerald_clark wrote:
 
  |Show us.
  |We have no idea how you defined your tables,
  |loaded your data, or structured your query.
  |
  |Bryan Koschmann - GKT wrote:
  |
 
 
 
 
  -
  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: 

Re: LOCK TABLES error , on a select without any update ?

2003-02-21 Thread Steff
Hi Heikki,
Thanks for picking up on this again.  After the help from 
you and Mark last week,  we removed ALL instances of the 
lock tables from our application. We used the idea Mark 
provided for getting our next sequence number without using 
any locks. In the past this was the only thing we where  using 
table locks for.
 In this application we are not even doing anything with 
begin/end transaction, we are totally dependent on each SQL 
statement standing on its own.  We do use a connection pool 
and have modified our code to always set the autocommitt 
level = 1 before handing any connections out of the pool.
Do you think  we are missing some basic setting in our 
MySql.ini file ?  
Again the thing which  makes this so hard to debug is it is 
intermittent and only in production, and  not always on the 
same table or SQL statement.  :(
 Do you know of any log files we can run which will only 
log errors or exceptions? This might limit the volume of the 
logs to something  manageable and still let us see what 
connection has the error.
 Alternatively do you know what state the MySql 
connection thinks it is in, in order for it to want to through this 
kind of error? Can we test for the state from within our code ?

Thanks again for your patience and assistance. I really want to 
be able to make MySql work for this application.
Thanks
Steff
Steff,  We have our connection set to Autocommitt=1, and 
No table locks  are ever explicitly being done on this table 
anyplace in any of our  code modules. in MySQL you have to 
do LOCK TABLES on EVERY table you use inside a LOCK 
TABLES. You cannot lock just some table and use others 
unlocked. I repeat that the error could be caused if your 
application has a bug and uses the same connection to do the 
SELECT as it has used to LOCK some other table. Are you 
absolutely sure you do not mix connections in your 
application? Did you have the general query log running at the 
time of the error? If yes, can you check from it what was the 
number of the connection that issued the query resulting in an 
error, and did that same connection earlier issue a LOCK 
TABLES? Regards, Heikki Innobase Oy sql query 

--
Steff McGonagle
Envisage Information Systems, Inc.

Phone (315) 497-9202 x16
www.EnvisageSystems.com
www.Enveritus.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



After MyISAM - InnoDB data is 2x larger?

2003-02-21 Thread Richard F. Rebel

Hello,

I just joined an organization and during a migration from an old server
running MySQL MyISAM to a new server running MySQL-Max InnoDB, the data
is now taking up over 2x the space as before.

I have never converted a large db to InnoDB, always started out with it
in the first place.  I expected on some increase, just based on the
premise of how things are different between the two formats, but I
didn't expect this much.  All of my databases take like 200gb instead of
the 100gb used b4.

Is this normal?  Is there anything I can do to mitigate this?

Thanks!

Richard F. Rebel


-
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



Problem setting variable

2003-02-21 Thread Jesse Sheidlower


I recently upgraded to 4.0.10, primarily in order to be able
to change my minimum word length on the fly. But I can't seem
to set the variable! It says it's there when I show it, but
not when I try to change it:

---
monopoly~ $ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 19 to server version: 4.0.10-gamma

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql SHOW VARIABLES LIKE 'version';
+---+--+
| Variable_name | Value|
+---+--+
| version   | 4.0.10-gamma |
+---+--+
1 row in set (0.00 sec)

mysql SHOW VARIABLES LIKE 'ft_min%';
+-+---+
| Variable_name   | Value |
+-+---+
| ft_min_word_len | 4 |
+-+---+
1 row in set (0.00 sec)

mysql SET ft_min_word_len=2;
ERROR 1193: Unknown system variable 'ft_min_word_len'
mysql 
---

Any idea what could be causing this? I did a Google search and someone
reported the same problem on a different mailing list, but with no
answer.

Thanks.

Jesse Sheidlower

-
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: Problem setting variable

2003-02-21 Thread Paul DuBois
At 20:32 -0500 2/21/03, Jesse Sheidlower wrote:
I recently upgraded to 4.0.10, primarily in order to be able
to change my minimum word length on the fly. But I can't seem
to set the variable! It says it's there when I show it, but
not when I try to change it:
---
monopoly~ $ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 19 to server version: 4.0.10-gamma
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql SHOW VARIABLES LIKE 'version';
+---+--+
| Variable_name | Value|
+---+--+
| version   | 4.0.10-gamma |
+---+--+
1 row in set (0.00 sec)
mysql SHOW VARIABLES LIKE 'ft_min%';
+-+---+
| Variable_name   | Value |
+-+---+
| ft_min_word_len | 4 |
+-+---+
1 row in set (0.00 sec)
mysql SET ft_min_word_len=2;
ERROR 1193: Unknown system variable 'ft_min_word_len'
mysql
It's not one of the variables that can be set dynamically. You have
to set it at server startup time.
That's why there's no (global) after it on p. 922. :-)

This makes perfect sense.  Remember, anytime you change this
variable, you have to rebuild all your FULLTEXT indexes.  If you
could set the variable on the fly, you'd introduce the potential
for having to rebuild your indexes all the time.
---

Any idea what could be causing this? I did a Google search and someone
reported the same problem on a different mailing list, but with no
answer.
Thanks.

Jesse Sheidlower


-
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