Update Doesn't Update!

2009-12-11 Thread Victor Subervi
Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 mysql select sizes, colorsShadesNumbersShort from products where ID=0; +---+--+ | sizes |

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 04:38:01 -0500, Victor Subervi victorsube...@gmail.com wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Warnings: 1 do a SHOW WARNINGS

Re: Update Doesn't Update!

2009-12-11 Thread Jørn Dahl-Stamnes
On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look at the message, 0 rows changed

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:48 AM, Jørn Dahl-Stamnes sq...@dahl-stamnes.netwrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread Martijn Tonies
mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look at the message, 0 rows changed and 1 warning. You cannot have ID=0 if ID is an index. Are you

RE: Update Doesn't Update!

2009-12-11 Thread misiaQ
If ID column is primary key and auto increment as you said, it cant be equal to zero. You got a query which reads: UPDATE columns WHERE false There is no chance for any updates. http://dev.mysql.com/doc/refman/5.0/en/update.html Regards, m -Original Message- From: Victor Subervi

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 4:43 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 04:38:01 -0500, Victor Subervi victorsube...@gmail.com wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed:

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 10:48:59 +0100, Jørn Dahl-Stamnes sq...@dahl-stamnes.net wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 mysql show warnings;

Re: Update Doesn't Update!

2009-12-11 Thread Mark Goodge
Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 1 Look at the

Re: Update Doesn't Update!

2009-12-11 Thread Yang Wang
first desc products or try to update products set sizes='Small' where SKU='prodSKU1'; Best Regards! Yang Wang Tel.: 0769-21687397 Fax.: 0769-21685577 Email: yw...@lfm-agile.com.hk - Original Message - From: cars...@bitbybit.dk To: Victor Subervi victorsube...@gmail.com Cc:

Re: Update Doesn't Update!

2009-12-11 Thread Chris Knipe
Quoting cars...@bitbybit.dk: Of course you can have ID=0. Definately agree mysql DESCRIBE test; +-+-+--+-+-++ | Field | Type| Null | Key | Default | Extra |

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large') where SKU='prodSKU1'; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1

Re: Update Doesn't Update!

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 05:28:41 -0500, Victor Subervi victorsube...@gmail.com wrote: On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com wrote: mysql update products set sizes=('Small', 'Large')

different 5.0 and 5.1 about long_query_time

2009-12-11 Thread Yang Wang
Hi,All The version of 5.1 include microtime slow query patch? slow query log in version 5.1 __ # u...@host: root[root] @ localhost [] # Query_time: 0.94 Lock_time: 0.24 Rows_sent: 0 Rows_examined: 0

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 5:33 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:28:41 -0500, Victor Subervi victorsube...@gmail.com wrote: On Fri, Dec 11, 2009 at 5:13 AM, cars...@bitbybit.dk wrote: On Fri, 11 Dec 2009 05:09:52 -0500, Victor Subervi victorsube...@gmail.com

Re: different 5.0 and 5.1 about long_query_time

2009-12-11 Thread Jaime Crespo Rincón
2009/12/11 Yang Wang yw...@lfm-agile.com.hk: Hi,All   The version of 5.1 include microtime slow query patch? As of MySQL 5.1.21, the minimum value is 0, and a resolution of microseconds is supported when logging to a file. http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html Regards, --

Re: different 5.0 and 5.1 about long_query_time

2009-12-11 Thread carsten
On Fri, 11 Dec 2009 18:43:06 +0800, Yang Wang yw...@lfm-agile.com.hk wrote: Hi,All The version of 5.1 include microtime slow query patch? It would have taken you less time to google mysql long_query_time and getting your answer, than it did to write your mail... / Carsten --

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Johan De Meersman
This only works for MyISAM :-) However, there's another solution where you don't need to shut down, and that works for any engine afaik: rename table oldschema.table to newschema.table; I agree that it's a silly thing to not have, but I can't say that I've encountered a whole lot of instances

