Re: is CREATE VIEW possible in MySQL?

2003-06-18 Thread Becoming Digital
 You have to implement the view functionailty in code. Or maybe someone 
 else has a better suggestion :)

There are PHP classes that create views.  Check the Repository for them.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message - 
From: Oh Chye Yong [EMAIL PROTECTED]
To: Lingua2001 [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, 18 June, 2003 01:20
Subject: Re: is CREATE VIEW possible in MySQL?


View is not supported in MySQL version 4.x. You have to wait for version 5.

You have to implement the view functionailty in code. Or maybe someone 
else has a better suggestion :)

OH Chye Yong
Software Engineer
OpenFeel Pte Ltd
Web: http://www.openfeel.com/
Email: [EMAIL PROTECTED]
Tel: (+65) 6334 5716
Fax: (+65) 6334 5718

Lingua2001 wrote:
  If not, is there a way to get the same effect in MySQL?
 
  Thanks in advance,
 
  Lingua
 




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



ETA on 4.1

2003-06-18 Thread Petre Agenbag
Hi List

Is there any way to get an estimate of the release date of the next
stable version of MySQL? The reason I'm asking; I am currently busy
configuring new webservers, but it is not crucial as to the exact time I
deploy them ( they will replace currently running servers), so if I knew
4.1 would be released in a week or 2 ( or 3 or 4 ...), I could maybe
wait for it before I deploy the new servers ( will just save me one
migration), and I'd hate to deploy the servers and have 4.1 stable
release come out the next day


Thanks



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: transactions with php

2003-06-18 Thread Don Read

On 18-Jun-2003 Becoming Digital wrote:

 ...

 if(!mysql_query($array[$i])) {
   $flag = false;
break;
 }

 after the loop I do
 if($flag)
   mysql_query(commit);
 else
   mysql_query(rollback);
 
 Be careful with that last if() statement.  I would either change the
 script to
 read '$flag = true' or 'if( isset($flag) )'
 
 It's quite possible that I'm mistaken, but I believe that 'if($flag)'
 would
 evaluate to false if '$flag = false'.
 

The constant FALSE (or false) will never evaluate as a TRUE condition.


if ($flag = true)   // this assigns TRUE to $flag and then the 
// value of $flag will be evaluated.

if (isset($flag))  // will evaluate as TRUE because $flag has a value
   // assigned. It's not NULL. 
   //  -- regardless of what the value is.

