Commit 3a959eeb authored by unknown's avatar unknown

Fixed bug in CHECK TABLE ... EXTENDED

Added keyword MEDIUM to CHECK TABLE
New benchmarks results for Linux-alpha


BitKeeper/deleted/.del-READ-ME~ed6c5184d4bf6b7c:
  Delete: strings/READ-ME
BitKeeper/deleted/.del-ATIS-mysql-Linux_2.2.13_SMP_alpha~21ddf9425cbdd58:
  Delete: sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-RUN-mysql-Linux_2.2.13_SMP_alpha~583091e05a25fb6:
  Delete: sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-alter-table-mysql-Linux_2.2.13_SMP_alpha~6c20c9ef46f82241:
  Delete: sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-big-tables-mysql-Linux_2.2.13_SMP_alpha~e8cc899bb933532f:
  Delete: sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-connect-mysql-Linux_2.2.13_SMP_alpha~84df7c6446e51e26:
  Delete: sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-create-mysql-Linux_2.2.13_SMP_alpha~2c9af91e9771f618:
  Delete: sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-insert-mysql-Linux_2.2.13_SMP_alpha~688809eb8ea77b3d:
  Delete: sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-select-mysql-Linux_2.2.13_SMP_alpha~db59425a7f4aa93f:
  Delete: sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha
BitKeeper/deleted/.del-wisconsin-mysql-Linux_2.2.13_SMP_alpha~fc410754151d622c:
  Delete: sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha
Docs/manual.texi:
  Updated ChangeLog
myisam/mi_close.c:
  Force write of crashed flag on close
myisam/mi_info.c:
  Fixed that mean_reclength works for big files
mysql-test/r/show_check.result:
  Added test of CHECK TABLE ... MEDIUM
mysql-test/t/show_check.test:
  Added test of CHECK TABLE ... MEDIUM
sql/ha_myisam.cc:
  Fixed that CHECK TABLE .. EXTENDED works properly
  Cleared the CRASHED flag on repair
sql/lex.h:
  Added keyword MEDIUM
sql/sql_yacc.yy:
  Added CHECK TABLE .. MEDIUM
