List:General Discussion« Previous MessageNext Message »
From:Ken Williams Date:April 24 1999 3:32am
Subject:SELECT not returning all matching rows
View as plain text  
>Description:
This is from a mysql session.  Note that the first SELECT statement
should have returned the row that the second SELECT statement returned
too.

mysql> show columns from messages;
+---------+-----------------------+------+-----+---------+-------+
| Field   | Type                  | Null | Key | Default | Extra |
+---------+-----------------------+------+-----+---------+-------+
| thread  | mediumint(8) unsigned |      | PRI | 0       |       |
| message | varchar(4)            |      | PRI |         |       |
+---------+-----------------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql> select * from messages where thread=116225;
+--------+---------+
| thread | message |
+--------+---------+
| 116225 | 0       |
+--------+---------+
1 row in set (0.00 sec)

mysql> select * from messages where message = 'abc';
+--------+---------+
| thread | message |
+--------+---------+
| 116225 | abc     |
+--------+---------+
1 row in set (0.78 sec)

mysql> show index from messages;
+----------+------------+----------+--------------+-------------+-----------+-------------+----------+
| Table    | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality
| Sub_part |
+----------+------------+----------+--------------+-------------+-----------+-------------+----------+
| messages |          0 | thread   |            1 | thread      | A         |       47216
|     NULL |
| messages |          0 | thread   |            2 | message     | A         |       47216
|     NULL |
+----------+------------+----------+--------------+-------------+-----------+-------------+----------+
2 rows in set (0.00 sec)


isamchk didn't find any problems with the messages table, even with
the -e flag.  Help?


>How-To-Repeat:
	unknown
>Fix:
	unknown

>Submitter-Id:	<submitter ID>
>Originator:	Ken Williams
>Organization:
 
>MySQL support: none
>Synopsis:	SELECT not returning all matching rows
>Severity:	critical
>Priority:	high
>Category:	mysql
>Class:		sw-bug
>Release:	mysql-3.22.20a (TCX binary)
>Environment:
	
System: OSF1 forum.swarthmore.edu V4.0 564 alpha
Machine: alpha
Some paths:  /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/alpha-dec-osf4.0b/2.8.1/specs
gcc version 2.8.1
Compilation info: CC='cc -std1'  CFLAGS='-O3'  CXX='gcc'  CXXFLAGS='-O3
-fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti'  LDFLAGS=''
Configure command: ./configure  --prefix=/usr/local/mysql '--with-comment=TCX binary'
--with-low-memory --disable-shared
Perl: This is perl, version 5.004_04 built for alpha-dec_osf
Thread
SELECT not returning all matching rowsKen Williams24 Apr
  • SELECT not returning all matching rowsMichael Widenius25 Apr
    • Re: SELECT not returning all matching rowsKen Williams4 May