help.test
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:5k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. #      category:                     topic:               keyword:
  2. #
  3. # impossible_category_1
  4. #                            impossible_function_1
  5. #                                                   impossible_function_5 
  6. #                            impossible_function_2
  7. #                                                   impossible_function_1
  8. # impossible_category_2
  9. #                            impossible_function_3
  10. #                                                   impossible_function_6                                            
  11. #                            impossible_function_4
  12. #                                                   impossible_function_6
  13. #      impossible_category_3
  14. #                            impossible_function_7 
  15. insert into mysql.help_category(help_category_id,name)values(1,'impossible_category_1');
  16. select @category1_id:= 1;
  17. insert into mysql.help_category(help_category_id,name)values(2,'impossible_category_2');
  18. select @category2_id:= 2;
  19. insert into mysql.help_category(help_category_id,name,parent_category_id)values(3,'impossible_category_3',@category2_id);
  20. select @category3_id:= 3;
  21. insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(1,'impossible_function_1',@category1_id,'description of n impossible_function1n','example of n impossible_function1');
  22. select @topic1_id:= 1;
  23. insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(2,'impossible_function_2',@category1_id,'description of n impossible_function2n','example of n impossible_function2');
  24. select @topic2_id:= 2;
  25. insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(3,'impossible_function_3',@category2_id,'description of n impossible_function3n','example of n impossible_function3');
  26. select @topic3_id:= 3;
  27. insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(4,'impossible_function_4',@category2_id,'description of n impossible_function4n','example of n impossible_function4');
  28. select @topic4_id:= 4;
  29. insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(5,'impossible_function_7',@category3_id,'description of n impossible_function5n','example of n impossible_function7');
  30. select @topic5_id:= 5;
  31. insert into mysql.help_keyword(help_keyword_id,name)values(1,'impossible_function_1');
  32. select @keyword1_id:= 1;
  33. insert into mysql.help_keyword(help_keyword_id,name)values(2,'impossible_function_5');
  34. select @keyword2_id:= 2;
  35. insert into mysql.help_keyword(help_keyword_id,name)values(3,'impossible_function_6');
  36. select @keyword3_id:= 3;
  37. insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword1_id,@topic2_id);
  38. insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword2_id,@topic1_id);
  39. insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword3_id,@topic3_id);
  40. insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword3_id,@topic4_id);
  41. ##############
  42. help 'function_of_my_dream';
  43. help '%possible_f%';
  44. help 'impossible_func%';
  45. help 'impossible_category%';
  46. help 'impossible_%';
  47. help '%function_1';
  48. help '%function_2';
  49. help '%function_3';
  50. help '%function_4';
  51. help '%function_5';
  52. help '%function_6';
  53. help '%function_7';
  54. help '%category_2';
  55. help 'impossible_function_1';
  56. help 'impossible_category_1';
  57. ##############
  58. --disable_warnings
  59. alter table mysql.help_relation engine=innodb;
  60. alter table mysql.help_keyword engine=innodb;
  61. alter table mysql.help_topic engine=innodb;
  62. alter table mysql.help_category engine=innodb;
  63. --enable_warnings
  64. ##############
  65. help 'function_of_my_dream';
  66. help '%possible_f%';
  67. help 'impossible_func%';
  68. help 'impossible_category%';
  69. help 'impossible_%';
  70. help '%function_1';
  71. help '%function_2';
  72. help '%function_3';
  73. help '%function_4';
  74. help '%function_5';
  75. help '%function_6';
  76. help '%function_7';
  77. help '%category_2';
  78. help 'impossible_function_1';
  79. help 'impossible_category_1';
  80. ##############
  81. alter table mysql.help_relation engine=myisam;
  82. alter table mysql.help_keyword engine=myisam;
  83. alter table mysql.help_topic engine=myisam;
  84. alter table mysql.help_category engine=myisam;
  85. delete from mysql.help_topic where help_topic_id=@topic1_id;
  86. delete from mysql.help_topic where help_topic_id=@topic2_id;
  87. delete from mysql.help_topic where help_topic_id=@topic3_id;
  88. delete from mysql.help_topic where help_topic_id=@topic4_id;
  89. delete from mysql.help_topic where help_topic_id=@topic5_id;
  90. delete from mysql.help_category where help_category_id=@category3_id;
  91. delete from mysql.help_category where help_category_id=@category2_id;
  92. delete from mysql.help_category where help_category_id=@category1_id;
  93. delete from mysql.help_keyword where help_keyword_id=@keyword1_id;
  94. delete from mysql.help_keyword where help_keyword_id=@keyword2_id;
  95. delete from mysql.help_keyword where help_keyword_id=@keyword3_id;
  96. delete from mysql.help_relation where help_keyword_id=@keyword1_id and help_topic_id=@topic2_id;
  97. delete from mysql.help_relation where help_keyword_id=@keyword2_id and help_topic_id=@topic1_id;
  98. delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic3_id;
  99. delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic4_id;
  100. # End of 4.1 tests