Re: MySQL Client on Linux won't connect to MySQL Server on XP

2003-03-11 Thread Tjoumaidis Tassos
No it says that the ip 10.0.0.220 does not have the right privileges to 
connect to your mysql server.
This can be solved if you connect through command line to mysql and give
grant all privileges on *.* to [EMAIL PROTECTED] identified by 
'paswdyouwant';

This will give the basic privileges to all databases for the useryouwant 
from 10.0.0.220 to all the databases you have on your mysql server.

Paul Larue wrote:

Hi all,
I got MySQL 3.23.55-nt running on XP and MySQL Client 3.23.36 running on
Linux Red Hat 7. I'm trying to have the client connect to the server but I
get the same error all the time:
[EMAIL PROTECTED] /root]# mysql -h 10.0.0.41 -u guest
ERROR 1130: Host '10.0.0.220' is not allowed to connect to this MySQL server
Could it be that the server and the client are not running the same version
and OS? Actually this situation is only a simulation of the future setup
which will be a win2k box holding the MySQL Server and the Linux box still
holding the client. Apache will run on the linux box as well as PHP so that
I can connect to mysql.
I'd be glad to hear from people having a similar setup and who would be
willing to give me tips on problems I could encounter as well as some hints.
Thanks in advance

Paul



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php





--
http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: query cache hits not counted in Com_select (fwd)

2003-03-11 Thread Sergei Golubchik
Hi!

 In MySQL 4.0, query cache hits are counted in Qcache_hits, but not in
 Com_select.  The documentation for Com_select implies that they should be
 there.  Is this the intended behavior, or is it a bug?
 
 - JD

It is intended behaviour.

Com_select is incremented each time SELECT query is executed.
But if a query is found in a query cache it's not executed, it's not
even parsed - cached result is immediately sent back.
Following this logic, Com_select is not incremented for a query cache
hits..
 
Regards,
Sergei

-- 
MySQL Development Team
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   ___/

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

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



Re: [repost] Finding table name when using Union

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

Couldn't you include the table name in the select clauses of the
union ?

eg.

select 'table_1' table, t1.* from table_1 t1 where blah and blah
union
select 'table_2' table, t2.* from table_2 t2 where blah and blah

==
Martin


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

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



Re: mysql embedded server threads

2003-03-11 Thread Gabor Dorka

Does anybody (on this list) know anything about threaded embedded server?
Where can I get info about this problem?


I've been using mysql embedded server in my online game
project. The game server receive client requests,
and create a new thread for every request.
I made some tests with a single thread,
and found some strange things.
The following code works under Windows XP, but doesn't
work under Debian or RedHat 7.1 :

void server_test( ... )
{
   mysql_server_init( ... );
   mysql = mysql_init( ... );
   mysql_real_connect( mysql, ... );
   pthread_create( ... server_receive ... )
   // wait for thread end
   // terminate...
}

void *server_receive( mysql )
{
   mysql_thread_init();
   somelogquery( mysql, SELECT * FROM building ); // works fine
   somelogquery( mysql, SELECT * FROM building WHERE bid==1 ); // mysql_error
   mysql_thread_end();
   phtread_exit( ... );
}

I've got mysql error: thread stack overrun, 8-10Mb used from 192Kb stack
A simple SELECT without WHERE always succeeded, but SELECTs with WHERE always failed.
The following code works under win and linux, but it looks very ugly:

void *server_receive( mysql )
{
   // no mysql_thread_init();
   mysql_close( mysql )
   mysql = mysql_init( ... );
   mysql_real_connect( mysql, ... );
   somelogquery( mysql, SELECT * FROM building ); // works fine
   somelogquery( mysql, SELECT * FROM building WHERE bid==1 ); // mysql_error
   // no mysql_thread_end();
   phtread_exit( ... );
}

What is wrong with the mysql_thread_... version?
Did I misunderstand something?
Why does it work under Win but doesn't under linux?
Is the close/reinit/reconnect solution much slower?

Thanks,
Gabor Dorka





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

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



Re[2]: how turn off binary update log?[Scanned]

2003-03-11 Thread Dmitry Sukhodoev
hello, Jeff.

you wrote 10 ìàðòà 2003 ã., 5:18:23:

JK From you're info below, mysql *shouldn't* be turning on the binary log. An
JK easy way to test is just to run the 'ps' command and see if '--log-bin' is
JK being added to the command line. If you have a long command line for the
JK mysql process, you may need to use 'ps awx' or 'ps awwx' -- these work on
JK Linux, but you may need to use something different for FreeBSD. Have you, or
JK anyone else, edited the safe_mysqld script, possibly adding '--log-bin'
JK there?
let's see:

