1 2# category: topic: keyword: 3# 4# impossible_category_1 5# impossible_function_1 6# impossible_function_5 7# impossible_function_2 8# impossible_function_1 9# impossible_category_2 10# impossible_function_3 11# impossible_function_6 12# impossible_function_4 13# impossible_function_6 14# impossible_category_3 15# impossible_function_7 16SET sql_mode = 'NO_ENGINE_SUBSTITUTION'; 17insert into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1'); 18select @category1_id:= 10001; 19insert into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2'); 20select @category2_id:= 10002; 21insert into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id); 22select @category3_id:= 10003; 23 24insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1'); 25select @topic1_id:= 10101; 26insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2'); 27select @topic2_id:= 10102; 28insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3'); 29select @topic3_id:= 10103; 30insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4'); 31select @topic4_id:= 10104; 32insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7'); 33select @topic5_id:= 10105; 34 35insert into mysql.help_keyword(help_keyword_id,name)values(10201,'impossible_function_1'); 36select @keyword1_id:= 10201; 37insert into mysql.help_keyword(help_keyword_id,name)values(10202,'impossible_function_5'); 38select @keyword2_id:= 10202; 39insert into mysql.help_keyword(help_keyword_id,name)values(10203,'impossible_function_6'); 40select @keyword3_id:= 10203; 41 42insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword1_id,@topic2_id); 43insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword2_id,@topic1_id); 44insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword3_id,@topic3_id); 45insert into mysql.help_relation(help_keyword_id,help_topic_id)values(@keyword3_id,@topic4_id); 46 47############## 48help 'function_of_my_dream'; 49help '%possible_f%'; 50help 'impossible_func%'; 51help 'impossible_category%'; 52help 'impossible_%'; 53 54help '%function_1'; 55help '%function_2'; 56help '%function_3'; 57help '%function_4'; 58help '%function_5'; 59help '%function_6'; 60help '%function_7'; 61 62help '%category_2'; 63help 'impossible_function_1'; 64help 'impossible_category_1'; 65############## 66 67delete from mysql.help_topic where help_topic_id=@topic1_id; 68delete from mysql.help_topic where help_topic_id=@topic2_id; 69delete from mysql.help_topic where help_topic_id=@topic3_id; 70delete from mysql.help_topic where help_topic_id=@topic4_id; 71delete from mysql.help_topic where help_topic_id=@topic5_id; 72 73delete from mysql.help_category where help_category_id=@category3_id; 74delete from mysql.help_category where help_category_id=@category2_id; 75delete from mysql.help_category where help_category_id=@category1_id; 76 77delete from mysql.help_keyword where help_keyword_id=@keyword1_id; 78delete from mysql.help_keyword where help_keyword_id=@keyword2_id; 79delete from mysql.help_keyword where help_keyword_id=@keyword3_id; 80 81delete from mysql.help_relation where help_keyword_id=@keyword1_id and help_topic_id=@topic2_id; 82delete from mysql.help_relation where help_keyword_id=@keyword2_id and help_topic_id=@topic1_id; 83delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic3_id; 84delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic4_id; 85 86--echo End of 4.1 tests. 87 88# 89# Test that we can use HELP even under LOCK TABLES. See bug#9953: 90# CONVERT_TZ requires mysql.time_zone_name to be locked. 91# 92--disable_warnings 93DROP TABLE IF EXISTS t1; 94--enable_warnings 95 96CREATE TABLE t1 (i INT); 97 98LOCK TABLES t1 WRITE; 99 100HELP no_such_topic; 101 102UNLOCK TABLES; 103 104DROP TABLE t1; 105 106SET sql_mode = default; 107 108--echo End of 5.1 tests. 109