Re: Behaviour of GROUP function inside subselect with an insert with MySQL 4.1
am 12.01.2003 01:52:27 von Jocelyn FournierHi Sanja,
I finally hit a bug :)
How-to-repeat :
CREATE TABLE `t` (
`i` int(11) NOT NULL default '0',
PRIMARY KEY (`i`)
) TYPE=MyISAM CHARSET=latin1
INSERT INTO t VALUES (1);
Query OK, 1 row affected (0.01 sec)
UPDATE t SET i=i+(SELECT MAX(i) FROM (SELECT 1) t) WHERE i=(SELECT MAX(i));
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
UPDATE t SET i=i+1 WHERE i=(SELECT MAX(i));
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0 Changed: 0 Warnings: 0
UPDATE t SET i=i+1 WHERE i=(SELECT MAX(i));
ERROR 1111: Invalid use of group function
Regards,
Jocelyn
----- Original Message -----
From: "Sanja Byelkin"
To: "Jocelyn Fournier"
Cc: "Sanja Byelkin"
Sent: Saturday, January 11, 2003 4:00 PM
Subject: Re: Behaviour of GROUP function inside subselect with an insert
with MySQL 4.1
> Hi, Jocelyn!
>
> On Sat, Jan 11, 2003 at 03:53:46PM -0000, Jocelyn Fournier wrote:
> > In fact It was just an example, of course I'm not using this kind of
query
> > in my application :)
>
> Sorry, I was sure that you do not use such queries :)
> I was trying to show that such queries is needless.
>
> --
> For technical support contracts, visit https://order.mysql.com/
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Mr. Oleksandr Byelkin
> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
> /_/ /_/\_, /___/\___\_\___/ Lugansk, Ukraine
> <___/ www.mysql.com
>
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread13462@lists.mysql.com
To unsubscribe, e-mail