[/usr/home/[EMAIL PROTECTED]   [15:49]
raven$ ps awwx|grep mysql
29637  p2- I  0:00,01 /bin/sh /usr/local/bin/safe_mysqld --user=mysql 
--datadir=/var/db/mysql --pid-file=/var/db/mysql/bingo.pid
29660  p2- S  0:37,44 /usr/local/libexec/mysqld --basedir=/usr/local 
--datadir=/var/db/mysql --user=mysql --pid-file=/var/db/mysql/bingo.pid

there is no log-bin parameter. why my server write binary logs?

i compiled the mysql-server from ports...

-- 
Dmitry Sukhodoev, network administrator of bingo.ru, icq#550315


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

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



Re: SELECT to new table

2003-03-11 Thread Roger Baklund
* Phillip S. Baker
 How do I write a SQL call to take the results of a select statement and
 plug them into a new table in the DB?

If the new table exist, use INSERT ... SELECT:

URL: http://www.mysql.com/doc/en/INSERT_SELECT.html 

If the new table does not exist, use CREATE TABLE ... SELECT

URL: http://www.mysql.com/doc/en/CREATE_TABLE.html 

(Far down on the page you can find a description on how to append a SELECT
statement to the end of a CREATE TABLE statement.)

HTH,

--
Roger


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

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



Large resultset

2003-03-11 Thread Roland Carlsson
Hi!
I have a query that returns a resultset of 70 mb. I'd somehow would like
J/Connector to fetch only small pieces using Statement.setFetchSize but it
still get the whole ResultSet at once and then I get an OutOfMemoryError.

Is it a bug in setFetchSize? Does J/Connector ignore it? Have I totally
missunderstood what setFetchSize does?

I use J/Connector 3.0.6

Regards
Roland Carlsson


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

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



Re: Off topic help, SSL and form posts

2003-03-11 Thread Tonu Samuel
On Tue, 2003-03-11 at 04:15, Scott Haneda wrote:
 I have run into a problem where data is truncated when sending to MySql via
 a SSL connection, I can not determine whether this is my server or just the
 protocol, I hope the later, as I know web* 4, which is what I am using will
 never get it fixed.  Anyone with php and apache running SSL, would you mind
 creating a simple html form textarea and trying to post more than 4000 or so
 bytes of data to either a database or just echo the data back, I nice test
 would be to see about 10k of data go through.
 
 Of course, if someone knows already this is a SSL issue and just is how it
 is, let me know, thanks.

This is probably browser HTML understanding or PHP issue and surely have
nothing to do with SSL.

To find out, what is going on, add such PHP in top of your code:

?php

print(pre);
print_r($_REQUEST);
print(/pre);

?

After submit you will see, what PHP got from form. I am not HTML guru,
but there were values for input and textarea tags affecting their
maximum allowable size named something like size and maxlength. I is
possible that browser uses some default is they are not defined.

  Tõnu


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

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



Re: Using ssh tunnel and mysql

2003-03-11 Thread Tonu Samuel
On Mon, 2003-03-10 at 22:01, Pete Harlan wrote:
 On Mon, Mar 10, 2003 at 11:32:06AM -0600, Paul DuBois wrote:
  Whether it's a feature or not, it's not always so easy to figure out
  what to do.  If you specify -h localhost, it can be argued that you
  really want the socket even if you specify the port.  It can be
  argued conversely that if you specify the port, you should use TCP/IP
  even if you specify -h localhost.
  
  That is, if the user specifies both, it's ambiguous what the user really
  wants.
 
 But localhost is a DNS name that only happens to resolve to
 127.0.0.1.  MySQL breaks this DNS abstraction by treating localhost
 as a keyword, different from 127.0.0.1, which goes against the
 principle of least surprise.  (It confused me, anyway.)

This is an optimization. MySQL client makes assumption that you want to
connect locally and uses fastest available way - UNIX socket.

Of course, this decision can be agreed or disagreed. 

   Tõnu


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

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



Re: Large resultset

2003-03-11 Thread Alec . Cawley


 I have a query that returns a resultset of 70 mb. I'd somehow would like
 J/Connector to fetch only small pieces using Statement.setFetchSize but
it
 still get the whole ResultSet at once and then I get an OutOfMemoryError.

 Is it a bug in setFetchSize? Does J/Connector ignore it? Have I totally
 missunderstood what setFetchSize does?

It works for me, in a similar sort of situation.

Is your Statement TYPE_FORWARD_ONLY and CONCUR_READ_ONLY? These are
defaults, but you may have overridden them, and if so you disable the
setFetchSize().

Do you call setFetchSize() before the query? If not, the query will fetch
it all, and it is no use setting it before you fetch results.


  Alec



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

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



MySQLGUI links are broken

2003-03-11 Thread jarausch
Hello,

it seems as if all links on
http://www.mysql.com/Downloads/mysqlgui/
are broken.

Many thanks for a hint,
regards,

Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany


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

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



AW: Large resultset

2003-03-11 Thread Rusch (ext) Reiner
Hi,

why don't you try to solve the problem with ordinary sql-selects.
You can take select . limit 

regards
Reiner

 -Ursprüngliche Nachricht-
 Von: Roland Carlsson [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 11. März 2003 12:54
 An: [EMAIL PROTECTED]
 Betreff: Large resultset
 
 
 Hi!
 I have a query that returns a resultset of 70 mb. I'd somehow 
 would like
 J/Connector to fetch only small pieces using 
 Statement.setFetchSize but it
 still get the whole ResultSet at once and then I get an 
 OutOfMemoryError.
 
 Is it a bug in setFetchSize? Does J/Connector ignore it? Have 
 I totally
 missunderstood what setFetchSize does?
 
 I use J/Connector 3.0.6
 
 Regards
 Roland Carlsson
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

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

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



Query Help

2003-03-11 Thread mpalikko
Very informative MySQL list. Good Job People!

Query Question..

Two tables

1. Clients
ClientID (Primary Key, Unsigned int , Auto_Increment)
Vehicle typeChar(200)
Vehicle Color  CHAR(200)

2. Service
ServiceID (Primary Key, Unsigned int , Auto_Increment)
ClientIDINT
ServiceDate Date
InvoiceAmount   Char(200)

2 queries 

1. I wish to total the invoice amount for the records from Service (between two dates) 
where the Clients.VehicleColour = 'Blue'

 or

2. I wish get all the records from Service (between two dates) where the 
Clients.VehicleColour = 'Blue'

Which ever is easier.

Please Please Help !!!

Marko Palikko
[EMAIL PROTECTED]


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

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



Re: Large resultset

2003-03-11 Thread Roland Carlsson
Hello and thanks for the answer!

I use the following code to create the statement and resultset:

java.sql.PreparedStatement stat = conn.prepareStatement(sqlQ,
java.sql.ResultSet.CONCUR_READ_ONLY);
stat.setFetchSize(5);
java.sql.ResultSet res = stat.executeQuery();

So I don't think there is anything funny there. I have tried with a couple
of fetchsizes ( 5, 50, 500 ) but it doesn't seem to do any difference. I
also tested with TYPE_FORWARD_ONLY with no luck.

Thanks in advance
Roland Carlsson

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 1:08 PM
Subject: Re: Large resultset




  I have a query that returns a resultset of 70 mb. I'd somehow would like
  J/Connector to fetch only small pieces using Statement.setFetchSize but
 it
  still get the whole ResultSet at once and then I get an
OutOfMemoryError.

  Is it a bug in setFetchSize? Does J/Connector ignore it? Have I totally
  missunderstood what setFetchSize does?

 It works for me, in a similar sort of situation.

 Is your Statement TYPE_FORWARD_ONLY and CONCUR_READ_ONLY? These are
 defaults, but you may have overridden them, and if so you disable the
 setFetchSize().

 Do you call setFetchSize() before the query? If not, the query will fetch
 it all, and it is no use setting it before you fetch results.


   Alec



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

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



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

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



Re: Large resultset

2003-03-11 Thread Roland Carlsson
Hello and thanks for your answer!

If I have understood correctly LIMIT will only return as many row as the
limit. I need all rows, but I can't handle them all at once. In JDBC there
are a method to stream the resultset into small portions and when the end
of the portion is reached it automatically gets the next portion.

Thanks
roland Carlsson

- Original Message -
From: Rusch (ext) Reiner [EMAIL PROTECTED]
To: 'Roland Carlsson' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 12:59 PM
Subject: AW: Large resultset


 Hi,

 why don't you try to solve the problem with ordinary sql-selects.
 You can take select . limit 

 regards
 Reiner

  -Ursprüngliche Nachricht-
  Von: Roland Carlsson [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 11. März 2003 12:54
  An: [EMAIL PROTECTED]
  Betreff: Large resultset
 
 
  Hi!
  I have a query that returns a resultset of 70 mb. I'd somehow
  would like
  J/Connector to fetch only small pieces using
  Statement.setFetchSize but it
  still get the whole ResultSet at once and then I get an
  OutOfMemoryError.
 
  Is it a bug in setFetchSize? Does J/Connector ignore it? Have
  I totally
  missunderstood what setFetchSize does?
 
  I use J/Connector 3.0.6
 
  Regards
  Roland Carlsson
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

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

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



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

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



Re: Large resultset

2003-03-11 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Roland Carlsson wrote:
Hi!
I have a query that returns a resultset of 70 mb. I'd somehow would like
J/Connector to fetch only small pieces using Statement.setFetchSize but it
still get the whole ResultSet at once and then I get an OutOfMemoryError.
Is it a bug in setFetchSize? Does J/Connector ignore it? Have I totally
missunderstood what setFetchSize does?
I use J/Connector 3.0.6

Regards
Roland Carlsson
From the README:

If you need to stream result sets, row-by-row, the driver
now supports this. What you need to do is create a statement in the
following manner:
  stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY,
java.sql.ResultSet.CONCUR_READ_ONLY);
  stmt.setFetchSize(Integer.MIN_VALUE);

This serves as a signal to the driver to stream result sets
row-by-row. After this any result sets created with the statement
will be retrieved row-by-row.
There are some caveats with this approach. You will have
to read all of the rows in the result set (or close it)
before you can issue any other queries on the connection,
or an exception will be thrown. Some of the positioning methods
will not work as well, especially ones that require 'knowledge'
of the entire result set, like isBeforeFirst(), isAfterLast()
(when the result set is empty), absolute(), relative(), isLast()
(call .next() and check for a 'false' return value instead). This
is because the driver does not know how many rows are going to be
returned.
	-Mark

- -- 
MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/

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

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+beH7tvXNTca6JD8RAoqNAJ9mEjOAfVcK1Cc2ltjR8RW9ylYJBgCgpwUW
CQ/E6VZD56TR5eA+pGA0wQQ=
=VSZ1
-END PGP SIGNATURE-
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: idle login segfault on 4.0.11a-gamma

2003-03-11 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

On Sat, 5 Apr 2003 [EMAIL PROTECTED] wrote:

 Description:

   With a stale login (idle for some time), I've experienced a
   repeated ability to cause a seg-fault by attempting to get the
   status (\s).  I have not tested this thoroughly.

 How-To-Repeat:

   Log into the database, verify functionality. Leave the login idle
   for an extended period of time (12 hours is about the timeframe
   with which I see the issue, but it may occur at 6 hours..)

We have not been able to reproduce this case here. Can you try to
reproduce this with our binary or try to generate a core file?

What value does wait_timeout have?

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

iD8DBQE+bevASVDhKrJykfIRAn2mAJ9exzCrcxhVmt+J0tiFYErZ2qcdaACeKqck
3wtb8r9rynFJPuqCaNDujrw=
=mWGq
-END PGP SIGNATURE-

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

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



Re: Query Help

2003-03-11 Thread Roger Baklund
* [EMAIL PROTECTED]
 Two tables

 1. Clients
   ClientID (Primary Key, Unsigned int , Auto_Increment)
   Vehicle typeChar(200)
   Vehicle Color  CHAR(200)

 2. Service
   ServiceID (Primary Key, Unsigned int , Auto_Increment)
   ClientIDINT
   ServiceDate Date
   InvoiceAmount   Char(200)

 2 queries

 1. I wish to total the invoice amount for the records from
 Service (between two dates)
 where the Clients.VehicleColour = 'Blue'

SELECT SUM(InvoiceAmount)
  FROM Service,Clients
  WHERE
Service.ClientID=Clients.ClientID AND
(ServiceDate BETWEEN '2002-01-01' AND '2002-01-31') AND
VehicleColour = 'Blue';

URL: http://www.mysql.com/doc/en/SELECT.html 
URL: http://www.mysql.com/doc/en/JOIN.html 
URL: http://www.mysql.com/doc/en/Comparison_Operators.html 

 2. I wish get all the records from Service (between two dates) where the
 Clients.VehicleColour = 'Blue'

That's pretty much the same thing, except returning the Service row instead
of the sum of the invoice amount:

SELECT Service.*
  FROM Service,Clients
  WHERE
Service.ClientID=Clients.ClientID AND
(ServiceDate BETWEEN '2002-01-01' AND '2002-01-31') AND
VehicleColour = 'Blue';

HTH,

--
Roger


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

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



SQL Statement Problems (NOT IN)

2003-03-11 Thread Phil Dowson
Hi All,

I am new to this list, so appologies if I sound like a newbie.

I am trying to check a table to see if a value doesnt exist, and I
would prefer to use the NOT IN syntax, but that doesnt work for mysql.
I've been trying to construct a similar statement in MySQL, but I'm
coming up cold.

t1
't1id'
'1'
'18'
'19'

t2
't2id','t2gid'
'19','194'
'1','194'

The problem statement I would like to use is:

SELECT t1id FROM t1 WHERE t1id NOT IN (SELECT t2id FROM t2 WHERE t2gid
= 194)

Which should only show:
t1
't1id'
'18'

and so far the best I can come up with is:

SELECT t1.t1id FROM t1 LEFT JOIN t2 ON t1.t1id=t2.t1id WHERE t2.t1id
IS NULL OR t2.t2gid IS NULL

But this shows no results

TIA

Phil Dowson

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

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



sql_select_limit of 4.0.11

2003-03-11 Thread zby
Hallo,
what I have is this:

/usr/sbin/mysqld-max --version
/usr/sbin/mysqld-max  Ver 4.0.11-gamma-Max for pc-linux on i686
Downloaded and installed:
MySQL-client-4.0.11-0
MySQL-shared-4.0.11-0
MySQL-Max-4.0.11-0
MySQL-devel-4.0.11-0
MySQL-server-4.0.11-0
MySQL-bench-4.0.11-0
...started, loaded, running... OK (using innodb)
*
I login to 4.0.11 server from localhost and do:
select count(*) from  A; returned 22662
select * from A; returned 1000 rows
set sql_select_limit=5000;  OK
select * from A; returned 5000 rows;
Then I quit, login again, do the same select right after login
with no prior changes to the client environtment and: select *
from A; returns 1000 rows;

I login to 3.23.54a server from localhost and do:
select count(*) from A; returned 22662
select * from A; returned 22662 rows
**
As to the Reference Manual out of the rpm package of 4.0.11
version, SQL_SELECT_LIMIT is a ssesion variable and should be
initialy (after login) set to 'unlimited'. Why, after login from
localhost is this variable set to 1000?
Did I miss something in this reference or is this an error?
Or I simply misconfigured my server
Thank you for a note back.
Zbynek ZDRAZIL

-- 
Ziskejte kvalitu, kterou si zasluhujete. Za minimalni mesicni
poplatek vam nabizime Antivir, Antispam nebo dalsi kapacitu pro
vas Mailbox. Vice na: http://sluzby.volny.cz/product/postpaid/


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

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



Re: SELECT not doing what is expected...

2003-03-11 Thread gerald_clark
It doesn't explain the problem at all, since you didn't say what the 
problem was..

I would have expected an error message because:
You can't join USING (player)  because 'Players' has no 'player', and if 
it did, the WHERE
clause would be redundant.  The WHERE clause also references the 
non-existant Players.Player.

rob wrote:

Hi,  
query question:
 I have 2 tables created using Mysql:
1)  Players
Name(varchar),Team(varchar),Goals(tinyint),Assists(tinyint),Shutouts(tinyint),points(int).

2)draftees
ID(smallint),Name(varchar),Phone(varchar),Player(varchar)
 The problem I run into is when I run this statement only the first ID that 
