From: [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
Subject: LIMIT of 1000 rows returned on SELECT (2nd try)

Description:
        When doing a query on a table with more than 1000 rows, 
        the SELECT * query returns only the first 1000 rows.

How-To-Repeat:
        I tried to attach data for the "shop" table in your Tutorial which 
        demonstrates the problem, but got the following reply from you:

Hi. This is the qmail-send program at lists.mysql.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<[EMAIL PROTECTED]>:
ezmlm-reject: fatal: Sorry, I don't accept messages larger than 30000 bytes
(#5.2.3)

<[EMAIL PROTECTED]>:

         So what I have done this time is attached the AWK program which
         generated the data.

Fix:
        Work-around:    add a LIMIT -1 to the SELECT query

        Long-term fix:  add words in section 6.4.1 of the manual which:
                            1. describe the 1000 line limit
                            2. describe how to use the LIMIT -1 option

Synopsis:       LIMIT of 1000 rows returned on SELECT
Submitter-Id:   none
Originator:     [EMAIL PROTECTED]
Organization:   eds
MySQL support:  none
Severity:       non-critical
Priority:       low
Category:       mysql manual
Class:          doc-bug
Release:        mysql-3.23.38

Exectutable:   mysqld
Environment:   PC
System:        Win2000
Compiler:      VC++ 6.0
Architecture:  i

============================================================================
====
 
CREATE TABLE shop (
 article INT(4) UNSIGNED ZEROFILL DEFAULT '0000' NOT NULL,
 dealer  CHAR(20)                 DEFAULT ''     NOT NULL,
 price   DOUBLE(16,2)             DEFAULT '0.00' NOT NULL,
 PRIMARY KEY(article, dealer));

INSERT INTO shop VALUES
(1,'A',3.45),(1,'B',3.99),(2,'A',10.99),(3,'B',1.45),(3,'C',1.69),
(3,'D',1.25),(4,'D',19.95);

LOAD DATA LOCAL INFILE "nameoffilebelow.txt" INTO SHOP;

SELECT * FROM SHOP;            # demonstrates limit of 1000 rows
SELECT * FROM SHOP LIMIT -1;   # demonstrates work-around

============================================================================
====
# genshop.awk
# generate random data for 1500 articles in the dummy MySQL 
# tutorial db table called "shop"
BEGIN {  
        min_article = 200
        max_article = 1700

        min_data_value = 0.50
        max_data_value = 999.50

        len_dealer_name = 5

for (a=min_article; a <= max_article; a++) {
    printf("%04d\t", a)
    dealer = ""
    for (k=1; k <= len_dealer_name; k++) {
      dealer = dealer randltr()
    }
    printf("%s\t%8.2f\n", dealer, randf(min_data_value, max_data_value))
}
      }
function randint (a, b) { return int((b-a+1)*rand()) + a }
function randf (a, b) { return (b-a)*rand() + a }
function randltr () { 
   return substr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", randint(1,26), 1)
}
============================================================================
====                [EMAIL PROTECTED]
Electronic Data Systems
Plano Solution Centre - Internal Systems
(972) 605-3931    (8-837)



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

Reply via email to