0

I have the table smses_in with id and text columns (about 250 000 records), when I do the query

SELECT count(id) FROM `smses_in` group by text

I get next error:

1022 - Can't write; duplicate key in table '/tmp/#sql_3ed_0'.

John Conde
  • 207,509
  • 96
  • 428
  • 469
Victor Bredihin
  • 1,952
  • 16
  • 29

1 Answers1

0

you cannot get that error for a select statement i did a similar query

select count(*) from supportContacts group by id

you can see at http://sqlfiddle.com/#!2/a2581/24273

possibly there is some other query in your code which is being run at thee same time...

Aamir
  • 328
  • 1
  • 8
  • So, i created table and insert several rows, all works fine. But I need import file(about 250 000 rows), and when I imported this file, my query (SELECT count(id) FROM `smses_in` group by text) broken with erro (1022 - Can't write; duplicate key in table '/tmp/#sql_3ed_0'.) – Victor Bredihin Apr 29 '14 at 15:46
  • http://speedy.sh/46gKf/wordpress.sql link to schema, you can import it to your DB and see my error – Victor Bredihin Apr 29 '14 at 16:02