has a certain Player is listed, even though multiple ID's may have the same 
player.
SELECT ID,Name,draftees.Player,goals,assists,shutouts,points FROM Players 
INNER JOIN draftees USING (Player)
WHERE Players.Player=draftees.Player ORDER BY ID 

 I hope that I have explained my problem clearly,
Any help would be appreciated...
Rob
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Is mysql_real_escape_string for blob storage?

2003-03-11 Thread Lai Liu-yuan
Hi, everyone.

I use blob to store image data in mysql. I use mysql_real_query to store it, but did 
not use mysql_real_escape_string to process it before hand.

Then I saw in the document that this is needed. But I am testing the data stored by 
reading them out to do some processing, there seems no segmentation fault happened.

By the way, when I stored the image, I stored the width and height also into the 
database. I read the image out for processing alsa based on these two variables. So if 
the image data is truncated due to special characters, there should be segmentation 
fault, shouldn't it?

So, back to the question, is mysql_real_escape_string needed when storing blob data?

Thanks.

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

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



Re: SQL Statement Problems (NOT IN)

2003-03-11 Thread Alec . Cawley


 I am trying to check a table to see if a value doesnt exist, and I
 would prefer to use the NOT IN syntax, but that doesnt work for mysql.
 I've been trying to construct a similar statement in MySQL, but I'm
 coming up cold.

 t1
 't1id'
 '1'
 '18'
 '19'

 t2
 't2id','t2gid'
 '19','194'
 '1','194'

 The problem statement I would like to use is:

 SELECT t1id FROM t1 WHERE t1id NOT IN (SELECT t2id FROM t2 WHERE t2gid
 = 194)

 Which should only show:
 t1
 't1id'
 '18'

 and so far the best I can come up with is:

 SELECT t1.t1id FROM t1 LEFT JOIN t2 ON t1.t1id=t2.t1id WHERE t2.t1id
 IS NULL OR t2.t2gid IS NULL

You only want one of the IS NULLs - t2.t1id IS NULL. No line will have both
null, but a t1 entry with t2 columns null for every t1 which does not have
a match in t2.

BTW, common practice would give the same column name, id, instead of t2id
and t1id,
if they are meant to represent the same thing, as is usially the case. The
ID is not
the ID in t1 or the ID in t2, it is THE id, which happens to appear in both
tables
in order to do relational joins.

  Alec







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

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



Re: Is mysql_real_escape_string for blob storage?

2003-03-11 Thread Paul DuBois
At 23:05 + 3/11/03, Lai Liu-yuan wrote:
Hi, everyone.

I use blob to store image data in mysql. I use mysql_real_query to 
store it, but did not use mysql_real_escape_string to process it 
before hand.

Then I saw in the document that this is needed. But I am testing the 
data stored by reading them out to do some processing, there seems 
no segmentation fault happened.

By the way, when I stored the image, I stored the width and height 
also into the database. I read the image out for processing alsa 
based on these two variables. So if the image data is truncated due 
to special characters, there should be segmentation fault, shouldn't 
it?

So, back to the question, is mysql_real_escape_string needed when 
storing blob data?
It's needed for *all* values, except those you're absolutely certain
contain no special characters.
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Is mysql_real_escape_string for blob storage?

2003-03-11 Thread Lai Liu-yuan
Thanks for your reply.

But, what then is the role of mysql_real_query? In document, it says You must use 
mqsql_real_query for queries that contain binary data?

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

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



Re: Is mysql_real_escape_string for blob storage?

2003-03-11 Thread Paul DuBois
At 0:07 + 3/12/03, Lai Liu-yuan wrote:
Thanks for your reply.

But, what then is the role of mysql_real_query? In document, it says 
You must use mqsql_real_query for queries that contain binary data?
That doesn't mean the data values don't need to be properly escaped.
What if you put a binary value containing a quote within quotes?
Result: malformed query.
mysql_real_query() uses a string and a length to indicate how long the
string is.  It won't be fooled by the presence of an ASCII 0 value within
the string.
mysql_query() uses a null-terminated string.  It *will* be fooled by the
presence of an ASCII 0 value within the string.  Specifically, it will
think the string ends at that 0, rather than where you want it to end.
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Master (pc) Slave (laptop) Replication

2003-03-11 Thread Daniel Negron/KBE
I have set up replication and have it working properly for the most part.
If I update the master the slave follows suit.  But my slave is a laptop,
that I use for testing but would like that data to stay up to date withthe
master.  Overnight if 'live changes take place on the Master, while the
slave is not connected,

How to I sync up the slave ? (without dumping the db or creating a
snapshot)

mysql - master = 3.23.33
mysql - slave = 3.23.52


Thank you,


---
-Daniel Negron

  // \\*
 /  _  __ ___  \Lotus Notes Admin / Developer
|  | |/ /| _ )  |   KB Electronic, Inc.
|  | '  | _ \  |   12095 NW 39th Street
|  |_|\ \|___/  |   Coral Springs, FL. 33065
 \ \_\ /954.346.4900 x 122
  \\ // email: [EMAIL PROTECTED]

-   http://www.kbelectronics.com
---



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

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



Re: Master (pc) Slave (laptop) Replication

2003-03-11 Thread Paul DuBois
At 11:48 -0500 3/11/03, Daniel Negron/KBE wrote:
I have set up replication and have it working properly for the most part.
If I update the master the slave follows suit.  But my slave is a laptop,
that I use for testing but would like that data to stay up to date withthe
master.  Overnight if 'live changes take place on the Master, while the
slave is not connected,
How to I sync up the slave ? (without dumping the db or creating a
snapshot)
mysql - master = 3.23.33
mysql - slave = 3.23.52
It shouldn't matter.  Slave servers retry occasionally when the connection
breaks.   There are startup options you can use to set the number of retries
and the interval between them.


Thank you,

---
-Daniel Negron
  // \\*
 /  _  __ ___  \Lotus Notes Admin / Developer
|  | |/ /| _ )  |   KB Electronic, Inc.
|  | '  | _ \  |   12095 NW 39th Street
|  |_|\ \|___/  |   Coral Springs, FL. 33065
 \ \_\ /954.346.4900 x 122
  \\ // email: [EMAIL PROTECTED]
-   http://www.kbelectronics.com
---


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Master (pc) Slave (laptop) Replication

2003-03-11 Thread gerald_clark
It is automatic.
Next time you connect your laptop to the network,
and start mysqld on your laptop, it will catch up to the master
provided the bin logs are still on the master.
Daniel Negron/KBE wrote:

I have set up replication and have it working properly for the most part.
If I update the master the slave follows suit.  But my slave is a laptop,
that I use for testing but would like that data to stay up to date withthe
master.  Overnight if 'live changes take place on the Master, while the
slave is not connected,
How to I sync up the slave ? (without dumping the db or creating a
snapshot)
mysql - master = 3.23.33
mysql - slave = 3.23.52
Thank you,

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


FW: mySQL 4.1 sql,query,queries,smallint

2003-03-11 Thread Luc Bui (PAC)


../Luc Bui
---
+46(0) 11 24 70 86
+46(0) 70 68 17 111


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: den 11 mars 2003 17:58
To: Luc Bui (PAC)
Subject: Re: mySQL 4.1 


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

sql,query,queries,smallint

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

You have written the following:

hi,

when can I get the binariesfor 4.1?
do 4.0.11a support views?

important for my choice for my community.

thank you in advance.

../Luc Bui
---
+46(0) 11 24 70 86
+46(0) 70 68 17 111


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

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



Re: Master (pc) Slave (laptop) Replication

2003-03-11 Thread Daniel Negron/KBE

It is automatic.
Next time you connect your laptop to the network,
and start mysqld on your laptop, it will catch up to the master
provided the bin logs are still on the master.

The reason i am asking is because it is not updating a couple of records.
But if I create a new db with some contents in it, it replicates with no
problem.

is there anyway to force a sync ?




Thank you,


---
-Daniel Negron

  // \\*
 /  _  __ ___  \Lotus Notes Admin / Developer
|  | |/ /| _ )  |   KB Electronic, Inc.
|  | '  | _ \  |   12095 NW 39th Street
|  |_|\ \|___/  |   Coral Springs, FL. 33065
 \ \_\ /954.346.4900 x 122
  \\ // email: [EMAIL PROTECTED]

-   http://www.kbelectronics.com
---



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

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



Re: SQL Statement Problems (NOT IN)

2003-03-11 Thread Phil Dowson
Quoting Bruce Feist [EMAIL PROTECTED]:

 Phil Dowson wrote:
 
 Looks like a syntax error to me.  There is no t1id in t2.  Also, the OR 
 is redundant; if no t2 row was found, both t2id and t2gid will be NULL, 
 so checking one of them suffices.  Try
 
 SELECT t1.t1id
   FROM t1 LEFT JOIN t2 ON t1.t1id = t2.t2id
   WHERE t2.t2id IS NULL;
 
 Thanks for your help, but its not quite what I needed. I had managed to get
 that
 far, but the problem is that I want it to display the following:
 
 when t2.t2id exists and t2.t2gid exists display t1.t1id
 when t2.t2id exists but t2.t2gid doesnt exist display nothing
 
 Does that make it any clearer? I am still a novice at SQL, and I'm trying to
 get
 used to MySQL and MSSQL at the same time (I need MSSQL for work)
   
 
 OK.  I'm not sure why you were originally looking at NOT IN, then; I'm 
 worried that I may still be misunderstanding something.  To get what 
 you're describing, try
 
 SELECT t1.t1id
   FROM t1 INNER JOIN t2 ON t1.t1id = t2.t2id
   WHERE t2.t2gid IS NOT NULL;
 
 Bruce
 
 
 
Bruce,

I modified

 SELECT t1.t1id
   FROM t1 INNER JOIN t2 ON t1.t1id = t2.t2id
   WHERE t2.t2gid IS NOT NULL;

to work closer to what I need,

SELECT t1.t1id 
FROM t1 
LEFT JOIN t2 ON t1.t1id = t2.t2id 
WHERE t2.t2gid  192  //an example of a gid I am using//

This is close, it shows all the id's that exist in the t2 table without a
t2.t2gid of 192, but I also need to show all t1.t1id's that exist in the t1
table that do NOT exist in t2.

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

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



Innodb and tablespace

2003-03-11 Thread Vincent Ferretti
I need help!

I'm making some testing with innodb tables and there're some issues I
don't understand.

I created a small tablespace of 10M:

   innodb_data_file_path = ibdata1:10M;

Then I created this simple database:

   CREATE DATABASE trace_db;
   use trace_db;

   CREATE TABLE chromatogram (
  id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, 
  trace MEDIUMBLOB NOT NULL,
  PRIMARY KEY (id),
   ) TYPE=INNODB; 

Then I wrote a little Perl script to fill this table:

   my $fileName = A03_017.ab1.bz2;
   for (my $i = 1; $i = $max; $i++) {
  my $query = qq {insert into chromatogram set trace =
LOAD_FILE($fileName)};
  $dbh-do($query) || die;
   }

Here is the problem: Although the size of the file is 63Kb, I can do
only a maximum of 84 insertions (which represent a total of 5.3M).
After that, I get the error message that the table is full.

Command show table status gives me a data_length of 5.9M which is
only 59% of the total tablespace allocated.

I want to have a database containing hundreds thousand of those files.
I can't obviously afford to loose 41% of my tablespace.

Can someone explain to me those numbers and what should I do to
optimize my disk space.

Thank you very much

Vincent



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

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



SQL

2003-03-11 Thread Husniddin Ishmatov
Salom Sherzod.
Bu men Jizzaxdan Uzbdan Husniddinman. Chatda kup gaplashgandik agar
eslasez.
Man internetda sizni SQLda ishlashizni bilib qoldim. Shunga sizdan
bitta narsani suramoqchi edim. Siz qattasiz Toshkentdami? Manga
Microsoft SQL 2000 kerak bulib qoluvdi. hech topomadim. qattan topsa
buladi. sizda yuqmi? Bor bulsa copy qilib olish mumkinmi?
Iltimos juda kerak bulib qoluvdi.
Hatizni kutaman.
Javob uchun oldindan rahmat.

  

-- 
Best regards,
Kroxus Software Group www.kroxus.com
Printing brochures, books...   mailto: [EMAIL PROTECTED]
11  2003 . 22:06 PM  [EMAIL PROTECTED]


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

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



Re: Mysql hangs on multi table update on innodb table.

2003-03-11 Thread Sinisa Milivojevic
Scott Wong writes:
 
 Version: Mysql  4.0.10-gamma
 
 Description:  Mysql hangs and possibly can not recover from a query on an innodb 
 table.  
 
 How to Repeat :
 
 drop table if exists parent;
 drop table if exists child;
 
 CREATE TABLE parent(id INT NOT NULL,
   PRIMARY KEY (id)) TYPE=INNODB;
 CREATE TABLE child(id  INT PRIMARY KEY, parent_id INT,
   INDEX par_ind (parent_id),
   FOREIGN KEY (parent_id) REFERENCES parent(id)
   ON DELETE CASCADE
   ON UPDATE CASCADE
   ) TYPE=INNODB;
 
 insert into parent set id=1;
 insert into child set id=1, parent_id=1;
 update parent,child set parent.id=parent.id+1, child.parent_id=parent.id+1;
 
 
 Thank you for your time.
 Scott Wong,
 Meiko America, INC
 

Hi!

Thank you for your bug report. 

It helped us fix a bug in multi-table updates with InnoDB. A fix will
come in 4.0.12, which should come out in a week. 

This is a patch:

= sql/sql_class.h 1.141 vs edited =
*** /tmp/sql_class.h-1.141-18011Wed Mar  5 19:43:53 2003
--- edited/sql/sql_class.h  Tue Mar 11 18:34:13 2003
***
*** 831,837 
uint table_count;
Copy_field *copy_field;
enum enum_duplicates handle_duplicates;
!   bool do_update, trans_safe, transactional_tables, log_delayed;
  
  public:
multi_update(THD *thd_arg, TABLE_LIST *ut, ListItem *fields,
--- 831,837 
uint table_count;
Copy_field *copy_field;
enum enum_duplicates handle_duplicates;
!   bool do_update, trans_safe, transactional_tables, log_delayed, on_the_fly;
  
  public:
multi_update(THD *thd_arg, TABLE_LIST *ut, ListItem *fields,
= sql/sql_update.cc 1.75 vs edited =
*** /tmp/sql_update.cc-1.75-18011   Wed Feb 19 16:08:27 2003
--- edited/sql/sql_update.ccTue Mar 11 18:59:11 2003
***
*** 413,419 
:all_tables(table_list), update_tables(0), thd(thd_arg), tmp_tables(0),
 updated(0), found(0), fields(field_list), values(value_list),
 table_count(0), copy_field(0), handle_duplicates(handle_duplicates_arg),
!do_update(1), trans_safe(0)
  {}
  
  
--- 413,419 
:all_tables(table_list), update_tables(0), thd(thd_arg), tmp_tables(0),
 updated(0), found(0), fields(field_list), values(value_list),
 table_count(0), copy_field(0), handle_duplicates(handle_duplicates_arg),
!do_update(1), trans_safe(0), on_the_fly(1)
  {}
  
  
***
*** 538,549 
main_table=join-join_tab-table;
trans_safe= transactional_tables= main_table-file-has_transactions();
log_delayed= trans_safe || main_table-tmp_table != NO_TMP_TABLE;
! 
/* Create a temporary table for all tables after except main table */
for (table_ref= update_tables; table_ref; table_ref=table_ref-next)
{
  TABLE *table=table_ref-table;
! if (table != main_table)
  {
uint cnt= table_ref-shared;
ORDER group;
--- 538,552 
main_table=join-join_tab-table;
trans_safe= transactional_tables= main_table-file-has_transactions();
log_delayed= trans_safe || main_table-tmp_table != NO_TMP_TABLE;
! #ifdef HAVE_INNOBASE_DB
!   if (main_table-db_type == DB_TYPE_INNODB)
! on_the_fly=0;
! #endif
/* Create a temporary table for all tables after except main table */
for (table_ref= update_tables; table_ref; table_ref=table_ref-next)
{
  TABLE *table=table_ref-table;
! if (!on_the_fly || table != main_table)
  {
uint cnt= table_ref-shared;
ORDER group;
***
*** 623,629 
  
  uint offset= cur_table-shared;
  table-file-position(table-record[0]);
! if (table == main_table)
  {
table-status|= STATUS_UPDATED;
store_record(table,1);
--- 626,632 
  
  uint offset= cur_table-shared;
  table-file-position(table-record[0]);
! if (on_the_fly  table == main_table)
  {
table-status|= STATUS_UPDATED;
store_record(table,1);
***
*** 716,722 
for (cur_table= update_tables; cur_table ; cur_table= cur_table-next)
{
  table = cur_table-table;
! if (table == main_table)
continue;   // Already updated
  
  org_updated= updated;
--- 719,725 
for (cur_table= update_tables; cur_table ; cur_table= cur_table-next)
{
  table = cur_table-table;
! if (on_the_fly  table == main_table)
continue;   // Already updated
  
  org_updated= updated;


-- 
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com

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


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

ASP.NET¿Õ¼ä×Ô¶¯±¸·ÖÊý¾Ý¿â£¬ËÍ2GµÄÓʾÖ!

2003-03-11 Thread sanry

   ASP.NET
2.5GChinaNET,
 
   ASP ASPaccess
SQL Server2000SQL Server2000

C
ASP ASP.NET CGI Active Perl Front Page 2000 
ACCESS SQLSERVER 2000MS SQL
3G3G
2GPOP WEBMAIL 
WINDOWS2000
4000/
C
ASP ASP.NET CGI Active Perl Front Page 2000 
ACCESS SQLSERVER 2000MS SQL
300M50M
800mPOP WEBMAIL 
WINDOWS2000
1600/


 http://www.001isp.com
E-mail:[EMAIL PROTECTED]
:0756-2125583 2125536 Fax:0756-2229669
QQ:108786611 77248929



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


binlog-ignore-db replicate-ignore-db problem

2003-03-11 Thread vlady
Hi All,
I am trying to set up a replication ignoring a given database, but 
unfortunatly it doesn't works (for me).
In my.cnf of my master I have at the end :
log-bin
server-id= 1
binlog-ignore-db=access

The line:  binlog-ignore-db=access  is supposed to make the master not 
to log updates for db access, but  but it doesn't, and I can see it 
examinig my bin log with mysqlbinlog

In the other hand on my repication in my.cnf  I have:
replicate-ignore-db=access
which is supposed to make the repication to not replicate for db 
access, but again it doesn't do this.

I know that it should works, so I suppose there is some misudrestanding 
at my side, so please help me with that.

There are a couple of my update queries in my bin-log:
update access.lastCheck set id = '7147671' where id = '123';
update access.lastCheck set id = '7147670' where id = '345';
.
Best regards
Vlady


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Desperate Sum(), Group by/Join question

2003-03-11 Thread Peter D Bethke
Hi all,

I've got a mysql application that tracks golf events where players pick 
winners. Each  event is associated by date with a pick period (ie a 
month).

I'm trying to get a COUNT() function to count all the picks by pick 
period for a given player (in this case id = 1). The following SQL:

SELECT

golf_pick_periods.id,
golf_pick_periods.contest_id,
golf_pick_periods.period_name,
golf_pick_periods.period_start_date,
golf_pick_periods.period_end_date,
COUNT(golf_player_picks.id) AS period_picks_count

FROM

database.golf_pick_periods

LEFT JOIN

database.golf_player_picks

ON

golf_player_picks.picks_player_id = 1

GROUP BY

golf_pick_periods.id

Yields the correct periods, but the SUM() is the same number for all of 
them when it should be different.

Can you have more than one GROUP BY clause? Essentially I'm grouping 
together the periods and in each period counting the picks. Help!

Best,

Peter D Bethke

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: SQL Statement Problems (NOT IN)

2003-03-11 Thread Phil Dowson
Quoting Bruce Feist [EMAIL PROTECTED]:

 Phil Dowson wrote:
 
 SELECT t1.t1id 
 FROM t1 
 LEFT JOIN t2 ON t1.t1id = t2.t2id 
 WHERE t2.t2gid  192  //an example of a gid I am using//
 
 This is close, it shows all the id's that exist in the t2 table without a
 t2.t2gid of 192, but I also need to show all t1.t1id's that exist in the t1
 table that do NOT exist in t2.
   
 
 Ah, I think I understand now.  Try
 
 SELECT t1.t1id 
 FROM t1 
 LEFT JOIN t2 ON t1.t1id = t2.t2id AND t2.t2gid  192  
 
 By including the condition on t2.t2gid  192 in the ON, you're saying that
 you only want the join to succeed if t2.t2gid  192.
 
 If I'm right about understanding what you want, then this is what ought to
 happen in various cases:
 
 1)  No t2's with t1.t1id = t2.t2id: display t1.t1id
 2)  t2's with t1.t1id = t2.t2id and t2.t2gid = 192: don't display anything. 
 (This is the one I'm least sure you want.)
 3)  t2's with t1.t1id = t2.t2id but no t2.t2gid = 192: display t1.t1id
 
 Can there be multiple t2 rows for a given t1 row, some with t2.t2gid = 192
 and some with t2.t2gid  192?  If so, what do you want to happen to them?
 
 Bruce
 
 
 
 

You know, this is confusing :-). I think you are beginning to get a better
understanding of my own system that I do.

 Can there be multiple t2 rows for a given t1 row, some with t2.t2gid = 192
 and some with t2.t2gid  192?

Yes, what I need to happen is that all rows concerned center around the
t2.t2gid. The statement needs to check only whether the row's t2gid doest not
exist as 192, if true then display the t1id. I then want the statement to ignore
any other entries in the table that have another t2gid value than 192.

Literally in MSSQL server you would have (but I cant use subselects)

SELECT t1id FROM t1 WHERE t1id NOT IN (SELECT t2id FROM t2 WHERE t2gid = 192)

OR say (simplified for my own purposes)

Only show t1id's that DO NOT appear in the statement SELECT t2id FROM t2 WHERE
t2gid = 192

Thanks for your continued help, I'm still learning

Phil

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

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



MySQL List

2003-03-11 Thread Bauer, Rich
My apologies if this is covered somewhere, but is there a web interface to
change mailing list options such as MIME/Plaintext digest options ?  The
EZMLM respone page from mysql-help does not reference a web interface or
other commands for controlling list options.

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

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



Desperate Sum(), Group by/Join question

2003-03-11 Thread Peter D Bethke
Hi all,

I've got a mysql application that tracks golf events where players pick 
winners. Each  event is associated by date with a pick period (ie a 
month).

I'm trying to get a COUNT() function to count all the picks by pick 
period for a given player (in this case id = 1). The following SQL:

SELECT

golf_pick_periods.id,
golf_pick_periods.contest_id,
golf_pick_periods.period_name,
golf_pick_periods.period_start_date,
golf_pick_periods.period_end_date,
COUNT(golf_player_picks.id) AS period_picks_count

FROM

database.golf_pick_periods

LEFT JOIN

database.golf_player_picks

ON

golf_player_picks.picks_player_id = 1

GROUP BY

golf_pick_periods.id

Yields the correct periods, but the SUM() is the same number for all of 
them when it should be different.

Can you have more than one GROUP BY clause? Essentially I'm grouping 
together the periods and in each period counting the picks. Help!

Best,

Peter D Bethke

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


One Simple Question

2003-03-11 Thread Joe Klein
I know that the file size limit for mySQL tables is
limited by the operating system. I want to confirm
that this is not a database size limit. Pardon my
being a novice, but I just want to be sure.

Thanks for the help, Joe

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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

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



Re: SQL Statement Problems (NOT IN)

2003-03-11 Thread gerald_clark


Phil Dowson wrote:

Literally in MSSQL server you would have (but I cant use subselects)

SELECT t1id FROM t1 WHERE t1id NOT IN (SELECT t2id FROM t2 WHERE t2gid = 192)

 

 SELECT t1id FROM t1 left join t2 ON t1.t1id =t2. t2id  AND 
t2.t2gid = 192 WHERE t2.t2id IS NULL

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


RE:RE SELECT not doing what is expected

2003-03-11 Thread rob
Pardon me,
   It should have read Player not Name in table 1. I don't get an error I get 
ID  | Name  |  Player |   goals  |  assists  |  shutouts   |  points
--
1   rob  J.Doe   2  35
1   K.Red  1   4 5  
1B.Blue 0  0 1   3
2  KeithL.Dog   112
2  C.Cat11   2
 


Here is the problem:
This query has only given the 1st instance of a player and his stats. ID 2 
,Keith ALSO HAS B.BLUE LISTED on one row of draftees. Why is that information 
not being printed out ?
I apologize if my original post was 
to vague...
Rob



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

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



Is there any way to search a whole database for a value?

2003-03-11 Thread Keith Roberts
I need to look in several different tables/columns in a database for a
particular value.  If I find it, I need to update it.  Is there any way to
search/update every table/column in one query in a particular database?

--
Keith Roberts
IT Manager - Laptops For Less
2995 White Star
Anaheim, CA 92806
http://www.laptopsforless.com
714.224.3980


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

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



Problems with JDBC autoReconnect and wait_timeout

2003-03-11 Thread Emma Wansbrough
Hi,
I am having major problems with persistant database connections on a 
resident process in java.

My database connection url looks like this:

jdbc:mysql://balti/log?autoReconnect=trueuser=rootpassword=pineapple

But it does not appear to be reconnecting because if I go into 
/etc/my.cnf and set variable wait_timout to be 3 seconds or so I get the 
usual java Communication Link exception, meaning the the connection has 
gone idle and no attempt has been made to reconnect.
the version I am using is mysql-connector-java-3.0.6-stable.

Another curious factor is that the wait_timout applies to my java 
connections but not when I run mysql as root.

Why is this?

The mysql version is mysql-max-4.0.9-gamma-pc-linux-i686

The most disturbing thing is that the url autoReconnect seems to not be 
working.
Emma.

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Is there any way to search a whole database for a value?

2003-03-11 Thread Mike Wexler
mysqldump dbname | grep 'text'



Keith Roberts wrote:

I need to look in several different tables/columns in a database for a
particular value.  If I find it, I need to update it.  Is there any way to
search/update every table/column in one query in a particular database?
--
Keith Roberts
IT Manager - Laptops For Less
2995 White Star
Anaheim, CA 92806
http://www.laptopsforless.com
714.224.3980
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


MySQL, GCC, and Solaris...

2003-03-11 Thread Trey Keifer
After trying to compile MySQL for several hours yesterday I finally found a
combination that works... under Solaris v2.9, using GCC 2.95.2, and MySQL
v3.23.54a I had a successful compile. Any upgrading of GCC or MySQL causes a
failure in the compilation of sql_lex.cc:85 - Has anyone encountered this?
Are there any explanations of causes or solutions? I have the environment
working now, but I'm worried about being able to upgrade if we encounter a
missing feature or security vulnerability.

-
Trey Keifer - [EMAIL PROTECTED]
CTO - Global Messaging Solutions, Inc.
913.338.3000 x309 - http://www.gmsi1.com


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

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



message from server: Not unique table/alias: 'USER_ROLE' ?

2003-03-11 Thread Mufaddal Khumri
What does the error mean ? - message from server: Not unique  
table/alias: 'USER_ROLE'

This happens when I try to use the java code:

PreparedStatement pstmt = con.prepareStatement(Select * From  
USER_ROLE, ROLE +
	WHERE USER_ROLE.USERID = ? And USER_ROLE.ROLEID = ROLE.ID);
			
pstmt.setInt(1, id);
ResultSet rs = pstmt.executeQuery();

 If i execute the same query at mysql prompt, it works perfectly fine  
as is. Is their a problem with the JDBC driver ?

Thanks.

The error thrown is:

java.sql.SQLException: Invalid argument value,  message from server:  
Not unique table/alias: 'USER_ROLE'
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1613)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:880)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:939)
	at com.mysql.jdbc.Connection.execSQL(Connection.java:1780)
	at  
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:143 
9)

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Problems with JDBC autoReconnect and wait_timeout

2003-03-11 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Emma Wansbrough wrote:
Hi,
I am having major problems with persistant database connections on a 
resident process in java.

My database connection url looks like this:

jdbc:mysql://balti/log?autoReconnect=trueuser=rootpassword=pineapple

But it does not appear to be reconnecting because if I go into 
/etc/my.cnf and set variable wait_timout to be 3 seconds or so I get the 
usual java Communication Link exception, meaning the the connection has 
gone idle and no attempt has been made to reconnect.
the version I am using is mysql-connector-java-3.0.6-stable.

Another curious factor is that the wait_timout applies to my java 
connections but not when I run mysql as root.

Why is this?

The mysql version is mysql-max-4.0.9-gamma-pc-linux-i686

The most disturbing thing is that the url autoReconnect seems to not be 
working.
Emma.


Have you read the README that comes with Connector/J 3.0.6? The 
autoReconnect behavior has changed:

Fail-over only happens when the connection is in a autoCommit(true) 
state, because fail-over can not happen reliably when a transaction is 
in progress. Most good application servers and connection pools
set autoCommit to 'true' at the end of every transaction/connection use.

	-Mark

- -- 
MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/

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

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+bj5ptvXNTca6JD8RAmXHAKCrKByD3CVmmbHvF/FA0EL+r11bywCfYj4b
fZp6fi41h0NNlm4b5CtJIzo=
=Sext
-END PGP SIGNATURE-
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Desperate Sum(), Group by/Join question - One Step closer...

2003-03-11 Thread Peter D Bethke
Ok, in regards to my previous dilemma, I've gotten it to:

SELECT
golf_pick_periods.id,
golf_pick_periods.period_name,
golf_pick_periods.period_start_date,
golf_pick_periods.period_end_date,
COUNT(DISTINCT golf_events.id) AS num_events,
COUNT(golf_player_picks.id) AS period_picks_count
FROM

database.golf_pick_periods
database.golf_player_picks
LEFT JOIN

	database.golf_events

ON

	(golf_events.event_start_date = golf_pick_periods.period_start_date

AND

	golf_events.event_end_date = golf_pick_periods.period_end_date)

WHERE

	golf_player_picks.picks_player_id = 1

AND

	golf_player_picks.picks_event_id = golf_events.id

GROUP BY

	golf_pick_periods.id

It's returning rows for periods where there is more than 1 pick (and 
counting those picks too). I need it to return all the periods. It's 
some kind of Left Join I'm sure but I can't figure how to reform the 
query to use a left join to return rows where the number of picks in a 
period is null. Arrg!

Peter

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


what's the best format option for importing SQL Server databases?

2003-03-11 Thread kenn murrah
Greetings.

I've been challenged with an assignment in which my client will feed me a 9000-record 
SQL Server database every night,  and I in turn will need to import the data into 
mySQL, replacing the mySQL database from the night before ...

Given that scenario, and the fact that I obviously want to be able to automate the 
process via scripting, what is the best format for my client to send the database in?  
They've volunteered that the feed can be almost any format you want ... sooo, 
what do i want?  what would be the easiest to work with?

Any ideas?

thanks in advance,

kenn



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

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



Re: what's the best format option for importing SQL Server databases?

2003-03-11 Thread Shamit Verma
CSV would be the easiest way.

-Shamit Verma
(http://vshamit.com)
- Original Message -
From: kenn murrah [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 1:54 AM
Subject: what's the best format option for importing SQL Server databases?


Greetings.

I've been challenged with an assignment in which my client will feed me a
9000-record SQL Server database every night,  and I in turn will need to
import the data into mySQL, replacing the mySQL database from the night
before ...

Given that scenario, and the fact that I obviously want to be able to
automate the process via scripting, what is the best format for my client to
send the database in?  They've volunteered that the feed can be almost any
format you want ... sooo, what do i want?  what would be the easiest to
work with?

Any ideas?

thanks in advance,

kenn



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

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



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

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



Re: message from server: Not unique table/alias: 'USER_ROLE' ?

2003-03-11 Thread Paul DuBois
At 12:50 +0530 3/11/03, Mufaddal Khumri wrote:
What does the error mean ? - message from server: Not unique 
table/alias: 'USER_ROLE'

This happens when I try to use the java code:

PreparedStatement pstmt = con.prepareStatement(Select * From 
USER_ROLE, ROLE +
	WHERE USER_ROLE.USERID = ? And USER_ROLE.ROLEID = ROLE.ID);

pstmt.setInt(1, id);
ResultSet rs = pstmt.executeQuery();
 If i execute the same query at mysql prompt, it works perfectly 
fine as is. Is their a problem with the JDBC driver ?
When you execute the query at the mysql prompt, you're probably providing
the required space between ROLE and WHERE.  The query shown above appears
to have no such space, which somewhat changes the semantics of the query.
Thanks.

The error thrown is:

java.sql.SQLException: Invalid argument value,  message from server: 
Not unique table/alias: 'USER_ROLE'
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1613)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:880)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:939)
	at com.mysql.jdbc.Connection.execSQL(Connection.java:1780)
	at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1439)


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: what's the best format option for importing SQL Server databases?

2003-03-11 Thread Paul DuBois
At 14:24 -0600 3/11/03, kenn murrah wrote:
Greetings.

I've been challenged with an assignment in which my client will feed 
me a 9000-record SQL Server database every night,  and I in turn 
will need to import the data into mySQL, replacing the mySQL 
database from the night before ...

Given that scenario, and the fact that I obviously want to be able 
to automate the process via scripting, what is the best format for 
my client to send the database in?  They've volunteered that the 
feed can be almost any format you want ... sooo, what do i 
want?  what would be the easiest to work with?
Tell them you want a file that's in the same format that mysqldump
would generate. :-)
Any ideas?

thanks in advance,

kenn


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Is there any way to search a whole database for a value?

2003-03-11 Thread Paul DuBois
At 11:01 -0800 3/11/03, Keith Roberts wrote:
I need to look in several different tables/columns in a database for a
particular value.  If I find it, I need to update it.  Is there any way to
search/update every table/column in one query in a particular database?
No.

--
Keith Roberts
IT Manager - Laptops For Less
2995 White Star
Anaheim, CA 92806
http://www.laptopsforless.com
714.224.3980


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Using ssh tunnel and mysql

2003-03-11 Thread Rick Mann
on 3/10/03 1:55 PM, Pete Harlan at [EMAIL PROTECTED] wrote:

 So your db is on foo.bar.com, and that's the machine you're sshing
 into?  If so, then you might try
 
 ssh -n -N -L 3307:127.0.0.1:3306 foo.bar.com
 
 Since, once on the new host, it's the localhost's IP address you want
 to connect to.

Ah. That was it. That fixed the tunnel, and now both mysql and MacSQL work
properly. Thank you!

-- 
Rick


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

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



Re: Is there any way to search a whole database for a value?

2003-03-11 Thread Joshua J . Kugler
A request such as this make me think the database is not properly normalized. 
 If there is one value that can be in several columns, it is very likely 
those columns need to be broken into their own table, so that they can be 
queried with a SELECT statement that has only one column in its WHERE clause.

Hope that helps.

j- k-

On Tuesday 11 March 2003 12:30, Paul DuBois wrote:
 At 11:01 -0800 3/11/03, Keith Roberts wrote:
 I need to look in several different tables/columns in a database for a
 particular value.  If I find it, I need to update it.  Is there any way to
 search/update every table/column in one query in a particular database?

 No.

mysql, query

-- 
Joshua Kugler, Information Services Director
Associated Students of the University of Alaska Fairbanks
[EMAIL PROTECTED], 907-474-7601

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

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



help needed

2003-03-11 Thread Slawomir Orlowski




 Hello,
 I have RH 6.1.
 I have mysql 3.22.25 version binary installation
 databases are in /var/lib/mysql
 binaries in /usr/bin/mysql etc
 /var/lib/mysql/mysql.pid
 /var/lib/mysql/=mysql.sock
 and rpm packages:
 perl-DBI-1.13-1,
 perl-DBD-mysql-mysql-1.22.10-1
 perl-5-5.0050
 and binary installation of php 4.04pl
 and it was working perfectly (I have web page written in php and perl),

 Yesterday I have installed from source (to old RH to get binary
 installation) mysql 3.23.55.
 It compiled perfectly and was installed in
 /usr/local/mysql
 databases in
 /usr/local/mysql/var

 I have stoped old mysql server and run new one.

 I could connect with new /usr/local/mysql/bin/mysql client (old one was not
 working) and select data from moved databases.
 problem is that web pages are not working any more,
 after running by hand some script (which use to work) I'm getting:
 
 Date::Parse is not available but requested by Class::Date
 DBI-connect(database=class;host=localhost) failed: Can't connect to local
 MySQL server through socket '/var/lib/mysql/mysql.sock' (111) at ./class
 line 27
 Can't call method prepare on an undefined value at ./class line 156.
 
 it looks to me that that it somehow is trying to connect to old not working
 mysql database.
 because now mysql.sock is in /tmp/=mysql.sock
 I have found somewhere that pearl script I can add directive:
 mysql_read_default_file
 $dbh = DBI-connect(DBI:mysql:$database
 . ;mysql_read_default_file=$ENV{HOME}/.my.cnf,
 $user, $password);
 I did and it worked, but I do not know what to do in php scripts (I do not
 know php I'm admin) and it is daunting job to change manually all perl
 scripts.

 So any advice would be appreciated.

 Best regards
 Slawomir Orlowski



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

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



Re: MyODBC: SQLBindParameter mix DATA_AT_EXEC with direct boundparam eters

2003-03-11 Thread Venu
On Mon, 2003-03-10 at 09:40, Naumann, Frank wrote:
 Hi all,

Hi !!

 
 I found a problem (bug?) when updating a blob column via MyODBC. The
 statement i run is like that:
 
 UPDATE blob_table SET blob_col = ? where id = ?
 
 when i do NOT bind the restriction as input parameter, but write it directly
 in the string, it works perfectly.
 
 but when i want to bind the restriction directly, the following happens:
 
 1. I bind the blob_col with SQL_LEN_DATA_AT_EXEC(length) as indikator
 (SQLBindParameter returns SQL_SUCCESS)
 2. I bind the id restriction directly to a program variable
 (SQLBindParameter returns SQL_SUCCESS)
 3. I call SQLExecute, it returns SQL_NEED_DATA as expected.
 4. I call SQLParamData to access the blob_col, it returns also SQL_NEED_DATA
 as expected.
 5. I call several times SQLPutData to fill the blob_col, each returns with
 SQL_SUCCESS
 6. I call SQLParamData to indicate that the blob_col is populated with data
 completely and would expect SQL_SUCCESS.

I just tested it, and it returns SQL_SUCCESS unless if you have more
parameters data to be supplied during the run-time. 

Possible reason could be, you might have specified the same pcbLength
buffer to all parameters in SQLBindParameter.

Here is a simple snippet from the test suite for the similar case:

..
..
rc = SQLPrepare(hstmt,update t_putdata set c2= ? where c1 =
?,SQL_NTS);
mystmt(hstmt,rc);

rc = SQLBindParameter(hstmt,1,SQL_PARAM_INPUT,SQL_C_CHAR,
  SQL_LONGVARCHAR,0,0,
  (SQLPOINTER)1,0,pcbLength);

rc = SQLBindParameter(hstmt,2,SQL_PARAM_INPUT,SQL_C_LONG,
  SQL_INTEGER,0,0,c1,0,NULL);

pcbLength =  SQL_LEN_DATA_AT_EXEC(0);

c1 = 10;
rc = SQLExecute(hstmt);
myassert(rc == SQL_NEED_DATA);

rc = SQLParamData(hstmt, token);
myassert(rc == SQL_NEED_DATA);

strcpy(data,mysql ab);
rc = SQLPutData(hstmt,data,6);
mystmt(hstmt,rc);

strcpy(data,- the open source database company);
rc = SQLPutData(hstmt,data,strlen(data));
mystmt(hstmt,rc);

rc = SQLParamData(hstmt, token);
mystmt(hstmt,rc);

SQLFreeStmt(hstmt, SQL_RESET_PARAMS);
SQLFreeStmt(hstmt, SQL_CLOSE);

..
..

The data updated is:

 data: mysql - the open source database company(40)

Thanks

-- 
Regards, Venu
For technical support contracts, go to https://order.mysql.com
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Mr. Venu [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Developer
/_/  /_/\_, /___/\___\_\___/  Palo Alto, CA-94306, USA
   ___/  www.mysql.com

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


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

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



wrong time in m$office

2003-03-11 Thread [EMAIL PROTECTED]
hi,

m$office (office 2000 - win xp) can not handle the time correct.
openoffice (win-xp or redhat-phoebe3)  has no problems.
what´s wrong?

MyODBC-windows 3.51

$ rpm -q MyODBC
MyODBC-2.50.39-11
$ rpm -q mysql-server
mysql-server-3.23.54a-4
mysql describe stunden;
++--+--+-++---+
| Field  | Type | Null | Key | Default| Extra |
++--+--+-++---+
| std_nr | int(10)  | YES  | | 0  |   |
| std_bz | varchar(10)  |  | ||   |
| std_datum  | date |  | | -00-00 |   |
| std_von| time |  | | 00:00:00   |   |
| std_bis| time |  | | 00:00:00   |   |
| std_taetigkeit | varchar(100) |  | ||   |
| std_bemerkung  | varchar(20)  | YES  | | NULL   |   |
++--+--+-++---+
7 rows in set (0.00 sec)
mysql select std_datum,std_von,std_bis from stunden;
++--+--+
| std_datum  | std_von  | std_bis  |
++--+--+
| 2002-07-02 | 14:00:00 | 17:00:00 |
| 2002-07-03 | 09:30:00 | 10:00:00 |
| 2002-07-03 | 13:00:00 | 13:30:00 |
| 2002-07-09 | 10:00:00 | 14:30:00 |
| 2002-07-15 | 09:30:00 | 12:30:00 |
| 2002-07-16 | 14:00:00 | 17:00:00 |
| 2002-07-22 | 11:30:00 | 12:00:00 |
| 2002-07-24 | 13:00:00 | 17:00:00 |
| 2002-10-11 | 00:00:00 | 00:00:00 |
| 2003-12-12 | 01:01:01 | 02:02:02 |
++--+--+
10 rows in set (0.00 sec)
results eg. in m$access
02.07.20002
03.07.20002 30.05.2011 23:51:41
03.07.20002 30.05.2015 23:51:41
15.07.20002 30.05.2011 23:51:41 30.05.2016 23:51:41
16.07.20002 30.05.2014 23:51:41
22.07.20002 30.05.2011 23:51:41
24.07.20002
11.10.20002
12.12.20002 30.12.2000 23:51:41 30.01.2002 23:51:41
--
shrek-m
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


MySQL database on a Linux ramdisk partition?

2003-03-11 Thread Seth Brundle
Is it possible to place MySQL data directories on a Linux ramdisk mount?

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

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



MySQL and Redhat 7.3

2003-03-11 Thread b b

 Greetings,
 I am new to this list so I don't know if this topic
has been pounced around or not. DOES MYSQL WORK ON
REDHAT? I got Redhat 7.3 and MySQL 3.23.55
 I tried binary installations. I tried installing from
source too. When I finally run the 
 /usr/local/mysql/bin/safe_mysqld --user=mysql  I
get:
Starting mysqld daemon with databases from
/usr/local/mysql/var
030311 17:27:18  mysqld ended

 Yes I have already ran script/install_db ...to
initialize the data and it ran fine. Any suggestions
or is it just Redhat?

 Thanks,
R.

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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

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



Re: message from server: Not unique table/alias: 'USER_ROLE' ?

2003-03-11 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Paul DuBois wrote:
At 12:50 +0530 3/11/03, Mufaddal Khumri wrote:

What does the error mean ? - message from server: Not unique 
table/alias: 'USER_ROLE'

This happens when I try to use the java code:

PreparedStatement pstmt = con.prepareStatement(Select * From 
USER_ROLE, ROLE +
WHERE USER_ROLE.USERID = ? And USER_ROLE.ROLEID = ROLE.ID);

pstmt.setInt(1, id);
ResultSet rs = pstmt.executeQuery();
 If i execute the same query at mysql prompt, it works perfectly fine 
as is. Is their a problem with the JDBC driver ?


When you execute the query at the mysql prompt, you're probably providing
the required space between ROLE and WHERE.  The query shown above appears
to have no such space, which somewhat changes the semantics of the query.
Thanks.

The error thrown is:

java.sql.SQLException: Invalid argument value,  message from server: 
Not unique table/alias: 'USER_ROLE'
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1613)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:880)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:939)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1780)
at 
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1439) 
I concur with Paul (if you're code above is not a typo), the query you 
are executing is:

Select * From USER_ROLE, ROLEWHERE USER_ROLE.USERID = ? And 
USER_ROLE.ROLEID = ROLE.ID

	-Mark

- -- 
MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/

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

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+bmLQtvXNTca6JD8RAg/8AJ96tufOsgzld94xsxHNSHCpaxZJrQCfQXVT
1pFZYtUmr0mFa1a0WAYOwUY=
=sUJO
-END PGP SIGNATURE-
-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: MySQL database on a Linux ramdisk partition?

2003-03-11 Thread Gabriel Tataranu

Hi,

Is it possible to place MySQL data directories on a Linux ramdisk mount?

Oh yes. No fragmentation aftertaste.

Regards,

Gabriel

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

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



RE: MySQL Shutdown FAILED

2003-03-11 Thread Daevid Vincent
Yeah, I notice this too, especially after upgrading to MAX. I really find it
annoying.

My guess is that the RPM is slightly different than the God given RH
version, so there are TWO KXXmysqld in /etc/rc.d/init.d or in one of the
rc.3 or rc.5 or something and so one shuts it down, then the other executes
and it fails b/c it was already shut down. I sooo wish the person that
packages that RPM would fix this. Same with the mysql-max issue. It creates
a mysql instead of mysqld (or vise versa), and it doesn't have that nice:
Loading mysql [ok] style thing, it just barfs some ugly text instead.
Eeek!

 -Original Message-
 From: Karen Tan [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 10, 2003 4:53 PM
 To: [EMAIL PROTECTED]
 Subject: MySQL Shutdown FAILED
 
 
 
 
 I have just upgraded from MySQL 3.23.32 to 3.23.55 on my 
 RedHat 8 server. 
  Everything is working fine except that I get FAILED for 
 MySQL when shutting down. 
  I have not changed any settings at all.  And the FAILED message does 
 not seem to affect anything with MySQL operations.  How do I 
 go abt checking what is causing 
 the message?  Someone pls help!  Thanx.
 
 -Karen


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

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



Re: Altering table which has FOREIGN KEY constraints

2003-03-11 Thread Heo, Jungsu
Reznichenko, Thank you for your answer!

 What do you mean could not execute a query on those tables?
 Could you be more detailed?

Ok. let me explain.

When I was using MySQL 4.0.10,

After I add columns with ALTER TABLE on foreign key referencing table so many
times,
when I execute SELECT * FROM child, MySQL session is deaded with Seg. fault.
even if I execute drop table child. so I rebuilded entire InnoDB Table with
back-up data.

I don't have error log and test-bed at this time.

I wanna know that this problem is fixed in MySQL 4.0.11.


- Original Message -
From: Victoria Reznichenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 10, 2003 10:32 PM
Subject: re: Altering table which has FOREIGN KEY constraints


 On Saturday 08 March 2003 09:09, Heo Jungsu wrote:

  I have a question about altering table which has foreign key constraints.
 
  MySQL manual says that :
 
  In InnoDB versions  3.23.50 ALTER TABLE or CREATE INDEX should not be
  used in connection with tables which have foreign key constraints or which
  are referenced in foreign key constraints: .. (omitted) .. A CREATE INDEX
  statement is in MySQL processed as an ALTER TABLE, and these restrictions
  apply also to it.  on http://www.mysql.com/doc/en/SEC457.html
 
  But, how abount InnoDB versions = 3.23.50?
 
  Version 4.0.11 still cannot alter referencing table and referenced table?

 It can and MySQL doesn't remove foreign key constraint.

  What's the safe query in below lits (MySQL 4.0.11) ?
 
  * alter referencing table
  * alter referenced table
  * create index on referencing table
  * create index on referenced table.

 They are all safe ...

  When I have used MySQL 4.0.10 If I alter referencing and referenced table
  several times,
  sometimes I could not execute a query on those tables even drop table
  (So I rebuilded entire InnoDB ;-( )

 What do you mean could not execute a query on those tables?
 Could you be more detailed?


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





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

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



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

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



MATCH / AGAINST fatal bug

2003-03-11 Thread Mathias Berchtold
MATCH / AGAINST  fatal bug  


MySQL version: 4.0.11-gamma
OS : Windows 2000 SP3
RAM: 1GB Apacer
Free Disk Space: 32GB
HD Write Back Cache: Disabled

Under some circumstances the following query does never terminate. The
win32 service cannot be stopped either  = FATAL. 

SELECT f.id as id, fs.name as name, MATCH (f.title,f.body) AGAINST
('550') AS score FROM file as f, filesys as fs WHERE f.id = fs.fileid
AND MATCH (f.title,f.body) AGAINST ('550')  0 ORDER by score DESC

Same behavior can be seen with HAVING score  0 or when using BOOLEAN
mode.

If you are not interested in fixing this bug any advice how to
circumvent this bug would be appreciated. 

Thanks a lot.
-Mat
SmartFTP.com

mysqladmin -proc Output
===

| 25850 | kb   | localhost | kb | Query   | 17497 | Copying to tmp table
| SELECT f.id as id, fs.name as name, MATCH (f.title,f.body) AGAINST
('2147220991') AS score FROM file |
OR
| 37522 | kb   | localhost | kb | Query   | 1323 | Copying to tmp table
| SELECT f.id as id, fs.name as name, MATCH (f.title,f.body) AGAINST
('550') AS score FROM file as f,  |
OR
| 56040 | kb   | localhost | kb | Query   | 13095 | Copying to tmp table
| SELECT f.id as id, fs.name as name, fs.id as fsid, MATCH
(f.title,f.body) AGAINST ('asteriks') AS sc |

Table Structure
===

#
# Table structure for table `file`
#

CREATE TABLE file (
  id int(11) NOT NULL auto_increment,
  title text,
  version varchar(255) default NULL,
  created int(11) NOT NULL default '0',
  modified int(11) default NULL,
  body text,
  hits int(11) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY modified (modified),
  KEY hits (hits),
  KEY created (created),
  FULLTEXT KEY titlebody (title,body),
  FULLTEXT KEY body (body)
) TYPE=MyISAM;

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

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



Re: MySQL and Redhat 7.3

2003-03-11 Thread Terence
Check the log for error messages, it's in the data directory...
/usr/local/mysql/data/

- Original Message -
From: b b [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 6:27 AM
Subject: MySQL and Redhat 7.3



 Greetings,
 I am new to this list so I don't know if this topic
has been pounced around or not. DOES MYSQL WORK ON
REDHAT? I got Redhat 7.3 and MySQL 3.23.55
 I tried binary installations. I tried installing from
source too. When I finally run the
 /usr/local/mysql/bin/safe_mysqld --user=mysql  I
get:
Starting mysqld daemon with databases from
/usr/local/mysql/var
030311 17:27:18  mysqld ended

 Yes I have already ran script/install_db ...to
initialize the data and it ran fine. Any suggestions
or is it just Redhat?

 Thanks,
R.

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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

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


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

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



MySQL Web Server ?

2003-03-11 Thread www.ReadNotify.com
Hi, I'm a MySQL newbie - Is there a MySQL Web Server
product ?  Oracle has their OWS (Oracle Web Server)
for example.

Can anyone reccomend a *very* lightweight web server
with enough scripting ability to talk to MySQL -
preferably for RedHat?

Thx!

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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

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



Re: MySQL Web Server ?

2003-03-11 Thread massey
The one and only Apache web serverG

 Hi, I'm a MySQL newbie - Is there a MySQL Web Server
 product ?  Oracle has their OWS (Oracle Web Server)
 for example.

 Can anyone reccomend a *very* lightweight web server
 with enough scripting ability to talk to MySQL -
 preferably for RedHat?

 Thx!

 __
 Do you Yahoo!?
 Yahoo! Web Hosting - establish your business online
 http://webhosting.yahoo.com

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

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



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

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



terrible replication annoyance

2003-03-11 Thread Dan Rossi
hi guys , i have posted here a few times already and i have trawled the list
archives and tried every tutorial on the topic without any luk , i am still
getting this error, why cant it read the master log saying it isnt open ?
the user i have used has ALL permissions, if i set log-bin in the slave
aswell i wont get any errors but it wont sync or replicate anyway, what is
my problem this is a real pain , there is no leads to my problem and the
error log does not tell me anything and is confusing. can anyone help ?

030310 06:46:35  mysqld started
030310  6:46:38  InnoDB: Started
/usr/local/etc/mysqlslave/libexec/mysqld: ready for connections.
Version: '4.0.11a-gamma'  socket: '/usr/local/etc/mysqlslave/tmp/mysql.sock'
port
: 3307
030310  6:46:39  Slave I/O thread: connected to master
'[EMAIL PROTECTED]:330
6',  replication started in log 'FIRST' at position 4
030310  6:46:39  Error reading packet from server: Binary log is not open
(server_
errno=1236)
030310  6:46:39  Got fatal error 1236: 'Binary log is not open' from master
when r
eading data from binary log
030310  6:46:39  Slave I/O thread exiting, read up to log 'FIRST', position
4
030310  7:33:18  Slave I/O thread: connected to master
'[EMAIL PROTECTED]:330
6',  replication started in log 'replication.003' at position 79
030310  7:33:18  Error reading packet from server: Binary log is not open
(server_
errno=1236)
030310  7:33:18  Got fatal error 1236: 'Binary log is not open' from master
when r
eading data from binary log
030310  7:33:18  Slave I/O thread exiting, read up to log 'replication.003',
posit
ion 79
030310  7:36:31  Slave I/O thread: connected to master
'[EMAIL PROTECTED]:330
6',  replication started in log 'replication.003' at position 79
030310  7:36:31  Error reading packet from server: Binary log is not open
(server_
errno=1236)
030310  7:36:31  Got fatal error 1236: 'Binary log is not open' from master
when r
eading data from binary log
030310  7:36:31  Slave I/O thread exiting, read up to log 'replication.003',
posit
ion 79

my mysql slave settings

[mysqld]
port= 3307
socket  = /usr/local/etc/mysqlslave/tmp/mysql.sock
master-host=localhost
#master-user=replicate
master-user=electroteque
master-password=***
#master-password=Replic8
master-port=3306
master-info-file = master.log
master-connect-retry = 60
#set-variable = net_read_timeout=3600
replicate-do-db = electroteque
log-slave-updates
slave_net_timeout = 3600
#master-connect-retry=60
#report-host=localhost
#report-port=3307
server-id=2
#log-bin
#skip-locking

slave status gives me

+-+--+-+---+
-+
-+--+---+---
+-
-+---+-+
-+
++--+-+-
+
| Master_Host | Master_User  | Master_Port | Connect_retry | Master_Log_File
| Rea
d_Master_Log_Pos | Relay_Log_File   | Relay_Log_Pos |
Relay_Master_Log_File |
Slave_IO_Running | Slave_SQL_Running | Replicate_do_db | Replicate_ignore_db
| Las
t_errno | Last_error | Skip_counter | Exec_master_log_pos | Relay_log_space
|
+-+--+-+---+
-+
-+--+---+---
+-
-+---+-+
-+
++--+-+-
+
| localhost   | electroteque | 3306| 60| replication.003
| 79
 | celery-relay-bin.001 | 4 | replication.003
|
No   | Yes   | electroteque|
| 0
|| 0| 79  | 4
|
+-+--+-+---+
-+
-+--+---+---
+-
-+---+-+
-+
++--+-+-
+

master settings are

[mysqld]
port= 3306
socket  = /usr/local/etc/mysqlmaster/tmp/mysql.sock
server-id=1
log-bin=/usr/local/etc/mysqlmaster/logs/replication.log
log-bin-index=db.index
log-slave-updates
binlog-do-db = electroteque


master status

+-+--+--+--+
| File| Position | Binlog_do_db | Binlog_ignore_db |
+-+--+--+--+
| replication.003 | 79   | electroteque |  |
+-+--+--+--+




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

To 

Re: Large resultset

2003-03-11 Thread Roland Carlsson
Thanks, that solved the problem. I thought that I could have my own
fetch-size but I has now understood that Integer.MIN_VALUE is the only size
that is accepted.

Regards
Roland Carlsson

- Original Message -
From: Mark Matthews [EMAIL PROTECTED]
To: Roland Carlsson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 2:17 PM
Subject: Re: Large resultset


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Roland Carlsson wrote:
  Hi!
  I have a query that returns a resultset of 70 mb. I'd somehow would like
  J/Connector to fetch only small pieces using Statement.setFetchSize but
it
  still get the whole ResultSet at once and then I get an
OutOfMemoryError.
 
  Is it a bug in setFetchSize? Does J/Connector ignore it? Have I totally
  missunderstood what setFetchSize does?
 
  I use J/Connector 3.0.6
 
  Regards
  Roland Carlsson

  From the README:

 If you need to stream result sets, row-by-row, the driver
 now supports this. What you need to do is create a statement in the
 following manner:

stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY,
  java.sql.ResultSet.CONCUR_READ_ONLY);

stmt.setFetchSize(Integer.MIN_VALUE);

 This serves as a signal to the driver to stream result sets
 row-by-row. After this any result sets created with the statement
 will be retrieved row-by-row.

 There are some caveats with this approach. You will have
 to read all of the rows in the result set (or close it)
 before you can issue any other queries on the connection,
 or an exception will be thrown. Some of the positioning methods
 will not work as well, especially ones that require 'knowledge'
 of the entire result set, like isBeforeFirst(), isAfterLast()
 (when the result set is empty), absolute(), relative(), isLast()
 (call .next() and check for a 'false' return value instead). This
 is because the driver does not know how many rows are going to be
 returned.


 -Mark

 - --
 MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/

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

  __  ___ ___   __
 /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
   /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
  ___/ www.mysql.com
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.1.90 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iD8DBQE+beH7tvXNTca6JD8RAoqNAJ9mEjOAfVcK1Cc2ltjR8RW9ylYJBgCgpwUW
 CQ/E6VZD56TR5eA+pGA0wQQ=
 =VSZ1
 -END PGP SIGNATURE-



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

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



mysqlcc - release 0.8.10-beta - show create

2003-03-11 Thread Hr. Michael Scheidt
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: mysqlcc - release 0.8.10-beta - show create

Description:
If there are more than one database (database1, database2, database3)
connected by MySQLCC, and you will start the function show create
for one of the tables of database2, you get not an correct response,
but an error-message:
ERROR 1146: Table 'database1.tablename' doesen't exist.
Same result after 'disconnect' database1.
How-To-Repeat:
start mysqlcc,
connect to more than one database,
let you show all tables of the second database,
click on one of the listed tables,
start the function show create
Fix:

Submitter-Id:  [EMAIL PROTECTED]

Originator:Michael Scheidt

Organization:  Moeller Werke GmbH
Kupferhammer
D-33649 Bielefeld
PHONE 0049 521 44 77 132
FAX 0049 521 44 77 222

MySQL support: none
Synopsis:  bad function show create
Severity:  non-critical
Priority:  low
Category:  mysqlcc
Class: sw-bug
Release:   mysqlcc-0.8.10-beta

Environment:   FUJITSU-SIEMENS,
Windoz 2000 SP2

System: Linux dbssv1 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 
unknown (database-server)
Architecture:   i686

Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc 
/usr/bin/cc
GCC:Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS='-O2 -march=i486 
-mcpu=i686  -D_FILE_OFFSET_BITS=64 
 -D_LARGEFILE_SOURCE 
-felide-constructors
-fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC:
-rwxr-xr-x1 root root  1394238 Mär 23  2002 /lib/libc.so.6
-rw-r--r--1 root root 25361424 Mär 23  2002 /usr/lib/libc.a
-rw-r--r--1 root root  178 Mär 23  2002 /usr/lib/libc.so
-rw-r--r--1 root root   869190 Mär 23  2002 
/usr/lib/libc-client.a
lrwxrwxrwx1 root root   20 Okt  7 14:54 
/usr/lib/libc-client.so - libc-client.so.2001a
-rwxr-xr-x1 root root   725296 Mär 23  2002 
/usr/lib/libc-client.so.2001a
Configure command: ./configure  --disable-shared 
--with-mysqld-ldflags=-static --with-client-ldflags=-static 
--without-berkeley-db --without-innodb --enable-assembler 
--enable-large-files --infodir=/usr/share/info --libdir=/usr/lib 
--libexecdir=/usr/sbin --localstatedir=/var/lib/mysql 
--mandir=/usr/share/man --prefix=/usr --sysconfdir=/etc 
--with-mysqld-user=mysql --without-debug --datadir=/usr/share 
--includedir=/usr/include --with-extra-charsets=complex 
--with-unix-socket-path=/var/lib/mysql/mysql.sock --with-libwrap


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

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