Re: MySQL 5.0.9 build problem

2005-07-18 Thread Peregrine
On Monday 18 July 2005 03:06am, Joerg Bruehe wrote:
> Hello!
>
> Peregrine wrote:
> > [[...]]
> >
> > While trying to build RPMs for 5.0.9-beta, I have run into this error:
> >
> > [[...]]
> > Starting Tests
> >
> > TESTRESULT
> > ---
> > alias  [ pass ]
>
> Well, if you got this far, your build process has succeeded, and your
> binaries are working. Fine!

You are correct.  The compile was successfully completed, as in there were no 
compile errors.  However, I am building RPMs; that was the "build process" 
that I was referring to.  Sorry to have been confusing.

> Which platform are you using, or which specific features are you
> combining, so that you build by yourself?

Fedora, RHEL, CentOS & SUSE distributions for i386 & AMD64.  Now that these 
distributions have sufficiently current packages of 4.1 available, I no 
longer build those; just 5.0 (as close to the way those distributions would 
probably build them) for development and testing.

> > [[...]]
> > mysql  [ pass ]
> > mysql_client_test  [ fail ]
> >
> > Errors are
> > (from
> > /home/lamontp/rpmbuild/BUILD/mysql-5.0.9-beta/mysql-test/var/log/mysqltes
> >t-time) : mysql_client_test.c:3811: check failed: 'rc == 0'
> > /home/lamontp/rpmbuild/BUILD/mysql-5.0.9-beta/client/.libs/mysqltest: At
> > line 10: command "$MYSQL_CLIENT_TEST" failed
> > (the last lines may be the most important ones)
> >
> > Aborting: mysql_client_test failed in default mode. To continue, re-run
> > with '--force'.
> > 
> > Examining the code for the test file (mysql_client_test.c) the test looks
> > good.  Also, the test database table being used in this particular test
> > looks alright to me, too.
>
> Yes, both look good probably.
> You just ran into one reason why version 5.0 is still in "beta" state.
> It is a known bug, MySQL development is working on this.

Is there any better reference to the bug available (bug ID) so that I could 
follow it?  I could also try contribute a fix, in that case.

> I propose to run "make test-force", so that this failing test does not
> prevent the subsequent tests from being taken.

I will do that for testing purposes.  Currently, I build 5.0.x for development 
and testing, not for production, so I will need to build a set of RPMs 
without test-force to continue distributing for those purposes.

> > There are other tests that were "skipped".  [[...]]
>
> Not needed. Typically, tests are skipped if they are declared to test a
> component which is not included in the binary being tested.
> (Example: NDB is only included in "max" builds, so for "standard" all
> "ndb_*" tests are skipped.)

Which is what I expected.  Thanks for the confirmation.  I only offered or the 
sake of completeness.
-- 
Lamont R. Peterson <[EMAIL PROTECTED]>
Founder [http://blog.openbrainstem.net/peregrine/]
OpenBrainstem - Intelligent Open Source Software Engineering


pgpw0xu6Dcx5A.pgp
Description: PGP signature


Re: mysql "forgets" user passwords

2005-07-18 Thread Chris Fonnesbeck
On 7/18/05, Michael Stassen <[EMAIL PROTECTED]> wrote:

> 
> Hmmm...  In that case, I have more questions.  Log in as root and run
> 
>SHOW VARIABLES LIKE '%pass%';
>DESC user password;
> 
> and post the results.
> 
> Also, was this a brand new installation, or an upgrade?  If an upgrade, from
> what version?
> 

This is a brand new installation, following a clean install of my OS.
Here are the commands you requested:

mysql> SHOW VARIABLES LIKE '%pass%';
+---+---+
| Variable_name | Value |
+---+---+
| old_passwords | OFF   |
+---+---+
1 row in set (0.03 sec)

mysql>   DESC user password;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| Password | varchar(16) |  | | |   |
+--+-+--+-+-+---+
1 row in set (0.00 sec)

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



Re: MySQL 5.0.9 build problem

2005-07-18 Thread Peregrine
On Monday 18 July 2005 02:09am, Gleb Paharenko wrote:
> Hello.
>
>
> Building MySQL Server manually could be a thankless and painful work.
> You should have the same build environment as MySQL AB team. Use
> official binaries.

Thank you for your advice, though you have not attempted to answer my 
question :).

I need RPMs for several Linux distributions.  The official binaries are, 
therefore, not suitable.

As updated RPMs have not been available for the distributions that I have to 
deal with, I have been building my own since 4.0.1 and have solved many 
problems.  Until now, I never had tests from a point release failing (BK and 
nightlies, sure).
-- 
Lamont R. Peterson <[EMAIL PROTECTED]>
Founder [http://blog.openbrainstem.net/peregrine/]
OpenBrainstem - Intelligent Open Source Software Engineering


pgpCUSqWCbf6v.pgp
Description: PGP signature


Re: Setting default character_set_results

2005-07-18 Thread Batara Kesuma
Hi Gleb,


> Please check, if putting of these lines into my.cnf solves the
> problem:
> 
> [dbdmysql]
> default-character-set = ujis
> 

Yupe! It works. Thank you very much :)

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



Re: Slow Query Using Index

2005-07-18 Thread Brent Baisley
There is a limit, but that is really limited to the hardware you are  
running it on. You need to figure out what part of your system is  
bottlenecking (disk I/O, RAM, CPU, or network I/O). Perhaps you have  
to little RAM and/or your mysql configuration variables are not set  
optimally. Too little RAM means more disk I/O, which then kind of  
compounds itself.



On Jul 18, 2005, at 3:30 PM, Ed Pauley II wrote:

I have notices some slow queries showing up in my slow query log  
lately. Two of these queries are relatively simple queries using  
the index of their respective tables. Both of these tables are very  
large and I suspect this to be the problem. This problem appears to  
have started within the last couple of months. These tables grow in  
data daily.


Table 1

Rows: 17,794,256
Index Size: 511,596,544

Table 2

Rows: 43,513,707
Index Size: 1,009,502,208

Is there anything that I can do? I have optimized the tables, but  
it did not appear to help. Is there a limit to MySQL efficiency and  
table size?


--
Ed Pauley II
[EMAIL PROTECTED]



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





--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577



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



RE: Crystal reports with MySQL

2005-07-18 Thread Scott Johnson
Hi,

You simply install the MyODBC interface and away you go. You simply create a
connect and Us crystal as if it was a connection to the other windows
database. hahaha

I have included the link below:

http://dev.mysql.com/downloads/connector/odbc/3.51.html

Scott.

[EMAIL PROTECTED]
www.Wilty.ca
Tel: 514-917-4922
Fax: 514-673-0011


