Hi!

>>>>> "David" == David Mechner <[EMAIL PROTECTED]> writes:

David> Hi,
David> My license number is 7697. I don't know what the expiration date is. I'm 
running 3.23.28-gamma msqld-opt under w2k.

David> I'm trying to use a HEAP table to speed up data access, but every select I do 
which references an indexed column gives me: 

David> ERROR 1030: Got error 124 from table handler

David> Other select statements work. I don't know what this means, and can't find any 
documentation on it in the manual. perror says 124 is "wrong index given to function", 
which isn't much more helpful. 

David> The heap table is created like this: 

David> DROP TABLE IF EXISTS data_series_heap;
David> CREATE TABLE data_series_heap TYPE=HEAP select * from data_series;
David> CREATE INDEX stock_id_index ON data_series_heap(stock_id);

David> where the original table was created as: 

David> DROP TABLE IF EXISTS data_series;
David> CREATE TABLE data_series (
David> id          INTEGER PRIMARY KEY AUTO_INCREMENT, 
David> stock_id    INTEGER NOT NULL REFERENCES stocks,      
David> data_type   ENUM('LTG', 'EPS', 'REC', 'PRC') NOT NULL,
David> periodicity ENUM('NONE', 'ANN', 'SEM', 'QTR') NOT NULL,
David> period_y    INTEGER,
David> period_m    INTEGER,
David> unique index(stock_id,data_type,periodicity,period_y,period_m)
David> );

The above means that somehow the usage of the heap table doesn't work
as expected.

I tried to repeat this but I didn't succeed on doing this.

----------

mysql> create table t1 (id int not null primary key auto_increment, stock_id int not 
null);
Query OK, 0 rows affected (0.05 sec)

mysql> insert into t1 (stock_id) values (1),(2),(5),(10),(15),(10),(21),(55);
Query OK, 8 rows affected (0.01 sec)
Records: 8  Duplicates: 0  Warnings: 0

mysql> CREATE TABLE t2 TYPE=HEAP select * from t1;
Query OK, 8 rows affected (0.04 sec)
Records: 8  Duplicates: 0  Warnings: 0

mysql>  CREATE INDEX stock_id_index ON t2(stock_id);
Query OK, 8 rows affected (0.03 sec)
Records: 8  Duplicates: 0  Warnings: 0

mysql> select * from t2 where stock_id=5;
+----+----------+
| id | stock_id |
+----+----------+
|  3 |        5 |
+----+----------+
1 row in set (0.00 sec)

--------------------

If you can ftp a full workable example that crashes to:
ftp://support.mysql.com/pub/mysql/secret

we will fix this!

Regards,
Monty

---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to