Re: Update Doesn't Update!

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge m...@good-stuff.co.uk wrote: Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small', 'Large') where ID=0; Query OK, 0 rows affected, 1 warning (0.00 sec) Rows matched: 1

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Ken D'Ambrosio
On Fri, December 11, 2009 7:38 am, Johan De Meersman wrote: This only works for MyISAM :-) Good to know -- thanks! However, there's another solution where you don't need to shut down, and that works for any engine afaik: rename table oldschema.table to newschema.table; Just to be 100%

Join between columns with unique keys randomly uses the keys, or uses a temporary table (which fails).

2009-12-11 Thread Matthew Blissett
Hi all I have this query: SELECT n.ID, n.CatalogNumber, [...more...], d.ID, d.CatalogNumber, [...more...] FROM newdarwincoredata n INNER JOIN darwincoredata d ON n.CatalogNumber = d.CatalogNumber ORDER BY n.CatalogNumber; Both tables have exactly the same structure and indices: mysql SHOW

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 1:56 PM, Ken D'Ambrosio k...@jots.org wrote: rename table oldschema.table to newschema.table; Just to be 100% clear -- I assume you have to first create the destination database, and then do this for all the tables in the source database? Yep. Easily scriptable,

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Michael Dykman
If you want to move the database atomically, a RENAME TABLE statement may have multiple clauses. RENAME TABLE olddb.foo to newdb.foo, olddb.bar to newdb.bar; Here, I hot-swap a new lookup table 'active.geo' into a live system confident that, at any given point, some version of this

Stored Proc's

