MySQL 4.1.1-alpha incorrectly computes select-list
correlated subqueries. See the explanation of the
problem below. Is this a known problem?
Thanks!
Consider the following schema and data:
CREATE TABLE person (pid INTEGER, name CHAR(5));
CREATE TABLE phone (pid INTEGER, num CHAR(10));
INSERT
Consider the following schema and data:
CREATE TABLE person (pid INTEGER, name CHAR(5));
CREATE TABLE phone (pid INTEGER, num CHAR(10));
INSERT INTO PERSON VALUES (1, 'Bob');
INSERT INTO PERSON VALUES (2, 'Jane');
INSERT INTO PHONE VALUES (1, '12345');
INSERT INTO PHONE VALUES (1, '23456');
INSER
The SQL specification does allow aggregates in the
ORDER BY. Does mySQL have any plans to add such
functionality (or at least add it to its list of
things it doesn't do)? The problem with the solution
of ordering by an alias is that I may not necessarily
want the thing I'm ordering by to be in th
only one
> comparison occurring
> instead of two, negating name='Bob'. After all, you
> are looking to
> negate the equal, not negate name.
>
> On Friday, October 3, 2003, at 07:42 AM, Ed Smith
> wrote:
>
> > In mySQL 4.1-alpha, 4.0.15a, and 3.23.58, I
Why doesn't the following work:
mysql> CREATE TABLE dog(id integer, breed char(20),
age integer, weight integer)
;
mysql> SELECT breed, MIN(age)
-> FROM dog
-> GROUP BY breed
-> ORDER BY MIN(age);
ERROR : Invalid use of group function
but this does
mysql> SELECT breed, MIN(age)
I am reposting this in hopes of convincing the mySQL
implementors to change mySQL or to at least gain some
understanding as to why they violated the
specification.
Apparently, in MySQL, NOT has higher precedence than
the comparison operators, so
WHERE NOT name = 'Bob'
is equivalent to
WHERE (
> >Here's my schema and data:
> >
> >create table person (name char(5));
> >insert into person values ('Bob');
> >insert into person values ('Jane');
> >
> >In mySQL 4.1-alpha, 4.0.15a, and 3.23.58, I get the
> >following results:
> >
> >mysql> SELECT * FROM person WHERE NOT name = 'Bob';
> >Empty
Here's my schema and data:
create table person (name char(5));
insert into person values ('Bob');
insert into person values ('Jane');
In mySQL 4.1-alpha, 4.0.15a, and 3.23.58, I get the
following results:
mysql> SELECT * FROM person WHERE NOT name = 'Bob';
Empty set (0.00 sec)
mysql> SELECT * F
ction 4.6.1 of the 4.1 manual. I appreciate any and
all help. For now, I am having to disable foreign key
integrity constraint checking.
Ed
--- Victoria Reznichenko
<[EMAIL PROTECTED]> wrote:
> Ed Smith <[EMAIL PROTECTED]> wrote:
> > Greetings. When I execute the SQL script
ave to do this to make it work.
Other suggestions?
Thanks.
--- Harald Fuchs <[EMAIL PROTECTED]> wrote:
> In article
>
<[EMAIL PROTECTED]>,
> Ed Smith <[EMAIL PROTECTED]> writes:
>
> > Greetings. When I execute the SQL script below in
> > mySQL 4.1, I get
Greetings. When I execute the SQL script below in
mySQL 4.1, I get
ERROR 1216: Cannot add or update a child row: a
foreign key constraint fails
It is, of course, choking on the enroll row insert.
Why is this happening? Here are some things that make
the problem go away:
1. Take out the "name
First, my apologies. I originally posted this to the
mailing.databases.mysql newsgroup, not realizing that
the newsgroup is just mirror of the mailing list.
I have since figured out the answer to my second
question (I think) - see below. My answer is: The
Primary Key specification creates an in
12 matches
Mail list logo