if ($flag) {
 -- or (assuming $flag is initialized) --
if ($flag === TRUE) {

  ... so either would be the correct construct here.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Apstrophee Errors

2003-06-18 Thread Weston Skeans
I am using mmysql 3.23.41 and am having querrying problems. I am using my
database to organize music. Whenever I query my database for a album with an
apostrophee in it, It returns no results this is my sintax:

select * from lyric where album like '%Blind Man\'s Zoo%';

I am trying to find songs from 10,000 Maniac's Blind Man's Zoo I have
checked the database and all the songs are listed under the album Blind
Man\'s Zoo. All other queries work fine as long as there aren't any
apostrophees. Any help?

-Weston


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Apstrophee Errors

2003-06-18 Thread George Christoforakis
use double quotes in internal quotes... so it dhould be something like:
  select * from lyric where album like '%Blind Man\''s Zoo%'

I think it'll work.

George Christoforakis.

- Original Message -
From: Weston Skeans [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 15, 2003 8:47 PM
Subject: Apstrophee Errors


 I am using mmysql 3.23.41 and am having querrying problems. I am using my
 database to organize music. Whenever I query my database for a album with
an
 apostrophee in it, It returns no results this is my sintax:

 select * from lyric where album like '%Blind Man\'s Zoo%';

 I am trying to find songs from 10,000 Maniac's Blind Man's Zoo I have
 checked the database and all the songs are listed under the album Blind
 Man\'s Zoo. All other queries work fine as long as there aren't any
 apostrophees. Any help?

 -Weston


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Apstrophee Errors

2003-06-18 Thread Becoming Digital
If you're using PHP, format the result with addslashes().  This will escape-out
any quotes in the string.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message -
From: Weston Skeans [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, 15 June, 2003 13:47
Subject: Apstrophee Errors


I am using mmysql 3.23.41 and am having querrying problems. I am using my
database to organize music. Whenever I query my database for a album with an
apostrophee in it, It returns no results this is my sintax:

select * from lyric where album like '%Blind Man\'s Zoo%';

I am trying to find songs from 10,000 Maniac's Blind Man's Zoo I have
checked the database and all the songs are listed under the album Blind
Man\'s Zoo. All other queries work fine as long as there aren't any
apostrophees. Any help?

-Weston


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: [PHP-DB] PLS Advise, Highlighted Text from a Query

2003-06-18 Thread Becoming Digital
 4- I want when echo the return $row[address] to highlight the entered
 keyword (that the user has entered in the search form) in the output with a
 different font backcolor or by just another color... to let the user see
 what he was searching for

?
$length = strlen( $keyword );
$position = strpos( $row[address], $keyword );
$row[address] = substr_replace( $row[address],
span class=\yourclass\$keyword/span,
$position,
$length );
?

You must specify 'yourclass' in a stylesheet, obviously.  While this is not
nearly as eloquent as Cristian's suggested use of regular expressions, it seems
better suited to your level of experience.  As they say, if you need to ask...

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message -
From: nabil [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, 18 June, 2003 02:44
Subject: [PHP-DB] PLS Advise, Highlighted Text from a Query


Dear all,

1- I have a form with an input text : keyword
2- the field address is in my MySQL as TEXT field.
3- I select * from db where address like '%keyword%'
4- I want when echo the return $row[address] to highlight the entered
keyword (that the user has entered in the search form) in the output with a
different font backcolor or by just another color... to let the user see
what he was searching for
5- and if it possible to echo how accurate (percentage) the return rows has
fit his search...

Please Advise how to do it...



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



about the MySql tools

2003-06-18 Thread MaFai
Hello, mysql,

Do any sql tools support MySql like Oracle (PL/SQL) Development Tools ?

Oracle (PL/SQL) Development Tools is really imporve the efficient of development,but 
it doesn't support MySql.
Do any other tools instead of it?



Best regards. 

MaFai
[EMAIL PROTECTED]
2003-06-18

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: ETA on 4.1

2003-06-18 Thread Terence
I asked the same question 2 or 3 months ago, and was told a week or two.
The guys from MySQL have to make sure the release is stable first.

- Original Message - 
From: Sebastian Bergmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 3:51 PM
Subject: Re: ETA on 4.1


Petre Agenbag wrote:
 4.1 would be released in a week or 2

  MySQL 4.1 will not be released in a week or 2. My best guess is at
  the end of this year -- at the earliest.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

 http://www.professionelle-softwareentwicklung-mit-php5.de/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



upgrading

2003-06-18 Thread MOSSANO
I want to upgrade from 3.23 to 4.0 version. Could anybody explain to me
how to proceed??

Thank you very much



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: upgrading

2003-06-18 Thread Jerry
High priority message ? 

Then you should read the manual.

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

- Original Message - 
From: MOSSANO [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 9:43 AM
Subject: upgrading


 I want to upgrade from 3.23 to 4.0 version. Could anybody explain to me
 how to proceed??
 
 Thank you very much
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: ETA on 4.1

2003-06-18 Thread Sebastian Bergmann
Terence wrote:
 I asked the same question 2 or 3 months ago, and was told a week or
 two.

  You're probably mistaking the (already happened) release of MySQL 4.1.0
  with a general availability release of MySQL 4.1.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

 http://www.professionelle-softwareentwicklung-mit-php5.de/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Long turn-around time.... and double sending

2003-06-18 Thread Primaria Falticeni
Yes, in the last day the messages came twice and earlier.
Iulian

- Original Message -
From: Jeremy Zawodny [EMAIL PROTECTED]
To: Jay Blanchard [EMAIL PROTECTED]
Cc: MySQL LIST [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:38 AM
Subject: Re: Long turn-around time


 On Tue, Jun 17, 2003 at 03:08:37PM -0500, Jay Blanchard wrote:
  Is anyone else seeing a long turn-around time with their messages going
  to the MySQL list or do I need to check my local mail server (which has
  experienced some hiccups the past couple of days)?

 It doesn't seem to have been that bad recently.  But maybe this post
 will prove me wrong.
 --
 Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
 [EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

 MySQL 4.0.13: up 14 days, processed 469,979,927 queries (371/sec. avg)

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: RAID hardware suggestions/experience

2003-06-18 Thread Alec . Cawley




 RE: SCSI needed for best performance -
 While this is true in some cases, if you are using striping or any
 RAID level (RAID 5 for example) that splits reads and writes across
 drives, then there will be several IDE channels feeding data to the
 RAID card at a time. Two ATA100 IDE channels will accept and provide
 data faster than the PCI bus that the card is plugged into can. The
 result is that you can use cheap IDE drives and get the same
 performance as the very fastest SCSI drives.

I don't think this is generally true. For database-type applications,
even with multiple drives, throughput is usually limited by seeks
rather than data transfer rate. One of the capacity that Scsi drives
have that IDE drives don't is the ability to send multiple overlapping
transfers to the drive, which can then execute them out of order.
Firstly, it can do escalator seeking - sort into position on the disk
so as to minimise the number of end-to-end seeks. Secondly, it can trade
off short seeks against rotational latency, because it knows tha angular
position of the disk at any time. I found that the second feature alone
added about 25% to net performance.

  Alec






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



inserting unicode into 4.1.0.alpha - again a slightly absurd solution

2003-06-18 Thread Brigitte Jellinek

hi!

i had some trouble inserting utf-8 unicode into a table
in mysql 4.1.0.alpha.  i creat the table with

CREATE TABLE chartab ( 
.
) TYPE=MyISAM CHARSET=utf8;

then I tried to insert utf-8 data, using a file with sql statements:

mysql --default-character-set=utf8 test  test-insert.sql

but all i ever got was latin1 in my table. specifying
--default-character-set on the comman line didn't help,
using SET CHARACTER SET utf8 and/or SET NAMES utf8 
as the first sql-command did not help.

The only way I got it to work correctly is using the CONVERT function
for every utf8 string:

INSERT INTO chartab VALUES (... CONVERT(_utf8'blabla' USING utf8) ...);

where blabla is a utf-8 string.

if you're intrested in the details:
http://perlwelt.horus.at/Beispiele/Magic/PerlUnicodeMysql/


thanks to all the people on the lsit who helped me!

-- 
Brigitte'I never met a chocolate I didnt like'Jellinek
[EMAIL PROTECTED] http://www.horus.com/~bjelli/
http://perlwelt.horus.at http://www.perlmonks.org/index.pl?node=bjelli

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: is CREATE VIEW possible in MySQL?

2003-06-18 Thread Victoria Reznichenko
Lingua2001 [EMAIL PROTECTED] wrote:
 If not, is there a way to get the same effect in MySQL?

Nope. VIEWs currently are not supported in MySQL:
http://www.mysql.com/doc/en/ANSI_diff_Views.html


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





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Lock Tables - Manual Ambiguity

2003-06-18 Thread K.L.
Hi All,

The 3.23.54 Manual states in;

 Section 1.4.4.3 Transactions

If you only obtain a read lock (as opposed to a write lock), then reads and
inserts are still allowed to happen. The new inserted records will not be seen
by any of the clients that have a READ lock until they release their read locks


But in Section 6.7.2 Lock Tables/Unlock Tables Syntax

If a thread obtains a READ lock on a table, that thread (and all other threads)
can only read from the table. If a thread obtains a WRITE lock on a table, then
only the thread holding the lock can READ from or WRITE to the table.


What am I missing pls?  Can I, with a READ Lock, still write to the table?

Is the following assumption correct?

READ Lock - Thread/Client with Lock, can write to locked Table, and is ONLY
ONE who can until Lock released. 

Thanks in Advance

[Filter: SQL MySQL]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can't start mysql

2003-06-18 Thread Victoria Reznichenko
David Kruszewski [EMAIL PROTECTED] wrote:
 
Description:
 1: running  safe_mysqld it just stops at end of statement
 
 
 bash-2.05a# safe_mysqld
 Starting mysqld daemon with databases from /var/lib/mysql
 030618 10:09:11  mysqld ended

You can find what was wrong in the error log file (/var/lib/mysql/host_name.err).

 2:running mysql -u root
 
 bash-2.05a# mysql -u root 
 ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysql/m
 ysql.sock' (111)
 bash-2.05a# ls -l  /var/run/mysql/mysql.sock
 srwxrwxrwx1 mysqlmysql   0 Jun 18 10:09 /var/run/mysql/mysql.soc
 k

Because MySQL server is not running.


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





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Lock Tables - Manual Ambiguity

2003-06-18 Thread Egor Egorov
K.L. [EMAIL PROTECTED] wrote:
 The 3.23.54 Manual states in;
 
 Section 1.4.4.3 Transactions
 
 If you only obtain a read lock (as opposed to a write lock), then reads and
 inserts are still allowed to happen. The new inserted records will not be seen
 by any of the clients that have a READ lock until they release their read locks
 
 
 But in Section 6.7.2 Lock Tables/Unlock Tables Syntax
 
 If a thread obtains a READ lock on a table, that thread (and all other threads)
 can only read from the table. If a thread obtains a WRITE lock on a table, then
 only the thread holding the lock can READ from or WRITE to the table.
 
 
 What am I missing pls?  Can I, with a READ Lock, still write to the table?

Only thread that obtains lock on the table can write to the table.
 
 Is the following assumption correct?
 
 READ Lock - Thread/Client with Lock, can write to locked Table, and is ONLY
 ONE who can until Lock released. 

Sure.



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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Lock Tables - Manual Ambiguity

2003-06-18 Thread Primaria Falticeni
So, when client X has Read lock, the client Y cannot have Write lock, Egor?

Iulian
- Original Message -
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:33 PM
Subject: Re: Lock Tables - Manual Ambiguity


 K.L. [EMAIL PROTECTED] wrote:
  The 3.23.54 Manual states in;
 
  Section 1.4.4.3 Transactions
  
  If you only obtain a read lock (as opposed to a write lock), then reads
and
  inserts are still allowed to happen. The new inserted records will not
be seen
  by any of the clients that have a READ lock until they release their
read locks
  
 
  But in Section 6.7.2 Lock Tables/Unlock Tables Syntax
  
  If a thread obtains a READ lock on a table, that thread (and all other
threads)
  can only read from the table. If a thread obtains a WRITE lock on a
table, then
  only the thread holding the lock can READ from or WRITE to the table.
 
 
  What am I missing pls?  Can I, with a READ Lock, still write to the
table?

 Only thread that obtains lock on the table can write to the table.

  Is the following assumption correct?
 
  READ Lock - Thread/Client with Lock, can write to locked Table, and is
ONLY
  ONE who can until Lock released.

 Sure.



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




 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Apstrophee Errors

2003-06-18 Thread Shane Bryldt
Actually, I think the more appropriate fix for this problem, would be to do
what a call to mysql_escape_string does.

The problem occuring is common, the characters being used are taken
literally as part of the string, rather than as quotes what you want them
as.  MySQL's C library has the function mysql_escape_string which takes
various characters like single and double quotes, and turns them into their
binary equivilents, so they are interpreted correctly, and not as part of
the string termination.

Example:

SELECT * FROM Users WHERE Username='%s';
Where %s is Test's, without quotes, will produce an error.  The single
quote in Test's will end the string which is matching against Username,
which in effect has just botched your SQL statement.

The mysql_escape_string will turn the string Test's into something like
Test\027s which will be parsed correctly in the SQL statement itself.

Hope this helps,
-Shane

- Original Message - 
From: Becoming Digital [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 2:08 AM
Subject: Re: Apstrophee Errors


 If you're using PHP, format the result with addslashes().  This will
escape-out
 any quotes in the string.

 Edward Dudlik
 Becoming Digital
 www.becomingdigital.com


 - Original Message -
 From: Weston Skeans [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, 15 June, 2003 13:47
 Subject: Apstrophee Errors


 I am using mmysql 3.23.41 and am having querrying problems. I am using my
 database to organize music. Whenever I query my database for a album with
an
 apostrophee in it, It returns no results this is my sintax:

 select * from lyric where album like '%Blind Man\'s Zoo%';

 I am trying to find songs from 10,000 Maniac's Blind Man's Zoo I have
 checked the database and all the songs are listed under the album Blind
 Man\'s Zoo. All other queries work fine as long as there aren't any
 apostrophees. Any help?

 -Weston


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Triggers

2003-06-18 Thread Jay Blanchard
[snip]
The argument usually used by people looking for 

- triggers
- functions + procedures
- foriegn keys

is the persuit of data integrity, and encapsulating business logic
within the 
database.

Whilst this goal is noble, it can be fully achieved within the
application 
code, and not in the database. Having this functionality within the 
application has the following advantages

- database design is simpler
- database load is lower
- fewer locking problems
- testing data at application level is cleaner and more efficent than at
the 
database.

Any argument that implementing the implementing business logic ONCE at
this 
database is more efficient ignores the use of 3GL libraries.

I have worked on many projects with Oracle and MySQL, and I have always
found 
implmenting business logic within the application more efficient. This
does 
not mean triggers and procedures where not used, but complicating
business 
logic that might cause a cascade of updates, inserts and deletes from
many 
sources is always problematic.

As MySQL stands now, I would recommend running a daemon process, written
in 
Perl (or other language), that could process new data. This has the
advantage 
of being future proof, and eliminates the potential problems that
triggers 
cause due to data inserts from multiple sources.

Simple create two table sets, one for loading data, and one for
processed 
data. Have a perl daemon scan the load tables every 30s and process the
data 
accordingly.  
[/snip]

Much applause for your statements here Simon! It also makes the
applications much more portable. Well said.

Jay

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Lock Tables - Manual Ambiguity

2003-06-18 Thread Egor Egorov
Primaria Falticeni [EMAIL PROTECTED] wrote:
 So, when client X has Read lock, the client Y cannot have Write lock, Egor?

Yes, if client X obtaines read lock on the table client Y can't have write lock on 
this table until client X releases lock.

 
 Iulian
 - Original Message -
 From: Egor Egorov [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 1:33 PM
 Subject: Re: Lock Tables - Manual Ambiguity
 
 
 K.L. [EMAIL PROTECTED] wrote:
  The 3.23.54 Manual states in;
 
  Section 1.4.4.3 Transactions
  
  If you only obtain a read lock (as opposed to a write lock), then reads
 and
  inserts are still allowed to happen. The new inserted records will not
 be seen
  by any of the clients that have a READ lock until they release their
 read locks
  
 
  But in Section 6.7.2 Lock Tables/Unlock Tables Syntax
  
  If a thread obtains a READ lock on a table, that thread (and all other
 threads)
  can only read from the table. If a thread obtains a WRITE lock on a
 table, then
  only the thread holding the lock can READ from or WRITE to the table.
 
 
  What am I missing pls?  Can I, with a READ Lock, still write to the
 table?

 Only thread that obtains lock on the table can write to the table.

  Is the following assumption correct?
 
  READ Lock - Thread/Client with Lock, can write to locked Table, and is
 ONLY
  ONE who can until Lock released.

 Sure.



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




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Arithmetic Bug in 4.0.12/13-max

2003-06-18 Thread Rich Schramm
OK, I have been working on this for the last day.  I read the manual
sections that were recommended on floating point calculations and I am
still seeing some weird things.

I simply want to see if the average value of two columns named upper and
lower (both are decimal(20,8) unsigned) is within the range of two
decimal numbers I pass to the statement.

The manual says in BIG CAPITAL LETTERS that you should NOT round and the
only precise way of getting this to go is to do  use the abs(a - b) 
some tolerance, such as .1.  Having read that, I changed my code so
that as follows:

and 
(
( 
abs(upper - 0.039)  0.1 
) 
or 
( 
abs(lower - 0.037)  0.1 
) 
or 
( 
(
(upper + lower) / 2
) 
between 0.039 and 0.037
) 
)

Which I assume would find anything where the upper column is .039, the
lower column is .037 or the average between the columns is between .039
and .037.

However, all I am returned is one record where the average ((upper +
lower)/2) = 0.040 !!!  I have plenty of records where the average is
0.038.  Why is it not finding them??

Also, when my range is 0.038 - 0.038 so that the query looks like:

and 
(
( 
abs(upper - 0.038)  0.1 
) 
or 
( 
abs(lower - 0.038)  0.1 
) 
or 
( 
(
(upper + lower) / 2
) 
between 0.038 and 0.038
) 
)

It brings back ALL columns were the average is 0.038 AND it brings back
records where the average is .040 and .036.  

In short, I am seeing exactly the OPPOSITE behavior I would expect from
this.

Any help would be much appreciated!

Thanks,

Rich
-Original Message-
From: Alexander Keremidarski [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 16, 2003 5:51 PM
To: Rich Schramm
Cc: [EMAIL PROTECTED]
Subject: Re: Arithmetic Bug in 4.0.12/13-max


Hello,

Rich Schramm wrote:
 I have tried the following SQL script on 4.0.12-max-nt on Windows XP 
 and 4.0.13-max on Red Hat Linux 9.  In both cases, the 4th and 5th 
 select statements (and only those statements) return false (0).  They 
 return true in Oracle and Access:
  
 select (0.04 + 0.04)/2 = 0.040;
 select (0.041000 + 0.039000)/2 = 0.040;
 select (0.042000 + 0.038000)/2 = 0.040;
 select (0.043000 + 0.037000)/2 = 0.040;
 select (0.044000 + 0.036000)/2 = 0.040;
 select (0.045000 + 0.035000)/2 = 0.040;
 select (0.046000 + 0.034000)/2 = 0.040;
 select (0.047000 + 0.033000)/2 = 0.040;
 select (0.048000 + 0.032000)/2 = 0.040;
 select (0.049000 + 0.031000)/2 = 0.040;
 select (0.05 + 0.03)/2 = 0.040;
  
 The selects with 0.043 and 0.044 as the first number return false for 
 some unknown reason.  I discovered this in code as I am trying to 
 select records whose average of two columns equals the number I pass 
 to it.

MySQL uses floating point arithmetic in this case which as you know is
not precise.


To see what happens modify your query as:

select (0.04 + 0.04)/2 = 0.040, round((0.04 + 0.04)/2,
20); select (0.041000 + 0.039000)/2 = 0.040, round((0.041000 +
0.039000)/2, 20); ...

Possible way to do above comparison is to use ROUND() function on one or
both columns.

select (0.04 + 0.04)/2 = 0.040, round((0.04 + 0.04)/2,
3) = 0.040;

You will get trues in right column for obvious reason.

However most precise way is to do convert = to as a Range comparison
0.400+/- 
tolerance

select (0.04 + 0.04)/2 BETWEEN 0.040 - 0.01 AND 0.040 +
0.01;



This is well docummented in Manual:

A.5.6 Solving Problems with No Matching Rows

...

# If you are comparing FLOAT or DOUBLE columns with numbers that have
decimals, 
you can't use '='. This problem is common in most computer languages
because 
floating-point values are not exact values. In most cases, changing the
FLOAT to a 
DOUBLE will fix this. See section A.5.7 Problems with Floating-Point
Comparison.


Read also whole A.5.7 Problems with Floating-Point Comparison


 I have worked around this by modifying my select statement to multiply

 each number by 1000, essential making each a whole number.  When this 
 is done, it work as it should.

Yes as then MySQL uses integer arithmetics which is precise.

 Anyone have any ideas?
  
 Thanks,
  
 Richard Schramm
 Director, Strategic Technology Services
 Aerospace International Materials, Inc.


Best regards

-- 
  Are you MySQL certified? - http://www.mysql.com/certification
  For technical support contracts, visit
https://order.mysql.com/?ref=msal
 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /Mr. Alexander Keremidarski
[EMAIL PROTECTED]
   / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
  /_/  /_/\_, /___/\___\_\___/   Sofia, Bulgaria
  ___/  www.mysql.com




-- 
MySQL Bugs Mailing List
For 

join error

2003-06-18 Thread Anthony W.
Hi,

I think this is an error, anyways i'm trying to join 6 tables together.
and when i do EXPLAIN SELECT i get the message in comments

Impossible WHERE noticed after reading const tables
this is my statment basically
SELECT table1.id
FROM table1,table2,table3,table4,table5,place
WHERE
table1.col1 BETWEEN 150 AND 196 AND
table1.col2 BETWEEN 50 AND 77 AND
table1.col3 IN ( 2 ) AND
table2.col1 IN ( 3 ) AND
table2.col2 IN ( 14 ) AND
table2.col3 IN ( 3 ) AND
table3.col1 IN ( 1 ) AND
table3.col2 IN ( 1 ) AND
table3.col3 IN ( 04 ) AND
table4.col1 IN ( 3 ) AND
table4.col2 IN ( 2 ) AND
table4.col3 IN ( 1 ) AND
 table5.col1 IN ( 1 ) AND
table5.col2 IN ( 1 ) AND
table5.col3 BETWEEN 18 AND 41 AND
place.longitude BETWEEN - 100.310005083878 AND - 91.6899949161224 AND
place.latitude BETWEEN 66 AND 29.385577346152 AND
 3963 * ( acos( sin( radians( place.latitude ) ) * sin( radians(
33.00 ) ) + cos( radians( place.latitude ) ) * cos( 33.00 )
* cos( radians( - 96.00 - place.longitude ) ) ) ) = 250 AND
table1.id = table2.id AND table2.id = table3.id AND table3.id = table4.id
AND table4.id = table5.id AND table5.id = place.id

Any help is appreciated.
Anthony



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: I wonder why nobody answered me

2003-06-18 Thread Michael T. Babcock
Primaria Falticeni wrote:

Why nobody answered me?
I posted two questions on this list.
 

When did the website claim that all questions would be answered on the 
list?  More importantly, as someone else has already pointed out, please 
consider paying for support if you really want guaranteed service, just 
like anywhere else.

This list is a convenient place to discuss or ask questions about 
probably 98% of situations.  That last 2% probably requires support.

Please note, as always that 72.83% of all statistics are made up on the 
spot.

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


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: mysqlbug

2003-06-18 Thread gerald_clark


Joanne Yow [bizfront] wrote:

Hi,

I am trying to install MySQL 3.23 to Solaris 2.8.
After the step - scripts/mysql_install_db
I try the command - chown -R root, error show usage: chown [-fhR] owner[:group] 
file...
You entered the command incorrectly.
You gave it no files or directories to change.
Why would you change the ownership to root?
and the command - chrgrp -R mysql, error show chgrp [-fhR] group file...
Do i need to groupadd for the root?
 

Same problems here.

What problems will cause by this?

Thanks in advance.

Regards,
Joe
 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: join error

2003-06-18 Thread Anthony W.
Hi,

I saw the error. 
For interested it is in the place.latitude BETWEEN  section

Anthony



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Export xml, import into filemakerpro 6.0

2003-06-18 Thread Zac Korpi
I'm new to mysql.  Currently I am using php myadmin to manage my database.  I'd like 
to be able to export mysql database as xml and, in turn, import the xml into a 
filemaker pro 6.0 database.  If someone else has worked on something similar, any 
advice would be very appreciated.


Thanks!
-Zac Korpi

insert hang problem on Solaris 8

2003-06-18 Thread Randy Locklair
Hey there everyone.

I'm having a problem on a MySQL installation (vsn 4.0.12-standard) on
Solaris 8.  I've got a few tables that get inserted into maybe 1000-1500
times a day.  It seems to be pretty random, but I've seen three or four
times that the database just hangs on the insert.  

SHOW PROCESSLIST shows this for the offending process:

| 77 | cpms | localhost | cpms | Query   | 8076 | update | INSERT INTO
cpms_orders (order_id, add_timestamp) VALUES ('20030618-3', now()) |

I've still got it running, if anyone has any suggestions for a way to
get more debug data.  The mysql software was built with gcc 3.2.2,
again, on solaris 8.  If anyone's got any suggestions let me know! 
Thanks!  Unfortunately I'm gonna have to restart this sooner than later.
:/

-Randy



Swiss American Securities Inc. MMS sasiny.com made the following
 annotations on 06/18/03 10:04:42
--

[ALERT] -- Access Manager:
DISCLAIMER:  This e-mail contains proprietary and confidential information some or all 
of which may be legally privileged. It is intended only for the stated addressee(s) 
and access to it by any other person authorized.  If you are not the intended 
recipient and an addressing or transmission error has misdirected this e-mail, please 
notify the author IMMEDIATELY, by replying to this e-mail, then delete this message 
and all copies from all locations in your system. You should not use, disseminate, 
disclose, distribute, copy, print, or rely on this e-mail: to do so may be unlawful. 
Swiss American Securities Inc. (SASI) and its affiliates reserve the right to 
monitor all e-mail communications through their networks.

***Please note that this message may contain preliminary information regarding 
transactions that have been executed for your account and are subject to final 
confirmation.

==


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Triggers

2003-06-18 Thread Kerry Colligan
Thanks to all. Simon's response outlines the direction I will be headed.
KC

[snip]
The argument usually used by people looking for 

- triggers
- functions + procedures
- foriegn keys

is the persuit of data integrity, and encapsulating business logic
within the 
database.

Whilst this goal is noble, it can be fully achieved within the
application 
code, and not in the database. Having this functionality within the 
application has the following advantages

- database design is simpler
- database load is lower
- fewer locking problems
- testing data at application level is cleaner and more efficent than at
the 
database.

Any argument that implementing the implementing business logic ONCE at
this 
database is more efficient ignores the use of 3GL libraries.

I have worked on many projects with Oracle and MySQL, and I have always
found 
implmenting business logic within the application more efficient. This
does 
not mean triggers and procedures where not used, but complicating
business 
logic that might cause a cascade of updates, inserts and deletes from
many 
sources is always problematic.

As MySQL stands now, I would recommend running a daemon process, written
in 
Perl (or other language), that could process new data. This has the
advantage 
of being future proof, and eliminates the potential problems that
triggers 
cause due to data inserts from multiple sources.

Simple create two table sets, one for loading data, and one for
processed 
data. Have a perl daemon scan the load tables every 30s and process the
data 
accordingly.  
[/snip]

Much applause for your statements here Simon! It also makes the
applications much more portable. Well said.

Jay

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: I wonder why nobody answered me

2003-06-18 Thread Becoming Digital
 Please note, as always that 72.83% of all statistics are made up on the 
 spot.

As someone (who, specifically, is oft-disputed) once said:
There are three kinds of lies: lies, damn lies, and statistics.

Edward Dudlik
Becoming Digital
www.becomingdigital.com


- Original Message - 
From: Michael T. Babcock [EMAIL PROTECTED]
To: Primaria Falticeni [EMAIL PROTECTED]
Cc: MySQL LIST [EMAIL PROTECTED]
Sent: Wednesday, 18 June, 2003 09:22
Subject: Re: I wonder why nobody answered me


Primaria Falticeni wrote:

Why nobody answered me?
I posted two questions on this list.
  


When did the website claim that all questions would be answered on the 
list?  More importantly, as someone else has already pointed out, please 
consider paying for support if you really want guaranteed service, just 
like anywhere else.

This list is a convenient place to discuss or ask questions about 
probably 98% of situations.  That last 2% probably requires support.

Please note, as always that 72.83% of all statistics are made up on the 
spot.

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



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



'mysqld ended' Error

2003-06-18 Thread Pushpinder Singh Garcha
Hello everyone,

 I am running MySQl and PHP on a Mac OS Jaguar. When I try to restart 
my MySQL Local Server using mysqld_safe, but I keep getting this error

[psg:/usr/local/mysql] psgarcha% sudo echo
Password:
[psg:/usr/local/mysql] psgarcha% sudo ./bin/mysqld_safe 
[4] 524
[psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases 
from /usr/local/mysql/data
030618 10:23:41  mysqld ended

After that I have tried to look up the error logs on my Mac under 
/usr/local/mysql/data but I get a 'permission denied error'

[psg:/usr/local] psgarcha% ls
mysqlmysql.bak
mysql-standard-4.0.12-apple-darwin6.4-powerpc
[psg:/usr/local] psgarcha% cd mysql
[psg:/usr/local/mysql] psgarcha% ls
COPYING  README   include  manual.txt   
share
COPYING.LIB  bin  lib  manual_toc.html  
sql-bench
ChangeLogconfigureman  mysql-test   
support-files
INSTALL-BINARY   data manual.html  scripts  
tests
[psg:/usr/local/mysql] psgarcha% cd data
data: Permission denied.
[psg:/usr/local/mysql] psgarcha%

I have no clue why this is happening...everything was working 
fien...untill recently something snapped and the MySQL DB would not 
start up at all.

TIA
--Pushpinder


Re: mysqlbug

2003-06-18 Thread [EMAIL PROTECTED]
Joanne Yow [bizfront] schrieb:


I am trying to install MySQL 3.23 to Solaris 2.8.
After the step - scripts/mysql_install_db
I try the command - chown -R root, error show usage: chown [-fhR] owner[:group] 
file...
and the command - chrgrp -R mysql, error show chgrp [-fhR] group file...


$ man chown
$ man chgrp
you would do something like this ?

# chown -R mysql:mysql /path/to/your/file_or_directory

oops,

file:///usr/share/doc/mysql-3.23.56/manual.html

shell groupadd mysql
shell useradd -g mysql mysql
shell cd /usr/local
shell gunzip  /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell ln -s full-path-to-mysql-VERSION-OS mysql
shell cd mysql
shell scripts/mysql_install_db
shell chown -R root  .
shell chown -R mysql data
shell chgrp -R mysql .
shell bin/safe_mysqld --user=mysql 
or
shell bin/mysqld_safe --user=mysql 
if you are running MySQL 4.x
--
shrek-m
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Loss of connection???

2003-06-18 Thread TheMechE

Hey gang...



In my dbMove application I have the following.

Ask SQL how many records I am moving- OK
Display that amount - OK
Delete all from corresponding MySQL table   - OK

Long pause, get a coffee, take a nap

java.sql.SQLException: Communication link failure: java.io.IOException

I read in a few places that this is thrown by MySQL.  The question is, can
this be corrected by changing the timeout?  This would be odd since it seems
that the error happens somewhere in the call AND I don't get a connection
closed exception.  The table in question has 44 million records in it.

I have increased my timeout for this connection to over six hours.  And the
error occurs happens around 3-5mins later.
We never return from the delete call...(i.e. It fails in the delete) and we
never get a 'X number of rows affected' response.
If this is being tracked by a transaction... how can we fix this?... I need
transactions for other operations... so INNODB is critical...

Anybody have any ideas?

I'm running MySQL version 4.0.6 gamma.


_TheMechE
[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Export xml, import into filemakerpro 6.0

2003-06-18 Thread Janice Wright
Sometime recently Zac Korpi said:
 I'm new to mysql.  Currently I am using php myadmin to manage my database.  I'd like 
 to be able to export mysql database as xml and, in turn, import the xml into a 
 filemaker pro 6.0 database.  If someone else has worked on something similar, any 
 advice would be very appreciated.
 

Is there any particular reason you want to export as XML? Does filemaker pro 6.0 not 
accept
a csv (comma seperated variable) file for input?

J.


-- 
Janice Wright
Ingenta plc
[EMAIL PROTECTED]
Tel: +44 (0) 01865 799114 
http://www.ingentaselect.com/

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Connection problems

2003-06-18 Thread John R Langan
Hi All,
I hope someone can help with this connection problem.
We have MySQL 4.0.12 installed on a W2K server and we are using the 
Connector/J version 3.0.7 driver to connect our Java applet to the 
database. The applet and the database are both on the same machine. 
mysql-connector-java-3.0.7-stable-bin.jar is in Java\j2re1.4.1_01\lib\ext

The applet starts and makes the connection to the mysql database when 
running on localhost and everything works OK.

Using a PC on the intranet or internet the applet starts but fails to 
make the database connection.

The root user has been granted:
grant all on dbname.* to [EMAIL PROTECTED] identified by 'password';
grant all on dbname.* to [EMAIL PROTECTED] identified by 'password';
and another user
GRANT ALL ON dbname.* TO [EMAIL PROTECTED] IDENTIFIED BY 'userpassword';
but neither can connect to the database over the network.
The user and root can access the database using
mysql -u username (or root) -p
and then entering the password.
When attempting to connect from the PC on the intranet the trace gives 
the following:

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver	at 
sun.applet.AppletClassLoader.findClass(Unknown Source)	at 
sun.plugin.security.PluginClassLoader.findClass(Unknown
Source)	at java.lang.ClassLoader.loadClass(Unknown Source)	at 
sun.applet.AppletClassLoader.loadClass(Unknown Source)	at 
java.lang.ClassLoader.loadClass(Unknown Source)	at 
java.lang.ClassLoader.loadClassInternal(Unknown Source)	at 
java.lang.Class.forName0(Native Method)	at 
java.lang.Class.forName(Unknown Source)	at 
Database.connect(Database.java:666)	at 
Database.testExists(Database.java:305)
snip

Attempting to connect over the internet the trace gives:

java.sql.SQLException: Unable to connect to any hosts due to exception: 
java.security.AccessControlException: access denied 
(java.net.SocketPermission 192.168.1.90:3306 connect,resolve)	at 
com.mysql.jdbc.Connection.createNewIO(Connection.java:1592)	at 
com.mysql.jdbc.Connection.init(Connection.java:486)	at 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:326) 
at java.sql.DriverManager.getConnection(Unknown Source)	at 
java.sql.DriverManager.getConnection(Unknown Source)	at 
Database.connect(Database.java:667)
snip

Thanks in advance for any help on solving this problem.

John Langan



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


segfault on startup after kernel change?

2003-06-18 Thread Carl B. Constantine
I recently changed my kernel (as noted in another message) to one that
supports ACPI (for my laptop running RH9) and a couple other patches (I
don't know all of them, one may have been the preemptive kernel patch).
I've installed MySQL 4.0.12 from RPM's on the myslq.com site. When I
start mysql using /etc/init.d/mysql start, I now get a 1024 segmentation
fault:

# /etc/init.d/mysql start
# Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe: line 320:  1024 Segmentation fault  $NOHUP_NICENESS 
$ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION 
--pid-file=$pid_file --skip-locking $err_log 21
030618 08:00:57  mysqld ended

I've checked the mysql log /var/lib/mysql/hostname.err but all it shows
is this:

030618 08:00:57  mysqld started
030618 08:00:57  mysqld ended

no realy information at all. 

If I switch back to the stock RH9 kernel, mysql starts just fine. So
what in the kernel would cause this sudden segfault on startup? I don't
get it. It shouldn't happen.

Please answer. I've searched the mysql and mysql-bugs archives at AIMS
and no answer. I did a google search on this error and come up with hits
from many different lists (PHP, LDAP, and so forth) but nothing that
pertains to what I'm seeing. Can someone provide some insight?


-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom


pgp0.pgp
Description: PGP signature


where do I find the error log file?

2003-06-18 Thread Pushpinder Singh Garcha
I need to find out why the mysqld is not starting up ? Can someone 
please throw some light to the location of this file on a Mac?

Thanks in adavnce.
--Pushpinder
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


multiple versions of MySql

2003-06-18 Thread Reggie Burnett
What problems am I going to have with 3.23, 4.0.13, and 4.1 alpha installed
on the same machine (Win XP?)

I am developing some software and wanting to test against these versions but
I am starting to have intermittent problems with MySql-Front where it
declares that a table is now missing.

Should I keep the databases separate?  I am starting to think that I
installed 4.1 alpha last and possibly am using an alpha libmysql and that is
causing the problem.

Reggie


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: 'mysqld ended' Error

2003-06-18 Thread gerald_clark


Pushpinder Singh Garcha wrote:

Hello everyone,

 I am running MySQl and PHP on a Mac OS Jaguar. When I try to restart 
my MySQL Local Server using mysqld_safe, but I keep getting this error

[psg:/usr/local/mysql] psgarcha% sudo echo
Password:
[psg:/usr/local/mysql] psgarcha% sudo ./bin/mysqld_safe 
[4] 524
[psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases 
from /usr/local/mysql/data
030618 10:23:41  mysqld ended

After that I have tried to look up the error logs on my Mac under 
/usr/local/mysql/data but I get a 'permission denied error' 
This is likely your problem.
/usr/local/mysql, all its files and subdirectories should be owned by mysql.
I suspect ownership and privileges have been changed so that neither you
nor mysql can read them.


[psg:/usr/local] psgarcha% ls
mysqlmysql.bak
mysql-standard-4.0.12-apple-darwin6.4-powerpc
[psg:/usr/local] psgarcha% cd mysql
[psg:/usr/local/mysql] psgarcha% ls
COPYING  README   include  manual.txt   share
COPYING.LIB  bin  lib  manual_toc.html  
sql-bench
ChangeLogconfigureman  mysql-test   
support-files
INSTALL-BINARY   data manual.html  scripts  tests
[psg:/usr/local/mysql] psgarcha% cd data
data: Permission denied.
[psg:/usr/local/mysql] psgarcha%

I have no clue why this is happening...everything was working 
fien...untill recently something snapped and the MySQL DB would not 
start up at all.

TIA
--Pushpinder



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Connection problems

2003-06-18 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John R Langan wrote:

 Hi All,
 I hope someone can help with this connection problem.
[snip]
 When attempting to connect from the PC on the intranet the trace gives
 the following:

 java.lang.ClassNotFoundException: com.mysql.jdbc.Driverat
 sun.applet.AppletClassLoader.findClass(Unknown Source)at
 sun.plugin.security.PluginClassLoader.findClass(Unknown
 Source)at java.lang.ClassLoader.loadClass(Unknown Source)at
 sun.applet.AppletClassLoader.loadClass(Unknown Source)at
 java.lang.ClassLoader.loadClass(Unknown Source)at
 java.lang.ClassLoader.loadClassInternal(Unknown Source)at
 java.lang.Class.forName0(Native Method)at
 java.lang.Class.forName(Unknown Source)at
 Database.connect(Database.java:666)at
 Database.testExists(Database.java:305)
 snip

How is your applet deployed? The driver classes have to be in the same
CODEBASE as your applet, otherwise the JVM won't be able to load them.

 Attempting to connect over the internet the trace gives:

 java.sql.SQLException: Unable to connect to any hosts due to exception:
 java.security.AccessControlException: access denied
 (java.net.SocketPermission 192.168.1.90:3306 connect,resolve)at
 com.mysql.jdbc.Connection.createNewIO(Connection.java:1592)at
 com.mysql.jdbc.Connection.init(Connection.java:486)at
 com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:326)
 at java.sql.DriverManager.getConnection(Unknown Source)at
 java.sql.DriverManager.getConnection(Unknown Source)at
 Database.connect(Database.java:667)
 snip

Check the security model documentation for applets. Applets aren't
allowed to make network connections to anything but the host that served
up the .class files. If your MySQL server is not the _same_ host, then
you won't be able to connect unless you digitally sign your applets and
your end-users allow the applet to make network connections to
'arbitrary' hosts. If you don't want to do this, you will either need to
run your MySQL server on your webserver, or install some kind of port
redirector to re-direct port 3306 on your webserver to your MySQL
server. However, I _don't_ recommend having applets talk _directly_ to
MySQL, it is more flexible and secure to have applets speak something
like HTTP to a middleware server that then 'talks' to MySQL.

-Mark


- --
For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+8IZBtvXNTca6JD8RAi4fAJ9xi+5tXjFX+xdwdyNnTEb4I+BkRACgodAt
xNCVFTNMVfXXzkKKzcc9BDI=
=ilb6
-END PGP SIGNATURE-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: multiple versions of MySql

2003-06-18 Thread Reggie Burnett
No.  It complains as well.  The error I get 

Can't open file: platforms.InnoDB

The funny thing is that I have never seen a file ending with Innodb.  I
created this table just last night of type InnoDB and the extension was .frm

Reggie

 -Original Message-
 From: Primaria Falticeni [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 10:31 AM
 To: Reggie Burnett
 Cc: MySQL LIST
 Subject: Re: multiple versions of MySql
 Importance: High
 
 What about the mysql client? Did it report that table exists?
 Test mysqlc from the all versions from your computer.
 
 Iulian
 
 - Original Message -
 From: Reggie Burnett [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 6:20 PM
 Subject: multiple versions of MySql
 
 
  What problems am I going to have with 3.23, 4.0.13, and 4.1 alpha
 installed
  on the same machine (Win XP?)
 
  I am developing some software and wanting to test against these versions
 but
  I am starting to have intermittent problems with MySql-Front where it
  declares that a table is now missing.
 
  Should I keep the databases separate?  I am starting to think that I
  installed 4.1 alpha last and possibly am using an alpha libmysql and
 that
 is
  causing the problem.
 
  Reggie
 
 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: multiple versions of MySql

2003-06-18 Thread Primaria Falticeni
The most sure way is to keep the same version of server on the same
database. If you want to test more versions make one database per server
version.

Iulian

- Original Message -
From: Reggie Burnett [EMAIL PROTECTED]
To: 'Primaria Falticeni' [EMAIL PROTECTED]
Cc: 'MySQL LIST' [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 6:37 PM
Subject: RE: multiple versions of MySql


 No.  It complains as well.  The error I get

 Can't open file: platforms.InnoDB

 The funny thing is that I have never seen a file ending with Innodb.  I
 created this table just last night of type InnoDB and the extension was
.frm

 Reggie

  -Original Message-
  From: Primaria Falticeni [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, June 18, 2003 10:31 AM
  To: Reggie Burnett
  Cc: MySQL LIST
  Subject: Re: multiple versions of MySql
  Importance: High
 
  What about the mysql client? Did it report that table exists?
  Test mysqlc from the all versions from your computer.
 
  Iulian
 
  - Original Message -
  From: Reggie Burnett [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, June 18, 2003 6:20 PM
  Subject: multiple versions of MySql
 
 
   What problems am I going to have with 3.23, 4.0.13, and 4.1 alpha
  installed
   on the same machine (Win XP?)
  
   I am developing some software and wanting to test against these
versions
  but
   I am starting to have intermittent problems with MySql-Front where it
   declares that a table is now missing.
  
   Should I keep the databases separate?  I am starting to think that I
   installed 4.1 alpha last and possibly am using an alpha libmysql and
  that
  is
   causing the problem.
  
   Reggie
  
 



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Database Design Question...

2003-06-18 Thread NIPP, SCOTT V (SBCSI)
Hello...  I am currently working on a User Account Management
system.  I am actually a Unix SA who is moonlighting at work as a MySQL
DBA and web developer.  I am learning a lot and enjoying the work, but I am
severely lacking in database design fundamentals.  I have created a couple
very simple databases, but my two newest projects are getting more
sophisticated.  I was hoping for some DB design help with the following
example...

Let's say that I have users Mary, Joe, Frank, and Dan.  I also have
servers panther, cheetah, jaguar and lion.  The data for each account that I
want to maintain is UID, GID, home directory, and default shell.
In designing a table or tables to handle this example what can I
make as a primary key?  My idea was to have a table named mary, with a row
for each server, and each column would hold the data such as UID, GID, etc.
This would mean that the primary key for each row would simply be the server
name.
By holding all of the data, including server name, in a single
table, I am not sure how I would define a primary key.  I couldn't use the
user name or server name as there would be duplication.  I suppose I could
use a dummy numeric field that is auto-incrementing, but I am not sure how
good an idea this is.  I think I have read somewhere that you can actually
use a combination of multiple columns as a primary key or index, but this is
something I am obviously not familiar with.
One other concern I have is regarding performance.  The database
work I have done so far has been dealing with relatively miniscule amounts
of data.  This database table however is going to contain information for
about 80 servers with somewhere around 300 users per server on average.
This is quite a large number of rows from my very limited experience.  I
don't want to come up with a poor table design that ends up causing problems
down the line.

Well, that's about all I can think of at the moment.  I am sure that
I will have plenty more questions as this progresses.  Thanks again for the
feedback.


Scott Nipp
Phone:  (214) 858-1289
E-mail:  [EMAIL PROTECTED]
Web:  http:\\ldsa.sbcld.sbc.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



DELETE or RENAME tables?

2003-06-18 Thread jabevan
How do you DELETE or RENAME a table?

Thanks.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: DELETE or RENAME tables?

2003-06-18 Thread Jeremy Zawodny
On Wed, Jun 18, 2003 at 12:13:16PM -0400, [EMAIL PROTECTED] wrote:
 How do you DELETE or RENAME a table?

Search the manual.  The answer is there. :-)
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 4.0.13: up 15 days, processed 502,937,129 queries (378/sec. avg)

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: DELETE or RENAME tables?

2003-06-18 Thread Mike Hillyer
DROP TABLE tablename;
ALTER TABLE tablename RENAME newname;

http://www.mysql.com/doc/en/ALTER_TABLE.html
http://www.mysql.com/doc/en/DROP_TABLE.html

Regards,
Mike Hillyer
www.vbmysql.com


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, June 18, 2003 10:13 AM
 To: [EMAIL PROTECTED]
 Subject: DELETE or RENAME tables?
 
 
 How do you DELETE or RENAME a table?
 
 Thanks.
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql? [EMAIL PROTECTED]
 
 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: DELETE or RENAME tables?

2003-06-18 Thread Jonas Geiregat
[EMAIL PROTECTED] wrote:

How do you DELETE or RENAME a table?

Thanks.



 

alter table TABLENAME rename NEWNAME;
drop table TABLENAME;


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


MySQL Error Log problem.

2003-06-18 Thread Pushpinder Singh Garcha
Hello everyone,

I am unable to start the mysqld, i keep getting mysqld ended error.
 
-
[psg:/usr/local/mysql] psgarcha% sudo ./bin/mysqld_safe 
[5] 703
[psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases  
from /usr/local/mysql/data
030618 11:50:09  mysqld ended

[5]Done  sudo ./bin/mysqld_safe

 
-
Can u tell me how/ where to view the error logs...?

[psg:/usr/local/mysql] psgarcha% ls -la
total 10352
drwxr-xr-x  22 root   wheel  748 Apr  4 11:38 .
drwxr-xr-x   5 root   wheel  170 Apr  4 11:38 ..
-rw-r--r--   1 root   wheel19106 Mar 15 11:17 COPYING
-rw-r--r--   1 root   wheel28003 Mar 15 11:17 COPYING.LIB
-rw-r--r--   1 root   wheel   126466 Mar 15 10:47 ChangeLog
-rw-r--r--   1 root   wheel 6811 Mar 15 11:17 INSTALL-BINARY
-rw-r--r--   1 root   wheel 1937 Mar 15 10:47 README
drwxr-xr-x  46 root   wheel 1564 Apr  4 11:38 bin
-rwxr-xr-x   1 root   wheel  773 Mar 15 11:29 configure
drwxr-x---  13 mysql  wheel  442 Jun 18 11:50 data
drwxr-xr-x  51 root   wheel 1734 Apr  4 11:38 include
drwxr-xr-x   8 root   wheel  272 Apr  4 11:38 lib
drwxr-xr-x   3 root   wheel  102 Apr  4 11:38 man
-rw-r--r--   1 root   wheel  2676944 Mar 15 11:16 manual.html
-rw-r--r--   1 root   wheel  2329252 Mar 15 11:16 manual.txt
-rw-r--r--   1 root   wheel98233 Mar 15 11:16 manual_toc.html
drwxr-xr-x   9 root   wheel  306 Apr  4 11:38 mysql-test
drwxr-xr-x   3 root   wheel  102 Apr  4 11:38 scripts
drwxr-xr-x   3 root   wheel  102 Apr  4 11:38 share
drwxr-xr-x  33 root   wheel 1122 Apr  4 11:38 sql-bench
drwxr-xr-x  11 root   wheel  374 Apr  4 11:38 support-files
drwxr-xr-x  21 root   wheel  714 Apr  4 11:38 tests
When I try to access the Data Dir within mysql, i get a permission  
denied error,

Thanks
--Pushpinder
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: RAID hardware suggestions/experience

2003-06-18 Thread Steven Roussey
After testing a lot of different configurations (which was quite a
headache), I came up with the following. First of all, for both speed
and reliability, you will want SCSI. The list of reasons are quite long
for SCSI, and as you are doing research on the subject, it is an obvious
choice and I don't need to list them here. Get drives with 15K RPM,
since disk seek time is a killer in database applications. U160 or U320
SCSI 3. With lots of cache on the drive (should be standard). I've found
U160 to be sufficient, but U320 might be better for backups, etc. We do
have U320 controllers now, to be ready for the future. Next, I found
RAID 10 to be the best combination of redundancy and speed. It is not
cheaper though. I have not tested hardware RAID (which is a shame -- it
is a big hole in my experience), but use software RAID. Either way,
position all the sets of mirrors such that each mirror set (2 drives)
are on separate channels. This way, if your SCSI controller (or RAID
controller) has a channel die, the whole array can still function (even
with half of the drives down). Then stripe your (3-4) mirrors. Don't
stripe too many. More sets to stripe increase performance, but syncing
the rotations of many drives degrades performance. So there are
diminishing returns. For our calculations, 3-4 mirrors were sufficient.
Most of our RAID sets are six drives (3 stripe of 2 mirror). For one, we
wanted more space and it has 8 drives (4x2). Don't forget to install
spares at the same time. I like using external SCSI disk enclosures, so
you can swap servers with less headache.

-steve-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Arithmetic Bug in 4.0.12/13-max

2003-06-18 Thread Rich Schramm
I figured it out.  The between clause needs lower then upper, and I had
upper then lower.  The extraneous values I found must have been
artifacts from the abs comparison, which was clearly not working anyway.
I am just going to use the between clause.  It seems to return the
results I expect.

Rich

-Original Message-
From: Rich Schramm [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2003 9:07 AM
To: 'Alexander Keremidarski'; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: Arithmetic Bug in 4.0.12/13-max


OK, I have been working on this for the last day.  I read the manual
sections that were recommended on floating point calculations and I am
still seeing some weird things.

I simply want to see if the average value of two columns named upper and
lower (both are decimal(20,8) unsigned) is within the range of two
decimal numbers I pass to the statement.

The manual says in BIG CAPITAL LETTERS that you should NOT round and the
only precise way of getting this to go is to do  use the abs(a - b) 
some tolerance, such as .1.  Having read that, I changed my code so
that as follows:

and 
(
( 
abs(upper - 0.039)  0.1 
) 
or 
( 
abs(lower - 0.037)  0.1 
) 
or 
( 
(
(upper + lower) / 2
) 
between 0.039 and 0.037
) 
)

Which I assume would find anything where the upper column is .039, the
lower column is .037 or the average between the columns is between .039
and .037.

However, all I am returned is one record where the average ((upper +
lower)/2) = 0.040 !!!  I have plenty of records where the average is
0.038.  Why is it not finding them??

Also, when my range is 0.038 - 0.038 so that the query looks like:

and 
(
( 
abs(upper - 0.038)  0.1 
) 
or 
( 
abs(lower - 0.038)  0.1 
) 
or 
( 
(
(upper + lower) / 2
) 
between 0.038 and 0.038
) 
)

It brings back ALL columns were the average is 0.038 AND it brings back
records where the average is .040 and .036.  

In short, I am seeing exactly the OPPOSITE behavior I would expect from
this.

Any help would be much appreciated!

Thanks,

Rich
-Original Message-
From: Alexander Keremidarski [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 16, 2003 5:51 PM
To: Rich Schramm
Cc: [EMAIL PROTECTED]
Subject: Re: Arithmetic Bug in 4.0.12/13-max


Hello,

Rich Schramm wrote:
 I have tried the following SQL script on 4.0.12-max-nt on Windows XP
 and 4.0.13-max on Red Hat Linux 9.  In both cases, the 4th and 5th 
 select statements (and only those statements) return false (0).  They 
 return true in Oracle and Access:
  
 select (0.04 + 0.04)/2 = 0.040;
 select (0.041000 + 0.039000)/2 = 0.040;
 select (0.042000 + 0.038000)/2 = 0.040;
 select (0.043000 + 0.037000)/2 = 0.040;
 select (0.044000 + 0.036000)/2 = 0.040;
 select (0.045000 + 0.035000)/2 = 0.040;
 select (0.046000 + 0.034000)/2 = 0.040;
 select (0.047000 + 0.033000)/2 = 0.040;
 select (0.048000 + 0.032000)/2 = 0.040;
 select (0.049000 + 0.031000)/2 = 0.040;
 select (0.05 + 0.03)/2 = 0.040;
  
 The selects with 0.043 and 0.044 as the first number return false for
 some unknown reason.  I discovered this in code as I am trying to 
 select records whose average of two columns equals the number I pass 
 to it.

MySQL uses floating point arithmetic in this case which as you know is
not precise.


To see what happens modify your query as:

select (0.04 + 0.04)/2 = 0.040, round((0.04 + 0.04)/2,
20); select (0.041000 + 0.039000)/2 = 0.040, round((0.041000 +
0.039000)/2, 20); ...

Possible way to do above comparison is to use ROUND() function on one or
both columns.

select (0.04 + 0.04)/2 = 0.040, round((0.04 + 0.04)/2,
3) = 0.040;

You will get trues in right column for obvious reason.

However most precise way is to do convert = to as a Range comparison
0.400+/- 
tolerance

select (0.04 + 0.04)/2 BETWEEN 0.040 - 0.01 AND 0.040 +
0.01;



This is well docummented in Manual:

A.5.6 Solving Problems with No Matching Rows

...

# If you are comparing FLOAT or DOUBLE columns with numbers that have
decimals, 
you can't use '='. This problem is common in most computer languages
because 
floating-point values are not exact values. In most cases, changing the
FLOAT to a 
DOUBLE will fix this. See section A.5.7 Problems with Floating-Point
Comparison.


Read also whole A.5.7 Problems with Floating-Point Comparison


 I have worked around this by modifying my select statement to multiply

 each number by 1000, essential making each a whole number.  When this
 is done, it work as it should.

Yes as then MySQL uses integer arithmetics which is precise.

 Anyone have any ideas?
  
 Thanks,
  
 Richard Schramm
 

Problem with SELECT

2003-06-18 Thread Muazzam Siddiqui
Hi,
I am getting the error
You have an error in your SQL syntax near 'select max(news_id) from news)' 
at line 1

while trying to run this query.

SELECT * FROM News where News_ID = (SELECT MAX(News_ID) FROM News);

The table type is INNODB. Is it some MySQL related problem because I know 
the query is right. I tested it on Access.

Thanks
Muazzam Siddiqui.
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: MySQL Error Log problem.

2003-06-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2003-06-18 12:24:06 -0400:
 [psg:/usr/local/mysql] psgarcha% sudo ./bin/mysqld_safe 
 [5] 703
 [psg:/usr/local/mysql] psgarcha% Starting mysqld daemon with databases  
 from /usr/local/mysql/data
 030618 11:50:09  mysqld ended
 
 
 [5]Done  sudo ./bin/mysqld_safe

 Can u tell me how/ where to view the error logs...?

As always: in the manual. :) Or, in your mysqld datadir. It's called
`hostname`.err by default.

-- 
If you cc me or remove the list(s) completely I'll most likely ignore
your message.see http://www.eyrie.org./~eagle/faqs/questions.html

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



I don'get binlogs to log properly

2003-06-18 Thread cedric.boudin
Hi Folks,

so there I am, 
mysql server version 3.23.49-8.4
OS linux debian woody
box type i386

I've set up binlogs in my.cnf
I do get the binlog files created and rotated this with flush logs as
master reset.
I have the checkpoint and log_pos table set up.

what I do not get is that the binlog files do get filled up with some
data when I create tables insert in them delete in them or do whatever
data manipulation whatsoever.

waht do I do wrong, does someone have experience in the matter.

bdn

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: transactions with php

2003-06-18 Thread Steven Roussey

 If you're using a non-persistent connection, PHP will close the
 connection when the script terminates, and the MySQL server will roll
back
 implicitly.  For a non-persistent connection, the connection remains
open
 and you may not see the rollback behavior your expect.

I thought this was fixable now. A while back Monty said that changing
users on a connection would reset the connection automatically. He was
talking about the next version (which was several versions back of the 4
series). Resetting the connection (according to this theory) would set
all the per connection variables to their default and rollback any
non-committed transactions. 

My PHP Mysql extension is a bit hacked up (and I have more to do!), so I
can't remember the default now. But I think it should add a 'change
user' command when the page ends on any persistent connection. Change to
a blank user. So in theory then, web pages would be safe for
transactions.

A really ugly hack (assuming a Mysql server version as described above)
would be (in PHP) to connect persistently to mysql then change the user
to a dummy, and then change the user to the one you want again. Doing
this at the start of every page should then make it transaction safe.

Can someone from MySQL confirm that changing users will reset the
connection and rollback unfinished transactions? And starting in what
version?

-steve-



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



OUTER JOIN

2003-06-18 Thread Gustavo Mejia
Hi, 

I am trying to do something like:

select distinct S.US_FOLIO US_FOLIO
, ifnull(SD.US_FOLIO,'false')  FOLIO2
   from   SEGUIMIENTO S 
 ,SEGUIMIENTO_DETALLE SD
   where   S.US_FOLIO=SD.US_FOLIO(+)

this is using Oracle, but I need to change it to mysql, I have been
trying with the operator = but I got nothing, could you give a hand
with this please ?

Thanks a Lot.!
Gustavo Mejia
---
[This E-mail scanned for viruses]
[Deteccion de virus para una mayor seguridad en sus correos de Entrada y Salida.]
---


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Database Design Question...

2003-06-18 Thread vze2spjf
[snip]
  Let's say that I have users Mary, Joe, Frank, and Dan.  I also have
 servers panther, cheetah, jaguar and lion.  The data for each account that I
 want to maintain is UID, GID, home directory, and default shell.
  In designing a table or tables to handle this example what can I
 make as a primary key?  My idea was to have a table named mary, with a row

With the name mary, are you implying a separate table for each user?  If so, that 
doesn't sound right.

I think you should have three tables:
(1) A table of users, with properties that depend on the user but not those that might 
vary with server;
(2) A table of servers, with properties that are indepedent of users;
(3) A table with primary key formed by a pair of foreign keys, one pointing at the 
user table, one at the server table.  This table would have 
properties that depend on the user/server combination.  (An example would be the 
shell, since presumably a user could have different shells on 
different servers.)

 for each server, and each column would hold the data such as UID, GID, etc.
 This would mean that the primary key for each row would simply be the server
 name.
  By holding all of the data, including server name, in a single
 table, I am not sure how I would define a primary key.  I couldn't use the
 user name or server name as there would be duplication.  I suppose I could
 use a dummy numeric field that is auto-incrementing, but I am not sure how
 good an idea this is.  I think I have read somewhere that you can actually
 use a combination of multiple columns as a primary key or index, but this is
 something I am obviously not familiar with.
  One other concern I have is regarding performance.  The database
 work I have done so far has been dealing with relatively miniscule amounts
 of data.  This database table however is going to contain information for
 about 80 servers with somewhere around 300 users per server on average.
 This is quite a large number of rows from my very limited experience.  I

Nah, doesn't sound like much data to me.

 don't want to come up with a poor table design that ends up causing problems
 down the line.

[snip]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Large Table Woes

2003-06-18 Thread TheMechE


Hey gang... sorry, I duped the subject of someone elses message... so I'm
going to send this again



In my dbMove application I have the following.

Ask SQL how many records I am moving- OK
Display that amount - OK
Delete all from corresponding MySQL table   - OK

Long pause, get a coffee, take a nap

java.sql.SQLException: Communication link failure: java.io.IOException

I read in a few places that this is thrown by MySQL.  The question is, can
this be corrected by changing the timeout?  This would be odd since it seems
that the error happens somewhere in the call AND I don't get a connection
closed exception.  The table in question has 44 million records in it.

I have increased my timeout for this connection to over six hours.  And the
error occurs happens around 3-5mins later.
We never return from the delete call...(i.e. It fails in the delete) and we
never get a 'X number of rows affected' response.
If this is being tracked by a transaction... how can we fix this?... I need
transactions for other operations... so INNODB is critical...

Anybody have any ideas?

I'm running MySQL version 4.0.6 gamma.


_TheMechE
[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Problem with SELECT

2003-06-18 Thread gerald_clark


Muazzam Siddiqui wrote:

Hi,
I am getting the error
You have an error in your SQL syntax near 'select max(news_id) from 
news)' at line 1

while trying to run this query.

SELECT * FROM News where News_ID = (SELECT MAX(News_ID) FROM News); 
You don't say what version of MySQL you are running.
You probably do not have sub-selects. Consult your manual.
Try :
SELECT * FROM News ORDER BY News_ID DESC LIMIT 1;


The table type is INNODB. Is it some MySQL related problem because I 
know the query is right. I tested it on Access.

Thanks
Muazzam Siddiqui.
_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: OUTER JOIN

2003-06-18 Thread David Shelley
Try something like

select distinct S.US_FOLIO US_FOLIO
, ifnull(SD.US_FOLIO,'false')  FOLIO2
   from   SEGUIMIENTO S LEFT OUTER JOIN SEGUIMIENTO_DETALLE
SD
   on   (S.US_FOLIO=SD.US_FOLIO)


-Original Message-
From: Gustavo Mejia [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 12:54 PM
To: [EMAIL PROTECTED]
Subject: OUTER JOIN


Hi,

I am trying to do something like:

select distinct S.US_FOLIO US_FOLIO
, ifnull(SD.US_FOLIO,'false')  FOLIO2
   from   SEGUIMIENTO S
 ,SEGUIMIENTO_DETALLE SD
   where   S.US_FOLIO=SD.US_FOLIO(+)

this is using Oracle, but I need to change it to mysql, I have been
trying with the operator = but I got nothing, could you give a hand
with this please ?

Thanks a Lot.!
Gustavo Mejia


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Triggers

2003-06-18 Thread Steven Roussey
Just a couple of quick notes:

1. While I use PHP CLI for a lot of things (can we say cron?), it is not
a sufficient replacement for triggers. What happens when someone is
using the Mysql command prompt to alter data? Or using a non-PHP
application?

2. While I agree that having application code rather than stored
procedures is a much better bet for code management, it is only true if
you are dealing with a **very simple system** such as a web site. There
are whole new levels of complexity when the system includes a web site,
in-house VB and Java applications, software from other providers (CRM,
whatever), etc., all accessing the same data repository. In these cases,
stored procedures, triggers, views, etc., are necessary for data
integrity, and code management.

Just a note: while the website this email is attached to is a complex
web application, it is still a simple system. I don't mean to imply that
websites are simple. Just the system (webserver  database) is simple.

-steve-



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: RAID hardware suggestions/experience

2003-06-18 Thread Steven Roussey
 What sort of throughput are you seeing in that setup?

God, I can't remember anymore. I can run a test again though. If you
have one you want me to run, just send it. We don't have other people's
money to spend, so all our disks are U160 18GB 15K IBM. They were less
than $100 each when we got them. They work great!

We only care about throughput when we do a clean backup. Application
performance is our measuring stick. Nothing like an FTS query on a big
ass table to do a test of both simultaneously.

At any rate, one server is just a replication failover. I can shut it
down for a little while and do another test. Then I can post back to the
list.

-steve-



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: case insensitive LIKE with utf8 (multibyte)

2003-06-18 Thread Tibor Simko
On Fri, 30 May 2003, Jeremy March wrote:
 The problem is that querying with a LIKE expression is treated case
 and accent sensitive. [...] Has anyone else experienced this with
 multibyte utf8?

Yes.  mysql-standard-4.1.0-alpha-pc-linux-i686 running with
--default-character-set=utf8 gives me:

   $ cat test1.sql
   create table if not exists test1 (name text);
   truncate table test1;
   insert into test1 values (amlie),(amelie);
   select count(*) from test1 where name=amelie;
   select count(*) from test1 where name like amelie;
   drop table test1;

   $ mysql -B -u foo -p test  test1.sql
   Enter password: *
   count(*)
   2
   count(*)
   1
   
Is this the expected behaviour?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



probably a stupid question

2003-06-18 Thread Jonas Geiregat
Hey,
Here is what I want to do
I have 2tables
let's say table A and B for simplicity.
in table A I have column id
and in table B I have column A_id
I insert a new value into table A insert into a values(NULL)
Since id is auto_incremenet and the primary key it will have an auto value.
Now I want that the column A_id contains that id nr.
I could query for the biggest id in column A and insert that into B.
But are there better way's of doing something like this ?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Segmentation fault using the C API

2003-06-18 Thread Sean Macmillan
This is a rather long message but I am stuck and am really in a bind so 
I wanted anyone who might be willing to point me in the right direction 
to have the full picture.

I recently installed MySql 4.0.13 on a Intel Linux box running Red Hat 
9.  I used the RPM that I found on the MySQL site.  I had to remove the 
existing MySQL 3.23 installation prior to installing 4.0.13, which was 
kind of a pain but I got it to work, although it ended up in /usr/bin 
instead of /usr/local, as the MySQL manual suggests to put it.

I then created a database, created some tables and populated them 
manually using sql statements.  I am able perform all db operations as 
expected.

Prior to installing MySQL using the provided RPM for my system, I also 
downloaded, unziped and untarred a binary distribution in /usr/local, 
as per the MySQL reference manual.  Once I got the RPM install to work 
I never removed this.  I thought this turned out to be a good thing as 
I could not locate the lib directory to link against from the RPM 
install so I used /usr/local/mysql-4.0.13-pc-linux-i686/lib to link 
against instead.

In a separate directory I installed a copy of the source distribution 
so that I could mess around with the C API w/i affecting the good 
version of 4.0.13 that I installed using the RPM and already have 
populated manually with data.

I proceeded to write a short '*.c' program that would accept command 
line args (database, user  password) and then connect to the database 
using mysql_real_connect(), print a message to the console indicating 
it had connected successfully, then exit using mysql_close().

I saved the source file in the same directory that the example programs 
that came with the source distribution (../mysql-4.0.13/client) are 
stored.  I compiled this program using the following (note I used the 
library that came with the RPM that I installed earlier:

gcc -g -o mysql_connect_test mysql_connect_test.c -I ../include -L 
/usr/local/mysql-standard-4.0.13-pc-linux-i686/lib -lmysqlclient -lnsl 
-lz

The program compiled fine but when I ran it I get a segmentation fault. 
 Thought it might have been programmer's error so I reviewed my code 
and it is not.  I then compiled 'insert_test.c', a program that came 
with the source distribution and it to compiled fine using the above 
make line.  When I ran this executable it also seg faults.

Is there something I am missing.  Is it not OK to use the libraries 
from the standard RPM install?

Thanks for anyone help in advance.
Sean Mac Millan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: probably a stupid question

2003-06-18 Thread Twibell, Cory L
Check out LAST_INSERT_ID() in the manual


-Original Message-
From: Jonas Geiregat [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 12:26 PM
To: 'Mysql'
Subject: probably a stupid question


Hey,
Here is what I want to do
I have 2tables
let's say table A and B for simplicity.
in table A I have column id
and in table B I have column A_id

I insert a new value into table A insert into a values(NULL)
Since id is auto_incremenet and the primary key it will have an auto value.
Now I want that the column A_id contains that id nr.
I could query for the biggest id in column A and insert that into B.
But are there better way's of doing something like this ?


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Many InnoDB files and performance.

2003-06-18 Thread Richard F. Rebel

Hello,

I have had problems with some of our equipment and copying the files
around if they are greater than 2gb (one of our nfs file servers is not
large file safe).  Because on occasion I have had to copy InnoDB files
around and hit this problem we have been using 2gb InnoDB files.

Does using many (30 to 50) 2gb InnoDB files adversely effect performance
or the size of the indexes/tables?  

Thanks!

-- 
Richard F. Rebel
[EMAIL PROTECTED]
t. 212.239.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: RAID hardware suggestions/experience

2003-06-18 Thread Dathan Vance Pattishall


---Original Message-
--From: Adam Nelson [mailto:[EMAIL PROTECTED]
--Sent: Tuesday, June 17, 2003 11:56 AM
--To: 'Bernd Jagla'; 'mysql'
--Subject: RE: RAID hardware suggestions/experience
--
--We recently bought a kick $%#%% machine for ~10k
--
--HP DL380
--2x2.8GHz Xeon
--1GB RAM
--5 15k scsi drives (2 RAID 1 for OS and logs/3 RAID 5 for data)
--RedHat Linux Enterprise Edition 2.1

You overpaid by 5K

2 x 2.8 GHZ Xeon
4 GB of RAM
5 15K SCSI Drives
ICP SCSCI RAID control card with 1 Gb of ram on it.
I just bought 30 of these boxes to build out my mysql farm for close to
400-600 queries a second with 60 connections a second of mix read /
writes.
 

--
--
--This machine easily handles 200 queries/sec and never gets a load
--average above 1.5.  For your space requirements, you may need the HP
--ML370 with 5 RAID 5 drives.  An important thing to remember is that
the
--raid card is very fast and the more drives (to a point) you put on
it,
--the better, so better to have 5 smaller drives than 3 bigger drives.
--The reason we use raid 5 is that 95% of our queries are selects.  If
--your ratio is smaller, you will want to consider RAID 1 or 10.
Another
--thing I recommend is to stay with the big players (IBM,HP) and stay
away
--from Dell which is cut rate.  If you want to save money, get a white
box
--over dell.  Also, we get it from a good salesman at cdw.  His address
is
--[EMAIL PROTECTED]  Since they are in Chicago, there is no sales tax.
--Lastly, if you're looking to buy soon, HP small-business direct
--(www.smb.compaq.com) is offering free shipping until June 30 (but
then
--you have to pay tax - basically the same amount).
--
--
-- -Original Message-
-- From: Bernd Jagla [mailto:[EMAIL PROTECTED]
-- Sent: Tuesday, June 17, 2003 1:15 PM
-- To: mysql
-- Subject: RAID hardware suggestions/experience
--
--
-- Sorry I forgot to mention:
--
-- We are using IRIS on an Origion2000, 7GB memory, 8 CPUs. I
-- was thinking of
-- spending up to $10K.
-- I also wanted the redundant data for speeding up the seeks, I
-- also need to
-- speed up the writes.
--
-- Bernd
--
--
--
--
=
--
--  Please note that this e-mail and any files transmitted
-- with it may be
--  privileged, confidential, and protected from disclosure under
--  applicable law. If the reader of this message is not the
-- intended
--  recipient, or an employee or agent responsible for
-- delivering this
--  message to the intended recipient, you are hereby
-- notified that any
--  reading, dissemination, distribution, copying, or other
-- use of this
--  communication or any of its attachments is strictly
-- prohibited.  If
--  you have received this communication in error, please notify
the
--  sender immediately by replying to this message and deleting
this
--  message, any attachments, and all copies and backups from your
--  computer.
--
--
--
--

--MySQL General Mailing List
--For list archives: http://lists.mysql.com/mysql
--To unsubscribe:
--http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Database Design Question...

2003-06-18 Thread Don Read

On 18-Jun-2003 NIPP, SCOTT V (SBCSI) wrote:
   Hello...  I am currently working on a User Account Management
 system.  I am actually a Unix SA who is moonlighting at work as a MySQL
 DBA and web developer.  I am learning a lot and enjoying the work, but I
 am
 severely lacking in database design fundamentals.  I have created a
 couple
 very simple databases, but my two newest projects are getting more
 sophisticated.  I was hoping for some DB design help with the following
 example...
 
   Let's say that I have users Mary, Joe, Frank, and Dan.  I also have
 servers panther, cheetah, jaguar and lion.  The data for each account
 that I
 want to maintain is UID, GID, home directory, and default shell.
   In designing a table or tables to handle this example what can I
 make as a primary key?  My idea was to have a table named mary, with a
 row
 for each server, and each column would hold the data such as UID, GID,
 etc.
 This would mean that the primary key for each row would simply be the
 server
 name.
   By holding all of the data, including server name, in a single
 table, I am not sure how I would define a primary key.  I couldn't use
 the
 user name or server name as there would be duplication.  I suppose I
 could
 use a dummy numeric field that is auto-incrementing, but I am not sure
 how
 good an idea this is.  I think I have read somewhere that you can
 actually
 use a combination of multiple columns as a primary key or index, but this
 is
 something I am obviously not familiar with.
   One other concern I have is regarding performance.  The database
 work I have done so far has been dealing with relatively miniscule
 amounts
 of data.  This database table however is going to contain information for
 about 80 servers with somewhere around 300 users per server on average.
 This is quite a large number of rows from my very limited experience.  I
 don't want to come up with a poor table design that ends up causing
 problems
 down the line.
 
   Well, that's about all I can think of at the moment.  I am sure that
 I will have plenty more questions as this progresses.  Thanks again for
 the
 feedback.
 

300 * 80 =24,000 rows --this is _NOT_ a lot.

At first, I'd use just one table:

srvr varchar(32) NOT NULL,
login varchar(32) NOT NULL,
uid smallint unsigned NOT NULL DEFAULT 1000,
gid smallint unsigned NOT NULL DEFAULT 1000,
gecos varchar(128),
sh varchar(32) NOT NULL DEFAULT '/bin/sh',
home varchar(64),
 ... more fields ...
primary key (login,srvr))

A next refinement would change the 'srvr' field to:
 srvr tinyint unsigned

and create a 'server' table:

id tinyint unsigned AUTO_INCREMENT, // last octet of ip ?
name varchar(64) NOT NULL,
primary key (id))

That'll make it easy to rename servers.

The table(s) could be populated very easily with a couple of shell, Perl,
and/or awk scripts. 

YP/NIS would come in handy as well. 
You'd loop on each distinct server name --request a ypxfer of the 
passwd map, then suck it into your table.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



@@identity

2003-06-18 Thread Jonas Geiregat
I'm using php + mysql for my project
I want to get the last insert ID.
I could use the php function mysql_last_id();
but I could aslo use @@identity.
Now some people have advised me NOT to use @@identity, cause it's not 
save buggy sometimes slow ..
is this true am I better of with the php function ?
also I do my query insert something
after that query I do an other query to get the last insert ID,
if someone else does a insert query between those 2 query's won't that 
affect my last insert ID and won't I get the wrong one ?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: @@identity

2003-06-18 Thread Carter, Scott
This may not be the correct solution exactly, but what I do to ensure that I
get the correct ID back is the following:

I know what I just inserted, therefore I can use this information in a WHERE
clause to ensure retrieving the correct ID.

Example:  INSERT name='scott', age=20 into myTable WHERE
;
thenSELECT id FROM myTable WHERE name='scott' AND
age=20;

Just one idea, someone might have a more efficient solution, afterall this
is a common pattern!

- Scott Carter

-Original Message-
From: Jonas Geiregat [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:37 PM
To: 'Mysql'
Subject: @@identity


I'm using php + mysql for my project
I want to get the last insert ID.
I could use the php function mysql_last_id();
but I could aslo use @@identity.
Now some people have advised me NOT to use @@identity, cause it's not 
save buggy sometimes slow ..
is this true am I better of with the php function ?
also I do my query insert something
after that query I do an other query to get the last insert ID,
if someone else does a insert query between those 2 query's won't that 
affect my last insert ID and won't I get the wrong one ?


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: probably a stupid question

2003-06-18 Thread Don Read

On 18-Jun-2003 Jonas Geiregat wrote:

snip 

 I insert a new value into table A insert into a values(NULL)
 Since id is auto_incremenet and the primary key it will have an auto
 value.
 Now I want that the column A_id contains that id nr.
 I could query for the biggest id in column A and insert that into B.
 But are there better way's of doing something like this ?
 

INSERT INTO tbl_B (A_id, ...)
 VALUES (LAST_INSERT_ID(), ...)

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: @@identity

2003-06-18 Thread Twibell, Cory L
The below query is not good, due to the fact that if name and age aren't
unique, I'll be returning multiple ids with it. One should always use the
LAST_INSERT_ID() or after an insert, select max(id) from myTable.

-Original Message-
From: Carter, Scott [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 12:59 PM
To: 'Jonas Geiregat'; 'Mysql'
Subject: RE: @@identity


This may not be the correct solution exactly, but what I do to ensure that I
get the correct ID back is the following:

I know what I just inserted, therefore I can use this information in a WHERE
clause to ensure retrieving the correct ID.

Example:  INSERT name='scott', age=20 into myTable WHERE
;
thenSELECT id FROM myTable WHERE name='scott' AND
age=20;

Just one idea, someone might have a more efficient solution, afterall this
is a common pattern!

- Scott Carter

-Original Message-
From: Jonas Geiregat [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:37 PM
To: 'Mysql'
Subject: @@identity


I'm using php + mysql for my project
I want to get the last insert ID.
I could use the php function mysql_last_id();
but I could aslo use @@identity.
Now some people have advised me NOT to use @@identity, cause it's not 
save buggy sometimes slow ..
is this true am I better of with the php function ?
also I do my query insert something
after that query I do an other query to get the last insert ID,
if someone else does a insert query between those 2 query's won't that 
affect my last insert ID and won't I get the wrong one ?


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: @@identity

2003-06-18 Thread Eric Calvert
On Wednesday 18 June 2003 13:59, Carter, Scott wrote:
 This may not be the correct solution exactly, but what I do to ensure that
 I get the correct ID back is the following:

 I know what I just inserted, therefore I can use this information in a
 WHERE clause to ensure retrieving the correct ID.

   Example:  INSERT name='scott', age=20 into myTable WHERE
 ;
   thenSELECT id FROM myTable WHERE name='scott' AND
 age=20;


That works IFF name='scott' and age=20 is GUARANTEED to be unique.
It's much better to get the last_insert_id() from a query.  

-- 
Eric Calvert
kyconnection.com, inc.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re[2]: RAID hardware suggestions/experience

2003-06-18 Thread Martin's - Web Dept.
Wednesday, June 18, 2003, 2:38:53 PM, you wrote:

---Original Message-
--From: Adam Nelson [mailto:[EMAIL PROTECTED]
--Sent: Tuesday, June 17, 2003 11:56 AM
--To: 'Bernd Jagla'; 'mysql'
--Subject: RE: RAID hardware suggestions/experience
--
--We recently bought a kick $%#%% machine for ~10k
--
--HP DL380
--2x2.8GHz Xeon
--1GB RAM
--5 15k scsi drives (2 RAID 1 for OS and logs/3 RAID 5 for data)
--RedHat Linux Enterprise Edition 2.1

DVP You overpaid by 5K

DVP 2 x 2.8 GHZ Xeon
DVP 4 GB of RAM
DVP 5 15K SCSI Drives
DVP ICP SCSCI RAID control card with 1 Gb of ram on it.
DVP I just bought 30 of these boxes to build out my mysql farm for close to
DVP 400-600 queries a second with 60 connections a second of mix read /
DVP writes.
 

Hmm could probably match that price in Cdn $$$ :)
Especially if you wanted 30.

Ryan (MySQL newbie)
RKFcomputers.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: RAID hardware suggestions/experience

2003-06-18 Thread Adam Nelson
Where'd you get it.  I've had bad experiences with generic machines but
I'll take a peak if you send the link?

There are a couple of things I didn't mention

2U Form Factor with tool-less rails
Redundant Power Supply
Redundant Fans (any 2 fans can go)
Battery Backed RAID for full commit even on abrupt power loss
dual Gbit ethernet
Remote Console/Power administration without Operating System
400 MHz FSB
DVD-ROM
All drive are hot swap
Fully supported and tested on RedHat Linux ES 2.1 (no weird hardware
bugs)

The last one is worth 5k alone.  I've had generic machines just freeze
from some weird kernel incompatibility with a raid card.  With 30
machines though, you can afford to lose one.  For me, with 1 or 2, I
cannot and must get the best.


 -Original Message-
 From: Dathan Vance Pattishall [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, June 18, 2003 2:39 PM
 To: 'Adam Nelson'; 'mysql'
 Subject: RE: RAID hardware suggestions/experience
 
 
 
 
 ---Original Message-
 --From: Adam Nelson [mailto:[EMAIL PROTECTED]
 --Sent: Tuesday, June 17, 2003 11:56 AM
 --To: 'Bernd Jagla'; 'mysql'
 --Subject: RE: RAID hardware suggestions/experience
 --
 --We recently bought a kick $%#%% machine for ~10k
 --
 --HP DL380
 --2x2.8GHz Xeon
 --1GB RAM
 --5 15k scsi drives (2 RAID 1 for OS and logs/3 RAID 5 for data)
 --RedHat Linux Enterprise Edition 2.1
 
 You overpaid by 5K
 
 2 x 2.8 GHZ Xeon
 4 GB of RAM
 5 15K SCSI Drives
 ICP SCSCI RAID control card with 1 Gb of ram on it.
 I just bought 30 of these boxes to build out my mysql farm 
 for close to
 400-600 queries a second with 60 connections a second of mix read /
 writes.
  
 
 --
 --
 --This machine easily handles 200 queries/sec and never gets a load
 --average above 1.5.  For your space requirements, you may 
 need the HP
 --ML370 with 5 RAID 5 drives.  An important thing to remember is that
 the
 --raid card is very fast and the more drives (to a point) you put on
 it,
 --the better, so better to have 5 smaller drives than 3 
 bigger drives.
 --The reason we use raid 5 is that 95% of our queries are 
 selects.  If
 --your ratio is smaller, you will want to consider RAID 1 or 10.
 Another
 --thing I recommend is to stay with the big players (IBM,HP) and stay
 away
 --from Dell which is cut rate.  If you want to save money, 
 get a white
 box
 --over dell.  Also, we get it from a good salesman at cdw.  
 His address
 is
 --[EMAIL PROTECTED]  Since they are in Chicago, there is no sales tax.
 --Lastly, if you're looking to buy soon, HP small-business direct
 --(www.smb.compaq.com) is offering free shipping until June 30 (but
 then
 --you have to pay tax - basically the same amount).
 --
 --
 -- -Original Message-
 -- From: Bernd Jagla [mailto:[EMAIL PROTECTED]
 -- Sent: Tuesday, June 17, 2003 1:15 PM
 -- To: mysql
 -- Subject: RAID hardware suggestions/experience
 --
 --
 -- Sorry I forgot to mention:
 --
 -- We are using IRIS on an Origion2000, 7GB memory, 8 CPUs. I
 -- was thinking of
 -- spending up to $10K.
 -- I also wanted the redundant data for speeding up the seeks, I
 -- also need to
 -- speed up the writes.
 --
 -- Bernd
 --
 --
 --
 --
 =
 --
 --  Please note that this e-mail and any files transmitted
 -- with it may be
 --  privileged, confidential, and protected from 
 disclosure under
 --  applicable law. If the reader of this message is not the
 -- intended
 --  recipient, or an employee or agent responsible for
 -- delivering this
 --  message to the intended recipient, you are hereby
 -- notified that any
 --  reading, dissemination, distribution, copying, or other
 -- use of this
 --  communication or any of its attachments is strictly
 -- prohibited.  If
 --  you have received this communication in error, please notify
 the
 --  sender immediately by replying to this message and deleting
 this
 --  message, any attachments, and all copies and 
 backups from your
 --  computer.
 --
 --
 --
 --
 
 --MySQL General Mailing List
 --For list archives: http://lists.mysql.com/mysql
 --To unsubscribe:
 --http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: @@identity

2003-06-18 Thread Jennifer Goodie
  One should always use the
 LAST_INSERT_ID() or after an insert, select max(id) from myTable.

Select max(id) from myTable should never be used to get the last insert id.
On a high traffic table you are not guaranteed it will be the ID for the
record you just inserted, another could have been inserted between the two
queries. Where as last_insert_id is per connection, so you don't have to
worry about getting someone else's ID.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



STRANGE : SELECT OK on Localhost, OK within Dreamweaver, OK on phpmyadmin on site, BUT NOT OK on webpage???????HELP

2003-06-18 Thread Martin H.J.Smetsers
Following select statement works OK on Localhost, OK within Dreamweaver
test, OK on phpmyadmin on site, BUT NOT OK on webpage.

It's the IF part where it states if(m.matchtypeid  3, etc

Here on the webpage itself it shows the 'in-/uitschrijven' or 'gesloten'
bit on those lines where it shouldn't , and just can't figure out why,
they do not show when testing with sqlyog on local pc, within
dreamweaver mx test module, withing phpmyadmin on site. STRANGE
STRANGE!!!

Any brains around who can help me please!

Thanks,
Martin

SELECT distinct m.id, m.naam,
left(m.startingtime,5) as starttijd , 
if(isqualifying,'Ja','') as Q,
date_format(playingdate,'%d-%m') as datumpje,
mt.naam as soort,
if(playingdate  FROM_DAYS( TO_DAYS( NOW( )) + 21),
if(m.matchtypeid  3
,
if(playingdate  FROM_DAYS( TO_DAYS( NOW( )) + 9)
,
'in-/uitschrijven'
,
'Gesloten'
)
,
'' 
)
,
''
)as inschrijven,
if(f.matchid = m.id, 'Startlijst',
if(wi.zoekcode='$details[1]','Ingeschreven',
date_format(if(playingdate  FROM_DAYS( TO_DAYS( NOW( )) + 9),
'',
FROM_DAYS( TO_DAYS( playingdate ) -21)),'%d-%m'))) as enu
FROM match1 as m
left outer join matchtype mt on mt.id = m.matchtypeid
left outer join flight f on f.matchid = m.id
left outer join wedstrijdinschrijvingen wi on wi.matchid = m.id
and wi.zoekcode='$details[1]'
WHERE playingdate  ( NOW( )- 3 )
ORDER BY playingdate



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: @@identity

2003-06-18 Thread Don Read

On 18-Jun-2003 Jonas Geiregat wrote:
 I'm using php + mysql for my project
 I want to get the last insert ID.
 I could use the php function mysql_last_id();
 but I could aslo use @@identity.
 Now some people have advised me NOT to use @@identity, cause it's not 
 save buggy sometimes slow ..
 is this true am I better of with the php function ?

Don't use either one.

PHP's mysql_last_id() is stored as a _long; it'll break on BIGINT ids.

If you need to keep the value in a PHP variable, use 
'SELECT LAST_INSERT_ID() as id', and retrive it as a string.


 also I do my query insert something
 after that query I do an other query to get the last insert ID,
 if someone else does a insert query between those 2 query's won't that 
 affect my last insert ID and won't I get the wrong one ?
 

No. The id is per connection. 
The return value is the last insert performed by your connection.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: RAID hardware suggestions/experience

2003-06-18 Thread Steven Roussey

2 x 2.8 GHZ Xeon
4 GB of RAM
5 15K SCSI Drives
ICP SCSCI RAID control card with 1 Gb of ram on it.
I just bought 30 of these boxes to build out my mysql farm for close to
400-600 queries a second with 60 connections a second of mix read /
writes.


What kind of queries are you doing? Our simple dual Athlon, with
software RAID and the disks I mentioned before does 3000+ queries a
second. I've pushed it to 8000 before, but it got too slow for me. 60/40
read/write.

-steve-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL Solaris SPARC installation instructions

2003-06-18 Thread Douglas Kramer
The download bundle for MySQL Solaris SPARC 32-bit includes instructions
for installing Windows and Linux versions, but apparently not Solaris SPARC versions.
(There are notes, but not instructions)
Can anyone please point me to installation instructions for Solaris SPARC?

-Doug

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


copying table

2003-06-18 Thread Fabio Bernardo
I tried to copy a table and got this mesagem, but I ´ve done this several
times ago... 

Got error -1 from table handler


MySQL 4.0.13 and JDBC

2003-06-18 Thread Luca
Hi,

with MySQL 3.23.x i was able to retrieve information about Foreign keys by 
using the JDBC's method getImportedKey.

The same code running on MySQL 4.0.13 alway return a null vector.
I'm using mysql-connector-java-3.0.8-stable-bin.jar to access MySQL.
There's somthing that I must set on MySQL server? Or there's a new JDBC for 
version 4.x?

Thanks
Luca


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
_
Naviga www.numeroverdeweb.it
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: @@identity

2003-06-18 Thread Jonas Geiregat
Don Read wrote:

On 18-Jun-2003 Jonas Geiregat wrote:
 

I'm using php + mysql for my project
I want to get the last insert ID.
I could use the php function mysql_last_id();
but I could aslo use @@identity.
Now some people have advised me NOT to use @@identity, cause it's not 
save buggy sometimes slow ..
is this true am I better of with the php function ?
   

Don't use either one.

PHP's mysql_last_id() is stored as a _long; it'll break on BIGINT ids.

If you need to keep the value in a PHP variable, use 
'SELECT LAST_INSERT_ID() as id', and retrive it as a string.

 

also I do my query insert something
after that query I do an other query to get the last insert ID,
if someone else does a insert query between those 2 query's won't that 
affect my last insert ID and won't I get the wrong one ?

   

No. The id is per connection. 
The return value is the last insert performed by your connection.

Regards,
 

Why did they make select @@identity then ?
Is it just cause most other db's have this thing ?
and what's the difference between @@identity and select last_insert_id() ?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: is CREATE VIEW possible in MySQL?

2003-06-18 Thread Lingua2001
Thank you for your reply, Edward,

And, where's the repository?

Lingua
- Original Message -
From: Becoming Digital [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:04 AM
Subject: Re: is CREATE VIEW possible in MySQL?


  You have to implement the view functionailty in code. Or maybe someone
  else has a better suggestion :)

 There are PHP classes that create views.  Check the Repository for them.

 Edward Dudlik
 Becoming Digital
 www.becomingdigital.com


 - Original Message -
 From: Oh Chye Yong [EMAIL PROTECTED]
 To: Lingua2001 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, 18 June, 2003 01:20
 Subject: Re: is CREATE VIEW possible in MySQL?


 View is not supported in MySQL version 4.x. You have to wait for version
5.

 You have to implement the view functionailty in code. Or maybe someone
 else has a better suggestion :)

 OH Chye Yong
 Software Engineer
 OpenFeel Pte Ltd
 Web: http://www.openfeel.com/
 Email: [EMAIL PROTECTED]
 Tel: (+65) 6334 5716
 Fax: (+65) 6334 5718

 Lingua2001 wrote:
   If not, is there a way to get the same effect in MySQL?
  
   Thanks in advance,
  
   Lingua
  




 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Innodb error

2003-06-18 Thread John Smith
I'm getting this error in my log:

--
030618 15:08:24  mysqld started
030618 15:08:24  InnoDB: Started
030618 15:08:24  /usr/sbin/mysqld: Can't create/write
to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
/usr/sbin/mysqld: ready for connections.
Version: '4.0.12'  socket: '/var/lib/mysql/mysql.sock'
 port: 3306
030618 15:08:26  InnoDB: Assertion failure in thread
28680 in file page0page.c line 450
InnoDB: We intentionally generate a memory trap.
InnoDB: Send a detailed bug report to
[EMAIL PROTECTED]
mysqld got signal 11;
This could be because you hit a bug. It is also
possible that this binary
or one of the libraries it was linked 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=67108864
read_buffer_size=1044480
030618 15:08:26  mysqld ended
--

Prior to this, I was doing 'mysqldump -A ...' and
mysql crashed. After rebooting the server I can get
mysql running again, but most queries show 'connection
lost', 'mysql gone away', etc. errors - but usually
the queries work after the client automatically
reconnects. 'mysqlcheck [-r] ...' dies with
'connection lost'.

Please help!

TIA,
John

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



worst result in killing an optimize table query

2003-06-18 Thread gamin
Hi,

   What would happen to my_table (~70MB of indexes) and its indexes if someone kills a 
an optimize table query - 'OPTIMIZE TABLE my_table' . Im wondering if i should provide 
a cancel button in my application during the optimization period. It is generally more 
user friendly to provide one, unless cancelling means having to repair the table or 
some similiar problem.

Thank you and regards
Gamin.


Re: MySQL 4.0.13 and JDBC

2003-06-18 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Luca wrote:

 Hi,

 with MySQL 3.23.x i was able to retrieve information about Foreign keys
 by using the JDBC's method getImportedKey.

 The same code running on MySQL 4.0.13 alway return a null vector.
 I'm using mysql-connector-java-3.0.8-stable-bin.jar to access MySQL.
 There's somthing that I must set on MySQL server? Or there's a new JDBC
 for version 4.x?


 Thanks
 Luca

Hi!

The foreign key info returned from InnoDB changed in 4.0.13. The 3.0.x
JDBC driver has been fixed to deal with this, but is not released yet.
You can check out a nightly snapshot from
http://mmmysql.sourceforge.net/snapshots/stable/ after 00:00 GMT
19-June-2003.

-Mark

- --
For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+8N3ltvXNTca6JD8RAowVAJ9YLASwZyolMp517gNTJmsymRVjIACfSjxc
sqdGadxRs0iFiu0tWrIxxNU=
=JYnN
-END PGP SIGNATURE-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: How to have AUTO_INCREMENT ignoring 0?

2003-06-18 Thread Fernando Martins
From: Paul DuBois [mailto:[EMAIL PROTECTED]
 At 21:09 +0200 6/16/03, Fernando Martins wrote:
 In AUTO_INCREMENT fields, inserting a 0 into the field requests a new
 sequence number.
 
 Is it possible to turn off this behaviour? (without messing with
 the code,
 of course)

 No.

 
 Using NULL to get the next sequence number is good enough for me
 and I use
 quite a lot 0 for special purposes (default record values,...)

 That is an unsupported use of an AUTO_INCREMENT column, which is intended
 to hold only positive integer values.  Not negative values, and not zero.

Hmm, the manual is not very consistent with that: AUTO_INCREMENT will not
work with negative numbers.; It’s possible to create a row where the
AUTO_INCREMENT column
is 0 by explicitly setting the column to 0 with an UPDATE statement); and
some examples using UNSIGNED.


 (You will find, for example, that if you run CHECK TABLE on your table,
 it will complain about 0 values in an AUTO_INCREMENT column.  Also,
 dumping and restoring the table will change your zero values.)


Damn! Glad you told me that! I had missed it in the manual. By dumping, you
mean BACKUP, mysqldump, SELECT * INTO OUTFILE or all of them? The manual is
also not explicit on that.

I've to say (not to complain) this looks wrong. Definitely unexpected. (A
dump/restore modifying data)

The manual recomends using NULL over 0 as the magic value to use to get the
sequence number. I had some hopes this could mean some way to cancel the
magic effect of 0 (hence my post) or some future plans to drop it. Any
chances?

Thanks,
Fernando


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Can we crypt passwords on MySQL

2003-06-18 Thread Grégoire Dubois
Hi all,

Is it possible to crypt the passwords on MySQL. If yes, how does it 
work, and how is it to be implemented.
Any link would be great.

Thank you.
Grégoire Dubois.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: How to have AUTO_INCREMENT ignoring 0?

2003-06-18 Thread Paul DuBois
At 23:50 +0200 6/18/03, Fernando Martins wrote:
From: Paul DuBois [mailto:[EMAIL PROTECTED]
 At 21:09 +0200 6/16/03, Fernando Martins wrote:
 In AUTO_INCREMENT fields, inserting a 0 into the field requests a new
 sequence number.
 
 Is it possible to turn off this behaviour? (without messing with
 the code,
 of course)
 No.

 
 Using NULL to get the next sequence number is good enough for me
 and I use
 quite a lot 0 for special purposes (default record values,...)
 That is an unsupported use of an AUTO_INCREMENT column, which is intended
 to hold only positive integer values.  Not negative values, and not zero.
Hmm, the manual is not very consistent with that: AUTO_INCREMENT will not
work with negative numbers.; It’s possible to create a row where the
AUTO_INCREMENT column
is 0 by explicitly setting the column to 0 with an UPDATE statement); and
some examples using UNSIGNED.
 (You will find, for example, that if you run CHECK TABLE on your table,
 it will complain about 0 values in an AUTO_INCREMENT column.  Also,
 dumping and restoring the table will change your zero values.)
Damn! Glad you told me that! I had missed it in the manual. By dumping, you
mean BACKUP, mysqldump, SELECT * INTO OUTFILE or all of them? The manual is
also not explicit on that.
I'm not sure what happens with BACKUP TABLE, but I suspect that it doesn't
alter the values in an AUTO_INCREMENT column because it operates using
direct file copy operations.  Any method that dumps table contents and
them reloads them record by record certainly will change 0 values in
an AUTO_INCREMENT columns.  This includes reloading output produced by
mysqldump or SELECT ... INTO OUTFILE.
I've to say (not to complain) this looks wrong. Definitely unexpected. (A
dump/restore modifying data)
The manual recomends using NULL over 0 as the magic value to use to get the
sequence number. I had some hopes this could mean some way to cancel the
magic effect of 0 (hence my post) or some future plans to drop it. Any
chances?
I don't know, but I'd say it's unlikely.  You're probably better off
using another column to indicate whether or not records are special.
Thanks,
Fernando


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Can we crypt passwords on MySQL

2003-06-18 Thread csebe
There is a PASSWORD('your_clear_text_password_here') function you can use
wherever you define a new password. See the manual for more.

Lian


 -Original Message-
 From: Grégoire Dubois [mailto:[EMAIL PROTECTED]
 Sent: Thursday, June 19, 2003 12:55 AM
 Cc: 'Mysql'
 Subject: Can we crypt passwords on MySQL


 Hi all,

 Is it possible to crypt the passwords on MySQL. If yes, how does it
 work, and how is it to be implemented.
 Any link would be great.

 Thank you.
 Grégoire Dubois.


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Can we crypt passwords on MySQL

2003-06-18 Thread Jocelyn Fournier
Hi,

Using PASSWORD function to crypt password is not recommended, it's mainly
used for internal mysql password encryption.
Prefer using MD5/SHA1 functions to encrypt a password.

Regards,
  Jocelyn


- Original Message - 
From: [EMAIL PROTECTED]
To: Grégoire Dubois [EMAIL PROTECTED]
Cc: 'Mysql' [EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 12:14 AM
Subject: RE: Can we crypt passwords on MySQL


 There is a PASSWORD('your_clear_text_password_here') function you can use
 wherever you define a new password. See the manual for more.

 Lian


  -Original Message-
  From: Grégoire Dubois [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 19, 2003 12:55 AM
  Cc: 'Mysql'
  Subject: Can we crypt passwords on MySQL
 
 
  Hi all,
 
  Is it possible to crypt the passwords on MySQL. If yes, how does it
  work, and how is it to be implemented.
  Any link would be great.
 
  Thank you.
  Grégoire Dubois.
 
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 


 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: RAID hardware suggestions/experience

2003-06-18 Thread Dathan Vance Pattishall
A lot of table scans do to bitmasked column values.

So

SELECT * FROM search_table where  AND colN  4;

Such that the above query will not utilize a key.

I was told at the last convention that mySQL had some good ideas on
allowing indexes for bitwise (arithmetic) columns but they are not quite
there yet. It's a hard problem I can only think of a way by having every
possible bit in an index but then that makes the index useless.





---Original Message-
--From: Steven Roussey [mailto:[EMAIL PROTECTED]
--Sent: Wednesday, June 18, 2003 12:59 PM
--To: 'Mysql'
--Subject: RE: RAID hardware suggestions/experience
--
--
--2 x 2.8 GHZ Xeon
--4 GB of RAM
--5 15K SCSI Drives
--ICP SCSCI RAID control card with 1 Gb of ram on it.
--I just bought 30 of these boxes to build out my mysql farm for close
to
--400-600 queries a second with 60 connections a second of mix read /
--writes.
--
--
--What kind of queries are you doing? Our simple dual Athlon, with
--software RAID and the disks I mentioned before does 3000+ queries a
--second. I've pushed it to 8000 before, but it got too slow for me.
60/40
--read/write.
--
---steve-
--
--

--MySQL General Mailing List
--For list archives: http://lists.mysql.com/mysql
--To unsubscribe:
--http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Upgrade from mm to Connector/J under tomcat

2003-06-18 Thread William R. Mussatto
I've googled, but haven't got a hit, so please excuse if this has been
covered many times before.

System: linux, (debian for what it matters)
tomcat 4.0
java  1.3.1
mysql 2.23.x

Curently we are using the older org.gjt.mm.mysql.Driver drivers.

We support many different sites which use .jsp pages and bean.

If we move the org.gjt.mm.mysql.Driver drivers into the local lib directories

WEB-INF/lib/..

and compile the beans with the driver.

Can we upgrade one context at a time to Connector/J or must we shut down
the server and upgrade them all at the same time?

Anyone done this?

William R. Mussatto, Senior Systems Engineer
Ph. 909-920-9154 ext. 27
FAX. 909-608-7061



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Innodb error

2003-06-18 Thread Heikki Tuuri
John,

what Linux kernel version you are running? Did the first crash occur because
of the same assertion failure?

The InnoDB tablespace is probably corrupt and it asserts in purge or insert
buffer merge.

You can try starting with

innodb_force_recovery=4

in the [mysqld] section of your my.cnf. You can try to determine how
widespread the corruption is by running CHECK TABLE ... on your tables.

Then dump your tables and recreate the whole tablespace.

MySQL-4.0.14 will have the page checksum fixed. Then we will get more
information whether this kind of corruption originates in the file system.

It might also be an ordinary bug in InnoDB. It asserts in copying of records
to another page because a record does not fit though we have calculated it
should fit.

I have now added diagnostic code to 4.0.14 which will print hex dumps of the
pages if the assertion fails again.

Best regards,

Heikki Tuuri
Innobase Oy
http://www.innodb.com
Transactions, foreign keys, and a hot backup tool for MySQL
Order MySQL technical support from https://order.mysql.com/

...
/* Copy records from the original page to the new page */

sup = page_get_supremum_rec(page);

while (sup != page_cur_get_rec(cur1)) {
ut_a(
page_cur_rec_insert(cur2, page_cur_get_rec(cur1), mtr));

page_cur_move_to_next(cur1);
page_cur_move_to_next(cur2);
}
...
- Original Message - 
From: John Smith [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Thursday, June 19, 2003 12:21 AM
Subject: Innodb error


 I'm getting this error in my log:

 --
 030618 15:08:24  mysqld started
 030618 15:08:24  InnoDB: Started
 030618 15:08:24  /usr/sbin/mysqld: Can't create/write
 to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
 /usr/sbin/mysqld: ready for connections.
 Version: '4.0.12'  socket: '/var/lib/mysql/mysql.sock'
  port: 3306
 030618 15:08:26  InnoDB: Assertion failure in thread
 28680 in file page0page.c line 450
 InnoDB: We intentionally generate a memory trap.
 InnoDB: Send a detailed bug report to
 [EMAIL PROTECTED]
 mysqld got signal 11;
 This could be because you hit a bug. It is also
 possible that this binary
 or one of the libraries it was linked 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=67108864
 read_buffer_size=1044480
 030618 15:08:26  mysqld ended
 --

 Prior to this, I was doing 'mysqldump -A ...' and
 mysql crashed. After rebooting the server I can get
 mysql running again, but most queries show 'connection
 lost', 'mysql gone away', etc. errors - but usually
 the queries work after the client automatically
 reconnects. 'mysqlcheck [-r] ...' dies with
 'connection lost'.

 Please help!

 TIA,
 John

 __
 Do you Yahoo!?
 SBC Yahoo! DSL - Now only $29.95 per month!
 http://sbc.yahoo.com

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Trying to install MySql++ ??

2003-06-18 Thread Peter Moscatt
I am trying to install MySql++.  When I issue the
./configure command all seems to go well until it
generates an error which you can see below.

The version I am trying to install is 1.7.9 from
memory. I am using Mandrake 9.1 which has MySQL as one
of the installable options, which I have chosen. 
MySQL server works fine and able to create, drop...

What does the error message indicate:

updating cache ./config.cache
loading cache ./config.cache
checking whether to enable maintainer-specific
portions of Makefiles... no
checking for MySQL library directory...
configure: error: Didn't find the mysql library dir in
''




Pete

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Upgrade from mm to Connector/J under tomcat

2003-06-18 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

William R. Mussatto wrote:

 I've googled, but haven't got a hit, so please excuse if this has been
 covered many times before.

 System: linux, (debian for what it matters)
 tomcat 4.0
 java  1.3.1
 mysql 2.23.x

 Curently we are using the older org.gjt.mm.mysql.Driver drivers.

 We support many different sites which use .jsp pages and bean.

 If we move the org.gjt.mm.mysql.Driver drivers into the local lib
directories

 WEB-INF/lib/..

 and compile the beans with the driver.

 Can we upgrade one context at a time to Connector/J or must we shut down
 the server and upgrade them all at the same time?

 Anyone done this?

_Theoretically_ that should work, however, the Tomcat folks don't
recommend deploying different versions of the same classes in their
container because of class-loading issues.

You shouldn't have to re-compile anything (if you used JDBC correctly),
because your beans shouldn't be using any of the classes from MM.MySQL
or Connector/J directly...

-Mark

- --
For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+8OhetvXNTca6JD8RAparAKCXQmB7Qrd/L10UKc+0uwViswFflwCfdGKd
BZotUmXEUtiz+uOvKXOX6Gw=
=E5k8
-END PGP SIGNATURE-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: RAID hardware suggestions/experience

2003-06-18 Thread Tomasz Korycki
At 13:14 2003-06-17, Bernd Jagla wrote:
Sorry I forgot to mention:

We are using IRIS on an Origion2000, 7GB memory, 8 CPUs. I was thinking of
spending up to $10K.
I also wanted the redundant data for speeding up the seeks, I also need to
speed up the writes.
Bernd
I assume You mean IRIX on O2k. If so, Your best bet is to call Your 
friendly snowflake
integrator (oh, soory, Origins do not use snowflake anymore...), but _not_ 
SGI. With one
possible exception: SGI Montreal or Toronto (that's in Canada, so there 
will be no tax), they're not too
far and are used to hopping the border for support/config calls.
Out of interest: which IRIX? maintenance or feature?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


  1   2   >