> -Original Message-
> From: Mayuresh Kshirsagar [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 18, 2005 3:03 PM
> To: mysql@lists.mysql.com
> Subject: Crystal reports with MySQL
>
>
> I need to use crystal reports with MySQL database. We have MySQL
>
> query browser to query audit database of meta directory. Can I use ODBC
>
> connection for my crystal report with MySQL database? If yes, then please
>
> let me know what ODBC driver I need to install? OR how can I make
>
> connection to MySQL database to crystal reports?
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>



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



Re: MySQL / DBI Question

2005-07-18 Thread Gleb Paharenko
Hello.



What about using SELECT @@global.xxx? It returns only one column. See:



mysql> select @@global.old_passwords;

++

| @@global.old_passwords |

++

|  1 |

++









[EMAIL PROTECTED] wrote:

> Hello all,

>   This may be a little bit off topic for MySQL newsgroup but here 
> goes.I'm trying to retrieve variables such as basedir and datadir. 
> PERL/DBI returns 2 rows for each varialbe. The first is the name and the 
> second is a value. Is there a way to get PERL/DBI to return each variable as 
> 1 row. 

> 

> Thanks in advance,

> George

> 

> __

> Switch to Netscape Internet Service.

> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

> 

> Netscape. Just the Net You Need.

> 

> New! Netscape Toolbar for Internet Explorer

> Search from anywhere on the Web and block those annoying pop-ups.

> Download now at http://channels.netscape.com/ns/search/install.jsp

> 



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




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



Re: Different versions differnet results

2005-07-18 Thread SGreen
shantanu oak <[EMAIL PROTECTED]> wrote on 07/18/2005 01:17:57 PM:

> I am getting two different results for the same set of commands on two
> different versions of MySQL.
> Can anyone explain what the issue is?
> 
> CREATE TABLE `testdecimal` (
> `rate` decimal(7,4) NOT NULL default '0.'
> ) ENGINE=MyISAM; 
> 
> INSERT INTO testdecimal SET rate=1468;
> 
> select * from testdecimal;
> _
> 
> version 4.1.12
> 1468.
> 
> version 5.0
> 999.
> 
> Shantanu Oak
> 


They fixed a bug. Count how many digits are in this number from your 
4.1.12 output:

   1468.
    
   1234 5678

8 is more than 7. That violates your definition of (7,4). What you want is 
to declare (8.4) to be able to store numbers that large. The reason you 
get 999. with 5.0 is because that is the number closest to your target 
value available for the field definition you declared.

The "old" behavior allowed an extra digit to possibly take the place of 
the "sign" marker (positive or negative) and since your number was not 
negative, your sign marker was "blank" which allowed your number to 
overflow its definition. That is the bug they fixed.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Re: Cant Get Access to My Databases

2005-07-18 Thread Gleb Paharenko
Hello.



See:

  http://dev.mysql.com/doc/mysql/en/access-denied.html







"Tim Holmes" <[EMAIL PROTECTED]> wrote:

> Good Morning:

> 

> I have finally gotten my MySQL server up and running.  However, I am

> having a bit of difficulty getting connected.

> 

> I am using Dreamweaver to construct PHP pages for dynamic data, and

> phpMyAdmin to manage the databases, however when I try to connect by

> either method, I get a message that states=20

> 

> #1130 - Host 'www.w8tah.us' is not allowed to connect to this MySQL

> server

> 

> I suspect that this is a permissions problem, but I don't know where to

> begin. =20

> 

> I have tried using Webmin to grant all permissions to the www.w8tah.us,

> but it seems to have no effect.

> 

> I have access to Webmin, the command line and physical access to the

> console if necessary - anyone who can help -- PLEASE?

> 

> TIM

> 

> 

> Timothy A. Holmes

> =20

> IT Manager / Webmaster / Science Teacher

> =20

> Medina Christian Academy

> A Higher Standard...

> =20

> Jeremiah 33:3

> Jeremiah 29:11

> Esther 4:14

> 

> 

> 



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




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



Crystal reports with MySQL

2005-07-18 Thread Mayuresh Kshirsagar
I need to use crystal reports with MySQL database. We have MySQL

query browser to query audit database of meta directory. Can I use ODBC

connection for my crystal report with MySQL database? If yes, then please

let me know what ODBC driver I need to install? OR how can I make

connection to MySQL database to crystal reports?


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



Re: Illegal mix of collations

2005-07-18 Thread Gleb Paharenko
Hello.



> Illegal mix of collations (latin1_bin,IMPLICIT) and

> (utf8_general_ci,COERCIBLE) for operation '='' on query. Default



What default charset do your slave's tables have? The coercibility 

value of system constants has changed in 4.1.11. Though it seems not

related to your problem I recommend you to upgrade to 4.1.12.





Marco P$hler <[EMAIL PROTECTED]> wrote:

> Hello List,

> 

> I've tried to set up a slave from an existing master using innobackup.

> The copy of the database was successful, but when I started the

> replication, the following error occured:

> 

> Illegal mix of collations (latin1_bin,IMPLICIT) and

> (utf8_general_ci,COERCIBLE) for operation '='' on query. Default

> database: 'report'. Query: 'UPDATE sum_day_key_requests SET sum = sum +

> 1 WHERE day = '2005-7-16' AND type = 'redirect' AND client = '1234' AND

> channel = '43' AND campaign = '...' AND grouping = 'Singleb$se' AND

> `key` = 'Single Berlin' AND afftraf = 'NULL'

> 

> I read the docs and compared charset/collation configuration as you can

> see below, but it seems to be the same on both servers.

> 

> any hints welcome !

> 

> thanks in advance

> 

> Marco

> 

> =

> Master: MySQL 4.1.10

> 

> 

> mysql> show variables like 'coll%';

> +--+---+

> | Variable_name| Value |

> +--+---+

> | collation_connection | latin1_swedish_ci |

> | collation_database   | latin1_swedish_ci |

> | collation_server | latin1_swedish_ci |

> +--+---+

> 3 rows in set (0.00 sec)

> 

> ps ax | grep mysql

> 7349 ?Sl 0:01 /usr/sbin/mysqld --basedir=/

> --datadir=/var/lib/mysql --user=mysql

> --pid-file=/var/lib/mysql/HAL2005.pid --skip-locking

> --open-files-limit=8192 --port=3306 --socket=/var/lib/mysql/mysql.sock

> 

> (no --default-character-set=... or --default-collation=...)

> 

> /etc/my.cnf doesn't contain any charset or collation information

> =

> Slave: MySQL 4.1.10

> ---

> 

> mysql> show variables like 'coll%';

> +--+---+

> | Variable_name| Value |

> +--+---+

> | collation_connection | latin1_swedish_ci |

> | collation_database   | latin1_swedish_ci |

> | collation_server | latin1_swedish_ci |

> +--+---+

> 3 rows in set (0.00 sec)

> 

> ps ax | grep mysql

> 23970 pts/0Sl 0:01 /usr/sbin/mysqld --basedir=/

> --datadir=/var/lib/mysql --user=mysql

> --pid-file=/var/lib/mysql/HAL2006.pid --skip-locking

> --open-files-limit=8192 --port=3306 --socket=/var/lib/mysql/mysql.sock

> 

> (no --default-character-set=... or --default-collation=...)

> 

> /etc/my.cnf doesn't contain any charset or collation information

> 

> 

> Marco Poehler

> http://www.kontaktlinsen-preisvergleich.de

> 

> 

> 

> 



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




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



Re: migrate from 3.x to 4.1 character set problem

2005-07-18 Thread Bruce Dembecki

hi,
we've got an old mysql-3.23.58 and a new mysql-4.1.10a and we'de  
like to

migrate our data, but it doesn't seems to be so easy:-(
out old server has a latin2 database. after we dump it and try tp  
import
into the new ones we always got errors or the spical accented  
hungarian

characters are getting wrong.
- what is the prefered (and working) way to migrate from the old to  
the

new?
- how can define the new char sets?
we try these variations (and manualy create the database with defult
char set and latin2):
1. mysqldump --opt -p xxx > xxx.sql
mysql xxx < xxx.sql

2. mysqldump --opt --default-character-set=latin2 -p xxx > xxx.sql
mysql --default-character-set=latin2 xxx < xxx.sql

3. mysqldump --opt -p xxx > xxx.sql
iconv -f ISO_8859-2 -t UTF-8 -o xxx2.sql xxx.sql
mysql xxx < xxx2.sql

and many more combination, try to read all docs, but can't find any
solutions.
another question what is the collations latin2_hungarian_ci contains?
how can i interpret that xml file? eg. a is equal to á or not? is  
there
any way to find out how is the buildin contains defined? or any  
description?

thank you for your help in advance.
yours.


Generally speaking you need to define the character set for each  
column or table in your 4.1 database, or set a default character set  
for the database or for the server, this is independent of the  
default character set used by the clients... Then you need your  
clients to connect to the database using the appropriate character  
set... while the examples above seem correct, there are some  
opportunities for errors to occur.


Firstly export the data using the mysql tools provided with  
3.23.58... eg make sure you use the mysqldump that comes with the  
3.23.58 mysql binary - chances are that is will be mysqldump 3.23.58.  
I expect that version off mysqldump will not support the --default- 
character-set flag and should have thrown an error if you try to give  
it that flag... It's important that you export the 3.23.58 data the  
way it is, and let the 4.1 tools deal with putting it into the new  
format appropriately. using mysqldump from 4.1 may not give you  
exactly the same results, so you should avoid that. Also for what it  
is worth you may want to try doing a dump slightly differently... we  
always use --tab=/var/tmp/database or some such thing and that  
creates a series of files in the folder you specify, one .sql file  
for each table containing just the create table statement, and  
one .txt file for each table containing just the data for each table  
in tab delimited format. It means your import process will be  
slightly different, but it's faster, and because we have done it  
regularly it's more likely to handle the data conversion.


Next when doing the import make sure you use mysql tools that match  
the database you are installing. Here you will need to specify the  
default character set for the clients, they will understand and use  
that when speaking to the database. Here is the process we use to do  
the export from 4.0 and import into 4.1, there should be no great  
difference in how 3.23.58 and 4.0 handle the character sets so the  
results should be much the same. We use UTF8, and our 4.0 databases  
had no special character settings, so it was stored in the database  
as latin1. On the original server using 4.0.n server and tools to  
match we run this:


mysqldump --tab=/var/tmp/database database

You should be able to do the same thing provided you use mysqldump  
3.23.58, again make no allowances for character set in the dump  
process, you just want the data dumped to disk the same way it is  
stored now.


Then we move the directory /var/tmp/database to /var/tmp on the new  
server with 4.1 running... note this has the 4.1.n server AND the  
4.1.n tools (such as mysql, mysqldump, mysqlimport and so on).


Finally we go ahead and import our data into the server using this  
sequence of commands (we use a shell script, so that's what you get  
here). Call the shell script by giving it the database name as a flag  
(eg ./import database) - watch for differences in line breaks caused  
by email clients here, there are three lines of commands after  
setting DB=$1.


#!/bin/sh
#
# LiveWorld's MySQL Import Script
# Use for converting 4.0 databases to 4.1 UTF8 databases
# Suitable for LiveWorld Servers only, use at your own risk
#

DB=$1

mysql -e "CREATE DATABASE $DB default character set utf8;"
cat /var/tmp/$DB/*sql | mysql --socket=/tmp/mysql.sock $DB
mysqlimport --default-character-set=utf8 $DB /var/tmp/$DB/*txt

Obviously you are going from latin2 to latin2 so it should be a  
little easier for you than it was for us... and you'll want to make  
some changes in the script compared to our utf8 stuff (of course you  
may want to just go with utf8 anyway, should handle most anything you  
want to throw at it that way, our databases run in 30 languages).


So be careful to match your tools with your server version and 

RE: Different versions differnet results

2005-07-18 Thread Edwin Cruz
Is because 7 is the size of the record, and 4 is the size of the "decimals"
so:

Decimal(7,4) can allocate only 999.


If you want to allocate 1468 then you must declare as decimal(8,4) to 4
"decimals" and 4 "integers" in version 5 is the same as oracle


The first parameter is the total number size(including decimals) and the
second how many elements will use from the number size...


Do I explain correctly???

To allocate: 1. the row must be: decimal(9,4)


PD, and I don't know why in version 5 changed this feature
Best Regrads!!

:: ISC Edwin Cruz Garcia ::
IT Factory Systems - Systems Department
Texas Instruments de Mexico
(449)9105194 Direct Line
(449) 9105100 Switchboard, Ext. 5194
(449) 9105124 Fax
E-mail: [EMAIL PROTECTED]




-Original Message-
From: shantanu oak [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 18, 2005 12:18 PM
To: mysql@lists.mysql.com
Subject: Different versions differnet results

I am getting two different results for the same set of commands on two
different versions of MySQL.
Can anyone explain what the issue is?

CREATE TABLE `testdecimal` (
`rate` decimal(7,4) NOT NULL default '0.'
) ENGINE=MyISAM; 

INSERT INTO testdecimal SET rate=1468;

select * from testdecimal;
_

version 4.1.12
1468.

version 5.0
999.

Shantanu Oak

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


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



Re: Views in 5.0.1

2005-07-18 Thread Joerg Bruehe

Hi Ben, all!


Ben Clewett wrote ((re-ordered into posting sequence)):


Joerg Bruehe wrote:


Hi Ben!

Ben Clewett wrote:


[[...]]

Approximately when will 5.0.1 be available as stable release?



5.0.1 will never change, it is out (and obsolete by now).

[[...]]



I am trying to work out how stable 5.0.x is.  Related to why MySQL 
advise people to wait for the 'release' status.


5.0.9-beta (the current published version) still has some bugs which a 
"production release" should not have, and we also want to give the 5.0 
release series still more test coverage.




You say 5.0.1 is old and obsolete.  Yet is not at release stage yet. 
This is curious.


5.0.1 was the first "alpha" version of the 5.0 release series. It became 
obsolete when 5.0.2-alpha was published, 2004-Dec-02.




Will 5.0.1 be changed before release?  For example:  Will large errors 
(eg, server crash) be retrospectively fixed in 5.0.1 if found in this 
release?


Errors have been fixed (and will still be fixed), but with new version 
numbers. Any version number is associated with a certain source code, 
published as a "tar.gz" file.
Whenever anything is changed, be it security fix or feature, the 
published result is a new code version which gets a new version number.




The way I thought of it was:  New features would demand a new release. 


Major new features will enter into a new release series. Depending on 
the feature complexity, they must be completed when that series is in 
the "alpha" or "beta" stage.


Critical bug fixes would be made in *all* live versions.  Otherwise why 
have multiple versions at different stages?


Correct if by "version" you mean the release series, like 4.0, 4.1, or 
5.0. But within that series, the new version gets a higher number like 
4.0.25 or 4.1.13. If not yet recommended for production purposes, it 
gets the label also, like 5.0.9-beta.


For more details, check 
http://dev.mysql.com/doc/mysql/en/choosing-version.html




But if no changes are going to occur, why is it not 'release' now?

Sorry for my confusion,


I hope I got it solved.


Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

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



Re: Different versions differnet results

2005-07-18 Thread Dan Nelson
In the last episode (Jul 18), shantanu oak said:
> I am getting two different results for the same set of commands on
> two different versions of MySQL. Can anyone explain what the issue
> is?
> 
> CREATE TABLE `testdecimal` (
> `rate` decimal(7,4) NOT NULL default '0.'
> ) ENGINE=MyISAM; 
> 
> INSERT INTO testdecimal SET rate=1468;
> 
> select * from testdecimal;
> _
> 
> version 4.1.12
> 1468.
> 
> version 5.0
> 999.


I think the DECIMAL type was changed to be more standard-compliant, and
(7,4) now means "7 total digits, 4 of them to the right of the decimal
point".  Your number doesn't fit, so the maximum value was inserted
instead.

http://dev.mysql.com/doc/mysql/en/numeric-types.html

-- 
Dan Nelson
[EMAIL PROTECTED]

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



Slow Query Using Index

2005-07-18 Thread Ed Pauley II
I have notices some slow queries showing up in my slow query log lately. 
Two of these queries are relatively simple queries using the index of 
their respective tables. Both of these tables are very large and I 
suspect this to be the problem. This problem appears to have started 
within the last couple of months. These tables grow in data daily.


Table 1

Rows: 17,794,256
Index Size: 511,596,544

Table 2

Rows: 43,513,707
Index Size: 1,009,502,208

Is there anything that I can do? I have optimized the tables, but it did 
not appear to help. Is there a limit to MySQL efficiency and table size?


--
Ed Pauley II
[EMAIL PROTECTED]



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



Re: Reload mysqld configuration without restart?

2005-07-18 Thread Gleb Paharenko
Hello.



I don't know a general way to force MySQL Server to reread it's

configuration file, however you could dynamically change lots

of variables using SET @@global.xx syntax. FLUSH command could be

helpful as well. See:

  http://dev.mysql.com/doc/mysql/en/system-variables.html

http://dev.mysql.com/doc/mysql/en/flush.html









"John Trammell" <[EMAIL PROTECTED]> wrote:

> Is it possible for mysqld to reload its configuration files without

> doing an explicit stop/start?  I've searched the online documentation

> plus my copy of the DuBois book to no avail.

> 

> The fact that the Debian init scripts don't do a proper config reload

> (just the GRANT tables) does not give me lots of hope.

> 

> Thanks,

> J. Trammell

> 



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




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



RE: Reload mysqld configuration without restart?

2005-07-18 Thread John Trammell
Thanks for replying.  Some doc pages pertaining to this are:

http://dev.mysql.com/doc/mysql/en/dynamic-system-variables.html
http://dev.mysql.com/doc/mysql/en/system-variables.html

Unfortunately I need to change some that are not dynamic.  Many (most?)
servers offer this functionality; it would be nice if MySQL had it.

 

> -Original Message-
> From: Gleb Paharenko [mailto:[EMAIL PROTECTED] 
> Sent: Monday, July 18, 2005 1:10 PM
> To: mysql@lists.mysql.com
> Subject: Re: Reload mysqld configuration without restart?
> 
> Hello.
> 
> 
> 
> I don't know a general way to force MySQL Server to reread it's
> 
> configuration file, however you could dynamically change lots
> 
> of variables using SET @@global.xx syntax. FLUSH command could be
> 
> helpful as well. See:
> 
>   http://dev.mysql.com/doc/mysql/en/system-variables.html
> 
>   http://dev.mysql.com/doc/mysql/en/flush.html
> 
> 
> 
> 
> 
> 
> 
> 
> 
> "John Trammell" <[EMAIL PROTECTED]> wrote:
> 
> > Is it possible for mysqld to reload its configuration files without
> 
> > doing an explicit stop/start?  I've searched the online 
> documentation
> 
> > plus my copy of the DuBois book to no avail.
> 
> > 
> 
> > The fact that the Debian init scripts don't do a proper 
> config reload
> 
> > (just the GRANT tables) does not give me lots of hope.
> 
> > 
> 
> > Thanks,
> 
> > J. Trammell
> 
> > 
> 
> 
> 
> -- 
> For technical support contracts, goto 
> https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.NET http://www.ensita.net/
>__  ___ ___   __
>   /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
><___/   www.mysql.com
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 

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



Re: Impossible join?

2005-07-18 Thread Dawid Kuroczko
On 7/16/05, Jonathan Mangin <[EMAIL PROTECTED]> wrote:
> Hello all,
> 
> I'm storing data from a series of tests throughout each
> 24-hour period.  I thought to create a table for each test.
> (There are six tests, lots more cols per test, and many
> users performing each test.)
> 
> select test1.date, test1.time, test2.date, test2.time from
> test1 left join test2 on test2.date=test1.date where
> test1.date between '2005-07-01' and '2005-07-16' and
> uid='me';
> 
> ++--++--+
> | date   | time | date   | time |
> ++--++--+
> | 2005-07-13 | 6:30 | 2005-07-13 | 7:30 |
> | 2005-07-14 | 6:32 | 2005-07-14 | 7:45 |
> | 2005-07-15 | 6:30 | 2005-07-15 | 7:42 |
> | 2005-07-16 | 6:35 | NULL   | NULL |
> ++--++--+
> 
> Is there a join, or some other technique, that would
> return (nearly) these same results if test1 (or any test)
> has not been performed?  Using 4.1.11.

You would need a full outer join, but MySQL doesn't support it... :(

You need some way to hack around it.  Maybe ditch the JOIN clauses
and join tables in application, for instance using hashes?

   Regards,
  Dawid

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



Different versions differnet results

2005-07-18 Thread shantanu oak
I am getting two different results for the same set of commands on two
different versions of MySQL.
Can anyone explain what the issue is?

CREATE TABLE `testdecimal` (
`rate` decimal(7,4) NOT NULL default '0.'
) ENGINE=MyISAM; 

INSERT INTO testdecimal SET rate=1468;

select * from testdecimal;
_

version 4.1.12
1468.

version 5.0
999.

Shantanu Oak

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



RE: Renaming a database

2005-07-18 Thread Gordon Bruce








A database in MySQL is simply a directory. 

 

So just rename the directory with appropriate tool for your platform. 

On my test box this becomes

 

mysql> show databases;

++

| Database  
|

++

| information_schema |

|
lois  
|

| mailprint  |

|
mysql 
|

|
test  
|

++

5 rows in set (0.22 sec)

 



 

mysql> show databases;

++

| Database  
|

++

| information_schema |

|
lois  
|

| mailprint  |

|
mysql 
|

|
test1 
|

++

5 rows in set (0.00 sec)

 

-Original Message-
From: Scott Hamm [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 18, 2005 11:02 AM
To: 'Mysql '
Subject: Renaming a database

 

How do I rename a database? The help online is pretty ambigous.

 

-- 

Power to people, Linux is here.

 








Re: Renaming a database

2005-07-18 Thread SGreen
Scott Hamm <[EMAIL PROTECTED]> wrote on 07/18/2005 12:01:49 PM:

> How do I rename a database? The help online is pretty ambigous.
> 
> -- 
> Power to people, Linux is here.

I wouldn't say "ambiguous". I would rather say "indirect". 

Renaming a database is nearly the same thing as moving tables to a new 
database. you can do that with RENAME TABLE 
(http://dev.mysql.com/doc/mysql/en/rename-table.html).  The only thing to 
do is to migrate permissions from the old database to the new one (and any 
table-specific or column-specific permissions, too) by either performing a 
set of  GRANT and REVOKE statements or by updating the `mysql`.`db`, 
`mysql`.`tables_priv`,  and `mysql`.`columns_priv` tables manually and 
issuing a FLUSH PRIVILEGES statement to put your updates into effect.

Normally, the names of databases aren't as nearly as important or mutable 
as the names of the tables and columns within them. That's why there is no 
"simpler" method for renaming a database with MySQL.

One shortcut, just for MyISAM tables, might be to shut down the server, 
rename the folder for the database to the new name, then restart the 
server. This still leaves any permissions pointing to the "old" name and 
will not work for InnoDB and probably won't work for BDB databases but it 
could save you the trouble of scripting all of those RENAME TABLE 
statements.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine



Re: User Previlage Vs Tables

2005-07-18 Thread SGreen
Aiby <[EMAIL PROTECTED]> wrote on 07/18/2005 11:15:26 AM:

> Does it posible to set a user previlage to table wise!! Rather then a 
Whole 
> Database.
> 
> -- 
> Aiby

Yes! You can even determine permissions for specific columns, if you 
really want to.

Details here: http://dev.mysql.com/doc/mysql/en/privilege-system.html

re: query hasn't worked properly since Mysql 5.0.6

2005-07-18 Thread SGreen
James Black <[EMAIL PROTECTED]> wrote on 07/18/2005 08:42:31 AM:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> I have a query that uses a subquery that works under mysql 4.1 and
> 5.0.6, but doesn't work on 5.0.7 or 5.0.9
> 
> I am trying to understand why it may be having a problem so I can make a
> test case to demonstrate it, and am hoping that someone may have an 
idea.
> 
> SELECT i.label, i.itemtype, it.name, i.rid, i.status, l.locname,
> i.lid,
> (SELECT IF(p.fullname IS NULL, (SELECT CONCAT(sna.fname, ' ',
> sna.mname, ' ', sna.lname, ' ', sna.gen) FROM nams.names AS sna WHERE
> sna.badge=sne.badge), p.fullname) AS fullname FROM nams.netids AS sne
> LEFT OUTER JOIN nams.prefs AS p ON(sne.badge=p.badge) WHERE
> sne.badge=c.badge) AS UserFullname,
> i.layoutx, i.layouty, i.theta FROM items AS i INNER JOIN
> locations AS l ON(i.lid=l.lid) INNER JOIN itemtypes AS it
> ON(i.itemtype=it.itemtype) LEFT OUTER JOIN curuse AS c ON(c.rid=i.rid)
> WHERE l.locname='iclab' ORDER BY i.status, i.label;
> 
> 
>   If I take out the following part then the query works fine.
> (SELECT IF(p.fullname IS NULL, (SELECT CONCAT(sna.fname, ' ',
> sna.mname, ' ', sna.lname, ' ', sna.gen) FROM nams.names AS sna WHERE
> sna.badge=sne.badge), p.fullname) AS fullname FROM nams.netids AS sne
> LEFT OUTER JOIN nams.prefs AS p ON(sne.badge=p.badge) WHERE
> sne.badge=c.badge) AS UserFullname,
> 
> 
> - --
> "Love is mutual self-giving that ends in self-recovery." Fulton Sheen
> James Black[EMAIL PROTECTED]
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.1 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
> 
> iD8DBQFC26O3ikQgpVn8xrARArFEAKCPBVaU85aA4gR0DOjcoN5lNxqvuwCghLAO
> bGNL/jNf65hw6u8RBOFR2Eg=
> =N9SC
> -END PGP SIGNATURE-

(same original query, unfolded and tabified)

SELECT i.label
, i.itemtype
, it.name
, i.rid
, i.status
, l.locname
, i.lid
, (
SELECT IF(
p.fullname IS NULL
, (
SELECT CONCAT(sna.fname, ' 
',sna.mname, ' ', sna.lname, ' ', sna.gen) 
FROM nams.names AS sna 
WHERE sna.badge=sne.badge
)
, p.fullname
) AS fullname 
FROM nams.netids AS sne
LEFT OUTER JOIN nams.prefs AS p 
ON (sne.badge=p.badge) 
WHERE sne.badge=c.badge
) AS UserFullname
, i.layoutx
, i.layouty
, i.theta 
FROM items AS i 
INNER JOIN locations AS l 
ON (i.lid=l.lid) 
INNER JOIN itemtypes AS it
ON (i.itemtype=it.itemtype) 
LEFT OUTER JOIN curuse AS c 
ON (c.rid=i.rid)
WHERE l.locname='iclab' 
ORDER BY i.status, i.label;


Can you show us examples of "correct" and "incorrect" results and point 
out the differences? Can you post the definitions (SHOW CREATE TABLE 
xxx\G) for the following tables: items, curuse, netids, prefs, & names? 
Have you verified identical data between the two versions you are 
comparing? Have you compared the EXPLAIN results for both versions? How 
well did the non-subquery version that I posted on the 13th perform?

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Re: error: 'Can't create a new thread (errno 12).

2005-07-18 Thread ross
On Mon, Jul 18, 2005 at 10:33:49AM +0300, Gleb Paharenko wrote:
> [EMAIL PROTECTED] gleb]$ perror 12
> OS error code  12:  Cannot allocate memory
> 
> Very often it is ulimits problem. Check if your server has enough memory
> as well. The cause of problem sometime might be unofficial binaries. If
> nothing helps, switch to binaries from MySQL AB.

Yea, at first I thought it was an out-of-memory condition, and so I
did typical things like lower maximum connections.  This helped, but
the machine is no longer running out of memory.  Or if it is, it's
running out of memory without displaying any symptoms of it (nothing
is OOM killed by the kernel, other processes don't fail, free reports
allocatable memory, etc).

I just wanted to see what the "OS-dependent bug" thing is about - it
sounds like it is referring to a particular bug that is described in
the manual.

I haven't tried MySQL AB binaries - I am using the stock Debian
builds.  Since it refers to general errors, I may persue it with them
as well.

Thanks!

-- 
Ross Vandegrift
[EMAIL PROTECTED]

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37

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



RE: Impossible join?

2005-07-18 Thread Gordon Bruce
Here is one way. 

Some time ago I set up a table named count with one field named count
and built 5000 rows of incrementing values . 


I think I originally populated it by originally createing it with a 2nd
field 

CREATE TABLE `count` (
  `count` int(10) unsigned NOT NULL auto_increment, 
  `addr_ID` int(10) NULL,  this field does not really
matter 
  PRIMARY KEY  (`count`)
) ENGINE=InnoDB DEFAULT CHARSET=;

and then doing something like 

INSERT INTO count(addr_ID) 
SELECT  addr_ID <<< any primary key out of any table with > 5000
entries
FROM   addresses
LIMIT 5000;

and then droping the 2nd field.

Just put an INSERT in front of the select and set the value = to the #
of dates you want to populate and the set value to 1 day pior to where
you want to start. 

mysql> set @d:='2004-12-31 00:00:00';
Query OK, 0 rows affected (0.00 sec)

mysql> select  @d:[EMAIL PROTECTED] + interval 1 day as date from count where 
count <=
10;
+-+
| date|
+-+
| 2005-01-01 00:00:00 |
| 2005-01-02 00:00:00 |
| 2005-01-03 00:00:00 |
| 2005-01-04 00:00:00 |
| 2005-01-05 00:00:00 |
| 2005-01-06 00:00:00 |
| 2005-01-07 00:00:00 |
| 2005-01-08 00:00:00 |
| 2005-01-09 00:00:00 |
| 2005-01-10 00:00:00 |
+-+
10 rows in set (0.00 sec)
-Original Message-
From: Jonathan Mangin [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 18, 2005 8:03 AM
To: Michael Stassen
Cc: mysql@lists.mysql.com
Subject: Re: Impossible join?


> Jonathan Mangin wrote:
>
>> Hello all,
>>
>> I'm storing data from a series of tests throughout each
>> 24-hour period.  I thought to create a table for each test.
>> (There are six tests, lots more cols per test, and many
>> users performing each test.)
>
> But each test is performed no more than once per day by a given user?

Correct.
>
>> select test1.date, test1.time, test2.date, test2.time from
>> test1 left join test2 on test2.date=test1.date where
>> test1.date between '2005-07-01' and '2005-07-16' and
>> uid='me';
>
> Something is strange here.  Doesn't uid exist in both tables?  I'll
assume 
> it does.

Oops. Also correct.
>
>> ++--++--+
>> | date   | time | date   | time |
>> ++--++--+
>> | 2005-07-13 | 6:30 | 2005-07-13 | 7:30 |
>> | 2005-07-14 | 6:32 | 2005-07-14 | 7:45 |
>> | 2005-07-15 | 6:30 | 2005-07-15 | 7:42 |
>> | 2005-07-16 | 6:35 | NULL   | NULL |
>> ++--++--+
>>
>> Is there a join, or some other technique, that would
>> return (nearly) these same results if test1 (or any test)
>> has not been performed?  Using 4.1.11.
>>
>> TIA,
>> Jon
>

[ SNIP! ]


> A better solution would be to add a table:
>
>   CREATE TABLE `testdates` (`date` date default NULL,
>  UNIQUE KEY `date_idx` (`date`)
>);
>
> Insert one row into testdates for each day.  Now you can use something

> like this:
>
>   SELECT testdates.date, test1.time AS 'Test 1', test2.time AS 'Test
2'
>   FROM testdates
>   LEFT JOIN test1 on testdates.date = test1.date AND test1.uid = 'me'
>   LEFT JOIN test2 on testdates.date = test2.date AND test2.uid = 'me'
>   WHERE testdates.date BETWEEN '2005-07-11' AND '2005-07-16';
>
> ++--+--+
> | date   | Test 1   | Test 2   |
> ++--+--+
> | 2005-07-11 | NULL | NULL |
> | 2005-07-12 | NULL | 07:28:00 |
> | 2005-07-13 | 06:30:00 | 07:30:00 |
> | 2005-07-14 | 06:32:00 | 07:45:00 |
> | 2005-07-15 | 06:30:00 | 07:42:00 |
> | 2005-07-16 | 06:35:00 | NULL |
> ++--+--+
> 6 rows in set (0.01 sec)
>
> Much better, don't you think?  This generalizes pretty well, too.
>
>   SELECT testdates.date,
>  test1.time AS 'Test 1',
>  test2.time AS 'Test 2',
>  test3.time AS 'Test 3',
>  test4.time AS 'Test 4'
>   FROM testdates
>   LEFT JOIN test1 on testdates.date = test1.date AND test1.uid = 'me'
>   LEFT JOIN test2 on testdates.date = test2.date AND test2.uid = 'me'
>   LEFT JOIN test3 on testdates.date = test3.date AND test3.uid = 'me'
>   LEFT JOIN test4 on testdates.date = test4.date AND test4.uid = 'me'
>   WHERE testdates.date BETWEEN '2005-07-11' AND '2005-07-16';
>
> ++--+--+--+--+
> | date   | Test 1   | Test 2   | Test 3   | Test 4   |
> ++--+--+--+--+
> | 2005-07-11 | NULL | NULL | NULL | 08:12:00 |
> | 2005-07-12 | NULL | 07:28:00 | 07:14:00 | 08:14:00 |
> | 2005-07-13 | 06:30:00 | 07:30:00 | 07:16:00 | 08:29:00 |
> | 2005-07-14 | 06:32:00 | 07:45:00 | 07:14:00 | 08:26:00 |
> | 2005-07-15 | 06:30:00 | 07:42:00 | 07:19:00 | NULL |
> | 2005-07-16 | 06:35:00 | NULL | NULL | NULL |
> ++--+--+--+--+
> 6 rows in set (0.00 sec)
>
> Michael
>
I'm guessing thi

Renaming a database

2005-07-18 Thread Scott Hamm
How do I rename a database? The help online is pretty ambigous.

-- 
Power to people, Linux is here.


[Fwd: Re: DROP FUNCTION doesn't work]

2005-07-18 Thread Nuno Pereira

[EMAIL PROTECTED] wrote:

> mysql> create function betatouni returns string soname 'libbeta2.so';
> ERROR 1026 (HY000): Error writing file 'mysql.func' (errno: 121)


Using perror from Linux, I saw:

$ perror 121
Error code 121:  Remote I/O error

You probably have communications problems.
Maybe you should try placing the remote FileSystem in the local disk of 
the MySQL server, in order to avoid this kind of problems.


(Forgot to send to the list.)

Nuno Pereira

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



Cant Get Access to My Databases

2005-07-18 Thread Tim Holmes
Good Morning:

I have finally gotten my MySQL server up and running.  However, I am
having a bit of difficulty getting connected.

I am using Dreamweaver to construct PHP pages for dynamic data, and
phpMyAdmin to manage the databases, however when I try to connect by
either method, I get a message that states 

#1130 - Host 'www.w8tah.us' is not allowed to connect to this MySQL
server

I suspect that this is a permissions problem, but I don't know where to
begin.  

I have tried using Webmin to grant all permissions to the www.w8tah.us,
but it seems to have no effect.

I have access to Webmin, the command line and physical access to the
console if necessary - anyone who can help -- PLEASE?

TIM


Timothy A. Holmes
 
IT Manager / Webmaster / Science Teacher
 
Medina Christian Academy
A Higher Standard...
 
Jeremiah 33:3
Jeremiah 29:11
Esther 4:14



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



Re: mysql "forgets" user passwords

2005-07-18 Thread Michael Stassen

Please keep this on the list.

Chris Fonnesbeck wrote:

Something seems rather screwed up; I was starting from scratch by
revoking all privileges from joe and deleting him. I got the
following:

mysql> REVOKE ALL PRIVILEGES ON  *.* FROM  'joe'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
++
| Grants for [EMAIL PROTECTED]
  |

++
| GRANT USAGE ON *.* TO 'joe'@'localhost' IDENTIFIED BY PASSWORD
'*AC57754462B6D4C373263062D60EDC6E452E574D' |
++
1 row in set (0.00 sec)

Why would he still have privileges at this point?


He doesn't.  USAGE means no privileges.  It's counterintuitive, I know. 
REVOKE removes privileges, it doesn't drop users.  Use


  DROP USER 'joe'@'localhost';

to get rid of him.  


Starting with another user, I ran the test that you suggested:

mysql> GRANT ALL ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'testing';
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
+--+
| Grants for [EMAIL PROTECTED]   
|

+--+
| GRANT ALL PRIVILEGES ON *.* TO 'jane'@'localhost' IDENTIFIED BY
PASSWORD '*AC57754462B6D4C373263062D60EDC6E452E574D' |
+--+
1 row in set (0.00 sec)

Then,

Oliver:~ chris$ sudo mysqladmin -p shutdown
Password:
Enter password: 
Oliver:~ chris$ Starting mysqld daemon with databases from /usr/local/mysql/data


Oliver:~ chris$ mysql mysql -u root -p
Enter password: 
Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.12-standard

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

mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
+-+
| Grants for [EMAIL PROTECTED]   
   |

+-+
| GRANT ALL PRIVILEGES ON *.* TO 'jane'@'localhost' IDENTIFIED BY
PASSWORD '3ac57754462b6d4c' |
+-+
1 row in set (0.00 sec)

So, Jane still exists.


Hmmm...  In that case, I have more questions.  Log in as root and run

  SHOW VARIABLES LIKE '%pass%';
  DESC user password;

and post the results.

Also, was this a brand new installation, or an upgrade?  If an upgrade, from 
what version?



Thanks,
C.


Michael


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



User Previlage Vs Tables

2005-07-18 Thread Aiby
Does it posible to set a user previlage to table wise!! Rather then a Whole 
Database.

-- 
Aiby


Reload mysqld configuration without restart?

2005-07-18 Thread John Trammell
Is it possible for mysqld to reload its configuration files without
doing an explicit stop/start?  I've searched the online documentation
plus my copy of the DuBois book to no avail.

The fact that the Debian init scripts don't do a proper config reload
(just the GRANT tables) does not give me lots of hope.

Thanks,
J. Trammell

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



Re: creating a faster query

2005-07-18 Thread Michael Stassen

Brent Baisley wrote:

Don't look at it as a string, you're not searching on a string. What  
you are actually searching on is a range of dates, the first of the  
month through the end of the month. That will keep your data in a date 
format and use the index.


SELECT ... WHERE date between CONCAT(YEAR(date),"-",MONTH(date),"-1")  
AND LAST_DAY(date)


That will match all rows (every date is in its own month).  Perhaps you meant 
something like


  SET @targetdate = '2005-06-15';

  SELECT ...
  WHERE date BETWEEN CONCAT(YEAR(@targetdate),"-",MONTH(@targetdate),"-01")
AND LAST_DAY(@targetdate);

I'd also suggest that your CONCAT(YEAR...MONTH...) is duplicating 
functionality already provided by DATE_FORMAT():


  SET @targetdate = '2005-06-15';

  SELECT ...
  WHERE date BETWEEN DATE_FORMAT(@targetdate,'%Y-%m-01')
AND LAST_DAY(@targetdate);

Of course, if you're doing this in an application, skip the SET statement and 
just put the target date variable in place of @targetdate in the SELECT.


Michael

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



Re: log file

2005-07-18 Thread Bruce Ferrell
enable the bin log in mysql.  It doesn't log "transactions" i.e. what it 
was, what it became, but the update will be logged


prathima rao wrote:

hi,

how to create a log file of the updates done on the data in visual basic or
in mysql for a particular record

for example

 i have a purchase order record in which my junior changes say rate without
my knowledge how will i know what has been changed

p rao




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



Re: Separate disk for logs, DRBD ...

2005-07-18 Thread Gary Richardson
Make sure your disks are all redundant -- get two of each and mirror
them. You'll thank yourself when a drive dies.

If the database server has any uptime requirements, I recommend going
hotswap for everything -- you'll thank yourself again when you can
swap the drive out during core business hours instead of coming in at
2:00AM to do it..

On 7/17/05, Sinang, Danny <[EMAIL PROTECTED]> wrote:
> Dear All,
> 
> Am planning on making MySQL write its data files to disk1 and log files
> to disk2.
> 
> My questions are :
> 
> 1. I know I can put the connections, slow, query, and InnoDB logs on
> disk2.
> 
> Is it also possible (and advisable) to put the binary logs with them
> ?
> 
> 2. If disk2 is slower than disk1 ( like when disk1 is 15k RPM while
> disk2 is 10k RPM ), will it slow down any data-related operations ?
> 
> 3. I'm thinking of using DRBD to replicate changes on one MySQL Master
> server to another box. Does anyone here have a similar setup ?
> 
> I plan on buying 2 identical servers with 3 disk each - 1 for the
> OS, the other for Data, and the last one for Logs.
> 
> If the Logs disk crashes, will MySQL be able to write logs to the
> Logs disk on the 2nd server via DRBD ?
> 
> 
> Regards,
> Danny
> 
>

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



Re: getLong() vs getInt() result differs on unsigned field

2005-07-18 Thread Kevin McAllister

Bill,

Thank you for this.  While that is true, the problem is that the number 
in the database is actually 2 and not 4294967298.  It seems the 
connector/j is sticking that highest bit in there itself, or misbehaving 
in some other way.


Apparently it has been fixed just hasn't been released yet:
http://bugs.mysql.com/bug.php?id=11940 I imagine 3.1.11 will have that 
fix, whenever that will be released.


Thanks for your help and analysis,
Kevin

Bill Easton wrote:

What you are overlooking is that 4294967298 is outside the range of Java's
int--it's 0x10002.  So, when it's converted to int, the high order bit
gets discarded, and you are left with a result of 2.  JDBC behaves as would
be expected.


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



getLong() vs getInt() result differs on unsigned field

2005-07-18 Thread Bill Easton
Kevin,

What you are overlooking is that 4294967298 is outside the range of Java's
int--it's 0x10002.  So, when it's converted to int, the high order bit
gets discarded, and you are left with a result of 2.  JDBC behaves as would
be expected.

public class TestLong {
final public static void main(String[] args) {
long theLong = 4294967298L;
System.out.println("(int) 4294967298L = " + (int) theLong);
}
}

C:\javabox>java TestLong
(int) 4294967298L = 2

HTH
Bill

== original message follows ==

Date: Mon, 11 Jul 2005 13:54:12 -0400
From: Kevin McAllister <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]

Hello,

[...]
The problem comes in with fields of type "int(11) unsigned" these are
obviously interpreted as Longs on call to resultSet.getObject() which is
fine, the problem I am having is that calls to getLong() and getInt()
return different looking values.

[...]
Code I have runs this query
"SELECT title, probabilityID FROM salesprobability"

And then iterates the result set, I put the following debugging code in
there:

while (rs.next()) {
  String title = rs.getString(1);
  long id = rs.getLong(2);
  int idInt = rs.getInt(2);
  System.out.println(title+", long Id: "+id+" intId: "+idInt);
}

And get results like:
10%, long Id: 4294967297 intId: 1
20%, long Id: 4294967298 intId: 2
30%, long Id: 4294967299 intId: 3

I assume I am overlooking something very obvious, But I would expect
that both the long and int interpretations of the value would be the
same, especially for numbers of that magnitude.

Thank you for any help anyone can offer.

Thanks,
Kevin


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



Re: Views in 5.0.1

2005-07-18 Thread Michael Stassen

Ben Clewett wrote:

Joerg,

I am trying to work out how stable 5.0.x is.  Related to why MySQL 
advise people to wait for the 'release' status.


You say 5.0.1 is old and obsolete.  Yet is not at release stage yet. 
This is curious.


Will 5.0.1 be changed before release?  For example:  Will large errors 
(eg, server crash) be retrospectively fixed in 5.0.1 if found in this 
release?


The way I thought of it was:  New features would demand a new release. 
Critical bug fixes would be made in *all* live versions.  Otherwise why 
have multiple versions at different stages?


But if no changes are going to occur, why is it not 'release' now?

Sorry for my confusion,

Ben Clewett


Please reread Joerg's message carefully.  5.0.1 is old and obsolete because it 
was replaced by 5.0.2, which was replaced by 5.0.3, which was ..., which was 
replaced by the current 5.0.9.


Michael


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



log file

2005-07-18 Thread prathima rao
hi,

how to create a log file of the updates done on the data in visual basic or
in mysql for a particular record

for example

 i have a purchase order record in which my junior changes say rate without
my knowledge how will i know what has been changed

p rao


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



RE: Views in 5.0.1

2005-07-18 Thread Cope, Jared
Hi,

I think you may be getting confused with the version 5 'releases' available.
It helps to understand the MySQL release cycle a little bit and then it may
become clearer.

Basically, version 5 is in alpha and beta stages at the moment which means
that the developers are very actively working on the code to fix major bugs
and include other requests etc in successive builds. I imagine that they
have no intention of going back and retro-fixing a previous alpha build of
version 5 with newly discovered bugs and flaws. They define what
alpha/beta/production etc mean to them but I couldn't find a reference for
you just now.

Officially there is no stable-production-ready release of version 5 yet.
What is available at the moment are very early builds that keen and eager
people can try out. They actually started a competition recently where you
can win MySQL prizes for helping to find and report bugs for them to fix.

I see a lot of features that I want to use in version 5, but I am not
touching it until there is an official production build available.

In terms of your question about critical fixes being made to all live
versions, I would substitute the word 'live' for 'production'. As such,
there are no such live versions available yet.

Hope this helps.

Cheers, Jared.

-Original Message-
From: Ben Clewett [mailto:[EMAIL PROTECTED] 
Sent: 18 July 2005 14:35
To: Joerg Bruehe
Cc: mysql@lists.mysql.com
Subject: Re: Views in 5.0.1

Joerg,

I am trying to work out how stable 5.0.x is.  Related to why MySQL 
advise people to wait for the 'release' status.

You say 5.0.1 is old and obsolete.  Yet is not at release stage yet. 
This is curious.

Will 5.0.1 be changed before release?  For example:  Will large errors 
(eg, server crash) be retrospectively fixed in 5.0.1 if found in this 
release?

The way I thought of it was:  New features would demand a new release. 
Critical bug fixes would be made in *all* live versions.  Otherwise why 
have multiple versions at different stages?

But if no changes are going to occur, why is it not 'release' now?

Sorry for my confusion,

Ben Clewett



Joerg Bruehe wrote:
> Hi Ben!
> 
> Ben Clewett wrote:
> 
>> [[...]]
>>
>> Approximately when will 5.0.1 be available as stable release?
> 
> 
> 5.0.1 will never change, it is out (and obsolete by now).
> You probably refer to the 5.0 family of releases, of which 5.0.9-beta 
> was published last week.
> The 5.0 releases have to pass the "beta" and later "release candidate" 
> stages before being declared "stable". Please see my reply to this list 
> on July 14, titled "Re: MySQL 5.0.x", for a longer explanation.
> 
>>
>> If we upgraded to 5.0.1 now, is this stable for all the features in
>> 4.1.9?  So could we safely move now?
> 
> 
> Again: I hope _nobody_ will install 5.0.1 now, but rather the newest 
> available version of 5.0, which currently is 5.0.9.
> 
> 5.0.9 is labeled "beta", according to MySQL's criteria.
> This labeling is for the whole version only, not divided into "old" and 
> "new" features. As a new feature can (in general) not be added without 
> touching existing (= "old") code, such a distinction would not make sense.
> (True, the likelihood of bugs in the "old" code is lower than in the 
> "new" code, but this still does not make it as safe as current 4.1 
> versions like 4.1.12.)
> 
> Of course, MySQL AB welcomes everybody installing current 5.0 versions, 
> testing them, and reporting about the results.
> 
> 
> Regards,
> Joerg
> 


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

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



RE: Multitable selection

2005-07-18 Thread Berman, Mikhail
Hi Mihail,

We have nightly process that creates a summary table from multiple tables in 
the similar situation.

Best,

Mihail Berman

-Original Message-
From: Михаил Монашёв [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 17, 2005 3:41 AM
To: mysql@lists.mysql.com
Subject: Multitable selection

Hello,

I have 10 tables:
table0: id, description, date
table2: id, description, date
...
table9: id, description, date

Every table has 1 000 000 rows.

How can I select all rows from this 10 tables ordered by date?
What is faster: UNION or temporary table or something else ?

mysql 4.1

Sincerely,
Michael,
 http://xoib.com/ http://3d2f.com/
 http://qaix.com/ http://ryxi.com/
 http://gyxe.com/ http://gyxu.com/
 http://xywe.com/ http://xyqe.com/


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


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



Illegal mix of collations

2005-07-18 Thread Marco Pöhler
Hello List,

I've tried to set up a slave from an existing master using innobackup.
The copy of the database was successful, but when I started the
replication, the following error occured:

Illegal mix of collations (latin1_bin,IMPLICIT) and
(utf8_general_ci,COERCIBLE) for operation '='' on query. Default
database: 'report'. Query: 'UPDATE sum_day_key_requests SET sum = sum +
1 WHERE day = '2005-7-16' AND type = 'redirect' AND client = '1234' AND
channel = '43' AND campaign = '...' AND grouping = 'Singleb�se' AND
`key` = 'Single Berlin' AND afftraf = 'NULL'

I read the docs and compared charset/collation configuration as you can
see below, but it seems to be the same on both servers.

any hints welcome !

thanks in advance

Marco

=
Master: MySQL 4.1.10


mysql> show variables like 'coll%';
+--+---+
| Variable_name| Value |
+--+---+
| collation_connection | latin1_swedish_ci |
| collation_database   | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
+--+---+
3 rows in set (0.00 sec)

ps ax | grep mysql
7349 ?Sl 0:01 /usr/sbin/mysqld --basedir=/
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/HAL2005.pid --skip-locking
--open-files-limit=8192 --port=3306 --socket=/var/lib/mysql/mysql.sock

(no --default-character-set=... or --default-collation=...)

/etc/my.cnf doesn't contain any charset or collation information
=
Slave: MySQL 4.1.10
---

mysql> show variables like 'coll%';
+--+---+
| Variable_name| Value |
+--+---+
| collation_connection | latin1_swedish_ci |
| collation_database   | latin1_swedish_ci |
| collation_server | latin1_swedish_ci |
+--+---+
3 rows in set (0.00 sec)

ps ax | grep mysql
23970 pts/0Sl 0:01 /usr/sbin/mysqld --basedir=/
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/HAL2006.pid --skip-locking
--open-files-limit=8192 --port=3306 --socket=/var/lib/mysql/mysql.sock

(no --default-character-set=... or --default-collation=...)

/etc/my.cnf doesn't contain any charset or collation information


Marco Poehler
http://www.kontaktlinsen-preisvergleich.de




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



Re: Views in 5.0.1

2005-07-18 Thread Ben Clewett

Joerg,

I am trying to work out how stable 5.0.x is.  Related to why MySQL 
advise people to wait for the 'release' status.


You say 5.0.1 is old and obsolete.  Yet is not at release stage yet. 
This is curious.


Will 5.0.1 be changed before release?  For example:  Will large errors 
(eg, server crash) be retrospectively fixed in 5.0.1 if found in this 
release?


The way I thought of it was:  New features would demand a new release. 
Critical bug fixes would be made in *all* live versions.  Otherwise why 
have multiple versions at different stages?


But if no changes are going to occur, why is it not 'release' now?

Sorry for my confusion,

Ben Clewett



Joerg Bruehe wrote:

Hi Ben!

Ben Clewett wrote:


[[...]]

Approximately when will 5.0.1 be available as stable release?



5.0.1 will never change, it is out (and obsolete by now).
You probably refer to the 5.0 family of releases, of which 5.0.9-beta 
was published last week.
The 5.0 releases have to pass the "beta" and later "release candidate" 
stages before being declared "stable". Please see my reply to this list 
on July 14, titled "Re: MySQL 5.0.x", for a longer explanation.




If we upgraded to 5.0.1 now, is this stable for all the features in
4.1.9?  So could we safely move now?



Again: I hope _nobody_ will install 5.0.1 now, but rather the newest 
available version of 5.0, which currently is 5.0.9.


5.0.9 is labeled "beta", according to MySQL's criteria.
This labeling is for the whole version only, not divided into "old" and 
"new" features. As a new feature can (in general) not be added without 
touching existing (= "old") code, such a distinction would not make sense.
(True, the likelihood of bugs in the "old" code is lower than in the 
"new" code, but this still does not make it as safe as current 4.1 
versions like 4.1.12.)


Of course, MySQL AB welcomes everybody installing current 5.0 versions, 
testing them, and reporting about the results.



Regards,
Joerg




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



migrate from 3.x to 4.1 character set problem

2005-07-18 Thread Farkas Levente

hi,
we've got an old mysql-3.23.58 and a new mysql-4.1.10a and we'de like to 
migrate our data, but it doesn't seems to be so easy:-(
out old server has a latin2 database. after we dump it and try tp import 
into the new ones we always got errors or the spical accented hungarian 
characters are getting wrong.
- what is the prefered (and working) way to migrate from the old to the 
new?

- how can define the new char sets?
we try these variations (and manualy create the database with defult 
char set and latin2):

1. mysqldump --opt -p xxx > xxx.sql
   mysql xxx < xxx.sql

2. mysqldump --opt --default-character-set=latin2 -p xxx > xxx.sql
   mysql --default-character-set=latin2 xxx < xxx.sql

3. mysqldump --opt -p xxx > xxx.sql
   iconv -f ISO_8859-2 -t UTF-8 -o xxx2.sql xxx.sql
   mysql xxx < xxx2.sql

and many more combination, try to read all docs, but can't find any 
solutions.

another question what is the collations latin2_hungarian_ci contains?
how can i interpret that xml file? eg. a is equal to á or not? is there 
any way to find out how is the buildin contains defined? or any description?

thank you for your help in advance.
yours.


--
  Levente   "Si vis pacem para bellum!"


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



Re: Impossible join?

2005-07-18 Thread Jonathan Mangin



Jonathan Mangin wrote:


Hello all,

I'm storing data from a series of tests throughout each
24-hour period.  I thought to create a table for each test.
(There are six tests, lots more cols per test, and many
users performing each test.)


But each test is performed no more than once per day by a given user?


Correct.



select test1.date, test1.time, test2.date, test2.time from
test1 left join test2 on test2.date=test1.date where
test1.date between '2005-07-01' and '2005-07-16' and
uid='me';


Something is strange here.  Doesn't uid exist in both tables?  I'll assume 
it does.


Oops. Also correct.



++--++--+
| date   | time | date   | time |
++--++--+
| 2005-07-13 | 6:30 | 2005-07-13 | 7:30 |
| 2005-07-14 | 6:32 | 2005-07-14 | 7:45 |
| 2005-07-15 | 6:30 | 2005-07-15 | 7:42 |
| 2005-07-16 | 6:35 | NULL   | NULL |
++--++--+

Is there a join, or some other technique, that would
return (nearly) these same results if test1 (or any test)
has not been performed?  Using 4.1.11.

TIA,
Jon




[ SNIP! ]



A better solution would be to add a table:

  CREATE TABLE `testdates` (`date` date default NULL,
 UNIQUE KEY `date_idx` (`date`)
   );

Insert one row into testdates for each day.  Now you can use something 
like this:


  SELECT testdates.date, test1.time AS 'Test 1', test2.time AS 'Test 2'
  FROM testdates
  LEFT JOIN test1 on testdates.date = test1.date AND test1.uid = 'me'
  LEFT JOIN test2 on testdates.date = test2.date AND test2.uid = 'me'
  WHERE testdates.date BETWEEN '2005-07-11' AND '2005-07-16';

++--+--+
| date   | Test 1   | Test 2   |
++--+--+
| 2005-07-11 | NULL | NULL |
| 2005-07-12 | NULL | 07:28:00 |
| 2005-07-13 | 06:30:00 | 07:30:00 |
| 2005-07-14 | 06:32:00 | 07:45:00 |
| 2005-07-15 | 06:30:00 | 07:42:00 |
| 2005-07-16 | 06:35:00 | NULL |
++--+--+
6 rows in set (0.01 sec)

Much better, don't you think?  This generalizes pretty well, too.

  SELECT testdates.date,
 test1.time AS 'Test 1',
 test2.time AS 'Test 2',
 test3.time AS 'Test 3',
 test4.time AS 'Test 4'
  FROM testdates
  LEFT JOIN test1 on testdates.date = test1.date AND test1.uid = 'me'
  LEFT JOIN test2 on testdates.date = test2.date AND test2.uid = 'me'
  LEFT JOIN test3 on testdates.date = test3.date AND test3.uid = 'me'
  LEFT JOIN test4 on testdates.date = test4.date AND test4.uid = 'me'
  WHERE testdates.date BETWEEN '2005-07-11' AND '2005-07-16';

++--+--+--+--+
| date   | Test 1   | Test 2   | Test 3   | Test 4   |
++--+--+--+--+
| 2005-07-11 | NULL | NULL | NULL | 08:12:00 |
| 2005-07-12 | NULL | 07:28:00 | 07:14:00 | 08:14:00 |
| 2005-07-13 | 06:30:00 | 07:30:00 | 07:16:00 | 08:29:00 |
| 2005-07-14 | 06:32:00 | 07:45:00 | 07:14:00 | 08:26:00 |
| 2005-07-15 | 06:30:00 | 07:42:00 | 07:19:00 | NULL |
| 2005-07-16 | 06:35:00 | NULL | NULL | NULL |
++--+--+--+--+
6 rows in set (0.00 sec)

Michael


I'm guessing this is a common solution.  Shame on me.

How does one swiftly populate a table with an entire year
(or more) of dates?

Thanks very much,
Jon



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



Re: creating a faster query

2005-07-18 Thread Brent Baisley
Don't look at it as a string, you're not searching on a string. What  
you are actually searching on is a range of dates, the first of the  
month through the end of the month. That will keep your data in a  
date format and use the index.


SELECT ... WHERE date between CONCAT(YEAR(date),"-",MONTH(date),"-1")  
AND LAST_DAY(date)



On Jul 16, 2005, at 4:33 PM, Octavian Rasnita wrote:


Hi,

I have a table with a DATE type column and I want to search for  
more records

that have the same year and month.

I have tried searching with:

select ... where date_format(date, '%Y-%m')='2005-06' ...;

I know that if I apply a function to the date column, the index on  
that
column is not useful and I have seen that this query works very  
very very

slow, even though I have defined an index on the date column.

Are there any other ways to create this query in order to make it work
faster?

Thank you.
Teddy



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





--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577



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



re: query hasn't worked properly since Mysql 5.0.6

2005-07-18 Thread James Black
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I have a query that uses a subquery that works under mysql 4.1 and
5.0.6, but doesn't work on 5.0.7 or 5.0.9

I am trying to understand why it may be having a problem so I can make a
test case to demonstrate it, and am hoping that someone may have an idea.

SELECT i.label, i.itemtype, it.name, i.rid, i.status, l.locname,
i.lid,
(SELECT IF(p.fullname IS NULL, (SELECT CONCAT(sna.fname, ' ',
sna.mname, ' ', sna.lname, ' ', sna.gen) FROM nams.names AS sna WHERE
sna.badge=sne.badge), p.fullname) AS fullname FROM nams.netids AS sne
LEFT OUTER JOIN nams.prefs AS p ON(sne.badge=p.badge) WHERE
sne.badge=c.badge) AS UserFullname,
i.layoutx, i.layouty, i.theta FROM items AS i INNER JOIN
locations AS l ON(i.lid=l.lid) INNER JOIN itemtypes AS it
ON(i.itemtype=it.itemtype) LEFT OUTER JOIN curuse AS c ON(c.rid=i.rid)
WHERE l.locname='iclab' ORDER BY i.status, i.label;


  If I take out the following part then the query works fine.
(SELECT IF(p.fullname IS NULL, (SELECT CONCAT(sna.fname, ' ',
sna.mname, ' ', sna.lname, ' ', sna.gen) FROM nams.names AS sna WHERE
sna.badge=sne.badge), p.fullname) AS fullname FROM nams.netids AS sne
LEFT OUTER JOIN nams.prefs AS p ON(sne.badge=p.badge) WHERE
sne.badge=c.badge) AS UserFullname,


- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC26O3ikQgpVn8xrARArFEAKCPBVaU85aA4gR0DOjcoN5lNxqvuwCghLAO
bGNL/jNf65hw6u8RBOFR2Eg=
=N9SC
-END PGP SIGNATURE-

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



MySQL / DBI Question

2005-07-18 Thread TheRefUmp
Hello all,
   This may be a little bit off topic for MySQL newsgroup but here goes.I'm 
trying to retrieve variables such as basedir and datadir. PERL/DBI returns 2 
rows for each varialbe. The first is the name and the second is a value. Is 
there a way to get PERL/DBI to return each variable as 1 row. 

Thanks in advance,
George

__
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

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



Re: Views in 5.0.1

2005-07-18 Thread Joerg Bruehe

Hi Ben!

Ben Clewett wrote:

[[...]]

Approximately when will 5.0.1 be available as stable release?


5.0.1 will never change, it is out (and obsolete by now).
You probably refer to the 5.0 family of releases, of which 5.0.9-beta 
was published last week.
The 5.0 releases have to pass the "beta" and later "release candidate" 
stages before being declared "stable". Please see my reply to this list 
on July 14, titled "Re: MySQL 5.0.x", for a longer explanation.




If we upgraded to 5.0.1 now, is this stable for all the features in
4.1.9?  So could we safely move now?


Again: I hope _nobody_ will install 5.0.1 now, but rather the newest 
available version of 5.0, which currently is 5.0.9.


5.0.9 is labeled "beta", according to MySQL's criteria.
This labeling is for the whole version only, not divided into "old" and 
"new" features. As a new feature can (in general) not be added without 
touching existing (= "old") code, such a distinction would not make sense.
(True, the likelihood of bugs in the "old" code is lower than in the 
"new" code, but this still does not make it as safe as current 4.1 
versions like 4.1.12.)


Of course, MySQL AB welcomes everybody installing current 5.0 versions, 
testing them, and reporting about the results.



Regards,
Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

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



Views in 5.0.1

2005-07-18 Thread Ben Clewett

Dear MySQL,

I have need to use VIEWS.  (This is to protect my database from
programmers, but that's another story :)

This is available in version 5.0.1, which is not at release level yet.
We are on 4.1.9.

May I ask a couple of questions!

Approximately when will 5.0.1 be available as stable release?

If we upgraded to 5.0.1 now, is this stable for all the features in
4.1.9?  So could we safely move now?

Kind regards,

Ben Clewett.


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



Re: Performance difference? : [SELECT ON Merge TableAB] vs [(SELECT ON Table A) UNION (SELECT ON TABLE B) ]

2005-07-18 Thread Gleb Paharenko
Hello.





I've searched in the archives at:

  http://lists.mysql.com/mysql



but the only thing I've found is that the speed difference is rather low. In my 
opinion, using UNION is a more flexible solution.









pow <[EMAIL PROTECTED]> wrote:

> Hi everyone,

> Take for example two identical tables A & B, and a MERGE table merging 

> both of them.

> Would there be any performance advantage if  I do a select (with a where 

> criteria on an indexed column) on the MERGE table, as opposed to doing a 

> union of two selects with the same WHERE criteria?

> 

> Many Thanks!

> 



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




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



Re: MySQL 5.0.9 build problem

2005-07-18 Thread Joerg Bruehe

Hello!


Peregrine wrote:

[[...]]

While trying to build RPMs for 5.0.9-beta, I have run into this error:

[[...]]
Starting Tests

TESTRESULT
---
alias  [ pass ]


Well, if you got this far, your build process has succeeded, and your 
binaries are working. Fine!


Which platform are you using, or which specific features are you 
combining, so that you build by yourself?



[[...]]
mysql  [ pass ]
mysql_client_test  [ fail ]

Errors are 
(from /home/lamontp/rpmbuild/BUILD/mysql-5.0.9-beta/mysql-test/var/log/mysqltest-time) :

mysql_client_test.c:3811: check failed: 'rc == 0'
/home/lamontp/rpmbuild/BUILD/mysql-5.0.9-beta/client/.libs/mysqltest: At line 
10: command "$MYSQL_CLIENT_TEST" failed

(the last lines may be the most important ones)

Aborting: mysql_client_test failed in default mode. To continue, re-run with 
'--force'.


Examining the code for the test file (mysql_client_test.c) the test looks 
good.  Also, the test database table being used in this particular test looks 
alright to me, too.


Yes, both look good probably.
You just ran into one reason why version 5.0 is still in "beta" state.
It is a known bug, MySQL development is working on this.

I propose to run "make test-force", so that this failing test does not 
prevent the subsequent tests from being taken.




There are other tests that were "skipped".  [[...]]


Not needed. Typically, tests are skipped if they are declared to test a 
component which is not included in the binary being tested.
(Example: NDB is only included in "max" builds, so for "standard" all 
"ndb_*" tests are skipped.)



HTH,
Jörg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com


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



Re: about: Select tables optimized away

2005-07-18 Thread Gleb Paharenko
Hello.





Similar questions were asked in the list before. For example

see:

  http://lists.mysql.com/mysql/41542



Search in archives at:

  http://lists.mysql.com/mysql





>From sources I've found that this message appears when optimizing

queries with count(*), min() and max(). The above message most probably

means that you have and index on o_id column, and query would be

resolved using only information from the index.





  





$ $ <[EMAIL PROTECTED]> wrote:

> When I explain "SELECT MAX(o_id)-1 FROM orders",it tell me "Select 

> tables optimized away".What is it meaning?It show me  good or bad?

> thanks!

> 

> _

> $$ MSN Messenger:  http://messenger.msn.com/cn  

> 

> 



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




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



Re: MySQL 5.0.9 build problem

2005-07-18 Thread Gleb Paharenko
Hello.





Building MySQL Server manually could be a thankless and painful work.

You should have the same build environment as MySQL AB team. Use

official binaries.









Peregrine <[EMAIL PROTECTED]> wrote:

> [-- text/plain, encoding quoted-printable, charset: utf-8, 77 lines --]

> 

> Hello,

> 

> This is my first post on this list, so forgive me, please, if this is the 

> wrong forum for this question.

> 

> While trying to build RPMs for 5.0.9-beta, I have run into this error:

> 

> + make test

> cd mysql-test; \

> ./mysql-test-run && ./mysql-test-run --ps-protocol

> Installing Test Databases

> Removing Stale Files

> Installing Master Databases

> running  ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables 

> --basedir=. --datadir=./var/master-data --skip-innodb --skip-ndbcluster 

> --skip-bdb --language=../sql/share/english/ 

> --character-sets-dir=../sql/share/charsets/

> Installing Slave Databases

> running  ../sql/mysqld --no-defaults --bootstrap --skip-grant-tables 

> --basedir=. --datadir=./var/slave-data --skip-innodb --skip-ndbcluster 

> --skip-bdb --language=../sql/share/english/ 

> --character-sets-dir=../sql/share/charsets/

> Manager disabled, skipping manager start.

> Loading Standard Test Databases

> Starting Tests

> 

> TESTRESULT

> ---

> alias  [ pass ]

> alter_table[ pass ]

> analyse[ pass ]

> analyze[ pass ]

> ansi   [ pass ]

> archive[ skipped ]

> auto_increment [ pass ]

> backup [ pass ]

> [SNIP]

> mysql  [ pass ]

> mysql_client_test  [ fail ]

> 

> Errors are 

> (from 
> /home/lamontp/rpmbuild/BUILD/mysql-5.0.9-beta/mysql-test/var/log/mysqltest-time)
>  :

> mysql_client_test.c:3811: check failed: 'rc == 0'

> /home/lamontp/rpmbuild/BUILD/mysql-5.0.9-beta/client/.libs/mysqltest: At line 

> 10: command "$MYSQL_CLIENT_TEST" failed

> (the last lines may be the most important ones)

> 

> Aborting: mysql_client_test failed in default mode. To continue, re-run with 

> '--force'.

> 

> Examining the code for the test file (mysql_client_test.c) the test looks 

> good.  Also, the test database table being used in this particular test looks 

> alright to me, too.

> 

> There are other tests that were "skipped".  If that might be relevent, I 
> could 

> post the full output from the tests (~100).

> 

> This kind of failure (this test in particular) *feels* odd to me.  As I have 

> not been into the code of MySQL 5 since the 5.0.0 days (even then, I only 

> scratched the surface), I thought I should ask.

> 

> TIA



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




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



Re: error: 'Can't create a new thread (errno 12).

2005-07-18 Thread Gleb Paharenko
Hello.





[EMAIL PROTECTED] gleb]$ perror 12

OS error code  12:  Cannot allocate memory



Very often it is ulimits problem. Check if your server has enough memory

as well. The cause of problem sometime might be unofficial binaries. If

nothing helps, switch to binaries from MySQL AB.











[EMAIL PROTECTED] wrote:

> Hello everyone,

> 

>I have seen this message crop up recently when connections are

> denied:

> 

> mysqladmin: connect to server at 'localhost' failed

> error: 'Can't create a new thread (errno 12). If you are not out of

> available me mory, you can consult the manual for a possible OS-dependent bug'

> 

> Unfortuantely, I haven't been able to find anything in the manual

> relating to this or an OS bug.  The server is running Debian 3.1,

> mysql 4.0.23, with kernel 2.6.7.

> 

> I have the results of status and extended-status around the time of

> the outages:

> 

> 

> /var/log/apache# mysqladmin status

> Uptime: 63863  Threads: 14  Questions: 14224034  Slow queries: 8 Opens: 675  
> Fl

> ush tables: 1  Open tables: 64  Queries per second avg: 222.727

> /var/log/apache# mysqladmin status

> mysqladmin: connect to server at 'localhost' failed

> error: 'Can't create a new thread (errno 12). If you are not out of

> available memory, you can consult the manual for a possible OS-dependent bug'

> /var/log/apache# mysqladmin status

> Uptime: 64007  Threads: 10  Questions: 14261583  Slow queries: 8

> Opens: 675  Flush tables: 1  Open tables: 64

> Queries per second avg: 222.813

> 

> 

> /var/log/apache# mysqladmin extended-status

> +--++

> | Variable_name| Value  |

> +--++

> | Aborted_clients  | 23226  |

> | Aborted_connects | 28087  |

> | Bytes_received   | 1193761149 |

> | Bytes_sent   | 3902943211 |

> | Com_admin_commands   | 2  |

> | Com_alter_table  | 1  |

> | Com_analyze  | 0  |

> | Com_backup_table | 0  |

> | Com_begin| 0  |

> | Com_change_db| 484513 |

> | Com_change_master| 0  |

> | Com_check| 73 |

> | Com_commit   | 0  |

> | Com_create_db| 0  |

> | Com_create_function  | 0  |

> | Com_create_index | 0  |

> | Com_create_table | 1  |

> | Com_delete   | 826135 |

> | Com_delete_multi | 0  |

> | Com_drop_db  | 0  |

> | Com_drop_function| 0  |

> | Com_drop_index   | 0  |

> | Com_drop_table   | 0  |

> | Com_flush| 0  |

> | Com_grant| 0  |

> | Com_ha_close | 0  |

> | Com_ha_open  | 0  |

> | Com_ha_read  | 0  |

> | Com_insert   | 60970  |

> | Com_insert_select| 0  |

> | Com_kill | 0  |

> | Com_load | 0  |

> | Com_load_master_data | 0  |

> | Com_load_master_table| 0  |

> | Com_lock_tables  | 0  |

> | Com_optimize | 0  |

> | Com_purge| 0  |

> | Com_rename_table | 0  |

> | Com_repair   | 0  |

> | Com_replace  | 21 |

> | Com_replace_select   | 0  |

> | Com_reset| 0  |

> | Com_restore_table| 0  |

> | Com_revoke   | 0  |

> | Com_rollback | 0  |

> | Com_savepoint| 0  |

> | Com_select   | 5946078|

> | Com_set_option   | 4  |

> | Com_show_binlog_events   | 0  |

> | Com_show_binlogs | 0  |

> | Com_show_create  | 0  |

> | Com_show_databases   | 2  |

> | Com_show_fields  | 4  |

> | Com_show_grants  | 0  |

> | Com_show_keys| 27 |

> | Com_show_logs| 0  |

> | Com_show_master_status   | 0  |

> | Com_show_new_master  | 0  |

> | Com_show_open_tables | 0  |

> | Com_show_processlist | 203|

> | Com_show_slave_hosts | 0  |

> | Com_show_slave_status| 0  |

> | Com_show_status  | 11 |

> | Com_show_innodb_status   | 0  |

> | Com_show_tables  | 14 |

> | Com_show_variables   | 0  |

> | Com_slave_start  | 0  |

> | Com_slave_stop   | 0  |

> | Com_truncate | 0  |

> | Com_unlock_tables| 0  |

> | Com_update   | 275842 |

> | Connections  | 687129 |

> | Created_tmp_disk_

Re: more queries vs a bigger one

2005-07-18 Thread Gleb Paharenko
Hello.





It is a hard task to answer if we don't see your queries and tables'

structure. Sometimes several small queries could be faster than a big

one. For example, often, query with subqueries or union runs slower than

few queries which use temporary tables.







"Octavian Rasnita" <[EMAIL PROTECTED]> wrote:

> Hi,

> 

> I have a big query that involves searching in more tables, and I think this

> might be slower than creating more smaller queries. What do you think, is

> this true generally?

> 

> The query searches in a big table but it also counts the number of records

> from other 2 tables based on a criteria, and usually the result is a big

> number of records, but the final result is limited using "limit 0,30".

> 

> So I am wondering...

> Could it work faster if I won't count(*) the number of records in those 2

> tables, but get the result (only 30 records), then for each separate record

> use a separate query that gets that number?

> 

> I don't know, could 31 queries work faster than a single bigger and complex

> query?

> 

> Thank you.

> 

> Teddy

> 

> 

> 



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




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



optimize a order by statement

2005-07-18 Thread 王 旭

Follow is the sql statement:


explain SELECT ol_i_id
FROM orders, order_line
WHERE orders.o_id = order_line.ol_o_id and o_id>0
ORDER BY SUM(ol_qty)DESC


Follow is the explain output:


1, 'SIMPLE', 'orders', 'range', 'PRIMARY', 'PRIMARY', '4', '', 129615, 
'Using where; Using index; Using temporary'


1, 'SIMPLE', 'order_line', 'ref', 'PRIMARY,order_line_ol_o_id', 
'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, ''


The query plan use "Using temporary".Can i optimize this sql statement?

_
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  



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



Re: optimize a sql statement

2005-07-18 Thread 王 旭

NO effect :-(


From: pow <[EMAIL PROTECTED]>
To: 王 旭 <[EMAIL PROTECTED]>
Subject: Re: optimize a sql statement
Date: Mon, 18 Jul 2005 11:51:23 +0800

Do u have composite index on order_line.ol_o_id AND order_line.ol_i_id?

You could try that...
王 旭 wrote:

> Now,I make this sql statement to easy.
>
> Follow is the sql statement:
> 

-

> SELECT ol_i_id FROM orders,order_line
> WHERE order_line.ol_o_id = orders.o_id
> GROUP BY ol_i_id
> 

-

>
> Follow is the explain output:
> 

-

> 1, 'SIMPLE', 'orders', 'index', 'PRIMARY', 'PRIMARY', '4', '', 259231,
> 'Using index; Using temporary; Using filesort'
>
> 1, 'SIMPLE', 'order_line', 'ref', 'PRIMARY,order_line_ol_o_id',
> 'PRIMARY', '4', 'tpcw.orders.o_id', 1, ''
> 

-

> Can it be optimized?
>
>> From: 王 旭 <[EMAIL PROTECTED]>
>> To: mysql@lists.mysql.com
>> Subject: optimize a sql statement
>> Date: Sat, 16 Jul 2005 18:24:15 +0800
>>
>> Follow is my sql statement:
>> 

-


>>
>
>
>>
>> SELECT SUM(ol_qty) sumolqty, ol_i_id FROM orders, order_line WHERE
>> orders.o_id = order_line.ol_o_id AND orders.o_id > (SELECT
>> MAX(o_id)-1 FROM orders) AND NOT (order_line.ol_i_id = 5000) AND
>> orders.o_c_id IN (SELECT o_c_id FROM orders, order_line WHERE
>> orders.o_id = order_line.ol_o_id and orders.o_id > (SELECT
>> MAX(o_id)-1 FROM orders) AND order_line.ol_i_id = 5000) GROUP BY
>> ol_i_id ORDER BY sumolqty DESC limit 50
>> 

--


>>
>
>
>>
>> follows are explain output:
>> 

--


>>
>
>
>>
>> 1, 'PRIMARY', 'orders', 'range', 'PRIMARY', 'PRIMARY', '4', '',
>> 19398, 'Using where; Using temporary; Using filesort'
>>
>> 1, 'PRIMARY', 'order_line', 'ref',
>> 'PRIMARY,order_line_ol_i_id,order_line_ol_o_id',
>> 'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
>>
>> 3, 'DEPENDENT SUBQUERY', 'orders', 'ref', 'PRIMARY,orders_o_c_id',
>> 'orders_o_c_id', '5', 'func', 1, 'Using where; Using index'
>>
>> 3, 'DEPENDENT SUBQUERY', 'order_line', 'ref',
>> 'PRIMARY,order_line_ol_i_id,order_line_ol_o_id',
>> 'order_line_ol_o_id', '4', 'tpcw.orders.o_id', 1, 'Using where'
>>
>> 4, 'SUBQUERY', '', '', '', '', '', '', , 'Select tables optimized 

away'

>>
>> 2, 'SUBQUERY', '', '', '', '', '', '', , 'Select tables optimized 

away'
>> 

--


>>
>
>
>>
>>
>> This sql statement performance is too bad.Please help me to optimize
>> it .
>>
>> thanks!
>>
>> _
>> 免费下载 MSN Explorer: http://explorer.msn.com/lccn/
>>
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:
>> http://lists.mysql.com/[EMAIL PROTECTED]
>>
>
> _
> 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
>



_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  



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



about: Select tables optimized away

2005-07-18 Thread 王 旭
When I explain "SELECT MAX(o_id)-1 FROM orders",it tell me "Select 
tables optimized away".What is it meaning?It show me  good or bad?

thanks!

_
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  



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