diff options
author | unknown <lenz@mysql.com> | 2004-04-30 14:31:52 +0200 |
---|---|---|
committer | unknown <lenz@mysql.com> | 2004-04-30 14:31:52 +0200 |
commit | c8f807a6fee1ea6c62c3a2fdad3908489c5875b8 (patch) | |
tree | 1cf0eb4f23ca6e231d3c693483fa37e507b29e8d /scripts/fill_help_tables.sh | |
parent | 7bf15f4b7956b6f57ec6f695382e4589814c2d79 (diff) | |
download | mariadb-git-c8f807a6fee1ea6c62c3a2fdad3908489c5875b8.tar.gz |
- reverted change to fill_help_tables.sh ("Added checking of maximum
length of line in output (Bug #2874)" from last ChangeSet (should not
have been applied)
scripts/fill_help_tables.sh:
- reverted change "Added checking of maximum length of line in output
(Bug #2874)" from last ChangeSet (should not have been applied)
Diffstat (limited to 'scripts/fill_help_tables.sh')
-rw-r--r-- | scripts/fill_help_tables.sh | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/scripts/fill_help_tables.sh b/scripts/fill_help_tables.sh index a62fe0e0b11..cb5437f7178 100644 --- a/scripts/fill_help_tables.sh +++ b/scripts/fill_help_tables.sh @@ -45,7 +45,6 @@ use strict; use Getopt::Long; my $insert_portion_size= 15; -my $maximum_line_length= 2040; my $error_prefix= "---- help parsing errors :"; my $path_to_lex_file= "../sql/lex.h"; @@ -167,7 +166,6 @@ sub add_description print_error "double description for $topic_name\n"; } $topics{$topic_name}->{description}= $description; - $topics{$topic_name}->{line_of_description}= $cur_line; add_topic_to_category($topic_name); } @@ -517,52 +515,21 @@ if (scalar(@topic_names)) { my $header= "insert into help_topic ". "(help_topic_id,help_category_id,name,description,example) values "; - my $line_accumulator= $header; - my $lines_in_accumulator= 0; - my $actual_max_line_length= $maximum_line_length-2; # for ";\n" my $topic_name; my $count= 0; foreach $topic_name (@topic_names) { + print_insert_header($count,$header); my $topic= $topics{$topic_name}; - my $line= "($count,"; - $line.= "$topic->{category}->{__id__},"; - $line.= "\"$topic_name\","; - $line.= "\"$topic->{description}\","; - $line.= "\"$topic->{example}\")"; - if ($lines_in_accumulator <= $insert_portion_size && - length($line) + length($line_accumulator) < $actual_max_line_length) - { - if ($lines_in_accumulator ne 0) - { - $line_accumulator.= ","; - } - $line_accumulator.= $line; - $lines_in_accumulator++; - } - else - { - if (length($line) + length($header) >= $actual_max_line_length) - { - $cur_line= $topics{$topic_name}->{line_of_description}; - print_error "too long record for topic \"$topic_name\" \n". - " please decrease its description or example!\n"; - } - else - { - print "$line_accumulator;\n"; - $line_accumulator= $header.$line; - $lines_in_accumulator= 1; - } - } + print "($count,"; + print "$topic->{category}->{__id__},"; + print "\"$topic_name\","; + print "\"$topic->{description}\","; + print "\"$topic->{example}\")"; $topics{$topic_name}->{__id__}= $count; $count++; } - if ($lines_in_accumulator ne 0) - { - print "$line_accumulator;\n"; - } - printf "\n"; + printf ";\n\n"; } my @keywords_names= keys(%keywords); |