Whats the ordering rules for INSERTs (when not specifying values)

Firstly, I know can always just name the columns inserting INSERT INTO idx (id,col2,col3) VALUES ..., but what about when inserting without defining column names?

When you do SHOW CREATE TABLE on a RT index, it gives the columns back in certain order (not sure what yet, its not the same as the actual creation!)

But when do DESCRIBE on the index, get them in different order, text tend to be grouped at the start for example.

… but which one is the default for INSERT (and REPLACE) ?

Its of course more complicated on older config file defined RT index, that could have a ‘rt_field’ and ‘rt_attr_string’ of the same name. But bot would show in DESCRIBE, so could just insert column twice)

values should follow in the same sequence as DESCRIBE shows - fields first then attributes

Ok, thanks, yes it does seem to be the case.

RT>insert into manticore:test1 values (1,2,3,4,5,6);
ERROR 1064 (42000): row 1, column 2: string expected
RT>insert into manticore:test1 values (1,'2',3,4,5,6);
ERROR 1064 (42000): row 1, column 3: string expected
RT>insert into manticore:test1 values (1,'2','3',4,5,6);
Query OK, 1 row affected (0.005 sec)

RT>select * from test1 where id = 1;
+------+-----------+-------+------+---------+
| id   | submitted | width | hash | comment |
+------+-----------+-------+------+---------+
|    1 |         4 |     5 |      | 3       |
+------+-----------+-------+------+---------+
1 row in set (0.066 sec)

RT>insert into manticore:test1 values (2,'2','3',4,5,'6');
Query OK, 1 row affected (0.001 sec)

RT>select * from test1 where id = 2;
+------+-----------+-------+------+---------+
| id   | submitted | width | hash | comment |
+------+-----------+-------+------+---------+
|    2 |         4 |     5 | 6    | 3       |
+------+-----------+-------+------+---------+
1 row in set (0.006 sec)

RT>describe test1;
+-----------+---------+----------------+
| Field     | Type    | Properties     |
+-----------+---------+----------------+
| id        | bigint  |                |
| title     | text    | indexed        |
| comment   | text    | indexed stored |
| submitted | uint    |                |
| width     | uint:24 |                |
| hash      | string  |                |
+-----------+---------+----------------+
6 rows in set (0.001 sec)

Not sure if that a bug or not, but it let me try to insert a number in the string attribute (the 6), but it failed , Looks like inserted as a empty string. gives an error for trying to insert number into text/field.