parent 06bd4989
...@@ -18419,13 +18419,15 @@ running! ...@@ -18419,13 +18419,15 @@ running!
@example @example
CHECK TABLE tbl_name[,tbl_name...] [option [option...]] CHECK TABLE tbl_name[,tbl_name...] [option [option...]]
option = QUICK | FAST | EXTEND | CHANGED option = QUICK | FAST | MEDIUM | EXTEND | CHANGED
@end example @end example
@code{CHECK TABLE} only works on @code{MyISAM} and @code{BDB} tables. On @code{CHECK TABLE} only works on @code{MyISAM} and @code{BDB} tables. On
@code{MyISAM} tables it's the same thing as running @code{myisamchk -m @code{MyISAM} tables it's the same thing as running @code{myisamchk -m
table_name} on the table. table_name} on the table.
If you don't specify any option @code{MEDIUM} is used.
Checks the table(s) for errors. For @code{MyISAM} tables the key statistics Checks the table(s) for errors. For @code{MyISAM} tables the key statistics
is updated. The command returns a table with the following columns: is updated. The command returns a table with the following columns:
...@@ -18451,9 +18453,14 @@ The different check types stand for the following: ...@@ -18451,9 +18453,14 @@ The different check types stand for the following:
@item @code{QUICK} @tab Don't scan the rows to check for wrong links. @item @code{QUICK} @tab Don't scan the rows to check for wrong links.
@item @code{FAST} @tab Only check tables which haven't been closed properly. @item @code{FAST} @tab Only check tables which haven't been closed properly.
@item @code{CHANGED} @tab Only check tables which have been changed since last check or haven't been closed properly. @item @code{CHANGED} @tab Only check tables which have been changed since last check or haven't been closed properly.
@item @code{MEDIUM} @tab Scan rows to verify that deleted links are ok. This also calculates a key checksum for the rows and verifies this with a calcualted checksum for the keys.
@item @code{EXTENDED} @tab Do a full key lookup for all keys for each row. This ensures that the table is 100 % consistent, but will take a long time! @item @code{EXTENDED} @tab Do a full key lookup for all keys for each row. This ensures that the table is 100 % consistent, but will take a long time!
@end multitable @end multitable
For dynamic sized @code{MyISAM} tables a started check will always
do a @code{MEDIUM} check. For static size rows we skip the row scan
for @code{QUICK} and @code{FAST} as the rows are very seldom corrupted.
Note that for BDB tables the different check options doesn't affect the Note that for BDB tables the different check options doesn't affect the
check in any way! check in any way!
...@@ -40396,6 +40403,13 @@ though, so Version 3.23 is not released as a stable version yet. ...@@ -40396,6 +40403,13 @@ though, so Version 3.23 is not released as a stable version yet.
@appendixsubsec Changes in release 3.23.31 @appendixsubsec Changes in release 3.23.31
@itemize @bullet @itemize @bullet
@item @item
@code{SHOW TABLE STATUS} didn't show correct average row length for tables
bigger than 4G.
@item
@code{CHECK TABLE .. EXTENED} didn't check row links for fixed size tables.
@item
Added option @code{MEDIUM} to @code{CHECK TABLE}.
@item
Fixed problem when using @code{DECIMAL()} keys on negative numbers. Fixed problem when using @code{DECIMAL()} keys on negative numbers.
@item @item
@code{HOUR()} on a @code{CHAR} column always returned @code{NULL}. @code{HOUR()} on a @code{CHAR} column always returned @code{NULL}.
...@@ -65,8 +65,13 @@ int mi_close(register MI_INFO *info) ...@@ -65,8 +65,13 @@ int mi_close(register MI_INFO *info)
share->temporary ? FLUSH_IGNORE_CHANGED : share->temporary ? FLUSH_IGNORE_CHANGED :
FLUSH_RELEASE)) FLUSH_RELEASE))
error=my_errno; error=my_errno;
if (share->kfile >= 0 && my_close(share->kfile,MYF(0))) if (share->kfile >= 0)
{
if (share->mode != O_RDONLY && mi_is_crashed(info))
mi_state_info_write(share->kfile, &share->state, 1);
if (my_close(share->kfile,MYF(0)))
error = my_errno; error = my_errno;
}
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
if (share->file_map) if (share->file_map)
_mi_unmap_file(info); _mi_unmap_file(info);
......
...@@ -59,8 +59,8 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag) ...@@ -59,8 +59,8 @@ int mi_status(MI_INFO *info, register MI_ISAMINFO *x, uint flag)
x->keys = share->state.header.keys; x->keys = share->state.header.keys;
x->check_time = share->state.check_time; x->check_time = share->state.check_time;
x->mean_reclength = info->state->records ? x->mean_reclength = info->state->records ?
(ulong) (info->state->data_file_length-info->state->empty)/ (ulong) ((info->state->data_file_length-info->state->empty)/
info->state->records : (ulong) share->min_pack_length; info->state->records) : (ulong) share->min_pack_length;
} }
if (flag & HA_STATUS_ERRKEY) if (flag & HA_STATUS_ERRKEY)
{ {
......
...@@ -26,6 +26,8 @@ Table Op Msg_type Msg_text ...@@ -26,6 +26,8 @@ Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 check status OK test.t1 check status OK
Table Op Msg_type Msg_text
test.t1 check status OK
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment
t1 0 PRIMARY 1 a A 5 NULL NULL t1 0 PRIMARY 1 a A 5 NULL NULL
t1 1 b 1 b A 1 NULL NULL t1 1 b 1 b A 1 NULL NULL
......
...@@ -21,6 +21,7 @@ check table t1 type=fast; ...@@ -21,6 +21,7 @@ check table t1 type=fast;
check table t1 type=changed; check table t1 type=changed;
insert into t1 values (5,5,5); insert into t1 values (5,5,5);
check table t1 type=changed; check table t1 type=changed;
check table t1 type=medium;
check table t1 type=extended; check table t1 type=extended;
show keys from t1; show keys from t1;
!$1062 insert into t1 values (5,5,5); !$1062 insert into t1 values (5,5,5);
......
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:34:25 Testing server 'MySQL 3.23.31' at 2001-12-17 12:46:04
ATIS table test ATIS table test
...@@ -6,15 +6,15 @@ Creating tables ...@@ -6,15 +6,15 @@ Creating tables
Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data Inserting data
Time to insert (9768): 3 wallclock secs ( 0.63 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to insert (9768): 3 wallclock secs ( 0.60 usr 0.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Retrieving data Retrieving data
Time for select_simple_join (500): 2 wallclock secs ( 0.61 usr 0.39 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for select_simple_join (500): 2 wallclock secs ( 0.58 usr 0.37 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_join (100): 1 wallclock secs ( 0.48 usr 0.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for select_join (100): 1 wallclock secs ( 0.42 usr 0.32 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_key_prefix_join (100): 11 wallclock secs ( 3.75 usr 2.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for select_key_prefix_join (100): 11 wallclock secs ( 3.27 usr 2.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_distinct (800): 11 wallclock secs ( 1.72 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for select_distinct (800): 10 wallclock secs ( 1.49 usr 0.94 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_group (2800): 10 wallclock secs ( 1.55 usr 0.68 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for select_group (2800): 11 wallclock secs ( 1.45 usr 0.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Removing tables Removing tables
Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 38 wallclock secs ( 8.76 usr 5.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Total time: 38 wallclock secs ( 7.82 usr 5.51 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Benchmark DBD suite: 2.11
Date of test: 2001-01-03 18:34:24
Running tests on: Linux 2.2.13-SMP alpha
Arguments:
Comments: Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; cxx 6.3 + ccc 6.2.9
Limits from:
Server version: MySQL 3.23.30 gamma
ATIS: Total time: 38 wallclock secs ( 8.76 usr 5.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
alter-table: Total time: 392 wallclock secs ( 0.29 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
big-tables: Total time: 41 wallclock secs ( 8.53 usr 10.35 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
connect: Total time: 75 wallclock secs (31.88 usr 18.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
create: Total time: 134 wallclock secs (10.30 usr 4.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
insert: Total time: 1914 wallclock secs (453.84 usr 255.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
select: Total time: 1144 wallclock secs (59.15 usr 27.51 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
wisconsin: Total time: 18 wallclock secs ( 3.58 usr 2.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
All 8 test executed successfully
Totals per operation:
Operation seconds usr sys cpu tests
alter_table_add 213.00 0.18 0.06 0.00 992
alter_table_drop 170.00 0.05 0.04 0.00 496
connect 14.00 7.52 2.57 0.00 10000
connect+select_1_row 17.00 7.74 3.33 0.00 10000
connect+select_simple 16.00 7.76 3.27 0.00 10000
count 51.00 0.05 0.01 0.00 100
count_distinct 99.00 0.70 0.22 0.00 2000
count_distinct_big 131.00 7.32 8.60 0.00 120
count_distinct_group 63.00 1.11 0.59 0.00 1000
count_distinct_group_on_key 43.00 0.46 0.15 0.00 1000
count_distinct_group_on_key_parts 63.00 1.12 0.57 0.00 1000
count_group_on_key_parts 39.00 1.03 0.61 0.00 1000
count_on_key 405.00 16.37 4.36 0.00 50100
create+drop 12.00 2.63 0.97 0.00 10000
create_MANY_tables 92.00 1.81 0.60 0.00 10000
create_index 4.00 0.00 0.00 0.00 8
create_key+drop 17.00 4.27 1.28 0.00 10000
create_table 0.00 0.00 0.00 0.00 31
delete_all 12.00 0.00 0.00 0.00 12
delete_all_many_keys 49.00 0.01 0.01 0.00 1
delete_big 0.00 0.00 0.00 0.00 1
delete_big_many_keys 49.00 0.01 0.01 0.00 128
delete_key 5.00 0.75 0.63 0.00 10000
drop_index 4.00 0.00 0.00 0.00 8
drop_table 0.00 0.00 0.00 0.00 28
drop_table_when_MANY_tables 7.00 0.71 0.58 0.00 10000
insert 136.00 24.25 21.36 0.00 350768
insert_duplicates 37.00 5.54 6.23 0.00 100000
insert_key 94.00 8.92 5.51 0.00 100000
insert_many_fields 14.00 0.35 0.12 0.00 2000
insert_select_1_key 5.00 0.00 0.00 0.00 1
insert_select_2_keys 7.00 0.00 0.00 0.00 1
min_max 22.00 0.02 0.01 0.00 60
min_max_on_key 166.00 26.17 7.53 0.00 85000
multiple_value_insert 7.00 2.10 0.06 0.00 100000
order_by_big 52.00 20.66 21.59 0.00 10
order_by_big_key 38.00 22.00 15.43 0.00 10
order_by_big_key2 35.00 19.97 14.93 0.00 10
order_by_big_key_desc 37.00 21.90 15.47 0.00 10
order_by_big_key_diff 50.00 20.51 21.78 0.00 10
order_by_big_key_prefix 35.00 19.88 14.96 0.00 10
order_by_key2_diff 5.00 1.89 1.22 0.00 500
order_by_key_prefix 3.00 1.07 0.65 0.00 500
order_by_range 4.00 1.05 0.68 0.00 500
outer_join 61.00 0.00 0.00 0.00 10
outer_join_found 56.00 0.00 0.00 0.00 10
outer_join_not_found 38.00 0.00 0.00 0.00 500
outer_join_on_key 44.00 0.00 0.00 0.00 10
select_1_row 2.00 0.39 0.97 0.00 10000
select_2_rows 3.00 0.36 0.97 0.00 10000
select_big 55.00 27.62 21.08 0.00 10080
select_column+column 3.00 0.31 0.72 0.00 10000
select_diff_key 154.00 0.22 0.07 0.00 500
select_distinct 11.00 1.72 0.97 0.00 800
select_group 50.00 1.61 0.69 0.00 2911
select_group_when_MANY_tables 6.00 0.88 0.86 0.00 10000
select_join 1.00 0.48 0.34 0.00 100
select_key 137.00 73.11 21.92 0.00 200000
select_key2 141.00 71.45 23.77 0.00 200000
select_key_prefix 142.00 71.84 23.50 0.00 200000
select_key_prefix_join 11.00 3.75 2.76 0.00 100
select_many_fields 26.00 8.17 10.23 0.00 2000
select_range 227.00 8.60 5.58 0.00 410
select_range_key2 18.00 6.51 2.11 0.00 25010
select_range_prefix 20.00 6.30 2.34 0.00 25010
select_simple 1.00 0.29 0.79 0.00 10000
select_simple_join 2.00 0.61 0.39 0.00 500
update_big 28.00 0.00 0.00 0.00 10
update_of_key 26.00 3.42 2.98 0.00 50000
update_of_key_big 19.00 0.04 0.03 0.00 501
update_of_primary_key_many_keys 22.00 0.02 0.01 0.00 256
update_with_key 131.00 21.64 18.34 0.00 300000
update_with_key_prefix 40.00 7.20 6.06 0.00 100000
wisc_benchmark 4.00 1.77 0.99 0.00 114
TOTALS 3801.00 576.19 324.46 0.00 2046247
Benchmark DBD suite: 2.11a
Date of test: 2001-12-17 12:46:04
Running tests on: Linux 2.2.16-SMP alpha
Arguments:
Comments: Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; cxx 6.3 + ccc 6.2.9
Limits from:
Server version: MySQL 3.23.31
ATIS: Total time: 38 wallclock secs ( 7.82 usr 5.51 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
alter-table: Total time: 357 wallclock secs ( 0.28 usr 0.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
big-tables: Total time: 40 wallclock secs ( 7.30 usr 9.46 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
connect: Total time: 76 wallclock secs (33.82 usr 17.71 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
create: Total time: 226 wallclock secs ( 9.57 usr 4.75 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
insert: Total time: 1971 wallclock secs (441.85 usr 245.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
select: Total time: 1193 wallclock secs (57.33 usr 27.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
wisconsin: Total time: 18 wallclock secs ( 3.78 usr 3.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
All 8 test executed successfully
Totals per operation:
Operation seconds usr sys cpu tests
alter_table_add 195.00 0.17 0.09 0.00 992
alter_table_drop 155.00 0.06 0.04 0.00 496
connect 14.00 7.94 2.31 0.00 10000
connect+select_1_row 17.00 8.45 3.13 0.00 10000
connect+select_simple 16.00 8.44 3.19 0.00 10000
count 63.00 0.04 0.01 0.00 100
count_distinct 103.00 0.72 0.23 0.00 2000
count_distinct_big 140.00 6.24 7.47 0.00 120
count_distinct_group 64.00 1.01 0.62 0.00 1000
count_distinct_group_on_key 49.00 0.49 0.15 0.00 1000
count_distinct_group_on_key_parts 64.00 1.03 0.60 0.00 1000
count_group_on_key_parts 44.00 0.96 0.58 0.00 1000
count_on_key 433.00 16.28 4.78 0.00 50100
create+drop 12.00 2.23 1.21 0.00 10000
create_MANY_tables 185.00 1.92 0.72 0.00 10000
create_index 3.00 0.00 0.00 0.00 8
create_key+drop 17.00 3.97 1.39 0.00 10000
create_table 0.00 0.00 0.00 0.00 31
delete_all 13.00 0.00 0.00 0.00 12
delete_all_many_keys 51.00 0.02 0.01 0.00 1
delete_big 0.00 0.00 0.00 0.00 1
delete_big_many_keys 51.00 0.02 0.01 0.00 128
delete_key 3.00 0.63 0.60 0.00 10000
drop_index 4.00 0.00 0.00 0.00 8
drop_table 0.00 0.00 0.00 0.00 28
drop_table_when_MANY_tables 6.00 0.55 0.56 0.00 10000
insert 127.00 20.22 21.45 0.00 350768
insert_duplicates 39.00 5.59 7.08 0.00 100000
insert_key 94.00 8.32 6.44 0.00 100000
insert_many_fields 15.00 0.36 0.15 0.00 2000
insert_select_1_key 6.00 0.00 0.00 0.00 1
insert_select_2_keys 7.00 0.00 0.00 0.00 1
min_max 29.00 0.02 0.00 0.00 60
min_max_on_key 181.00 26.65 8.21 0.00 85000
multiple_value_insert 8.00 1.89 0.05 0.00 100000
order_by_big 51.00 18.89 20.86 0.00 10
order_by_big_key 34.00 19.98 13.84 0.00 10
order_by_big_key2 32.00 18.45 13.58 0.00 10
order_by_big_key_desc 34.00 19.99 13.84 0.00 10
order_by_big_key_diff 46.00 18.41 20.32 0.00 10
order_by_big_key_prefix 32.00 18.52 13.53 0.00 10
order_by_key2_diff 5.00 1.80 1.17 0.00 500
order_by_key_prefix 2.00 1.08 0.62 0.00 500
order_by_range 5.00 1.08 0.61 0.00 500
outer_join 62.00 0.00 0.00 0.00 10
outer_join_found 56.00 0.00 0.00 0.00 10
outer_join_not_found 38.00 0.00 0.00 0.00 500
outer_join_on_key 43.00 0.00 0.00 0.00 10
select_1_row 2.00 0.29 0.81 0.00 10000
select_2_rows 3.00 0.32 0.93 0.00 10000
select_big 52.00 26.60 19.56 0.00 10080
select_column+column 3.00 0.30 0.72 0.00 10000
select_diff_key 212.00 0.25 0.07 0.00 500
select_distinct 10.00 1.49 0.94 0.00 800
select_group 55.00 1.49 0.66 0.00 2911
select_group_when_MANY_tables 6.00 0.89 0.87 0.00 10000
select_join 1.00 0.42 0.32 0.00 100
select_key 137.00 75.43 22.46 0.00 200000
select_key2 142.00 74.95 22.32 0.00 200000
select_key_prefix 144.00 76.14 21.41 0.00 200000
select_key_prefix_join 11.00 3.27 2.59 0.00 100
select_many_fields 25.00 6.93 9.32 0.00 2000
select_range 217.00 7.91 5.38 0.00 410
select_range_key2 19.00 6.55 2.30 0.00 25010
select_range_prefix 19.00 6.53 2.25 0.00 25010
select_simple 2.00 0.30 0.78 0.00 10000
select_simple_join 2.00 0.58 0.37 0.00 500
update_big 27.00 0.00 0.00 0.00 10
update_of_key 23.00 2.66 3.25 0.00 50000
update_of_key_big 21.00 0.03 0.03 0.00 501
update_of_primary_key_many_keys 22.00 0.02 0.01 0.00 256
update_with_key 124.00 18.23 19.54 0.00 300000
update_with_key_prefix 38.00 5.99 6.10 0.00 100000
wisc_benchmark 4.00 1.62 0.85 0.00 114
TOTALS 3969.00 561.61 313.29 0.00 2046247
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:35:03 Testing server 'MySQL 3.23.31' at 2001-12-17 12:46:42
Testing of ALTER TABLE Testing of ALTER TABLE
Testing with 1000 columns and 1000 rows in 20 steps Testing with 1000 columns and 1000 rows in 20 steps
Insert data into the table Insert data into the table
Time for insert (1000) 1 wallclock secs ( 0.06 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for insert (1000) 0 wallclock secs ( 0.05 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_add (992): 213 wallclock secs ( 0.18 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for alter_table_add (992): 195 wallclock secs ( 0.17 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for create_index (8): 3 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for drop_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for drop_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for alter_table_drop (496): 170 wallclock secs ( 0.05 usr 0.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for alter_table_drop (496): 155 wallclock secs ( 0.06 usr 0.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 392 wallclock secs ( 0.29 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Total time: 357 wallclock secs ( 0.28 usr 0.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:41:35 Testing server 'MySQL 3.23.31' at 2001-12-17 12:52:39
Testing of some unusual tables Testing of some unusual tables
All tests are done 1000 times with 1000 fields All tests are done 1000 times with 1000 fields
Testing table with 1000 fields Testing table with 1000 fields
Testing select * from table with 1 record Testing select * from table with 1 record
Time to select_many_fields(1000): 10 wallclock secs ( 4.03 usr 5.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to select_many_fields(1000): 10 wallclock secs ( 3.38 usr 4.68 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select all_fields from table with 1 record Testing select all_fields from table with 1 record
Time to select_many_fields(1000): 16 wallclock secs ( 4.14 usr 5.10 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to select_many_fields(1000): 15 wallclock secs ( 3.55 usr 4.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert VALUES() Testing insert VALUES()
Time to insert_many_fields(1000): 5 wallclock secs ( 0.32 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to insert_many_fields(1000): 5 wallclock secs ( 0.33 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing insert (all_fields) VALUES() Testing insert (all_fields) VALUES()
Time to insert_many_fields(1000): 9 wallclock secs ( 0.03 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to insert_many_fields(1000): 10 wallclock secs ( 0.03 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 41 wallclock secs ( 8.53 usr 10.35 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Total time: 40 wallclock secs ( 7.30 usr 9.46 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:42:16 Testing server 'MySQL 3.23.31' at 2001-12-17 12:53:19
Testing the speed of connecting to the server and sending of data Testing the speed of connecting to the server and sending of data
All tests are done 10000 times All tests are done 10000 times
Testing connection/disconnect Testing connection/disconnect
Time to connect (10000): 14 wallclock secs ( 7.52 usr 2.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to connect (10000): 14 wallclock secs ( 7.94 usr 2.31 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test connect/simple select/disconnect Test connect/simple select/disconnect
Time for connect+select_simple (10000): 16 wallclock secs ( 7.76 usr 3.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for connect+select_simple (10000): 16 wallclock secs ( 8.44 usr 3.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test simple select Test simple select
Time for select_simple (10000): 1 wallclock secs ( 0.29 usr 0.79 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for select_simple (10000): 2 wallclock secs ( 0.30 usr 0.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing connect/select 1 row from table/disconnect Testing connect/select 1 row from table/disconnect
Time to connect+select_1_row (10000): 17 wallclock secs ( 7.74 usr 3.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to connect+select_1_row (10000): 17 wallclock secs ( 8.45 usr 3.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 1 row from table Testing select 1 row from table
Time to select_1_row (10000): 2 wallclock secs ( 0.39 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to select_1_row (10000): 2 wallclock secs ( 0.29 usr 0.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing select 2 rows from table Testing select 2 rows from table
Time to select_2_rows (10000): 3 wallclock secs ( 0.36 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to select_2_rows (10000): 3 wallclock secs ( 0.32 usr 0.93 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Test select with aritmetic (+) Test select with aritmetic (+)
Time for select_column+column (10000): 3 wallclock secs ( 0.31 usr 0.72 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for select_column+column (10000): 3 wallclock secs ( 0.30 usr 0.72 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing retrieval of big records (65000 bytes) Testing retrieval of big records (65000 bytes)
Time to select_big (10000): 19 wallclock secs ( 7.50 usr 5.90 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to select_big (10000): 19 wallclock secs ( 7.77 usr 5.83 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 75 wallclock secs (31.88 usr 18.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Total time: 76 wallclock secs (33.82 usr 17.71 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 18:43:31 Testing server 'MySQL 3.23.31' at 2001-12-17 12:54:35
Testing the speed of creating and droping tables Testing the speed of creating and droping tables
Testing with 10000 tables and 10000 loop count Testing with 10000 tables and 10000 loop count
Testing create of tables Testing create of tables
Time for create_MANY_tables (10000): 92 wallclock secs ( 1.81 usr 0.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for create_MANY_tables (10000): 185 wallclock secs ( 1.92 usr 0.72 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Accessing tables Accessing tables
Time to select_group_when_MANY_tables (10000): 6 wallclock secs ( 0.88 usr 0.86 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to select_group_when_MANY_tables (10000): 6 wallclock secs ( 0.89 usr 0.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing drop Testing drop
Time for drop_table_when_MANY_tables (10000): 7 wallclock secs ( 0.71 usr 0.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for drop_table_when_MANY_tables (10000): 6 wallclock secs ( 0.55 usr 0.56 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing create+drop Testing create+drop
Time for create+drop (10000): 12 wallclock secs ( 2.63 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for create+drop (10000): 12 wallclock secs ( 2.23 usr 1.21 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for create_key+drop (10000): 17 wallclock secs ( 4.27 usr 1.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for create_key+drop (10000): 17 wallclock secs ( 3.97 usr 1.39 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 134 wallclock secs (10.30 usr 4.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Total time: 226 wallclock secs ( 9.57 usr 4.75 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 19:17:40
Testing the speed of selecting on keys that consist of many parts
The test-table has 10000 rows and the test is done with 500 ranges.
Creating table
Inserting 10000 rows
Time to insert (10000): 4 wallclock secs ( 0.75 usr 0.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing big selects on the table
Time for select_big (70:17207): 1 wallclock secs ( 0.14 usr 0.10 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 227 wallclock secs ( 8.60 usr 5.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 157 wallclock secs (21.60 usr 6.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 369 wallclock secs (16.33 usr 4.35 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:100000): 39 wallclock secs ( 1.03 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
Time for count_distinct (2000:2000): 99 wallclock secs ( 0.70 usr 0.22 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 43 wallclock secs ( 0.46 usr 0.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 63 wallclock secs ( 1.12 usr 0.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 63 wallclock secs ( 1.11 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 79 wallclock secs ( 7.31 usr 8.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1144 wallclock secs (59.15 usr 27.51 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.31' at 2001-12-17 13:31:13
Testing the speed of selecting on keys that consist of many parts
The test-table has 10000 rows and the test is done with 500 ranges.
Creating table
Inserting 10000 rows
Time to insert (10000): 4 wallclock secs ( 0.76 usr 0.67 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing big selects on the table
Time for select_big (70:17207): 1 wallclock secs ( 0.12 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for select_range (410:1057904): 217 wallclock secs ( 7.91 usr 5.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for min_max_on_key (70000): 172 wallclock secs (21.85 usr 6.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_on_key (50000): 393 wallclock secs (16.24 usr 4.77 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_group_on_key_parts (1000:100000): 44 wallclock secs ( 0.96 usr 0.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing count(distinct) on the table
Time for count_distinct (2000:2000): 103 wallclock secs ( 0.72 usr 0.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key (1000:6000): 49 wallclock secs ( 0.49 usr 0.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group_on_key_parts (1000:100000): 64 wallclock secs ( 1.03 usr 0.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_group (1000:100000): 64 wallclock secs ( 1.01 usr 0.62 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time for count_distinct_big (100:1000000): 82 wallclock secs ( 6.23 usr 7.46 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 1193 wallclock secs (57.33 usr 27.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Testing server 'MySQL 3.23.30 gamma' at 2001-01-03 19:36:45 Testing server 'MySQL 3.23.31' at 2001-12-17 13:51:06
Wisconsin benchmark test Wisconsin benchmark test
Time for create_table (3): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for create_table (3): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Inserting data Inserting data
Time to insert (31000): 14 wallclock secs ( 1.82 usr 1.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to insert (31000): 14 wallclock secs ( 2.16 usr 2.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Time to delete_big (1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time to delete_big (1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Running actual benchmark Running actual benchmark
Time for wisc_benchmark (114): 4 wallclock secs ( 1.77 usr 0.99 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for wisc_benchmark (114): 4 wallclock secs ( 1.62 usr 0.85 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
Total time: 18 wallclock secs ( 3.58 usr 2.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Total time: 18 wallclock secs ( 3.78 usr 3.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU)
...@@ -246,7 +246,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) ...@@ -246,7 +246,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
param.thd = thd; param.thd = thd;
param.op_name = (char*)"check"; param.op_name = (char*)"check";
param.table_name = table->table_name; param.table_name = table->table_name;
param.testflag = check_opt->flags | T_CHECK | T_SILENT | T_MEDIUM; param.testflag = check_opt->flags | T_CHECK | T_SILENT;
if (!(table->db_stat & HA_READ_ONLY)) if (!(table->db_stat & HA_READ_ONLY))
param.testflag|= T_STATISTICS; param.testflag|= T_STATISTICS;
...@@ -270,15 +270,19 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) ...@@ -270,15 +270,19 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt)
if (!error) if (!error)
{ {
if ((!check_opt->quick && if ((!check_opt->quick &&
(share->options & ((share->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD))) || (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ||
(param.testflag & (T_EXTEND | T_MEDIUM)))) ||
mi_is_crashed(file)) mi_is_crashed(file))
{ {
uint old_testflag=param.testflag;
param.testflag|=T_MEDIUM;
init_io_cache(&param.read_cache, file->dfile, init_io_cache(&param.read_cache, file->dfile,
my_default_record_cache_size, READ_CACHE, my_default_record_cache_size, READ_CACHE,
share->pack.header_length, 1, MYF(MY_WME)); share->pack.header_length, 1, MYF(MY_WME));
error |= chk_data_link(&param, file, param.testflag & T_EXTEND); error |= chk_data_link(&param, file, param.testflag & T_EXTEND);
end_io_cache(&(param.read_cache)); end_io_cache(&(param.read_cache));
param.testflag=old_testflag;
} }
} }
if (!error) if (!error)
...@@ -548,7 +552,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize) ...@@ -548,7 +552,7 @@ int ha_myisam::repair(THD *thd, MI_CHECK &param, bool optimize)
thd->proc_info="saving state"; thd->proc_info="saving state";
if (!error) if (!error)
{ {
if (share->state.changed & STATE_CHANGED) if ((share->state.changed & STATE_CHANGED) || mi_is_crashed(file))
{ {
share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED | share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED |
STATE_CRASHED_ON_REPAIR); STATE_CRASHED_ON_REPAIR);
......
...@@ -207,6 +207,7 @@ static SYMBOL symbols[] = { ...@@ -207,6 +207,7 @@ static SYMBOL symbols[] = {
{ "MEDIUMTEXT", SYM(MEDIUMTEXT),0,0}, { "MEDIUMTEXT", SYM(MEDIUMTEXT),0,0},
{ "MEDIUMINT", SYM(MEDIUMINT),0,0}, { "MEDIUMINT", SYM(MEDIUMINT),0,0},
{ "MERGE", SYM(MERGE_SYM),0,0}, { "MERGE", SYM(MERGE_SYM),0,0},
{ "MEDIUM", SYM(MEDIUM_SYM),0,0},
{ "MIDDLEINT", SYM(MEDIUMINT),0,0}, /* For powerbuilder */ { "MIDDLEINT", SYM(MEDIUMINT),0,0}, /* For powerbuilder */
{ "MIN_ROWS", SYM(MIN_ROWS),0,0}, { "MIN_ROWS", SYM(MIN_ROWS),0,0},
{ "MINUTE", SYM(MINUTE_SYM),0,0}, { "MINUTE", SYM(MINUTE_SYM),0,0},
......
...@@ -205,6 +205,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); ...@@ -205,6 +205,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%token MASTER_CONNECT_RETRY_SYM %token MASTER_CONNECT_RETRY_SYM
%token MATCH %token MATCH
%token MAX_ROWS %token MAX_ROWS
%token MEDIUM_SYM
%token MERGE_SYM %token MERGE_SYM
%token MIN_ROWS %token MIN_ROWS
%token MYISAM_SYM %token MYISAM_SYM
...@@ -1156,6 +1157,7 @@ mi_check_types: ...@@ -1156,6 +1157,7 @@ mi_check_types:
mi_check_type: mi_check_type:
QUICK { Lex->check_opt.quick = 1; } QUICK { Lex->check_opt.quick = 1; }
| FAST_SYM { Lex->check_opt.flags|= T_FAST; } | FAST_SYM { Lex->check_opt.flags|= T_FAST; }
| MEDIUM_SYM { Lex->check_opt.flags|= T_MEDIUM; }
| EXTENDED_SYM { Lex->check_opt.flags|= T_EXTEND; } | EXTENDED_SYM { Lex->check_opt.flags|= T_EXTEND; }
| CHANGED { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; } | CHANGED { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
...@@ -2510,6 +2512,7 @@ keyword: ...@@ -2510,6 +2512,7 @@ keyword:
| MASTER_USER_SYM {} | MASTER_USER_SYM {}
| MASTER_PASSWORD_SYM {} | MASTER_PASSWORD_SYM {}
| MASTER_CONNECT_RETRY_SYM {} | MASTER_CONNECT_RETRY_SYM {}
| MEDIUM_SYM {}
| MERGE_SYM {} | MERGE_SYM {}
| MINUTE_SYM {} | MINUTE_SYM {}
| MIN_ROWS {} | MIN_ROWS {}
......
File : READ-ME
Author : Richard A. O'Keefe.
Updated: 30 April 1984
Purpose: Explain the new strings package.
The UNIX string libraries (described in the string(3) manual page)
differ from UNIX to UNIX (e.g. strtok is not in V7 or 4.1bsd). Worse,
the sources are not in the public domain, so that if there is a string
routine which is nearly what you want but not quite you can't take a
copy and modify it. And of course C programmers on non-UNIX systems
are at the mercy of their supplier.
This package was designed to let me do reasonable things with C's
strings whatever UNIX (V7, PaNiX, UX63, 4.1bsd) I happen to be using.
Everything in the System III manual is here and does just what the S3
manual says it does. There are also lots of new goodies. I'm sorry
about the names, but the routines do have to work on asphyxiated-at-
birth systems which truncate identifiers. The convention is that a
routine is called
str [n] [c] <operation>
If there is an "n", it means that the function takes an (int) "length"
argument, which bounds the number of characters to be moved or looked
at. If the function has a "set" argument, a "c" in the name indicates
that the complement of the set is used. Functions or variables whose
names start with _ are support routines which aren't really meant for
general use. I don't know what the "p" is doing in "strpbrk", but it
is there in the S3 manual so it's here too. "istrtok" does not follow
this rule, but with 7 letters what can you do?
I have included new versions of atoi(3) and atol(3) as well. They
use a new primitive str2int, which takes a pair of bounds and a radix,
and does much more thorough checking than the normal atoi and atol do.
The result returned by atoi & atol is valid if and only if errno == 0.
There is also an output conversion routine int2str, with itoa and ltoa
as interface macros. Only after writing int2str did I notice that the
str2int routine has no provision for unsigned numbers. On reflection,
I don't greatly care. I'm afraid that int2str may depend on your "C"
compiler in unexpected ways. Do check the code with -S.
Several of these routines have "asm" inclusions conditional on the
VaxAsm option. These insertions can make the routines which have them
quite a bit faster, but there is a snag. The VAX architects, for some
reason best known to themselves and their therapists, decided that all
"strings" were shorter than 2^16 bytes. Even when the length operands
are in 32-bit registers, only 16 bits count. So the "asm" versions do
not work for long strings. If you can guarantee that all your strings
will be short, define VaxAsm in the makefile, but in general, and when
using other machines, do not define it.
To use this library, you need the "strings.a" library file and the
"strings.h" and "ctypes.h" header files. The other header files are
for compiling the library itself, though if you are hacking extensions
you may find them useful. General users really shouldn't see them.
I've defined a few macros I find useful in "strings.h"; if you have no
need for "index", "rindex", "streql", and "beql", just edit them out.
On the 4.1bsd system I am using declaring all these functions 'extern'
does not mean that they will all be loaded; but only the ones you use.
When using lesser systems you may find it necessary to break strings.h
up, or you could get by with just adding "extern" declarations for the
functions you want as you need them. Many of these functions have the
same names as functions in the "standard C library", by design as this
is a replacement/reimplementation of part of that library. So you may
have to talk the loader into loading this library first. Again, I've
found no problems on 4.1bsd.
You may wonder at my failure to provide manual pages for this code.
For the things in V7, 4.?, or SIII, you should be able to use whichever
manual page came with that system, and anything I might write would be
so like it as to raise suspicions of violating AT&T copyrights. In the
sources you will find comments which provide far more documentation for
these routines than AT&T ever provided for their strings stuff, I just
don't happen to have put it in nroff -man form. Had I done so, the .3
files would have outbulked the .c files!
These files are in the public domain. This includes getopt.c, which
is the work of Henry Spencer, University of Toronto Zoology, who says of
it "None of this software is derived from Bell software. I had no access
to the source for Bell's versions at the time I wrote it. This software
is hereby explicitly placed in the public domain. It may be used for
any purpose on any machine by anyone." I would greatly prefer it if *my*
material received no military use.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment