Protocol mismatch, Server Version = 9 Client Version =

2003-09-06 Thread Karam Chand
Hello

I have a C app that uses libmysql.dll provided with
MySQL 4.1.0-max-nt distribution. I am trying to
connect to a remote server running MySQL 3.23.47 and I
get the error -

Error No. 2007 
Protocol mismatch, Server Version = 9 Client Version =
10

whenever I try to connect using mysql_real_connect().

What am I doing wrong? Thanks in advance.

Karam


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Error No. 2007 Protocol mismatch, Server Version = 9 Client Version = 10

2003-09-06 Thread Karam Chand
Hello

I have a C app that uses libmysql.dll provided with
MySQL 4.1.0-max-nt distribution. I am trying to
connect to a remote server running MySQL 3.23.47 and I
get the error -

Error No. 2007 
Protocol mismatch, Server Version = 9 Client Version =
10

whenever I try to connect using mysql_real_connect().

What am I doing wrong? Thanks in advance.

Karam


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Fulltext Index and Unicode (MySQL 4.1)

2003-09-06 Thread Sergei Golubchik
Hi!

On Sep 06, Andreas Schwarz wrote:
> Egor Egorov wrote:
> > Andreas Schwarz <[EMAIL PROTECTED]> wrote:
> >> 
> >> is it possible to use Fulltext indexes on unicode (UTF-8 or UCS-2)
> >> fields in 4.1?
> >> 
> > 
> > Nope. Fulltext search doesn't work with multi-byte character sets.
> 
> Will this be fixed in future versions? Otherwise I would have to
> do the indexing manually.

Yes, it will.

Regards,
Sergei

-- 
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, Senior Software Developer
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   <___/  www.mysql.com

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



Re: Help with the "IN" operator

2003-09-06 Thread Paul DuBois
At 11:25 -0400 9/6/03, Roger Davis wrote:
I am having a bit of trouble with the "IN" operator.  I am thinking that it
just may be my misunderstanding.
Situation.
I have a table (ZipCounty) that I want to pull vendors from based on
zipcode.  So I have a Vendor like field declared as TEXT.  To keep the table
up to date, I issuse updates in the manor of...
 UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'528',CONCAT(VendorLink,',528')) WHERE State = 'CA' AND 528 NOT IN
(VendorLink);
IN() takes a list of values to look for. It does not take a value that itself
consists of a list of values.  In your statement above, the IN expression
will be true only if the value of VendorLink is exactly 528.
Where 528 would be the ID of that particular vendor.  These updates work
fine, but later if I need to do another update, say to remove 528 from the
VendorLink field, I can find all of the the records where 528 is the only
number in the field, or if it is the first number in the field, but not if
it is the last number in the field.
This sounds like you don't want VendorLink values that begin with 528 followed
by either the end of the value or a comma.  You might try a REGEXP pattern
match such as this:
NOT (VendorLink REGEXP '^528($|,)')

Here's how the pattern works with some sample values:

++-+
| VendorLink | NOT (VendorLink REGEXP '^528($|,)') |
++-+
| 528|   0 |
| 5289   |   1 |
| 528,1  |   0 |
| 5289,1 |   1 |
| 1,528  |   1 |
| 1,5289 |   1 |
++-+
Note that REGEXP will return NULL if VendorLink is NULL.

Hope someone can help me out.

Roger

Here are a few selects

mysql> SELECT Count(ID) FROM ZipCounty WHERE VendorLink = '529,528';
+---+
| Count(ID) |
+---+
|  1384 |
+---+
1 row in set (0.25 sec)
mysql> SELECT Count(ID) FROM ZipCounty WHERE '528' IN (VendorLink);
+---+
| Count(ID) |
+---+
| 0 |
+---+
1 row in set (0.25 sec)
mysql> SELECT VendorLink, Count(ID) FROM ZipCounty WHERE VendorLink IS NOT
NULL GROUP BY VendorLink;
++---+
| VendorLink | Count(ID) |
++---+
| 529|  3844 |
| 529,528|  1384 |
++---+
2 rows in set (0.61 sec)
Why do I get a count of 0 for the Second Query?

Here is a list of all the queries and output. (redhat 9.0 version 2.23.54)

This also happens on the latest Windows version (mysql  Ver 12.21 Distrib
4.0.14, for Win95/Win98 (i32))
mysql> \s
--
mysql  Ver 11.18 Distrib 3.23.54, for redhat-linux-gnu (i386)
Connection id:  59756
Current database:   TPZ
Current user:   [EMAIL PROTECTED]
Current pager:  stdout
Using outfile:  ''
Server version: 3.23.54
Protocol version:   10
Connection: Localhost via UNIX socket
Client characterset:latin1
Server characterset:latin1
UNIX socket:/var/lib/mysql/mysql.sock
Uptime: 12 days 19 hours 38 min 36 sec
Threads: 2  Questions: 2354432  Slow queries: 43  Opens: 143  Flush tables:
1  Open tables: 64 Queries per second avg: 2.126
--
mysql> SHOW CREATE TABLE ZipCounty;
+---+---




+
| Table | Create Table
|
+---+---




+
| ZipCounty | CREATE TABLE `ZipCounty` (
  `ID` int(11) NOT NULL auto_increment,
  `City` varchar(50) default NULL,
  `State` char(2) default NULL,
  `Zip` varchar(10) default NULL,
  `AreaCode` char(3) default NULL,
  `County` varchar(50) default NULL,
  `VendorLink` text,
  `OtherLink` text,
  PRIMARY KEY  (`ID`),
  KEY `Zip` (`Zip`),
  KEY `County` (`County`),
  KEY `State` (`State`)
) TYPE=MyISAM |
+---+---


---

Re: Help with the "IN" operator

2003-09-06 Thread mtoth
You are misunderstanding the 'IN' operator

Try and think of it this way

SELECT value from table where field in (1,2,3)
is the same as
SELECT value from table where field = 1 or field = 2 or field = 3

So in you case

SELECT Count(ID) FROM ZipCounty WHERE '528' IN (VendorLink);
is
SELECT Count(ID) FROM ZipCounty WHERE '528' = (VendorLink);

In your case I would try using the 'LIKE' operator

SELECT Count(ID) FROM ZipCounty WHERE (VendorLink) like '%528%';



-Michael

"Don't shed tears for those already in the ground, until after you have brought 
vengeance to those who put them there. There will be time enough then." -Kahlan

On Sat, 6 Sep 2003, Roger Davis wrote:

> I am having a bit of trouble with the "IN" operator.  I am thinking that it
> just may be my misunderstanding.
>
> Situation.
>   I have a table (ZipCounty) that I want to pull vendors from based on
> zipcode.  So I have a Vendor like field declared as TEXT.  To keep the table
> up to date, I issuse updates in the manor of...
>
>  UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
> NULL,'528',CONCAT(VendorLink,',528')) WHERE State = 'CA' AND 528 NOT IN
> (VendorLink);
>
> Where 528 would be the ID of that particular vendor.  These updates work
> fine, but later if I need to do another update, say to remove 528 from the
> VendorLink field, I can find all of the the records where 528 is the only
> number in the field, or if it is the first number in the field, but not if
> it is the last number in the field.
>
> Hope someone can help me out.
>
> Roger
>
> Here are a few selects
>
> mysql> SELECT Count(ID) FROM ZipCounty WHERE VendorLink = '529,528';
> +---+
> | Count(ID) |
> +---+
> |  1384 |
> +---+
> 1 row in set (0.25 sec)
>
> mysql> SELECT Count(ID) FROM ZipCounty WHERE '528' IN (VendorLink);
> +---+
> | Count(ID) |
> +---+
> | 0 |
> +---+
> 1 row in set (0.25 sec)
>
> mysql> SELECT VendorLink, Count(ID) FROM ZipCounty WHERE VendorLink IS NOT
> NULL GROUP BY VendorLink;
> ++---+
> | VendorLink | Count(ID) |
> ++---+
> | 529|  3844 |
> | 529,528|  1384 |
> ++---+
> 2 rows in set (0.61 sec)
>
> Why do I get a count of 0 for the Second Query?
>
>
> Here is a list of all the queries and output. (redhat 9.0 version 2.23.54)
>
> This also happens on the latest Windows version (mysql  Ver 12.21 Distrib
> 4.0.14, for Win95/Win98 (i32))
>
>
> mysql> \s
> --
> mysql  Ver 11.18 Distrib 3.23.54, for redhat-linux-gnu (i386)
>
> Connection id:  59756
> Current database:   TPZ
> Current user:   [EMAIL PROTECTED]
> Current pager:  stdout
> Using outfile:  ''
> Server version: 3.23.54
> Protocol version:   10
> Connection: Localhost via UNIX socket
> Client characterset:latin1
> Server characterset:latin1
> UNIX socket:/var/lib/mysql/mysql.sock
> Uptime: 12 days 19 hours 38 min 36 sec
>
> Threads: 2  Questions: 2354432  Slow queries: 43  Opens: 143  Flush tables:
> 1  Open tables: 64 Queries per second avg: 2.126
> --
>
> mysql> SHOW CREATE TABLE ZipCounty;
> +---+---
> 
> 
> 
> 
> +
> | Table | Create Table
> |
> +---+---
> 
> 
> 
> 
> +
> | ZipCounty | CREATE TABLE `ZipCounty` (
>   `ID` int(11) NOT NULL auto_increment,
>   `City` varchar(50) default NULL,
>   `State` char(2) default NULL,
>   `Zip` varchar(10) default NULL,
>   `AreaCode` char(3) default NULL,
>   `County` varchar(50) default NULL,
>   `VendorLink` text,
>   `OtherLink` text,
>   PRIMARY KEY  (`ID`),
>   KEY `Zip` (`Zip`),
>   KEY `County` (`County`),
>   KEY `State` (`State`)
> ) TYPE=MyISAM |
> +---+---
> 
> 
> 
> 
> +
> 1 row in set (0.00 sec)
>
> mysql> 

Re: Fulltext Index and Unicode (MySQL 4.1)

2003-09-06 Thread Paul DuBois
At 11:25 + 9/6/03, Andreas Schwarz wrote:
Egor Egorov wrote:
 Andreas Schwarz <[EMAIL PROTECTED]> wrote:
 is it possible to use Fulltext indexes on unicode (UTF-8 or UCS-2)
 fields in 4.1?
 Nope. Fulltext search doesn't work with multi-byte character sets.
That's correct.  It's documented at:

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

Will this be fixed in future versions? Otherwise I would have to
do the indexing manually.
It'd be a nice enhancement.  But as far as I know, it'll likely
not happen unless someone sponsors development, which has not happened.
--
AVR-Tutorial, über 350 Links
Forum für AVRGCC und MSPGCC
-> http://www.mikrocontroller.net


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

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


Re: Regular Expression Reference

2003-09-06 Thread Paul DuBois
At 11:08 -0400 9/6/03, Jeff Brewer wrote:
I'm sure this is sitting inches from my nose but I just can't see it.

In Appendix G of the manual it states:

"This is a simplistic reference that skips the details. To get more 
exact information, see Henry Spencer's regex(7) manual page that is 
included in the source distribution."

I can't seem to find "Henry Spencer's regex(7) manual page" 
anywhere. I've fun searches on my "mysql" directory and searched the 
mysql website.

I'm really interested in just getting a complete referece to the 
subject. Can I use the full suite of expressions available in Java, 
e.g.?

Thanks in advance,
Jeff


Go to google.com and search for "Henry Spencer regex".  It'll turn up
a bunch of links, one of which is:
http://arglist.com/regex/

This site contains a distribution that includes the man pages.



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

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


Help with the "IN" operator

2003-09-06 Thread Roger Davis
I am having a bit of trouble with the "IN" operator.  I am thinking that it
just may be my misunderstanding.

Situation.
I have a table (ZipCounty) that I want to pull vendors from based on
zipcode.  So I have a Vendor like field declared as TEXT.  To keep the table
up to date, I issuse updates in the manor of...

 UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'528',CONCAT(VendorLink,',528')) WHERE State = 'CA' AND 528 NOT IN
(VendorLink);

Where 528 would be the ID of that particular vendor.  These updates work
fine, but later if I need to do another update, say to remove 528 from the
VendorLink field, I can find all of the the records where 528 is the only
number in the field, or if it is the first number in the field, but not if
it is the last number in the field.

Hope someone can help me out.

Roger

Here are a few selects

mysql> SELECT Count(ID) FROM ZipCounty WHERE VendorLink = '529,528';
+---+
| Count(ID) |
+---+
|  1384 |
+---+
1 row in set (0.25 sec)

mysql> SELECT Count(ID) FROM ZipCounty WHERE '528' IN (VendorLink);
+---+
| Count(ID) |
+---+
| 0 |
+---+
1 row in set (0.25 sec)

mysql> SELECT VendorLink, Count(ID) FROM ZipCounty WHERE VendorLink IS NOT
NULL GROUP BY VendorLink;
++---+
| VendorLink | Count(ID) |
++---+
| 529|  3844 |
| 529,528|  1384 |
++---+
2 rows in set (0.61 sec)

Why do I get a count of 0 for the Second Query?


Here is a list of all the queries and output. (redhat 9.0 version 2.23.54)

This also happens on the latest Windows version (mysql  Ver 12.21 Distrib
4.0.14, for Win95/Win98 (i32))


mysql> \s
--
mysql  Ver 11.18 Distrib 3.23.54, for redhat-linux-gnu (i386)

Connection id:  59756
Current database:   TPZ
Current user:   [EMAIL PROTECTED]
Current pager:  stdout
Using outfile:  ''
Server version: 3.23.54
Protocol version:   10
Connection: Localhost via UNIX socket
Client characterset:latin1
Server characterset:latin1
UNIX socket:/var/lib/mysql/mysql.sock
Uptime: 12 days 19 hours 38 min 36 sec

Threads: 2  Questions: 2354432  Slow queries: 43  Opens: 143  Flush tables:
1  Open tables: 64 Queries per second avg: 2.126
--

mysql> SHOW CREATE TABLE ZipCounty;
+---+---




+
| Table | Create Table
|
+---+---




+
| ZipCounty | CREATE TABLE `ZipCounty` (
  `ID` int(11) NOT NULL auto_increment,
  `City` varchar(50) default NULL,
  `State` char(2) default NULL,
  `Zip` varchar(10) default NULL,
  `AreaCode` char(3) default NULL,
  `County` varchar(50) default NULL,
  `VendorLink` text,
  `OtherLink` text,
  PRIMARY KEY  (`ID`),
  KEY `Zip` (`Zip`),
  KEY `County` (`County`),
  KEY `State` (`State`)
) TYPE=MyISAM |
+---+---




+
1 row in set (0.00 sec)

mysql> UPDATE ZipCounty SET VendorLink = NULL;
Query OK, 11193 rows affected (0.99 sec)
Rows matched: 69802  Changed: 11193  Warnings: 0

mysql> UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'529',CONCAT(VendorLink,',529')) WHERE State = 'AL' AND 529 NOT IN
(VendorLink);
Query OK, 1312 rows affected (0.08 sec)
Rows matched: 1312  Changed: 1312  Warnings: 0

mysql> UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'529',CONCAT(VendorLink,',529')) WHERE State = 'AR' AND 529 NOT IN
(VendorLink);
Query OK, 1313 rows affected (0.07 sec)
Rows matched: 1313  Changed: 1313  Warnings: 0

mysql> UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'529',CONCAT(VendorLink,',529')) WHERE County = 'Kent' AND State = 'DE'
AND 529 NOT IN (VendorLink);
Query OK, 30 rows affected (0.00 sec)
Rows matched: 30  Changed: 30  Warnings: 0

mysql> UPDATE ZipCounty SET VendorLink = IF(Vendor

Regular Expression Reference

2003-09-06 Thread Jeff Brewer
I'm sure this is sitting inches from my nose but I just can't see it.

In Appendix G of the manual it states:

"This is a simplistic reference that skips the details. To get more exact information, 
see Henry Spencer's regex(7) manual page that is included in the source distribution."

I can't seem to find "Henry Spencer's regex(7) manual page" anywhere. I've fun 
searches on my "mysql" directory and searched the mysql website. 

I'm really interested in just getting a complete referece to the subject. Can I use 
the full suite of expressions available in Java, e.g.?

Thanks in advance,
Jeff

MySQL on Windows 2000

2003-09-06 Thread Sheni R. Meledath
Hi,

We have installed PHP/MySQL on a Windows 2000 server. PHP & MySQL are 
working fine on the server.

We also require to connect ASP to MySQL database. How can we do that? 
Currently the MySQL/ODBC driver is not available on Windows 2000 server. 
How can we add that and proceed with ASP/MySQL?

Sheni R Meledath
[EMAIL PROTECTED] 

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


Sobig.F on this list

2003-09-06 Thread Stephen Fromm
I got a bounced email with an attachment entitled macex.mex.scr, about 72.3
KB, which if IIRC is probably the Sobig.F virus.  It appears to have been
sent to people on this list (even though the list wasn't in the "to:" line)
because the body of the email discussed MySQL.

Since Sobig.F forges the "from" line, I don't think the person it was "from"
sent it.

Rather, IIRC the virus doesn't spoof the IP address that the incoming
connection came from, and it appears to be:
217.204.219.154
nslookup says this belongs to
mobiletones1-2.dsl.easynet.co.uk

That belong to anybody here?  If so, and *if* I'm right about the virus
(well, worm actually), you might be infected...

sjfromm


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



Re: Fulltext Index and Unicode (MySQL 4.1)

2003-09-06 Thread Andreas Schwarz
Egor Egorov wrote:
> Andreas Schwarz <[EMAIL PROTECTED]> wrote:
>> 
>> is it possible to use Fulltext indexes on unicode (UTF-8 or UCS-2)
>> fields in 4.1?
>> 
> 
> Nope. Fulltext search doesn't work with multi-byte character sets.

Will this be fixed in future versions? Otherwise I would have to
do the indexing manually.

-- 
AVR-Tutorial, über 350 Links
Forum für AVRGCC und MSPGCC
-> http://www.mikrocontroller.net


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



group_concat()

2003-09-06 Thread Mark Constable
I finally installed 4.1 alpha so I could test the group_concat
function but need some help... could anyone give me a clue how
I can order the results of group_concat() according to the lft
field ? (just adding it per se wipes out the results)

I have tried many many variations and have not hit upong the
right combo yet.. would a user variable help ? Any clues welcome.

select group_concat(p.nam order by p.nam desc SEPARATOR "/") as name,
c.lft, c.rgt, c.nam from myTree p, myTree c
where c.lft between p.lft and p.rgt group by p.nam;

+-+-+-+--+
| name| lft | rgt | nam  |
+-+-+-+--+
| Root/anewfolder |  12 |  23 | anewfolder   |
| Root/images/branch.gif/anewfolder   |  16 |  17 | branch.gif   |
| Root/images/branchbottom.gif/anewfolder |  18 |  19 | branchbottom.gif |
| Root/images/branchtop.gif/anewfolder|  20 |  21 | branchtop.gif|
| Root/cattest.sql|   6 |   7 | cattest.sql  |
| Root/example.php|   8 |   9 | example.php  |
| Root/images/anewfolder  |  15 |  22 | images   |
| Root/index.php  |  10 |  11 | index.php|
| Root/newobj/anewfolder  |  13 |  14 | newobj   |
| Root/old|  24 |  27 | old  |
| Root/oldindex.php/old   |  25 |  26 | oldindex.php |
| Root|   1 |  28 | Root |
| Tree.php/Root   |   2 |   3 | Tree.php |
| TreeMenu.php/Root   |   4 |   5 | TreeMenu.php |
+-+-+-+--+

If I add "order by c.lft" everything is ideal except the
group_concat() output is gone.

+--+-+-+--+
| name | lft | rgt | nam  |
+--+-+-+--+
|  |   1 |  28 | Root |
|  |   2 |   3 | Tree.php |
|  |   4 |   5 | TreeMenu.php |
|  |   6 |   7 | cattest.sql  |
|  |   8 |   9 | example.php  |
|  |  10 |  11 | index.php|
|  |  12 |  23 | anewfolder   |
|  |  13 |  14 | newobj   |
|  |  15 |  22 | images   |
|  |  16 |  17 | branch.gif   |
|  |  18 |  19 | branchbottom.gif |
|  |  20 |  21 | branchtop.gif|
|  |  24 |  27 | old  |
|  |  25 |  26 | oldindex.php |
+--+-+-+--+

--markc


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



Re: Query hung up in "Copying to tmp table"

2003-09-06 Thread Matt W
Kevin,

Forgot to mention that I think you're not seeing any temporary files
because they're hidden. From
http://www.mysql.com/doc/en/Temporary_files.html

"MySQL creates all temporary files as hidden files. This ensures that
the temporary files will be removed if mysqld is terminated. The
disadvantage of using hidden files is that you will not see a big
temporary file that fills up the filesystem in which the temporary file
directory is located."

But then it also says:

"For some SELECT queries, MySQL also creates temporary SQL tables. These
are not hidden and have names of the form `SQL_*'."

So I dunno. :-) But I'm thinking they ARE hidden... if there's any files
at all. It may be just an in memory temp HEAP table if it's smaller than
tmp_table_size and no TEXT/BLOB columns are used in the query (e.g.
possible length > 255).


I don't think there's much tuning that can be done to the server. The
query and/or tables may need to be changed, if possible, to
examine/return less rows.

Also, what's the EXPLAIN SELECT output look like for the queries (the
original and modified)? Just change the names of the tables/columns if
you can't let them be seen. :-) Hint: use \G instead of ; at the end of
the EXPLAIN query to make the output more legible.


Matt


- Original Message -
From: "Kevin Fries"
Sent: Friday, September 05, 2003 11:09 AM
Subject: RE: Query hung up in "Copying to tmp table"


> Matt,
>
> Thanks for your response.  It's going to take a bit for me to get the
> actual SQL available. I don't yet have permission to show that off.
In
> the mean time, I can tell you that there are 10 table in the query,
with
> 4 being references to the same table.  I've been able to make an
> improvement that greatly improves the speed... by over-joining some
> records.  That is, I'm joining 3 tables such that A joins to B, B
joins
> to C, and C joins to A, basically.  That was enough to let mySQL sort
> out a better plan.
>
> Interestingly though, the result of the query (and it appears to be
> proper) is 0 rows.  I believe it's the intermediate row set that may
be
> huge.  But I've never seen mysql spit out a temporary file while
> processing.
>
> Again, I'd really like someone's reference to a tuning guide, if
there's
> a superior one available.
>
> Thanks again,
> Kevin
>
> > -Original Message-
> > From: Matt W
> > Sent: Thursday, September 04, 2003 1:37 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Query hung up in "Copying to tmp table"
> >
> >
> > Hi Kevin,
> >
> > I imagine the query is examining/returning so many rows that
> > it's going to take a long time to create the needed temporary
> > table (how long have you it go?). To start with, show us the
> > EXPLAIN output for the problem SELECT, along with the SELECT.
> > Also the size of the involved tables (rows and MB).
> >
> >
> > Matt
> >
> >
> > - Original Message -
> > From: "Kevin Fries"
> > Sent: Wednesday, September 03, 2003 6:51 PM
> > Subject: Query hung up in "Copying to tmp table"
> >
> >
> > > I'm having a problem where a complex SELECT query begins eating up
> > lots
> > > of CPU and never returns.  In "show processlist", it
> > > reports "Copying to tmp table".  Other queries seem to get locked
> > > waiting for this query, as well.
> > >
> > > This is on version 3.23.36 of mySQL, and I'm considering
> > upgrading to
> > > the latest 3.23.57, to see if that improves the
> > performance. I can't
> > > find any matching references in the Changes web pages that
indicate
> > > this, though.  Can anyone verify this?
> > >
> > > Alternately, I'm trying to find ways to possibly improve the step
of
> > > "copying to tmp table".   According to my "show variables"
> > output, the
> > > "tmpdir" is /tmp, and /tmp has plenty of room (85 megs or so).
But
> > > while the query is running, I don't even see a corresponding file
> > there.
> > > The CPU is spiking with top reporting mysql as eating 85%
> > CPU.  So I
> > > then assume that the 'problem' is happening before the file is
> > created?
> > > Does that sound right?
> > >
> > > If someone has a better reference for tracking down the source of
a
> > > problem like this, other than
> > > http://www.mysql.com/doc/en/MySQL_Optimisation.html, I'd be very
> > > appreciative.
> > >
> > > thanks,
> > > Kevin Fries


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