You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.4 KiB

19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
  1. use test;
  2. drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
  3. create table t1 (a int key, b int unique, c int) engine ndb;
  4. ERROR HY000: Can't create table './test/t1.frm' (errno: 299)
  5. create table t1 (a int key, b int unique, c int) engine ndb;
  6. insert into t1 values (1,1,0),(2,2,0),(3,3,0),(4,4,0),(5,5,0),(6,6,0),(7,7,0),(8,8,0),(9,9,0),(10,10,0);
  7. create table t2 as select * from t1;
  8. select * from t1 where a = 1;
  9. a b c
  10. 1 1 0
  11. select * from t1 where b = 4;
  12. a b c
  13. 4 4 0
  14. select * from t1 where a > 4 order by a;
  15. a b c
  16. 5 5 0
  17. 6 6 0
  18. 7 7 0
  19. 8 8 0
  20. 9 9 0
  21. 10 10 0
  22. update t1 set b=102 where a = 2;
  23. update t1 set b=103 where b = 3;
  24. update t1 set b=b+100;
  25. update t1 set b=b+100 where a > 7;
  26. delete from t1;
  27. insert into t1 select * from t2;
  28. create unique index new_index on t1 (b,c);
  29. drop table t1;
  30. ERROR 42S02: Unknown table 't1'
  31. create index new_index_fail on t1 (c);
  32. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  33. insert into t1 values (21,21,0),(22,22,0),(23,23,0),(24,24,0),(25,25,0),(26,26,0),(27,27,0),(28,28,0),(29,29,0),(210,210,0);
  34. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  35. select * from t1 where a = 1;
  36. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  37. select * from t1 where b = 4;
  38. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  39. update t1 set b=102 where a = 2;
  40. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  41. update t1 set b=103 where b = 3;
  42. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  43. update t1 set b=b+100;
  44. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  45. update t1 set b=b+100 where a > 7;
  46. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  47. BEGIN;
  48. update t1 set b=b+100 where a=1;
  49. BEGIN;
  50. update t1 set b=b+100 where a=2;
  51. update t1 set b=b+100 where a=3;
  52. COMMIT;
  53. update t1 set b=b+100 where a=4;
  54. ERROR HY000: Got error 299 'Operation not allowed or aborted due to single user mode' from ndbcluster
  55. COMMIT;
  56. ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
  57. create table t2 (a int) engine myisam;
  58. alter table t2 add column (b int);
  59. drop table t2;
  60. drop table t1;