2009-12-11 Thread Steve Staples
Silly question here... But can I have multiple definers for a stored proc, rather than allowing `us...@`%`? basically, I want to only allow 1 user name, but from only 2 or 3 IP's. My Googleing didn't turn up anything of use, so now, I am here asking :) Thanks in advance! Steve Staples.

Re: Stored Proc's

2009-12-11 Thread Michael Dykman
of course. you can have entries u...@domain1.me.com u...@xxx.foo.com the only caveat is to make sure the reverse lookup of your client hosts works as expected as those are the names that mysql will apply at authentication time. - mkichael dykman On Fri, Dec 11, 2009 at 9:36 AM, Steve

temporary merge table as table name alias

2009-12-11 Thread Dante Lorenso
All, Is is possible to create temporary MERGE tables? This code gives an error: 8 8 -- clean slate DROP TABLE IF EXISTS test_abcdefgh; DROP TABLE IF EXISTS dante; -- create demo table CREATE TABLE test_abcdefgh

RE: Stored Proc's

2009-12-11 Thread Steven Staples
They are actual IP's, not domain names. So it would be like `us...@`192.168.0.100` and `us...@`192.168.0.101`... so how would I go about putting that in the definer? Currently, i have this: DELIMITER $$ USE `tablename`$$ DROP PROCEDURE IF EXISTS `tablename`$$ CREATE

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Jim Lyons
Can you use that syntax if the databases are on different file systems? If you can, and the original table is big, the command would take a while as it moved data from one file system to another. On Fri, Dec 11, 2009 at 7:58 AM, Johan De Meersman vegiv...@tuxera.bewrote: On Fri, Dec 11, 2009

Re: Update Doesn't Update!

2009-12-11 Thread Victor Subervi
On Fri, Dec 11, 2009 at 8:43 AM, Johan De Meersman vegiv...@tuxera.bewrote: On Fri, Dec 11, 2009 at 11:19 AM, Mark Goodge m...@good-stuff.co.uk wrote: Jørn Dahl-Stamnes wrote: On Friday 11 December 2009 10:38, Victor Subervi wrote: Hi; mysql update products set sizes=('Small',

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Michael Dykman
According to MySQL docs, it should still work atomically. Granted, I have only used this particular trick when they are on the same filesystem. Copying across filesystems, I imagine it should still be atomic, but your system may be locked for awhile. Obviously, a dedicated RENAME DATABASE

Re: Stored Proc's

2009-12-11 Thread Michael Dykman
Yeah, that's exactly right You can also do some partials like 'user'@'192.168.2.%' - michael dykman On Fri, Dec 11, 2009 at 11:33 AM, Steven Staples sstap...@mnsi.net wrote: They are actual IP's, not domain names. So it would be like `us...@`192.168.0.100` and `us...@`192.168.0.101`...

errno: 13

2009-12-11 Thread Carl
Fresh install of 5.1.41 on a brand new (Slackware 13 - 64 bit) machine. Installed from tar. Directory structure is: basedir=/usr/local/mysql and datadir=/storage/mysql/data. I am currently running as root. The permissions on the directories in /storage/mysql/data are 766 (I have double and

RE: errno: 13

2009-12-11 Thread Gavin Towey
Mysql daemon runs as the 'mysql' user Chown -r mysql:mysql /storage/mysql/data Regards, Gavin Towey -Original Message- From: Carl [mailto:c...@etrak-plus.com] Sent: Friday, December 11, 2009 11:55 AM To: mysql@lists.mysql.com Subject: errno: 13 Fresh install of 5.1.41 on a brand new

Re: Update Doesn't Update!

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 6:40 PM, Victor Subervi victorsube...@gmail.comwrote: I'm lost. I set up this database originally with auto_increment and the first value was 0. I thought that was always the case. Is there a problem here? Yes, that should not have happened. For autoincrement fields,

RE: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Daevid Vincent
Will this work in 5.0? If I'm reading this right, it seems like this is some kind of trick or loophole then right? If it works and solves my dilemna, I'm fine with that, but I'm just curious. How fast is this? I mean, if I have an 80GB database, is it like a real unix 'mv' command where it

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Michael Dykman
No, not a loophole. Just a plain-old management feature.. there is nothing particularly hacky about it.. this is not trying to leverage undocumented features: this has been a published part of the API for at least a couple of years. On the same file system, yes it should be pretty damned fast.

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Johan De Meersman
On Fri, Dec 11, 2009 at 10:40 PM, Daevid Vincent dae...@daevid.com wrote: Will this work in 5.0? Yes. If I'm reading this right, it seems like this is some kind of trick or loophole then right? If it works and solves my dilemna, I'm fine with that, but I'm just curious. Not really, this

Re: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Saravanan
if you have myisam alone tables you can rename the folder of the database. That can work like rename database. If you have innodb table you have to move one by one table because details of those tables will be stored in innodb shared table space. Moving folder cannot work. Thanks, Saravanan

RE: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Gavin Towey
Don't forget triggers, stored routines, views, database/table specific user permissions, and replication/binlog options! Regards, Gavin Towey -Original Message- From: Saravanan [mailto:suzuki_b...@yahoo.com] Sent: Friday, December 11, 2009 2:02 PM To: MySql; Michael Dykman Subject: Re:

RE: Are you serious? mySQL 5.0 does NOT have a RENAME DATABASE?

2009-12-11 Thread Daevid Vincent
In our case, we purposely avoid using any of those features. Just straight up INNODB tables. Permissions would be an issue, but in my case, I have a new dump of a database that I want to 'swap' with the existing one. A simple rename old, rename new to old would have solved it. Hence this thread.

does mysqlhotcopy affect the key buffer?

2009-12-11 Thread Tom Worster
i run mysqlhotcopy on each database once every three hours. i happened to be running my cache warmer this afternoon, which logs timing for a bunch of standard randomized queries, that when the backup script ran, the query times increased by a factor of about 20 from a nice quick pace back down to

Re: Join on a where clause.

2009-12-11 Thread Joerg Bruehe
Hi Paul, all! Paul Halliday wrote: On Wed, Dec 9, 2009 at 2:24 PM, Joerg Bruehe joerg.bru...@sun.com wrote: Hi everybody! Neil Aggarwal wrote: Paul: SELECT COUNT(event.src_ip) AS count, INET_NTOA(event.src_ip), mappings.cc FROM event, mappings WHERE event.timestamp BETWEEN '2009-12-06