From ceec5316baa8a9fed4eabb35d7b2f05387576239 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 13 Oct 2002 21:11:01 +0400 Subject: [PATCH 001/246] Fix exponent overflow handling for decimal type. Overflow lead to crash mysql-test/r/type_decimal.result: Result set for new tests mysql-test/t/type_decimal.test: Tests for exponent overflow sql/field.cc: Fixes for exponent overflow handling --- mysql-test/r/type_decimal.result | 11 +++++++ mysql-test/t/type_decimal.test | 10 ++++++ sql/field.cc | 55 +++++++++++++++++++++++--------- 3 files changed, 61 insertions(+), 15 deletions(-) diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index 6550e981f5e..0e60eefc9c7 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -346,3 +346,14 @@ a 1234567890 9999999999 drop table t1; +create table t1(a decimal(10,0)); +insert into t1 values ("1e4294967295"); +select * from t1; +a +99999999999 +delete from t1; +insert into t1 values("1e4294967297"); +select * from t1; +a +99999999999 +drop table t1; diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test index 95420539611..7f73ec34e3a 100644 --- a/mysql-test/t/type_decimal.test +++ b/mysql-test/t/type_decimal.test @@ -220,3 +220,13 @@ create table t1 (a decimal unsigned zerofill); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); select * from t1; drop table t1; + +# Exponent overflow bug +create table t1(a decimal(10,0)); +insert into t1 values ("1e4294967295"); +select * from t1; +delete from t1; +insert into t1 values("1e4294967297"); +select * from t1; +drop table t1; + diff --git a/sql/field.cc b/sql/field.cc index 42ddcc3b9d2..9cb13e96cc1 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -367,6 +367,7 @@ void Field_decimal::store(const char *from,uint len) /* The pointer where the field value starts (i.e., "where to write") */ char *to=ptr; uint tmp_dec, tmp_uint; + ulonglong tmp_ulonglong; /* The sign of the number : will be 0 (means positive but sign not specified), '+' or '-' @@ -380,7 +381,8 @@ void Field_decimal::store(const char *from,uint len) const char *frac_digits_from, *frac_digits_end; /* The sign of the exponent : will be 0 (means no exponent), '+' or '-' */ char expo_sign_char=0; - uint exponent=0; // value of the exponent + uint exponent=0; // value of the exponent + ulonglong exponent_ulonglong=0; /* Pointers used when digits move from the left of the '.' to the right of the '.' (explained below) @@ -474,13 +476,23 @@ void Field_decimal::store(const char *from,uint len) else expo_sign_char= '+'; /* - Read digits of the exponent and compute its value - 'exponent' overflow (e.g. if 1E10000000000000000) is not a problem - (the value of the field will be overflow anyway, or 0 anyway, - it does not change anything if the exponent is 2^32 or more + Read digits of the exponent and compute its value. + We must care about 'exponent' overflow, because as + unsigned arithmetic is "modulo", big exponents + will become small (e.g. + 1e4294967296 will become 1e0, and the field + will finally contain 1 instead of its max possible value). */ - for (;from!=end && isdigit(*from); from++) - exponent=10*exponent+(*from-'0'); + for (;from!=end && isdigit(*from); from++) + { + exponent_ulonglong=10*exponent_ulonglong+(ulonglong)(*from-'0'); + if (exponent_ulonglong>(ulonglong)UINT_MAX) + { + exponent_ulonglong=(ulonglong)UINT_MAX; + break; + } + } + exponent=(uint)(exponent_ulonglong); } /* @@ -521,15 +533,22 @@ void Field_decimal::store(const char *from,uint len) int_digits_added_zeros=2 (to make 1234500). */ + /* + Below tmp_ulongulong cannot overflow, + as int_digits_added_zeros<=exponent<4G and + (ulonglong)(int_digits_end-int_digits_from)<=max_allowed_packet<=2G and + (ulonglong)(frac_digits_from-int_digits_tail_from)<=max_allowed_packet<=2G + */ + if (!expo_sign_char) - tmp_uint=tmp_dec+(uint)(int_digits_end-int_digits_from); + tmp_ulonglong=(ulonglong)tmp_dec+(ulonglong)(int_digits_end-int_digits_from); else if (expo_sign_char == '-') { tmp_uint=min(exponent,(uint)(int_digits_end-int_digits_from)); frac_digits_added_zeros=exponent-tmp_uint; int_digits_end -= tmp_uint; frac_digits_head_end=int_digits_end+tmp_uint; - tmp_uint=tmp_dec+(uint)(int_digits_end-int_digits_from); + tmp_ulonglong=(ulonglong)tmp_dec+(ulonglong)(int_digits_end-int_digits_from); } else // (expo_sign_char=='+') { @@ -556,9 +575,9 @@ void Field_decimal::store(const char *from,uint len) int_digits_added_zeros=0; } } - tmp_uint=(tmp_dec+(uint)(int_digits_end-int_digits_from) - +(uint)(frac_digits_from-int_digits_tail_from)+ - int_digits_added_zeros); + tmp_ulonglong=(ulonglong)tmp_dec+(ulonglong)(int_digits_end-int_digits_from) + +(ulonglong)(frac_digits_from-int_digits_tail_from)+ + (ulonglong)int_digits_added_zeros; } /* @@ -569,13 +588,19 @@ void Field_decimal::store(const char *from,uint len) If the sign is defined and '-', we need one position for it */ - if (field_length < tmp_uint + (int) (sign_char == '-')) + if ((ulonglong)field_length < tmp_ulonglong + (ulonglong) (sign_char == '-')) + //the rightmost sum above cannot overflow { // too big number, change to max or min number Field_decimal::overflow(sign_char == '-'); return; } + /* + If the above test was ok, then tmp_ulonglong<4G and the following cast is valid + */ + tmp_uint=(uint)tmp_ulonglong; + /* Tmp_left_pos is the position where the leftmost digit of the int_% parts will be written @@ -632,7 +657,7 @@ void Field_decimal::store(const char *from,uint len) *pos--=' '; //fill with blanks } - if (tmp_dec) // This field has decimals + // if (tmp_dec) { /* Write digits of the frac_% parts ; @@ -644,8 +669,8 @@ void Field_decimal::store(const char *from,uint len) */ pos=to+(uint)(field_length-tmp_dec); // Calculate post to '.' - *pos++='.'; right_wall=to+field_length; + if (pos != right_wall) *pos++='.'; if (expo_sign_char == '-') { From 2e169a979dc1b7492e3aeede5d2bcbcd52ea221c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Oct 2002 23:01:49 +0300 Subject: [PATCH 002/246] BK automatic LOD removal. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted BitKeeper/etc/skipkeys: auto add --- BitKeeper/etc/gone | 184 +++++++++++++++++++-------------------- BitKeeper/etc/logging_ok | 11 +-- BitKeeper/etc/skipkeys | 6 ++ 3 files changed, 104 insertions(+), 97 deletions(-) create mode 100644 BitKeeper/etc/skipkeys diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index b952e8e0780..6d4da9062d2 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -4,11 +4,44 @@ BK|config.h.in|19700101030959|00050|aecae693cca472c BK|include/my_global.h|19700101030959|00105|f657f708961a4632 BK|libmysql/acconfig.h|19700101030959|02604|7b620dbd69ea6074 BK|mit-pthreads/config.flags|19700101030959|00594|dcec5296ef811cd6 +BK|mit-pthreads/machdep/i386-sco-3.2v5/__math.h|19700101030959|01011|79d9a37715f2c7fe +BK|mit-pthreads/machdep/i386-sco-3.2v5/__signal.h|19700101030959|01012|45332b2a56f62580 +BK|mit-pthreads/machdep/i386-sco-3.2v5/__stdio.h|19700101030959|01013|a81562134446c64c +BK|mit-pthreads/machdep/i386-sco-3.2v5/__stdlib.h|19700101030959|01014|bcbed6d62d1885ae +BK|mit-pthreads/machdep/i386-sco-3.2v5/__string.h|19700101030959|01015|94a2e4f9574bf1e8 +BK|mit-pthreads/machdep/i386-sco-3.2v5/__time.h|19700101030959|01016|2cde57d8feea7fc8 +BK|mit-pthreads/machdep/i386-sco-3.2v5/__unistd.h|19700101030959|01017|5cc4575b5a74066f +BK|mit-pthreads/machdep/i386-sco-3.2v5/compat.h|19700101030959|01018|1f7e450a2e18603e +BK|mit-pthreads/machdep/i386-sco-3.2v5/dirent.h|19700101030959|01019|13608bf11af98f70 +BK|mit-pthreads/machdep/i386-sco-3.2v5/posix/__signal.h|19700101030959|01024|9bb7b240bec88b2d +BK|mit-pthreads/machdep/i386-sco-3.2v5/socket.h|19700101030959|01020|9f78f7e5a7b4a83f +BK|mit-pthreads/machdep/i386-sco-3.2v5/syscall.h|19700101030959|01021|d9543a0474656339 +BK|mit-pthreads/machdep/i386-sco-3.2v5/timers.h|19700101030959|01022|d5e694e48990538c +BK|mit-pthreads/machdep/i386-sco-3.2v5/trash.can|19700101030959|01023|9332039abd82a925 +BK|mit-pthreads/machdep/sco-3.2v5/__math.h|19700101030959|00971|f3855eb411435a06 +BK|mit-pthreads/machdep/sco-3.2v5/__signal.h|19700101030959|00972|3d6f84e96bc1462 +BK|mit-pthreads/machdep/sco-3.2v5/__stdio.h|19700101030959|00973|b991fad3327275e0 +BK|mit-pthreads/machdep/sco-3.2v5/__stdlib.h|19700101030959|00974|6179a0922d90025e +BK|mit-pthreads/machdep/sco-3.2v5/__string.h|19700101030959|00975|d2cc42eeb5e1666 +BK|mit-pthreads/machdep/sco-3.2v5/__time.h|19700101030959|00976|a9594bab280ced64 +BK|mit-pthreads/machdep/sco-3.2v5/__unistd.h|19700101030959|00977|99e6f1116d1f920 +BK|mit-pthreads/machdep/sco-3.2v5/compat.h|19700101030959|00978|3f150ff6223d49be +BK|mit-pthreads/machdep/sco-3.2v5/dirent.h|19700101030959|00979|388af3465ad4680f +BK|mit-pthreads/machdep/sco-3.2v5/posix/__signal.h|19700101030959|00984|5e14827a3b91a6db +BK|mit-pthreads/machdep/sco-3.2v5/socket.h|19700101030959|00980|1b409f3f1fcbbf7a +BK|mit-pthreads/machdep/sco-3.2v5/syscall.h|19700101030959|00981|c69bd58eba4d5076 +BK|mit-pthreads/machdep/sco-3.2v5/timers.h|19700101030959|00982|4907a958151368ed +BK|mit-pthreads/machdep/sco-3.2v5/trash.can|19700101030959|00983|7eecac9fc944ade2 BK|myisam/common_words|19700101030959|01665|13c10ef32aaa7537 BK|myisam/mi_test_all|19700101030959|01666|ae7a366c45527b4e BK|mysys/mf_reccache.c|19700101030959|01419|f8191c8485e158fe +BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02361|6a0a837742a861bb +BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686|19700101030959|02348|e87091e2a6dce931 +BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02326|70981cb1dd58d3fb +BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02327|67957b2b80839c59 BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.2.12_20smp_i686|19700101030959|02437|28211fb9f0e6ab0e BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02438|136bdd9fd1a2cd14 +BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02362|20e8179c6f87930d BK|sql-bench/Results-linux/ATIS-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02443|defb62af5958fcac BK|sql-bench/Results-linux/Attic/ATIS-mysql-Linux_2.0.33_i586|19700101030959|02381|ef64fcf54c271212 BK|sql-bench/Results-linux/Attic/ATIS-mysql-Linux_dynamic|19700101030959|02382|ffa77bdc262ac10f @@ -66,29 +99,67 @@ BK|sql-bench/Results-linux/Attic/wisconsin-mysql-Linux_static|19700101030959|024 BK|sql-bench/Results-linux/Attic/wisconsin-mysql_fast-Linux_2.0.33_i586|19700101030959|02434|7d98b33fa6d91a87 BK|sql-bench/Results-linux/Attic/wisconsin-mysql_local_tcp-Linux_2.0.33_i586|19700101030959|02435|28a4840ebd5dd015 BK|sql-bench/Results-linux/Attic/wisconsin-mysql_new-Linux_2.0.33_i586|19700101030959|02436|e1f17edfbee1f22e +BK|sql-bench/Results-linux/RUN-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02365|5e446b99518aa0b1 +BK|sql-bench/Results-linux/RUN-interbase-Linux_2.2.14_5.0_i686|19700101030959|02351|9a0d8be7d641fae7 +BK|sql-bench/Results-linux/RUN-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02334|5f0504783180d906 +BK|sql-bench/Results-linux/RUN-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02335|6abba8bd8d9f8b7b BK|sql-bench/Results-linux/RUN-mysql-Linux_2.2.12_20smp_i686|19700101030959|02328|da28ced3e0aac09c BK|sql-bench/Results-linux/RUN-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02329|f6fa9f46d4a6152 +BK|sql-bench/Results-linux/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02366|730674f4ac333638 BK|sql-bench/Results-linux/RUN-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02444|16694c5927b7600c +BK|sql-bench/Results-linux/alter-table-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02367|e901749edf05bb58 +BK|sql-bench/Results-linux/alter-table-interbase-Linux_2.2.14_5.0_i686|19700101030959|02352|c4e27f25a15b6681 BK|sql-bench/Results-linux/alter-table-mysql-Linux_2.2.12_20smp_i686|19700101030959|02330|67ae4e91b5f4eabd BK|sql-bench/Results-linux/alter-table-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02331|c85eb85ba45dd748 +BK|sql-bench/Results-linux/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02368|19c95f9fc4ee458 BK|sql-bench/Results-linux/alter-table-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02445|b062db76cf6df5d2 +BK|sql-bench/Results-linux/big-tables-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02371|c0c1c5efea0661ad +BK|sql-bench/Results-linux/big-tables-interbase-Linux_2.2.14_5.0_i686|19700101030959|02353|beba3adfcfd472c0 +BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02341|cabe523a8f103945 +BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02342|c682fb7ee1fb3d8 BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.2.12_20smp_i686|19700101030959|02332|a2dcb74a3c73ac18 BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02333|b5f4f4c35225f0f +BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02372|69d33d25eda85041 BK|sql-bench/Results-linux/big-tables-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02446|a9eedd951eab7e8b +BK|sql-bench/Results-linux/connect-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02373|744f1e38649d21d +BK|sql-bench/Results-linux/connect-interbase-Linux_2.2.14_5.0_i686|19700101030959|02354|c28534284b9f5657 +BK|sql-bench/Results-linux/connect-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02349|ebdc62367f5fcd43 +BK|sql-bench/Results-linux/connect-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02350|7ed494b7cc7081c9 BK|sql-bench/Results-linux/connect-mysql-Linux_2.2.12_20smp_i686|19700101030959|02336|beedcd769a903c19 BK|sql-bench/Results-linux/connect-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02337|74ec2bf5f55b81f +BK|sql-bench/Results-linux/connect-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02374|55d777517ce8091 BK|sql-bench/Results-linux/connect-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02447|f6d7665c418d62c6 +BK|sql-bench/Results-linux/create-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02377|d60ca06157cfc9b9 +BK|sql-bench/Results-linux/create-interbase-Linux_2.2.14_5.0_i686|19700101030959|02355|537da98f6c1bc6df +BK|sql-bench/Results-linux/create-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02356|612a182b889dd778 +BK|sql-bench/Results-linux/create-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02357|b501391eec112dd0 BK|sql-bench/Results-linux/create-mysql-Linux_2.2.12_20smp_i686|19700101030959|02338|fe23ee50aea195f4 BK|sql-bench/Results-linux/create-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02339|771b40d3280fe8ad +BK|sql-bench/Results-linux/create-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02378|35bd48cfe30c16a3 BK|sql-bench/Results-linux/create-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02448|c46d6c283c0e34ae +BK|sql-bench/Results-linux/insert-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02379|25161ee7c13036c1 +BK|sql-bench/Results-linux/insert-interbase-Linux_2.2.14_5.0_i686|19700101030959|02358|461a48df25628c0f +BK|sql-bench/Results-linux/insert-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02363|3260743076dbe95f +BK|sql-bench/Results-linux/insert-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02364|9de5538694cd87ea BK|sql-bench/Results-linux/insert-mysql-Linux_2.2.12_20smp_i686|19700101030959|02340|f120b0ead3836c81 BK|sql-bench/Results-linux/insert-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02343|17f262f12d2244bc +BK|sql-bench/Results-linux/insert-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02380|7451b789c29b7dcd BK|sql-bench/Results-linux/insert-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02449|3245ba5633a18e8 +BK|sql-bench/Results-linux/select-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02439|816ec12a9152b578 +BK|sql-bench/Results-linux/select-interbase-Linux_2.2.14_5.0_i686|19700101030959|02359|3535cd00c2a9cb5d +BK|sql-bench/Results-linux/select-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02369|de288cd8c11e1749 +BK|sql-bench/Results-linux/select-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02370|a82e759dbd5d66b BK|sql-bench/Results-linux/select-mysql-Linux_2.2.12_20smp_i686|19700101030959|02344|3b64aff0dfddfff4 BK|sql-bench/Results-linux/select-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02345|9fd9c6e036f988d7 +BK|sql-bench/Results-linux/select-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02440|862a7c0ef1b17f29 BK|sql-bench/Results-linux/select-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02450|744633c6e13a897f +BK|sql-bench/Results-linux/wisconsin-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02441|cb767c1f9abc2ebd +BK|sql-bench/Results-linux/wisconsin-interbase-Linux_2.2.14_5.0_i686|19700101030959|02360|9404247a2e483b34 +BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02375|8669562660b2c238 +BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02376|c7cbe3b167655f9c BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.12_20smp_i686|19700101030959|02346|d49db545341a732f BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02347|ad7babd436f26841 +BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02442|74b238eca114dbbe BK|sql-bench/Results-linux/wisconsin-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02451|6ad065fe4c6b4fa9 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133 @@ -236,7 +307,28 @@ BK|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|197001 BK|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02270|ef201ca14f635c57 BK|sql/share/romanian/errmsg.sys|19700101030959|01869|9d8282efb437e8cc BK|sql/share/romanian/errmsg.txt|19700101030959|01870|2c64fb13a8f104ad +jcole@tetra.bedford.progress.com|BitKeeper/etc/logging_ok|20001004201211|30554 monty@donna.mysql.com|myisam/mi_debug.c|20000829092809|23459|873a6e7d6ff8297c +monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|34755|45d7837423db243f +monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|37262|2274651e29d38b07 +monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|39831|a6ef8229d40b75d1 +monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|42374|65ccbcd7b1c4d7b5 +monty@donna.mysql.com|sql-bench/Results-linux/alter-table-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|44909|de84e4a2fd07f53 +monty@donna.mysql.com|sql-bench/Results-linux/alter-table-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|47422|ee162dd1474ba9d8 +monty@donna.mysql.com|sql-bench/Results-linux/big-tables-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|49948|d11a751a268a4df3 +monty@donna.mysql.com|sql-bench/Results-linux/big-tables-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|52469|c13eca5ec25cd6e1 +monty@donna.mysql.com|sql-bench/Results-linux/connect-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|54998|dfaa50e67eb15556 +monty@donna.mysql.com|sql-bench/Results-linux/connect-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|57532|4015a2bef627d8cd +monty@donna.mysql.com|sql-bench/Results-linux/create-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|60103|fa19b9a2c7a3c3c +monty@donna.mysql.com|sql-bench/Results-linux/create-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|62710|21ec8ba1ea3ca4c4 +monty@donna.mysql.com|sql-bench/Results-linux/insert-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|65289|a02aceb3b30de493 +monty@donna.mysql.com|sql-bench/Results-linux/insert-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|02393|7c9baa774fc324e1 +monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|05001|da73eefa16ca9383 +monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|07610|cffd7d282a90113a +monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|10615|8dcd7271a9137341 +monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|13213|4398328883aa75da +mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876 +mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b93948768 mwagner@evoq.home.mwagner.org|mysql-test/mybin/start-mysqld|20001016055648|54840|9c8f21a7ab97793a mwagner@evoq.home.mwagner.org|mysql-test/mybin/stop-mysqld|20001016055653|20710|89a1194045f05d1c mwagner@evoq.home.mwagner.org|mysql-test/mybin/translate-tests|20001018130217|00206|3869c1fdf0a5ea1a @@ -315,95 +407,3 @@ sasha@mysql.sashanet.com|mysql-test/t/include/master-slave.inc|20001118030458|01 sasha@work.mysql.com|BitKeeper/etc/logging_ok|20001214015456|29919|32b6551b8288c2fa serg@serg.mysql.com|mysql-test/r/3.23/mrg000001.dummy.result|20001206231604|05053|bf7e6d609f22b897 serg@serg.mysql.com|mysql-test/r/3.23/mrg000001.result|20001206231609|46662|db2ef2e717ab8332 -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876 -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b93948768 -BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02361|6a0a837742a861bb -BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686|19700101030959|02348|e87091e2a6dce931 -BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02326|70981cb1dd58d3fb -BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02327|67957b2b80839c59 -BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02362|20e8179c6f87930d -BK|sql-bench/Results-linux/RUN-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02365|5e446b99518aa0b1 -BK|sql-bench/Results-linux/RUN-interbase-Linux_2.2.14_5.0_i686|19700101030959|02351|9a0d8be7d641fae7 -BK|sql-bench/Results-linux/RUN-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02334|5f0504783180d906 -BK|sql-bench/Results-linux/RUN-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02335|6abba8bd8d9f8b7b -BK|sql-bench/Results-linux/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02366|730674f4ac333638 -BK|sql-bench/Results-linux/alter-table-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02367|e901749edf05bb58 -BK|sql-bench/Results-linux/alter-table-interbase-Linux_2.2.14_5.0_i686|19700101030959|02352|c4e27f25a15b6681 -BK|sql-bench/Results-linux/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02368|19c95f9fc4ee458 -BK|sql-bench/Results-linux/big-tables-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02371|c0c1c5efea0661ad -BK|sql-bench/Results-linux/big-tables-interbase-Linux_2.2.14_5.0_i686|19700101030959|02353|beba3adfcfd472c0 -BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02341|cabe523a8f103945 -BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02342|c682fb7ee1fb3d8 -BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02372|69d33d25eda85041 -BK|sql-bench/Results-linux/connect-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02373|744f1e38649d21d -BK|sql-bench/Results-linux/connect-interbase-Linux_2.2.14_5.0_i686|19700101030959|02354|c28534284b9f5657 -BK|sql-bench/Results-linux/connect-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02349|ebdc62367f5fcd43 -BK|sql-bench/Results-linux/connect-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02350|7ed494b7cc7081c9 -BK|sql-bench/Results-linux/connect-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02374|55d777517ce8091 -BK|sql-bench/Results-linux/create-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02377|d60ca06157cfc9b9 -BK|sql-bench/Results-linux/create-interbase-Linux_2.2.14_5.0_i686|19700101030959|02355|537da98f6c1bc6df -BK|sql-bench/Results-linux/create-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02356|612a182b889dd778 -BK|sql-bench/Results-linux/create-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02357|b501391eec112dd0 -BK|sql-bench/Results-linux/create-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02378|35bd48cfe30c16a3 -BK|sql-bench/Results-linux/insert-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02379|25161ee7c13036c1 -BK|sql-bench/Results-linux/insert-interbase-Linux_2.2.14_5.0_i686|19700101030959|02358|461a48df25628c0f -BK|sql-bench/Results-linux/insert-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02363|3260743076dbe95f -BK|sql-bench/Results-linux/insert-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02364|9de5538694cd87ea -BK|sql-bench/Results-linux/insert-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02380|7451b789c29b7dcd -BK|sql-bench/Results-linux/select-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02439|816ec12a9152b578 -BK|sql-bench/Results-linux/select-interbase-Linux_2.2.14_5.0_i686|19700101030959|02359|3535cd00c2a9cb5d -BK|sql-bench/Results-linux/select-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02369|de288cd8c11e1749 -BK|sql-bench/Results-linux/select-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02370|a82e759dbd5d66b -BK|sql-bench/Results-linux/select-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02440|862a7c0ef1b17f29 -BK|sql-bench/Results-linux/wisconsin-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02441|cb767c1f9abc2ebd -BK|sql-bench/Results-linux/wisconsin-interbase-Linux_2.2.14_5.0_i686|19700101030959|02360|9404247a2e483b34 -BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02375|8669562660b2c238 -BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02376|c7cbe3b167655f9c -BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02442|74b238eca114dbbe -monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|34755|45d7837423db243f -monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|37262|2274651e29d38b07 -monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|39831|a6ef8229d40b75d1 -monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|42374|65ccbcd7b1c4d7b5 -monty@donna.mysql.com|sql-bench/Results-linux/alter-table-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|44909|de84e4a2fd07f53 -monty@donna.mysql.com|sql-bench/Results-linux/alter-table-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|47422|ee162dd1474ba9d8 -monty@donna.mysql.com|sql-bench/Results-linux/big-tables-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|49948|d11a751a268a4df3 -monty@donna.mysql.com|sql-bench/Results-linux/big-tables-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|52469|c13eca5ec25cd6e1 -monty@donna.mysql.com|sql-bench/Results-linux/connect-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|54998|dfaa50e67eb15556 -monty@donna.mysql.com|sql-bench/Results-linux/connect-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|57532|4015a2bef627d8cd -monty@donna.mysql.com|sql-bench/Results-linux/create-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|60103|fa19b9a2c7a3c3c -monty@donna.mysql.com|sql-bench/Results-linux/create-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|62710|21ec8ba1ea3ca4c4 -monty@donna.mysql.com|sql-bench/Results-linux/insert-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|65289|a02aceb3b30de493 -monty@donna.mysql.com|sql-bench/Results-linux/insert-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|02393|7c9baa774fc324e1 -monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|05001|da73eefa16ca9383 -monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|07610|cffd7d282a90113a -monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|10615|8dcd7271a9137341 -monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|13213|4398328883aa75da -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876 -BK|mit-pthreads/machdep/i386-sco-3.2v5/__math.h|19700101030959|01011|79d9a37715f2c7fe -BK|mit-pthreads/machdep/i386-sco-3.2v5/__signal.h|19700101030959|01012|45332b2a56f62580 -BK|mit-pthreads/machdep/i386-sco-3.2v5/__stdio.h|19700101030959|01013|a81562134446c64c -BK|mit-pthreads/machdep/i386-sco-3.2v5/__stdlib.h|19700101030959|01014|bcbed6d62d1885ae -BK|mit-pthreads/machdep/i386-sco-3.2v5/__string.h|19700101030959|01015|94a2e4f9574bf1e8 -BK|mit-pthreads/machdep/i386-sco-3.2v5/__time.h|19700101030959|01016|2cde57d8feea7fc8 -BK|mit-pthreads/machdep/i386-sco-3.2v5/__unistd.h|19700101030959|01017|5cc4575b5a74066f -BK|mit-pthreads/machdep/i386-sco-3.2v5/compat.h|19700101030959|01018|1f7e450a2e18603e -BK|mit-pthreads/machdep/i386-sco-3.2v5/dirent.h|19700101030959|01019|13608bf11af98f70 -BK|mit-pthreads/machdep/i386-sco-3.2v5/posix/__signal.h|19700101030959|01024|9bb7b240bec88b2d -BK|mit-pthreads/machdep/i386-sco-3.2v5/socket.h|19700101030959|01020|9f78f7e5a7b4a83f -BK|mit-pthreads/machdep/i386-sco-3.2v5/syscall.h|19700101030959|01021|d9543a0474656339 -BK|mit-pthreads/machdep/i386-sco-3.2v5/timers.h|19700101030959|01022|d5e694e48990538c -BK|mit-pthreads/machdep/i386-sco-3.2v5/trash.can|19700101030959|01023|9332039abd82a925 -BK|mit-pthreads/machdep/sco-3.2v5/__math.h|19700101030959|00971|f3855eb411435a06 -BK|mit-pthreads/machdep/sco-3.2v5/__signal.h|19700101030959|00972|3d6f84e96bc1462 -BK|mit-pthreads/machdep/sco-3.2v5/__stdio.h|19700101030959|00973|b991fad3327275e0 -BK|mit-pthreads/machdep/sco-3.2v5/__stdlib.h|19700101030959|00974|6179a0922d90025e -BK|mit-pthreads/machdep/sco-3.2v5/__string.h|19700101030959|00975|d2cc42eeb5e1666 -BK|mit-pthreads/machdep/sco-3.2v5/__time.h|19700101030959|00976|a9594bab280ced64 -BK|mit-pthreads/machdep/sco-3.2v5/__unistd.h|19700101030959|00977|99e6f1116d1f920 -BK|mit-pthreads/machdep/sco-3.2v5/compat.h|19700101030959|00978|3f150ff6223d49be -BK|mit-pthreads/machdep/sco-3.2v5/dirent.h|19700101030959|00979|388af3465ad4680f -BK|mit-pthreads/machdep/sco-3.2v5/posix/__signal.h|19700101030959|00984|5e14827a3b91a6db -BK|mit-pthreads/machdep/sco-3.2v5/socket.h|19700101030959|00980|1b409f3f1fcbbf7a -BK|mit-pthreads/machdep/sco-3.2v5/syscall.h|19700101030959|00981|c69bd58eba4d5076 -BK|mit-pthreads/machdep/sco-3.2v5/timers.h|19700101030959|00982|4907a958151368ed -BK|mit-pthreads/machdep/sco-3.2v5/trash.can|19700101030959|00983|7eecac9fc944ade2 diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 5b4ad2564be..6ffd517a2f7 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -1,12 +1,15 @@ Miguel@light.local Sinisa@sinisa.nasamreza.org arjen@fred.bitbike.com +bar@bar.mysql.r18.ru bar@bar.udmsearch.izhnet.ru +bk@admin.bk heikki@donna.mysql.fi heikki@hundin.mysql.fi jani@hynda.mysql.fi jorge@linux.jorge.mysql.com lenz@mysql.com +miguel@hegel.br miguel@hegel.local miguel@light.local monty@bitch.mysql.fi @@ -19,16 +22,14 @@ monty@tik. monty@tik.mysql.fi monty@work.mysql.com mwagner@cash.mwagner.org +nick@mysql.com nick@nick.leippe.com paul@central.snake.net +paul@teton.kitebird.com salle@geopard.online.bg sasha@mysql.sashanet.com +serg@build.mysql2.com serg@serg.mysql.com serg@sergbook.mysql.com sinisa@rhols221.adsl.netsonic.fi zak@balfor.local -bar@bar.mysql.r18.ru -paul@teton.kitebird.com -serg@build.mysql2.com -nick@mysql.com -miguel@hegel.br diff --git a/BitKeeper/etc/skipkeys b/BitKeeper/etc/skipkeys new file mode 100644 index 00000000000..9f29647d38a --- /dev/null +++ b/BitKeeper/etc/skipkeys @@ -0,0 +1,6 @@ +BK|scripts/safe_mysqld.sh|19700101030959|01930|d0a3cc73fd1b0d8d tim@localhost.polyesthetic.msg|scripts/safe_mysqld.sh|20000802235627|38519 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe jcole@tetra.bedford.progress.com|BitKeeper/etc/logging_ok|20001004201211|30554 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe sasha@work.mysql.com|BitKeeper/etc/logging_ok|20000802223223|24242 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe tim@localhost.polyesthetic.msg|BitKeeper/etc/logging_ok|20000802235640|27343 +bk@work.mysql.com|ChangeSet|20000731191004|44203|eae70093a6122e66+ sasha@work.mysql.com|ChangeSet|20000802223249|54774 +bk@work.mysql.com|ChangeSet|20000731191004|44203|eae70093a6122e66+ tim@localhost.polyesthetic.msg|ChangeSet|20000802235645|56533 From 47ffb583cad29523588aa43be2546c311308d5b2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Oct 2002 03:52:51 -0600 Subject: [PATCH 003/246] added new syntax: STOP|START SLAVE rather than SLAVE STOP|START, which is now deprecated and should be deleted in 4.1 --- sql/sql_yacc.yy | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 5367bc897b3..70f9327e706 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1276,7 +1276,24 @@ opt_to: | EQ {} | AS {}; +/* + * The first two deprecate the last two--delete the last two for 4.1 release + */ slave: + START_SYM SLAVE slave_thread_opts + { + LEX *lex=Lex; + lex->sql_command = SQLCOM_SLAVE_START; + lex->type = 0; + } + | + STOP_SYM SLAVE slave_thread_opts + { + LEX *lex=Lex; + lex->sql_command = SQLCOM_SLAVE_STOP; + lex->type = 0; + } + | SLAVE START_SYM slave_thread_opts { LEX *lex=Lex; From 6f043c359cd6510057872e6e47fbb6ce8e591d1c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Oct 2002 14:30:25 +0200 Subject: [PATCH 004/246] - replaced all occurences of HPUX with HPUX10 (to be prepared for eventual differences in HPUX11) acconfig.h: - fixed typo configure.in: - replaced HPUX -> HPUX10 - added -DHPUX11 (not being used yet) to hpux11 workarounds include/my_global.h: - replaced HPUX -> HPUX10 include/my_net.h: - replaced HPUX -> HPUX10 include/my_pthread.h: - replaced HPUX -> HPUX10 libmysql/libmysql.c: - replaced HPUX -> HPUX10 mysys/my_append.c: - replaced HPUX -> HPUX10 mysys/my_copy.c: - replaced HPUX -> HPUX10 mysys/my_pthread.c: - replaced HPUX -> HPUX10 mysys/my_redel.c: - replaced HPUX -> HPUX10 mysys/thr_alarm.c: - replaced HPUX -> HPUX10 sql/mini_client.cc: - replaced HPUX -> HPUX10 sql/mysqld.cc: - replaced HPUX -> HPUX10 strings/do_ctype.c: - replaced HPUX -> HPUX10 --- acconfig.h | 2 +- configure.in | 8 ++++---- include/my_global.h | 2 +- include/my_net.h | 4 ++-- include/my_pthread.h | 2 +- libmysql/libmysql.c | 2 +- mysys/my_append.c | 2 +- mysys/my_copy.c | 2 +- mysys/my_pthread.c | 2 +- mysys/my_redel.c | 2 +- mysys/thr_alarm.c | 4 ++-- sql/mini_client.cc | 4 ++-- sql/mysqld.cc | 4 ++-- strings/do_ctype.c | 8 ++++---- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/acconfig.h b/acconfig.h index f52c38b2fdc..4b4fde6bff6 100644 --- a/acconfig.h +++ b/acconfig.h @@ -234,7 +234,7 @@ #undef SPRINTF_RETURNS_INT #undef SPRINTF_RETURNS_GARBAGE -/* Needed to get large file supportat HPUX 10.20 */ +/* Needed to get large file support on HPUX 10.20 */ #undef __STDC_EXT__ #undef STACK_DIRECTION diff --git a/configure.in b/configure.in index 093b5aa8344..f007d511865 100644 --- a/configure.in +++ b/configure.in @@ -914,8 +914,8 @@ case $SYSTEM_TYPE in ;; *hpux10.20*) echo "Enabling workarounds for hpux 10.20" - CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_POSIX1003_4a_MUTEX" - CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_POSIX1003_4a_MUTEX" + CFLAGS="$CFLAGS -DHAVE_BROKEN_SNPRINTF -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX10 -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_POSIX1003_4a_MUTEX" + CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_SNPRINTF -D_INCLUDE_LONGLONG -DSIGNALS_DONT_BREAK_READ -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHPUX10 -DSIGNAL_WITH_VIO_CLOSE -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT -DHAVE_POSIX1003_4a_MUTEX" if test "$with_named_thread" = "no" then echo "Using --with-named-thread=-lpthread" @@ -924,8 +924,8 @@ case $SYSTEM_TYPE in ;; *hpux11.*) echo "Enabling workarounds for hpux 11" - CFLAGS="$CFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" - CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" + CFLAGS="$CFLAGS -DHPUX11 -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" + CXXFLAGS="$CXXFLAGS -DHPUX11 -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" if test "$with_named_thread" = "no" then echo "Using --with-named-thread=-lpthread" diff --git a/include/my_global.h b/include/my_global.h index d1b3c516555..3f018ab73cb 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -240,7 +240,7 @@ #ifdef DONT_USE_FINITE /* HPUX 11.x has is_finite() */ #undef HAVE_FINITE #endif -#if defined(HPUX) && defined(_LARGEFILE64_SOURCE) && defined(THREAD) +#if defined(HPUX10) && defined(_LARGEFILE64_SOURCE) && defined(THREAD) /* Fix bug in setrlimit */ #undef setrlimit #define setrlimit cma_setrlimit64 diff --git a/include/my_net.h b/include/my_net.h index 2f5743923cf..ec985ded76b 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -71,7 +71,7 @@ void my_inet_ntoa(struct in_addr in, char *buf); Handling of gethostbyname_r() */ -#if !defined(HPUX) +#if !defined(HPUX10) struct hostent; #endif /* HPUX */ #if !defined(HAVE_GETHOSTBYNAME_R) @@ -84,7 +84,7 @@ struct hostent *my_gethostbyname_r(const char *name, struct hostent *result, char *buffer, int buflen, int *h_errnop); #define my_gethostbyname_r_free() -#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) && !defined(HPUX) +#if !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) && !defined(HPUX10) #define GETHOSTBYNAME_BUFF_SIZE sizeof(struct hostent_data) #endif /* !defined(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE) */ diff --git a/include/my_pthread.h b/include/my_pthread.h index 9b7812b7cf2..f75ca8f601a 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -428,7 +428,7 @@ struct tm *localtime_r(const time_t *clock, struct tm *res); #endif /* defined(__WIN__) */ -#if defined(HPUX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS) +#if defined(HPUX10) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS) #undef pthread_cond_timedwait #define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c)) int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 6f2ba791eef..c1d8dd6283f 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -221,7 +221,7 @@ int my_connect(my_socket s, const struct sockaddr *name, uint namelen, { tv.tv_sec = (long) timeout; tv.tv_usec = 0; -#if defined(HPUX) && defined(THREAD) +#if defined(HPUX10) && defined(THREAD) if ((res = select(s+1, NULL, (int*) &sfds, NULL, &tv)) >= 0) break; #else diff --git a/mysys/my_append.c b/mysys/my_append.c index 2e08b4b4c05..dc5ed084bb3 100644 --- a/mysys/my_append.c +++ b/mysys/my_append.c @@ -22,7 +22,7 @@ #include #elif defined(HAVE_UTIME_H) #include -#elif !defined(HPUX) +#elif !defined(HPUX10) struct utimbuf { time_t actime; time_t modtime; diff --git a/mysys/my_copy.c b/mysys/my_copy.c index 253608c5306..a899835ea62 100644 --- a/mysys/my_copy.c +++ b/mysys/my_copy.c @@ -22,7 +22,7 @@ #include #elif defined(HAVE_UTIME_H) #include -#elif !defined(HPUX) +#elif !defined(HPUX10) #include struct utimbuf { time_t actime; diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index 54a5c71c695..07e8ecec6ac 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -435,7 +435,7 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr) this has to be added here. ****************************************************************************/ -#if defined(HPUX) || defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) +#if defined(HPUX10) || defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *abstime) diff --git a/mysys/my_redel.c b/mysys/my_redel.c index 8474dab0d13..b5a79d9454b 100644 --- a/mysys/my_redel.c +++ b/mysys/my_redel.c @@ -23,7 +23,7 @@ #include #elif defined(HAVE_UTIME_H) #include -#elif !defined(HPUX) +#elif !defined(HPUX10) struct utimbuf { time_t actime; time_t modtime; diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index d1343d4c2d3..ed468b5ef50 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -730,11 +730,11 @@ static pthread_cond_t COND_thread_count; static pthread_mutex_t LOCK_thread_count; static uint thread_count; -#ifdef HPUX +#ifdef HPUX10 typedef int * fd_set_ptr; #else typedef fd_set * fd_set_ptr; -#endif /* HPUX */ +#endif /* HPUX10 */ static void *test_thread(void *arg) { diff --git a/sql/mini_client.cc b/sql/mini_client.cc index 5bd88e9b09a..5600983817b 100644 --- a/sql/mini_client.cc +++ b/sql/mini_client.cc @@ -294,11 +294,11 @@ static int mc_sock_connect(my_socket s, const struct sockaddr *name, FD_SET(s, &sfds); tv.tv_sec = (long) to; tv.tv_usec = 0; -#ifdef HPUX +#ifdef HPUX10 res = select(s+1, NULL, (int*) &sfds, NULL, &tv); #else res = select(s+1, NULL, &sfds, NULL, &tv); -#endif +#endif /* HPUX10 */ if (res <= 0) /* Never became writable */ return(-1); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ae80ab9ea6b..b2114b2192a 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2531,7 +2531,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused))) while (!abort_loop) { readFDs=clientFDs; -#ifdef HPUX +#ifdef HPUX10 if (select(max_used_connection,(int*) &readFDs,0,0,0) < 0) continue; #else @@ -2545,7 +2545,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused))) MAYBE_BROKEN_SYSCALL continue; } -#endif /* HPUX */ +#endif /* HPUX10 */ if (abort_loop) { MAYBE_BROKEN_SYSCALL; diff --git a/strings/do_ctype.c b/strings/do_ctype.c index 14ede6891da..f51770e3633 100644 --- a/strings/do_ctype.c +++ b/strings/do_ctype.c @@ -145,7 +145,7 @@ void init_case_convert() higher_pos= (uchar * ) "\217\216\231\232\220"; /* Extra chars to konv. */ lower_pos= (uchar * ) "\206\204\224\201\202"; #else -#if defined(HPUX) && ASCII_BITS_USED == 8 +#if defined(HPUX10) && ASCII_BITS_USED == 8 higher_pos= (uchar * ) "\xd0\xd8\xda\xdb\xdc\xd3"; lower_pos= (uchar * ) "\xd4\xcc\xce\xdf\xc9\xd7"; #else @@ -160,7 +160,7 @@ void init_case_convert() lower_pos= (uchar * ) "{}|`~"; #endif #endif /* USE_INTERNAL_CTYPE */ -#endif /* HPUX */ +#endif /* HPUX10 */ #endif /* MSDOS */ while (*higher_pos) @@ -176,7 +176,7 @@ void init_case_convert() higher_pos= (uchar *) "\217\216\231\232\220"; lower_pos= (uchar *) "\216\217\231YE"; #else -#if defined(HPUX) && ASCII_BITS_USED == 8 +#if defined(HPUX10) && ASCII_BITS_USED == 8 higher_pos= lower_pos= (uchar *) ""; /* Tecknen i r{tt ordning */ #else #ifdef USE_ISO_8859_1 /* As in USG5 ICL-386 */ @@ -186,7 +186,7 @@ void init_case_convert() higher_pos= (uchar *) "][\\~`"; /* R{tt ordning p} tecknen */ lower_pos= (uchar *) "[\\]YE"; /* Ordning enligt ascii */ #endif /* USE_ISO_8859_1 */ -#endif /* HPUX */ +#endif /* HPUX10 */ #endif /* MSDOS */ while (*higher_pos) From e5317a78db50939404b3ef071126803fe78704cf Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Oct 2002 21:28:43 +0600 Subject: [PATCH 005/246] BK automatic LOD removal. BitKeeper/etc/skipkeys: auto add BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BitKeeper/etc/gone | 2324 +++++++++++++++++++------------------- BitKeeper/etc/logging_ok | 5 +- BitKeeper/etc/skipkeys | 7 + 3 files changed, 1173 insertions(+), 1163 deletions(-) create mode 100644 BitKeeper/etc/skipkeys diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index 03c7cacb8bc..5f2b9e1209d 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -1,8 +1,27 @@ BK|Build-tools/Do-compile-all|19700101030959|00060|f119832ce3aca102 +BK|Docs/Attic/myisam.doc|19700101030959|00502|519bb06ecc870298 +BK|Docs/Flags/island.eps|19700101030959|00181|8cec5a55768bc59e +BK|Docs/Flags/island.gif|19700101030959|00142|e274d5e96ee0975a +BK|Docs/Flags/island.txt|19700101030959|00220|301ede0f81c5f3e1 +BK|Docs/Flags/kroatia.eps|19700101030959|00185|f50fcd444e7efceb +BK|Docs/Flags/kroatia.gif|19700101030959|00146|bea7bbe0316d462d +BK|Docs/Flags/kroatia.txt|19700101030959|00224|dde7f89f25d616b2 +BK|Docs/Flags/south-africa1.eps|19700101030959|00193|111e4f92f4562e9d +BK|Docs/Flags/south-africa1.gif|19700101030959|00154|1ea38de5a535f732 +BK|Docs/Flags/south-africa1.txt|19700101030959|00232|87a53fdcd2149c6e +BK|client/Attic/libmysql.c|19700101030959|00582|72949a7043113807 +BK|client/Attic/net.c|19700101030959|00583|c18042da6fa4e693 BK|client/mysql-test.c|19700101030959|00560|809ade45d58e28ab +BK|client/violite.c|19700101030959|00561|afa871b4aab14371 BK|config.h.in|19700101030959|00050|aecae693cca472c +BK|extra/Attic/print_defaults.c|19700101030959|01513|362952979aa7b330 +BK|include/Attic/config-win32.h|19700101030959|00116|65db818ec7e8f21b +BK|include/Attic/m_ctype.h.in|19700101030959|00114|f671e3c2d611ba97 +BK|include/Attic/mysql_com.h.in|19700101030959|00115|85b1ea7ced528c32 BK|include/my_global.h|19700101030959|00105|f657f708961a4632 BK|libmysql/acconfig.h|19700101030959|02604|7b620dbd69ea6074 +BK|libmysql/configure.in|19700101030959|02603|c6fc04d4e3d6e291 +BK|libmysql/violite.c|19700101030959|02600|984c09cffe14a11b BK|mit-pthreads/config.flags|19700101030959|00594|dcec5296ef811cd6 BK|mit-pthreads/machdep/i386-sco-3.2v5/__math.h|19700101030959|01011|79d9a37715f2c7fe BK|mit-pthreads/machdep/i386-sco-3.2v5/__signal.h|19700101030959|01012|45332b2a56f62580 @@ -32,9 +51,15 @@ BK|mit-pthreads/machdep/sco-3.2v5/socket.h|19700101030959|00980|1b409f3f1fcbbf7a BK|mit-pthreads/machdep/sco-3.2v5/syscall.h|19700101030959|00981|c69bd58eba4d5076 BK|mit-pthreads/machdep/sco-3.2v5/timers.h|19700101030959|00982|4907a958151368ed BK|mit-pthreads/machdep/sco-3.2v5/trash.can|19700101030959|00983|7eecac9fc944ade2 +BK|mit-pthreads/pg++|19700101030959|00597|3beac0502025d766 +BK|mit-pthreads/pgcc|19700101030959|00596|154a03d0c1a0a600 +BK|myisam/Attic/ft_global.h|19700101030959|01673|fe46fb515f1e375 BK|myisam/common_words|19700101030959|01665|13c10ef32aaa7537 +BK|myisam/ft_search.c|19700101030959|01642|c011cb6e8041bb59 BK|myisam/mi_test_all|19700101030959|01666|ae7a366c45527b4e +BK|mysql.proj|19700101030959|00071|3e34edc585d18be8 BK|mysys/mf_reccache.c|19700101030959|01419|f8191c8485e158fe +BK|mysys/test_vsnprintf.c|19700101030959|01502|e3d568aca62dc81e BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02361|6a0a837742a861bb BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686|19700101030959|02348|e87091e2a6dce931 BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02326|70981cb1dd58d3fb @@ -161,10 +186,21 @@ BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.12_20smp_i686|1970010103095 BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02347|ad7babd436f26841 BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02442|74b238eca114dbbe BK|sql-bench/Results-linux/wisconsin-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02451|6ad065fe4c6b4fa9 +BK|sql-bench/Results-win32/ATIS-mysql-win98|19700101030959|02523|cd0705815d3af451 +BK|sql-bench/Results-win32/RUN-mysql-win98|19700101030959|02526|7f09e396772a8665 +BK|sql-bench/Results-win32/alter-table-mysql-win98|19700101030959|02529|e8743982f790462 +BK|sql-bench/Results-win32/big-tables-mysql-win98|19700101030959|02532|99a1882effebbdf2 +BK|sql-bench/Results-win32/connect-mysql-win98|19700101030959|02535|2a11d5e3dfc0bc67 +BK|sql-bench/Results-win32/create-mysql-win98|19700101030959|02538|f66c2cb2909c4792 +BK|sql-bench/Results-win32/insert-mysql-win98|19700101030959|02541|6d6cafc85a6c837 +BK|sql-bench/Results-win32/select-mysql-win98|19700101030959|02544|f370fac2d66a9faf +BK|sql-bench/Results-win32/wisconsin-mysql-win98|19700101030959|02547|8b3da9c5c5d2365b +BK|sql-bench/Results/ATIS-mysql-3.21-Linux_2.2.1_i686|19700101030959|02022|660fb76ed6ccfb6f BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_i686_xeon|19700101030959|02044|3e820c28bf4af63a BK|sql-bench/Results/ATIS-mysql-SunOS_5.6_sun4m|19700101030959|02032|62028e0375b3b8b +BK|sql-bench/Results/ATIS-mysql_3.21-Linux_2.0.35_i686|19700101030959|02036|c25425e045ca8dfc BK|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02304|cbe120d860296d2f BK|sql-bench/Results/ATIS-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02027|a74e7b82d3908fa9 BK|sql-bench/Results/ATIS-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02313|8c6fc2968f78773 @@ -223,77 +259,258 @@ BK|sql-bench/Results/Attic/wisconsin-mysql-Linux_2.2.1_i686-cmp-mysql,pg|1970010 BK|sql-bench/Results/Attic/wisconsin-mysql_fast-Linux_2.2.10_i686-cmp-mysql,pg|19700101030959|02218|b4e89cdac0620cba BK|sql-bench/Results/Attic/wisconsin-pg-Linux_2.2.10_i686-cmp-mysql,pg|19700101030959|02219|7d641554f51cf45a BK|sql-bench/Results/Attic/wisconsin-pg_fast-Linux_2.2.10_i686-cmp-mysql,pg|19700101030959|02220|db31ec971b4c5051 +BK|sql-bench/Results/RUN-mysql-3.21-Linux_2.2.1_i686|19700101030959|02050|f6fdd64859e11de9 BK|sql-bench/Results/RUN-mysql-Linux_2.2.10_i686|19700101030959|02041|712f52be5d195406 BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02038|8ee87b26b91c86fe BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_i686_xeon|19700101030959|02055|17854e751e1d9d1d BK|sql-bench/Results/RUN-mysql-SunOS_5.6_sun4m|19700101030959|02059|eafc8188345e262b +BK|sql-bench/Results/RUN-mysql_3.21-Linux_2.0.35_i686|19700101030959|02064|ea8672d8473435 BK|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02310|a902e1a967d79c42 BK|sql-bench/Results/RUN-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02030|413ab3b8a99e61e9 BK|sql-bench/Results/RUN-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02046|a910a9b3fde431e1 BK|sql-bench/Results/RUN-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02165|e0f060fdbf92325e +BK|sql-bench/Results/alter-table-mysql-3.21-Linux_2.2.1_i686|19700101030959|02073|f6f7ccd7b3c35f97 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.10_i686|19700101030959|02081|93b78a85b720a186 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02314|4ae4b989301df98b BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_i686_xeon|19700101030959|02057|64cc4b874cd6fabf BK|sql-bench/Results/alter-table-mysql-SunOS_5.6_sun4m|19700101030959|02088|8a1bd6589a189890 +BK|sql-bench/Results/alter-table-mysql_3.21-Linux_2.0.35_i686|19700101030959|02092|762639f2560976bd BK|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02316|1390155aad5b6e86 BK|sql-bench/Results/alter-table-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02317|9090bebb62ef164b BK|sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02094|4e02d36dc17ecbfa BK|sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02233|b8721431b356177 +BK|sql-bench/Results/big-tables-mysql-3.21-Linux_2.2.1_i686|19700101030959|02106|baa649caba113497 BK|sql-bench/Results/big-tables-mysql-Linux_2.2.10_i686|19700101030959|02109|99daa1c5370d077d BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02315|2804ec3c95be436a BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_i686_xeon|19700101030959|02074|290c2c3de9d8e6b BK|sql-bench/Results/big-tables-mysql-SunOS_5.6_sun4m|19700101030959|02116|f351a7f3e1e2257e +BK|sql-bench/Results/big-tables-mysql_3.21-Linux_2.0.35_i686|19700101030959|02120|190e827e569c99a4 BK|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02318|c5eabcb89ceac698 BK|sql-bench/Results/big-tables-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02319|856d503725373684 BK|sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02122|a442a8aff47fae20 BK|sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02235|e5a33639e51290fd +BK|sql-bench/Results/connect-mysql-3.21-Linux_2.2.1_i686|19700101030959|02134|c0c26d4320182d85 BK|sql-bench/Results/connect-mysql-Linux_2.2.10_i686|19700101030959|02137|c92505d77e19d5ec BK|sql-bench/Results/connect-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02084|e7e2959b7387251f BK|sql-bench/Results/connect-mysql-Linux_2.2.14_i686_xeon|19700101030959|02071|ea19dc3ec55b3618 BK|sql-bench/Results/connect-mysql-SunOS_5.6_sun4m|19700101030959|02143|a10e3ddfa26a3e7f +BK|sql-bench/Results/connect-mysql_3.21-Linux_2.0.35_i686|19700101030959|02146|650abd213e6828c6 BK|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02320|ce69cc65bc827b5c BK|sql-bench/Results/connect-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02066|f801e08429a4f7c6 BK|sql-bench/Results/connect-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02086|1d95d36fd717990 BK|sql-bench/Results/connect-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02244|f6ab4d00b0ae09c1 +BK|sql-bench/Results/create-mysql-3.21-Linux_2.2.1_i686|19700101030959|02158|51581b24f45e0f5c BK|sql-bench/Results/create-mysql-Linux_2.2.10_i686|19700101030959|02161|9e7822f66df6aa76 BK|sql-bench/Results/create-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02102|34ded91c5fc25de9 BK|sql-bench/Results/create-mysql-Linux_2.2.14_i686_xeon|19700101030959|02139|50d15991293030ef BK|sql-bench/Results/create-mysql-SunOS_5.6_sun4m|19700101030959|02221|9233114ae6f8c5f +BK|sql-bench/Results/create-mysql_3.21-Linux_2.0.35_i686|19700101030959|02225|df1b037d17b33587 BK|sql-bench/Results/create-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02321|e985e71d552ff09e BK|sql-bench/Results/create-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02099|483dcf223d5abf81 BK|sql-bench/Results/create-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02112|a140e5e229a53b7b BK|sql-bench/Results/create-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02246|177fd39cc1d298a8 +BK|sql-bench/Results/insert-mysql-3.21-Linux_2.2.1_i686|19700101030959|02239|fd082017c7c57a6 BK|sql-bench/Results/insert-mysql-Linux_2.2.10_i686|19700101030959|02242|763edf9aec633f51 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02130|5be3d6f299738a31 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_i686_xeon|19700101030959|02141|c683ee4b9d214298 BK|sql-bench/Results/insert-mysql-SunOS_5.6_sun4m|19700101030959|02248|3402d060ae20e19 +BK|sql-bench/Results/insert-mysql_3.21-Linux_2.0.35_i686|19700101030959|02252|60c0965dff31db07 BK|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02322|ed252140ff399961 BK|sql-bench/Results/insert-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02114|29a3b8a1ca8aa9d BK|sql-bench/Results/insert-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02148|e65dd14f2ed9abbf BK|sql-bench/Results/insert-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02259|b5bf77586c18d2b5 +BK|sql-bench/Results/select-mysql-3.21-Linux_2.2.1_i686|19700101030959|02265|ed3687e713ff0571 BK|sql-bench/Results/select-mysql-Linux_2.2.10_i686|19700101030959|02268|a2e264d777b787d BK|sql-bench/Results/select-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02227|308117295c3bc096 BK|sql-bench/Results/select-mysql-Linux_2.2.14_i686_xeon|19700101030959|02152|ead3f11b46ac626f BK|sql-bench/Results/select-mysql-SunOS_5.6_sun4m|19700101030959|02274|4da215905bce988d +BK|sql-bench/Results/select-mysql_3.21-Linux_2.0.35_i686|19700101030959|02278|5fadbac5f98696a BK|sql-bench/Results/select-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02323|e8c0871a668a610d BK|sql-bench/Results/select-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02127|963a98ed526e2be4 BK|sql-bench/Results/select-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02254|f9ab7726ff14ea90 BK|sql-bench/Results/select-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02261|188d6b5b72d8e0a +BK|sql-bench/Results/wisconsin-mysql-3.21-Linux_2.2.1_i686|19700101030959|02290|8147dc16a1dc6c47 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.10_i686|19700101030959|02288|301a82b12a84922b BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02280|d01900af34fb33b8 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_i686_xeon|19700101030959|02154|7525b23938631801 BK|sql-bench/Results/wisconsin-mysql-SunOS_5.6_sun4m|19700101030959|02298|ec61b14072715dc8 +BK|sql-bench/Results/wisconsin-mysql_3.21-Linux_2.0.35_i686|19700101030959|02302|31703d40ea6b4f66 BK|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02324|ec075a89dbdbbe6a BK|sql-bench/Results/wisconsin-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02325|233d5aa529979990 BK|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02295|ec361eee4f4128cd BK|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02270|ef201ca14f635c57 +BK|sql/Attic/lex_hash.h|19700101030959|01912|14f912771118b50c +BK|sql/Attic/mini_client.c|19700101030959|01910|9a3778c387d06a81 +BK|sql/Attic/mini_client_errors.c|19700101030959|01909|29edad51a5d0b068 +BK|sql/Attic/mybinlogdump.cc|19700101030959|01908|5dbdd2bde98d6169 +BK|sql/Attic/net_serv.c|19700101030959|01911|52dabcd773a39e10 +BK|sql/ha_hash.h|19700101030959|01902|27e36916116beb3e +BK|sql/share/czech/errmsg.sys|19700101030959|01828|93104a2bd5c732a +BK|sql/share/danish/errmsg.sys|19700101030959|01831|3a6d0fb8451a3313 +BK|sql/share/dutch/errmsg.sys|19700101030959|01833|b5aff4d08478bafd +BK|sql/share/english/errmsg.sys|19700101030959|01834|f29bd4ea5aaf54c8 +BK|sql/share/estonia/errmsg.sys|19700101030959|01836|83b86d7ed4cdd5d0 +BK|sql/share/french/errmsg.sys|19700101030959|01838|9f024dc5e6fe50f5 +BK|sql/share/german/errmsg.sys|19700101030959|01840|1ea60675399c84c +BK|sql/share/greek/errmsg.sys|19700101030959|01842|fedf585fa73e7cf1 +BK|sql/share/hungarian/errmsg.sys|19700101030959|01845|aff82c16a77fc800 +BK|sql/share/italian/errmsg.sys|19700101030959|01846|c5108ecb850b79a +BK|sql/share/japanese/errmsg.sys|19700101030959|01848|302478c84697dc00 +BK|sql/share/korean/errmsg.sys|19700101030959|01850|a30e3687ae75a7c9 +BK|sql/share/norwegian-ny/.cvsignore|19700101030959|01855|469064b5190d703d +BK|sql/share/norwegian/.cvsignore|19700101030959|01853|a91d63182f0b2366 +BK|sql/share/polish/errmsg.sys|19700101030959|01857|126b03af92054f0f +BK|sql/share/portuguese/errmsg.sys|19700101030959|01859|c0187322f8c9d805 +BK|sql/share/romania/errmsg.sys|19700101030959|01871|e08aa93bae96d25e BK|sql/share/romanian/errmsg.sys|19700101030959|01869|9d8282efb437e8cc BK|sql/share/romanian/errmsg.txt|19700101030959|01870|2c64fb13a8f104ad +BK|sql/share/russian/errmsg.sys|19700101030959|01860|72688df0beeabcb3 +BK|sql/share/slovak/errmsg.sys|19700101030959|01862|148510616ae825cf +BK|sql/share/spanish/errmsg.sys|19700101030959|01865|10c8f32da39070b2 +BK|sql/share/swedish/errmsg.sys|19700101030959|01866|dd772e93db859993 +BK|sql/violite.c|19700101030959|01738|d7b85be615595ace +BK|strings/Attic/bootstrap-ctype.c|19700101030959|01360|6d2a8cda2d6a35ff +BK|strings/Attic/ct_init.c|19700101030959|01338|f0948bdd35ceedc3 +BK|strings/Attic/ctype-cp1251.c|19700101030959|01339|cdf74b9168408b3 +BK|strings/Attic/ctype-cp1257.c|19700101030959|01340|732611cbc74aeafc +BK|strings/Attic/ctype-croat.c|19700101030959|01341|d2d805ee6f10cbcc +BK|strings/Attic/ctype-danish.c|19700101030959|01342|dc5451066eb272ae +BK|strings/Attic/ctype-dec8.c|19700101030959|01343|68f257dd2202d0c7 +BK|strings/Attic/ctype-dos.c|19700101030959|01344|f77bd08acf13a8c1 +BK|strings/Attic/ctype-estonia.c|19700101030959|01345|fc8a69424f7cb66b +BK|strings/Attic/ctype-german1.c|19700101030959|01346|f7830c509bb358f7 +BK|strings/Attic/ctype-greek.c|19700101030959|01347|90acdff1195209ca +BK|strings/Attic/ctype-hebrew.c|19700101030959|01348|d3b4a000d51e76dc +BK|strings/Attic/ctype-hp8.c|19700101030959|01349|749e1be0f028d349 +BK|strings/Attic/ctype-hungarian.c|19700101030959|01350|5cf0bf7fa0312637 +BK|strings/Attic/ctype-koi8_ru.c|19700101030959|01351|8ff4188c642c9bd +BK|strings/Attic/ctype-koi8_ukr.c|19700101030959|01352|a04aa14a6d62335a +BK|strings/Attic/ctype-latin1.c|19700101030959|01353|cc63880f19c2303e +BK|strings/Attic/ctype-latin2.c|19700101030959|01354|31895c4b83654342 +BK|strings/Attic/ctype-swe7.c|19700101030959|01355|bb1b012225d7d02c +BK|strings/Attic/ctype-usa7.c|19700101030959|01356|d19d859dca5675f +BK|strings/Attic/ctype-win1250.c|19700101030959|01357|1ce7a24255780a1 +BK|strings/Attic/ctype-win1251.c|19700101030959|01358|762607f4fd7d52ad +BK|strings/Attic/ctype-win1251ukr.c|19700101030959|01359|b5a7cca889bbef58 +BK|strings/Attic/ctype.c.in|19700101030959|01361|8bf48d4bcbc5f675 +BK|strings/Attic/memory.h|19700101030959|01336|450f586e82a26d99 +BK|strings/Attic/ptr_cmp.c|19700101030959|01337|57e682a26e769597 +BK|strings/READ-ME|19700101030959|01362|ed6c5184d4bf6b7c +BK|support-files/Attic/my-example.cnf.sh|19700101030959|02584|87a7e1f4d24b62a9 +BK|support-files/Attic/my-huge.cfg.sh|19700101030959|02585|589bdcd2d2c4360b +BK|support-files/Attic/my-large.cfg.sh|19700101030959|02586|842c8e76253c9396 +BK|support-files/Attic/my-medium.cfg.sh|19700101030959|02587|c49880d26ef0648e +BK|support-files/Attic/my-small.cfg.sh|19700101030959|02588|85023c559a1d96c +BK|tests/fork3_test.pl|19700101030959|01947|c4a7bffb4f8e813c +BK|tests/fork_test.pl|19700101030959|01945|3d3535329ed8cd5e +BK|vio/Vio.cc|19700101030959|00003|60737ce02ab2bc25 +BK|vio/Vio.h|19700101030959|00004|f4416b2949647602 +BK|vio/VioAcceptorFd.cc|19700101030959|00005|a5a08947a31f88de +BK|vio/VioAcceptorFd.h|19700101030959|00006|7f9c4358477ba9a3 +BK|vio/VioConnectorFd.cc|19700101030959|00007|ddbd7821c43c83a2 +BK|vio/VioConnectorFd.h|19700101030959|00008|58bc11cdc885b951 +BK|vio/VioFd.cc|19700101030959|00009|6e444647affef63b +BK|vio/VioFd.h|19700101030959|00010|8294293a88c7b4b8 +BK|vio/VioPipe.cc|19700101030959|00011|12cf83b9a2f48f6c +BK|vio/VioPipe.h|19700101030959|00012|21cebbe61a1da546 +BK|vio/VioSSL.cc|19700101030959|00013|6e85340b11fa42a8 +BK|vio/VioSSL.h|19700101030959|00014|70d367b7ec8cac3e +BK|vio/VioSSLAcceptorFd.cc|19700101030959|00015|4c828f3688ed74ec +BK|vio/VioSSLFactoriesFd.cc|19700101030959|00016|89f6bf5073937947 +BK|vio/VioSSLFactoriesFd.h|19700101030959|00017|1d63ae149a63f85 +BK|vio/VioSocket.cc|19700101030959|00018|71c615783f29b5e1 +BK|vio/VioSocket.h|19700101030959|00019|a26d535bd5a1a6 +BK|vio/version.cc|19700101030959|00020|7237acf12bed4a97 +BK|vio/vio-global.h|19700101030959|00021|c261412c01b2f4 +BK|vio/vioelitexx.cc|19700101030959|00022|3eaba70da792a7fc +BK|vio/violite.h|19700101030959|00023|58d2942a52ea7a83 +BK|vio/viotypes.h|19700101030959|00027|f5a38e7326bd50f3 +Sinisa@sinisa.nasamreza.org|=6|20010818122920|53462|33f33b0a159dc5d5 +Sinisa@sinisa.nasamreza.org|mysql-test/r/sel000004.result|20020522121240|20995|360af2095c88cb8c +Sinisa@sinisa.nasamreza.org|mysql-test/r/sel000004.result|20020522133259|25000|4b5fbc60d0d9754f +Sinisa@sinisa.nasamreza.org|mysql-test/t/sel000004.test|20020522133300|08911|21904fbd1c95cb1 +Sinisa@sinisa.nasamreza.org|mysql-test/t/sel000004.test|20020522133624|23665|445526a8a20de101 +Sinisa@sinisa.nasamreza.org|scripts/mysql_new_fix_privilege_tables.sh|20011226144909|43765|b1664b401375eece +arjen@co3064164-a.bitbike.com|BitKeeper/etc/logging_ok|20011212060636|33009 +arjen@co3064164-a.bitbike.com|Docs/section.Comparisons.texi|20011108043647|22614|692b647b +arjen@fred.bitbike.com|scripts/mysql_fix_extensions.sh|20020516001337|12363|f1048a78f4759b4d +ccarkner@nslinuxw10.bedford.progress.com|mysql-test/r/isolation.result|20010327145543|25059|4da11e109a3d93a9 +ccarkner@nslinuxw10.bedford.progress.com|mysql-test/t/isolation.test|20010327145543|39049|6a39e4138dd4a456 +jani@hynda.mysql.fi|client/mysqlcheck|20010419221207|26716|363e3278166d84ec +jcole@tetra.bedford.progress.com|BitKeeper/etc/logging_ok|20001004201211|30554 +miguel@hegel.local|zlib/ChangeLog|20020319032513|28917|5d5425fc84737083 miguel@hegel.local|zlib/Make_vms.com|20020319032513|57151|35050a50ec612bbf miguel@hegel.local|zlib/Makefile.riscos|20020319032513|63798|8ab53f195fe429af +miguel@hegel.local|zlib/adler32.c|20020319032513|04487|f98728c6da1ac164 +miguel@hegel.local|zlib/algorithm.txt|20020319032513|12903|fbc4dda3d31c2005 miguel@hegel.local|zlib/amiga/Makefile.pup|20020319032513|19225|6a9ee8128d11541f miguel@hegel.local|zlib/amiga/Makefile.sas|20020319032513|25562|d7128ac7e0946f0b +miguel@hegel.local|zlib/compress.c|20020319032513|32512|70bccb304651dba9 +miguel@hegel.local|zlib/contrib/README.contrib|20020319032514|04353|24cb75bee0a061fb +miguel@hegel.local|zlib/contrib/asm386/gvmat32.asm|20020319032514|12654|31093c1a846dfdc7 +miguel@hegel.local|zlib/contrib/asm386/gvmat32c.c|20020319032514|19182|2a8eba5481c46eab +miguel@hegel.local|zlib/contrib/asm386/mkgvmt32.bat|20020319032514|25425|422cbe16a6e74695 +miguel@hegel.local|zlib/contrib/asm386/zlibvc.def|20020319032514|31637|605ee23b8a4a6a1a +miguel@hegel.local|zlib/contrib/asm386/zlibvc.dsp|20020319032514|38372|a1c6749052ce48a +miguel@hegel.local|zlib/contrib/asm386/zlibvc.dsw|20020319032514|44870|3209982720f131ab +miguel@hegel.local|zlib/contrib/asm586/match.s|20020319032514|51538|dc1a34b5eb2a7c11 +miguel@hegel.local|zlib/contrib/asm586/readme.586|20020319032514|57815|f60bfeefb27217d +miguel@hegel.local|zlib/contrib/asm686/match.s|20020319032514|64199|4164951e8e19f116 +miguel@hegel.local|zlib/contrib/asm686/readme.686|20020319032514|04933|15e2bf4653b71f3e +miguel@hegel.local|zlib/contrib/delphi/zlib.mak|20020319032514|11153|7b97eb8cf290a42 +miguel@hegel.local|zlib/contrib/delphi/zlibdef.pas|20020319032514|18918|658cb04db561e3db +miguel@hegel.local|zlib/contrib/delphi2/d_zlib.bpr|20020319032514|25335|c267d77cc2e2a2c8 +miguel@hegel.local|zlib/contrib/delphi2/d_zlib.cpp|20020319032514|31641|d6f37620ac7b27fa +miguel@hegel.local|zlib/contrib/delphi2/readme.txt|20020319032515|03494|65d16837f8579e23 +miguel@hegel.local|zlib/contrib/delphi2/zlib.bpg|20020319032515|09768|93c030edcca1838 +miguel@hegel.local|zlib/contrib/delphi2/zlib.bpr|20020319032515|16113|7a2fa98af2345144 +miguel@hegel.local|zlib/contrib/delphi2/zlib.cpp|20020319032515|22372|4257437d415259e2 +miguel@hegel.local|zlib/contrib/delphi2/zlib.pas|20020319032515|28965|3c94d3f5262cbbdd +miguel@hegel.local|zlib/contrib/delphi2/zlib32.bpr|20020319032515|35585|41ac53acb8008ff7 +miguel@hegel.local|zlib/contrib/delphi2/zlib32.cpp|20020319032515|41979|3b0f51435e880afe +miguel@hegel.local|zlib/contrib/iostream/test.cpp|20020319032515|48225|a2ea8d4d7c66cf71 +miguel@hegel.local|zlib/contrib/iostream/zfstream.cpp|20020319032515|55262|dce18d1a5d7096b7 +miguel@hegel.local|zlib/contrib/iostream/zfstream.h|20020319032515|61553|2b4d88acc2d3b714 +miguel@hegel.local|zlib/contrib/iostream2/zstream.h|20020319032515|02537|351f26518ea48196 +miguel@hegel.local|zlib/contrib/iostream2/zstream_test.cpp|20020319032515|08848|63f635d540de8c48 +miguel@hegel.local|zlib/contrib/minizip/ChangeLogUnzip|20020319032515|15183|50464416f4a3768f +miguel@hegel.local|zlib/contrib/minizip/miniunz.c|20020319032515|21943|6a80009b319b1b9e +miguel@hegel.local|zlib/contrib/minizip/minizip.c|20020319032515|28588|97181367a7bc47d8 +miguel@hegel.local|zlib/contrib/minizip/readme.txt|20020319032516|00611|7547b986c067c008 +miguel@hegel.local|zlib/contrib/minizip/unzip.c|20020319032516|07891|c66c95e17321206d +miguel@hegel.local|zlib/contrib/minizip/unzip.def|20020319032516|14456|b4162b8c833ab6c7 +miguel@hegel.local|zlib/contrib/minizip/unzip.h|20020319032516|21001|bac981086af91a30 +miguel@hegel.local|zlib/contrib/minizip/zip.c|20020319032516|27911|e82bf7774e1ece95 +miguel@hegel.local|zlib/contrib/minizip/zip.def|20020319032516|34413|e9bda2081d65c22e +miguel@hegel.local|zlib/contrib/minizip/zip.h|20020319032516|40925|17fd39ccb4ea294c +miguel@hegel.local|zlib/contrib/minizip/zlibvc.def|20020319032516|47259|6dc42f99d2d55cad +miguel@hegel.local|zlib/contrib/minizip/zlibvc.dsp|20020319032516|54044|ec35fd54c9b49987 +miguel@hegel.local|zlib/contrib/minizip/zlibvc.dsw|20020319032516|60515|17f28194a5cd80ea miguel@hegel.local|zlib/contrib/untgz/makefile.w32|20020319032516|01267|2c584f05a16db4ba +miguel@hegel.local|zlib/contrib/untgz/untgz.c|20020319032516|07726|b74e9dde74642756 +miguel@hegel.local|zlib/contrib/visual-basic.txt|20020319032516|14096|cd461e762199bb09 +miguel@hegel.local|zlib/crc32.c|20020319032516|20397|b327da5b8cf9eae8 +miguel@hegel.local|zlib/deflate.c|20020319032516|26978|e22894a54233bc25 +miguel@hegel.local|zlib/deflate.h|20020319032516|33700|3a012bc1f5dfbc74 +miguel@hegel.local|zlib/descrip.mms|20020319032517|08063|7d61d33062ef53ec +miguel@hegel.local|zlib/example.c|20020319032517|14327|490f57a4a9440dfa +miguel@hegel.local|zlib/faq|20020319032517|20799|b0d0840d3b9faf07 +miguel@hegel.local|zlib/gzio.c|20020319032517|27098|e02d23e656c19359 +miguel@hegel.local|zlib/index|20020319032517|33542|5443c9f841db4a47 +miguel@hegel.local|zlib/infblock.c|20020319032517|39853|540cc1b743be5f58 +miguel@hegel.local|zlib/infblock.h|20020319032517|46202|4526bc327b4160ab +miguel@hegel.local|zlib/infcodes.c|20020319032517|52620|dffb42fdf2fb2372 +miguel@hegel.local|zlib/infcodes.h|20020319032517|58960|3a02220a89c9a4fa +miguel@hegel.local|zlib/inffast.c|20020319032517|65269|bf247ff4aa2bf54b +miguel@hegel.local|zlib/inffast.h|20020319032517|06651|215e4a4ccfc886fc +miguel@hegel.local|zlib/inffixed.h|20020319032517|12923|e86ef8e2efe23f77 +miguel@hegel.local|zlib/inflate.c|20020319032517|19311|fb22a3a1ab6fb1a0 +miguel@hegel.local|zlib/inftrees.c|20020319032517|25758|4fcb97357cdbc40 +miguel@hegel.local|zlib/inftrees.h|20020319032517|32227|ffcbe51816466e5c +miguel@hegel.local|zlib/infutil.c|20020319032518|05244|a9b414f0f4ea0868 +miguel@hegel.local|zlib/infutil.h|20020319032518|12977|13089e09be34788c +miguel@hegel.local|zlib/maketree.c|20020319032518|19299|7f281aef3547fee +miguel@hegel.local|zlib/minigzip.c|20020319032518|25601|37f8eacb80c7f8fc miguel@hegel.local|zlib/msdos/Makefile.b32|20020319032518|33760|86772037f3344353 miguel@hegel.local|zlib/msdos/Makefile.bor|20020319032518|40099|7aa9edaac099cdb9 miguel@hegel.local|zlib/msdos/Makefile.dj2|20020319032518|46371|ca26f5fe96e3e999 @@ -302,11 +519,32 @@ miguel@hegel.local|zlib/msdos/Makefile.msc|20020319032518|59050|1bb69abdddf390f2 miguel@hegel.local|zlib/msdos/Makefile.tc|20020319032518|65341|2a9dff916115ae77 miguel@hegel.local|zlib/msdos/Makefile.w32|20020319032518|06083|8d84523c1dcdc0f7 miguel@hegel.local|zlib/msdos/Makefile.wat|20020319032518|12471|82f8714d825e97e3 +miguel@hegel.local|zlib/msdos/zlib.def|20020319032518|18787|165cd7dcff6ac9f +miguel@hegel.local|zlib/msdos/zlib.rc|20020319032518|25240|f8a286fa8371ee09 miguel@hegel.local|zlib/nt/Makefile.emx|20020319032518|31715|7e9fcf6f5ad2e51a miguel@hegel.local|zlib/nt/Makefile.gcc|20020319032519|03630|351fa8bd15c704b9 miguel@hegel.local|zlib/nt/Makefile.nt|20020319032519|09990|ee461a3dd393a061 +miguel@hegel.local|zlib/nt/zlib.dnt|20020319032519|16279|22a0ed3b86ff8c2 miguel@hegel.local|zlib/os2/Makefile.os2|20020319032519|22554|7a05f2a27812703a +miguel@hegel.local|zlib/os2/zlib.def|20020319032519|28842|1166a95d83c5f52c +miguel@hegel.local|zlib/readme|20020319032519|35257|80a41fc822f5f4 +miguel@hegel.local|zlib/trees.c|20020319032519|43770|4fbd4d005e26d38 +miguel@hegel.local|zlib/trees.h|20020319032519|50674|87161133bc2155fd +miguel@hegel.local|zlib/uncompr.c|20020319032519|57111|82eac43195d1222c +miguel@hegel.local|zlib/zconf.h|20020319032519|63437|c6b6b636c7e88d90 +miguel@hegel.local|zlib/zlib.3|20020319032519|04298|ec5cb4f64476f6a +miguel@hegel.local|zlib/zlib.dsp|20020319032519|12016|6eec436fab260061 +miguel@hegel.local|zlib/zlib.html|20020319032519|31060|7a635f4ac95fc56b +miguel@hegel.local|zlib/zlib.h|20020319032519|20598|fbec7833981c782f +miguel@hegel.local|zlib/zutil.c|20020319032520|05372|6f0d1763c5deb409 +miguel@hegel.local|zlib/zutil.h|20020319032520|12556|1e431b0173278fb2 +mikef@nslinux.bedford.progress.com|mysql-test/include/have_gemini.inc|20010321203410|40631|42f94f0dfd0f7b18 +mikef@nslinux.bedford.progress.com|mysql-test/r/have_gemini.require|20010321203410|47052|206702c48b2e206b +monty@donna.mysql.com|innobase/ib_config.h.in|20010217121901|07616|9e57db8504e55b7 +monty@donna.mysql.com|innobase/ib_config.h|20010217121901|04019|7539e26ffc614439 monty@donna.mysql.com|myisam/mi_debug.c|20000829092809|23459|873a6e7d6ff8297c +monty@donna.mysql.com|mysql-test/include/have_default_master.inc|20010104005638|23980|a54c86e65a6c4af +monty@donna.mysql.com|mysql-test/r/have_default_master.require|20010104005638|27332|1465255ffdaf82f monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|34755|45d7837423db243f monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|37262|2274651e29d38b07 monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|39831|a6ef8229d40b75d1 @@ -325,7 +563,97 @@ monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug-Linux_2.2.14_my_ monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|07610|cffd7d282a90113a monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|10615|8dcd7271a9137341 monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|13213|4398328883aa75da +monty@donna.mysql.com|sql-bench/Results/ATIS-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|14134|cf0d806760eefef2 +monty@donna.mysql.com|sql-bench/Results/ATIS-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|14777|e625af7f600bf930 +monty@donna.mysql.com|sql-bench/Results/RUN-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|15344|d922a0fcc1009130 +monty@donna.mysql.com|sql-bench/Results/RUN-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|15933|840503a555e420ec +monty@donna.mysql.com|sql-bench/Results/alter-table-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|16525|2f516d2c108a9e05 +monty@donna.mysql.com|sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|17106|6e532c1936df1737 +monty@donna.mysql.com|sql-bench/Results/big-tables-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|17709|6d8209bf72b663ed +monty@donna.mysql.com|sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|18309|c87333d6fe04433e +monty@donna.mysql.com|sql-bench/Results/connect-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|18910|7ed15d6fd1a5944c +monty@donna.mysql.com|sql-bench/Results/connect-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|19522|ab58fffa30dce97e +monty@donna.mysql.com|sql-bench/Results/create-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|20136|241c337935ae1524 +monty@donna.mysql.com|sql-bench/Results/create-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|20766|4e5a2ab4907748d4 +monty@donna.mysql.com|sql-bench/Results/insert-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|22042|27b7a557c3cb07a +monty@donna.mysql.com|sql-bench/Results/insert-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|22723|a85a6f0477c13f83 +monty@donna.mysql.com|sql-bench/Results/select-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|23395|8ef771713f89e1 +monty@donna.mysql.com|sql-bench/Results/select-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|24071|4f7795c27eaab86b +monty@donna.mysql.com|sql-bench/Results/wisconsin-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|24748|6a468dcd3e6f5405 +monty@donna.mysql.com|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|25437|24a02e007a58bf73 +monty@donna.mysql.fi|sql/violite.c|20010523223654|08838|53d4251a69d3c +monty@hundin.mysql.fi|sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|32241|dd306b2e583ebde4 +monty@hundin.mysql.fi|sql-bench/Results/ATIS-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|59551|d002b0bc548ff8b3 +monty@hundin.mysql.fi|sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|35759|11038a44f73070e7 +monty@hundin.mysql.fi|sql-bench/Results/RUN-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|63204|e938a858bd12aa8d +monty@hundin.mysql.fi|sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|39143|662b96bc66bc91b6 +monty@hundin.mysql.fi|sql-bench/Results/alter-table-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|01419|14360865bbba479f +monty@hundin.mysql.fi|sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|42711|788ad492867b1226 +monty@hundin.mysql.fi|sql-bench/Results/big-tables-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|05113|b6be70bb51013cad +monty@hundin.mysql.fi|sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|46284|5316add301edb60 +monty@hundin.mysql.fi|sql-bench/Results/connect-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|08804|1b715c6fd72e913e +monty@hundin.mysql.fi|sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|49804|26e09af61f88d8c9 +monty@hundin.mysql.fi|sql-bench/Results/create-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|12309|f3b1d326092bf44 +monty@hundin.mysql.fi|sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|53328|fd2699adb3190d07 +monty@hundin.mysql.fi|sql-bench/Results/insert-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|15984|a0143553cccb54e2 +monty@hundin.mysql.fi|sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|56860|b01175ad38fd12b6 +monty@hundin.mysql.fi|sql-bench/Results/select-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|19688|4ffc9cf4be665ea2 +monty@hundin.mysql.fi|sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|60398|8ba598d217450157 +monty@hundin.mysql.fi|sql-bench/Results/wisconsin-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|23386|1ed1dc6abd24e7e3 +monty@hundin.mysql.fi|support-files/make_mysql_pkg.sh|20010915122456|03682|c616a18bed4b9c2 +monty@narttu.mysql.com|sql-bench/Results/ATIS-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|04677|f761da5546f0d362 +monty@narttu.mysql.com|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|07879|2ac8fe298953d43 +monty@narttu.mysql.com|sql-bench/Results/RUN-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|09727|79ac0482599eace1 +monty@narttu.mysql.com|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171904|13285|a88e954bc8de5460 +monty@narttu.mysql.com|sql-bench/Results/alter-table-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|11725|dfc480becae45236 +monty@narttu.mysql.com|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|13605|ee94f987797ca948 +monty@narttu.mysql.com|sql-bench/Results/big-tables-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|15583|a2a77f37b689cd63 +monty@narttu.mysql.com|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|17580|28b688e2cd4b6bb3 +monty@narttu.mysql.com|sql-bench/Results/connect-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|19531|7dd5ac726f86cf0b +monty@narttu.mysql.com|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|21574|1cf5d5f0d70a3fa0 +monty@narttu.mysql.com|sql-bench/Results/create-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|23516|441a6aefd381e319 +monty@narttu.mysql.com|sql-bench/Results/create-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|25516|fc207468e871ff69 +monty@narttu.mysql.com|sql-bench/Results/insert-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|27509|d12a7edef05d7185 +monty@narttu.mysql.com|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|29606|975e26cac59161fa +monty@narttu.mysql.com|sql-bench/Results/select-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|33684|ddcf36cdf3f72e8c +monty@narttu.mysql.com|sql-bench/Results/select-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|35818|34a39fbcb58d8945 +monty@narttu.mysql.com|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|37931|2db07249379f36 +monty@narttu.mysql.com|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|40155|8101a5823c17e58a +monty@narttu.mysql.fi|sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha|20001014001004|08145|21ddf9425cbdd58 +monty@narttu.mysql.fi|sql-bench/Results/ATIS-mysql-Linux_2.2.14_my_SMP_i686|20001218015322|06287|d275df58a04737c8 +monty@narttu.mysql.fi|sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha|20001014001004|13092|583091e05a25fb6 +monty@narttu.mysql.fi|sql-bench/Results/RUN-mysql-Linux_2.2.14_my_SMP_i686|20001218015322|21374|d4766c7f8e70d7a2 +monty@narttu.mysql.fi|sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha|20001014001004|15829|6c20c9ef46f82241 +monty@narttu.mysql.fi|sql-bench/Results/alter-table-mysql-Linux_2.2.14_my_SMP_i686|20001218015322|25875|155a83b53c0e9d6 +monty@narttu.mysql.fi|sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha|20001014001004|18602|e8cc899bb933532f +monty@narttu.mysql.fi|sql-bench/Results/big-tables-mysql-Linux_2.2.14_my_SMP_i686|20001218015322|30548|f1127add9307098b +monty@narttu.mysql.fi|sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha|20001014001004|21372|84df7c6446e51e26 +monty@narttu.mysql.fi|sql-bench/Results/connect-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|00237|45d2cdf9bea9cc37 +monty@narttu.mysql.fi|sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha|20001014001004|23947|2c9af91e9771f618 +monty@narttu.mysql.fi|sql-bench/Results/create-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|04134|d46860c29c5d51ee +monty@narttu.mysql.fi|sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha|20001014001004|26814|688809eb8ea77b3d +monty@narttu.mysql.fi|sql-bench/Results/insert-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|07880|e1771e0a164bc310 +monty@narttu.mysql.fi|sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha|20001014001004|29737|db59425a7f4aa93f +monty@narttu.mysql.fi|sql-bench/Results/select-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|11605|ee2a063d66a183d +monty@narttu.mysql.fi|sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha|20001014001004|32465|fc410754151d622c +monty@narttu.mysql.fi|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|15116|b7552710d35202b6 +monty@work.mysql.com|fs/fsck.mysql|20010411110350|07619|87170d4358b50d60 +monty@work.mysql.com|libmysqld/README|20010411110351|24268|434e9cae5fa9a4c4 +monty@work.mysql.com|libmysqld/WHITEPAPER|20010411110351|28263|da1226799debcf3f +mwagner@cash.mwagner.org|Docs/include.de.texi|20020223092123|06028|112aac21b3489888 +mwagner@evoq.home.mwagner.org|Docs/Books/algor.eps|20001231203219|20480|481984607c98d715 +mwagner@evoq.home.mwagner.org|Docs/Books/dbi.eps|20001231203219|30594|6ad58f9457e2a564 +mwagner@evoq.home.mwagner.org|Docs/Books/dubois.eps|20001231203219|33725|aa3d9c08bbcc149b +mwagner@evoq.home.mwagner.org|Docs/Books/ecomm.eps|20001231203220|02445|58ae914b5d5ea49 +mwagner@evoq.home.mwagner.org|Docs/Books/in_21.eps|20001231203220|05743|83a7604251d68ebd +mwagner@evoq.home.mwagner.org|Docs/Books/manual.eps|20001231203220|09365|2a7145f88960c7ec +mwagner@evoq.home.mwagner.org|Docs/Books/msql.eps|20001231203220|12487|ffe7d62847663250 +mwagner@evoq.home.mwagner.org|Docs/Books/prof.eps|20001231203220|15779|dc69b039543a57d7 +mwagner@evoq.home.mwagner.org|Docs/Books/pthreads.eps|20001231203220|18899|d60ad51891ef4c49 +mwagner@evoq.home.mwagner.org|Docs/Books/realmen.eps|20001231203220|22075|1ceb4839e835dad4 +mwagner@evoq.home.mwagner.org|Docs/Books/sql-99.eps|20001231203220|25230|cec4ae16fee4c640 mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b93948768 +mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.tst|20001013104933|54568|2e626fa07144d2c8 mwagner@evoq.home.mwagner.org|mysql-test/mybin/start-mysqld|20001016055648|54840|9c8f21a7ab97793a mwagner@evoq.home.mwagner.org|mysql-test/mybin/stop-mysqld|20001016055653|20710|89a1194045f05d1c mwagner@evoq.home.mwagner.org|mysql-test/mybin/translate-tests|20001018130217|00206|3869c1fdf0a5ea1a @@ -365,7 +693,44 @@ mwagner@evoq.home.mwagner.org|mysql-test/var/lib/README|20001009213643|15351|3b6 mwagner@evoq.home.mwagner.org|mysql-test/var/log/README|20001009213643|16203|df5481fdbe6e5b6e mwagner@evoq.home.mwagner.org|mysql-test/var/run/README|20001009213643|17062|acb305e4c2ed5990 mwagner@evoq.home.mwagner.org|mysql-test/var/tmp/README|20001009213643|17904|b32d866bfd50e72e +mwagner@evoq.home.mwagner.org|mysql-test/xml/README|20001013051440|12362|877d76bcd19f7193 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000001.xml|20001013051507|22498|f0eb64c0346366db +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000002.xml|20001013074610|25702|8cd06da5293a7147 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000003.xml|20001013074610|26659|1a622b8d30d7ade8 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000004.xml|20001017133600|56955|515488ef221523d9 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000005.xml|20001017133618|09973|a6344e46ba572dc3 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000006.xml|20001017133623|51441|8ad8f44f49b21246 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000007.xml|20001017133625|48163|bfcb6d85276be7e8 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000008.xml|20001017133627|18273|1d6082f0905c51b6 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000009.xml|20001017133629|19814|8677613dc624cb0c +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000010.xml|20001017133713|64368|9b98c9cce8fac145 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000011.xml|20001017133713|00331|432156d127cbd22f +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000012.xml|20001017133713|01909|a410d08dc4cfee11 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000013.xml|20001017133713|03416|2717cbfbe5730174 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000014.xml|20001017133713|05036|bcf55df6a036bd8f +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000015.xml|20001017133749|30814|b72689a8f9b21372 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000016.xml|20001017133713|07087|32f1ef2e3d214be0 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000017.xml|20001017133713|08762|81423597605ff77f +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000018.xml|20001017133713|10435|82e2e7bde83f56d8 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000019.xml|20001017133713|12133|c0f0b05e481b90e7 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000020.xml|20001017133713|13843|8849bbf91a4fd5ec +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000021.xml|20001017133713|15460|2763b87c1549ba87 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000022.xml|20001017133713|17202|da2083ef423ae39a +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000023.xml|20001017133713|20719|11993b379b9838be +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000024.xml|20001017133713|22352|dd067aa28220fa4c +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000025.xml|20001017133713|24071|3e766aa1e43b303 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000026.xml|20001017133713|25860|15145e496417646f +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000027.xml|20001017133713|27519|95e7de3e9934b570 +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000028.xml|20001017133713|29282|c72bfec6600949b +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000029.xml|20001017133713|31058|3aba1eb23ef86c9e +mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000030.xml|20001017133600|63205|c2b25781eefaee9 +mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/README|20001013051514|26509|cd4bb681e5a0cd10 +mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/mysqltest.xsl|20001013051514|27425|1b8f6ec4f1b5f634 +nick@nick.leippe.com|mysql-test/r/rpl_empty_master_crash.result|20020531235552|47718|615f521be2132141 +nick@nick.leippe.com|mysql-test/t/rpl_empty_master_crash.test|20020531235552|52328|99464e737639ccc6 sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554 +sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97 +sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618 sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5 @@ -377,1244 +742,881 @@ sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|520 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd sasha@mysql.sashanet.com|mysql-test/r/3.23/shw000001.result|20001121234128|16652|8b20b03d8319b9a5 +sasha@mysql.sashanet.com|mysql-test/r/binlog-backup-restore.result|20010424233926|16010|605de78abda64d27 +sasha@mysql.sashanet.com|mysql-test/r/df_crash.result|20010406010433|59989|4a3dbee64843953d +sasha@mysql.sashanet.com|mysql-test/r/identity.result|20010910233028|16331|e41453a364242503 +sasha@mysql.sashanet.com|mysql-test/r/mrg000002.result|20001212152450|11492|745be0854aaaaf5e +sasha@mysql.sashanet.com|mysql-test/std_data/m.MRG|20001212152450|17736|3f5632c37af00f18 +sasha@mysql.sashanet.com|mysql-test/std_data/m.frm|20001212152450|13897|e351dfe0b6824c0c sasha@mysql.sashanet.com|mysql-test/std_data/select-key.master|20001009234916|07315|e6b83af25df0ce5 sasha@mysql.sashanet.com|mysql-test/std_data/simple-select.master|20001009234916|08299|6f3eb98812926caf +sasha@mysql.sashanet.com|mysql-test/t/3.23/alt000001.test|20001122072330|31588|633aed61c4bad94c +sasha@mysql.sashanet.com|mysql-test/t/3.23/sel000004.test|20001103140433|32471|daf9ad4a1a31cd3c +sasha@mysql.sashanet.com|mysql-test/t/3.23/sel000005.test|20001103140433|36002|982fde89a4d6d886 sasha@mysql.sashanet.com|mysql-test/t/3.23/select-key.test|20001009234859|21197|5d785cef5c02c070 +sasha@mysql.sashanet.com|mysql-test/t/3.23/shw000001.test|20001121234128|21322|770d96a2c1c65b20 sasha@mysql.sashanet.com|mysql-test/t/3.23/simple-select.test|20001009234859|26291|71f98293e1dc65 +sasha@mysql.sashanet.com|mysql-test/t/binlog-backup-restore.test|20010424233926|25316|d5b0b9bd83738a9f +sasha@mysql.sashanet.com|mysql-test/t/df_crash.test|20010406010433|65180|4c365178fe437f6 +sasha@mysql.sashanet.com|mysql-test/t/fulltext_join.test|20010730234357|20865|e347c8f04405c916 +sasha@mysql.sashanet.com|mysql-test/t/identity.test|20010910233028|36116|326f469b59105404 sasha@mysql.sashanet.com|mysql-test/t/include/master-slave.inc|20001118030458|01636|556fd038c3a3d54 +sasha@mysql.sashanet.com|mysql-test/t/mrg000002.test|20001212152450|20137|16b3a176adc0f311 +sasha@mysql.sashanet.com|mysql-test/t/rpl000018-master.sh|20010127223331|13256|bc8072e13b26b005 +sasha@mysql.sashanet.com|sounds/compilation_finished.au.gz|20010814034002|63992|70bd14095a918139 +sasha@mysql.sashanet.com|vio/test-ssl|20010828000105|24508|ed0a50364f2a51d7 sasha@work.mysql.com|BitKeeper/etc/logging_ok|20001214015456|29919|32b6551b8288c2fa serg@serg.mysql.com|mysql-test/r/3.23/mrg000001.dummy.result|20001206231604|05053|bf7e6d609f22b897 serg@serg.mysql.com|mysql-test/r/3.23/mrg000001.result|20001206231609|46662|db2ef2e717ab8332 -BK|Docs/Attic/myisam.doc|19700101030959|00502|519bb06ecc870298 -BK|Docs/Flags/island.eps|19700101030959|00181|8cec5a55768bc59e -BK|libmysql/violite.c|19700101030959|02600|984c09cffe14a11b -BK|mysql.proj|19700101030959|00071|3e34edc585d18be8 -BK|sql-bench/Results-win32/wisconsin-mysql-win98|19700101030959|02547|8b3da9c5c5d2365b -BK|sql-bench/Results/connect-mysql-3.21-Linux_2.2.1_i686|19700101030959|02134|c0c26d4320182d85 -BK|sql-bench/Results/create-mysql_3.21-Linux_2.0.35_i686|19700101030959|02225|df1b037d17b33587 -BK|sql/share/estonia/errmsg.sys|19700101030959|01836|83b86d7ed4cdd5d0 -BK|sql/share/french/errmsg.sys|19700101030959|01838|9f024dc5e6fe50f5 -BK|sql/share/romania/errmsg.sys|19700101030959|01871|e08aa93bae96d25e -BK|strings/Attic/bootstrap-ctype.c|19700101030959|01360|6d2a8cda2d6a35ff -BK|strings/Attic/ctype-dos.c|19700101030959|01344|f77bd08acf13a8c1 -BK|strings/Attic/ctype-estonia.c|19700101030959|01345|fc8a69424f7cb66b -BK|strings/Attic/ctype-german1.c|19700101030959|01346|f7830c509bb358f7 -BK|strings/Attic/ctype-hp8.c|19700101030959|01349|749e1be0f028d349 -BK|strings/Attic/ctype-koi8_ru.c|19700101030959|01351|8ff4188c642c9bd -BK|strings/READ-ME|19700101030959|01362|ed6c5184d4bf6b7c -BK|support-files/Attic/my-large.cfg.sh|19700101030959|02586|842c8e76253c9396 -BK|vio/VioSSL.cc|19700101030959|00013|6e85340b11fa42a8 -BK|vio/VioSocket.h|19700101030959|00019|a26d535bd5a1a6 -BK|vio/viotypes.h|19700101030959|00027|f5a38e7326bd50f3 -Sinisa@sinisa.nasamreza.org|=6|20010818122920|53462|33f33b0a159dc5d5 -Sinisa@sinisa.nasamreza.org|mysql-test/r/sel000004.result|20020522133259|25000|4b5fbc60d0d9754f -Sinisa@sinisa.nasamreza.org|mysql-test/t/sel000004.test|20020522133300|08911|21904fbd1c95cb1 -ccarkner@nslinuxw10.bedford.progress.com|mysql-test/r/isolation.result|20010327145543|25059|4da11e109a3d93a9 -jani@hynda.mysql.fi|client/mysqlcheck|20010419221207|26716|363e3278166d84ec -miguel@hegel.local|zlib/contrib/asm386/gvmat32.asm|20020319032514|12654|31093c1a846dfdc7 -miguel@hegel.local|zlib/contrib/asm386/gvmat32c.c|20020319032514|19182|2a8eba5481c46eab -miguel@hegel.local|zlib/contrib/asm586/match.s|20020319032514|51538|dc1a34b5eb2a7c11 -miguel@hegel.local|zlib/contrib/delphi2/d_zlib.cpp|20020319032514|31641|d6f37620ac7b27fa -miguel@hegel.local|zlib/contrib/delphi2/zlib.cpp|20020319032515|22372|4257437d415259e2 -miguel@hegel.local|zlib/crc32.c|20020319032516|20397|b327da5b8cf9eae8 -miguel@hegel.local|zlib/inffast.c|20020319032517|65269|bf247ff4aa2bf54b -miguel@hegel.local|zlib/inffixed.h|20020319032517|12923|e86ef8e2efe23f77 -miguel@hegel.local|zlib/msdos/zlib.def|20020319032518|18787|165cd7dcff6ac9f -miguel@hegel.local|zlib/trees.c|20020319032519|43770|4fbd4d005e26d38 -miguel@hegel.local|zlib/uncompr.c|20020319032519|57111|82eac43195d1222c -miguel@hegel.local|zlib/zlib.dsp|20020319032519|12016|6eec436fab260061 -miguel@hegel.local|zlib/zlib.html|20020319032519|31060|7a635f4ac95fc56b -monty@donna.mysql.com|mysql-test/include/have_default_master.inc|20010104005638|23980|a54c86e65a6c4af -monty@donna.mysql.com|sql-bench/Results/ATIS-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|14777|e625af7f600bf930 -monty@donna.mysql.com|sql-bench/Results/create-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|20766|4e5a2ab4907748d4 -monty@donna.mysql.fi|sql/violite.c|20010523223654|08838|53d4251a69d3c -monty@hundin.mysql.fi|sql-bench/Results/RUN-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|63204|e938a858bd12aa8d -monty@hundin.mysql.fi|sql-bench/Results/big-tables-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|42711|788ad492867b1226 -monty@hundin.mysql.fi|sql-bench/Results/connect-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|46284|5316add301edb60 -monty@narttu.mysql.com|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|29606|975e26cac59161fa -monty@narttu.mysql.fi|sql-bench/Results/big-tables-mysql-Linux_2.2.13_SMP_alpha|20001014001004|18602|e8cc899bb933532f -mwagner@cash.mwagner.org|Docs/include.de.texi|20020223092123|06028|112aac21b3489888 -mwagner@evoq.home.mwagner.org|Docs/Books/dubois.eps|20001231203219|33725|aa3d9c08bbcc149b -mwagner@evoq.home.mwagner.org|Docs/Books/in_21.eps|20001231203220|05743|83a7604251d68ebd -mwagner@evoq.home.mwagner.org|Docs/Books/pthreads.eps|20001231203220|18899|d60ad51891ef4c49 -mwagner@evoq.home.mwagner.org|Docs/Books/realmen.eps|20001231203220|22075|1ceb4839e835dad4 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000006.xml|20001017133623|51441|8ad8f44f49b21246 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000013.xml|20001017133713|03416|2717cbfbe5730174 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000021.xml|20001017133713|15460|2763b87c1549ba87 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000026.xml|20001017133713|25860|15145e496417646f -nick@nick.leippe.com|mysql-test/t/rpl_empty_master_crash.test|20020531235552|52328|99464e737639ccc6 -sasha@mysql.sashanet.com|mysql-test/r/df_crash.result|20010406010433|59989|4a3dbee64843953d -sasha@mysql.sashanet.com|mysql-test/std_data/m.MRG|20001212152450|17736|3f5632c37af00f18 -sasha@mysql.sashanet.com|mysql-test/t/3.23/alt000001.test|20001122072330|31588|633aed61c4bad94c -sasha@mysql.sashanet.com|mysql-test/t/binlog-backup-restore.test|20010424233926|25316|d5b0b9bd83738a9f -sasha@mysql.sashanet.com|vio/test-ssl|20010828000105|24508|ed0a50364f2a51d7 +serg@serg.mysql.com|mysql-test/r/ft0000001.a.result|20001211130756|05199|3d17aff15fa5a9f1 +serg@serg.mysql.com|mysql-test/r/ft0000001.b.result|20001211130756|10153|505c4c00a0bddfc4 +serg@serg.mysql.com|mysql-test/r/ft0000001.c.result|20001211130756|14950|1040289a75243a92 serg@serg.mysql.com|mysql-test/r/ft0000001.d.result|20001211130756|19773|7c549555fbc7663e serg@serg.mysql.com|mysql-test/r/ft0000001.e.result|20001212121413|40468|c58d30fd7fe86f4f -serg@serg.mysql.com|mysql-test/t/sel000015.test|20001211130731|27841|7442bf9cbc96fe07 -serg@serg.mysql.com|mysql-test/t/sel000024.test|20001211130731|07099|849f47e6cbdc4fe3 -tim@threads.polyesthetic.msg|bdb/build_win32/db_int.h|20010305004134|30736|9ee5645850a336a0 -tim@threads.polyesthetic.msg|bdb/build_win32/ex_btrec.dsp|20010305004135|08710|c87137287d8d67dc -tim@threads.polyesthetic.msg|bdb/build_win32/ex_env.dsp|20010305004135|09533|1732d5e41efda77 -tim@threads.polyesthetic.msg|bdb/build_win32/excxx_lock.dsp|20010305004135|14943|257abf03544f6270 -tim@threads.polyesthetic.msg|bdb/dist/template/rec_qam|20010305004137|28066|6eecf6833de0af98 -tim@threads.polyesthetic.msg|bdb/dist/template/rec_txn|20010305004137|29072|1ff22b797deb0e1b -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_rename.html|20010305004144|37128|36796ad9e106c3f0 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_h_hash.html|20010305004144|09702|73f14897664d9d08 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_q_extentsize.html|20010305004144|13496|f2fe41a5d8c46658 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_re_pad.html|20010305004144|16373|8a1de721eb6fc53f -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_sync.html|20010305004144|19394|7a067029b6e1496b -tim@threads.polyesthetic.msg|bdb/docs/api_c/dbt.html|20010305004144|04896|ae7a81c9c5f574f6 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_close.html|20010305004144|28399|a8e722cbb66c9d7b -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_conflicts.html|20010305004145|07137|58d9f7179bc864a3 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_server.html|20010305004145|31969|c13b793b525d504b -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_tmp_dir.html|20010305004145|34771|b563e87af5431824 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_verbose.html|20010305004145|38421|344f5119536cae0 -tim@threads.polyesthetic.msg|bdb/docs/api_c/log_file.html|20010305004145|48705|574444b46b801f9c -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_map.html|20010305004144|16369|d90bbc8462ef43a6 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_realloc.html|20010305004144|19375|e8e78e57c005c7c4 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/cxx_pindex.html|20010305004147|08181|9ff6b69b56f988dd -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_append_recno.html|20010305004146|08075|a158b1fdba756ce -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_errcall.html|20010305004146|10727|28a7a1fa2b3b73ee -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_h_nelem.html|20010305004146|19017|1829bc583d9c7554 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_re_delim.html|20010305004146|22753|81d9df93c3511df3 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_re_len.html|20010305004146|23672|e09bb30e40208dfb -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_remove.html|20010305004146|38809|5efece7ecdfc4df7 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_region_init.html|20010305004146|59589|2d70678382bbbf9a -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lsn_class.html|20010305004145|24210|34809f73e15540ad -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fclose.html|20010305004146|22608|cc4a5776ac69d660 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_abort.html|20010305004147|01091|81177bcb2e5f4502 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_checkpoint.html|20010305004147|02999|173930473e76d008 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_key_range.html|20010305004147|31461|8834de5873a6acb5 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_stat.html|20010305004147|57008|bc253f0883e9c82b -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbenv_class.html|20010305004147|12326|92c7a4a6c22090c7 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_errcall.html|20010305004147|07189|4e206d08cbb39ab7 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_detect.html|20010305004147|15549|9fc15a1a95b0dfa1 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_max_lockers.html|20010305004147|18755|7896265ea77829b3 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_rec_init.html|20010305004147|25237|1fdb2c5fc3b6407 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tx_recover.html|20010305004148|00983|40280da113fc9d2b -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tx_timestamp.html|20010305004148|02804|457eeb135f1f8bc0 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_strerror.html|20010305004148|04588|fceebaa94cf9aafd -tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_stat.html|20010305004148|10140|71b81d8567befc43 -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_flush.html|20010305004148|14794|1691d6a3c8cc284e -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fclose.html|20010305004148|20518|d08f0c134361f802 -tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_prepare.html|20010305004148|33784|510a245c80e715c -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_get.html|20010305004148|42753|127bd361ee695c71 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_is_byteswapped.html|20010305004148|45596|8fb9e2c58051c769 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_stat.html|20010305004148|51363|3bb57be2de907fd2 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/txn_commit.html|20010305004148|64051|25150b20b84cd519 -tim@threads.polyesthetic.msg|bdb/docs/images/api.gif|20010305004148|02578|dec2d4fe5f39dffe -tim@threads.polyesthetic.msg|bdb/docs/images/ref.gif|20010305004148|06650|add30c753dc1972d -tim@threads.polyesthetic.msg|bdb/docs/ref/am/open.html|20010305004148|23468|c9a7e23579a5e93a -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/bt_recnum.html|20010305004149|20770|f081f10254e86e75 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/h_hash.html|20010305004149|25978|3a0174586fbcfcdf -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/h_nelem.html|20010305004149|26871|979995db477052ad -tim@threads.polyesthetic.msg|bdb/docs/ref/arch/apis.html|20010305004149|36488|a84570e410b11a6a -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/intro.html|20010305004149|49652|f261022c26987d7f -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/osf1.html|20010305004149|53358|9d4ebabfe3af8970 -tim@threads.polyesthetic.msg|bdb/docs/ref/cam/intro.html|20010305004149|04558|4c497b1a18c4c7f5 -tim@threads.polyesthetic.msg|bdb/docs/ref/install/file.html|20010305004150|21159|d4ba2317db7c064b -tim@threads.polyesthetic.msg|bdb/docs/ref/install/magic.txt|20010305004150|21985|3894a46ea11ce25a -tim@threads.polyesthetic.msg|bdb/docs/ref/java/faq.html|20010305004150|27218|7ca2474ba1f6676f -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/cam_conv.html|20010305004150|31862|63844ff6fa95f0c -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/nondb.html|20010305004150|36156|863fe076a46378d7 -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/twopl.html|20010305004150|39650|b3f3aee667bc381d -tim@threads.polyesthetic.msg|bdb/docs/ref/log/limits.html|20010305004150|43198|26fac1e32387b7c9 -tim@threads.polyesthetic.msg|bdb/docs/ref/rpc/intro.html|20010305004150|13549|ad16bc20623e1192 -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/errors.html|20010305004150|19994|be11ff6410e1db2c -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/app.html|20010305004151|42111|6dc3c82982164fa8 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/intro.html|20010305004151|49773|22096cea9fe159ac -tim@threads.polyesthetic.msg|bdb/docs/ref/txn/other.html|20010305004151|63311|4991722636b3a46d -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/log_register.html|20010305004151|23513|399320e965adf598 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/txn_stat.html|20010305004151|33181|516f1870c6127351 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/value_set.html|20010305004151|34118|f0b0c770a81b90b6 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/set_paniccall.html|20010305004152|46636|8f9741244fb6e9f6 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/tmp.html|20010305004152|50733|ef3450f6fa89f2dc -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/txn_check.html|20010305004152|51549|2405b25bc92cc476 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/renumber.html|20010305004152|60219|d6cd798434da81aa -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/toc.html|20010305004152|61902|9c94c533ada43c1a -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade/process.html|20010305004151|64704|78f9ca966a587234 -tim@threads.polyesthetic.msg|bdb/include/db_auto.h|20010305004137|26350|994ddc84db334345 -tim@threads.polyesthetic.msg|bdb/include/hash_auto.h|20010305004138|09216|1b79cdd426d7ef25 -tim@threads.polyesthetic.msg|bdb/include/rpc_client_ext.h|20010305004138|28220|85436ca9b5691338 -tim@threads.polyesthetic.msg|bdb/rpc_client/db_server_clnt.c|20010305004141|41933|b548b860f765c597 -tim@threads.polyesthetic.msg|bdb/rpc_server/db_server_xdr.c|20010305004141|53794|336ef020b4a22c05 -tim@threads.polyesthetic.msg|bdb/txn/txn_auto.c|20010305004143|19863|6eb282f016f606d9 -BK|sql-bench/Results-win32/connect-mysql-win98|19700101030959|02535|2a11d5e3dfc0bc67 -BK|sql-bench/Results-win32/select-mysql-win98|19700101030959|02544|f370fac2d66a9faf -BK|sql-bench/Results/ATIS-mysql_3.21-Linux_2.0.35_i686|19700101030959|02036|c25425e045ca8dfc -BK|sql-bench/Results/alter-table-mysql_3.21-Linux_2.0.35_i686|19700101030959|02092|762639f2560976bd -BK|sql/Attic/mini_client.c|19700101030959|01910|9a3778c387d06a81 -BK|sql/Attic/mybinlogdump.cc|19700101030959|01908|5dbdd2bde98d6169 -BK|strings/Attic/ctype-croat.c|19700101030959|01341|d2d805ee6f10cbcc -BK|strings/Attic/ctype-hungarian.c|19700101030959|01350|5cf0bf7fa0312637 -BK|strings/Attic/ctype-latin1.c|19700101030959|01353|cc63880f19c2303e -BK|strings/Attic/ctype-latin2.c|19700101030959|01354|31895c4b83654342 -BK|strings/Attic/ctype-win1250.c|19700101030959|01357|1ce7a24255780a1 -BK|support-files/Attic/my-example.cnf.sh|19700101030959|02584|87a7e1f4d24b62a9 -BK|support-files/Attic/my-small.cfg.sh|19700101030959|02588|85023c559a1d96c -BK|vio/VioConnectorFd.cc|19700101030959|00007|ddbd7821c43c83a2 -BK|vio/VioSSLFactoriesFd.cc|19700101030959|00016|89f6bf5073937947 -Sinisa@sinisa.nasamreza.org|mysql-test/t/sel000004.test|20020522133624|23665|445526a8a20de101 -miguel@hegel.local|zlib/contrib/delphi2/readme.txt|20020319032515|03494|65d16837f8579e23 -miguel@hegel.local|zlib/contrib/iostream2/zstream.h|20020319032515|02537|351f26518ea48196 -miguel@hegel.local|zlib/infcodes.h|20020319032517|58960|3a02220a89c9a4fa -miguel@hegel.local|zlib/inflate.c|20020319032517|19311|fb22a3a1ab6fb1a0 -miguel@hegel.local|zlib/infutil.c|20020319032518|05244|a9b414f0f4ea0868 -miguel@hegel.local|zlib/nt/zlib.dnt|20020319032519|16279|22a0ed3b86ff8c2 -miguel@hegel.local|zlib/zlib.3|20020319032519|04298|ec5cb4f64476f6a -monty@donna.mysql.com|mysql-test/r/have_default_master.require|20010104005638|27332|1465255ffdaf82f -monty@hundin.mysql.fi|sql-bench/Results/ATIS-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|59551|d002b0bc548ff8b3 -monty@hundin.mysql.fi|sql-bench/Results/connect-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|08804|1b715c6fd72e913e -monty@hundin.mysql.fi|sql-bench/Results/create-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|49804|26e09af61f88d8c9 -monty@narttu.mysql.com|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|13605|ee94f987797ca948 -monty@narttu.mysql.com|sql-bench/Results/select-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|35818|34a39fbcb58d8945 -monty@narttu.mysql.com|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|37931|2db07249379f36 -monty@narttu.mysql.com|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|40155|8101a5823c17e58a -monty@narttu.mysql.fi|sql-bench/Results/RUN-mysql-Linux_2.2.13_SMP_alpha|20001014001004|13092|583091e05a25fb6 -monty@narttu.mysql.fi|sql-bench/Results/alter-table-mysql-Linux_2.2.13_SMP_alpha|20001014001004|15829|6c20c9ef46f82241 -monty@narttu.mysql.fi|sql-bench/Results/insert-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|07880|e1771e0a164bc310 -monty@narttu.mysql.fi|sql-bench/Results/wisconsin-mysql-Linux_2.2.13_SMP_alpha|20001014001004|32465|fc410754151d622c -mwagner@evoq.home.mwagner.org|Docs/Books/dbi.eps|20001231203219|30594|6ad58f9457e2a564 -mwagner@evoq.home.mwagner.org|Docs/Books/ecomm.eps|20001231203220|02445|58ae914b5d5ea49 -mwagner@evoq.home.mwagner.org|Docs/Books/msql.eps|20001231203220|12487|ffe7d62847663250 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000009.xml|20001017133629|19814|8677613dc624cb0c -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000029.xml|20001017133713|31058|3aba1eb23ef86c9e -sasha@mysql.sashanet.com|mysql-test/t/rpl000018-master.sh|20010127223331|13256|bc8072e13b26b005 -serg@serg.mysql.com|mysql-test/t/sel000007.test|20001211130730|24336|f431e4f4739a24c3 -serg@serg.mysql.com|mysql-test/t/sel000021.test|20001211130731|57561|94dd47de2872264a -tim@threads.polyesthetic.msg|bdb/build_vxworks/db_int.h|20010305004134|18702|40ba51edce41403f -tim@threads.polyesthetic.msg|bdb/build_win32/db_tcl.dsp|20010305004135|02285|5ad951d774e41520 -tim@threads.polyesthetic.msg|bdb/build_win32/ex_lock.dsp|20010305004135|10303|286d2566e786dde -tim@threads.polyesthetic.msg|bdb/build_win32/excxx_env.dsp|20010305004135|14159|b0bf2649a4c797ac -tim@threads.polyesthetic.msg|bdb/build_win32/excxx_mpool.dsp|20010305004135|15715|d17a5d09f09f5217 -tim@threads.polyesthetic.msg|bdb/build_win32/include.tcl|20010305004135|17284|f8bffb5e2510f229 -tim@threads.polyesthetic.msg|bdb/db/db_auto.c|20010305004136|32432|3186e950cc321ae7 -tim@threads.polyesthetic.msg|bdb/dist/build/chk.tags|20010305004137|19101|7a5b14d33d4078cc -tim@threads.polyesthetic.msg|bdb/dist/config.guess|20010305004136|14678|ead1d91caeaa748c -tim@threads.polyesthetic.msg|bdb/dist/template/rec_btree|20010305004137|23131|65d6b0b2f5b7a6d2 -tim@threads.polyesthetic.msg|bdb/dist/template/rec_db|20010305004137|25141|52c5797539878fca -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_append_recno.html|20010305004144|38070|bdf0130e642f74fa -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_bt_prefix.html|20010305004144|41420|d6e443a7e47c9b3a -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_errpfx.html|20010305004144|05859|756b9b73dd28b8d9 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_feedback.html|20010305004144|06786|90d495e78318a332 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_re_source.html|20010305004144|17353|6d12ac12652acc31 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_stat.html|20010305004144|18351|578f6f99f8e247ff -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_max.html|20010305004145|08849|a2dc11fa8b2f1c9 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_pageyield.html|20010305004145|28418|8aa4a6cb2f18cad7 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_rec_init.html|20010305004145|30192|bf7da051ef6689ba -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_tx_max.html|20010305004145|35672|71a739e46faf33a9 -tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_vec.html|20010305004145|45892|cc79e33b82b7a275 -tim@threads.polyesthetic.msg|bdb/docs/api_c/log_register.html|20010305004145|52499|5381c1fad82d6527 -tim@threads.polyesthetic.msg|bdb/docs/api_c/log_stat.html|20010305004145|53440|36b87b19ee2c5bba -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_close.html|20010305004144|08984|8981d16589844161 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_seek.html|20010305004144|21048|fdf1b31d3f6c7473 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_unlink.html|20010305004144|22800|c42b13fd26f2e90 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_cursor.html|20010305004145|29241|4f0225f98f4a11c -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_del.html|20010305004145|31220|43fa05f2dfa86dbc -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_join.html|20010305004146|02717|9c4819679501ad6e -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_remove.html|20010305004146|06326|8c537fc5e326293b -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_h_ffactor.html|20010305004146|17155|a67084c644c38114 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_re_pad.html|20010305004146|24627|f2e0c2c2c3806a97 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_stat.html|20010305004146|26537|3473827de856d680 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_verify.html|20010305004146|29479|14db455da528229d -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_class.html|20010305004145|15353|2a31b398c37d674b -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_get.html|20010305004146|34739|36e2dbe65e3442e3 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_rec_init.html|20010305004146|58586|77916e00d1361c7b -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_server.html|20010305004146|60631|bb74806839e8eb58 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tx_max.html|20010305004146|01212|910d1c17dd000729 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/get_errno.html|20010305004145|22249|e1a57c1c5f1d2695 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_compare.html|20010305004146|13902|3225b4c32016c9b1 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_get.html|20010305004146|17104|aee6162219c71617 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_trickle.html|20010305004146|34409|c9df8540b9ebc898 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_begin.html|20010305004147|02053|3a2d1488ec9d8655 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_class.html|20010305004145|26179|5e57abe095aceca9 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_class.html|20010305004147|09609|b957a4d2b77acb1e -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_append_recno.html|20010305004147|36282|d28bf857803b93a2 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_re_len.html|20010305004147|53997|8448826ea78c630e -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_open.html|20010305004147|02873|2df0f0ef544da715 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_data_dir.html|20010305004147|06162|b7b3f35e96804650 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lg_dir.html|20010305004147|12366|484cad2123994e14 -tim@threads.polyesthetic.msg|bdb/docs/api_java/lsn_class.html|20010305004147|20619|b1458208b6c81016 -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fput.html|20010305004148|23268|6ba75e517a259703 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_del.html|20010305004148|41829|400c7a72fb10d6f4 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_get_join.html|20010305004148|43762|1c737805c2c49cf9 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/count.html|20010305004148|11236|8fd8daf2e2cbd7c7 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/curclose.html|20010305004148|12231|8b6b8442fc8382f7 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/curput.html|20010305004148|16324|c7e4fa0a68170c3d -tim@threads.polyesthetic.msg|bdb/docs/ref/am/cursor.html|20010305004148|17350|6dbcdb3b7d552f58 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/sync.html|20010305004148|33751|381722c07c9d8825 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/byteorder.html|20010305004149|21617|999a22f727e2dae0 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/dup.html|20010305004149|23371|523731632fca7343 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/extentsize.html|20010305004149|24263|fdcfb5572974545c -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/malloc.html|20010305004149|29537|cb0e6d7e9448d93e -tim@threads.polyesthetic.msg|bdb/docs/ref/arch/bigpic.html|20010305004149|37519|ab5254bc99af0d5c -tim@threads.polyesthetic.msg|bdb/docs/ref/arch/script.html|20010305004149|39400|6796fd0a63161a0c -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/flags.html|20010305004149|46003|a739404f90eb8c3d -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/install.html|20010305004149|48752|660222dd1feffc4 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/irix.html|20010305004149|50564|95833aedc3a82f0 -tim@threads.polyesthetic.msg|bdb/docs/ref/debug/printlog.html|20010305004149|09591|9fa9894f839fad95 -tim@threads.polyesthetic.msg|bdb/docs/ref/debug/runtime.html|20010305004149|10629|d50f2fea4a8e58c -tim@threads.polyesthetic.msg|bdb/docs/ref/dumpload/format.html|20010305004149|13995|9fa10ca3c7ae6751 -tim@threads.polyesthetic.msg|bdb/docs/ref/env/intro.html|20010305004149|19435|96dd1090729e06b -tim@threads.polyesthetic.msg|bdb/docs/ref/env/remote.html|20010305004149|23518|52a3a79fdff8f7bd -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/dbisnot.html|20010305004149|29466|5ce7aed7ce41c9e6 -tim@threads.polyesthetic.msg|bdb/docs/ref/java/conf.html|20010305004150|26401|ef560bcf13a71cd5 -tim@threads.polyesthetic.msg|bdb/docs/ref/log/config.html|20010305004150|41449|aedc53caf49c51c9 -tim@threads.polyesthetic.msg|bdb/docs/ref/program/scope.html|20010305004150|59326|2987f97781410bc1 -tim@threads.polyesthetic.msg|bdb/docs/ref/refs/embedded.html|20010305004150|03865|d25b9719d24df88c -tim@threads.polyesthetic.msg|bdb/docs/ref/refs/witold.html|20010305004150|65330|ad6c866cf48734b5 -tim@threads.polyesthetic.msg|bdb/docs/ref/sendmail/intro.html|20010305004150|16532|ecac45d7e2bcf51c -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/close.html|20010305004150|18046|1fe3a82f28e7ed32 -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/keydata.html|20010305004150|23810|530b1581aeba63ca -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/put.html|20010305004150|25774|bdd2629c212af471 -tim@threads.polyesthetic.msg|bdb/docs/ref/toc.html|20010305004148|08788|ab1fa294d5ef4b69 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/reclimit.html|20010305004151|53098|5f54174bf6026bd5 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/recovery.html|20010305004151|53956|6e3a0c07b997c3b2 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/throughput.html|20010305004151|55655|8a7d5a958df7f91a -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/intro.html|20010305004151|02261|8bfd3804a2da1598 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/dbenv_cxx.html|20010305004151|09872|7f4fd0ebace36d8e -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/disk.html|20010305004151|11685|eb79d1157ef44d3c -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/java.html|20010305004151|17120|300acccbb633e335 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/jump_set.html|20010305004151|18936|718c098a91db9dba -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/lock_notheld.html|20010305004151|20761|ed6853b6daa5531b -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/open.html|20010305004151|27357|8b1e2a969e97069a -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/intro.html|20010305004152|41719|64592a50b1c634d6 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/set_tx_recover.html|20010305004152|47442|ada65907ba98eee8 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/toc.html|20010305004152|49908|af1a24798980ad1 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/incomplete.html|20010305004152|56914|af86a649a878a124 -tim@threads.polyesthetic.msg|bdb/hash/hash_auto.c|20010305004137|61459|d17c6a6ed4f181d1 -tim@threads.polyesthetic.msg|bdb/include/clib_ext.h|20010305004137|19207|ed9d9f7965f0e1d3 -tim@threads.polyesthetic.msg|bdb/rpc_server/gen_db_server.c|20010305004141|54931|d5602f9bd5c930e -BK|Docs/Flags/island.gif|19700101030959|00142|e274d5e96ee0975a -BK|Docs/Flags/south-africa1.txt|19700101030959|00232|87a53fdcd2149c6e -BK|client/Attic/net.c|19700101030959|00583|c18042da6fa4e693 -BK|extra/Attic/print_defaults.c|19700101030959|01513|362952979aa7b330 -BK|sql-bench/Results-win32/RUN-mysql-win98|19700101030959|02526|7f09e396772a8665 -BK|sql-bench/Results-win32/insert-mysql-win98|19700101030959|02541|6d6cafc85a6c837 -BK|sql-bench/Results/RUN-mysql-3.21-Linux_2.2.1_i686|19700101030959|02050|f6fdd64859e11de9 -BK|sql-bench/Results/big-tables-mysql_3.21-Linux_2.0.35_i686|19700101030959|02120|190e827e569c99a4 -BK|sql-bench/Results/create-mysql-3.21-Linux_2.2.1_i686|19700101030959|02158|51581b24f45e0f5c -Sinisa@sinisa.nasamreza.org|mysql-test/r/sel000004.result|20020522121240|20995|360af2095c88cb8c -arjen@co3064164-a.bitbike.com|Docs/section.Comparisons.texi|20011108043647|22614|692b647b -ccarkner@nslinuxw10.bedford.progress.com|mysql-test/t/isolation.test|20010327145543|39049|6a39e4138dd4a456 -miguel@hegel.local|zlib/algorithm.txt|20020319032513|12903|fbc4dda3d31c2005 -miguel@hegel.local|zlib/contrib/README.contrib|20020319032514|04353|24cb75bee0a061fb -miguel@hegel.local|zlib/contrib/asm386/zlibvc.def|20020319032514|31637|605ee23b8a4a6a1a -miguel@hegel.local|zlib/contrib/delphi2/zlib.bpg|20020319032515|09768|93c030edcca1838 -miguel@hegel.local|zlib/contrib/delphi2/zlib.bpr|20020319032515|16113|7a2fa98af2345144 -miguel@hegel.local|zlib/contrib/minizip/unzip.h|20020319032516|21001|bac981086af91a30 -miguel@hegel.local|zlib/contrib/minizip/zip.c|20020319032516|27911|e82bf7774e1ece95 -miguel@hegel.local|zlib/zutil.h|20020319032520|12556|1e431b0173278fb2 -monty@donna.mysql.com|innobase/ib_config.h.in|20010217121901|07616|9e57db8504e55b7 -monty@donna.mysql.com|innobase/ib_config.h|20010217121901|04019|7539e26ffc614439 -monty@narttu.mysql.com|sql-bench/Results/insert-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|27509|d12a7edef05d7185 -mwagner@evoq.home.mwagner.org|Docs/Books/manual.eps|20001231203220|09365|2a7145f88960c7ec -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000025.xml|20001017133713|24071|3e766aa1e43b303 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000030.xml|20001017133600|63205|c2b25781eefaee9 -serg@serg.mysql.com|mysql-test/t/sel000006.test|20001211130730|19922|291cc6c8d85e51df -serg@serg.mysql.com|mysql-test/t/sel000016.test|20001211130731|32739|f495235f14c47ec -tim@threads.polyesthetic.msg|bdb/build_win32/db_stat.dsp|20010305004135|00560|f77417f5d9984986 -tim@threads.polyesthetic.msg|bdb/dist/config.sub|20010305004136|16944|17e9990a298261a -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_remove.html|20010305004144|36184|668fa1d67a4f6941 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_malloc.html|20010305004144|01594|3581879fef5af695 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_flags.html|20010305004145|03778|b2a1f3c8498e6d95 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_detect.html|20010305004145|07983|d9ed73495defdc19 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_max_lockers.html|20010305004145|24923|f22d5d4640436efe -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_max_locks.html|20010305004145|09704|1baf2d63a6fb418d -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_tas_spins.html|20010305004145|33848|91c7091deca3d97f -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fclose.html|20010305004145|55335|b52c7d599d83c26 -tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_abort.html|20010305004145|65162|a53425dd70214619 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/cxx_index.html|20010305004145|07331|a0bc165de8a0554c -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_feedback.html|20010305004146|15263|a08620d86f05ec8c -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_malloc.html|20010305004145|12423|b0aa5802da5bef4d -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_dup.html|20010305004146|33708|75df863b4bc13aaa -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_close.html|20010305004146|36778|5cc705b97b86972c -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_cachesize.html|20010305004146|39807|b82ed49a47415fec -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_detect.html|20010305004146|49591|13e53300b722cf1e -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_panicstate.html|20010305004146|57577|ad2d38e398cafd31 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_get.html|20010305004146|61648|527d63a8526f336c -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_put.html|20010305004146|18207|66077da9630fa8c2 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_sync.html|20010305004146|33235|253961279934d3c8 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_h_hash.html|20010305004147|48174|c6eb825c706a9548 -tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_detect.html|20010305004148|06490|14d4e7c7dca0dad7 -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fsync.html|20010305004148|25118|e767b233fe7730a2 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_put.html|20010305004148|57122|290ecb1275d4270 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/env_open.html|20010305004148|59088|39b63925d45a637e -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/tcl_pindex.html|20010305004148|00553|259f0e062eee63c7 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/ops.html|20010305004148|25566|9b24db9ba4f45724 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/bt_compare.html|20010305004149|18156|c1e847e651704c89 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/bt_minkey.html|20010305004149|19013|b4708e561be92b83 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/intro.html|20010305004149|27745|dd1647202258ee28 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/recno.html|20010305004149|32283|c2ae722138309e95 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/select.html|20010305004149|34120|57b1c99f6a8ea93f -tim@threads.polyesthetic.msg|bdb/docs/ref/distrib/layout.html|20010305004149|12589|5aeb292fbd987cf8 -tim@threads.polyesthetic.msg|bdb/docs/ref/env/error.html|20010305004149|18447|acbbdb848c9fe70f -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/terrain.html|20010305004149|33850|b396d6447a59435f -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/intro.html|20010305004150|34434|e1e07e71f3198be -tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/program.html|20010305004151|23138|2f5bf497ae226ed5 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/archival.html|20010305004151|42978|7631314d840be181 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/logfile.html|20010305004151|50590|1c3002fcb6581e8c -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/read.html|20010305004151|52265|fc8b056380e09887 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/func.html|20010305004151|15332|c06e5bc63ddf7a64 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/logalloc.html|20010305004152|43372|30563c544b8ddd54 -tim@threads.polyesthetic.msg|bdb/docs/sleepycat/contact.html|20010305004152|04402|55b4da3d7bf7655b -tim@threads.polyesthetic.msg|bdb/docs/utility/db_archive.html|20010305004152|07446|ab2c66e01b3e3626 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_recover.html|20010305004152|12771|1b63f2acdc0b0af7 -tim@threads.polyesthetic.msg|bdb/include/env_ext.h|20010305004138|05832|33a5fdef1aeecefd -tim@threads.polyesthetic.msg|bdb/include/txn_ext.h|20010305004138|34549|9db24c14f204890c -BK|Docs/Flags/kroatia.eps|19700101030959|00185|f50fcd444e7efceb -BK|Docs/Flags/south-africa1.gif|19700101030959|00154|1ea38de5a535f732 -BK|sql-bench/Results/insert-mysql_3.21-Linux_2.0.35_i686|19700101030959|02252|60c0965dff31db07 -BK|sql-bench/Results/select-mysql_3.21-Linux_2.0.35_i686|19700101030959|02278|5fadbac5f98696a -BK|sql/share/danish/errmsg.sys|19700101030959|01831|3a6d0fb8451a3313 -BK|sql/share/dutch/errmsg.sys|19700101030959|01833|b5aff4d08478bafd -BK|sql/share/italian/errmsg.sys|19700101030959|01846|c5108ecb850b79a -BK|sql/share/portuguese/errmsg.sys|19700101030959|01859|c0187322f8c9d805 -BK|vio/VioAcceptorFd.cc|19700101030959|00005|a5a08947a31f88de -BK|vio/vio-global.h|19700101030959|00021|c261412c01b2f4 -miguel@hegel.local|zlib/ChangeLog|20020319032513|28917|5d5425fc84737083 -miguel@hegel.local|zlib/compress.c|20020319032513|32512|70bccb304651dba9 -miguel@hegel.local|zlib/contrib/asm386/mkgvmt32.bat|20020319032514|25425|422cbe16a6e74695 -miguel@hegel.local|zlib/contrib/delphi2/zlib32.bpr|20020319032515|35585|41ac53acb8008ff7 -miguel@hegel.local|zlib/contrib/delphi2/zlib32.cpp|20020319032515|41979|3b0f51435e880afe -miguel@hegel.local|zlib/contrib/minizip/ChangeLogUnzip|20020319032515|15183|50464416f4a3768f -miguel@hegel.local|zlib/index|20020319032517|33542|5443c9f841db4a47 -miguel@hegel.local|zlib/infblock.c|20020319032517|39853|540cc1b743be5f58 -mikef@nslinux.bedford.progress.com|mysql-test/r/have_gemini.require|20010321203410|47052|206702c48b2e206b -monty@donna.mysql.com|sql-bench/Results/ATIS-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|14134|cf0d806760eefef2 -monty@donna.mysql.com|sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|18309|c87333d6fe04433e -monty@donna.mysql.com|sql-bench/Results/connect-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|19522|ab58fffa30dce97e -monty@donna.mysql.com|sql-bench/Results/insert-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|22042|27b7a557c3cb07a -monty@donna.mysql.com|sql-bench/Results/wisconsin-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|24748|6a468dcd3e6f5405 -monty@hundin.mysql.fi|sql-bench/Results/RUN-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|35759|11038a44f73070e7 -monty@hundin.mysql.fi|sql-bench/Results/big-tables-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|05113|b6be70bb51013cad -monty@hundin.mysql.fi|sql-bench/Results/select-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|19688|4ffc9cf4be665ea2 -monty@hundin.mysql.fi|sql-bench/Results/wisconsin-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|60398|8ba598d217450157 -monty@hundin.mysql.fi|support-files/make_mysql_pkg.sh|20010915122456|03682|c616a18bed4b9c2 -monty@narttu.mysql.com|sql-bench/Results/ATIS-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|04677|f761da5546f0d362 -monty@narttu.mysql.com|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171904|13285|a88e954bc8de5460 -monty@narttu.mysql.com|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|17580|28b688e2cd4b6bb3 -monty@narttu.mysql.fi|sql-bench/Results/connect-mysql-Linux_2.2.13_SMP_alpha|20001014001004|21372|84df7c6446e51e26 -monty@narttu.mysql.fi|sql-bench/Results/connect-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|00237|45d2cdf9bea9cc37 -monty@narttu.mysql.fi|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|15116|b7552710d35202b6 -mwagner@evoq.home.mwagner.org|Docs/Books/sql-99.eps|20001231203220|25230|cec4ae16fee4c640 -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.tst|20001013104933|54568|2e626fa07144d2c8 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000002.xml|20001013074610|25702|8cd06da5293a7147 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000008.xml|20001017133627|18273|1d6082f0905c51b6 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000018.xml|20001017133713|10435|82e2e7bde83f56d8 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000022.xml|20001017133713|17202|da2083ef423ae39a -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000027.xml|20001017133713|27519|95e7de3e9934b570 -sasha@mysql.sashanet.com|mysql-test/r/mrg000002.result|20001212152450|11492|745be0854aaaaf5e -sasha@mysql.sashanet.com|mysql-test/t/fulltext_join.test|20010730234357|20865|e347c8f04405c916 +serg@serg.mysql.com|mysql-test/r/ft0000002.a.result|20001212120058|27306|a89b4db1db19f944 serg@serg.mysql.com|mysql-test/r/ft0000002.b.result|20001212120058|34425|5de41ce15ae1cedb +serg@serg.mysql.com|mysql-test/r/ft0000002.c.result|20001212120059|07173|cd66b90918a87531 +serg@serg.mysql.com|mysql-test/t/3.23/mrg000001.test|20001206231615|27540|e0327f9d1e6cb4e +serg@serg.mysql.com|mysql-test/t/sel000006.test|20001211130730|19922|291cc6c8d85e51df +serg@serg.mysql.com|mysql-test/t/sel000007.test|20001211130730|24336|f431e4f4739a24c3 +serg@serg.mysql.com|mysql-test/t/sel000008.test|20001211130730|28581|b338ef585cadf7ae +serg@serg.mysql.com|mysql-test/t/sel000009.test|20001211130730|33139|a455c38f5c942cd1 +serg@serg.mysql.com|mysql-test/t/sel000010.test|20001211130731|03554|ca07085ae92255f1 +serg@serg.mysql.com|mysql-test/t/sel000011.test|20001211130731|08373|c2a971726c9d18d6 +serg@serg.mysql.com|mysql-test/t/sel000012.test|20001211130731|13215|ae64bff363c42e92 +serg@serg.mysql.com|mysql-test/t/sel000013.test|20001211130731|18090|ce8aa504ba4f74ba +serg@serg.mysql.com|mysql-test/t/sel000014.test|20001211130731|22977|74cb8c70f1d73fcc +serg@serg.mysql.com|mysql-test/t/sel000015.test|20001211130731|27841|7442bf9cbc96fe07 +serg@serg.mysql.com|mysql-test/t/sel000016.test|20001211130731|32739|f495235f14c47ec serg@serg.mysql.com|mysql-test/t/sel000017.test|20001211130731|37659|7c39f2b45a6aa780 serg@serg.mysql.com|mysql-test/t/sel000018.test|20001211130731|42584|16207f3ad74de75e -serg@serg.mysql.com|mysql-test/t/sel000022.test|20001211130731|62553|6e3e5435e66875e9 -serg@serg.mysql.com|mysql-test/t/sel000023.test|20001211130731|02042|7bdfcfaa278f837d -serg@serg.mysql.com|mysql-test/t/sel000025.test|20001211130731|12136|65b32b4b67e4c77 -tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.eps|20020228162345|64529|31ade79a89683616 -tim@cane.mysql.fi|mysql-test/r/delete.result|20001221095802|20463|e866a6678e29f186 -tim@threads.polyesthetic.msg|bdb/build_win32/db_deadlock.dsp|20010305004134|28374|befd45d29eaeb672 -tim@threads.polyesthetic.msg|bdb/build_win32/db_dump.dsp|20010305004134|29985|e07d2a82708b61 -tim@threads.polyesthetic.msg|bdb/build_win32/db_recover.dsp|20010305004134|34274|835c32ab73359256 -tim@threads.polyesthetic.msg|bdb/build_win32/db_static.dsp|20010305004135|01425|78ea414467defc70 -tim@threads.polyesthetic.msg|bdb/build_win32/ex_access.dsp|20010305004135|07926|8dd6017efffae14e -tim@threads.polyesthetic.msg|bdb/build_win32/ex_mpool.dsp|20010305004135|11076|9eb937bc70c1573 -tim@threads.polyesthetic.msg|bdb/build_win32/excxx_access.dsp|20010305004135|12614|31e87b6228470681 -tim@threads.polyesthetic.msg|bdb/dist/build/chk.def|20010305004137|13920|bb65b471d09f7c58 -tim@threads.polyesthetic.msg|bdb/dist/build/chk.srcfiles|20010305004137|18056|ae884700cd110cbf -tim@threads.polyesthetic.msg|bdb/dist/template/rec_crdel|20010305004137|24191|58795c0c5232f80d -tim@threads.polyesthetic.msg|bdb/docs/api_c/c_index.html|20010305004143|28133|1a854fa55012906 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_del.html|20010305004144|11427|e8bffcf9be371317 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_get.html|20010305004144|29265|7e0018b93ee31eba -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_get_type.html|20010305004144|31538|d66aa1642a4d20e2 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_open.html|20010305004144|34314|59dfa6e5198c382e -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_realloc.html|20010305004144|03204|a9be244baf966892 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_verify.html|20010305004144|21372|cf80f5ba845eac2e -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_remove.html|20010305004144|31547|a71d5e1ca41324a7 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_cachesize.html|20010305004144|32567|f4c341d3f2c09469 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_errcall.html|20010305004145|00341|ba09eec1ba15f15f -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_max_objects.html|20010305004145|25791|1a428bbee06cb5cc -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_mp_mmapsize.html|20010305004145|26668|21f27997f00accfe -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_mutexlocks.html|20010305004145|27540|85bbd53b877cafe1 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_paniccall.html|20010305004144|07360|97a1d58189199453 -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fget.html|20010305004145|56294|460714b5c2e3e1c5 -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_register.html|20010305004145|61165|8b9dff9b5043da58 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_malloc.html|20010305004144|15535|5579a0604e14e1e7 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_rename.html|20010305004144|20199|3f8c7b6674cda105 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_write.html|20010305004144|24518|63567be42d586fde -tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_commit.html|20010305004145|02592|8950b5e11c8b0778 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_errpfx.html|20010305004146|14381|1f26e7b0bb5a067f -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_sync.html|20010305004146|27538|dadf1f745e44faa7 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_errpfx.html|20010305004146|42728|d26da4bab9538234 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lg_dir.html|20010305004146|46674|c08aac264e7faa97 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_pageyield.html|20010305004146|56583|db4e5bdf71e171c0 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_version.html|20010305004146|06444|1cff25c44cbea934 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/pindex.src|20010305004145|09392|d65361c4acfcef06 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_commit.html|20010305004147|03924|65afb8caf9c470ae -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/what.html|20010305004145|27185|a64f42c697273c44 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_close.html|20010305004147|24101|21595167f4fdbe88 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_del.html|20010305004147|25922|f4f15b362b114506 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_remove.html|20010305004147|34343|49d3b8c7e5a5b000 -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_class.html|20010305004147|11473|8ee03c40ae0dbcb8 -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_put.html|20010305004147|00700|da0f0fa974385abd -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_shm_key.html|20010305004147|28699|8c576698882f0edc -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tas_spins.html|20010305004147|30425|2f9963827fbcb3f -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_archive.html|20010305004148|11996|b4a9483dbb5a2b58 -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_compare.html|20010305004148|12947|756622b42572ecb -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_put.html|20010305004148|16729|ad7e9f382abde491 -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_stat.html|20010305004148|18608|d186a08662046aba -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_join.html|20010305004148|46525|cb3eb61ed17a1f8 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/env_remove.html|20010305004148|60117|9090900413ff0280 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/pindex.src|20010305004148|39123|f8754fff24f2cb24 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/error.html|20010305004148|19390|45ac854e68196844 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/verify.html|20010305004149|01382|badaeba91bda50e1 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/bt_prefix.html|20010305004149|19903|4e7602aa68d50fe1 -tim@threads.polyesthetic.msg|bdb/docs/ref/arch/utilities.html|20010305004149|40326|54d7014fab332c7a -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/sco.html|20010305004149|55174|e25f6271a1b753d0 -tim@threads.polyesthetic.msg|bdb/docs/ref/dumpload/utility.html|20010305004149|15969|8fc100fdb58adb3c -tim@threads.polyesthetic.msg|bdb/docs/ref/env/create.html|20010305004149|17402|9f454cb1910df0b8 -tim@threads.polyesthetic.msg|bdb/docs/ref/env/naming.html|20010305004149|20447|1f041789686cc8a0 -tim@threads.polyesthetic.msg|bdb/docs/ref/install/magic.s5.le.txt|20010305004150|23615|528ef76418c8b45c -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/data.html|20010305004149|26092|33fbf7496c58cf63 -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/distrib.html|20010305004149|30742|84b56709310017f2 -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/products.html|20010305004149|32785|f37221772a3b589d -tim@threads.polyesthetic.msg|bdb/docs/ref/java/compat.html|20010305004150|25581|b39d173789bbf70d -tim@threads.polyesthetic.msg|bdb/docs/ref/program/dbsizes.html|20010305004150|52571|d70da530573b9b38 -tim@threads.polyesthetic.msg|bdb/docs/ref/program/errorret.html|20010305004150|55412|23491397d7e704e9 -tim@threads.polyesthetic.msg|bdb/docs/ref/program/recimp.html|20010305004150|60288|bbdb0feb7d467a80 -tim@threads.polyesthetic.msg|bdb/docs/ref/program/version.html|20010305004150|62172|d266e819d1531df8 -tim@threads.polyesthetic.msg|bdb/docs/ref/refs/hash_usenix.ps|20010305004150|05408|11cad226b0aa012b -tim@threads.polyesthetic.msg|bdb/docs/ref/refs/refs.html|20010305004150|64422|30490b237ba9b61 -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/handles.html|20010305004150|21935|18a14f4a50e7bad0 -tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/using.html|20010305004151|23908|28856d8c72d0660b -tim@threads.polyesthetic.msg|bdb/docs/ref/test/run.html|20010305004151|39305|63c0398e7e2a29e2 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/toc.html|20010305004151|04069|670791f294a61494 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/db.html|20010305004151|07207|e7d63f4bb8e989e8 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/log_stat.html|20010305004151|24428|20b5898ba061557d -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/memp_stat.html|20010305004151|25363|79e1141c63f7357 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/xa.html|20010305004152|00602|1af042e462ab829 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/config.html|20010305004152|38401|d2ace28f39ab0f8d -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/sysmem.html|20010305004152|48282|3d088eb0ef1b27e0 -tim@threads.polyesthetic.msg|bdb/docs/sleepycat/legal.html|20010305004152|02616|7388af4c578cacf6 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_checkpoint.html|20010305004152|08309|c040e4424edcc451 -tim@threads.polyesthetic.msg|bdb/include/common_ext.h|20010305004137|20146|35c8aab64ee3b8fd -tim@threads.polyesthetic.msg|bdb/include/log_auto.h|20010305004138|13513|8d52dd0884d03051 -tim@threads.polyesthetic.msg|bdb/include/os_ext.h|20010305004138|20730|a1771032b4d2d53b -tim@threads.polyesthetic.msg|bdb/include/rpc_server_ext.h|20010305004138|29091|952741fb85de2b80 -tonu@x3.internalnet|include/vio.h|20010520213124|42404|c62fd2b86c03da7d -BK|Docs/Flags/kroatia.gif|19700101030959|00146|bea7bbe0316d462d -BK|Docs/Flags/kroatia.txt|19700101030959|00224|dde7f89f25d616b2 -BK|mit-pthreads/pgcc|19700101030959|00596|154a03d0c1a0a600 -BK|sql-bench/Results-win32/ATIS-mysql-win98|19700101030959|02523|cd0705815d3af451 -BK|sql-bench/Results-win32/big-tables-mysql-win98|19700101030959|02532|99a1882effebbdf2 -BK|sql-bench/Results/ATIS-mysql-3.21-Linux_2.2.1_i686|19700101030959|02022|660fb76ed6ccfb6f -BK|sql-bench/Results/RUN-mysql_3.21-Linux_2.0.35_i686|19700101030959|02064|ea8672d8473435 -BK|sql-bench/Results/big-tables-mysql-3.21-Linux_2.2.1_i686|19700101030959|02106|baa649caba113497 -BK|sql-bench/Results/select-mysql-3.21-Linux_2.2.1_i686|19700101030959|02265|ed3687e713ff0571 -BK|sql/Attic/lex_hash.h|19700101030959|01912|14f912771118b50c -BK|sql/share/czech/errmsg.sys|19700101030959|01828|93104a2bd5c732a -BK|sql/share/greek/errmsg.sys|19700101030959|01842|fedf585fa73e7cf1 -BK|sql/share/slovak/errmsg.sys|19700101030959|01862|148510616ae825cf -BK|sql/violite.c|19700101030959|01738|d7b85be615595ace -BK|strings/Attic/ctype-cp1251.c|19700101030959|01339|cdf74b9168408b3 -BK|strings/Attic/ctype-dec8.c|19700101030959|01343|68f257dd2202d0c7 -BK|vio/VioConnectorFd.h|19700101030959|00008|58bc11cdc885b951 -BK|vio/VioPipe.cc|19700101030959|00011|12cf83b9a2f48f6c -BK|vio/VioSSLAcceptorFd.cc|19700101030959|00015|4c828f3688ed74ec -BK|vio/version.cc|19700101030959|00020|7237acf12bed4a97 -arjen@fred.bitbike.com|scripts/mysql_fix_extensions.sh|20020516001337|12363|f1048a78f4759b4d -miguel@hegel.local|zlib/contrib/asm386/zlibvc.dsw|20020319032514|44870|3209982720f131ab -miguel@hegel.local|zlib/contrib/asm686/match.s|20020319032514|64199|4164951e8e19f116 -miguel@hegel.local|zlib/contrib/iostream/zfstream.h|20020319032515|61553|2b4d88acc2d3b714 -miguel@hegel.local|zlib/contrib/minizip/zip.def|20020319032516|34413|e9bda2081d65c22e -miguel@hegel.local|zlib/contrib/minizip/zlibvc.def|20020319032516|47259|6dc42f99d2d55cad -miguel@hegel.local|zlib/contrib/untgz/untgz.c|20020319032516|07726|b74e9dde74642756 -miguel@hegel.local|zlib/contrib/visual-basic.txt|20020319032516|14096|cd461e762199bb09 -miguel@hegel.local|zlib/deflate.h|20020319032516|33700|3a012bc1f5dfbc74 -miguel@hegel.local|zlib/inftrees.c|20020319032517|25758|4fcb97357cdbc40 -miguel@hegel.local|zlib/trees.h|20020319032519|50674|87161133bc2155fd -monty@hundin.mysql.fi|sql-bench/Results/alter-table-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|01419|14360865bbba479f -monty@narttu.mysql.com|sql-bench/Results/create-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|23516|441a6aefd381e319 -monty@narttu.mysql.fi|sql-bench/Results/RUN-mysql-Linux_2.2.14_my_SMP_i686|20001218015322|21374|d4766c7f8e70d7a2 -monty@narttu.mysql.fi|sql-bench/Results/alter-table-mysql-Linux_2.2.14_my_SMP_i686|20001218015322|25875|155a83b53c0e9d6 -monty@narttu.mysql.fi|sql-bench/Results/insert-mysql-Linux_2.2.13_SMP_alpha|20001014001004|26814|688809eb8ea77b3d -monty@narttu.mysql.fi|sql-bench/Results/select-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|11605|ee2a063d66a183d -monty@work.mysql.com|fs/fsck.mysql|20010411110350|07619|87170d4358b50d60 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000001.xml|20001013051507|22498|f0eb64c0346366db -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000004.xml|20001017133600|56955|515488ef221523d9 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000005.xml|20001017133618|09973|a6344e46ba572dc3 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000014.xml|20001017133713|05036|bcf55df6a036bd8f -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000019.xml|20001017133713|12133|c0f0b05e481b90e7 -mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/README|20001013051514|26509|cd4bb681e5a0cd10 -sasha@mysql.sashanet.com|mysql-test/std_data/m.frm|20001212152450|13897|e351dfe0b6824c0c -sasha@mysql.sashanet.com|mysql-test/t/3.23/shw000001.test|20001121234128|21322|770d96a2c1c65b20 -sasha@mysql.sashanet.com|mysql-test/t/mrg000002.test|20001212152450|20137|16b3a176adc0f311 -serg@serg.mysql.com|mysql-test/r/ft0000002.c.result|20001212120059|07173|cd66b90918a87531 -serg@serg.mysql.com|mysql-test/t/sel000026.test|20001211130731|17211|d8aa2d614f23b1 -serg@serg.mysql.com|mysql-test/t/sel000029.test|20001211130731|32917|6aae34dbb3ee86d9 -tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.gif|20020228162348|36945|364ca7338682f71 -tim@threads.polyesthetic.msg|bdb/build_win32/db_archive.dsp|20010305004134|25535|e3da826e91bb086 -tim@threads.polyesthetic.msg|bdb/build_win32/db_printlog.dsp|20010305004134|32975|163f6e1073a5f396 -tim@threads.polyesthetic.msg|bdb/build_win32/db_verify.dsp|20010305004135|04464|e9a4938542f86cea -tim@threads.polyesthetic.msg|bdb/build_win32/ex_tpcb.dsp|20010305004135|11838|644b38dae8b38152 -tim@threads.polyesthetic.msg|bdb/build_win32/libdb.rc|20010305004135|20964|906f4936ec6a8398 -tim@threads.polyesthetic.msg|bdb/dist/template/db_server_proc|20010305004137|21042|2e8b49d42aefab55 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_err.html|20010305004143|33003|3696088bd85eeda3 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_get_byteswapped.html|20010305004144|30478|bcab4145183a7be2 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_put.html|20010305004144|35267|ea78709ffb6cd7e8 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_cachesize.html|20010305004144|02131|47a3c8ca486eb013 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_errcall.html|20010305004144|04030|faf92be4ee8bc634 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_flags.html|20010305004144|07758|4cd3700ae4387d22 -tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_close.html|20010305004144|22419|a3ad4ea563bafc42 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_create.html|20010305004144|05736|3e73dd35fe5dcc8 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_data_dir.html|20010305004144|33569|437cec65e441c60 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lg_bsize.html|20010305004145|04625|1eb03c137a42e80f -tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_get.html|20010305004145|42084|63399d204f1885fa -tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_put.html|20010305004145|44022|f5bc2f52e55f16e1 -tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_stat.html|20010305004145|44954|d9a98bb949070b -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fput.html|20010305004145|58291|4a7aace7db01ee15 -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fset.html|20010305004145|59241|ecb97931b222568d -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fsync.html|20010305004145|60192|a95ab802bb28646f -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_free.html|20010305004144|13076|ed61d2dfea9e069e -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_open.html|20010305004144|17474|8c812591efc8abe6 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_unmap.html|20010305004144|23658|d85790692f3b536e -tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_stat.html|20010305004145|04637|f57a656bfbac12bf -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_get_type.html|20010305004146|01846|398668783c4070db -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_bt_compare.html|20010305004146|08946|d888d1ebe056bc6b -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_bt_minkey.html|20010305004146|09837|d6181e52342005c -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_lorder.html|20010305004146|19980|a46750a29588268c -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_del.html|20010305004146|32671|424fc0ebb3b4c5cf -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_data_dir.html|20010305004146|40779|9176f081597e4f27 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_errfile.html|20010305004145|18322|f9543c9e65ed6a1d -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_error_stream.html|20010305004145|19317|a4101c1d68559fa2 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_max.html|20010305004146|50580|52ac3c4ca2876de -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_id.html|20010305004146|08539|b3c7995efbe12c16 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_stat.html|20010305004146|10635|2112ceb0894b34d8 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_vec.html|20010305004146|11739|c55deaa5173a3323 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_unregister.html|20010305004146|21535|8fa1fe691751d6ad -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_get_type.html|20010305004147|29592|4cfb6f09cbe0b8ae -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_open.html|20010305004147|32409|bfc13736b96ac509 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_put.html|20010305004147|33389|c476abe5599f21cf -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_bt_compare.html|20010305004147|37206|e972f964d042b35e -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_bt_minkey.html|20010305004147|38144|c7e1f184bdca25fa -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_feedback.html|20010305004147|45141|69b4c07b3dbe383 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_h_ffactor.html|20010305004147|47226|edcc10024104d57e -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_q_extentsize.html|20010305004147|52035|6ac26239fc538cb -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_sync.html|20010305004147|58064|42391f7d5f200b90 -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_count.html|20010305004147|62108|9c239575f4550756 -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_dup.html|20010305004147|64103|aa141014c4d7f9b0 -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_get.html|20010305004147|65144|e66e387b83681e73 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_close.html|20010305004147|01809|c4e2ec77d7d14d4f -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_remove.html|20010305004147|04039|e92277e3dfd9bba1 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_conflicts.html|20010305004147|14497|8951eb975a90918b -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_mp_mmapsize.html|20010305004147|20894|b7dea9108fa65dfa -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_server.html|20010305004147|27545|d901cdab9698605d -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tx_max.html|20010305004147|33999|70f356b8b67782fe -tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_class.html|20010305004147|19738|880aa614d1469304 -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_register.html|20010305004148|17668|c68fc6fb22dd594a -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_stat.html|20010305004148|27008|4628462474db62b4 -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_sync.html|20010305004148|27969|5b401daadc7261eb -tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_checkpoint.html|20010305004148|31832|2565ac892d04b63d -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_open.html|20010305004148|47486|f588cc9bc694cbf0 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_put.html|20010305004148|48549|380c7caeced55512 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_dup.html|20010305004148|55139|325121689412d70b -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/tcl_index.html|20010305004148|61088|443e6b9a10ef4139 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/txn_abort.html|20010305004148|63068|8cc23b6ef6f457d2 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/version.html|20010305004148|65038|eeb51f4de1bbfe8e -tim@threads.polyesthetic.msg|bdb/docs/index.html|20010305004143|26935|450dd5db21a9bb64 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/close.html|20010305004148|10227|ed6f7427edc0431 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/curget.html|20010305004148|15271|d7dd42affcd54073 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/h_ffactor.html|20010305004149|25120|5eb87b7ce99f3362 -tim@threads.polyesthetic.msg|bdb/docs/ref/arch/smallpic.gif|20010305004149|42169|fdf77055d7e711 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/hpux.html|20010305004149|47818|d34942564699608 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/linux.html|20010305004149|51464|f9f2d09dc6df75e -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/notes.html|20010305004149|52391|97e9b52853db15ea -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/sunos.html|20010305004149|58008|fc41965e9d95985c -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/ultrix.html|20010305004149|59865|a1dd780edcde11f6 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_win/notes.html|20010305004149|01764|4058bf968f287f7 -tim@threads.polyesthetic.msg|bdb/docs/ref/debug/intro.html|20010305004149|06616|57ef29f26341ea -tim@threads.polyesthetic.msg|bdb/docs/ref/install/magic.s5.be.txt|20010305004150|22805|cf7d25e758432ab6 -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/what.html|20010305004150|00539|dd70b9e6e085725d -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/dead.html|20010305004150|33535|f5c7debd9ba739bb -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/max.html|20010305004150|35299|f0fb32ebc251f636 -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/notxn.html|20010305004150|37003|beec805d9f05e2bc -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/stdmode.html|20010305004150|38797|4048a052ea129ca3 -tim@threads.polyesthetic.msg|bdb/docs/ref/mp/intro.html|20010305004150|45138|34937731cafcf1b1 -tim@threads.polyesthetic.msg|bdb/docs/ref/program/mt.html|20010305004150|57429|552ab570b657fc0e -tim@threads.polyesthetic.msg|bdb/docs/ref/program/namespace.html|20010305004150|58394|182f8f762343bdc1 -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/intro.html|20010305004150|22878|7544c4688623a54c -tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/error.html|20010305004151|21581|37b817c57777b460 -tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/intro.html|20010305004151|20749|d66c6c398e2ace0b -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/deadlock.html|20010305004151|46421|34914b9dc6b01703 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/put.html|20010305004151|51420|8cc785aeecff8535 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/term.html|20010305004151|54819|d6f3fa4fc5a630ec -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/transapp.txt|20010305004151|57368|337576ea2aae23b0 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/why.html|20010305004151|56525|c941c1a56a0adbaf -tim@threads.polyesthetic.msg|bdb/docs/ref/txn/config.html|20010305004151|59874|c7337cb30f9bf66 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/system.html|20010305004151|03146|eae0256a127c3c89 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/close.html|20010305004151|05457|c79c866b393785cc -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/dbinfo.html|20010305004151|10780|7529af7145c0680a -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/envopen.html|20010305004151|14369|5e768fd180f471e4 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/lock_detect.html|20010305004151|19846|fb307b10156762ca -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/txn_commit.html|20010305004151|32241|e1debf9ea769426c -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/disk.html|20010305004152|39192|2abdaf9059265ba9 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/callback.html|20010305004152|53656|64a2b2b85cc253c1 -tim@threads.polyesthetic.msg|bdb/docs/sleepycat/license.html|20010305004152|03483|9371001bbf0ba2dd -tim@threads.polyesthetic.msg|bdb/docs/utility/index.html|20010305004152|05717|66c82ee036c1b369 -tim@threads.polyesthetic.msg|bdb/qam/qam_auto.c|20010305004141|31764|361954d3f149feb0 -tim@threads.polyesthetic.msg|bdb/test/logtrack.list|20010305004142|05743|7f4f1382b37d98e5 -BK|Docs/Flags/south-africa1.eps|19700101030959|00193|111e4f92f4562e9d -BK|sql-bench/Results-win32/create-mysql-win98|19700101030959|02538|f66c2cb2909c4792 -BK|sql-bench/Results/wisconsin-mysql_3.21-Linux_2.0.35_i686|19700101030959|02302|31703d40ea6b4f66 -BK|sql/share/english/errmsg.sys|19700101030959|01834|f29bd4ea5aaf54c8 -BK|sql/share/german/errmsg.sys|19700101030959|01840|1ea60675399c84c -BK|sql/share/korean/errmsg.sys|19700101030959|01850|a30e3687ae75a7c9 -miguel@hegel.local|zlib/contrib/delphi/zlib.mak|20020319032514|11153|7b97eb8cf290a42 -miguel@hegel.local|zlib/contrib/minizip/zlibvc.dsp|20020319032516|54044|ec35fd54c9b49987 -miguel@hegel.local|zlib/faq|20020319032517|20799|b0d0840d3b9faf07 -miguel@hegel.local|zlib/zlib.h|20020319032519|20598|fbec7833981c782f -monty@donna.mysql.com|sql-bench/Results/big-tables-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|17709|6d8209bf72b663ed -monty@hundin.mysql.fi|sql-bench/Results/ATIS-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|32241|dd306b2e583ebde4 -monty@hundin.mysql.fi|sql-bench/Results/select-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|56860|b01175ad38fd12b6 -monty@hundin.mysql.fi|sql-bench/Results/wisconsin-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|23386|1ed1dc6abd24e7e3 -monty@narttu.mysql.com|sql-bench/Results/big-tables-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|15583|a2a77f37b689cd63 -monty@narttu.mysql.fi|sql-bench/Results/create-mysql-Linux_2.2.14_my_SMP_i686|20001218015323|04134|d46860c29c5d51ee -monty@work.mysql.com|libmysqld/WHITEPAPER|20010411110351|28263|da1226799debcf3f -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000007.xml|20001017133625|48163|bfcb6d85276be7e8 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000016.xml|20001017133713|07087|32f1ef2e3d214be0 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000023.xml|20001017133713|20719|11993b379b9838be -sasha@mysql.sashanet.com|mysql-test/t/identity.test|20010910233028|36116|326f469b59105404 -serg@serg.mysql.com|mysql-test/r/ft0000001.a.result|20001211130756|05199|3d17aff15fa5a9f1 -serg@serg.mysql.com|mysql-test/r/ft0000001.c.result|20001211130756|14950|1040289a75243a92 -serg@serg.mysql.com|mysql-test/t/3.23/mrg000001.test|20001206231615|27540|e0327f9d1e6cb4e -serg@serg.mysql.com|mysql-test/t/sel000009.test|20001211130730|33139|a455c38f5c942cd1 serg@serg.mysql.com|mysql-test/t/sel000019.test|20001211130731|47552|8fd63c8dc6be8dbc serg@serg.mysql.com|mysql-test/t/sel000020.test|20001211130731|52532|c5758ad18a6dff1e -tim@threads.polyesthetic.msg|bdb/dist/build/chk.offt|20010305004137|16371|25759c9294db634e -tim@threads.polyesthetic.msg|bdb/dist/template/rec_log|20010305004137|27185|3fe6d62c43bc553a -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_fd.html|20010305004144|28004|15a01776b340a959 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_key_range.html|20010305004144|33389|1060761b1e359d85 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_paniccall.html|20010305004144|02405|ac7f63325b4499ce -tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_del.html|20010305004144|24335|2685f75d28e4ad99 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_open.html|20010305004144|29421|e4c9706220a4cd9b -tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_id.html|20010305004145|43025|c9ee776f928a38f -tim@threads.polyesthetic.msg|bdb/docs/api_c/log_archive.html|20010305004145|46850|490428ce45f9f918 -tim@threads.polyesthetic.msg|bdb/docs/api_c/log_flush.html|20010305004145|49632|bb8bc4fc43c9f63d -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fopen.html|20010305004145|57267|d032a963a0103472 -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_stat.html|20010305004145|62160|55a9521fe04b03bd -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_sync.html|20010305004145|63168|b387035a94c20c50 -tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_begin.html|20010305004145|00608|557b34fd3e7363 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_close.html|20010305004145|28189|cc570e65ac7d22f -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_get.html|20010305004145|34357|3b6e6005f3f17f2a -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_cachesize.html|20010305004146|12541|3befdbaf98d5a04e -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_dup_compare.html|20010305004146|13472|91f36955a213e0f4 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_pagesize.html|20010305004146|20914|b8d544ec3e102c6c -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_count.html|20010305004146|31395|bc025b8894450525 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbenv_class.html|20010305004145|16297|5ab8aaf8a531f76b -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_open.html|20010305004146|37756|66ac1ae7fa67ca4a -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_errcall.html|20010305004146|41745|bae25b45b0196773 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_max_locks.html|20010305004146|51576|bbde4ffbcc607f61 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_max_objects.html|20010305004146|53572|c47424e4d13d5327 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_stat.html|20010305004146|20379|dc2d4ffe7950fc09 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fput.html|20010305004146|26004|7ee8cda6287dee81 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_stat.html|20010305004146|31867|d370717a78971be1 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_stat.html|20010305004147|06751|e8e25f86f8541696 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lg_max.html|20010305004147|13429|c9f705492162e175 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_region_init.html|20010305004147|26379|30534afa94cbf54e -tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_put.html|20010305004148|09226|5af89e4cbf29c694 -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_trickle.html|20010305004148|28912|4d5c4e83a4a5c638 -tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_class.html|20010305004147|23221|c7bb2a3393ca9488 -tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_stat.html|20010305004148|34772|9a6ef8c262f218f9 -tim@threads.polyesthetic.msg|bdb/docs/images/sleepycat.gif|20010305004148|07668|ea63aaaa508ef096 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/get.html|20010305004148|20425|96c9c9a01c32d16 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/put.html|20010305004148|28752|8e18b0af61eb7f0f -tim@threads.polyesthetic.msg|bdb/docs/ref/arch/bigpic.gif|20010305004149|41251|fe43e7415b3bbdb0 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/freebsd.html|20010305004149|46918|8ed2a42e1668004c -tim@threads.polyesthetic.msg|bdb/docs/ref/dumpload/text.html|20010305004149|14998|88b57a73860b423 -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/page.html|20010305004150|37863|d56876b2565cbee -tim@threads.polyesthetic.msg|bdb/docs/ref/perl/intro.html|20010305004150|47570|ce7e794e619e1e1d -tim@threads.polyesthetic.msg|bdb/docs/ref/pindex.src|20010305004149|02223|7d74723f9fd25801 -tim@threads.polyesthetic.msg|bdb/docs/ref/program/environ.html|20010305004150|54494|dc4a48aa531bd399 -tim@threads.polyesthetic.msg|bdb/docs/ref/program/solaris.txt|20010305004150|63135|8b6bb29de0d58ffe -tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/faq.html|20010305004151|22367|f8433900f7f85400 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/disk.html|20010305004151|01410|94dc4e6e3668e613 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/cxx.html|20010305004151|06323|7f3bfc9bba854d48 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/btstat.html|20010305004152|37584|40a76aef8b25a948 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/tcl.html|20010305004152|49096|f5c85b09c33bda4 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/intro.html|20010305004152|57734|984a9f7dd07e0c14 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/set_flags.html|20010305004152|61061|213809ca8d7802d0 -tim@threads.polyesthetic.msg|bdb/docs/ref/xa/intro.html|20010305004152|00728|8ac020ffb869e9a8 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_deadlock.html|20010305004152|09191|f23f99911c3e5784 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_verify.html|20010305004152|15424|4fee9bfa2f9ab41a -tim@threads.polyesthetic.msg|bdb/include/hash_ext.h|20010305004138|10079|5b31ff8413481606 -tim@threads.polyesthetic.msg|bdb/include/qam_auto.h|20010305004138|24568|96f6c045fd0d6cab -tim@threads.polyesthetic.msg|bdb/rpc_server/db_server_svc.c|20010305004141|50897|35804eb82b953f49 -BK|Docs/Flags/island.txt|19700101030959|00220|301ede0f81c5f3e1 -BK|client/violite.c|19700101030959|00561|afa871b4aab14371 -BK|include/Attic/config-win32.h|19700101030959|00116|65db818ec7e8f21b -BK|sql-bench/Results/connect-mysql_3.21-Linux_2.0.35_i686|19700101030959|02146|650abd213e6828c6 -BK|sql-bench/Results/insert-mysql-3.21-Linux_2.2.1_i686|19700101030959|02239|fd082017c7c57a6 -BK|sql-bench/Results/wisconsin-mysql-3.21-Linux_2.2.1_i686|19700101030959|02290|8147dc16a1dc6c47 -BK|sql/ha_hash.h|19700101030959|01902|27e36916116beb3e -BK|sql/share/hungarian/errmsg.sys|19700101030959|01845|aff82c16a77fc800 -BK|sql/share/japanese/errmsg.sys|19700101030959|01848|302478c84697dc00 -BK|sql/share/norwegian/.cvsignore|19700101030959|01853|a91d63182f0b2366 -BK|sql/share/russian/errmsg.sys|19700101030959|01860|72688df0beeabcb3 -BK|sql/share/spanish/errmsg.sys|19700101030959|01865|10c8f32da39070b2 -BK|strings/Attic/ctype-cp1257.c|19700101030959|01340|732611cbc74aeafc -BK|strings/Attic/ctype-hebrew.c|19700101030959|01348|d3b4a000d51e76dc -BK|strings/Attic/ctype-win1251ukr.c|19700101030959|01359|b5a7cca889bbef58 -BK|strings/Attic/memory.h|19700101030959|01336|450f586e82a26d99 -BK|tests/fork_test.pl|19700101030959|01945|3d3535329ed8cd5e -BK|vio/VioAcceptorFd.h|19700101030959|00006|7f9c4358477ba9a3 -BK|vio/VioFd.h|19700101030959|00010|8294293a88c7b4b8 -BK|vio/VioPipe.h|19700101030959|00012|21cebbe61a1da546 -miguel@hegel.local|zlib/contrib/iostream/zfstream.cpp|20020319032515|55262|dce18d1a5d7096b7 -miguel@hegel.local|zlib/contrib/minizip/miniunz.c|20020319032515|21943|6a80009b319b1b9e -miguel@hegel.local|zlib/contrib/minizip/unzip.def|20020319032516|14456|b4162b8c833ab6c7 -miguel@hegel.local|zlib/descrip.mms|20020319032517|08063|7d61d33062ef53ec -miguel@hegel.local|zlib/minigzip.c|20020319032518|25601|37f8eacb80c7f8fc -miguel@hegel.local|zlib/os2/zlib.def|20020319032519|28842|1166a95d83c5f52c -monty@donna.mysql.com|sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|17106|6e532c1936df1737 -monty@donna.mysql.com|sql-bench/Results/connect-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|18910|7ed15d6fd1a5944c -monty@donna.mysql.com|sql-bench/Results/select-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|24071|4f7795c27eaab86b -monty@hundin.mysql.fi|sql-bench/Results/alter-table-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|39143|662b96bc66bc91b6 -monty@hundin.mysql.fi|sql-bench/Results/create-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|12309|f3b1d326092bf44 -monty@narttu.mysql.com|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|07879|2ac8fe298953d43 -monty@narttu.mysql.com|sql-bench/Results/RUN-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|09727|79ac0482599eace1 -monty@narttu.mysql.fi|sql-bench/Results/ATIS-mysql-Linux_2.2.13_SMP_alpha|20001014001004|08145|21ddf9425cbdd58 -monty@narttu.mysql.fi|sql-bench/Results/big-tables-mysql-Linux_2.2.14_my_SMP_i686|20001218015322|30548|f1127add9307098b -monty@narttu.mysql.fi|sql-bench/Results/create-mysql-Linux_2.2.13_SMP_alpha|20001014001004|23947|2c9af91e9771f618 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000003.xml|20001013074610|26659|1a622b8d30d7ade8 -sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618 -sasha@mysql.sashanet.com|mysql-test/t/3.23/sel000004.test|20001103140433|32471|daf9ad4a1a31cd3c -sasha@mysql.sashanet.com|sounds/compilation_finished.au.gz|20010814034002|63992|70bd14095a918139 -serg@serg.mysql.com|mysql-test/t/sel000013.test|20001211130731|18090|ce8aa504ba4f74ba +serg@serg.mysql.com|mysql-test/t/sel000021.test|20001211130731|57561|94dd47de2872264a +serg@serg.mysql.com|mysql-test/t/sel000022.test|20001211130731|62553|6e3e5435e66875e9 +serg@serg.mysql.com|mysql-test/t/sel000023.test|20001211130731|02042|7bdfcfaa278f837d +serg@serg.mysql.com|mysql-test/t/sel000024.test|20001211130731|07099|849f47e6cbdc4fe3 +serg@serg.mysql.com|mysql-test/t/sel000025.test|20001211130731|12136|65b32b4b67e4c77 +serg@serg.mysql.com|mysql-test/t/sel000026.test|20001211130731|17211|d8aa2d614f23b1 +serg@serg.mysql.com|mysql-test/t/sel000027.test|20001211130731|23677|ab44bb57a580de9 serg@serg.mysql.com|mysql-test/t/sel000028.test|20001211130731|28317|db9bfc0a808fb629 +serg@serg.mysql.com|mysql-test/t/sel000029.test|20001211130731|32917|6aae34dbb3ee86d9 serg@serg.mysql.com|mysql-test/t/sel000030.test|20001211130732|03110|a29683eac3e7b706 +tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.eps|20020228162345|64529|31ade79a89683616 +tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.gif|20020228162348|36945|364ca7338682f71 +tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.txt|20020228162350|33044|e155c53c10374ff +tim@cane.mysql.fi|mysql-test/r/delete.result|20001221095802|20463|e866a6678e29f186 tim@cane.mysql.fi|mysql-test/t/delete.test|20001221095802|36821|389410e29f2cebe5 tim@threads.polyesthetic.msg|bdb/btree/btree_auto.c|20010305004134|12592|a683156a176761f +tim@threads.polyesthetic.msg|bdb/build_vxworks/db_int.h|20010305004134|18702|40ba51edce41403f +tim@threads.polyesthetic.msg|bdb/build_win32/db_archive.dsp|20010305004134|25535|e3da826e91bb086 tim@threads.polyesthetic.msg|bdb/build_win32/db_checkpoint.dsp|20010305004134|26943|8071af22db95b1db +tim@threads.polyesthetic.msg|bdb/build_win32/db_deadlock.dsp|20010305004134|28374|befd45d29eaeb672 +tim@threads.polyesthetic.msg|bdb/build_win32/db_dll.dsp|20010305004134|29137|4e9dda53c84511b6 +tim@threads.polyesthetic.msg|bdb/build_win32/db_dump.dsp|20010305004134|29985|e07d2a82708b61 +tim@threads.polyesthetic.msg|bdb/build_win32/db_int.h|20010305004134|30736|9ee5645850a336a0 +tim@threads.polyesthetic.msg|bdb/build_win32/db_java.dsp|20010305004134|31520|e3941d5a9810b360 +tim@threads.polyesthetic.msg|bdb/build_win32/db_load.dsp|20010305004134|32237|e83a2af8e24a715d +tim@threads.polyesthetic.msg|bdb/build_win32/db_printlog.dsp|20010305004134|32975|163f6e1073a5f396 +tim@threads.polyesthetic.msg|bdb/build_win32/db_recover.dsp|20010305004134|34274|835c32ab73359256 +tim@threads.polyesthetic.msg|bdb/build_win32/db_stat.dsp|20010305004135|00560|f77417f5d9984986 +tim@threads.polyesthetic.msg|bdb/build_win32/db_static.dsp|20010305004135|01425|78ea414467defc70 +tim@threads.polyesthetic.msg|bdb/build_win32/db_tcl.dsp|20010305004135|02285|5ad951d774e41520 tim@threads.polyesthetic.msg|bdb/build_win32/db_upgrade.dsp|20010305004135|03711|90fd250190af4984 +tim@threads.polyesthetic.msg|bdb/build_win32/db_verify.dsp|20010305004135|04464|e9a4938542f86cea +tim@threads.polyesthetic.msg|bdb/build_win32/ex_access.dsp|20010305004135|07926|8dd6017efffae14e +tim@threads.polyesthetic.msg|bdb/build_win32/ex_btrec.dsp|20010305004135|08710|c87137287d8d67dc +tim@threads.polyesthetic.msg|bdb/build_win32/ex_env.dsp|20010305004135|09533|1732d5e41efda77 +tim@threads.polyesthetic.msg|bdb/build_win32/ex_lock.dsp|20010305004135|10303|286d2566e786dde +tim@threads.polyesthetic.msg|bdb/build_win32/ex_mpool.dsp|20010305004135|11076|9eb937bc70c1573 +tim@threads.polyesthetic.msg|bdb/build_win32/ex_tpcb.dsp|20010305004135|11838|644b38dae8b38152 +tim@threads.polyesthetic.msg|bdb/build_win32/excxx_access.dsp|20010305004135|12614|31e87b6228470681 +tim@threads.polyesthetic.msg|bdb/build_win32/excxx_btrec.dsp|20010305004135|13384|61b563f4ac1f73eb +tim@threads.polyesthetic.msg|bdb/build_win32/excxx_env.dsp|20010305004135|14159|b0bf2649a4c797ac +tim@threads.polyesthetic.msg|bdb/build_win32/excxx_lock.dsp|20010305004135|14943|257abf03544f6270 +tim@threads.polyesthetic.msg|bdb/build_win32/excxx_mpool.dsp|20010305004135|15715|d17a5d09f09f5217 +tim@threads.polyesthetic.msg|bdb/build_win32/excxx_tpcb.dsp|20010305004135|16510|159c727e2c15105e +tim@threads.polyesthetic.msg|bdb/build_win32/include.tcl|20010305004135|17284|f8bffb5e2510f229 +tim@threads.polyesthetic.msg|bdb/build_win32/libdb.rc|20010305004135|20964|906f4936ec6a8398 +tim@threads.polyesthetic.msg|bdb/db/crdel_auto.c|20010305004136|27298|ee4146a08fd175c1 +tim@threads.polyesthetic.msg|bdb/db/db_auto.c|20010305004136|32432|3186e950cc321ae7 +tim@threads.polyesthetic.msg|bdb/dist/build/chk.define|20010305004137|15254|aa9a626e58631003 +tim@threads.polyesthetic.msg|bdb/dist/build/chk.def|20010305004137|13920|bb65b471d09f7c58 +tim@threads.polyesthetic.msg|bdb/dist/build/chk.offt|20010305004137|16371|25759c9294db634e +tim@threads.polyesthetic.msg|bdb/dist/build/chk.srcfiles|20010305004137|18056|ae884700cd110cbf +tim@threads.polyesthetic.msg|bdb/dist/build/chk.tags|20010305004137|19101|7a5b14d33d4078cc +tim@threads.polyesthetic.msg|bdb/dist/config.guess|20010305004136|14678|ead1d91caeaa748c +tim@threads.polyesthetic.msg|bdb/dist/config.hin|20010305004136|15955|fdecb7a06fa137a7 +tim@threads.polyesthetic.msg|bdb/dist/config.sub|20010305004136|16944|17e9990a298261a tim@threads.polyesthetic.msg|bdb/dist/install-sh|20010305004136|21695|1858c24340b72628 +tim@threads.polyesthetic.msg|bdb/dist/template/db_server_proc|20010305004137|21042|2e8b49d42aefab55 tim@threads.polyesthetic.msg|bdb/dist/template/gen_client_ret|20010305004137|22087|786a5e65119b3991 +tim@threads.polyesthetic.msg|bdb/dist/template/rec_btree|20010305004137|23131|65d6b0b2f5b7a6d2 +tim@threads.polyesthetic.msg|bdb/dist/template/rec_crdel|20010305004137|24191|58795c0c5232f80d +tim@threads.polyesthetic.msg|bdb/dist/template/rec_db|20010305004137|25141|52c5797539878fca +tim@threads.polyesthetic.msg|bdb/dist/template/rec_hash|20010305004137|26120|dcbdd106ae17b865 +tim@threads.polyesthetic.msg|bdb/dist/template/rec_log|20010305004137|27185|3fe6d62c43bc553a +tim@threads.polyesthetic.msg|bdb/dist/template/rec_qam|20010305004137|28066|6eecf6833de0af98 +tim@threads.polyesthetic.msg|bdb/dist/template/rec_txn|20010305004137|29072|1ff22b797deb0e1b +tim@threads.polyesthetic.msg|bdb/docs/api_c/c_index.html|20010305004143|28133|1a854fa55012906 +tim@threads.polyesthetic.msg|bdb/docs/api_c/c_pindex.html|20010305004145|05766|697acebf58a8db4 tim@threads.polyesthetic.msg|bdb/docs/api_c/db_close.html|20010305004144|26254|fda0b4dfa946f44e tim@threads.polyesthetic.msg|bdb/docs/api_c/db_create.html|20010305004143|29368|a87157ea60c82ee2 tim@threads.polyesthetic.msg|bdb/docs/api_c/db_cursor.html|20010305004144|27133|7431dd96ed3492c +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_del.html|20010305004144|11427|e8bffcf9be371317 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_err.html|20010305004143|33003|3696088bd85eeda3 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_fd.html|20010305004144|28004|15a01776b340a959 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_get.html|20010305004144|29265|7e0018b93ee31eba +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_get_byteswapped.html|20010305004144|30478|bcab4145183a7be2 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_get_type.html|20010305004144|31538|d66aa1642a4d20e2 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_join.html|20010305004144|32446|a58c2d81ecfea5b +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_key_range.html|20010305004144|33389|1060761b1e359d85 tim@threads.polyesthetic.msg|bdb/docs/api_c/db_lsn.html|20010305004143|34135|5edb9bce1118feae +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_open.html|20010305004144|34314|59dfa6e5198c382e +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_put.html|20010305004144|35267|ea78709ffb6cd7e8 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_remove.html|20010305004144|36184|668fa1d67a4f6941 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_rename.html|20010305004144|37128|36796ad9e106c3f0 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_append_recno.html|20010305004144|38070|bdf0130e642f74fa tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_bt_compare.html|20010305004144|39551|e55a311bb0be93a8 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_dup_compare.html|20010305004144|03068|a833bfc727a794e7 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_errfile.html|20010305004144|00766|f07d3c57bb3c8fbd -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_pagesize.html|20010305004144|12535|9644fa0f538cde17 -tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_count.html|20010305004144|23385|c3cd00c48b4babf5 -tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_dup.html|20010305004144|25301|3bdf8b0a687b43f3 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_errpfx.html|20010305004145|01527|806c8c438d0ee36c -tim@threads.polyesthetic.msg|bdb/docs/api_c/hsearch.html|20010305004144|08165|a8b76d897a8216d8 -tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_detect.html|20010305004145|41159|8fe406dce10e0bb -tim@threads.polyesthetic.msg|bdb/docs/api_c/log_put.html|20010305004145|51546|11a1bec49bb90419 -tim@threads.polyesthetic.msg|bdb/docs/api_c/log_unregister.html|20010305004145|54401|45b8f9d3f8eb3d80 -tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_trickle.html|20010305004145|64180|8b1adf1404d7a5f -tim@threads.polyesthetic.msg|bdb/docs/api_c/pindex.src|20010305004143|31726|d1ecd116c42e0e23 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_class.html|20010305004145|08391|3129ff8c53721fe8 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_fd.html|20010305004145|33050|99ec316575f80428 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_rename.html|20010305004146|07200|9c0a820e864220b3 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_bt_prefix.html|20010305004146|11627|ecd8f927371a5dbd -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_h_hash.html|20010305004146|18078|afe952f65389d93b -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_paniccall.html|20010305004145|13411|6bc911c9d64e9237 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_flags.html|20010305004146|44734|8136e8e1ae16dc02 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lg_bsize.html|20010305004146|45706|7fd917bea6b163bf -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lg_max.html|20010305004146|47638|4f7ba5f02c66c0de -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_mp_mmapsize.html|20010305004146|54573|c21e3f9c5a29b0ab -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_strerror.html|20010305004146|05414|7e1cbfbd096ca -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_archive.html|20010305004146|12836|d47f39e6dad7ee50 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_register.html|20010305004146|19292|55470e0d79382beb -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fget.html|20010305004146|23710|bfe74f8c299c2995 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fset.html|20010305004146|27124|e52fa0488faa893 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_register.html|20010305004146|29358|cba6f572fe27c7a -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_get_byteswapped.html|20010305004147|28706|edbc66a9d5491a1 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_join.html|20010305004147|30506|a3a6dead9cae65f9 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_rename.html|20010305004147|35341|19b20feaa815bc27 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_h_nelem.html|20010305004147|49144|fc6f22a4c285fcef -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_re_source.html|20010305004147|55969|b29827dbf47537d1 -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_close.html|20010305004147|61116|e3bf1f36bc0e8e7e -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbt_class.html|20010305004147|13192|f6b04ff142e332f8 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_error_stream.html|20010305004147|15677|a738119910b452b8 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_feedback.html|20010305004147|09255|9748745e65f070d5 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_max_locks.html|20010305004147|17677|f0114205b169de39 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_pageyield.html|20010305004147|23054|774b3da0306a6767 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_panicstate.html|20010305004147|24142|72846d9a97cb80bb -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tmp_dir.html|20010305004147|32251|f23e4f614f6d975a -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_verbose.html|20010305004148|03690|9dcda0399c8256e7 -tim@threads.polyesthetic.msg|bdb/docs/api_java/except_class.html|20010305004147|16978|195c00e4a7cbe648 -tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_id.html|20010305004148|08326|737cf8d8dc74084e -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_get.html|20010305004148|15736|5fbbbd4baa60e052 -tim@threads.polyesthetic.msg|bdb/docs/api_java/mem_class.html|20010305004147|21486|2e5052b5b2bea584 -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fopen.html|20010305004148|22355|f7cf58725aa1c406 -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_register.html|20010305004148|26052|8331390a1c66fefd -tim@threads.polyesthetic.msg|bdb/docs/api_java/pindex.src|20010305004147|10521|de828917f041d27b -tim@threads.polyesthetic.msg|bdb/docs/api_java/runrec_class.html|20010305004147|22358|49c5cb3efe0c201 -tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_commit.html|20010305004148|32812|c265042f3340baa1 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_close.html|20010305004148|38213|f40794b17e0fe443 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_remove.html|20010305004148|50431|3b2be4b0b1b3dc98 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_sync.html|20010305004148|52310|3b615ca64d934602 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/env_close.html|20010305004148|58109|bf191b2673a2b19e -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/pagesize.html|20010305004149|30437|eb4800704ae1131b -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/renumber.html|20010305004149|33199|b7df79bf32240b5c -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/qnx.html|20010305004149|54263|6d2849a8e8038dc9 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_vxworks/intro.html|20010305004149|62808|2eed15d25078711 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_vxworks/notes.html|20010305004149|63758|7e53a042c5c4d350 -tim@threads.polyesthetic.msg|bdb/docs/ref/java/program.html|20010305004150|28026|e9bbc08bccf5d396 -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/am_conv.html|20010305004150|30986|3bab32d969f21b77 -tim@threads.polyesthetic.msg|bdb/docs/ref/lock/config.html|20010305004150|32692|a593ea4c87467ddd -tim@threads.polyesthetic.msg|bdb/docs/ref/log/intro.html|20010305004150|42339|31e7055d83ca8757 -tim@threads.polyesthetic.msg|bdb/docs/ref/mp/config.html|20010305004150|46018|771c2c91fc0b6b17 -tim@threads.polyesthetic.msg|bdb/docs/ref/txn/nested.html|20010305004151|62443|6860bbf2f29aa93b -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/dup.html|20010305004152|40004|911018877c118b45 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/tx_recover.html|20010305004152|62754|132a354cde7a8286 -tim@threads.polyesthetic.msg|bdb/docs/ref/xa/config.html|20010305004152|64479|3f3f449c305e66b4 -tim@threads.polyesthetic.msg|bdb/docs/ref/xa/faq.html|20010305004152|65373|7aa890c7b70f1293 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_upgrade.html|20010305004152|14532|6444f26a93f77ea -tim@threads.polyesthetic.msg|bdb/include/crdel_auto.h|20010305004137|21088|1b8255da47550ece -tim@threads.polyesthetic.msg|bdb/include/db_server.h|20010305004137|34247|61a33aa05bf368a7 -tim@threads.polyesthetic.msg|bdb/include/mutex_ext.h|20010305004138|19006|f20f47ddc346598b -tim@threads.polyesthetic.msg|bdb/include/qam_ext.h|20010305004138|25430|9993db1fb3428b6d -tim@threads.polyesthetic.msg|bdb/include/tcl_ext.h|20010305004138|31857|6759d22aa2ff5f39 -tim@threads.polyesthetic.msg|bdb/include/txn_auto.h|20010305004138|33645|e3f49e94fd291c45 -tim@threads.polyesthetic.msg|bdb/rpc_client/gen_client.c|20010305004141|43060|ad86f092d0996a68 -tim@threads.polyesthetic.msg|bdb/rpc_server/db_server_proc.sed|20010305004141|49906|1a9af8e5b051acbd -tim@threads.polyesthetic.msg|bdb/test/include.tcl|20010305004141|34016|20fc297b040cbe2 -BK|client/Attic/libmysql.c|19700101030959|00582|72949a7043113807 -BK|mit-pthreads/pg++|19700101030959|00597|3beac0502025d766 -BK|myisam/ft_search.c|19700101030959|01642|c011cb6e8041bb59 -BK|mysys/test_vsnprintf.c|19700101030959|01502|e3d568aca62dc81e -BK|strings/Attic/ctype-usa7.c|19700101030959|01356|d19d859dca5675f -BK|strings/Attic/ctype-win1251.c|19700101030959|01358|762607f4fd7d52ad -BK|tests/fork3_test.pl|19700101030959|01947|c4a7bffb4f8e813c -BK|vio/VioSSLFactoriesFd.h|19700101030959|00017|1d63ae149a63f85 -BK|vio/VioSocket.cc|19700101030959|00018|71c615783f29b5e1 -Sinisa@sinisa.nasamreza.org|scripts/mysql_new_fix_privilege_tables.sh|20011226144909|43765|b1664b401375eece -miguel@hegel.local|zlib/contrib/iostream/test.cpp|20020319032515|48225|a2ea8d4d7c66cf71 -miguel@hegel.local|zlib/contrib/minizip/unzip.c|20020319032516|07891|c66c95e17321206d -miguel@hegel.local|zlib/deflate.c|20020319032516|26978|e22894a54233bc25 -miguel@hegel.local|zlib/infcodes.c|20020319032517|52620|dffb42fdf2fb2372 -miguel@hegel.local|zlib/inffast.h|20020319032517|06651|215e4a4ccfc886fc -miguel@hegel.local|zlib/maketree.c|20020319032518|19299|7f281aef3547fee -miguel@hegel.local|zlib/msdos/zlib.rc|20020319032518|25240|f8a286fa8371ee09 -miguel@hegel.local|zlib/zutil.c|20020319032520|05372|6f0d1763c5deb409 -monty@donna.mysql.com|sql-bench/Results/alter-table-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|16525|2f516d2c108a9e05 -monty@donna.mysql.com|sql-bench/Results/insert-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|22723|a85a6f0477c13f83 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000017.xml|20001017133713|08762|81423597605ff77f -sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97 -sasha@mysql.sashanet.com|mysql-test/r/binlog-backup-restore.result|20010424233926|16010|605de78abda64d27 -sasha@mysql.sashanet.com|mysql-test/r/identity.result|20010910233028|16331|e41453a364242503 -serg@serg.mysql.com|mysql-test/t/sel000010.test|20001211130731|03554|ca07085ae92255f1 -tim@threads.polyesthetic.msg|bdb/build_win32/excxx_tpcb.dsp|20010305004135|16510|159c727e2c15105e -tim@threads.polyesthetic.msg|bdb/dist/build/chk.define|20010305004137|15254|aa9a626e58631003 -tim@threads.polyesthetic.msg|bdb/dist/template/rec_hash|20010305004137|26120|dcbdd106ae17b865 tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_bt_minkey.html|20010305004144|40498|e2d52ba2d0174432 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_re_delim.html|20010305004144|14446|e0a7face764111b9 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_upgrade.html|20010305004144|20363|5e6210d6f09a0c3e -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_errfile.html|20010305004144|06564|3b6b0822f29fc3d4 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_panicstate.html|20010305004145|29311|43228366ca64363c -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_dirfree.html|20010305004144|09784|d59f36547c7b5384 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_dirlist.html|20010305004144|10606|24e75ccc86809023 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_ioinfo.html|20010305004144|14713|80365bb8c66ae84c -tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_checkpoint.html|20010305004145|01607|4a1704dbfcaad5dc -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_get_byteswapped.html|20010305004146|00979|a44d5d57d050b466 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_put.html|20010305004146|05435|2792034e8c83c56 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_errfile.html|20010305004145|11465|f6eddb9ab7ef07d0 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_flags.html|20010305004146|16174|1146625feeb3bb0b -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_re_source.html|20010305004146|25550|46998978715ccc1 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_conflicts.html|20010305004146|48615|5bba88df4cc6dfba -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_max_lockers.html|20010305004146|52578|ebb61fd669c2eefb -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tx_timestamp.html|20010305004146|03286|6396a1145f8e41c1 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_class.html|20010305004145|23233|ed88ab78cccbef8d -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/mempfile_class.html|20010305004145|25191|672b4aa787b4aeca -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_id.html|20010305004147|04873|162661f4c2dc09d6 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_prepare.html|20010305004147|05797|818b4163518bace5 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_cursor.html|20010305004147|25020|2181d652bd1c1ff -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_fd.html|20010305004147|26830|1f70020c37023baa -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_bt_prefix.html|20010305004147|39088|a3269aad23e6dbc -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_dup_compare.html|20010305004147|40992|3dabd840a1d9e5f3 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_errcall.html|20010305004147|41930|4e4743f5b4277199 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_re_delim.html|20010305004147|53019|78fcf2d750fb26ef -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_cachesize.html|20010305004147|05132|f3700cd19856f14e -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_max_objects.html|20010305004147|19812|d1ed194631ffeb2a -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_mutexlocks.html|20010305004147|21961|aad8e4a059075bb6 -tim@threads.polyesthetic.msg|bdb/docs/api_java/java_index.html|20010305004147|18736|8ecfcef4a702011d -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_unregister.html|20010305004148|19590|eee284e0da176d0a -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_count.html|20010305004148|40010|4812f3756a75437 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_rename.html|20010305004148|49486|909bc643d5455b54 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_del.html|20010305004148|54185|7e94f9f01e7e4453 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_get.html|20010305004148|56098|5bbb80cf51aff594 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/join.html|20010305004148|22331|acc16686a78a732 -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/cachesize.html|20010305004149|22486|99dcd466dc881093 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/aix.html|20010305004149|44137|e8ae448bdb85fa22 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/conf.html|20010305004149|45053|d0378c69618b790b -tim@threads.polyesthetic.msg|bdb/docs/ref/build_win/faq.html|20010305004149|65331|34704a907168cea7 -tim@threads.polyesthetic.msg|bdb/docs/ref/debug/common.html|20010305004149|07598|607061232e2532df -tim@threads.polyesthetic.msg|bdb/docs/ref/debug/compile.html|20010305004149|08609|12785e3091b78bfd -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/where.html|20010305004150|01442|6cb9ec27f19ecbbb -tim@threads.polyesthetic.msg|bdb/docs/ref/program/diskspace.html|20010305004150|53502|959508f155721ee8 -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/example.txt|20010305004150|28042|9ff88f22565208bf -tim@threads.polyesthetic.msg|bdb/docs/ref/txn/limits.html|20010305004151|61583|3004b7a93dab148b -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/convert.html|20010305004151|00512|d7f18eb34c1b6ae -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/db_cxx.html|20010305004151|08078|5c17d6a360205140 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/lock_stat.html|20010305004151|22568|c49716e693ce225b -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/log_register.html|20010305004152|42524|7177eeb2fc099317 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/memp_register.html|20010305004152|44171|7d92464a1029d53e -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/put.html|20010305004152|44997|961a1a689be6ce -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/set_feedback.html|20010305004152|45815|6d7de50be92a5488 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/db_dump.html|20010305004152|54477|7d1cac3358c0482e -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/handle.html|20010305004152|56086|bb8a73b74d4399ae -tim@threads.polyesthetic.msg|bdb/docs/utility/berkeley_db_svc.html|20010305004152|06576|91fe012778882ce4 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_dump.html|20010305004152|10062|5de7ade427f20332 -tim@threads.polyesthetic.msg|bdb/include/btree_ext.h|20010305004137|18246|5d53d710f170c6b6 -tim@threads.polyesthetic.msg|bdb/include/gen_server_ext.h|20010305004138|07539|fd7bcfe6bbca8bcb -tim@threads.polyesthetic.msg|bdb/include/mp_ext.h|20010305004138|17070|a528b772d42d6455 -BK|include/Attic/mysql_com.h.in|19700101030959|00115|85b1ea7ced528c32 -BK|libmysql/configure.in|19700101030959|02603|c6fc04d4e3d6e291 -BK|myisam/Attic/ft_global.h|19700101030959|01673|fe46fb515f1e375 -BK|sql-bench/Results-win32/alter-table-mysql-win98|19700101030959|02529|e8743982f790462 -BK|sql-bench/Results/alter-table-mysql-3.21-Linux_2.2.1_i686|19700101030959|02073|f6f7ccd7b3c35f97 -BK|sql/Attic/mini_client_errors.c|19700101030959|01909|29edad51a5d0b068 -BK|sql/Attic/net_serv.c|19700101030959|01911|52dabcd773a39e10 -BK|strings/Attic/ctype-greek.c|19700101030959|01347|90acdff1195209ca -BK|strings/Attic/ctype-koi8_ukr.c|19700101030959|01352|a04aa14a6d62335a -BK|support-files/Attic/my-huge.cfg.sh|19700101030959|02585|589bdcd2d2c4360b -BK|support-files/Attic/my-medium.cfg.sh|19700101030959|02587|c49880d26ef0648e -BK|vio/Vio.cc|19700101030959|00003|60737ce02ab2bc25 -miguel@hegel.local|zlib/contrib/asm686/readme.686|20020319032514|04933|15e2bf4653b71f3e -miguel@hegel.local|zlib/contrib/minizip/minizip.c|20020319032515|28588|97181367a7bc47d8 -miguel@hegel.local|zlib/inftrees.h|20020319032517|32227|ffcbe51816466e5c -miguel@hegel.local|zlib/zconf.h|20020319032519|63437|c6b6b636c7e88d90 -monty@donna.mysql.com|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|25437|24a02e007a58bf73 -monty@hundin.mysql.fi|sql-bench/Results/insert-mysql-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010605132759|53328|fd2699adb3190d07 -monty@narttu.mysql.com|sql-bench/Results/connect-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|19531|7dd5ac726f86cf0b -monty@narttu.mysql.com|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|21574|1cf5d5f0d70a3fa0 -monty@narttu.mysql.com|sql-bench/Results/create-mysql_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|25516|fc207468e871ff69 -monty@narttu.mysql.com|sql-bench/Results/select-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|33684|ddcf36cdf3f72e8c -mwagner@evoq.home.mwagner.org|Docs/Books/prof.eps|20001231203220|15779|dc69b039543a57d7 -mwagner@evoq.home.mwagner.org|mysql-test/xml/README|20001013051440|12362|877d76bcd19f7193 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000020.xml|20001017133713|13843|8849bbf91a4fd5ec -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000028.xml|20001017133713|29282|c72bfec6600949b -nick@nick.leippe.com|mysql-test/r/rpl_empty_master_crash.result|20020531235552|47718|615f521be2132141 -sasha@mysql.sashanet.com|mysql-test/t/3.23/sel000005.test|20001103140433|36002|982fde89a4d6d886 -serg@serg.mysql.com|mysql-test/r/ft0000001.b.result|20001211130756|10153|505c4c00a0bddfc4 -serg@serg.mysql.com|mysql-test/t/sel000011.test|20001211130731|08373|c2a971726c9d18d6 -tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.txt|20020228162350|33044|e155c53c10374ff -tim@threads.polyesthetic.msg|bdb/build_win32/db_java.dsp|20010305004134|31520|e3941d5a9810b360 -tim@threads.polyesthetic.msg|bdb/build_win32/excxx_btrec.dsp|20010305004135|13384|61b563f4ac1f73eb -tim@threads.polyesthetic.msg|bdb/docs/api_c/c_pindex.html|20010305004145|05766|697acebf58a8db4 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_bt_prefix.html|20010305004144|41420|d6e443a7e47c9b3a +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_cachesize.html|20010305004144|02131|47a3c8ca486eb013 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_dup_compare.html|20010305004144|03068|a833bfc727a794e7 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_errcall.html|20010305004144|04030|faf92be4ee8bc634 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_errfile.html|20010305004144|00766|f07d3c57bb3c8fbd +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_errpfx.html|20010305004144|05859|756b9b73dd28b8d9 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_feedback.html|20010305004144|06786|90d495e78318a332 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_flags.html|20010305004144|07758|4cd3700ae4387d22 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_h_ffactor.html|20010305004144|08766|41352ddf74ccc338 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_h_hash.html|20010305004144|09702|73f14897664d9d08 tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_h_nelem.html|20010305004144|10635|bd8371e033b15c8f +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_lorder.html|20010305004144|11587|e24ae76325374653 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_malloc.html|20010305004144|01594|3581879fef5af695 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_pagesize.html|20010305004144|12535|9644fa0f538cde17 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_paniccall.html|20010305004144|02405|ac7f63325b4499ce +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_q_extentsize.html|20010305004144|13496|f2fe41a5d8c46658 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_re_delim.html|20010305004144|14446|e0a7face764111b9 tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_re_len.html|20010305004144|15420|f30d68257bd60e1e +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_re_pad.html|20010305004144|16373|8a1de721eb6fc53f +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_re_source.html|20010305004144|17353|6d12ac12652acc31 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_realloc.html|20010305004144|03204|a9be244baf966892 +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_stat.html|20010305004144|18351|578f6f99f8e247ff +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_sync.html|20010305004144|19394|7a067029b6e1496b +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_upgrade.html|20010305004144|20363|5e6210d6f09a0c3e +tim@threads.polyesthetic.msg|bdb/docs/api_c/db_verify.html|20010305004144|21372|cf80f5ba845eac2e +tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_close.html|20010305004144|22419|a3ad4ea563bafc42 +tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_count.html|20010305004144|23385|c3cd00c48b4babf5 +tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_del.html|20010305004144|24335|2685f75d28e4ad99 +tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_dup.html|20010305004144|25301|3bdf8b0a687b43f3 +tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_get.html|20010305004144|26284|4bf7579a92c35195 tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_put.html|20010305004144|27355|a2c4a52329376657 +tim@threads.polyesthetic.msg|bdb/docs/api_c/dbm.html|20010305004144|04019|ebf1d8e329b06bba +tim@threads.polyesthetic.msg|bdb/docs/api_c/dbt.html|20010305004144|04896|ae7a81c9c5f574f6 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_close.html|20010305004144|28399|a8e722cbb66c9d7b +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_create.html|20010305004144|05736|3e73dd35fe5dcc8 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_open.html|20010305004144|29421|e4c9706220a4cd9b +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_remove.html|20010305004144|31547|a71d5e1ca41324a7 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_cachesize.html|20010305004144|32567|f4c341d3f2c09469 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_data_dir.html|20010305004144|33569|437cec65e441c60 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_errcall.html|20010305004145|00341|ba09eec1ba15f15f +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_errfile.html|20010305004144|06564|3b6b0822f29fc3d4 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_errpfx.html|20010305004145|01527|806c8c438d0ee36c +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_feedback.html|20010305004145|02860|87a78f97ba545aba +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_flags.html|20010305004145|03778|b2a1f3c8498e6d95 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lg_bsize.html|20010305004145|04625|1eb03c137a42e80f +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lg_dir.html|20010305004145|05444|26be310214a2ff8f +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lg_max.html|20010305004145|06288|319c24b5245b0685 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_conflicts.html|20010305004145|07137|58d9f7179bc864a3 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_detect.html|20010305004145|07983|d9ed73495defdc19 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_max.html|20010305004145|08849|a2dc11fa8b2f1c9 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_max_lockers.html|20010305004145|24923|f22d5d4640436efe +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_max_locks.html|20010305004145|09704|1baf2d63a6fb418d +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lk_max_objects.html|20010305004145|25791|1a428bbee06cb5cc +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_mp_mmapsize.html|20010305004145|26668|21f27997f00accfe +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_mutexlocks.html|20010305004145|27540|85bbd53b877cafe1 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_pageyield.html|20010305004145|28418|8aa4a6cb2f18cad7 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_paniccall.html|20010305004144|07360|97a1d58189199453 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_panicstate.html|20010305004145|29311|43228366ca64363c +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_rec_init.html|20010305004145|30192|bf7da051ef6689ba +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_region_init.html|20010305004145|31081|2ca19f76ee1ae790 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_server.html|20010305004145|31969|c13b793b525d504b +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_shm_key.html|20010305004145|32880|cf5aaa6a995cbf55 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_tas_spins.html|20010305004145|33848|91c7091deca3d97f +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_tmp_dir.html|20010305004145|34771|b563e87af5431824 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_tx_max.html|20010305004145|35672|71a739e46faf33a9 tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_tx_recover.html|20010305004145|36580|8dd351545b444a24 tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_tx_timestamp.html|20010305004145|37492|ddb77d7dfb531085 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_verbose.html|20010305004145|38421|344f5119536cae0 tim@threads.polyesthetic.msg|bdb/docs/api_c/env_strerror.html|20010305004145|39331|7f090bf26bdd4dc -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_exists.html|20010305004144|12261|23f077e82ca8f827 -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_fsync.html|20010305004144|13884|f59339ff63d95e7d -tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_read.html|20010305004144|18372|c8f6ece1ed408bf8 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_key_range.html|20010305004146|03630|d79b373af096cb7 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_upgrade.html|20010305004146|28493|c6231eb2f9989284 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_put.html|20010305004146|35761|11e6aa2492dd1032 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbt_class.html|20010305004145|17281|fb91648586c1aa77 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_paniccall.html|20010305004145|20292|2080056f15faa516 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tx_recover.html|20010305004146|02235|cdf13797131b2d97 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/except_class.html|20010305004145|21277|59839667e43592e -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_flush.html|20010305004146|16027|3976f77e905f35eb -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_get.html|20010305004147|27733|87b8316c55b24739 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_verify.html|20010305004147|60082|20873ab17f6ed922 -tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_del.html|20010305004147|63111|6ec2b8a4b8dde996 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lg_bsize.html|20010305004147|11335|6c67beed877df84c -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_max.html|20010305004147|16607|12b6e34ac5a53281 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_version.html|20010305004148|05599|854d26806930cab6 -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fset.html|20010305004148|24178|5c5371a93b83275 -tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_begin.html|20010305004148|30859|553bf78bd7fc3e0a -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_cursor.html|20010305004148|40924|e035b3c11a91c5d6 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_get_type.html|20010305004148|44686|7202f3ca793e6ec3 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/txn.html|20010305004148|62085|8e345950e6029230 -tim@threads.polyesthetic.msg|bdb/docs/images/prev.gif|20010305004148|04639|9448d24755d708a0 -tim@threads.polyesthetic.msg|bdb/docs/images/ps.gif|20010305004148|05648|f6b1b372cb2cda4c -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/logrec.html|20010305004149|28646|5edeb34d63936e2 -tim@threads.polyesthetic.msg|bdb/docs/ref/arch/progmodel.html|20010305004149|38491|caa422dc155b6370 -tim@threads.polyesthetic.msg|bdb/docs/ref/build_win/intro.html|20010305004149|00770|2975a07b53b12046 -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/need.html|20010305004149|31743|43950806e35d71f -tim@threads.polyesthetic.msg|bdb/docs/ref/refs/bdb_usenix.ps|20010305004150|02162|9851f6cdeff17481 -tim@threads.polyesthetic.msg|bdb/docs/ref/rpc/server.html|20010305004150|14510|79f560205494295 -tim@threads.polyesthetic.msg|bdb/docs/ref/test/faq.html|20010305004151|38444|f95038006d18229 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/admin.html|20010305004151|41323|cf867ed0b00cccef -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/data_open.html|20010305004151|45592|413c1d8aba9d8018 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/dbenv.html|20010305004151|08972|f9863847dc1ed617 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/join.html|20010305004151|18031|ec21d874caa0654 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/stat.html|20010305004151|29377|775d75e3ba02d15c -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/toc.html|20010305004151|30301|16e7d8e76496cbc9 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/env.html|20010305004152|40827|381e366a9c9c9a37 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/disk.html|20010305004152|55280|61799ebebe78ebb2 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/mutexlock.html|20010305004152|58567|972b710c5bdba67c -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/notfound.html|20010305004152|59393|dc91c094aba92838 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_load.html|20010305004152|10976|981095940db0197 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_printlog.html|20010305004152|11895|fcc4075ad0232842 -tim@threads.polyesthetic.msg|bdb/include/db_ext.h|20010305004137|29469|a1e210bbd0de0a48 -tim@threads.polyesthetic.msg|bdb/include/gen_client_ext.h|20010305004138|06647|5c621cacb18b38 -tim@threads.polyesthetic.msg|bdb/include/lock_ext.h|20010305004138|11814|ccd0785bb206933f -tim@threads.polyesthetic.msg|bdb/log/log_auto.c|20010305004137|49459|fe8c0369965f7151 -tim@threads.polyesthetic.msg|bdb/rpc_server/db_server.x|20010305004141|47705|811aeb6b630fe7aa -BK|include/Attic/m_ctype.h.in|19700101030959|00114|f671e3c2d611ba97 -BK|sql/share/norwegian-ny/.cvsignore|19700101030959|01855|469064b5190d703d -BK|sql/share/swedish/errmsg.sys|19700101030959|01866|dd772e93db859993 -BK|strings/Attic/ctype-danish.c|19700101030959|01342|dc5451066eb272ae -BK|strings/Attic/ctype-swe7.c|19700101030959|01355|bb1b012225d7d02c -BK|strings/Attic/ptr_cmp.c|19700101030959|01337|57e682a26e769597 -BK|vio/VioFd.cc|19700101030959|00009|6e444647affef63b -BK|vio/vioelitexx.cc|19700101030959|00022|3eaba70da792a7fc -miguel@hegel.local|zlib/adler32.c|20020319032513|04487|f98728c6da1ac164 -miguel@hegel.local|zlib/contrib/asm386/zlibvc.dsp|20020319032514|38372|a1c6749052ce48a -miguel@hegel.local|zlib/contrib/delphi2/zlib.pas|20020319032515|28965|3c94d3f5262cbbdd -miguel@hegel.local|zlib/contrib/iostream2/zstream_test.cpp|20020319032515|08848|63f635d540de8c48 -miguel@hegel.local|zlib/contrib/minizip/readme.txt|20020319032516|00611|7547b986c067c008 -miguel@hegel.local|zlib/contrib/minizip/zlibvc.dsw|20020319032516|60515|17f28194a5cd80ea -miguel@hegel.local|zlib/example.c|20020319032517|14327|490f57a4a9440dfa -miguel@hegel.local|zlib/infblock.h|20020319032517|46202|4526bc327b4160ab -miguel@hegel.local|zlib/infutil.h|20020319032518|12977|13089e09be34788c -miguel@hegel.local|zlib/readme|20020319032519|35257|80a41fc822f5f4 -mikef@nslinux.bedford.progress.com|mysql-test/include/have_gemini.inc|20010321203410|40631|42f94f0dfd0f7b18 -monty@donna.mysql.com|sql-bench/Results/RUN-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|15344|d922a0fcc1009130 -monty@donna.mysql.com|sql-bench/Results/RUN-pg_fast-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|15933|840503a555e420ec -monty@donna.mysql.com|sql-bench/Results/create-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|20136|241c337935ae1524 -monty@hundin.mysql.fi|sql-bench/Results/insert-pg-Linux_2.4.0_64GB_SMP_i686-cmp-mysql,pg|20010603134548|15984|a0143553cccb54e2 -monty@narttu.mysql.fi|sql-bench/Results/select-mysql-Linux_2.2.13_SMP_alpha|20001014001004|29737|db59425a7f4aa93f -monty@work.mysql.com|libmysqld/README|20010411110351|24268|434e9cae5fa9a4c4 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000010.xml|20001017133713|64368|9b98c9cce8fac145 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000012.xml|20001017133713|01909|a410d08dc4cfee11 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000024.xml|20001017133713|22352|dd067aa28220fa4c -serg@serg.mysql.com|mysql-test/r/ft0000002.a.result|20001212120058|27306|a89b4db1db19f944 -serg@serg.mysql.com|mysql-test/t/sel000014.test|20001211130731|22977|74cb8c70f1d73fcc -tim@threads.polyesthetic.msg|bdb/build_win32/db_dll.dsp|20010305004134|29137|4e9dda53c84511b6 -tim@threads.polyesthetic.msg|bdb/build_win32/db_load.dsp|20010305004134|32237|e83a2af8e24a715d -tim@threads.polyesthetic.msg|bdb/docs/api_c/dbc_get.html|20010305004144|26284|4bf7579a92c35195 -tim@threads.polyesthetic.msg|bdb/docs/api_c/dbm.html|20010305004144|04019|ebf1d8e329b06bba -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_feedback.html|20010305004145|02860|87a78f97ba545aba -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lg_max.html|20010305004145|06288|319c24b5245b0685 +tim@threads.polyesthetic.msg|bdb/docs/api_c/env_version.html|20010305004145|40251|9bf7f99fefacc2bf +tim@threads.polyesthetic.msg|bdb/docs/api_c/hsearch.html|20010305004144|08165|a8b76d897a8216d8 +tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_detect.html|20010305004145|41159|8fe406dce10e0bb +tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_get.html|20010305004145|42084|63399d204f1885fa +tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_id.html|20010305004145|43025|c9ee776f928a38f +tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_put.html|20010305004145|44022|f5bc2f52e55f16e1 +tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_stat.html|20010305004145|44954|d9a98bb949070b +tim@threads.polyesthetic.msg|bdb/docs/api_c/lock_vec.html|20010305004145|45892|cc79e33b82b7a275 +tim@threads.polyesthetic.msg|bdb/docs/api_c/log_archive.html|20010305004145|46850|490428ce45f9f918 tim@threads.polyesthetic.msg|bdb/docs/api_c/log_compare.html|20010305004145|47782|4f12fdf04d30ab94 +tim@threads.polyesthetic.msg|bdb/docs/api_c/log_file.html|20010305004145|48705|574444b46b801f9c +tim@threads.polyesthetic.msg|bdb/docs/api_c/log_flush.html|20010305004145|49632|bb8bc4fc43c9f63d +tim@threads.polyesthetic.msg|bdb/docs/api_c/log_get.html|20010305004145|50583|24cdf17ba55cbecf +tim@threads.polyesthetic.msg|bdb/docs/api_c/log_put.html|20010305004145|51546|11a1bec49bb90419 +tim@threads.polyesthetic.msg|bdb/docs/api_c/log_register.html|20010305004145|52499|5381c1fad82d6527 +tim@threads.polyesthetic.msg|bdb/docs/api_c/log_stat.html|20010305004145|53440|36b87b19ee2c5bba +tim@threads.polyesthetic.msg|bdb/docs/api_c/log_unregister.html|20010305004145|54401|45b8f9d3f8eb3d80 +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fclose.html|20010305004145|55335|b52c7d599d83c26 +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fget.html|20010305004145|56294|460714b5c2e3e1c5 +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fopen.html|20010305004145|57267|d032a963a0103472 +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fput.html|20010305004145|58291|4a7aace7db01ee15 +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fset.html|20010305004145|59241|ecb97931b222568d +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_fsync.html|20010305004145|60192|a95ab802bb28646f +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_register.html|20010305004145|61165|8b9dff9b5043da58 +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_stat.html|20010305004145|62160|55a9521fe04b03bd +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_sync.html|20010305004145|63168|b387035a94c20c50 +tim@threads.polyesthetic.msg|bdb/docs/api_c/memp_trickle.html|20010305004145|64180|8b1adf1404d7a5f +tim@threads.polyesthetic.msg|bdb/docs/api_c/pindex.src|20010305004143|31726|d1ecd116c42e0e23 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_close.html|20010305004144|08984|8981d16589844161 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_dirfree.html|20010305004144|09784|d59f36547c7b5384 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_dirlist.html|20010305004144|10606|24e75ccc86809023 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_exists.html|20010305004144|12261|23f077e82ca8f827 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_free.html|20010305004144|13076|ed61d2dfea9e069e +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_fsync.html|20010305004144|13884|f59339ff63d95e7d +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_ioinfo.html|20010305004144|14713|80365bb8c66ae84c +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_malloc.html|20010305004144|15535|5579a0604e14e1e7 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_map.html|20010305004144|16369|d90bbc8462ef43a6 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_open.html|20010305004144|17474|8c812591efc8abe6 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_read.html|20010305004144|18372|c8f6ece1ed408bf8 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_realloc.html|20010305004144|19375|e8e78e57c005c7c4 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_rename.html|20010305004144|20199|3f8c7b6674cda105 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_seek.html|20010305004144|21048|fdf1b31d3f6c7473 tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_sleep.html|20010305004144|21928|4b962c8b82989d8c +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_unlink.html|20010305004144|22800|c42b13fd26f2e90 +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_unmap.html|20010305004144|23658|d85790692f3b536e +tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_write.html|20010305004144|24518|63567be42d586fde tim@threads.polyesthetic.msg|bdb/docs/api_c/set_func_yield.html|20010305004144|25375|ca5e359bcbeca7fd +tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_abort.html|20010305004145|65162|a53425dd70214619 +tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_begin.html|20010305004145|00608|557b34fd3e7363 +tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_checkpoint.html|20010305004145|01607|4a1704dbfcaad5dc +tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_commit.html|20010305004145|02592|8950b5e11c8b0778 tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_id.html|20010305004144|04952|1e71088a7e8f6678 tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_prepare.html|20010305004145|03605|19f84203db4e6608 +tim@threads.polyesthetic.msg|bdb/docs/api_c/txn_stat.html|20010305004145|04637|f57a656bfbac12bf +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/cxx_index.html|20010305004145|07331|a0bc165de8a0554c +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/cxx_pindex.html|20010305004147|08181|9ff6b69b56f988dd +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_class.html|20010305004145|08391|3129ff8c53721fe8 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_close.html|20010305004145|28189|cc570e65ac7d22f +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_cursor.html|20010305004145|29241|4f0225f98f4a11c +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_del.html|20010305004145|31220|43fa05f2dfa86dbc tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_err.html|20010305004145|10496|77022bd5af575696 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_fd.html|20010305004145|33050|99ec316575f80428 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_get.html|20010305004145|34357|3b6e6005f3f17f2a +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_get_byteswapped.html|20010305004146|00979|a44d5d57d050b466 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_get_type.html|20010305004146|01846|398668783c4070db +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_join.html|20010305004146|02717|9c4819679501ad6e +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_key_range.html|20010305004146|03630|d79b373af096cb7 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_open.html|20010305004146|04518|ab95c48ac26ad3f7 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_put.html|20010305004146|05435|2792034e8c83c56 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_remove.html|20010305004146|06326|8c537fc5e326293b +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_rename.html|20010305004146|07200|9c0a820e864220b3 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_append_recno.html|20010305004146|08075|a158b1fdba756ce +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_bt_compare.html|20010305004146|08946|d888d1ebe056bc6b +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_bt_minkey.html|20010305004146|09837|d6181e52342005c +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_bt_prefix.html|20010305004146|11627|ecd8f927371a5dbd +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_cachesize.html|20010305004146|12541|3befdbaf98d5a04e +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_dup_compare.html|20010305004146|13472|91f36955a213e0f4 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_errcall.html|20010305004146|10727|28a7a1fa2b3b73ee +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_errfile.html|20010305004145|11465|f6eddb9ab7ef07d0 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_errpfx.html|20010305004146|14381|1f26e7b0bb5a067f +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_feedback.html|20010305004146|15263|a08620d86f05ec8c +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_flags.html|20010305004146|16174|1146625feeb3bb0b +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_h_ffactor.html|20010305004146|17155|a67084c644c38114 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_h_hash.html|20010305004146|18078|afe952f65389d93b +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_h_nelem.html|20010305004146|19017|1829bc583d9c7554 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_lorder.html|20010305004146|19980|a46750a29588268c +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_malloc.html|20010305004145|12423|b0aa5802da5bef4d +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_pagesize.html|20010305004146|20914|b8d544ec3e102c6c +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_paniccall.html|20010305004145|13411|6bc911c9d64e9237 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_q_extentsize.html|20010305004146|21826|b17e340a68ede3ac +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_re_delim.html|20010305004146|22753|81d9df93c3511df3 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_re_len.html|20010305004146|23672|e09bb30e40208dfb +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_re_pad.html|20010305004146|24627|f2e0c2c2c3806a97 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_re_source.html|20010305004146|25550|46998978715ccc1 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_realloc.html|20010305004145|14370|64d967a58c328957 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_stat.html|20010305004146|26537|3473827de856d680 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_sync.html|20010305004146|27538|dadf1f745e44faa7 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_upgrade.html|20010305004146|28493|c6231eb2f9989284 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_verify.html|20010305004146|29479|14db455da528229d +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_class.html|20010305004145|15353|2a31b398c37d674b tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_close.html|20010305004146|30462|2adba79b482ee157 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_count.html|20010305004146|31395|bc025b8894450525 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_del.html|20010305004146|32671|424fc0ebb3b4c5cf +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_dup.html|20010305004146|33708|75df863b4bc13aaa +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_get.html|20010305004146|34739|36e2dbe65e3442e3 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbc_put.html|20010305004146|35761|11e6aa2492dd1032 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbenv_class.html|20010305004145|16297|5ab8aaf8a531f76b +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/dbt_class.html|20010305004145|17281|fb91648586c1aa77 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_close.html|20010305004146|36778|5cc705b97b86972c +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_open.html|20010305004146|37756|66ac1ae7fa67ca4a +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_remove.html|20010305004146|38809|5efece7ecdfc4df7 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_cachesize.html|20010305004146|39807|b82ed49a47415fec +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_data_dir.html|20010305004146|40779|9176f081597e4f27 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_errcall.html|20010305004146|41745|bae25b45b0196773 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_errfile.html|20010305004145|18322|f9543c9e65ed6a1d +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_error_stream.html|20010305004145|19317|a4101c1d68559fa2 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_errpfx.html|20010305004146|42728|d26da4bab9538234 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_feedback.html|20010305004146|43755|1d5bd8dfe2d8034e +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_flags.html|20010305004146|44734|8136e8e1ae16dc02 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lg_bsize.html|20010305004146|45706|7fd917bea6b163bf +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lg_dir.html|20010305004146|46674|c08aac264e7faa97 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lg_max.html|20010305004146|47638|4f7ba5f02c66c0de +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_conflicts.html|20010305004146|48615|5bba88df4cc6dfba +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_detect.html|20010305004146|49591|13e53300b722cf1e +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_max.html|20010305004146|50580|52ac3c4ca2876de +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_max_lockers.html|20010305004146|52578|ebb61fd669c2eefb +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_max_locks.html|20010305004146|51576|bbde4ffbcc607f61 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_lk_max_objects.html|20010305004146|53572|c47424e4d13d5327 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_mp_mmapsize.html|20010305004146|54573|c21e3f9c5a29b0ab +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_mutexlocks.html|20010305004146|55575|f73e7ffdd2d8d62f +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_pageyield.html|20010305004146|56583|db4e5bdf71e171c0 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_paniccall.html|20010305004145|20292|2080056f15faa516 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_panicstate.html|20010305004146|57577|ad2d38e398cafd31 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_rec_init.html|20010305004146|58586|77916e00d1361c7b +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_region_init.html|20010305004146|59589|2d70678382bbbf9a +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_server.html|20010305004146|60631|bb74806839e8eb58 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_shm_key.html|20010305004146|62685|65b2c2f848ddf31e tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tas_spins.html|20010305004146|64671|a107049f4776b358 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tmp_dir.html|20010305004146|00169|6c815da1fad27537 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tx_max.html|20010305004146|01212|910d1c17dd000729 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tx_recover.html|20010305004146|02235|cdf13797131b2d97 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tx_timestamp.html|20010305004146|03286|6396a1145f8e41c1 tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_verbose.html|20010305004146|04365|e804a65368b5cdc1 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_strerror.html|20010305004146|05414|7e1cbfbd096ca +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_version.html|20010305004146|06444|1cff25c44cbea934 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/except_class.html|20010305004145|21277|59839667e43592e +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/get_errno.html|20010305004145|22249|e1a57c1c5f1d2695 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_class.html|20010305004145|23233|ed88ab78cccbef8d +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_detect.html|20010305004146|07495|bb50519c431233ed +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_get.html|20010305004146|61648|527d63a8526f336c +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_id.html|20010305004146|08539|b3c7995efbe12c16 tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_put.html|20010305004146|09587|9eb85a1c9e88621 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_stat.html|20010305004146|10635|2112ceb0894b34d8 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_vec.html|20010305004146|11739|c55deaa5173a3323 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_archive.html|20010305004146|12836|d47f39e6dad7ee50 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_compare.html|20010305004146|13902|3225b4c32016c9b1 tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_file.html|20010305004146|14965|9a724b41d84e0c31 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_flush.html|20010305004146|16027|3976f77e905f35eb +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_get.html|20010305004146|17104|aee6162219c71617 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_put.html|20010305004146|18207|66077da9630fa8c2 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_register.html|20010305004146|19292|55470e0d79382beb +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_stat.html|20010305004146|20379|dc2d4ffe7950fc09 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/log_unregister.html|20010305004146|21535|8fa1fe691751d6ad +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lsn_class.html|20010305004145|24210|34809f73e15540ad +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fclose.html|20010305004146|22608|cc4a5776ac69d660 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fget.html|20010305004146|23710|bfe74f8c299c2995 tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fopen.html|20010305004146|24842|abfef0a4db99c8e1 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fput.html|20010305004146|26004|7ee8cda6287dee81 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fset.html|20010305004146|27124|e52fa0488faa893 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fsync.html|20010305004146|28227|76d47da7c5dc8932 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_register.html|20010305004146|29358|cba6f572fe27c7a +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_stat.html|20010305004146|31867|d370717a78971be1 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_sync.html|20010305004146|33235|253961279934d3c8 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_trickle.html|20010305004146|34409|c9df8540b9ebc898 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/mempfile_class.html|20010305004145|25191|672b4aa787b4aeca +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/pindex.src|20010305004145|09392|d65361c4acfcef06 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_abort.html|20010305004147|01091|81177bcb2e5f4502 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_begin.html|20010305004147|02053|3a2d1488ec9d8655 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_checkpoint.html|20010305004147|02999|173930473e76d008 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_class.html|20010305004145|26179|5e57abe095aceca9 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_commit.html|20010305004147|03924|65afb8caf9c470ae +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_id.html|20010305004147|04873|162661f4c2dc09d6 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_prepare.html|20010305004147|05797|818b4163518bace5 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/txn_stat.html|20010305004147|06751|e8e25f86f8541696 +tim@threads.polyesthetic.msg|bdb/docs/api_cxx/what.html|20010305004145|27185|a64f42c697273c44 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_class.html|20010305004147|09609|b957a4d2b77acb1e +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_close.html|20010305004147|24101|21595167f4fdbe88 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_cursor.html|20010305004147|25020|2181d652bd1c1ff +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_del.html|20010305004147|25922|f4f15b362b114506 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_fd.html|20010305004147|26830|1f70020c37023baa +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_get.html|20010305004147|27733|87b8316c55b24739 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_get_byteswapped.html|20010305004147|28706|edbc66a9d5491a1 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_get_type.html|20010305004147|29592|4cfb6f09cbe0b8ae +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_join.html|20010305004147|30506|a3a6dead9cae65f9 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_key_range.html|20010305004147|31461|8834de5873a6acb5 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_open.html|20010305004147|32409|bfc13736b96ac509 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_put.html|20010305004147|33389|c476abe5599f21cf +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_remove.html|20010305004147|34343|49d3b8c7e5a5b000 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_rename.html|20010305004147|35341|19b20feaa815bc27 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_append_recno.html|20010305004147|36282|d28bf857803b93a2 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_bt_compare.html|20010305004147|37206|e972f964d042b35e +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_bt_minkey.html|20010305004147|38144|c7e1f184bdca25fa +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_bt_prefix.html|20010305004147|39088|a3269aad23e6dbc +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_cachesize.html|20010305004147|40035|22d172a2d29f276b +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_dup_compare.html|20010305004147|40992|3dabd840a1d9e5f3 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_errcall.html|20010305004147|41930|4e4743f5b4277199 tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_errpfx.html|20010305004147|42881|c446da51277796df +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_feedback.html|20010305004147|45141|69b4c07b3dbe383 tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_flags.html|20010305004147|46212|b6b9d271bd42a94e +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_h_ffactor.html|20010305004147|47226|edcc10024104d57e +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_h_hash.html|20010305004147|48174|c6eb825c706a9548 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_h_nelem.html|20010305004147|49144|fc6f22a4c285fcef +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_lorder.html|20010305004147|50103|f64cbdd62bbbdd7c +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_pagesize.html|20010305004147|51079|d899ea90b20b7b31 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_q_extentsize.html|20010305004147|52035|6ac26239fc538cb +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_re_delim.html|20010305004147|53019|78fcf2d750fb26ef +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_re_len.html|20010305004147|53997|8448826ea78c630e +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_re_pad.html|20010305004147|54985|2729c192747ac7af +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_re_source.html|20010305004147|55969|b29827dbf47537d1 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_stat.html|20010305004147|57008|bc253f0883e9c82b +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_sync.html|20010305004147|58064|42391f7d5f200b90 tim@threads.polyesthetic.msg|bdb/docs/api_java/db_upgrade.html|20010305004147|59076|782fa4cc6c633990 +tim@threads.polyesthetic.msg|bdb/docs/api_java/db_verify.html|20010305004147|60082|20873ab17f6ed922 +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_class.html|20010305004147|11473|8ee03c40ae0dbcb8 +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_close.html|20010305004147|61116|e3bf1f36bc0e8e7e +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_count.html|20010305004147|62108|9c239575f4550756 +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_del.html|20010305004147|63111|6ec2b8a4b8dde996 +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_dup.html|20010305004147|64103|aa141014c4d7f9b0 +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_get.html|20010305004147|65144|e66e387b83681e73 +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbc_put.html|20010305004147|00700|da0f0fa974385abd +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbenv_class.html|20010305004147|12326|92c7a4a6c22090c7 +tim@threads.polyesthetic.msg|bdb/docs/api_java/dbt_class.html|20010305004147|13192|f6b04ff142e332f8 tim@threads.polyesthetic.msg|bdb/docs/api_java/deadlock_class.html|20010305004147|14282|b587b2d8c9e5d0b0 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_close.html|20010305004147|01809|c4e2ec77d7d14d4f +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_open.html|20010305004147|02873|2df0f0ef544da715 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_remove.html|20010305004147|04039|e92277e3dfd9bba1 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_cachesize.html|20010305004147|05132|f3700cd19856f14e +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_data_dir.html|20010305004147|06162|b7b3f35e96804650 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_errcall.html|20010305004147|07189|4e206d08cbb39ab7 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_error_stream.html|20010305004147|15677|a738119910b452b8 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_errpfx.html|20010305004147|08227|a3b9a09670f6912 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_feedback.html|20010305004147|09255|9748745e65f070d5 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_flags.html|20010305004147|10283|690847bb5e205c21 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lg_bsize.html|20010305004147|11335|6c67beed877df84c +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lg_dir.html|20010305004147|12366|484cad2123994e14 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lg_max.html|20010305004147|13429|c9f705492162e175 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_conflicts.html|20010305004147|14497|8951eb975a90918b +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_detect.html|20010305004147|15549|9fc15a1a95b0dfa1 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_max.html|20010305004147|16607|12b6e34ac5a53281 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_max_lockers.html|20010305004147|18755|7896265ea77829b3 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_max_locks.html|20010305004147|17677|f0114205b169de39 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_lk_max_objects.html|20010305004147|19812|d1ed194631ffeb2a +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_mp_mmapsize.html|20010305004147|20894|b7dea9108fa65dfa +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_mutexlocks.html|20010305004147|21961|aad8e4a059075bb6 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_pageyield.html|20010305004147|23054|774b3da0306a6767 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_panicstate.html|20010305004147|24142|72846d9a97cb80bb +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_rec_init.html|20010305004147|25237|1fdb2c5fc3b6407 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_region_init.html|20010305004147|26379|30534afa94cbf54e +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_server.html|20010305004147|27545|d901cdab9698605d +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_shm_key.html|20010305004147|28699|8c576698882f0edc +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tas_spins.html|20010305004147|30425|2f9963827fbcb3f +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tmp_dir.html|20010305004147|32251|f23e4f614f6d975a +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tx_max.html|20010305004147|33999|70f356b8b67782fe +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tx_recover.html|20010305004148|00983|40280da113fc9d2b +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_tx_timestamp.html|20010305004148|02804|457eeb135f1f8bc0 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_verbose.html|20010305004148|03690|9dcda0399c8256e7 +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_strerror.html|20010305004148|04588|fceebaa94cf9aafd +tim@threads.polyesthetic.msg|bdb/docs/api_java/env_version.html|20010305004148|05599|854d26806930cab6 +tim@threads.polyesthetic.msg|bdb/docs/api_java/except_class.html|20010305004147|16978|195c00e4a7cbe648 tim@threads.polyesthetic.msg|bdb/docs/api_java/get_errno.html|20010305004147|17836|89a89f8efe3a9360 +tim@threads.polyesthetic.msg|bdb/docs/api_java/java_index.html|20010305004147|18736|8ecfcef4a702011d tim@threads.polyesthetic.msg|bdb/docs/api_java/java_pindex.html|20010305004148|35859|f8bc0811d8eda8e9 +tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_class.html|20010305004147|19738|880aa614d1469304 +tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_detect.html|20010305004148|06490|14d4e7c7dca0dad7 tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_get.html|20010305004148|07401|fd52de261831f9b5 +tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_id.html|20010305004148|08326|737cf8d8dc74084e +tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_put.html|20010305004148|09226|5af89e4cbf29c694 +tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_stat.html|20010305004148|10140|71b81d8567befc43 tim@threads.polyesthetic.msg|bdb/docs/api_java/lock_vec.html|20010305004148|11077|df5eb838fdbe1eab +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_archive.html|20010305004148|11996|b4a9483dbb5a2b58 +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_compare.html|20010305004148|12947|756622b42572ecb +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_file.html|20010305004148|13857|74a49bae2532199a +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_flush.html|20010305004148|14794|1691d6a3c8cc284e +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_get.html|20010305004148|15736|5fbbbd4baa60e052 +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_put.html|20010305004148|16729|ad7e9f382abde491 +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_register.html|20010305004148|17668|c68fc6fb22dd594a +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_stat.html|20010305004148|18608|d186a08662046aba +tim@threads.polyesthetic.msg|bdb/docs/api_java/log_unregister.html|20010305004148|19590|eee284e0da176d0a +tim@threads.polyesthetic.msg|bdb/docs/api_java/lsn_class.html|20010305004147|20619|b1458208b6c81016 +tim@threads.polyesthetic.msg|bdb/docs/api_java/mem_class.html|20010305004147|21486|2e5052b5b2bea584 +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fclose.html|20010305004148|20518|d08f0c134361f802 +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fget.html|20010305004148|21431|ca84dee01997eb89 +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fopen.html|20010305004148|22355|f7cf58725aa1c406 +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fput.html|20010305004148|23268|6ba75e517a259703 +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fset.html|20010305004148|24178|5c5371a93b83275 +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fsync.html|20010305004148|25118|e767b233fe7730a2 +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_register.html|20010305004148|26052|8331390a1c66fefd +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_stat.html|20010305004148|27008|4628462474db62b4 +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_sync.html|20010305004148|27969|5b401daadc7261eb +tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_trickle.html|20010305004148|28912|4d5c4e83a4a5c638 +tim@threads.polyesthetic.msg|bdb/docs/api_java/pindex.src|20010305004147|10521|de828917f041d27b +tim@threads.polyesthetic.msg|bdb/docs/api_java/runrec_class.html|20010305004147|22358|49c5cb3efe0c201 +tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_abort.html|20010305004148|29858|ec9a3517748bfa3 +tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_begin.html|20010305004148|30859|553bf78bd7fc3e0a +tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_checkpoint.html|20010305004148|31832|2565ac892d04b63d +tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_class.html|20010305004147|23221|c7bb2a3393ca9488 +tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_commit.html|20010305004148|32812|c265042f3340baa1 +tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_id.html|20010305004148|01920|798720b73cc9391 +tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_prepare.html|20010305004148|33784|510a245c80e715c +tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_stat.html|20010305004148|34772|9a6ef8c262f218f9 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_close.html|20010305004148|38213|f40794b17e0fe443 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_count.html|20010305004148|40010|4812f3756a75437 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_cursor.html|20010305004148|40924|e035b3c11a91c5d6 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_del.html|20010305004148|41829|400c7a72fb10d6f4 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_get.html|20010305004148|42753|127bd361ee695c71 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_get_join.html|20010305004148|43762|1c737805c2c49cf9 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_get_type.html|20010305004148|44686|7202f3ca793e6ec3 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_is_byteswapped.html|20010305004148|45596|8fb9e2c58051c769 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_join.html|20010305004148|46525|cb3eb61ed17a1f8 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_open.html|20010305004148|47486|f588cc9bc694cbf0 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_put.html|20010305004148|48549|380c7caeced55512 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_remove.html|20010305004148|50431|3b2be4b0b1b3dc98 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_rename.html|20010305004148|49486|909bc643d5455b54 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_stat.html|20010305004148|51363|3bb57be2de907fd2 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/db_sync.html|20010305004148|52310|3b615ca64d934602 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_close.html|20010305004148|53244|ef431e58d72accc3 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_del.html|20010305004148|54185|7e94f9f01e7e4453 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_dup.html|20010305004148|55139|325121689412d70b +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_get.html|20010305004148|56098|5bbb80cf51aff594 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_put.html|20010305004148|57122|290ecb1275d4270 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/env_close.html|20010305004148|58109|bf191b2673a2b19e +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/env_open.html|20010305004148|59088|39b63925d45a637e +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/env_remove.html|20010305004148|60117|9090900413ff0280 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/pindex.src|20010305004148|39123|f8754fff24f2cb24 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/tcl_index.html|20010305004148|61088|443e6b9a10ef4139 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/tcl_pindex.html|20010305004148|00553|259f0e062eee63c7 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/txn.html|20010305004148|62085|8e345950e6029230 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/txn_abort.html|20010305004148|63068|8cc23b6ef6f457d2 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/txn_commit.html|20010305004148|64051|25150b20b84cd519 +tim@threads.polyesthetic.msg|bdb/docs/api_tcl/version.html|20010305004148|65038|eeb51f4de1bbfe8e +tim@threads.polyesthetic.msg|bdb/docs/images/api.gif|20010305004148|02578|dec2d4fe5f39dffe +tim@threads.polyesthetic.msg|bdb/docs/images/next.gif|20010305004148|03600|ddab96466674135b +tim@threads.polyesthetic.msg|bdb/docs/images/prev.gif|20010305004148|04639|9448d24755d708a0 +tim@threads.polyesthetic.msg|bdb/docs/images/ps.gif|20010305004148|05648|f6b1b372cb2cda4c +tim@threads.polyesthetic.msg|bdb/docs/images/ref.gif|20010305004148|06650|add30c753dc1972d +tim@threads.polyesthetic.msg|bdb/docs/images/sleepycat.gif|20010305004148|07668|ea63aaaa508ef096 +tim@threads.polyesthetic.msg|bdb/docs/index.html|20010305004143|26935|450dd5db21a9bb64 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/close.html|20010305004148|10227|ed6f7427edc0431 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/count.html|20010305004148|11236|8fd8daf2e2cbd7c7 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/curclose.html|20010305004148|12231|8b6b8442fc8382f7 tim@threads.polyesthetic.msg|bdb/docs/ref/am/curdel.html|20010305004148|13236|39bf0a8cba99c064 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/curdup.html|20010305004148|14243|5c855e1f5b99d990 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/curget.html|20010305004148|15271|d7dd42affcd54073 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/curput.html|20010305004148|16324|c7e4fa0a68170c3d +tim@threads.polyesthetic.msg|bdb/docs/ref/am/cursor.html|20010305004148|17350|6dbcdb3b7d552f58 tim@threads.polyesthetic.msg|bdb/docs/ref/am/delete.html|20010305004148|18364|9195664374690b24 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/error.html|20010305004148|19390|45ac854e68196844 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/get.html|20010305004148|20425|96c9c9a01c32d16 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/join.html|20010305004148|22331|acc16686a78a732 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/open.html|20010305004148|23468|c9a7e23579a5e93a tim@threads.polyesthetic.msg|bdb/docs/ref/am/opensub.html|20010305004148|24500|81c79cce793fb343 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/ops.html|20010305004148|25566|9b24db9ba4f45724 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/partial.html|20010305004148|26629|db4a970c839b3051 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/put.html|20010305004148|28752|8e18b0af61eb7f0f tim@threads.polyesthetic.msg|bdb/docs/ref/am/stability.html|20010305004148|30129|a92faac934d69cef +tim@threads.polyesthetic.msg|bdb/docs/ref/am/stat.html|20010305004148|32050|fafc0f88571d9395 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/sync.html|20010305004148|33751|381722c07c9d8825 +tim@threads.polyesthetic.msg|bdb/docs/ref/am/upgrade.html|20010305004149|00532|c7499736f03c1a1c +tim@threads.polyesthetic.msg|bdb/docs/ref/am/verify.html|20010305004149|01382|badaeba91bda50e1 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/bt_compare.html|20010305004149|18156|c1e847e651704c89 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/bt_minkey.html|20010305004149|19013|b4708e561be92b83 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/bt_prefix.html|20010305004149|19903|4e7602aa68d50fe1 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/bt_recnum.html|20010305004149|20770|f081f10254e86e75 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/byteorder.html|20010305004149|21617|999a22f727e2dae0 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/cachesize.html|20010305004149|22486|99dcd466dc881093 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/dup.html|20010305004149|23371|523731632fca7343 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/extentsize.html|20010305004149|24263|fdcfb5572974545c +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/h_ffactor.html|20010305004149|25120|5eb87b7ce99f3362 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/h_hash.html|20010305004149|25978|3a0174586fbcfcdf +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/h_nelem.html|20010305004149|26871|979995db477052ad +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/intro.html|20010305004149|27745|dd1647202258ee28 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/logrec.html|20010305004149|28646|5edeb34d63936e2 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/malloc.html|20010305004149|29537|cb0e6d7e9448d93e +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/pagesize.html|20010305004149|30437|eb4800704ae1131b +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/re_source.html|20010305004149|31346|b000d11ca4a0f9a +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/recno.html|20010305004149|32283|c2ae722138309e95 +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/renumber.html|20010305004149|33199|b7df79bf32240b5c +tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/select.html|20010305004149|34120|57b1c99f6a8ea93f +tim@threads.polyesthetic.msg|bdb/docs/ref/arch/apis.html|20010305004149|36488|a84570e410b11a6a +tim@threads.polyesthetic.msg|bdb/docs/ref/arch/bigpic.gif|20010305004149|41251|fe43e7415b3bbdb0 +tim@threads.polyesthetic.msg|bdb/docs/ref/arch/bigpic.html|20010305004149|37519|ab5254bc99af0d5c +tim@threads.polyesthetic.msg|bdb/docs/ref/arch/progmodel.html|20010305004149|38491|caa422dc155b6370 +tim@threads.polyesthetic.msg|bdb/docs/ref/arch/script.html|20010305004149|39400|6796fd0a63161a0c +tim@threads.polyesthetic.msg|bdb/docs/ref/arch/smallpic.gif|20010305004149|42169|fdf77055d7e711 +tim@threads.polyesthetic.msg|bdb/docs/ref/arch/utilities.html|20010305004149|40326|54d7014fab332c7a +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/aix.html|20010305004149|44137|e8ae448bdb85fa22 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/conf.html|20010305004149|45053|d0378c69618b790b +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/flags.html|20010305004149|46003|a739404f90eb8c3d +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/freebsd.html|20010305004149|46918|8ed2a42e1668004c +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/hpux.html|20010305004149|47818|d34942564699608 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/install.html|20010305004149|48752|660222dd1feffc4 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/intro.html|20010305004149|49652|f261022c26987d7f +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/irix.html|20010305004149|50564|95833aedc3a82f0 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/linux.html|20010305004149|51464|f9f2d09dc6df75e +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/notes.html|20010305004149|52391|97e9b52853db15ea +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/osf1.html|20010305004149|53358|9d4ebabfe3af8970 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/qnx.html|20010305004149|54263|6d2849a8e8038dc9 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/sco.html|20010305004149|55174|e25f6271a1b753d0 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/shlib.html|20010305004149|56099|7168ed40f2e1155d tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/solaris.html|20010305004149|57063|3a85fb541538d0d7 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/sunos.html|20010305004149|58008|fc41965e9d95985c tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/test.html|20010305004149|58940|b2c2f275a0c3e783 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/ultrix.html|20010305004149|59865|a1dd780edcde11f6 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_vxworks/faq.html|20010305004149|61835|cdb7646d3d2e6374 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_vxworks/intro.html|20010305004149|62808|2eed15d25078711 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_vxworks/notes.html|20010305004149|63758|7e53a042c5c4d350 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_win/faq.html|20010305004149|65331|34704a907168cea7 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_win/intro.html|20010305004149|00770|2975a07b53b12046 +tim@threads.polyesthetic.msg|bdb/docs/ref/build_win/notes.html|20010305004149|01764|4058bf968f287f7 tim@threads.polyesthetic.msg|bdb/docs/ref/build_win/test.html|20010305004149|02729|84090b57cb7f0cf8 +tim@threads.polyesthetic.msg|bdb/docs/ref/cam/intro.html|20010305004149|04558|4c497b1a18c4c7f5 +tim@threads.polyesthetic.msg|bdb/docs/ref/debug/common.html|20010305004149|07598|607061232e2532df +tim@threads.polyesthetic.msg|bdb/docs/ref/debug/compile.html|20010305004149|08609|12785e3091b78bfd +tim@threads.polyesthetic.msg|bdb/docs/ref/debug/intro.html|20010305004149|06616|57ef29f26341ea +tim@threads.polyesthetic.msg|bdb/docs/ref/debug/printlog.html|20010305004149|09591|9fa9894f839fad95 +tim@threads.polyesthetic.msg|bdb/docs/ref/debug/runtime.html|20010305004149|10629|d50f2fea4a8e58c +tim@threads.polyesthetic.msg|bdb/docs/ref/distrib/layout.html|20010305004149|12589|5aeb292fbd987cf8 +tim@threads.polyesthetic.msg|bdb/docs/ref/dumpload/format.html|20010305004149|13995|9fa10ca3c7ae6751 +tim@threads.polyesthetic.msg|bdb/docs/ref/dumpload/text.html|20010305004149|14998|88b57a73860b423 +tim@threads.polyesthetic.msg|bdb/docs/ref/dumpload/utility.html|20010305004149|15969|8fc100fdb58adb3c +tim@threads.polyesthetic.msg|bdb/docs/ref/env/create.html|20010305004149|17402|9f454cb1910df0b8 +tim@threads.polyesthetic.msg|bdb/docs/ref/env/error.html|20010305004149|18447|acbbdb848c9fe70f +tim@threads.polyesthetic.msg|bdb/docs/ref/env/intro.html|20010305004149|19435|96dd1090729e06b +tim@threads.polyesthetic.msg|bdb/docs/ref/env/naming.html|20010305004149|20447|1f041789686cc8a0 tim@threads.polyesthetic.msg|bdb/docs/ref/env/open.html|20010305004149|21520|37a6e67d520d6c00 +tim@threads.polyesthetic.msg|bdb/docs/ref/env/region.html|20010305004149|22506|cc94139c8daa7f6a +tim@threads.polyesthetic.msg|bdb/docs/ref/env/remote.html|20010305004149|23518|52a3a79fdff8f7bd +tim@threads.polyesthetic.msg|bdb/docs/ref/env/security.html|20010305004149|24507|e455f95aee7f5cd2 +tim@threads.polyesthetic.msg|bdb/docs/ref/install/file.html|20010305004150|21159|d4ba2317db7c064b +tim@threads.polyesthetic.msg|bdb/docs/ref/install/magic.s5.be.txt|20010305004150|22805|cf7d25e758432ab6 +tim@threads.polyesthetic.msg|bdb/docs/ref/install/magic.s5.le.txt|20010305004150|23615|528ef76418c8b45c +tim@threads.polyesthetic.msg|bdb/docs/ref/install/magic.txt|20010305004150|21985|3894a46ea11ce25a +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/data.html|20010305004149|26092|33fbf7496c58cf63 +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/dbis.html|20010305004149|28303|e672b7615d70be2c +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/dbisnot.html|20010305004149|29466|5ce7aed7ce41c9e6 +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/distrib.html|20010305004149|30742|84b56709310017f2 +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/need.html|20010305004149|31743|43950806e35d71f +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/products.html|20010305004149|32785|f37221772a3b589d +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/terrain.html|20010305004149|33850|b396d6447a59435f +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/what.html|20010305004150|00539|dd70b9e6e085725d +tim@threads.polyesthetic.msg|bdb/docs/ref/intro/where.html|20010305004150|01442|6cb9ec27f19ecbbb +tim@threads.polyesthetic.msg|bdb/docs/ref/java/compat.html|20010305004150|25581|b39d173789bbf70d +tim@threads.polyesthetic.msg|bdb/docs/ref/java/conf.html|20010305004150|26401|ef560bcf13a71cd5 +tim@threads.polyesthetic.msg|bdb/docs/ref/java/faq.html|20010305004150|27218|7ca2474ba1f6676f +tim@threads.polyesthetic.msg|bdb/docs/ref/java/program.html|20010305004150|28026|e9bbc08bccf5d396 +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/am_conv.html|20010305004150|30986|3bab32d969f21b77 +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/cam_conv.html|20010305004150|31862|63844ff6fa95f0c +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/config.html|20010305004150|32692|a593ea4c87467ddd +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/dead.html|20010305004150|33535|f5c7debd9ba739bb +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/intro.html|20010305004150|34434|e1e07e71f3198be +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/max.html|20010305004150|35299|f0fb32ebc251f636 +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/nondb.html|20010305004150|36156|863fe076a46378d7 +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/notxn.html|20010305004150|37003|beec805d9f05e2bc +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/page.html|20010305004150|37863|d56876b2565cbee +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/stdmode.html|20010305004150|38797|4048a052ea129ca3 +tim@threads.polyesthetic.msg|bdb/docs/ref/lock/twopl.html|20010305004150|39650|b3f3aee667bc381d +tim@threads.polyesthetic.msg|bdb/docs/ref/log/config.html|20010305004150|41449|aedc53caf49c51c9 +tim@threads.polyesthetic.msg|bdb/docs/ref/log/intro.html|20010305004150|42339|31e7055d83ca8757 +tim@threads.polyesthetic.msg|bdb/docs/ref/log/limits.html|20010305004150|43198|26fac1e32387b7c9 +tim@threads.polyesthetic.msg|bdb/docs/ref/mp/config.html|20010305004150|46018|771c2c91fc0b6b17 +tim@threads.polyesthetic.msg|bdb/docs/ref/mp/intro.html|20010305004150|45138|34937731cafcf1b1 +tim@threads.polyesthetic.msg|bdb/docs/ref/perl/intro.html|20010305004150|47570|ce7e794e619e1e1d +tim@threads.polyesthetic.msg|bdb/docs/ref/pindex.src|20010305004149|02223|7d74723f9fd25801 tim@threads.polyesthetic.msg|bdb/docs/ref/program/appsignals.html|20010305004150|48930|3ab63bf9399d7ead tim@threads.polyesthetic.msg|bdb/docs/ref/program/byteorder.html|20010305004150|49835|f7fa52b53e4c8838 tim@threads.polyesthetic.msg|bdb/docs/ref/program/compatible.html|20010305004150|50729|237b98e6a6d7ed35 -tim@threads.polyesthetic.msg|bdb/docs/ref/program/extending.html|20010305004150|56407|6a86a40872d6b8bc -tim@threads.polyesthetic.msg|bdb/docs/ref/program/runtime.html|20010305004150|61233|6853fdbfe15df788 -tim@threads.polyesthetic.msg|bdb/docs/ref/refs/bdb_usenix.html|20010305004150|00758|bad2247b4f8c582b -tim@threads.polyesthetic.msg|bdb/docs/ref/rpc/client.html|20010305004150|12568|824178f8626e45b7 -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/del.html|20010305004150|19030|514a1bd568ed4c1d -tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/get.html|20010305004150|20970|211de230d6a6cbc5 -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/env_open.html|20010305004151|47233|c8d61102658c3bbf -tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/filesys.html|20010305004151|48077|ebee24f726f99bf6 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/intro.html|20010305004151|16219|7ecd16967b0bc868 -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/lock_put.html|20010305004151|21664|fd9ed0b04b465af -tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/rmw.html|20010305004151|28431|992b0143d13a3ec0 -tim@threads.polyesthetic.msg|bdb/docs/utility/db_stat.html|20010305004152|13652|9582c327964e1f9 -tim@threads.polyesthetic.msg|bdb/include/btree_auto.h|20010305004137|17274|84d4451c78faf67e -BK|sql/share/polish/errmsg.sys|19700101030959|01857|126b03af92054f0f -BK|strings/Attic/ct_init.c|19700101030959|01338|f0948bdd35ceedc3 -BK|strings/Attic/ctype.c.in|19700101030959|01361|8bf48d4bcbc5f675 -BK|vio/Vio.h|19700101030959|00004|f4416b2949647602 -BK|vio/VioSSL.h|19700101030959|00014|70d367b7ec8cac3e -BK|vio/violite.h|19700101030959|00023|58d2942a52ea7a83 -miguel@hegel.local|zlib/contrib/asm586/readme.586|20020319032514|57815|f60bfeefb27217d -miguel@hegel.local|zlib/contrib/delphi/zlibdef.pas|20020319032514|18918|658cb04db561e3db -miguel@hegel.local|zlib/contrib/delphi2/d_zlib.bpr|20020319032514|25335|c267d77cc2e2a2c8 -miguel@hegel.local|zlib/contrib/minizip/zip.h|20020319032516|40925|17fd39ccb4ea294c -miguel@hegel.local|zlib/gzio.c|20020319032517|27098|e02d23e656c19359 -monty@donna.mysql.com|sql-bench/Results/select-pg-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817132749|23395|8ef771713f89e1 -monty@narttu.mysql.com|sql-bench/Results/alter-table-mysql-Linux_2.2.14_my_SMP_i686-cmp-mysql,pg|20000817171625|11725|dfc480becae45236 -monty@narttu.mysql.fi|sql-bench/Results/ATIS-mysql-Linux_2.2.14_my_SMP_i686|20001218015322|06287|d275df58a04737c8 -mwagner@evoq.home.mwagner.org|Docs/Books/algor.eps|20001231203219|20480|481984607c98d715 -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000011.xml|20001017133713|00331|432156d127cbd22f -mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000015.xml|20001017133749|30814|b72689a8f9b21372 -mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/mysqltest.xsl|20001013051514|27425|1b8f6ec4f1b5f634 -sasha@mysql.sashanet.com|mysql-test/t/df_crash.test|20010406010433|65180|4c365178fe437f6 -serg@serg.mysql.com|mysql-test/t/sel000008.test|20001211130730|28581|b338ef585cadf7ae -serg@serg.mysql.com|mysql-test/t/sel000012.test|20001211130731|13215|ae64bff363c42e92 -serg@serg.mysql.com|mysql-test/t/sel000027.test|20001211130731|23677|ab44bb57a580de9 -tim@threads.polyesthetic.msg|bdb/db/crdel_auto.c|20010305004136|27298|ee4146a08fd175c1 -tim@threads.polyesthetic.msg|bdb/dist/config.hin|20010305004136|15955|fdecb7a06fa137a7 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_join.html|20010305004144|32446|a58c2d81ecfea5b -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_h_ffactor.html|20010305004144|08766|41352ddf74ccc338 -tim@threads.polyesthetic.msg|bdb/docs/api_c/db_set_lorder.html|20010305004144|11587|e24ae76325374653 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_lg_dir.html|20010305004145|05444|26be310214a2ff8f -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_region_init.html|20010305004145|31081|2ca19f76ee1ae790 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_set_shm_key.html|20010305004145|32880|cf5aaa6a995cbf55 -tim@threads.polyesthetic.msg|bdb/docs/api_c/env_version.html|20010305004145|40251|9bf7f99fefacc2bf -tim@threads.polyesthetic.msg|bdb/docs/api_c/log_get.html|20010305004145|50583|24cdf17ba55cbecf -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_open.html|20010305004146|04518|ab95c48ac26ad3f7 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_q_extentsize.html|20010305004146|21826|b17e340a68ede3ac -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/db_set_realloc.html|20010305004145|14370|64d967a58c328957 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_feedback.html|20010305004146|43755|1d5bd8dfe2d8034e -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_mutexlocks.html|20010305004146|55575|f73e7ffdd2d8d62f -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_shm_key.html|20010305004146|62685|65b2c2f848ddf31e -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/env_set_tmp_dir.html|20010305004146|00169|6c815da1fad27537 -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/lock_detect.html|20010305004146|07495|bb50519c431233ed -tim@threads.polyesthetic.msg|bdb/docs/api_cxx/memp_fsync.html|20010305004146|28227|76d47da7c5dc8932 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_cachesize.html|20010305004147|40035|22d172a2d29f276b -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_lorder.html|20010305004147|50103|f64cbdd62bbbdd7c -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_pagesize.html|20010305004147|51079|d899ea90b20b7b31 -tim@threads.polyesthetic.msg|bdb/docs/api_java/db_set_re_pad.html|20010305004147|54985|2729c192747ac7af -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_errpfx.html|20010305004147|08227|a3b9a09670f6912 -tim@threads.polyesthetic.msg|bdb/docs/api_java/env_set_flags.html|20010305004147|10283|690847bb5e205c21 -tim@threads.polyesthetic.msg|bdb/docs/api_java/log_file.html|20010305004148|13857|74a49bae2532199a -tim@threads.polyesthetic.msg|bdb/docs/api_java/memp_fget.html|20010305004148|21431|ca84dee01997eb89 -tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_abort.html|20010305004148|29858|ec9a3517748bfa3 -tim@threads.polyesthetic.msg|bdb/docs/api_java/txn_id.html|20010305004148|01920|798720b73cc9391 -tim@threads.polyesthetic.msg|bdb/docs/api_tcl/dbc_close.html|20010305004148|53244|ef431e58d72accc3 -tim@threads.polyesthetic.msg|bdb/docs/images/next.gif|20010305004148|03600|ddab96466674135b -tim@threads.polyesthetic.msg|bdb/docs/ref/am/curdup.html|20010305004148|14243|5c855e1f5b99d990 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/partial.html|20010305004148|26629|db4a970c839b3051 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/stat.html|20010305004148|32050|fafc0f88571d9395 -tim@threads.polyesthetic.msg|bdb/docs/ref/am/upgrade.html|20010305004149|00532|c7499736f03c1a1c -tim@threads.polyesthetic.msg|bdb/docs/ref/am_conf/re_source.html|20010305004149|31346|b000d11ca4a0f9a -tim@threads.polyesthetic.msg|bdb/docs/ref/build_unix/shlib.html|20010305004149|56099|7168ed40f2e1155d -tim@threads.polyesthetic.msg|bdb/docs/ref/build_vxworks/faq.html|20010305004149|61835|cdb7646d3d2e6374 -tim@threads.polyesthetic.msg|bdb/docs/ref/env/region.html|20010305004149|22506|cc94139c8daa7f6a -tim@threads.polyesthetic.msg|bdb/docs/ref/env/security.html|20010305004149|24507|e455f95aee7f5cd2 -tim@threads.polyesthetic.msg|bdb/docs/ref/intro/dbis.html|20010305004149|28303|e672b7615d70be2c tim@threads.polyesthetic.msg|bdb/docs/ref/program/copy.html|20010305004150|51641|bcf5ff9656fafcd3 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/dbsizes.html|20010305004150|52571|d70da530573b9b38 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/diskspace.html|20010305004150|53502|959508f155721ee8 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/environ.html|20010305004150|54494|dc4a48aa531bd399 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/errorret.html|20010305004150|55412|23491397d7e704e9 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/extending.html|20010305004150|56407|6a86a40872d6b8bc +tim@threads.polyesthetic.msg|bdb/docs/ref/program/mt.html|20010305004150|57429|552ab570b657fc0e +tim@threads.polyesthetic.msg|bdb/docs/ref/program/namespace.html|20010305004150|58394|182f8f762343bdc1 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/recimp.html|20010305004150|60288|bbdb0feb7d467a80 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/runtime.html|20010305004150|61233|6853fdbfe15df788 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/scope.html|20010305004150|59326|2987f97781410bc1 +tim@threads.polyesthetic.msg|bdb/docs/ref/program/solaris.txt|20010305004150|63135|8b6bb29de0d58ffe +tim@threads.polyesthetic.msg|bdb/docs/ref/program/version.html|20010305004150|62172|d266e819d1531df8 +tim@threads.polyesthetic.msg|bdb/docs/ref/refs/bdb_usenix.html|20010305004150|00758|bad2247b4f8c582b +tim@threads.polyesthetic.msg|bdb/docs/ref/refs/bdb_usenix.ps|20010305004150|02162|9851f6cdeff17481 +tim@threads.polyesthetic.msg|bdb/docs/ref/refs/embedded.html|20010305004150|03865|d25b9719d24df88c +tim@threads.polyesthetic.msg|bdb/docs/ref/refs/hash_usenix.ps|20010305004150|05408|11cad226b0aa012b tim@threads.polyesthetic.msg|bdb/docs/ref/refs/libtp_usenix.ps|20010305004150|08667|73329b041f7e8c41 +tim@threads.polyesthetic.msg|bdb/docs/ref/refs/refs.html|20010305004150|64422|30490b237ba9b61 +tim@threads.polyesthetic.msg|bdb/docs/ref/refs/witold.html|20010305004150|65330|ad6c866cf48734b5 +tim@threads.polyesthetic.msg|bdb/docs/ref/rpc/client.html|20010305004150|12568|824178f8626e45b7 +tim@threads.polyesthetic.msg|bdb/docs/ref/rpc/intro.html|20010305004150|13549|ad16bc20623e1192 +tim@threads.polyesthetic.msg|bdb/docs/ref/rpc/server.html|20010305004150|14510|79f560205494295 +tim@threads.polyesthetic.msg|bdb/docs/ref/sendmail/intro.html|20010305004150|16532|ecac45d7e2bcf51c +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/close.html|20010305004150|18046|1fe3a82f28e7ed32 +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/del.html|20010305004150|19030|514a1bd568ed4c1d +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/errors.html|20010305004150|19994|be11ff6410e1db2c +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/example.txt|20010305004150|28042|9ff88f22565208bf +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/get.html|20010305004150|20970|211de230d6a6cbc5 +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/handles.html|20010305004150|21935|18a14f4a50e7bad0 +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/intro.html|20010305004150|22878|7544c4688623a54c +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/keydata.html|20010305004150|23810|530b1581aeba63ca tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/open.html|20010305004150|24776|5d6eb5c3df68eeee +tim@threads.polyesthetic.msg|bdb/docs/ref/simple_tut/put.html|20010305004150|25774|bdd2629c212af471 +tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/error.html|20010305004151|21581|37b817c57777b460 +tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/faq.html|20010305004151|22367|f8433900f7f85400 +tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/intro.html|20010305004151|20749|d66c6c398e2ace0b +tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/program.html|20010305004151|23138|2f5bf497ae226ed5 +tim@threads.polyesthetic.msg|bdb/docs/ref/tcl/using.html|20010305004151|23908|28856d8c72d0660b +tim@threads.polyesthetic.msg|bdb/docs/ref/test/faq.html|20010305004151|38444|f95038006d18229 +tim@threads.polyesthetic.msg|bdb/docs/ref/test/run.html|20010305004151|39305|63c0398e7e2a29e2 +tim@threads.polyesthetic.msg|bdb/docs/ref/toc.html|20010305004148|08788|ab1fa294d5ef4b69 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/admin.html|20010305004151|41323|cf867ed0b00cccef +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/app.html|20010305004151|42111|6dc3c82982164fa8 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/archival.html|20010305004151|42978|7631314d840be181 tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/checkpoint.html|20010305004151|43948|29e077c954369ed tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/cursor.html|20010305004151|44775|824b2f28c9e8d610 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/data_open.html|20010305004151|45592|413c1d8aba9d8018 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/deadlock.html|20010305004151|46421|34914b9dc6b01703 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/env_open.html|20010305004151|47233|c8d61102658c3bbf +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/filesys.html|20010305004151|48077|ebee24f726f99bf6 tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/inc.html|20010305004151|48911|5ea32b4e2a2107b3 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/intro.html|20010305004151|49773|22096cea9fe159ac +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/logfile.html|20010305004151|50590|1c3002fcb6581e8c +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/put.html|20010305004151|51420|8cc785aeecff8535 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/read.html|20010305004151|52265|fc8b056380e09887 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/reclimit.html|20010305004151|53098|5f54174bf6026bd5 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/recovery.html|20010305004151|53956|6e3a0c07b997c3b2 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/term.html|20010305004151|54819|d6f3fa4fc5a630ec +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/throughput.html|20010305004151|55655|8a7d5a958df7f91a +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/transapp.txt|20010305004151|57368|337576ea2aae23b0 +tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/why.html|20010305004151|56525|c941c1a56a0adbaf tim@threads.polyesthetic.msg|bdb/docs/ref/transapp/writetest.txt|20010305004151|58289|4de1fc39894cd760 +tim@threads.polyesthetic.msg|bdb/docs/ref/txn/config.html|20010305004151|59874|c7337cb30f9bf66 tim@threads.polyesthetic.msg|bdb/docs/ref/txn/intro.html|20010305004151|60722|85fabd5518fb26be +tim@threads.polyesthetic.msg|bdb/docs/ref/txn/limits.html|20010305004151|61583|3004b7a93dab148b +tim@threads.polyesthetic.msg|bdb/docs/ref/txn/nested.html|20010305004151|62443|6860bbf2f29aa93b +tim@threads.polyesthetic.msg|bdb/docs/ref/txn/other.html|20010305004151|63311|4991722636b3a46d +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/convert.html|20010305004151|00512|d7f18eb34c1b6ae +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/disk.html|20010305004151|01410|94dc4e6e3668e613 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/intro.html|20010305004151|02261|8bfd3804a2da1598 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/system.html|20010305004151|03146|eae0256a127c3c89 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.2.0/toc.html|20010305004151|04069|670791f294a61494 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/close.html|20010305004151|05457|c79c866b393785cc +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/cxx.html|20010305004151|06323|7f3bfc9bba854d48 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/db.html|20010305004151|07207|e7d63f4bb8e989e8 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/db_cxx.html|20010305004151|08078|5c17d6a360205140 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/dbenv.html|20010305004151|08972|f9863847dc1ed617 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/dbenv_cxx.html|20010305004151|09872|7f4fd0ebace36d8e +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/dbinfo.html|20010305004151|10780|7529af7145c0680a +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/disk.html|20010305004151|11685|eb79d1157ef44d3c tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/eacces.html|20010305004151|12569|f0299373d8b2f65c tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/eagain.html|20010305004151|13462|920800d8eb450f79 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/envopen.html|20010305004151|14369|5e768fd180f471e4 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/func.html|20010305004151|15332|c06e5bc63ddf7a64 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/intro.html|20010305004151|16219|7ecd16967b0bc868 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/java.html|20010305004151|17120|300acccbb633e335 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/join.html|20010305004151|18031|ec21d874caa0654 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/jump_set.html|20010305004151|18936|718c098a91db9dba +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/lock_detect.html|20010305004151|19846|fb307b10156762ca +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/lock_notheld.html|20010305004151|20761|ed6853b6daa5531b +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/lock_put.html|20010305004151|21664|fd9ed0b04b465af +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/lock_stat.html|20010305004151|22568|c49716e693ce225b +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/log_register.html|20010305004151|23513|399320e965adf598 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/log_stat.html|20010305004151|24428|20b5898ba061557d +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/memp_stat.html|20010305004151|25363|79e1141c63f7357 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/open.html|20010305004151|27357|8b1e2a969e97069a +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/rmw.html|20010305004151|28431|992b0143d13a3ec0 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/stat.html|20010305004151|29377|775d75e3ba02d15c +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/toc.html|20010305004151|30301|16e7d8e76496cbc9 tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/txn_begin.html|20010305004151|31307|53512180de5fec80 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/txn_commit.html|20010305004151|32241|e1debf9ea769426c +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/txn_stat.html|20010305004151|33181|516f1870c6127351 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/value_set.html|20010305004151|34118|f0b0c770a81b90b6 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.0/xa.html|20010305004152|00602|1af042e462ab829 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/btstat.html|20010305004152|37584|40a76aef8b25a948 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/config.html|20010305004152|38401|d2ace28f39ab0f8d +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/disk.html|20010305004152|39192|2abdaf9059265ba9 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/dup.html|20010305004152|40004|911018877c118b45 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/env.html|20010305004152|40827|381e366a9c9c9a37 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/intro.html|20010305004152|41719|64592a50b1c634d6 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/log_register.html|20010305004152|42524|7177eeb2fc099317 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/logalloc.html|20010305004152|43372|30563c544b8ddd54 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/memp_register.html|20010305004152|44171|7d92464a1029d53e +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/put.html|20010305004152|44997|961a1a689be6ce +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/set_feedback.html|20010305004152|45815|6d7de50be92a5488 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/set_paniccall.html|20010305004152|46636|8f9741244fb6e9f6 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/set_tx_recover.html|20010305004152|47442|ada65907ba98eee8 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/sysmem.html|20010305004152|48282|3d088eb0ef1b27e0 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/tcl.html|20010305004152|49096|f5c85b09c33bda4 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/tmp.html|20010305004152|50733|ef3450f6fa89f2dc +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/toc.html|20010305004152|49908|af1a24798980ad1 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.1/txn_check.html|20010305004152|51549|2405b25bc92cc476 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/callback.html|20010305004152|53656|64a2b2b85cc253c1 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/db_dump.html|20010305004152|54477|7d1cac3358c0482e +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/disk.html|20010305004152|55280|61799ebebe78ebb2 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/handle.html|20010305004152|56086|bb8a73b74d4399ae +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/incomplete.html|20010305004152|56914|af86a649a878a124 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/intro.html|20010305004152|57734|984a9f7dd07e0c14 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/mutexlock.html|20010305004152|58567|972b710c5bdba67c +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/notfound.html|20010305004152|59393|dc91c094aba92838 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/renumber.html|20010305004152|60219|d6cd798434da81aa +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/set_flags.html|20010305004152|61061|213809ca8d7802d0 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/toc.html|20010305004152|61902|9c94c533ada43c1a +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade.3.2/tx_recover.html|20010305004152|62754|132a354cde7a8286 +tim@threads.polyesthetic.msg|bdb/docs/ref/upgrade/process.html|20010305004151|64704|78f9ca966a587234 +tim@threads.polyesthetic.msg|bdb/docs/ref/xa/config.html|20010305004152|64479|3f3f449c305e66b4 +tim@threads.polyesthetic.msg|bdb/docs/ref/xa/faq.html|20010305004152|65373|7aa890c7b70f1293 +tim@threads.polyesthetic.msg|bdb/docs/ref/xa/intro.html|20010305004152|00728|8ac020ffb869e9a8 +tim@threads.polyesthetic.msg|bdb/docs/sleepycat/contact.html|20010305004152|04402|55b4da3d7bf7655b +tim@threads.polyesthetic.msg|bdb/docs/sleepycat/legal.html|20010305004152|02616|7388af4c578cacf6 +tim@threads.polyesthetic.msg|bdb/docs/sleepycat/license.html|20010305004152|03483|9371001bbf0ba2dd +tim@threads.polyesthetic.msg|bdb/docs/utility/berkeley_db_svc.html|20010305004152|06576|91fe012778882ce4 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_archive.html|20010305004152|07446|ab2c66e01b3e3626 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_checkpoint.html|20010305004152|08309|c040e4424edcc451 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_deadlock.html|20010305004152|09191|f23f99911c3e5784 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_dump.html|20010305004152|10062|5de7ade427f20332 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_load.html|20010305004152|10976|981095940db0197 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_printlog.html|20010305004152|11895|fcc4075ad0232842 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_recover.html|20010305004152|12771|1b63f2acdc0b0af7 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_stat.html|20010305004152|13652|9582c327964e1f9 +tim@threads.polyesthetic.msg|bdb/docs/utility/db_upgrade.html|20010305004152|14532|6444f26a93f77ea +tim@threads.polyesthetic.msg|bdb/docs/utility/db_verify.html|20010305004152|15424|4fee9bfa2f9ab41a +tim@threads.polyesthetic.msg|bdb/docs/utility/index.html|20010305004152|05717|66c82ee036c1b369 +tim@threads.polyesthetic.msg|bdb/hash/hash_auto.c|20010305004137|61459|d17c6a6ed4f181d1 +tim@threads.polyesthetic.msg|bdb/include/btree_auto.h|20010305004137|17274|84d4451c78faf67e +tim@threads.polyesthetic.msg|bdb/include/btree_ext.h|20010305004137|18246|5d53d710f170c6b6 +tim@threads.polyesthetic.msg|bdb/include/clib_ext.h|20010305004137|19207|ed9d9f7965f0e1d3 +tim@threads.polyesthetic.msg|bdb/include/common_ext.h|20010305004137|20146|35c8aab64ee3b8fd +tim@threads.polyesthetic.msg|bdb/include/crdel_auto.h|20010305004137|21088|1b8255da47550ece +tim@threads.polyesthetic.msg|bdb/include/db_auto.h|20010305004137|26350|994ddc84db334345 +tim@threads.polyesthetic.msg|bdb/include/db_ext.h|20010305004137|29469|a1e210bbd0de0a48 +tim@threads.polyesthetic.msg|bdb/include/db_server.h|20010305004137|34247|61a33aa05bf368a7 +tim@threads.polyesthetic.msg|bdb/include/env_ext.h|20010305004138|05832|33a5fdef1aeecefd +tim@threads.polyesthetic.msg|bdb/include/gen_client_ext.h|20010305004138|06647|5c621cacb18b38 +tim@threads.polyesthetic.msg|bdb/include/gen_server_ext.h|20010305004138|07539|fd7bcfe6bbca8bcb +tim@threads.polyesthetic.msg|bdb/include/hash_auto.h|20010305004138|09216|1b79cdd426d7ef25 +tim@threads.polyesthetic.msg|bdb/include/hash_ext.h|20010305004138|10079|5b31ff8413481606 +tim@threads.polyesthetic.msg|bdb/include/lock_ext.h|20010305004138|11814|ccd0785bb206933f +tim@threads.polyesthetic.msg|bdb/include/log_auto.h|20010305004138|13513|8d52dd0884d03051 tim@threads.polyesthetic.msg|bdb/include/log_ext.h|20010305004138|14339|2988f11d4545c76b +tim@threads.polyesthetic.msg|bdb/include/mp_ext.h|20010305004138|17070|a528b772d42d6455 +tim@threads.polyesthetic.msg|bdb/include/mutex_ext.h|20010305004138|19006|f20f47ddc346598b +tim@threads.polyesthetic.msg|bdb/include/os_ext.h|20010305004138|20730|a1771032b4d2d53b +tim@threads.polyesthetic.msg|bdb/include/qam_auto.h|20010305004138|24568|96f6c045fd0d6cab +tim@threads.polyesthetic.msg|bdb/include/qam_ext.h|20010305004138|25430|9993db1fb3428b6d +tim@threads.polyesthetic.msg|bdb/include/rpc_client_ext.h|20010305004138|28220|85436ca9b5691338 +tim@threads.polyesthetic.msg|bdb/include/rpc_server_ext.h|20010305004138|29091|952741fb85de2b80 +tim@threads.polyesthetic.msg|bdb/include/tcl_ext.h|20010305004138|31857|6759d22aa2ff5f39 +tim@threads.polyesthetic.msg|bdb/include/txn_auto.h|20010305004138|33645|e3f49e94fd291c45 +tim@threads.polyesthetic.msg|bdb/include/txn_ext.h|20010305004138|34549|9db24c14f204890c tim@threads.polyesthetic.msg|bdb/include/xa_ext.h|20010305004138|36449|50918e5ef9f095b6 tim@threads.polyesthetic.msg|bdb/java/src/com/sleepycat/db/DbConstants.java|20010305004138|56622|15fa87eda6b72302 +tim@threads.polyesthetic.msg|bdb/log/log_auto.c|20010305004137|49459|fe8c0369965f7151 +tim@threads.polyesthetic.msg|bdb/qam/qam_auto.c|20010305004141|31764|361954d3f149feb0 +tim@threads.polyesthetic.msg|bdb/rpc_client/db_server_clnt.c|20010305004141|41933|b548b860f765c597 +tim@threads.polyesthetic.msg|bdb/rpc_client/gen_client.c|20010305004141|43060|ad86f092d0996a68 +tim@threads.polyesthetic.msg|bdb/rpc_server/db_server.x|20010305004141|47705|811aeb6b630fe7aa +tim@threads.polyesthetic.msg|bdb/rpc_server/db_server_proc.sed|20010305004141|49906|1a9af8e5b051acbd +tim@threads.polyesthetic.msg|bdb/rpc_server/db_server_svc.c|20010305004141|50897|35804eb82b953f49 +tim@threads.polyesthetic.msg|bdb/rpc_server/db_server_xdr.c|20010305004141|53794|336ef020b4a22c05 +tim@threads.polyesthetic.msg|bdb/rpc_server/gen_db_server.c|20010305004141|54931|d5602f9bd5c930e +tim@threads.polyesthetic.msg|bdb/test/include.tcl|20010305004141|34016|20fc297b040cbe2 +tim@threads.polyesthetic.msg|bdb/test/logtrack.list|20010305004142|05743|7f4f1382b37d98e5 +tim@threads.polyesthetic.msg|bdb/txn/txn_auto.c|20010305004143|19863|6eb282f016f606d9 +tonu@x3.internalnet|include/vio.h|20010520213124|42404|c62fd2b86c03da7d diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 52fff02a21d..eab0803bec8 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -1,3 +1,4 @@ +Administrador@light. Administrator@co3064164-a. Administrator@co3064164-a.rochd1.qld.optushome.com.au Administrator@fred. @@ -11,6 +12,7 @@ arjen@george.bitbike.com bar@bar.mysql.r18.ru bar@bar.udmsearch.izhnet.ru bell@sanja.is.com.ua +bk@admin.bk davida@isil.mysql.com heikki@donna.mysql.fi heikki@hundin.mysql.fi @@ -62,6 +64,7 @@ serg@build.mysql2.com serg@serg.mysql.com serg@sergbook.mysql.com sinisa@rhols221.adsl.netsonic.fi +tfr@beta.frontier86.ee tfr@indrek.tfr.cafe.ee tfr@sarvik.tfr.cafe.ee tim@bitch.mysql.fi @@ -82,5 +85,3 @@ worm@altair.is.lan zak@balfor.local zak@linux.local zgreant@mysql.com -tfr@beta.frontier86.ee -Administrador@light. diff --git a/BitKeeper/etc/skipkeys b/BitKeeper/etc/skipkeys new file mode 100644 index 00000000000..36b38ab1c21 --- /dev/null +++ b/BitKeeper/etc/skipkeys @@ -0,0 +1,7 @@ +BK|scripts/safe_mysqld.sh|19700101030959|01930|d0a3cc73fd1b0d8d tim@localhost.polyesthetic.msg|scripts/safe_mysqld.sh|20000802235627|38519 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe arjen@co3064164-a.bitbike.com|BitKeeper/etc/logging_ok|20011212060636|33009 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe jcole@tetra.bedford.progress.com|BitKeeper/etc/logging_ok|20001004201211|30554 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe sasha@work.mysql.com|BitKeeper/etc/logging_ok|20000802223223|24242 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe tim@localhost.polyesthetic.msg|BitKeeper/etc/logging_ok|20000802235640|27343 +bk@work.mysql.com|ChangeSet|20000731191004|44203|eae70093a6122e66+ sasha@work.mysql.com|ChangeSet|20000802223249|54774 +bk@work.mysql.com|ChangeSet|20000731191004|44203|eae70093a6122e66+ tim@localhost.polyesthetic.msg|ChangeSet|20000802235645|56533 From 7ce04cdad3698f36501b97ba8f7f0ec56b6f525a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Oct 2002 21:33:28 +0600 Subject: [PATCH 006/246] BK automatic LOD removal. BitKeeper/etc/skipkeys: auto add BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BitKeeper/etc/gone | 184 +++++++++++++++++++-------------------- BitKeeper/etc/logging_ok | 7 +- BitKeeper/etc/skipkeys | 6 ++ 3 files changed, 102 insertions(+), 95 deletions(-) create mode 100644 BitKeeper/etc/skipkeys diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index b952e8e0780..6d4da9062d2 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -4,11 +4,44 @@ BK|config.h.in|19700101030959|00050|aecae693cca472c BK|include/my_global.h|19700101030959|00105|f657f708961a4632 BK|libmysql/acconfig.h|19700101030959|02604|7b620dbd69ea6074 BK|mit-pthreads/config.flags|19700101030959|00594|dcec5296ef811cd6 +BK|mit-pthreads/machdep/i386-sco-3.2v5/__math.h|19700101030959|01011|79d9a37715f2c7fe +BK|mit-pthreads/machdep/i386-sco-3.2v5/__signal.h|19700101030959|01012|45332b2a56f62580 +BK|mit-pthreads/machdep/i386-sco-3.2v5/__stdio.h|19700101030959|01013|a81562134446c64c +BK|mit-pthreads/machdep/i386-sco-3.2v5/__stdlib.h|19700101030959|01014|bcbed6d62d1885ae +BK|mit-pthreads/machdep/i386-sco-3.2v5/__string.h|19700101030959|01015|94a2e4f9574bf1e8 +BK|mit-pthreads/machdep/i386-sco-3.2v5/__time.h|19700101030959|01016|2cde57d8feea7fc8 +BK|mit-pthreads/machdep/i386-sco-3.2v5/__unistd.h|19700101030959|01017|5cc4575b5a74066f +BK|mit-pthreads/machdep/i386-sco-3.2v5/compat.h|19700101030959|01018|1f7e450a2e18603e +BK|mit-pthreads/machdep/i386-sco-3.2v5/dirent.h|19700101030959|01019|13608bf11af98f70 +BK|mit-pthreads/machdep/i386-sco-3.2v5/posix/__signal.h|19700101030959|01024|9bb7b240bec88b2d +BK|mit-pthreads/machdep/i386-sco-3.2v5/socket.h|19700101030959|01020|9f78f7e5a7b4a83f +BK|mit-pthreads/machdep/i386-sco-3.2v5/syscall.h|19700101030959|01021|d9543a0474656339 +BK|mit-pthreads/machdep/i386-sco-3.2v5/timers.h|19700101030959|01022|d5e694e48990538c +BK|mit-pthreads/machdep/i386-sco-3.2v5/trash.can|19700101030959|01023|9332039abd82a925 +BK|mit-pthreads/machdep/sco-3.2v5/__math.h|19700101030959|00971|f3855eb411435a06 +BK|mit-pthreads/machdep/sco-3.2v5/__signal.h|19700101030959|00972|3d6f84e96bc1462 +BK|mit-pthreads/machdep/sco-3.2v5/__stdio.h|19700101030959|00973|b991fad3327275e0 +BK|mit-pthreads/machdep/sco-3.2v5/__stdlib.h|19700101030959|00974|6179a0922d90025e +BK|mit-pthreads/machdep/sco-3.2v5/__string.h|19700101030959|00975|d2cc42eeb5e1666 +BK|mit-pthreads/machdep/sco-3.2v5/__time.h|19700101030959|00976|a9594bab280ced64 +BK|mit-pthreads/machdep/sco-3.2v5/__unistd.h|19700101030959|00977|99e6f1116d1f920 +BK|mit-pthreads/machdep/sco-3.2v5/compat.h|19700101030959|00978|3f150ff6223d49be +BK|mit-pthreads/machdep/sco-3.2v5/dirent.h|19700101030959|00979|388af3465ad4680f +BK|mit-pthreads/machdep/sco-3.2v5/posix/__signal.h|19700101030959|00984|5e14827a3b91a6db +BK|mit-pthreads/machdep/sco-3.2v5/socket.h|19700101030959|00980|1b409f3f1fcbbf7a +BK|mit-pthreads/machdep/sco-3.2v5/syscall.h|19700101030959|00981|c69bd58eba4d5076 +BK|mit-pthreads/machdep/sco-3.2v5/timers.h|19700101030959|00982|4907a958151368ed +BK|mit-pthreads/machdep/sco-3.2v5/trash.can|19700101030959|00983|7eecac9fc944ade2 BK|myisam/common_words|19700101030959|01665|13c10ef32aaa7537 BK|myisam/mi_test_all|19700101030959|01666|ae7a366c45527b4e BK|mysys/mf_reccache.c|19700101030959|01419|f8191c8485e158fe +BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02361|6a0a837742a861bb +BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686|19700101030959|02348|e87091e2a6dce931 +BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02326|70981cb1dd58d3fb +BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02327|67957b2b80839c59 BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.2.12_20smp_i686|19700101030959|02437|28211fb9f0e6ab0e BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02438|136bdd9fd1a2cd14 +BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02362|20e8179c6f87930d BK|sql-bench/Results-linux/ATIS-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02443|defb62af5958fcac BK|sql-bench/Results-linux/Attic/ATIS-mysql-Linux_2.0.33_i586|19700101030959|02381|ef64fcf54c271212 BK|sql-bench/Results-linux/Attic/ATIS-mysql-Linux_dynamic|19700101030959|02382|ffa77bdc262ac10f @@ -66,29 +99,67 @@ BK|sql-bench/Results-linux/Attic/wisconsin-mysql-Linux_static|19700101030959|024 BK|sql-bench/Results-linux/Attic/wisconsin-mysql_fast-Linux_2.0.33_i586|19700101030959|02434|7d98b33fa6d91a87 BK|sql-bench/Results-linux/Attic/wisconsin-mysql_local_tcp-Linux_2.0.33_i586|19700101030959|02435|28a4840ebd5dd015 BK|sql-bench/Results-linux/Attic/wisconsin-mysql_new-Linux_2.0.33_i586|19700101030959|02436|e1f17edfbee1f22e +BK|sql-bench/Results-linux/RUN-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02365|5e446b99518aa0b1 +BK|sql-bench/Results-linux/RUN-interbase-Linux_2.2.14_5.0_i686|19700101030959|02351|9a0d8be7d641fae7 +BK|sql-bench/Results-linux/RUN-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02334|5f0504783180d906 +BK|sql-bench/Results-linux/RUN-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02335|6abba8bd8d9f8b7b BK|sql-bench/Results-linux/RUN-mysql-Linux_2.2.12_20smp_i686|19700101030959|02328|da28ced3e0aac09c BK|sql-bench/Results-linux/RUN-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02329|f6fa9f46d4a6152 +BK|sql-bench/Results-linux/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02366|730674f4ac333638 BK|sql-bench/Results-linux/RUN-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02444|16694c5927b7600c +BK|sql-bench/Results-linux/alter-table-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02367|e901749edf05bb58 +BK|sql-bench/Results-linux/alter-table-interbase-Linux_2.2.14_5.0_i686|19700101030959|02352|c4e27f25a15b6681 BK|sql-bench/Results-linux/alter-table-mysql-Linux_2.2.12_20smp_i686|19700101030959|02330|67ae4e91b5f4eabd BK|sql-bench/Results-linux/alter-table-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02331|c85eb85ba45dd748 +BK|sql-bench/Results-linux/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02368|19c95f9fc4ee458 BK|sql-bench/Results-linux/alter-table-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02445|b062db76cf6df5d2 +BK|sql-bench/Results-linux/big-tables-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02371|c0c1c5efea0661ad +BK|sql-bench/Results-linux/big-tables-interbase-Linux_2.2.14_5.0_i686|19700101030959|02353|beba3adfcfd472c0 +BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02341|cabe523a8f103945 +BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02342|c682fb7ee1fb3d8 BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.2.12_20smp_i686|19700101030959|02332|a2dcb74a3c73ac18 BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02333|b5f4f4c35225f0f +BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02372|69d33d25eda85041 BK|sql-bench/Results-linux/big-tables-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02446|a9eedd951eab7e8b +BK|sql-bench/Results-linux/connect-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02373|744f1e38649d21d +BK|sql-bench/Results-linux/connect-interbase-Linux_2.2.14_5.0_i686|19700101030959|02354|c28534284b9f5657 +BK|sql-bench/Results-linux/connect-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02349|ebdc62367f5fcd43 +BK|sql-bench/Results-linux/connect-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02350|7ed494b7cc7081c9 BK|sql-bench/Results-linux/connect-mysql-Linux_2.2.12_20smp_i686|19700101030959|02336|beedcd769a903c19 BK|sql-bench/Results-linux/connect-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02337|74ec2bf5f55b81f +BK|sql-bench/Results-linux/connect-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02374|55d777517ce8091 BK|sql-bench/Results-linux/connect-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02447|f6d7665c418d62c6 +BK|sql-bench/Results-linux/create-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02377|d60ca06157cfc9b9 +BK|sql-bench/Results-linux/create-interbase-Linux_2.2.14_5.0_i686|19700101030959|02355|537da98f6c1bc6df +BK|sql-bench/Results-linux/create-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02356|612a182b889dd778 +BK|sql-bench/Results-linux/create-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02357|b501391eec112dd0 BK|sql-bench/Results-linux/create-mysql-Linux_2.2.12_20smp_i686|19700101030959|02338|fe23ee50aea195f4 BK|sql-bench/Results-linux/create-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02339|771b40d3280fe8ad +BK|sql-bench/Results-linux/create-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02378|35bd48cfe30c16a3 BK|sql-bench/Results-linux/create-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02448|c46d6c283c0e34ae +BK|sql-bench/Results-linux/insert-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02379|25161ee7c13036c1 +BK|sql-bench/Results-linux/insert-interbase-Linux_2.2.14_5.0_i686|19700101030959|02358|461a48df25628c0f +BK|sql-bench/Results-linux/insert-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02363|3260743076dbe95f +BK|sql-bench/Results-linux/insert-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02364|9de5538694cd87ea BK|sql-bench/Results-linux/insert-mysql-Linux_2.2.12_20smp_i686|19700101030959|02340|f120b0ead3836c81 BK|sql-bench/Results-linux/insert-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02343|17f262f12d2244bc +BK|sql-bench/Results-linux/insert-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02380|7451b789c29b7dcd BK|sql-bench/Results-linux/insert-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02449|3245ba5633a18e8 +BK|sql-bench/Results-linux/select-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02439|816ec12a9152b578 +BK|sql-bench/Results-linux/select-interbase-Linux_2.2.14_5.0_i686|19700101030959|02359|3535cd00c2a9cb5d +BK|sql-bench/Results-linux/select-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02369|de288cd8c11e1749 +BK|sql-bench/Results-linux/select-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02370|a82e759dbd5d66b BK|sql-bench/Results-linux/select-mysql-Linux_2.2.12_20smp_i686|19700101030959|02344|3b64aff0dfddfff4 BK|sql-bench/Results-linux/select-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02345|9fd9c6e036f988d7 +BK|sql-bench/Results-linux/select-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02440|862a7c0ef1b17f29 BK|sql-bench/Results-linux/select-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02450|744633c6e13a897f +BK|sql-bench/Results-linux/wisconsin-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02441|cb767c1f9abc2ebd +BK|sql-bench/Results-linux/wisconsin-interbase-Linux_2.2.14_5.0_i686|19700101030959|02360|9404247a2e483b34 +BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02375|8669562660b2c238 +BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02376|c7cbe3b167655f9c BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.12_20smp_i686|19700101030959|02346|d49db545341a732f BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.13_SMP_alpha|19700101030959|02347|ad7babd436f26841 +BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02442|74b238eca114dbbe BK|sql-bench/Results-linux/wisconsin-mysql_fast-Linux_2.2.13_SMP_alpha|19700101030959|02451|6ad065fe4c6b4fa9 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133 @@ -236,7 +307,28 @@ BK|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|197001 BK|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02270|ef201ca14f635c57 BK|sql/share/romanian/errmsg.sys|19700101030959|01869|9d8282efb437e8cc BK|sql/share/romanian/errmsg.txt|19700101030959|01870|2c64fb13a8f104ad +jcole@tetra.bedford.progress.com|BitKeeper/etc/logging_ok|20001004201211|30554 monty@donna.mysql.com|myisam/mi_debug.c|20000829092809|23459|873a6e7d6ff8297c +monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|34755|45d7837423db243f +monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|37262|2274651e29d38b07 +monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|39831|a6ef8229d40b75d1 +monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|42374|65ccbcd7b1c4d7b5 +monty@donna.mysql.com|sql-bench/Results-linux/alter-table-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|44909|de84e4a2fd07f53 +monty@donna.mysql.com|sql-bench/Results-linux/alter-table-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|47422|ee162dd1474ba9d8 +monty@donna.mysql.com|sql-bench/Results-linux/big-tables-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|49948|d11a751a268a4df3 +monty@donna.mysql.com|sql-bench/Results-linux/big-tables-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|52469|c13eca5ec25cd6e1 +monty@donna.mysql.com|sql-bench/Results-linux/connect-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|54998|dfaa50e67eb15556 +monty@donna.mysql.com|sql-bench/Results-linux/connect-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|57532|4015a2bef627d8cd +monty@donna.mysql.com|sql-bench/Results-linux/create-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|60103|fa19b9a2c7a3c3c +monty@donna.mysql.com|sql-bench/Results-linux/create-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|62710|21ec8ba1ea3ca4c4 +monty@donna.mysql.com|sql-bench/Results-linux/insert-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|65289|a02aceb3b30de493 +monty@donna.mysql.com|sql-bench/Results-linux/insert-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|02393|7c9baa774fc324e1 +monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|05001|da73eefa16ca9383 +monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|07610|cffd7d282a90113a +monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|10615|8dcd7271a9137341 +monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|13213|4398328883aa75da +mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876 +mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b93948768 mwagner@evoq.home.mwagner.org|mysql-test/mybin/start-mysqld|20001016055648|54840|9c8f21a7ab97793a mwagner@evoq.home.mwagner.org|mysql-test/mybin/stop-mysqld|20001016055653|20710|89a1194045f05d1c mwagner@evoq.home.mwagner.org|mysql-test/mybin/translate-tests|20001018130217|00206|3869c1fdf0a5ea1a @@ -315,95 +407,3 @@ sasha@mysql.sashanet.com|mysql-test/t/include/master-slave.inc|20001118030458|01 sasha@work.mysql.com|BitKeeper/etc/logging_ok|20001214015456|29919|32b6551b8288c2fa serg@serg.mysql.com|mysql-test/r/3.23/mrg000001.dummy.result|20001206231604|05053|bf7e6d609f22b897 serg@serg.mysql.com|mysql-test/r/3.23/mrg000001.result|20001206231609|46662|db2ef2e717ab8332 -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876 -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b93948768 -BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02361|6a0a837742a861bb -BK|sql-bench/Results-linux/ATIS-interbase-Linux_2.2.14_5.0_i686|19700101030959|02348|e87091e2a6dce931 -BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02326|70981cb1dd58d3fb -BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02327|67957b2b80839c59 -BK|sql-bench/Results-linux/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02362|20e8179c6f87930d -BK|sql-bench/Results-linux/RUN-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02365|5e446b99518aa0b1 -BK|sql-bench/Results-linux/RUN-interbase-Linux_2.2.14_5.0_i686|19700101030959|02351|9a0d8be7d641fae7 -BK|sql-bench/Results-linux/RUN-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02334|5f0504783180d906 -BK|sql-bench/Results-linux/RUN-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02335|6abba8bd8d9f8b7b -BK|sql-bench/Results-linux/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02366|730674f4ac333638 -BK|sql-bench/Results-linux/alter-table-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02367|e901749edf05bb58 -BK|sql-bench/Results-linux/alter-table-interbase-Linux_2.2.14_5.0_i686|19700101030959|02352|c4e27f25a15b6681 -BK|sql-bench/Results-linux/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02368|19c95f9fc4ee458 -BK|sql-bench/Results-linux/big-tables-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02371|c0c1c5efea0661ad -BK|sql-bench/Results-linux/big-tables-interbase-Linux_2.2.14_5.0_i686|19700101030959|02353|beba3adfcfd472c0 -BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02341|cabe523a8f103945 -BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02342|c682fb7ee1fb3d8 -BK|sql-bench/Results-linux/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02372|69d33d25eda85041 -BK|sql-bench/Results-linux/connect-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02373|744f1e38649d21d -BK|sql-bench/Results-linux/connect-interbase-Linux_2.2.14_5.0_i686|19700101030959|02354|c28534284b9f5657 -BK|sql-bench/Results-linux/connect-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02349|ebdc62367f5fcd43 -BK|sql-bench/Results-linux/connect-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02350|7ed494b7cc7081c9 -BK|sql-bench/Results-linux/connect-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02374|55d777517ce8091 -BK|sql-bench/Results-linux/create-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02377|d60ca06157cfc9b9 -BK|sql-bench/Results-linux/create-interbase-Linux_2.2.14_5.0_i686|19700101030959|02355|537da98f6c1bc6df -BK|sql-bench/Results-linux/create-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02356|612a182b889dd778 -BK|sql-bench/Results-linux/create-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02357|b501391eec112dd0 -BK|sql-bench/Results-linux/create-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02378|35bd48cfe30c16a3 -BK|sql-bench/Results-linux/insert-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02379|25161ee7c13036c1 -BK|sql-bench/Results-linux/insert-interbase-Linux_2.2.14_5.0_i686|19700101030959|02358|461a48df25628c0f -BK|sql-bench/Results-linux/insert-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02363|3260743076dbe95f -BK|sql-bench/Results-linux/insert-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02364|9de5538694cd87ea -BK|sql-bench/Results-linux/insert-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02380|7451b789c29b7dcd -BK|sql-bench/Results-linux/select-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02439|816ec12a9152b578 -BK|sql-bench/Results-linux/select-interbase-Linux_2.2.14_5.0_i686|19700101030959|02359|3535cd00c2a9cb5d -BK|sql-bench/Results-linux/select-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02369|de288cd8c11e1749 -BK|sql-bench/Results-linux/select-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02370|a82e759dbd5d66b -BK|sql-bench/Results-linux/select-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02440|862a7c0ef1b17f29 -BK|sql-bench/Results-linux/wisconsin-interbase-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02441|cb767c1f9abc2ebd -BK|sql-bench/Results-linux/wisconsin-interbase-Linux_2.2.14_5.0_i686|19700101030959|02360|9404247a2e483b34 -BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.0.33_i586-cmp-access,mysql|19700101030959|02375|8669562660b2c238 -BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.0.33_i586-cmp-ms-sql,mysql,sybase|19700101030959|02376|c7cbe3b167655f9c -BK|sql-bench/Results-linux/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-interbase,mysql|19700101030959|02442|74b238eca114dbbe -monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|34755|45d7837423db243f -monty@donna.mysql.com|sql-bench/Results-linux/ATIS-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|37262|2274651e29d38b07 -monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|39831|a6ef8229d40b75d1 -monty@donna.mysql.com|sql-bench/Results-linux/RUN-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|42374|65ccbcd7b1c4d7b5 -monty@donna.mysql.com|sql-bench/Results-linux/alter-table-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|44909|de84e4a2fd07f53 -monty@donna.mysql.com|sql-bench/Results-linux/alter-table-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|47422|ee162dd1474ba9d8 -monty@donna.mysql.com|sql-bench/Results-linux/big-tables-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|49948|d11a751a268a4df3 -monty@donna.mysql.com|sql-bench/Results-linux/big-tables-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|52469|c13eca5ec25cd6e1 -monty@donna.mysql.com|sql-bench/Results-linux/connect-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|54998|dfaa50e67eb15556 -monty@donna.mysql.com|sql-bench/Results-linux/connect-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|57532|4015a2bef627d8cd -monty@donna.mysql.com|sql-bench/Results-linux/create-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|60103|fa19b9a2c7a3c3c -monty@donna.mysql.com|sql-bench/Results-linux/create-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|62710|21ec8ba1ea3ca4c4 -monty@donna.mysql.com|sql-bench/Results-linux/insert-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|65289|a02aceb3b30de493 -monty@donna.mysql.com|sql-bench/Results-linux/insert-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|02393|7c9baa774fc324e1 -monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|05001|da73eefa16ca9383 -monty@donna.mysql.com|sql-bench/Results-linux/select-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|07610|cffd7d282a90113a -monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug-Linux_2.2.14_my_SMP_i686|20001218140918|10615|8dcd7271a9137341 -monty@donna.mysql.com|sql-bench/Results-linux/wisconsin-mysql_dbug_full-Linux_2.2.14_my_SMP_i686|20001218140918|13213|4398328883aa75da -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876 -BK|mit-pthreads/machdep/i386-sco-3.2v5/__math.h|19700101030959|01011|79d9a37715f2c7fe -BK|mit-pthreads/machdep/i386-sco-3.2v5/__signal.h|19700101030959|01012|45332b2a56f62580 -BK|mit-pthreads/machdep/i386-sco-3.2v5/__stdio.h|19700101030959|01013|a81562134446c64c -BK|mit-pthreads/machdep/i386-sco-3.2v5/__stdlib.h|19700101030959|01014|bcbed6d62d1885ae -BK|mit-pthreads/machdep/i386-sco-3.2v5/__string.h|19700101030959|01015|94a2e4f9574bf1e8 -BK|mit-pthreads/machdep/i386-sco-3.2v5/__time.h|19700101030959|01016|2cde57d8feea7fc8 -BK|mit-pthreads/machdep/i386-sco-3.2v5/__unistd.h|19700101030959|01017|5cc4575b5a74066f -BK|mit-pthreads/machdep/i386-sco-3.2v5/compat.h|19700101030959|01018|1f7e450a2e18603e -BK|mit-pthreads/machdep/i386-sco-3.2v5/dirent.h|19700101030959|01019|13608bf11af98f70 -BK|mit-pthreads/machdep/i386-sco-3.2v5/posix/__signal.h|19700101030959|01024|9bb7b240bec88b2d -BK|mit-pthreads/machdep/i386-sco-3.2v5/socket.h|19700101030959|01020|9f78f7e5a7b4a83f -BK|mit-pthreads/machdep/i386-sco-3.2v5/syscall.h|19700101030959|01021|d9543a0474656339 -BK|mit-pthreads/machdep/i386-sco-3.2v5/timers.h|19700101030959|01022|d5e694e48990538c -BK|mit-pthreads/machdep/i386-sco-3.2v5/trash.can|19700101030959|01023|9332039abd82a925 -BK|mit-pthreads/machdep/sco-3.2v5/__math.h|19700101030959|00971|f3855eb411435a06 -BK|mit-pthreads/machdep/sco-3.2v5/__signal.h|19700101030959|00972|3d6f84e96bc1462 -BK|mit-pthreads/machdep/sco-3.2v5/__stdio.h|19700101030959|00973|b991fad3327275e0 -BK|mit-pthreads/machdep/sco-3.2v5/__stdlib.h|19700101030959|00974|6179a0922d90025e -BK|mit-pthreads/machdep/sco-3.2v5/__string.h|19700101030959|00975|d2cc42eeb5e1666 -BK|mit-pthreads/machdep/sco-3.2v5/__time.h|19700101030959|00976|a9594bab280ced64 -BK|mit-pthreads/machdep/sco-3.2v5/__unistd.h|19700101030959|00977|99e6f1116d1f920 -BK|mit-pthreads/machdep/sco-3.2v5/compat.h|19700101030959|00978|3f150ff6223d49be -BK|mit-pthreads/machdep/sco-3.2v5/dirent.h|19700101030959|00979|388af3465ad4680f -BK|mit-pthreads/machdep/sco-3.2v5/posix/__signal.h|19700101030959|00984|5e14827a3b91a6db -BK|mit-pthreads/machdep/sco-3.2v5/socket.h|19700101030959|00980|1b409f3f1fcbbf7a -BK|mit-pthreads/machdep/sco-3.2v5/syscall.h|19700101030959|00981|c69bd58eba4d5076 -BK|mit-pthreads/machdep/sco-3.2v5/timers.h|19700101030959|00982|4907a958151368ed -BK|mit-pthreads/machdep/sco-3.2v5/trash.can|19700101030959|00983|7eecac9fc944ade2 diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 2e089f1b96a..584bf4c4117 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -1,7 +1,9 @@ Miguel@light.local Sinisa@sinisa.nasamreza.org arjen@fred.bitbike.com +bar@bar.mysql.r18.ru bar@bar.udmsearch.izhnet.ru +bk@admin.bk heikki@donna.mysql.fi heikki@hundin.mysql.fi jani@hynda.mysql.fi @@ -21,12 +23,11 @@ monty@work.mysql.com mwagner@cash.mwagner.org nick@nick.leippe.com paul@central.snake.net +paul@teton.kitebird.com salle@geopard.online.bg sasha@mysql.sashanet.com +serg@build.mysql2.com serg@serg.mysql.com serg@sergbook.mysql.com sinisa@rhols221.adsl.netsonic.fi zak@balfor.local -bar@bar.mysql.r18.ru -paul@teton.kitebird.com -serg@build.mysql2.com diff --git a/BitKeeper/etc/skipkeys b/BitKeeper/etc/skipkeys new file mode 100644 index 00000000000..9f29647d38a --- /dev/null +++ b/BitKeeper/etc/skipkeys @@ -0,0 +1,6 @@ +BK|scripts/safe_mysqld.sh|19700101030959|01930|d0a3cc73fd1b0d8d tim@localhost.polyesthetic.msg|scripts/safe_mysqld.sh|20000802235627|38519 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe jcole@tetra.bedford.progress.com|BitKeeper/etc/logging_ok|20001004201211|30554 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe sasha@work.mysql.com|BitKeeper/etc/logging_ok|20000802223223|24242 +bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe tim@localhost.polyesthetic.msg|BitKeeper/etc/logging_ok|20000802235640|27343 +bk@work.mysql.com|ChangeSet|20000731191004|44203|eae70093a6122e66+ sasha@work.mysql.com|ChangeSet|20000802223249|54774 +bk@work.mysql.com|ChangeSet|20000731191004|44203|eae70093a6122e66+ tim@localhost.polyesthetic.msg|ChangeSet|20000802235645|56533 From c81300691327066b954fb34116f6d1f88e0d49d6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Oct 2002 22:59:29 +0300 Subject: [PATCH 007/246] fixed update with subselect (FOR REVIEW) mysql-test/r/subselect.result: update with subselect test mysql-test/t/subselect.test: update with subselect test sql/mysql_priv.h: fixed update with subselect sql/sql_base.cc: fixed update with subselect sql/sql_lex.cc: fixed update with subselect sql/sql_select.cc: fixed update with subselect sql/sql_update.cc: fixed update with subselect sql/sql_yacc.yy: fixed update with subselect --- mysql-test/r/subselect.result | 16 ++++++++++++++++ mysql-test/t/subselect.test | 13 ++++++++++++- sql/mysql_priv.h | 3 ++- sql/sql_base.cc | 16 ++++++++++++---- sql/sql_lex.cc | 4 +++- sql/sql_select.cc | 3 +++ sql/sql_update.cc | 18 ++++++++++++------ sql/sql_yacc.yy | 5 +++-- 8 files changed, 63 insertions(+), 15 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 3f89f546ca3..60312ca46a3 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -205,3 +205,19 @@ SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03') (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03') 2002-08-03 drop table searchconthardwarefr3; +create table t1 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t1 values (0, 10),(1, 11),(2, 12); +insert into t2 values (1, 21),(2, 22),(3, 23); +select * from t1; +a b +0 10 +1 11 +2 12 +update t1 set b= (select b from t2 where t1.a = t2.a); +select * from t1; +a b +0 NULL +1 21 +2 22 +drop table t1, t2; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 6e585883f1c..a2c9d4dbb7b 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -110,4 +110,15 @@ EXPLAIN SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); -drop table searchconthardwarefr3; \ No newline at end of file +drop table searchconthardwarefr3; + +#update with subselects +create table t1 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t1 values (0, 10),(1, 11),(2, 12); +insert into t2 values (1, 21),(2, 22),(3, 23); +select * from t1; +update t1 set b= (select b from t2 where t1.a = t2.a); +select * from t1; +drop table t1, t2; + diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index d1a3c7e235a..f81d8ce7af6 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -444,7 +444,8 @@ void kill_delayed_threads(void); int mysql_delete(THD *thd, TABLE_LIST *table, COND *conds, ORDER *order, ha_rows rows, thr_lock_type lock_type, ulong options); int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok=0); -TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update); +TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update, + bool multiopen= 0); TABLE *open_table(THD *thd,const char *db,const char *table,const char *alias, bool *refresh); TABLE *reopen_name_locked_table(THD* thd, TABLE_LIST* table); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 46afddf0967..425784dada2 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1567,16 +1567,24 @@ int open_tables(THD *thd,TABLE_LIST *start) } -TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type) +TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type, + bool multiopen) { TABLE *table; bool refresh; DBUG_ENTER("open_ltable"); thd->proc_info="Opening table"; - while (!(table=open_table(thd,table_list->db, - table_list->real_name,table_list->alias, - &refresh)) && refresh) ; + if (table_list->next && multiopen) + { + while (open_tables(thd,table_list) && refresh) ; + table= table_list->table; + } + else + while (!(table= open_table(thd,table_list->db, + table_list->real_name,table_list->alias, + &refresh)) && refresh) ; + if (table) { int error; diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 9f09afc78a6..132c760267f 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -148,6 +148,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length) lex->select_lex.expr_list.empty(); lex->select_lex.ftfunc_list_alloc.empty(); lex->select_lex.ftfunc_list= &lex->select->ftfunc_list_alloc; + lex->select= &lex->select_lex; lex->convert_set= (lex->thd= thd)->variables.convert_set; lex->yacc_yyss=lex->yacc_yyvs=0; lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE); @@ -956,6 +957,7 @@ void st_select_lex::init_query() table_list.next= (byte**) &table_list.first; item_list.empty(); join= 0; + having_fix_field= 0; } void st_select_lex::init_select() @@ -973,7 +975,7 @@ void st_select_lex::init_select() ftfunc_list_alloc.empty(); ftfunc_list= &ftfunc_list_alloc; linkage= UNSPECIFIED_TYPE; - depended= having_fix_field= 0; + depended= 0; } /* diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6a48f56443c..c3cc4c1041c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5641,6 +5641,9 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) static Item * part_of_refkey(TABLE *table,Field *field) { + if (!table->reginfo.join_tab) + return (Item*) 0; // field from outer non-select (UPDATE,...) + uint ref_parts=table->reginfo.join_tab->ref.key_parts; if (ref_parts) { diff --git a/sql/sql_update.cc b/sql/sql_update.cc index c146b07284f..d47e539f610 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -62,12 +62,17 @@ int mysql_update(THD *thd, TABLE *table; SQL_SELECT *select; READ_RECORD info; + TABLE_LIST *update_table_list= (TABLE_LIST*) + thd->lex.select_lex.table_list.first; DBUG_ENTER("mysql_update"); LINT_INIT(used_index); LINT_INIT(timestamp_query_id); - if (!(table = open_ltable(thd,table_list,lock_type))) - DBUG_RETURN(-1); /* purecov: inspected */ + table_list->lock_type= lock_type; + if (!(table = open_ltable(thd,table_list,lock_type, 1))) + DBUG_RETURN(-1); + fix_tables_pointers(&thd->lex.select_lex); + save_time_stamp=table->time_stamp; table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); thd->proc_info="init"; @@ -77,8 +82,9 @@ int mysql_update(THD *thd, table->quick_keys=0; want_privilege=table->grant.want_privilege; table->grant.want_privilege=(SELECT_ACL & ~table->grant.privilege); - if (setup_tables(table_list) || setup_conds(thd,table_list,&conds) - || setup_ftfuncs(thd)) + if (setup_tables(update_table_list) || + setup_conds(thd,update_table_list,&conds) + || setup_ftfuncs(thd)) DBUG_RETURN(-1); /* purecov: inspected */ old_used_keys=table->used_keys; // Keys used in WHERE @@ -94,7 +100,7 @@ int mysql_update(THD *thd, /* Check the fields we are going to modify */ table->grant.want_privilege=want_privilege; - if (setup_fields(thd,table_list,fields,1,0,0)) + if (setup_fields(thd,update_table_list,fields,1,0,0)) DBUG_RETURN(-1); /* purecov: inspected */ if (table->timestamp_field) { @@ -107,7 +113,7 @@ int mysql_update(THD *thd, /* Check values */ table->grant.want_privilege=(SELECT_ACL & ~table->grant.privilege); - if (setup_fields(thd,table_list,values,0,0,0)) + if (setup_fields(thd,update_table_list,values,0,0,0)) { table->time_stamp=save_time_stamp; // Restore timestamp pointer DBUG_RETURN(-1); /* purecov: inspected */ diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index f5b8c6e4b24..a6bfbafe46a 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1572,8 +1572,9 @@ select_init: select_part2: { LEX *lex=Lex; - lex->lock_option=TL_READ; - mysql_init_select(lex); + if (lex->select == &lex->select_lex) + lex->lock_option= TL_READ; /* Only for global SELECT */ + mysql_init_select(lex); } select_options select_item_list select_into select_lock_type; From d39f52780eac383763acf7e3ace1f9daece305bf Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Oct 2002 16:04:38 -0600 Subject: [PATCH 008/246] fixed prev. commit (was commited in disabled state) --- sql/item_func.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/item_func.cc b/sql/item_func.cc index bea1b2747b6..7da5435276d 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -709,7 +709,7 @@ double Item_func_rand::val() #endif arg_count=0; } - else if (0)//!thd->rand_used) + else if (!thd->rand_used) { // no need to send a Rand log event if seed was given eg: RAND(seed), // as it will be replicated in the query as such. From fc08d48c9c86843cc8c28f9094051b1ecb0ad72d Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 26 Oct 2002 18:28:19 +0000 Subject: [PATCH 009/246] sql_yacc.yy: cleanup sql/sql_yacc.yy: cleanup --- sql/sql_yacc.yy | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 70f9327e706..1f365c9e8b9 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -168,7 +168,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token CAST_SYM %token CHECKSUM_SYM %token CHECK_SYM -%token CIPHER %token COMMITTED_SYM %token COLUMNS %token COLUMN_SYM @@ -222,7 +221,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token IN_SYM %token ISOLATION %token ISAM_SYM -%token ISSUER %token JOIN_SYM %token KEYS %token KEY_SYM @@ -242,7 +240,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token MASTER_USER_SYM %token MASTER_LOG_FILE_SYM %token MASTER_LOG_POS_SYM -%token MASTER_LOG_SEQ_SYM %token MASTER_PASSWORD_SYM %token MASTER_PORT_SYM %token MASTER_CONNECT_RETRY_SYM @@ -263,7 +260,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token NEW_SYM %token NCHAR_SYM %token NOT -%token NO_FOREIGN_KEY_CHECKS %token NO_SYM %token NULL_SYM %token NUM @@ -293,7 +289,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token REAL_NUM %token REFERENCES %token REGEXP -%token RELAXED_UNIQUE_CHECKS %token RELOAD %token RENAME %token REPEATABLE_SYM @@ -595,7 +590,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); opt_mi_check_type opt_to mi_check_types normal_join table_to_table_list table_to_table opt_table_list opt_as handler_rkey_function handler_read_or_scan - single_multi table_wild_list table_wild_one opt_wild union union_list + single_multi table_wild_list table_wild_one opt_wild opt_union union_list precision union_option opt_and END_OF_INPUT @@ -793,7 +788,7 @@ create3: lex->lock_option= (using_update_log) ? TL_READ_NO_INSERT : TL_READ; mysql_init_select(lex); } - select_options select_item_list opt_select_from union {}; + select_options select_item_list opt_select_from opt_union {}; opt_as: /* empty */ {} @@ -1429,7 +1424,7 @@ select: select_init { Lex->sql_command=SQLCOM_SELECT; }; select_init: - SELECT_SYM select_part2 { Select->braces=false; } union + SELECT_SYM select_part2 { Select->braces=false; } opt_union | '(' SELECT_SYM select_part2 ')' { Select->braces=true;} union_opt; @@ -2501,7 +2496,7 @@ insert_values: mysql_init_select(lex); } select_options select_item_list select_from select_lock_type - union {}; + opt_union {}; values_list: values_list ',' no_braces @@ -3747,7 +3742,7 @@ rollback: */ -union: +opt_union: /* empty */ {} | union_list; @@ -3774,11 +3769,14 @@ union_list: ; union_opt: - union {} + union_list {} | optional_order_or_limit {}; optional_order_or_limit: - /* empty */ {} + /* empty + intentional reduce/reduce conflict here !!! + { code } below should not be executed + when neither ORDER BY nor LIMIT are used */ {} | { LEX *lex=Lex; From 271695f846b6ef7856ae0ea0fa9a2d4c7342c4f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 26 Oct 2002 20:04:07 +0000 Subject: [PATCH 010/246] fixing after automerge with 3.23 --- BitKeeper/etc/gone | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index 204044a2cc5..5f2b9e1209d 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -199,9 +199,7 @@ BK|sql-bench/Results/ATIS-mysql-3.21-Linux_2.2.1_i686|19700101030959|02022|660fb BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_i686_xeon|19700101030959|02044|3e820c28bf4af63a -BK|sql-bench/Results/ATIS-mysql-SunOS_5.5.1_sun4u|19700101030959|02031|dfb4c5f6b6db3b49 BK|sql-bench/Results/ATIS-mysql-SunOS_5.6_sun4m|19700101030959|02032|62028e0375b3b8b -BK|sql-bench/Results/ATIS-mysql-SunOS_5.7_sun4u|19700101030959|02034|be0d9789776c5ed7 BK|sql-bench/Results/ATIS-mysql_3.21-Linux_2.0.35_i686|19700101030959|02036|c25425e045ca8dfc BK|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02304|cbe120d860296d2f BK|sql-bench/Results/ATIS-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02027|a74e7b82d3908fa9 @@ -265,9 +263,7 @@ BK|sql-bench/Results/RUN-mysql-3.21-Linux_2.2.1_i686|19700101030959|02050|f6fdd6 BK|sql-bench/Results/RUN-mysql-Linux_2.2.10_i686|19700101030959|02041|712f52be5d195406 BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02038|8ee87b26b91c86fe BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_i686_xeon|19700101030959|02055|17854e751e1d9d1d -BK|sql-bench/Results/RUN-mysql-SunOS_5.5.1_sun4u|19700101030959|02058|afbba182428e20df BK|sql-bench/Results/RUN-mysql-SunOS_5.6_sun4m|19700101030959|02059|eafc8188345e262b -BK|sql-bench/Results/RUN-mysql-SunOS_5.7_sun4u|19700101030959|02061|86e1dc0e25a8b8f BK|sql-bench/Results/RUN-mysql_3.21-Linux_2.0.35_i686|19700101030959|02064|ea8672d8473435 BK|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02310|a902e1a967d79c42 BK|sql-bench/Results/RUN-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02030|413ab3b8a99e61e9 @@ -277,9 +273,7 @@ BK|sql-bench/Results/alter-table-mysql-3.21-Linux_2.2.1_i686|19700101030959|0207 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.10_i686|19700101030959|02081|93b78a85b720a186 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02314|4ae4b989301df98b BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_i686_xeon|19700101030959|02057|64cc4b874cd6fabf -BK|sql-bench/Results/alter-table-mysql-SunOS_5.5.1_sun4u|19700101030959|02087|9d7e75667fcb29ec BK|sql-bench/Results/alter-table-mysql-SunOS_5.6_sun4m|19700101030959|02088|8a1bd6589a189890 -BK|sql-bench/Results/alter-table-mysql-SunOS_5.7_sun4u|19700101030959|02090|ce74c2f623d3bb3 BK|sql-bench/Results/alter-table-mysql_3.21-Linux_2.0.35_i686|19700101030959|02092|762639f2560976bd BK|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02316|1390155aad5b6e86 BK|sql-bench/Results/alter-table-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02317|9090bebb62ef164b @@ -289,9 +283,7 @@ BK|sql-bench/Results/big-tables-mysql-3.21-Linux_2.2.1_i686|19700101030959|02106 BK|sql-bench/Results/big-tables-mysql-Linux_2.2.10_i686|19700101030959|02109|99daa1c5370d077d BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02315|2804ec3c95be436a BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_i686_xeon|19700101030959|02074|290c2c3de9d8e6b -BK|sql-bench/Results/big-tables-mysql-SunOS_5.5.1_sun4u|19700101030959|02115|7d7b6c0bf58b9b79 BK|sql-bench/Results/big-tables-mysql-SunOS_5.6_sun4m|19700101030959|02116|f351a7f3e1e2257e -BK|sql-bench/Results/big-tables-mysql-SunOS_5.7_sun4u|19700101030959|02118|ebc379b231312bbe BK|sql-bench/Results/big-tables-mysql_3.21-Linux_2.0.35_i686|19700101030959|02120|190e827e569c99a4 BK|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02318|c5eabcb89ceac698 BK|sql-bench/Results/big-tables-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02319|856d503725373684 @@ -301,9 +293,7 @@ BK|sql-bench/Results/connect-mysql-3.21-Linux_2.2.1_i686|19700101030959|02134|c0 BK|sql-bench/Results/connect-mysql-Linux_2.2.10_i686|19700101030959|02137|c92505d77e19d5ec BK|sql-bench/Results/connect-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02084|e7e2959b7387251f BK|sql-bench/Results/connect-mysql-Linux_2.2.14_i686_xeon|19700101030959|02071|ea19dc3ec55b3618 -BK|sql-bench/Results/connect-mysql-SunOS_5.5.1_sun4u|19700101030959|02142|a9493110fe62e0b1 BK|sql-bench/Results/connect-mysql-SunOS_5.6_sun4m|19700101030959|02143|a10e3ddfa26a3e7f -BK|sql-bench/Results/connect-mysql-SunOS_5.7_sun4u|19700101030959|02145|c67beb9e9d2cf32e BK|sql-bench/Results/connect-mysql_3.21-Linux_2.0.35_i686|19700101030959|02146|650abd213e6828c6 BK|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02320|ce69cc65bc827b5c BK|sql-bench/Results/connect-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02066|f801e08429a4f7c6 @@ -313,9 +303,7 @@ BK|sql-bench/Results/create-mysql-3.21-Linux_2.2.1_i686|19700101030959|02158|515 BK|sql-bench/Results/create-mysql-Linux_2.2.10_i686|19700101030959|02161|9e7822f66df6aa76 BK|sql-bench/Results/create-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02102|34ded91c5fc25de9 BK|sql-bench/Results/create-mysql-Linux_2.2.14_i686_xeon|19700101030959|02139|50d15991293030ef -BK|sql-bench/Results/create-mysql-SunOS_5.5.1_sun4u|19700101030959|02166|bbb5de66fc56de7b BK|sql-bench/Results/create-mysql-SunOS_5.6_sun4m|19700101030959|02221|9233114ae6f8c5f -BK|sql-bench/Results/create-mysql-SunOS_5.7_sun4u|19700101030959|02223|7ee13bfcafeab498 BK|sql-bench/Results/create-mysql_3.21-Linux_2.0.35_i686|19700101030959|02225|df1b037d17b33587 BK|sql-bench/Results/create-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02321|e985e71d552ff09e BK|sql-bench/Results/create-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02099|483dcf223d5abf81 @@ -325,9 +313,7 @@ BK|sql-bench/Results/insert-mysql-3.21-Linux_2.2.1_i686|19700101030959|02239|fd0 BK|sql-bench/Results/insert-mysql-Linux_2.2.10_i686|19700101030959|02242|763edf9aec633f51 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02130|5be3d6f299738a31 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_i686_xeon|19700101030959|02141|c683ee4b9d214298 -BK|sql-bench/Results/insert-mysql-SunOS_5.5.1_sun4u|19700101030959|02247|8a9ae41f9a79f79 BK|sql-bench/Results/insert-mysql-SunOS_5.6_sun4m|19700101030959|02248|3402d060ae20e19 -BK|sql-bench/Results/insert-mysql-SunOS_5.7_sun4u|19700101030959|02250|78efa132c6e252b9 BK|sql-bench/Results/insert-mysql_3.21-Linux_2.0.35_i686|19700101030959|02252|60c0965dff31db07 BK|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02322|ed252140ff399961 BK|sql-bench/Results/insert-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02114|29a3b8a1ca8aa9d @@ -337,9 +323,7 @@ BK|sql-bench/Results/select-mysql-3.21-Linux_2.2.1_i686|19700101030959|02265|ed3 BK|sql-bench/Results/select-mysql-Linux_2.2.10_i686|19700101030959|02268|a2e264d777b787d BK|sql-bench/Results/select-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02227|308117295c3bc096 BK|sql-bench/Results/select-mysql-Linux_2.2.14_i686_xeon|19700101030959|02152|ead3f11b46ac626f -BK|sql-bench/Results/select-mysql-SunOS_5.5.1_sun4u|19700101030959|02273|c9a1a498a052e268 BK|sql-bench/Results/select-mysql-SunOS_5.6_sun4m|19700101030959|02274|4da215905bce988d -BK|sql-bench/Results/select-mysql-SunOS_5.7_sun4u|19700101030959|02276|632c92971c61e34a BK|sql-bench/Results/select-mysql_3.21-Linux_2.0.35_i686|19700101030959|02278|5fadbac5f98696a BK|sql-bench/Results/select-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02323|e8c0871a668a610d BK|sql-bench/Results/select-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02127|963a98ed526e2be4 @@ -349,9 +333,7 @@ BK|sql-bench/Results/wisconsin-mysql-3.21-Linux_2.2.1_i686|19700101030959|02290| BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.10_i686|19700101030959|02288|301a82b12a84922b BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02280|d01900af34fb33b8 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_i686_xeon|19700101030959|02154|7525b23938631801 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.5.1_sun4u|19700101030959|02297|379705afa2e12378 BK|sql-bench/Results/wisconsin-mysql-SunOS_5.6_sun4m|19700101030959|02298|ec61b14072715dc8 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.7_sun4u|19700101030959|02300|f27927f8c64ea8ad BK|sql-bench/Results/wisconsin-mysql_3.21-Linux_2.0.35_i686|19700101030959|02302|31703d40ea6b4f66 BK|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02324|ec075a89dbdbbe6a BK|sql-bench/Results/wisconsin-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02325|233d5aa529979990 @@ -670,7 +652,6 @@ mwagner@evoq.home.mwagner.org|Docs/Books/prof.eps|20001231203220|15779|dc69b0395 mwagner@evoq.home.mwagner.org|Docs/Books/pthreads.eps|20001231203220|18899|d60ad51891ef4c49 mwagner@evoq.home.mwagner.org|Docs/Books/realmen.eps|20001231203220|22075|1ceb4839e835dad4 mwagner@evoq.home.mwagner.org|Docs/Books/sql-99.eps|20001231203220|25230|cec4ae16fee4c640 -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876 mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b93948768 mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.tst|20001013104933|54568|2e626fa07144d2c8 mwagner@evoq.home.mwagner.org|mysql-test/mybin/start-mysqld|20001016055648|54840|9c8f21a7ab97793a @@ -745,8 +726,6 @@ mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000029.xml|20001017133713| mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000030.xml|20001017133600|63205|c2b25781eefaee9 mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/README|20001013051514|26509|cd4bb681e5a0cd10 mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/mysqltest.xsl|20001013051514|27425|1b8f6ec4f1b5f634 -mwagner@work.mysql.com|mysql-test/r/3.23/sel000001.result|20001010091454|28284|383913ae4505ec86 -mwagner@work.mysql.com|mysql-test/r/3.23/sel000002.result|20001010091454|29230|d1787e6fd5dbc1cc nick@nick.leippe.com|mysql-test/r/rpl_empty_master_crash.result|20020531235552|47718|615f521be2132141 nick@nick.leippe.com|mysql-test/t/rpl_empty_master_crash.test|20020531235552|52328|99464e737639ccc6 sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554 @@ -754,36 +733,19 @@ sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97 sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618 sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce -sasha@mysql.sashanet.com|mysql-test/README.gcov|20001214012355|41825|2de7575ca81155e5 sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5 sasha@mysql.sashanet.com|mysql-test/r/3.23/alt000001.result|20001122072330|24729|393103dbf15f35c9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/ins000001.result|20001018175743|49824|f45c599efdf8352b sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.a.result|20001118063528|39426|2987b17db06808c3 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.b.result|20001118063528|44057|62e1fa91167cacc3 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000002.result|20001118063528|46039|109f5ceed1e0d64 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000003.result|20001118063528|48148|68d6ee00beaa011 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.a.result|20001118063528|50132|3415f066cb91c460 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|52094|352b35351551485 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000005.result|20001118063528|54071|a50962bc2340ab9a -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000006.result|20001118063528|56081|5653051e8ce6b4aa -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000007.result|20001121063807|21606|e0c3b6134e0884da -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000008.result|20001121063807|23636|c5cfee19ca5a7da9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000009.result|20001121063807|25633|ed8042446ab97926 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000010.result|20001122072330|29430|3228109b8965b0f8 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000011.result|20001125024912|48851|c29dce30aa97f265 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.result|20001126062901|05938|35d6596da7b90fc5 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.result|20001202171150|03876|ac5024e6cf6daac6 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000003.result|20001011230020|64653|d7b657b1e3a286a7 -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000100.res|20001205131218|23520|84ed46856cb3a69f sasha@mysql.sashanet.com|mysql-test/r/3.23/shw000001.result|20001121234128|16652|8b20b03d8319b9a5 sasha@mysql.sashanet.com|mysql-test/r/binlog-backup-restore.result|20010424233926|16010|605de78abda64d27 sasha@mysql.sashanet.com|mysql-test/r/df_crash.result|20010406010433|59989|4a3dbee64843953d sasha@mysql.sashanet.com|mysql-test/r/identity.result|20010910233028|16331|e41453a364242503 sasha@mysql.sashanet.com|mysql-test/r/mrg000002.result|20001212152450|11492|745be0854aaaaf5e -sasha@mysql.sashanet.com|mysql-test/r/slave-running.result|20001208141122|24303|f73e49462cf59e1f -sasha@mysql.sashanet.com|mysql-test/r/slave-stopped.result|20001208141122|28916|25c134b1a4f1993a sasha@mysql.sashanet.com|mysql-test/std_data/m.MRG|20001212152450|17736|3f5632c37af00f18 sasha@mysql.sashanet.com|mysql-test/std_data/m.frm|20001212152450|13897|e351dfe0b6824c0c sasha@mysql.sashanet.com|mysql-test/std_data/select-key.master|20001009234916|07315|e6b83af25df0ce5 From 7a8b483d5feddb02071cfef21ef5b9bce946808b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Oct 2002 17:04:18 +0200 Subject: [PATCH 011/246] finally pushing what I could not due to BK problems --- Docs/manual.texi | 4 ++++ sql/sql_select.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index c39da1e37d1..b78b83828b1 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -50815,6 +50815,10 @@ each individual 4.0.x release. @appendixsubsec Changes in release 4.0.5 @itemize @item +Removed a condition that temp table with index on column that can be NULL has +to be MyISAM. This was OK for 3.23, but not needed in 4.*. This resulted in +slowdown in many queries since 4.0.2 +@item Small code improvement in multi-table updates @item Fixed a newly introduced bug that caused @code{ORDER BY ... LIMIT #} diff --git a/sql/sql_select.cc b/sql/sql_select.cc index fc5fe33288f..2b6a3a70344 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3708,7 +3708,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, *blob_field= 0; // End marker /* If result table is small; use a heap */ - if (blob_count || using_unique_constraint || group_null_items || + if (blob_count || using_unique_constraint || (select_options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) == OPTION_BIG_TABLES) { From 05512a01452f8bd128842cc05e496fe00d21e8f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Oct 2002 22:52:02 +0100 Subject: [PATCH 012/246] fixed MyISAM crash on dynamic-row tables with huge number of to-be-packed fields --- myisam/mi_open.c | 3 +- mysql-test/t/myisam.test | 171 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+), 1 deletion(-) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index d53c39daec4..65e4fe86657 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -495,7 +495,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) extra=ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+ MI_DYN_DELETE_BLOCK_HEADER; - tmp_length=max(share->base.pack_reclength,share->base.max_key_length); + tmp_length=max(share->base.pack_reclength+share->base.pack_bits, + share->base.max_key_length); info.alloced_rec_buff_length=tmp_length; if (!(info.rec_alloc=(byte*) my_malloc(tmp_length+extra+8, MYF(MY_WME | MY_ZEROFILL)))) diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 45d26993795..07fee2cf64f 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -75,3 +75,174 @@ INSERT INTO t1 VALUES (1), (2), (3); OPTIMIZE TABLE t1; DROP TABLE t1; +# +# test of myisam with huge number of packed fields +# + +drop table if exists t1; +create table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 +int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 +int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, +i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 +int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, +i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 +int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int, +i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68 +int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int, +i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85 +int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int, +i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102 +int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110 +int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118 +int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126 +int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134 +int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142 +int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150 +int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158 +int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166 +int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174 +int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182 +int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190 +int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198 +int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206 +int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214 +int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222 +int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230 +int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238 +int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246 +int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254 +int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262 +int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270 +int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278 +int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286 +int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294 +int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302 +int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310 +int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318 +int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326 +int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334 +int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342 +int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350 +int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358 +int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366 +int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374 +int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382 +int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390 +int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398 +int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406 +int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414 +int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422 +int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430 +int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438 +int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446 +int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454 +int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462 +int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470 +int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478 +int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486 +int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494 +int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502 +int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510 +int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518 +int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526 +int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534 +int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542 +int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550 +int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558 +int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566 +int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574 +int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582 +int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590 +int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598 +int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606 +int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614 +int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622 +int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630 +int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638 +int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646 +int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654 +int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662 +int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670 +int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678 +int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686 +int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694 +int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702 +int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710 +int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718 +int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726 +int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734 +int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742 +int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750 +int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758 +int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766 +int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774 +int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782 +int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790 +int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798 +int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806 +int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814 +int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822 +int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830 +int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838 +int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846 +int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854 +int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862 +int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870 +int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878 +int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886 +int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894 +int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902 +int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910 +int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918 +int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926 +int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934 +int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942 +int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950 +int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958 +int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966 +int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 +int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 +int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 +int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 +int, i999 int, i1000 int) row_format=dynamic; +insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); +drop table if exists t1; + From 14c5bdbcbcddda9aea14725259246f27f635e48f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Oct 2002 23:24:32 +0100 Subject: [PATCH 013/246] fixed "huge number of packed rows in MyISAM" bug in 4.0 tree --- myisam/mi_open.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index e06726fcaaa..aeacf81d90a 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -569,7 +569,8 @@ byte *mi_alloc_rec_buff(MI_INFO *info, ulong length, byte **buf) /* to simplify initial init of info->rec_buf in mi_open and mi_extra */ if (length == (ulong) -1) - length= max(info->s->base.pack_reclength,info->s->base.max_key_length); + length= max(info->s->base.pack_reclength+info->s->base.pack_bits, + info->s->base.max_key_length); extra= ((info->s->options & HA_OPTION_PACK_RECORD) ? ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+ From 4c9b595c6bacf9382b3998df5656dfe06c778d30 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Oct 2002 12:28:14 -0700 Subject: [PATCH 014/246] moved RAND initialization from mysqld.cc to sql_class.cc:THD::THD() --- sql/mysqld.cc | 12 ++---------- sql/sql_class.cc | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b5c789548e7..01053ba0f28 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -249,7 +249,7 @@ extern int init_master_info(MASTER_INFO* mi); // and are treated as aliases for each other static bool kill_in_progress=FALSE; -static struct rand_struct sql_rand; +struct rand_struct sql_rand; // used by sql_class.cc:THD::THD() static int cleanup_done; static char **defaults_argv,time_zone[30]; static const char *default_table_type_name; @@ -2257,15 +2257,7 @@ static void create_new_thread(THD *thd) for (uint i=0; i < 8 ; i++) // Generate password teststring thd->scramble[i]= (char) (rnd(&sql_rand)*94+33); thd->scramble[8]=0; - /* - We need good random number initialization for new thread - Just coping global one will not work - */ - { - ulong tmp=(ulong) (rnd(&sql_rand) * 3000000); - randominit(&(thd->rand), tmp + (ulong) start_time, - tmp + (ulong) thread_id); - } + thd->real_id=pthread_self(); // Keep purify happy /* Start a new thread to handle connection */ diff --git a/sql/sql_class.cc b/sql/sql_class.cc index ace7c291ed3..eada94e3d40 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -35,6 +35,8 @@ #include #endif +extern struct rand_struct sql_rand; + /***************************************************************************** ** Instansiate templates *****************************************************************************/ @@ -147,6 +149,18 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), transaction.trans_log.end_of_file= max_binlog_cache_size; } #endif + + /* + We need good random number initialization for new thread + Just coping global one will not work + */ + { + pthread_mutex_lock(&LOCK_thread_count); + ulong tmp=(ulong) (rnd(&sql_rand) * 3000000); + randominit(&rand, tmp + (ulong) start_time, + tmp + (ulong) thread_id); + pthread_mutex_unlock(&LOCK_thread_count); + } } /* Do operations that may take a long time */ From 1b0895abc756298939ff7dc6bbf0caee50b6ed1e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Oct 2002 21:30:34 +0200 Subject: [PATCH 015/246] Updated changelog --- Docs/manual.texi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Docs/manual.texi b/Docs/manual.texi index cb0f2236bb9..2314c51a92a 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -47012,6 +47012,11 @@ Changed initialisation of @code{RND()} to make it less predicatable. Fixed problem with @code{GROUP BY} on result with expression that created a @code{BLOB} field. @item +Fixed problem with @code{GROUP BY} on columns that have NULL values. To +solve this we now create an MyISAM temporary table when doing a group by +on a possible NULL item. In MySQL 4.0.5 we can again use in memory HEAP +tables for this case. +@item Fixed problem with privilege tables when downgrading from 4.0.2 to 3.23. @item Fixed thread bug in @code{SLAVE START}, @code{SLAVE STOP} and automatic repair From ea3ffb9b3efedc03baf011467a0b84f394b1b19e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Oct 2002 21:59:03 +0200 Subject: [PATCH 016/246] Added back old LARGEFILE handling Fixed reference to freed memory in acl_init()/grant_init() Fixed possible memory leak. (Could only happen in very strange circumstances) Fixed bug in ALTER TABLE with BDB tables Updated mysql-test for valgrind Docs/manual.texi: ChangeLog acinclude.m4: Added back old LARGEFILE handling. (Needed to get MySQL to compile on Solaris 2.9 with gcc 3.x) configure.in: Added back old LARGEFILE handling. (Needed to get MySQL to compile on Solaris 2.9 with gcc 3.x) libmysqld/lib_sql.cc: Fixed reference to freed memory mysql-test/mysql-test-run.sh: Added option --valgrind mysys/Makefile.am: Removed warning when doing make sql/mysqld.cc: Free regexp memory on shutdown. read 'des' key files from data directory Fixed reference to freed memory in grant_init() sql/slave.cc: Fixed wrong printf() argument sql/sql_acl.cc: Fixed reference to freed memory sql/sql_acl.h: Fixed reference to freed memory sql/sql_base.cc: Fixed possible memory leak. (Could only happen in very strange circumstances) sql/sql_parse.cc: Updated arguments to grant_reload() sql/sql_table.cc: Fixed bug in ALTER TABLE with BDB tables sql/sql_yacc.yy: memset -> bzero --- BUILD/compile-pentium-valgrind-max | 13 ++ Docs/manual.texi | 2 + acinclude.m4 | 137 ++++++++++++++++++ configure.in | 2 +- libmysqld/lib_sql.cc | 4 +- mysql-test/mysql-test-run.sh | 22 ++- mysys/Makefile.am | 2 +- .../Results/ATIS-mysql-Linux_2.4.4_SMP_alpha | 20 +++ .../Results/RUN-mysql-Linux_2.4.4_SMP_alpha | 109 ++++++++++++++ .../alter-table-mysql-Linux_2.4.4_SMP_alpha | 16 ++ .../big-tables-mysql-Linux_2.4.4_SMP_alpha | 19 +++ .../connect-mysql-Linux_2.4.4_SMP_alpha | 35 +++++ .../create-mysql-Linux_2.4.4_SMP_alpha | 18 +++ .../insert-mysql-Linux_2.4.4_SMP_alpha | 106 ++++++++++++++ .../select-mysql-Linux_2.4.4_SMP_alpha | 30 ++++ .../transactions-mysql-Linux_2.4.4_SMP_alpha | 3 + .../wisconsin-mysql-Linux_2.4.4_SMP_alpha | 14 ++ sql/mysqld.cc | 13 +- sql/slave.cc | 2 +- sql/sql_acl.cc | 27 ++-- sql/sql_acl.h | 6 +- sql/sql_base.cc | 13 +- sql/sql_parse.cc | 2 +- sql/sql_table.cc | 14 +- sql/sql_yacc.yy | 2 +- 25 files changed, 596 insertions(+), 35 deletions(-) create mode 100755 BUILD/compile-pentium-valgrind-max create mode 100644 sql-bench/Results/ATIS-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/RUN-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/alter-table-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/big-tables-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/connect-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/create-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/insert-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/select-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/transactions-mysql-Linux_2.4.4_SMP_alpha create mode 100644 sql-bench/Results/wisconsin-mysql-Linux_2.4.4_SMP_alpha diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max new file mode 100755 index 00000000000..016b698a970 --- /dev/null +++ b/BUILD/compile-pentium-valgrind-max @@ -0,0 +1,13 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$pentium_cflags $debug_cflags -DHAVE_purify" +c_warnings="$c_warnings $debug_extra_warnings" +cxx_warnings="$cxx_warnings $debug_extra_warnings" +extra_configs="$pentium_configs $debug_configs" + +extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-embedded-server --with-openssl" + +. "$path/FINISH.sh" diff --git a/Docs/manual.texi b/Docs/manual.texi index 87933ddff06..bdd12993b62 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -50815,6 +50815,8 @@ each individual 4.0.x release. @appendixsubsec Changes in release 4.0.5 @itemize @item +Read @code{--des-key-file} relative to database directory. +@item Small code improvement in multi-table updates @item Fixed a newly introduced bug that caused @code{ORDER BY ... LIMIT #} diff --git a/acinclude.m4 b/acinclude.m4 index b91c6905538..99f6f26bab6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1186,5 +1186,142 @@ dnl --------------------------------------------------------------------------- dnl END OF MYSQL_CHECK_INNODB SECTION dnl --------------------------------------------------------------------------- +dnl By default, many hosts won't let programs access large files; +dnl one must use special compiler options to get large-file access to work. +dnl For more details about this brain damage please see: +dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html + +dnl Written by Paul Eggert . + +dnl Internal subroutine of AC_SYS_LARGEFILE. +dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME) +AC_DEFUN(AC_SYS_LARGEFILE_FLAGS, + [AC_CACHE_CHECK([for $1 value to request large file support], + ac_cv_sys_largefile_$1, + [if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2 + then + ac_cv_sys_largefile_$1=`cat conftest.1` + else + ac_cv_sys_largefile_$1=no + ifelse($1, CFLAGS, + [case "$host_os" in + # HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1. +changequote(, )dnl + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) +changequote([, ])dnl + if test "$GCC" = yes; then + ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__ + fi + ;; + # IRIX 6.2 and later require cc -n32. +changequote(, )dnl + irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*) +changequote([, ])dnl + if test "$GCC" != yes; then + ac_cv_sys_largefile_CFLAGS=-n32 + fi + esac + if test "$ac_cv_sys_largefile_CFLAGS" != no; then + ac_save_CC="$CC" + CC="$CC $ac_cv_sys_largefile_CFLAGS" + AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no) + CC="$ac_save_CC" + fi]) + fi + rm -f conftest*])]) + +dnl Internal subroutine of AC_SYS_LARGEFILE. +dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL) +AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND, + [case $2 in + no) ;; + ?*) + case "[$]$1" in + '') $1=$2 ;; + *) $1=[$]$1' '$2 ;; + esac ;; + esac]) + +dnl Internal subroutine of AC_SYS_LARGEFILE. +dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT) +AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE, + [AC_CACHE_CHECK([for $1], $2, + [$2=no +changequote(, )dnl + for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do + case "$ac_flag" in + -D$1) + $2=1 ;; + -D$1=*) + $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;; + esac + done + $4 +changequote([, ])dnl + ]) + if test "[$]$2" != no; then + AC_DEFINE_UNQUOTED([$1], [$]$2, [$3]) + fi]) + +AC_DEFUN(MYSQL_SYS_LARGEFILE, + [AC_REQUIRE([AC_CANONICAL_HOST]) + AC_ARG_ENABLE(largefile, + [ --disable-largefile Omit support for large files]) + if test "$enable_largefile" != no; then + AC_CHECK_TOOL(GETCONF, getconf) + AC_SYS_LARGEFILE_FLAGS(CFLAGS) + AC_SYS_LARGEFILE_FLAGS(LDFLAGS) + AC_SYS_LARGEFILE_FLAGS(LIBS) + + for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do + case "$ac_flag" in + no) ;; + -D_FILE_OFFSET_BITS=*) ;; + -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;; + -D_LARGE_FILES | -D_LARGE_FILES=*) ;; + -D?* | -I?*) + AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;; + *) + AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;; + esac + done + AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS") + AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS") + + AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, + ac_cv_sys_file_offset_bits, + [Number of bits in a file offset, on hosts where this is settable.], + [case "$host_os" in + # HP-UX 10.20 and later + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) + ac_cv_sys_file_offset_bits=64 ;; + # We can't declare _FILE_OFFSET_BITS here as this will cause + # compile errors as AC_PROG_CC adds include files in confdefs.h + # We solve this (until autoconf is fixed) by instead declaring it + # as define instead + solaris2.[8,9]) + CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64" + CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64" + ac_cv_sys_file_offset_bits=no ;; + esac]) + AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, + ac_cv_sys_largefile_source, + [Define to make fseeko etc. visible, on some hosts.], + [case "$host_os" in + # HP-UX 10.20 and later + hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) + ac_cv_sys_largefile_source=1 ;; + esac]) + AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, + ac_cv_sys_large_files, + [Define for large files, on AIX-style hosts.], + [case "$host_os" in + # AIX 4.2 and later + aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*) + ac_cv_sys_large_files=1 ;; + esac]) + fi + ]) + dnl --------------------------------------------------------------------------- diff --git a/configure.in b/configure.in index 093b5aa8344..15adb09191e 100644 --- a/configure.in +++ b/configure.in @@ -671,7 +671,7 @@ else AC_MSG_RESULT([no]) fi -AC_SYS_LARGEFILE +MYSQL_SYS_LARGEFILE # Types that must be checked AFTER large file support is checked AC_TYPE_SIZE_T diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index f50223c789f..94f30e5061b 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -507,13 +507,13 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) exit(1); } opt_noacl = 1; // No permissions - if (acl_init(opt_noacl)) + if (acl_init((THD*) 0,opt_noacl)) { mysql_server_end(); return 1; } if (!opt_noacl) - (void) grant_init(); + (void) grant_init((THD*) 0); init_max_user_conn(); init_update_queries(); diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 8b5ec5191b0..50e0c8c34f4 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -56,6 +56,7 @@ sleep_until_file_deleted () sleep $SLEEP_TIME_AFTER_RESTART return fi + sleep 1 loop=`expr $loop - 1` done } @@ -309,6 +310,17 @@ while test $# -gt 0; do DO_DDD=1 USE_RUNNING_SERVER="" ;; + --valgrind) + VALGRIND="valgrind --alignment=8 --leak-check=yes" + EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc" + EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc" + SLEEP_TIME_AFTER_RESTART=120 + SLEEP_TIME_FOR_DELETE=120 + ;; + --valgrind-options=*) + TMP=`$ECHO "$1" | $SED -e "s;--valgrind-options=;;"` + VALGRIND="$VALGRIND $TMP" + ;; --skip-*) EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $1" EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT $1" @@ -377,7 +389,7 @@ DASH72=`$ECHO '----------------------------------------------------------------- # on source dist, we pick up freshly build executables # on binary, use what is installed if [ x$SOURCE_DIST = x1 ] ; then - MYSQLD="$BASEDIR/sql/mysqld" + MYSQLD="$VALGRIND $BASEDIR/sql/mysqld" if [ -f "$BASEDIR/client/.libs/lt-mysqltest" ] ; then MYSQL_TEST="$BASEDIR/client/.libs/lt-mysqltest" elif [ -f "$BASEDIR/client/.libs/mysqltest" ] ; then @@ -400,9 +412,9 @@ if [ x$SOURCE_DIST = x1 ] ; then else if test -x "$BASEDIR/libexec/mysqld" then - MYSQLD="$BASEDIR/libexec/mysqld" + MYSQLD="$VALGRIND $BASEDIR/libexec/mysqld" else - MYSQLD="$BASEDIR/bin/mysqld" + MYSQLD="$VALGRIND $BASEDIR/bin/mysqld" fi MYSQL_TEST="$BASEDIR/bin/mysqltest" MYSQLADMIN="$BASEDIR/bin/mysqladmin" @@ -701,7 +713,7 @@ manager_launch() ident=$1 shift if [ $USE_MANAGER = 0 ] ; then - $@ >$CUR_MYERR 2>&1 & + $@ >> $CUR_MYERR 2>&1 & sleep 2 #hack return fi @@ -1047,6 +1059,8 @@ run_testcase () slave_init_script=$TESTDIR/$tname-slave.sh slave_master_info_file=$TESTDIR/$tname-slave-master-info.opt echo $tname > $CURRENT_TEST + echo "CURRENT_TEST: $tname" >> $SLAVE_MYERR + echo "CURRENT_TEST: $tname" >> $MASTER_MYERR SKIP_SLAVE=`$EXPR \( $tname : rpl \) = 0` if [ $USE_MANAGER = 1 ] ; then many_slaves=`$EXPR \( $tname : rpl_failsafe \) != 0` diff --git a/mysys/Makefile.am b/mysys/Makefile.am index c59d15d59f5..98f9e13c778 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -100,7 +100,7 @@ test_io_cache: mf_iocache.c $(LIBRARIES) test_dir: test_dir.c $(LIBRARIES) $(LINK) $(FLAGS) -DMAIN $(srcdir)/test_dir.c $(LDADD) $(LIBS) -test_charset$(EXEEXT): test_charset.c $(LIBRARIES) +test_charset: test_charset.c $(LIBRARIES) $(LINK) $(FLAGS) -DMAIN $(srcdir)/test_charset.c $(LDADD) $(LIBS) testhash: testhash.c $(LIBRARIES) diff --git a/sql-bench/Results/ATIS-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/ATIS-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..e0192d49a3d --- /dev/null +++ b/sql-bench/Results/ATIS-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,20 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 12:35:44 + +ATIS table test + +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) + +Inserting data +Time to insert (9768): 3 wallclock secs ( 0.52 usr 0.31 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Retrieving data +Time for select_simple_join (500): 1 wallclock secs ( 0.60 usr 0.29 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_join (100): 2 wallclock secs ( 0.44 usr 0.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key_prefix_join (100): 10 wallclock secs ( 3.58 usr 2.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_distinct (800): 10 wallclock secs ( 1.60 usr 0.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_group (2800): 11 wallclock secs ( 1.44 usr 0.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +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) +Total time: 37 wallclock secs ( 8.20 usr 4.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/RUN-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/RUN-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..ba144b8d226 --- /dev/null +++ b/sql-bench/Results/RUN-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,109 @@ +Benchmark DBD suite: 2.14 +Date of test: 2002-10-23 12:35:44 +Running tests on: Linux 2.4.4-SMP alpha +Arguments: +Comments: Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M, query_cache=16M; cxx 6.3 + ccc 6.2.9 +Limits from: +Server version: MySQL 4.0.5 beta +Optimization: None +Hardware: + +ATIS: Total time: 37 wallclock secs ( 8.20 usr 4.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +alter-table: Total time: 277 wallclock secs ( 0.33 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +big-tables: Total time: 39 wallclock secs ( 8.71 usr 8.56 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +connect: Total time: 209 wallclock secs (62.48 usr 49.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +create: Total time: 288 wallclock secs (10.88 usr 3.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +insert: Total time: 2381 wallclock secs (693.26 usr 241.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +select: Total time: 1298 wallclock secs (66.92 usr 20.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +transactions: Test skipped because the database doesn't support transactions +wisconsin: Total time: 17 wallclock secs ( 3.66 usr 2.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +All 9 test executed successfully + +Totals per operation: +Operation seconds usr sys cpu tests +alter_table_add 154.00 0.18 0.06 0.00 992 +alter_table_drop 116.00 0.07 0.03 0.00 496 +connect 14.00 8.17 2.02 0.00 10000 +connect+select_1_row 17.00 8.80 2.79 0.00 10000 +connect+select_simple 16.00 8.86 2.57 0.00 10000 +count 50.00 0.04 0.00 0.00 100 +count_distinct 32.00 0.44 0.07 0.00 1000 +count_distinct_2 32.00 0.44 0.08 0.00 1000 +count_distinct_big 54.00 7.37 4.25 0.00 120 +count_distinct_group 50.00 1.14 0.52 0.00 1000 +count_distinct_group_on_key 38.00 0.48 0.12 0.00 1000 +count_distinct_group_on_key_parts 50.00 1.15 0.47 0.00 1000 +count_distinct_key_prefix 28.00 0.44 0.09 0.00 1000 +count_group_on_key_parts 37.00 1.02 0.48 0.00 1000 +count_on_key 453.00 16.74 3.59 0.00 50100 +create+drop 15.00 2.92 0.95 0.00 10000 +create_MANY_tables 238.00 1.84 0.51 0.00 10000 +create_index 4.00 0.00 0.00 0.00 8 +create_key+drop 19.00 4.55 0.94 0.00 10000 +create_table 0.00 0.00 0.00 0.00 31 +delete_all_many_keys 47.00 0.02 0.01 0.00 1 +delete_big 0.00 0.00 0.00 0.00 1 +delete_big_many_keys 47.00 0.02 0.01 0.00 128 +delete_key 4.00 0.88 0.55 0.00 10000 +delete_range 9.00 0.00 0.00 0.00 12 +drop_index 3.00 0.00 0.00 0.00 8 +drop_table 0.00 0.00 0.00 0.00 28 +drop_table_when_MANY_tables 10.00 0.67 0.44 0.00 10000 +insert 134.00 28.43 15.57 0.00 350768 +insert_duplicates 30.00 4.71 5.50 0.00 100000 +insert_key 98.00 13.49 3.80 0.00 100000 +insert_many_fields 14.00 0.32 0.11 0.00 2000 +insert_select_1_key 6.00 0.00 0.00 0.00 1 +insert_select_2_keys 8.00 0.00 0.00 0.00 1 +min_max 23.00 0.02 0.00 0.00 60 +min_max_on_key 188.00 27.44 5.93 0.00 85000 +multiple_value_insert 7.00 1.88 0.05 0.00 100000 +order_by_big 40.00 17.31 12.40 0.00 10 +order_by_big_key 31.00 18.84 12.61 0.00 10 +order_by_big_key2 30.00 17.35 12.38 0.00 10 +order_by_big_key_desc 32.00 19.23 12.70 0.00 10 +order_by_big_key_diff 36.00 17.33 12.44 0.00 10 +order_by_big_key_prefix 30.00 17.36 12.49 0.00 10 +order_by_key2_diff 5.00 1.67 1.04 0.00 500 +order_by_key_prefix 2.00 0.92 0.56 0.00 500 +order_by_range 5.00 0.97 0.55 0.00 500 +outer_join 67.00 0.00 0.00 0.00 10 +outer_join_found 63.00 0.01 0.00 0.00 10 +outer_join_not_found 40.00 0.01 0.00 0.00 500 +outer_join_on_key 40.00 0.01 0.00 0.00 10 +select_1_row 27.00 5.70 6.78 0.00 100000 +select_1_row_cache 22.00 3.16 5.87 0.00 100000 +select_2_rows 30.00 5.96 7.15 0.00 100000 +select_big 31.00 18.08 12.50 0.00 80 +select_big_str 20.00 8.04 6.08 0.00 10000 +select_cache 89.00 3.03 0.74 0.00 10000 +select_cache2 91.00 3.53 0.76 0.00 10000 +select_column+column 30.00 5.07 5.64 0.00 100000 +select_diff_key 163.00 0.27 0.04 0.00 500 +select_distinct 10.00 1.60 0.81 0.00 800 +select_group 106.00 1.49 0.53 0.00 2911 +select_group_when_MANY_tables 6.00 0.90 0.65 0.00 10000 +select_join 2.00 0.44 0.27 0.00 100 +select_key 142.00 77.87 17.06 0.00 200000 +select_key2 142.00 74.50 19.30 0.00 200000 +select_key2_return_key 133.00 73.16 13.81 0.00 200000 +select_key2_return_prim 132.00 70.56 13.25 0.00 200000 +select_key_prefix 141.00 73.88 18.25 0.00 200000 +select_key_prefix_join 10.00 3.58 2.30 0.00 100 +select_key_return_key 146.00 82.66 16.24 0.00 200000 +select_many_fields 25.00 8.38 8.45 0.00 2000 +select_range 242.00 8.57 4.60 0.00 410 +select_range_key2 19.00 6.12 1.72 0.00 25010 +select_range_prefix 18.00 6.28 1.70 0.00 25010 +select_simple 18.00 5.08 5.46 0.00 100000 +select_simple_cache 15.00 3.64 5.58 0.00 100000 +select_simple_join 1.00 0.60 0.29 0.00 500 +update_big 22.00 0.00 0.00 0.00 10 +update_of_key 25.00 4.24 1.90 0.00 50000 +update_of_key_big 18.00 0.04 0.03 0.00 501 +update_of_primary_key_many_keys 20.00 0.03 0.01 0.00 256 +update_with_key 116.00 21.90 14.15 0.00 300000 +update_with_key_prefix 36.00 11.11 4.60 0.00 100000 +wisc_benchmark 4.00 1.66 0.73 0.00 114 +TOTALS 4518.00 844.67 325.93 0.00 3227247 diff --git a/sql-bench/Results/alter-table-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/alter-table-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..1d58effc1a5 --- /dev/null +++ b/sql-bench/Results/alter-table-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,16 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 12:36:21 + +Testing of ALTER TABLE +Testing with 1000 columns and 1000 rows in 20 steps +Insert data into the table +Time for insert (1000) 0 wallclock secs ( 0.06 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time for alter_table_add (992): 154 wallclock secs ( 0.18 usr 0.06 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 drop_index (8): 3 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time for alter_table_drop (496): 116 wallclock secs ( 0.07 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Total time: 277 wallclock secs ( 0.33 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/big-tables-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/big-tables-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..97f66029696 --- /dev/null +++ b/sql-bench/Results/big-tables-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,19 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 12:40:58 + +Testing of some unusual tables +All tests are done 1000 times with 1000 fields + +Testing table with 1000 fields +Testing select * from table with 1 record +Time to select_many_fields(1000): 11 wallclock secs ( 4.59 usr 4.21 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing select all_fields from table with 1 record +Time to select_many_fields(1000): 14 wallclock secs ( 3.79 usr 4.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing insert VALUES() +Time to insert_many_fields(1000): 5 wallclock secs ( 0.29 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing insert (all_fields) VALUES() +Time to insert_many_fields(1000): 9 wallclock secs ( 0.03 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Total time: 39 wallclock secs ( 8.71 usr 8.56 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/connect-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/connect-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..a787d311a54 --- /dev/null +++ b/sql-bench/Results/connect-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,35 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 12:41:37 + +Testing the speed of connecting to the server and sending of data +Connect tests are done 10000 times and other tests 100000 times + +Testing connection/disconnect +Time to connect (10000): 14 wallclock secs ( 8.17 usr 2.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Test connect/simple select/disconnect +Time for connect+select_simple (10000): 16 wallclock secs ( 8.86 usr 2.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Test simple select +Time for select_simple (100000): 18 wallclock secs ( 5.08 usr 5.46 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Test simple select +Time for select_simple_cache (100000): 15 wallclock secs ( 3.64 usr 5.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing connect/select 1 row from table/disconnect +Time to connect+select_1_row (10000): 17 wallclock secs ( 8.80 usr 2.79 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing select 1 row from table +Time to select_1_row (100000): 27 wallclock secs ( 5.70 usr 6.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time to select_1_row_cache (100000): 22 wallclock secs ( 3.16 usr 5.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing select 2 rows from table +Time to select_2_rows (100000): 30 wallclock secs ( 5.96 usr 7.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Test select with aritmetic (+) +Time for select_column+column (100000): 30 wallclock secs ( 5.07 usr 5.64 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing retrieval of big records (65000 bytes) +Time to select_big_str (10000): 20 wallclock secs ( 8.04 usr 6.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Total time: 209 wallclock secs (62.48 usr 49.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/create-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/create-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..c6b2eaf9f23 --- /dev/null +++ b/sql-bench/Results/create-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,18 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 12:45:06 + +Testing the speed of creating and droping tables +Testing with 10000 tables and 10000 loop count + +Testing create of tables +Time for create_MANY_tables (10000): 238 wallclock secs ( 1.84 usr 0.51 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Accessing tables +Time to select_group_when_MANY_tables (10000): 6 wallclock secs ( 0.90 usr 0.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing drop +Time for drop_table_when_MANY_tables (10000): 10 wallclock secs ( 0.67 usr 0.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing create+drop +Time for create+drop (10000): 15 wallclock secs ( 2.92 usr 0.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for create_key+drop (10000): 19 wallclock secs ( 4.55 usr 0.94 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 288 wallclock secs (10.88 usr 3.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/insert-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/insert-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..0cdf5cbede8 --- /dev/null +++ b/sql-bench/Results/insert-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,106 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 12:49:54 + +Testing the speed of inserting data into 1 table and do some selects on it. +The tests are done with a table that has 100000 rows. + +Generating random keys +Creating tables +Inserting 100000 rows in order +Inserting 100000 rows in reverse order +Inserting 100000 rows in random order +Time for insert (300000): 114 wallclock secs (25.11 usr 13.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing insert of duplicates +Time for insert_duplicates (100000): 30 wallclock secs ( 4.71 usr 5.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Retrieving data from the table +Time for select_big (10:3000000): 31 wallclock secs (17.94 usr 12.42 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key (10:3000000): 31 wallclock secs (18.84 usr 12.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key_desc (10:3000000): 32 wallclock secs (19.23 usr 12.70 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key_prefix (10:3000000): 30 wallclock secs (17.36 usr 12.49 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key2 (10:3000000): 30 wallclock secs (17.35 usr 12.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key_diff (10:3000000): 36 wallclock secs (17.33 usr 12.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big (10:3000000): 40 wallclock secs (17.31 usr 12.40 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_range (500:125750): 5 wallclock secs ( 0.97 usr 0.55 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_key_prefix (500:125750): 2 wallclock secs ( 0.92 usr 0.56 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_key2_diff (500:250500): 5 wallclock secs ( 1.67 usr 1.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_diff_key (500:1000): 163 wallclock secs ( 0.27 usr 0.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range_prefix (5010:42084): 10 wallclock secs ( 2.63 usr 0.75 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range_key2 (5010:42084): 10 wallclock secs ( 2.64 usr 0.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key_prefix (200000): 141 wallclock secs (73.88 usr 18.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key (200000): 142 wallclock secs (77.87 usr 17.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key_return_key (200000): 146 wallclock secs (82.66 usr 16.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key2 (200000): 142 wallclock secs (74.50 usr 19.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key2_return_key (200000): 133 wallclock secs (73.16 usr 13.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key2_return_prim (200000): 132 wallclock secs (70.56 usr 13.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Test of compares with simple ranges +Time for select_range_prefix (20000:43500): 8 wallclock secs ( 3.65 usr 0.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range_key2 (20000:43500): 9 wallclock secs ( 3.48 usr 0.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_group (111): 95 wallclock secs ( 0.05 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for min_max_on_key (15000): 10 wallclock secs ( 5.77 usr 1.18 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for min_max (60): 23 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_on_key (100): 41 wallclock secs ( 0.04 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count (100): 50 wallclock secs ( 0.04 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_big (20): 39 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing update of keys with functions +Time for update_of_key (50000): 25 wallclock secs ( 4.24 usr 1.90 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for update_of_key_big (501): 18 wallclock secs ( 0.04 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing update with key +Time for update_with_key (300000): 116 wallclock secs (21.90 usr 14.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for update_with_key_prefix (100000): 36 wallclock secs (11.11 usr 4.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing update of all rows +Time for update_big (10): 22 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing left outer join +Time for outer_join_on_key (10:10): 40 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for outer_join (10:10): 67 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for outer_join_found (10:10): 63 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for outer_join_not_found (500:10): 40 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing SELECT ... WHERE id in (10 values) +Time for select_in (500:5000) 0 wallclock secs ( 0.22 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time for select_join_in (500:5000) 1 wallclock secs ( 0.23 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing SELECT ... WHERE id in (100 values) +Time for select_in (500:50000) 4 wallclock secs ( 0.56 usr 0.26 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time for select_join_in (500:50000) 2 wallclock secs ( 0.57 usr 0.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing SELECT ... WHERE id in (1000 values) +Time for select_in (500:500000) 32 wallclock secs ( 3.96 usr 2.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time for select_join_in (500:500000) 17 wallclock secs ( 4.02 usr 2.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + + +Testing INSERT INTO ... SELECT +Time for insert_select_1_key (1): 6 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for insert_select_2_keys (1): 8 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for drop table(2): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing delete +Time for delete_key (10000): 4 wallclock secs ( 0.88 usr 0.55 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for delete_range (12): 9 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Insert into table with 16 keys and with a primary key with 16 parts +Time for insert_key (100000): 98 wallclock secs (13.49 usr 3.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing update of keys +Time for update_of_primary_key_many_keys (256): 20 wallclock secs ( 0.03 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Deleting rows from the table +Time for delete_big_many_keys (128): 47 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Deleting everything from table +Time for delete_all_many_keys (1): 47 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Inserting 100000 rows with multiple values +Time for multiple_value_insert (100000): 7 wallclock secs ( 1.88 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time for drop table(1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Total time: 2381 wallclock secs (693.26 usr 241.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/select-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/select-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..939f130f92e --- /dev/null +++ b/sql-bench/Results/select-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,30 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 13:29:36 + +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.81 usr 0.38 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Test if the database has a query cache +Time for select_cache (10000): 89 wallclock secs ( 3.03 usr 0.74 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time for select_cache2 (10000): 91 wallclock secs ( 3.53 usr 0.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Testing big selects on the table +Time for select_big (70:17207): 0 wallclock secs ( 0.14 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range (410:1057904): 242 wallclock secs ( 8.57 usr 4.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for min_max_on_key (70000): 178 wallclock secs (21.67 usr 4.75 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_on_key (50000): 412 wallclock secs (16.70 usr 3.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Time for count_group_on_key_parts (1000:100000): 37 wallclock secs ( 1.02 usr 0.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Testing count(distinct) on the table +Time for count_distinct_key_prefix (1000:1000): 28 wallclock secs ( 0.44 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct (1000:1000): 32 wallclock secs ( 0.44 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_2 (1000:1000): 32 wallclock secs ( 0.44 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_group_on_key (1000:6000): 38 wallclock secs ( 0.48 usr 0.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_group_on_key_parts (1000:100000): 50 wallclock secs ( 1.15 usr 0.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_group (1000:100000): 50 wallclock secs ( 1.14 usr 0.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_big (100:1000000): 15 wallclock secs ( 7.36 usr 4.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 1298 wallclock secs (66.92 usr 20.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/transactions-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/transactions-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..47f81534c1e --- /dev/null +++ b/sql-bench/Results/transactions-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,3 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 13:51:14 + +Test skipped because the database doesn't support transactions diff --git a/sql-bench/Results/wisconsin-mysql-Linux_2.4.4_SMP_alpha b/sql-bench/Results/wisconsin-mysql-Linux_2.4.4_SMP_alpha new file mode 100644 index 00000000000..445246a27c7 --- /dev/null +++ b/sql-bench/Results/wisconsin-mysql-Linux_2.4.4_SMP_alpha @@ -0,0 +1,14 @@ +Testing server 'MySQL 4.0.5 beta' at 2002-10-23 13:51:14 + +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) + +Inserting data +Time to insert (31000): 13 wallclock secs ( 1.99 usr 1.40 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 the actual benchmark +Time for wisc_benchmark (114): 4 wallclock secs ( 1.66 usr 0.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU) + +Total time: 17 wallclock secs ( 3.66 usr 2.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f3aef7f1622..1bb1ff1de74 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -858,6 +858,9 @@ void clean_up(bool print_message) bitmap_free(&temp_pool); free_max_user_conn(); end_slave_list(); +#ifdef USE_REGEX + regex_end(); +#endif #if !defined(__WIN__) && !defined(EMBEDDED_LIBRARY) if (!opt_bootstrap) @@ -1894,8 +1897,6 @@ int main(int argc, char **argv) if (!ssl_acceptor_fd) opt_use_ssl = 0; } - if (des_key_file) - load_des_key_file(des_key_file); #endif /* HAVE_OPENSSL */ #ifdef HAVE_LIBWRAP @@ -1968,6 +1969,10 @@ int main(int argc, char **argv) reset_floating_point_exceptions(); init_thr_lock(); init_slave_list(); +#ifdef HAVE_OPENSSL + if (des_key_file) + load_des_key_file(des_key_file); +#endif /* HAVE_OPENSSL */ /* Setup log files */ if (opt_log) @@ -2032,7 +2037,7 @@ int main(int argc, char **argv) exit(1); } start_signal_handler(); // Creates pidfile - if (acl_init(opt_noacl)) + if (acl_init((THD*) 0, opt_noacl)) { abort_loop=1; select_thread_in_use=0; @@ -2044,7 +2049,7 @@ int main(int argc, char **argv) exit(1); } if (!opt_noacl) - (void) grant_init(); + (void) grant_init((THD*) 0); init_max_user_conn(); init_update_queries(); diff --git a/sql/slave.cc b/sql/slave.cc index 824191078fc..dc1464dcca1 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1450,7 +1450,7 @@ bool flush_master_info(MASTER_INFO* mi) DBUG_PRINT("enter",("master_pos: %ld", (long) mi->master_log_pos)); my_b_seek(file, 0L); - my_b_printf(file, "%s\n%s\n%s\n%s\n%s\n%d\n%d\n%d\n", + my_b_printf(file, "%s\n%s\n%s\n%s\n%s\n%d\n%d\n", mi->master_log_name, llstr(mi->master_log_pos, lbuf), mi->host, mi->user, mi->password, mi->port, mi->connect_retry diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 867163be90d..3875e51a75a 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -119,6 +119,7 @@ static bool compare_hostname(const acl_host_and_ip *host, const char *hostname, SYNOPSIS acl_init() + thd Thread handler dont_read_acl_tables Set to 1 if run with --skip-grant RETURN VALUES @@ -127,9 +128,9 @@ static bool compare_hostname(const acl_host_and_ip *host, const char *hostname, */ -my_bool acl_init(bool dont_read_acl_tables) +my_bool acl_init(THD *org_thd, bool dont_read_acl_tables) { - THD *thd, *org_thd; + THD *thd; TABLE_LIST tables[3]; TABLE *table; READ_RECORD read_record_info; @@ -147,7 +148,6 @@ my_bool acl_init(bool dont_read_acl_tables) /* To be able to run this from boot, we allocate a temporary THD */ - org_thd=current_thd; // Save for restore if (!(thd=new THD)) DBUG_RETURN(1); /* purecov: inspected */ thd->store_globals(); @@ -339,6 +339,11 @@ end: delete thd; if (org_thd) org_thd->store_globals(); /* purecov: inspected */ + else + { + /* Remember that we don't have a THD */ + my_pthread_setspecific_ptr(THR_THD, 0); + } DBUG_RETURN(return_val); } @@ -385,7 +390,7 @@ void acl_reload(THD *thd) delete_dynamic(&acl_wild_hosts); hash_free(&acl_check_hosts); - if (acl_init(0)) + if (acl_init(thd, 0)) { // Error. Revert to old list acl_free(); /* purecov: inspected */ acl_hosts=old_acl_hosts; @@ -2268,9 +2273,9 @@ void grant_free(void) /* Init grant array if possible */ -my_bool grant_init(void) +my_bool grant_init(THD *org_thd) { - THD *thd, *org_thd; + THD *thd; TABLE_LIST tables[2]; MYSQL_LOCK *lock; my_bool return_val= 1; @@ -2286,7 +2291,6 @@ my_bool grant_init(void) if (!initialized) DBUG_RETURN(0); /* purecov: tested */ - org_thd=current_thd; if (!(thd=new THD)) DBUG_RETURN(1); /* purecov: deadcode */ thd->store_globals(); @@ -2344,13 +2348,18 @@ end: delete thd; if (org_thd) org_thd->store_globals(); + else + { + /* Remember that we don't have a THD */ + my_pthread_setspecific_ptr(THR_THD, 0); + } DBUG_RETURN(return_val); } /* Reload grant array if possible */ -void grant_reload(void) +void grant_reload(THD *thd) { HASH old_hash_tables;bool old_grant_option; MEM_ROOT old_mem; @@ -2364,7 +2373,7 @@ void grant_reload(void) old_grant_option = grant_option; old_mem = memex; - if (grant_init()) + if (grant_init(thd)) { // Error. Revert to old hash grant_free(); /* purecov: deadcode */ hash_tables=old_hash_tables; /* purecov: deadcode */ diff --git a/sql/sql_acl.h b/sql/sql_acl.h index 326a55ddd0c..6925b6b406c 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -81,7 +81,7 @@ /* prototypes */ -my_bool acl_init(bool dont_read_acl_tables); +my_bool acl_init(THD *thd, bool dont_read_acl_tables); void acl_reload(THD *thd); void acl_free(bool end=0); ulong acl_get(const char *host, const char *ip, const char *bin_ip, @@ -98,9 +98,9 @@ int mysql_grant(THD *thd, const char *db, List &user_list, int mysql_table_grant(THD *thd, TABLE_LIST *table, List &user_list, List &column_list, ulong rights, bool revoke); -my_bool grant_init(void); +my_bool grant_init(THD *thd); void grant_free(void); -void grant_reload(void); +void grant_reload(THD *thd); bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables, uint show_command=0, bool dont_print_error=0); bool check_grant_column (THD *thd,TABLE *table, const char *name, uint length, diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d58bc64e975..fa967d645ef 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1513,11 +1513,13 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db, TABLE *tmp_table; DBUG_ENTER("open_temporary_table"); - // the extra size in my_malloc() is for table_cache_key - // 4 bytes for master thread id if we are in the slave - // 1 byte to terminate db - // 1 byte to terminate table_name - // total of 6 extra bytes in my_malloc in addition to table/db stuff + /* + The extra size in my_malloc() is for table_cache_key + 4 bytes for master thread id if we are in the slave + 1 byte to terminate db + 1 byte to terminate table_name + total of 6 extra bytes in my_malloc in addition to table/db stuff + */ if (!(tmp_table=(TABLE*) my_malloc(sizeof(*tmp_table)+(uint) strlen(db)+ (uint) strlen(table_name)+6, MYF(MY_WME)))) @@ -1529,6 +1531,7 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db, ha_open_options, tmp_table)) { + my_free((char*) tmp_table,MYF(0)); DBUG_RETURN(0); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 693de0dccb7..e0c3492458b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3350,7 +3350,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables) if (options & REFRESH_GRANT) { acl_reload(thd); - grant_reload(); + grant_reload(thd); if (mqh_used) reset_mqh(thd,(LEX_USER *) NULL,true); } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index bca7b79c132..865b30cdb39 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1910,16 +1910,24 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, #ifdef HAVE_BERKELEY_DB if (old_db_type == DB_TYPE_BERKELEY_DB) { - (void) berkeley_flush_logs(); /* For the alter table to be properly flushed to the logs, we have to open the new table. If not, we get a problem on server shutdown. */ - if (!open_tables(thd, table_list)) // Should always succeed + char path[FN_REFLEN]; + (void) sprintf(path,"%s/%s/%s",mysql_data_home,new_db,table_name); + fn_format(path,path,"","",4); + table=open_temporary_table(thd, path, new_db, tmp_name,0); + if (table) { - close_thread_table(thd, &table_list->table); + intern_close_table(table); + my_free((char*) table, MYF(0)); } + else + sql_print_error("Warning: Could not open BDB table %s.%s after rename\n", + new_db,table_name); + (void) berkeley_flush_logs(); } #endif table_list->table=0; // For query cache diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 5367bc897b3..730b04e4863 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -667,7 +667,7 @@ change: { LEX *lex = Lex; lex->sql_command = SQLCOM_CHANGE_MASTER; - memset(&lex->mi, 0, sizeof(lex->mi)); + bzero((char*) &lex->mi, sizeof(lex->mi)); } master_defs; master_defs: From 31ba88c0c17e7a3eca365f104e2f129af7f07ee5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Oct 2002 22:56:30 +0200 Subject: [PATCH 017/246] Added --skip-safemalloc to mysqltest Added bug fix from 3.23 for AIX 4.3.3 and gcc 3.x Small change in EXCHANGE output Propagate open-files-limit from mysqld_safe -> mysqld Fixed speed bug in GROUP BY Added quotes around database name in CREATE DATABASE db_name (for binary log) BitKeeper/etc/ignore: added stamp-h1 Docs/manual.texi: Added 4.1 manual section Updated changelog client/mysqltest.c: Added --skip-safemalloc include/my_global.h: Added bug fix from 3.23 for AIX 4.3.3 and gcc 3.x mysql-test/mysql-test-run.sh: Start mysqltest with --skip-safemalloc (To get it faster) mysql-test/r/bdb.result: Update for new EXPLAIN output mysql-test/r/compare.result: Update for new EXPLAIN output mysql-test/r/create.result: Update for new EXPLAIN output mysql-test/r/distinct.result: Update for new EXPLAIN output mysql-test/r/explain.result: Update for new EXPLAIN output mysql-test/r/group_by.result: Update for new EXPLAIN output mysql-test/r/heap.result: Update for new EXPLAIN output mysql-test/r/innodb.result: Update for new EXPLAIN output mysql-test/r/join_outer.result: Update for new EXPLAIN output mysql-test/r/key_diff.result: Update for new EXPLAIN output mysql-test/r/merge.result: Update for new EXPLAIN output mysql-test/r/null_key.result: Update for new EXPLAIN output mysql-test/r/order_by.result: Update for new EXPLAIN output mysql-test/r/select.result: Update for new EXPLAIN output mysql-test/r/temp_table.result: Fixed speed bug in GROUP BY mysql-test/r/type_datetime.result: Update for new EXPLAIN output mysql-test/r/user_var.result: Update for new EXPLAIN output mysql-test/r/variables.result: Removed variable safe_show_database mysql-test/t/temp_table.test: Fixed speed bug in GROUP BY mysql-test/t/variables.test: Removed not used variable safe_show_databases scripts/mysqld_safe.sh: Propagate open-files-limit from mysqld_safe -> mysqld sql/mysqld.cc: Removed variable safe_show_database sql/set_var.cc: Removed variable safe_show_database sql/slave.cc: Updated error message sql/sql_db.cc: Added quotes around database name in CREATE DATABASE db_name sql/sql_select.cc: Fixed speed bug in GROUP BY --- .bzrignore | 2 + Docs/manual.texi | 117 ++++++++++++++++++++++++++---- client/mysqltest.c | 12 ++- include/my_global.h | 9 +++ mysql-test/mysql-test-run.sh | 3 +- mysql-test/r/bdb.result | 8 +- mysql-test/r/compare.result | 2 +- mysql-test/r/create.result | 2 +- mysql-test/r/distinct.result | 12 +-- mysql-test/r/explain.result | 4 +- mysql-test/r/group_by.result | 4 +- mysql-test/r/heap.result | 12 +-- mysql-test/r/innodb.result | 10 +-- mysql-test/r/join_outer.result | 14 ++-- mysql-test/r/key_diff.result | 2 +- mysql-test/r/merge.result | 4 +- mysql-test/r/null_key.result | 48 ++++++------ mysql-test/r/order_by.result | 38 +++++----- mysql-test/r/select.result | 26 +++---- mysql-test/r/temp_table.result | 22 ++++++ mysql-test/r/type_datetime.result | 2 +- mysql-test/r/user_var.result | 8 +- mysql-test/r/variables.result | 2 - mysql-test/t/temp_table.test | 18 +++++ mysql-test/t/variables.test | 2 - scripts/mysqld_safe.sh | 1 + sql/mysqld.cc | 5 +- sql/set_var.cc | 4 - sql/slave.cc | 2 +- sql/sql_db.cc | 5 +- sql/sql_select.cc | 48 +++--------- 31 files changed, 284 insertions(+), 164 deletions(-) diff --git a/.bzrignore b/.bzrignore index 6cfd4bcac5b..c0a91201e29 100644 --- a/.bzrignore +++ b/.bzrignore @@ -494,3 +494,5 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +innobase/stamp-h1 +stamp-h1 diff --git a/Docs/manual.texi b/Docs/manual.texi index 87933ddff06..33b8ca5524d 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -8202,6 +8202,10 @@ The following startup variables/options have been renamed: The startup options @code{record_buffer}, @code{sort_buffer} and @code{warnings} will still work in MySQL 4.0 but are deprecated. @item +The mysqld option @code{--safe_show_database} doesn't work anymore. One +should instead give the @code{SHOW DATABASES} privileges to everyone that +need to see all databases. +@item The following SQL variables have changed name. @c arjen note: New table, not yet measured for O'Reilly/DocBook. @multitable @columnfractions .50 .50 @@ -19879,7 +19883,6 @@ differ somewhat: | query_cache_limit | 1048576 | | query_cache_size | 0 | | query_cache_type | ON | -| safe_show_database | OFF | | server_id | 0 | | slave_net_timeout | 3600 | | skip_external_locking | ON | @@ -20314,7 +20317,8 @@ This may be set (only numeric) to Don't show databases for which the user doesn't have any database or table privileges. This can improve security if you're concerned about people being able to see what databases other users have. See also -@code{skip_show_database}. +@code{skip_show_database}. This option is deprecated as one should instead +use the @code{SHOW DATABASES} privilege instead. @item @code{server_id} The value of the @code{--server-id} option. @@ -20327,7 +20331,7 @@ Is ON if we only allow local (socket) connections. @item @code{skip_show_database} This prevents people from doing @code{SHOW DATABASES} if they don't have -the @code{PROCESS} privilege. This can improve security if you're +the @code{SHOW DATABASE} privilege. This can improve security if you're concerned about people being able to see what databases other users have. See also @code{safe_show_database}. @@ -23683,7 +23687,7 @@ started}, your slaves may fail. Please see the following table for an indication of master-slave compatibility between different versions. With regard to version 4.0, -we recommend using same version on both sides. +we recommend using at least 4.0.4 on both sides. @c FIX arjen 2002-07-17 new table, not yet measured for XML/DocBook. @multitable @columnfractions .10 .15 .15 .10 .10 .10 @@ -24350,7 +24354,7 @@ may be used with @code{IO_THREAD} and @code{SQL_THREAD} options. (Slave) @tab Re-enables update logging if the user has the @code{SUPER} privilege. Ignored otherwise. (Master) -@item @code{GLOBAL SET SQL_SLAVE_SKIP_COUNTER=n} +@item @code{SET GLOBAL SQL_SLAVE_SKIP_COUNTER=n} @tab Skip the next @code{n} events from the master. Only valid when the slave thread is not running, otherwise, gives an error. Useful for recovering from replication glitches. @@ -25510,7 +25514,7 @@ temporary table to hold the result. This typically happens if you do an @code{ORDER BY} on a different column set than you did a @code{GROUP BY} on. -@item Where used +@item Using where (was @code{where used}) A @code{WHERE} clause will be used to restrict which rows will be matched against the next table or sent to the client. If you don't have this information and the table is of type @code{ALL} or @code{index}, @@ -25670,7 +25674,7 @@ Executing the @code{EXPLAIN} statement again produces this result: @example table type possible_keys key key_len ref rows Extra -tt ALL AssignedPC,ClientID,ActualPC NULL NULL NULL 3872 where used +tt ALL AssignedPC,ClientID,ActualPC NULL NULL NULL 3872 Using where do ALL PRIMARY NULL NULL NULL 2135 range checked for each record (key map: 1) et_1 ALL PRIMARY NULL NULL NULL 74 @@ -25696,7 +25700,7 @@ Now @code{EXPLAIN} produces the output shown here: @example table type possible_keys key key_len ref rows Extra et ALL PRIMARY NULL NULL NULL 74 -tt ref AssignedPC, ActualPC 15 et.EMPLOYID 52 where used +tt ref AssignedPC, ActualPC 15 et.EMPLOYID 52 Using where ClientID, ActualPC et_1 eq_ref PRIMARY PRIMARY 15 tt.AssignedPC 1 @@ -25719,7 +25723,7 @@ Now the join is perfect, and @code{EXPLAIN} produces this result: @example table type possible_keys key key_len ref rows Extra -tt ALL AssignedPC NULL NULL NULL 3872 where used +tt ALL AssignedPC NULL NULL NULL 3872 Using where ClientID, ActualPC et eq_ref PRIMARY PRIMARY 15 tt.ActualPC 1 @@ -28868,7 +28872,6 @@ and if you can use @code{GLOBAL} or @code{SESSION} with them. @item read_buffer_size @tab num @tab GLOBAL | SESSION @item read_rnd_buffer_size @tab num @tab GLOBAL | SESSION @item rpl_recovery_rank @tab num @tab GLOBAL -@item safe_show_database @tab bool @tab GLOBAL @item server_id @tab num @tab GLOBAL @item slave_compressed_protocol @tab bool @tab GLOBAL @item slave_net_timeout @tab num @tab GLOBAL @@ -38698,8 +38701,8 @@ SUM_OVER_ALL_KEYS(max_length_of_key + sizeof(char*) * 2) * Table and index:: Table and Index Structures * File space management:: File Space Management and Disk I/O * Error handling:: Error Handling -* InnoDB change history:: InnoDB Change History * InnoDB restrictions:: Restrictions on InnoDB Tables +* InnoDB change history:: InnoDB Change History * InnoDB contact information:: InnoDB Contact Information. @end menu @@ -50735,6 +50738,7 @@ this means that the version has not yet been released! @c Please don't add a new version here without also updating ../configure.in! @menu +* News-4.1.x:: * News-4.0.x:: Changes in release 4.0.x (Beta) * News-3.23.x:: Changes in release 3.23.x (Stable) * News-3.22.x:: Changes in release 3.22.x (Older; Still supported) @@ -50744,7 +50748,77 @@ this means that the version has not yet been released! @end menu -@node News-4.0.x, News-3.23.x, News, News +@node News-4.1.x, News-4.0.x, News, News +@appendixsec Changes in release 4.1.x (Alpha) + +@cindex changes, version 4.1 + +Version 4.1 of the MySQL server includes many enhancements and new features: + +@itemize @bullet +@item +Sub selects: @code{SELECT * from t1 where t1.a=(SELECT t2.b FROM t2)}. +@item +Character sets to be defined per column, table and database. +@item +Unicode (UTF8) support. +@item +Derived tables: @code{SELECT a from t1, (select * from t2) WHERE t1.a=t2.a} +@item +@code{BTREE} index on @code{HEAP} tables. +@item +Support for GIS (Geometrical data). +@item +@code{SHOW WARNINGS}; Shows warnings for the last command. +@end itemize + +For a full list of changes, please refer to the changelog sections for +each individual 4.1.x release. + +@menu +* News-4.1.0:: +@end menu + +@node News-4.1.0, , News-4.1.x, News-4.1.x +@appendixsubsec Changes in release 4.1.0 +@itemize +@item +One can specify many temporary directories to be used in a round-robin +fasion with: @code{--tmpdir=dirname1:dirname2:dirname3}. +@item +Sub selects: @code{SELECT * from t1 where t1.a=(SELECT t2.b FROM t2)}. +@item +Character sets to be defined per column, table and database. +@item +Unicode (UTF8) support. +@item +Derived tables: @code{SELECT a from t1, (select * from t2) WHERE t1.a=t2.a} +@item +@code{BTREE} index on @code{HEAP} tables. +@item +Faster embedded server. +@item +One can add a comment per column in @code{CREATE TABLE}. +@item +@code{SHOW FULL COLUMNS FROM table_name} shows column comments. +@item +@code{ALTER DATABASE}. +@item +Support for GIS (Geometrical data). +@item +@code{SHOW WARNINGS}; Shows warnings from the last command. +@item +One can specify a column type for a colum in @code{CREATE TABLE +... SELECT} by defining the column in the @code{CREATE} part + +@example +CREATE TABLE foo (a tinyint not null) SELECT b+1 AS 'a' FROM bar; +@end example + +@end itemize + + +@node News-4.0.x, News-3.23.x, News-4.1.x, News @appendixsec Changes in release 4.0.x (Beta) @cindex changes, version 4.0 @@ -50815,6 +50889,17 @@ each individual 4.0.x release. @appendixsubsec Changes in release 4.0.5 @itemize @item +When one uses the @code{--open-files-limit=#} option to @code{mysqld_safe} +it's now passed on to @code{mysqld} +@item +Fixed that @code{GROUP BY} on columns that may have a @code{NULL} value +doesn't always use disk based temporary tables. +@item +Changed output from @code{EXPLAIN} from @code{'where used'} to +@code{'Using where'} to make it more in line with other output. +@item +Removed variable @code{safe_show_database} as it was not used anymore. +@item Small code improvement in multi-table updates @item Fixed a newly introduced bug that caused @code{ORDER BY ... LIMIT #} @@ -51680,6 +51765,9 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.54 @itemize @item +Allow one to start multiple MySQL servers on windows (code backported +from 4.0.2). +@item Fixed reference to freed memory when doing complicated @code{GROUP BY ... ORDER BY} queries. Symptom was that @code{mysqld} died in function @code{send_fields}. @@ -52504,8 +52592,9 @@ long as @code{server-id} is set and valid @file{master.info} is present. Partial updates (terminated with kill) are now logged with a special error code to the binary log. Slave will refuse to execute them if the error code indicates the update was terminated abnormally, and will have to be recovered -with @code{SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START} after a manual sanity -check/correction of data integrity. +with @code{SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START} after a manual +sanity check/correction of data integrity. Update: In 4.0.3 and above +you have to use @code{SET GLOBAL}. @item Fixed bug that erroneously logged a drop of internal temporary table on thread termination to the binary log -- this bug affected replication. diff --git a/client/mysqltest.c b/client/mysqltest.c index 533713b4f43..20d277ca969 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -91,7 +91,7 @@ enum {OPT_MANAGER_USER=256,OPT_MANAGER_HOST,OPT_MANAGER_PASSWD, - OPT_MANAGER_PORT,OPT_MANAGER_WAIT_TIMEOUT}; + OPT_MANAGER_PORT,OPT_MANAGER_WAIT_TIMEOUT, OPT_SKIP_SAFEMALLOC}; static int record = 0, opt_sleep=0; static char *db = 0, *pass=0; @@ -1845,6 +1845,9 @@ static struct my_option my_long_options[] = 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"silent", 's', "Suppress all normal output. Synonym for --quiet.", (gptr*) &silent, (gptr*) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"skip-safemalloc", OPT_SKIP_SAFEMALLOC, + "Don't use the memory allocation checking", 0, 0, 0, GET_NO_ARG, NO_ARG, + 0, 0, 0, 0, 0, 0}, {"sleep", 'T', "Sleep always this many seconds on sleep commands", (gptr*) &opt_sleep, (gptr*) &opt_sleep, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1944,6 +1947,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), if (read_server_arguments(argument)) die(NullS); break; + case OPT_SKIP_SAFEMALLOC: +#ifdef SAFEMALLOC + sf_malloc_quick=1; +#endif + break; case 'V': print_version(); exit(0); @@ -2301,6 +2309,7 @@ static void var_from_env(const char* name, const char* def_val) static void init_var_hash() { VAR* v; + DBUG_ENTER("init_var_hash"); if (hash_init(&var_hash, 1024, 0, 0, get_var_key, var_free, MYF(0))) die("Variable hash initialization failed"); var_from_env("MASTER_MYPORT", "9306"); @@ -2309,6 +2318,7 @@ static void init_var_hash() var_from_env("BIG_TEST", opt_big_test ? "1" : "0"); v=var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "63",0); hash_insert(&var_hash, (byte*)v); + DBUG_VOID_RETURN; } diff --git a/include/my_global.h b/include/my_global.h index d1b3c516555..8b899ff17ed 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -119,7 +119,16 @@ #define _H_STRINGS #define _SYS_STREAM_H /* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */ +#define ulonglong2double(A) my_ulonglong2double(A) +#define my_off_t2double(A) my_ulonglong2double(A) +#ifdef __cplusplus +extern "C" { #endif +double my_ulonglong2double(unsigned long long A); +#ifdef __cplusplus +} +#endif +#endif /* _AIX */ #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ #undef HAVE_SNPRINTF diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 8b5ec5191b0..09f8051a0f6 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -369,6 +369,7 @@ fi [ -d $MYSQL_TEST_DIR/var ] || mkdir $MYSQL_TEST_DIR/var [ -d $MYSQL_TEST_DIR/var/tmp ] || mkdir $MYSQL_TEST_DIR/var/tmp [ -d $MYSQL_TEST_DIR/var/run ] || mkdir $MYSQL_TEST_DIR/var/run +[ -d $MYSQL_TEST_DIR/var/log ] || mkdir $MYSQL_TEST_DIR/var/log if test ${COLUMNS:-0} -lt 80 ; then COLUMNS=80 ; fi E=`$EXPR $COLUMNS - 8` @@ -454,7 +455,7 @@ fi MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \ - --user=$DBUSER --password=$DBPASSWD --silent -v \ + --user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \ --tmpdir=$MYSQL_TMP_DIR" MYSQL_TEST_BIN=$MYSQL_TEST MYSQL_TEST="$MYSQL_TEST $MYSQL_TEST_ARGS" diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index 7374e936c36..e52878b9759 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -140,13 +140,13 @@ id parent_id level 1010 102 2 explain select level from t1 where level=1; table type possible_keys key key_len ref rows Extra -t1 ref level level 1 const 1 where used; Using index +t1 ref level level 1 const 1 Using where; Using index explain select level,id from t1 where level=1; table type possible_keys key key_len ref rows Extra -t1 ref level level 1 const 1 where used; Using index +t1 ref level level 1 const 1 Using where; Using index explain select level,id,parent_id from t1 where level=1; table type possible_keys key key_len ref rows Extra -t1 ref level level 1 const 1 where used +t1 ref level level 1 const 1 Using where select level,id from t1 where level=1; level id 1 1002 @@ -625,7 +625,7 @@ id parent_id level 1016 102 2 explain select level from t1 where level=1; table type possible_keys key key_len ref rows Extra -t1 ref level level 1 const 1 where used; Using index +t1 ref level level 1 const 1 Using where; Using index select level,id from t1 where level=1; level id 1 1004 diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result index 07f9ce4e81a..afd2a1a086b 100644 --- a/mysql-test/r/compare.result +++ b/mysql-test/r/compare.result @@ -3,7 +3,7 @@ CREATE TABLE t1 (id CHAR(12) not null, PRIMARY KEY (id)); insert into t1 values ('000000000001'),('000000000002'); explain select * from t1 where id=000000000001; table type possible_keys key key_len ref rows Extra -t1 index PRIMARY PRIMARY 12 NULL 2 where used; Using index +t1 index PRIMARY PRIMARY 12 NULL 2 Using where; Using index select * from t1 where id=000000000001; id 000000000001 diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 1e832a128e2..c3083dbfb03 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -63,7 +63,7 @@ insert into t1 (b) values ("hello"),("my"),("world"); create table t2 (key (b)) select * from t1; explain select * from t2 where b="world"; table type possible_keys key key_len ref rows Extra -t2 ref B B 21 const 1 where used +t2 ref B B 21 const 1 Using where select * from t2 where b="world"; a B 3 world diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index c9b90094f77..10a00995c9e 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -175,7 +175,7 @@ explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; table type possible_keys key key_len ref rows Extra t3 index a a 5 NULL 6 Using index; Using temporary t2 index a a 4 NULL 5 Using index; Distinct -t1 eq_ref PRIMARY PRIMARY 4 t2.a 1 where used; Distinct +t1 eq_ref PRIMARY PRIMARY 4 t2.a 1 Using where; Distinct SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; a 1 @@ -190,7 +190,7 @@ insert into t3 select * from t4; explain select distinct t1.a from t1,t3 where t1.a=t3.a; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary -t3 ref a a 5 t1.a 10 where used; Using index; Distinct +t3 ref a a 5 t1.a 10 Using where; Using index; Distinct select distinct t1.a from t1,t3 where t1.a=t3.a; a 1 @@ -278,10 +278,10 @@ table type possible_keys key key_len ref rows Extra t1 index id id 4 NULL 2 Using index; Using temporary t2 index id id 8 NULL 1 Using index; Distinct t3 index id id 8 NULL 1 Using index; Distinct -j_lj_t2 index id id 4 NULL 2 where used; Using index; Distinct -t2_lj index id id 8 NULL 1 where used; Using index; Distinct -j_lj_t3 index id id 4 NULL 2 where used; Using index; Distinct -t3_lj index id id 8 NULL 1 where used; Using index; Distinct +j_lj_t2 index id id 4 NULL 2 Using where; Using index; Distinct +t2_lj index id id 8 NULL 1 Using where; Using index; Distinct +j_lj_t3 index id id 4 NULL 2 Using where; Using index; Distinct +t3_lj index id id 8 NULL 1 Using where; Using index; Distinct SELECT DISTINCT t1.id from diff --git a/mysql-test/r/explain.result b/mysql-test/r/explain.result index 5b4da25d535..876846a5236 100644 --- a/mysql-test/r/explain.result +++ b/mysql-test/r/explain.result @@ -10,13 +10,13 @@ id str 3 foo explain select * from t1 where str is null; table type possible_keys key key_len ref rows Extra -t1 ref str str 11 const 1 where used +t1 ref str str 11 const 1 Using where explain select * from t1 where str="foo"; table type possible_keys key key_len ref rows Extra t1 const str str 11 const 1 explain select * from t1 ignore key (str) where str="foo"; table type possible_keys key key_len ref rows Extra -t1 ALL NULL NULL NULL NULL 4 where used +t1 ALL NULL NULL NULL NULL 4 Using where explain select * from t1 use key (str,str) where str="foo"; table type possible_keys key key_len ref rows Extra t1 const str str 11 const 1 diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index fd0248d5ee6..95a272e7b4a 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -234,10 +234,10 @@ userid count(*) 1 2 explain select spid,count(*) from t1 where spid between 1 and 2 group by spid desc; table type possible_keys key key_len ref rows Extra -t1 range spID spID 5 NULL 2 where used; Using index +t1 range spID spID 5 NULL 2 Using where; Using index explain select spid,count(*) from t1 where spid between 1 and 2 group by spid; table type possible_keys key key_len ref rows Extra -t1 range spID spID 5 NULL 2 where used; Using index +t1 range spID spID 5 NULL 2 Using where; Using index select spid,count(*) from t1 where spid between 1 and 2 group by spid; spid count(*) 1 1 diff --git a/mysql-test/r/heap.result b/mysql-test/r/heap.result index 13f452e26d8..73642d7f751 100644 --- a/mysql-test/r/heap.result +++ b/mysql-test/r/heap.result @@ -66,7 +66,7 @@ a alter table t1 type=myisam; explain select * from t1 where a in (869751,736494,226312,802616); table type possible_keys key key_len ref rows Extra -t1 range uniq_id uniq_id 4 NULL 4 where used; Using index +t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index drop table t1; create table t1 (x int not null, y int not null, key x(x), unique y(y)) type=heap; @@ -159,17 +159,17 @@ create table t1 (btn char(10) not null, key(btn)) type=heap; insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i"); explain select * from t1 where btn like "q%"; table type possible_keys key key_len ref rows Extra -t1 ALL btn NULL NULL NULL 14 where used +t1 ALL btn NULL NULL NULL 14 Using where select * from t1 where btn like "q%"; btn alter table t1 add column new_col char(1) not null, add key (btn,new_col), drop key btn; update t1 set new_col=btn; explain select * from t1 where btn="a"; table type possible_keys key key_len ref rows Extra -t1 ALL btn NULL NULL NULL 14 where used +t1 ALL btn NULL NULL NULL 14 Using where explain select * from t1 where btn="a" and new_col="a"; table type possible_keys key key_len ref rows Extra -t1 ref btn btn 11 const,const 10 where used +t1 ref btn btn 11 const,const 10 Using where drop table t1; CREATE TABLE t1 ( a int default NULL, @@ -182,7 +182,7 @@ SELECT * FROM t1 WHERE a=NULL; a b explain SELECT * FROM t1 WHERE a IS NULL; table type possible_keys key key_len ref rows Extra -t1 ref a a 5 const 10 where used +t1 ref a a 5 const 10 Using where SELECT * FROM t1 WHERE a<=>NULL; a b NULL 99 @@ -190,7 +190,7 @@ SELECT * FROM t1 WHERE b=NULL; a b explain SELECT * FROM t1 WHERE b IS NULL; table type possible_keys key key_len ref rows Extra -t1 ref b b 5 const 1 where used +t1 ref b b 5 const 1 Using where SELECT * FROM t1 WHERE b<=>NULL; a b 99 NULL diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 78b0da2769e..ba2d1c392e3 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -140,13 +140,13 @@ id parent_id level 1015 102 2 explain select level from t1 where level=1; table type possible_keys key key_len ref rows Extra -t1 ref level level 1 const 12 where used; Using index +t1 ref level level 1 const 12 Using where; Using index explain select level,id from t1 where level=1; table type possible_keys key key_len ref rows Extra -t1 ref level level 1 const 12 where used; Using index +t1 ref level level 1 const 12 Using where; Using index explain select level,id,parent_id from t1 where level=1; table type possible_keys key key_len ref rows Extra -t1 ref level level 1 const 12 where used +t1 ref level level 1 const 12 Using where select level,id from t1 where level=1; level id 1 1002 @@ -597,7 +597,7 @@ id parent_id level 1016 102 2 explain select level from t1 where level=1; table type possible_keys key key_len ref rows Extra -t1 ref level level 1 const 6 where used; Using index +t1 ref level level 1 const 6 Using where; Using index select level,id from t1 where level=1; level id 1 1004 @@ -759,7 +759,7 @@ create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1); explain select * from t1 where a > 0 and a < 50; table type possible_keys key key_len ref rows Extra -t1 range PRIMARY PRIMARY 4 NULL 1 where used +t1 range PRIMARY PRIMARY 4 NULL 1 Using where drop table t1; create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=innodb; insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL'); diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 9d3c152e516..37e18b8b304 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -95,7 +95,7 @@ Impossible WHERE noticed after reading const tables explain select t1.*,t2.* from t1 left join t2 on t1.a=t2.a where isnull(t2.a)=1; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 7 -t2 eq_ref PRIMARY PRIMARY 8 t1.a 1 where used +t2 eq_ref PRIMARY PRIMARY 8 t1.a 1 Using where select t1.*,t2.*,t3.a from t1 left join t2 on (t1.a=t2.a) left join t1 as t3 on (t2.a=t3.a); grp a c id a c d a 1 1 a 1 1 a 1 1 @@ -313,11 +313,11 @@ Lilliana Angelovska NULL NULL explain select t1.name, t2.name, t2.id from t1 left join t2 on (t1.id = t2.owner) where t2.id is null; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 3 -t2 ALL NULL NULL NULL NULL 3 where used; Not exists +t2 ALL NULL NULL NULL NULL 3 Using where; Not exists explain select t1.name, t2.name, t2.id from t1 left join t2 on (t1.id = t2.owner) where t2.name is null; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 3 -t2 ALL NULL NULL NULL NULL 3 where used +t2 ALL NULL NULL NULL NULL 3 Using where select count(*) from t1 left join t2 on (t1.id = t2.owner); count(*) 4 @@ -333,11 +333,11 @@ Lilliana Angelovska NULL NULL explain select t1.name, t2.name, t2.id from t2 right join t1 on (t1.id = t2.owner) where t2.id is null; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 3 -t2 ALL NULL NULL NULL NULL 3 where used; Not exists +t2 ALL NULL NULL NULL NULL 3 Using where; Not exists explain select t1.name, t2.name, t2.id from t2 right join t1 on (t1.id = t2.owner) where t2.name is null; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 3 -t2 ALL NULL NULL NULL NULL 3 where used +t2 ALL NULL NULL NULL NULL 3 Using where select count(*) from t2 right join t1 on (t1.id = t2.owner); count(*) 4 @@ -620,7 +620,7 @@ INSERT INTO t2 VALUES (1,1); explain SELECT * from t1 left join t2 on t1.id=t2.id where t2.id IS NULL; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 2 -t2 index id id 8 NULL 1 where used; Using index; Not exists +t2 index id id 8 NULL 1 Using where; Using index; Not exists SELECT * from t1 left join t2 on t1.id=t2.id where t2.id IS NULL; id name id idx 2 no NULL NULL @@ -640,7 +640,7 @@ insert into t2 values (10,1),(20,2),(30,3); explain select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; table type possible_keys key key_len ref rows Extra t2 index NULL PRIMARY 4 NULL 3 Using index -t1 eq_ref PRIMARY PRIMARY 2 const 1 where used; Using index +t1 eq_ref PRIMARY PRIMARY 2 const 1 Using where; Using index select * from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; fooID barID fooID 10 1 NULL diff --git a/mysql-test/r/key_diff.result b/mysql-test/r/key_diff.result index 0886850f38a..4eaccc696f9 100644 --- a/mysql-test/r/key_diff.result +++ b/mysql-test/r/key_diff.result @@ -36,7 +36,7 @@ a a a a explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B; table type possible_keys key key_len ref rows Extra t1 ALL a NULL NULL NULL 5 -t2 ALL b NULL NULL NULL 5 where used +t2 ALL b NULL NULL NULL 5 Using where select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a; a b a b A B a a diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index b95352a9eaa..3c4793a36c5 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -35,10 +35,10 @@ insert into t1 select NULL,message from t2; create table t3 (a int not null, b char(20), key(a)) type=MERGE UNION=(test.t1,test.t2); explain select * from t3 where a < 10; table type possible_keys key key_len ref rows Extra -t3 range a a 4 NULL 10 where used +t3 range a a 4 NULL 10 Using where explain select * from t3 where a > 10 and a < 20; table type possible_keys key key_len ref rows Extra -t3 range a a 4 NULL 10 where used +t3 range a a 4 NULL 10 Using where select * from t3 where a = 10; a b 10 Testing diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index bb8531a9fee..ce397e11c1a 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -3,37 +3,37 @@ create table t1 (a int, b int not null,unique key (a,b),index(b)) type=myisam; insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6); explain select * from t1 where a is null; table type possible_keys key key_len ref rows Extra -t1 ref a a 5 const 3 where used; Using index +t1 ref a a 5 const 3 Using where; Using index explain select * from t1 where a is null and b = 2; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 9 const,const 1 where used; Using index +t1 ref a,b a 9 const,const 1 Using where; Using index explain select * from t1 where a is null and b = 7; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 9 const,const 1 where used; Using index +t1 ref a,b a 9 const,const 1 Using where; Using index explain select * from t1 where a=2 and b = 2; table type possible_keys key key_len ref rows Extra t1 const a,b a 9 const,const 1 explain select * from t1 where a<=>b limit 2; table type possible_keys key key_len ref rows Extra -t1 index NULL a 9 NULL 12 where used; Using index +t1 index NULL a 9 NULL 12 Using where; Using index explain select * from t1 where (a is null or a > 0 and a < 3) and b < 5 limit 3; table type possible_keys key key_len ref rows Extra -t1 range a,b a 9 NULL 3 where used; Using index +t1 range a,b a 9 NULL 3 Using where; Using index explain select * from t1 where (a is null or a = 7) and b=7; table type possible_keys key key_len ref rows Extra -t1 ref a,b b 4 const 2 where used +t1 ref a,b b 4 const 2 Using where explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 5 const 3 where used; Using index +t1 ref a,b a 5 const 3 Using where; Using index explain select * from t1 where a is null and b=9 or a is null and b=7 limit 3; table type possible_keys key key_len ref rows Extra -t1 range a,b a 9 NULL 2 where used; Using index +t1 range a,b a 9 NULL 2 Using where; Using index explain select * from t1 where a > 1 and a < 3 limit 1; table type possible_keys key key_len ref rows Extra -t1 range a a 5 NULL 1 where used; Using index +t1 range a a 5 NULL 1 Using where; Using index explain select * from t1 where a > 8 and a < 9; table type possible_keys key key_len ref rows Extra -t1 range a a 5 NULL 1 where used; Using index +t1 range a a 5 NULL 1 Using where; Using index select * from t1 where a is null; a b NULL 7 @@ -66,43 +66,43 @@ NULL 9 alter table t1 modify b blob not null, add c int not null, drop key a, add unique key (a,b(20),c), drop key b, add key (b(10)); explain select * from t1 where a is null and b = 2; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 5 const 3 where used +t1 ref a,b a 5 const 3 Using where explain select * from t1 where a is null and b = 2 and c=0; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 5 const 3 where used +t1 ref a,b a 5 const 3 Using where explain select * from t1 where a is null and b = 7 and c=0; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 5 const 3 where used +t1 ref a,b a 5 const 3 Using where explain select * from t1 where a=2 and b = 2; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 5 const 1 where used +t1 ref a,b a 5 const 1 Using where explain select * from t1 where a<=>b limit 2; table type possible_keys key key_len ref rows Extra -t1 ALL NULL NULL NULL NULL 12 where used +t1 ALL NULL NULL NULL NULL 12 Using where explain select * from t1 where (a is null or a > 0 and a < 3) and b < 5 and c=0 limit 3; table type possible_keys key key_len ref rows Extra -t1 range a,b a 5 NULL 5 where used +t1 range a,b a 5 NULL 5 Using where explain select * from t1 where (a is null or a = 7) and b=7 and c=0; table type possible_keys key key_len ref rows Extra -t1 range a,b a 5 NULL 4 where used +t1 range a,b a 5 NULL 4 Using where explain select * from t1 where (a is null and b>a) or a is null and b=7 limit 2; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 5 const 3 where used +t1 ref a,b a 5 const 3 Using where explain select * from t1 where a is null and b=9 or a is null and b=7 limit 3; table type possible_keys key key_len ref rows Extra -t1 ref a,b a 5 const 3 where used +t1 ref a,b a 5 const 3 Using where explain select * from t1 where a > 1 and a < 3 limit 1; table type possible_keys key key_len ref rows Extra -t1 range a a 5 NULL 1 where used +t1 range a a 5 NULL 1 Using where explain select * from t1 where a is null and b=7 or a > 1 and a < 3 limit 1; table type possible_keys key key_len ref rows Extra -t1 range a,b a 5 NULL 4 where used +t1 range a,b a 5 NULL 4 Using where explain select * from t1 where a > 8 and a < 9; table type possible_keys key key_len ref rows Extra -t1 range a a 5 NULL 1 where used +t1 range a a 5 NULL 1 Using where explain select * from t1 where b like "6%"; table type possible_keys key key_len ref rows Extra -t1 range b b 12 NULL 1 where used +t1 range b b 12 NULL 1 Using where select * from t1 where a is null; a b c NULL 7 0 @@ -152,7 +152,7 @@ INSERT INTO t1 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4 INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL); explain select id from t1 where uniq_id is null; table type possible_keys key key_len ref rows Extra -t1 ref idx1 idx1 5 const 1 where used +t1 ref idx1 idx1 5 const 1 Using where explain select id from t1 where uniq_id =1; table type possible_keys key key_len ref rows Extra t1 const idx1 idx1 5 const 1 diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 9ac88b42436..48773bfa916 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -264,13 +264,13 @@ create table t1 (a int not null, b int, c varchar(10), key (a, b, c)); insert into t1 values (1, NULL, NULL), (1, NULL, 'b'), (1, 1, NULL), (1, 1, 'b'), (1, 1, 'b'), (2, 1, 'a'), (2, 1, 'b'), (2, 2, 'a'), (2, 2, 'b'), (2, 3, 'c'),(1,3,'b'); explain select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc; table type possible_keys key key_len ref rows Extra -t1 range a a 20 NULL 2 where used; Using index +t1 range a a 20 NULL 2 Using where; Using index select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc; a b c 1 NULL b explain select * from t1 where a >= 1 and a < 3 order by a desc; table type possible_keys key key_len ref rows Extra -t1 range a a 4 NULL 10 where used; Using index +t1 range a a 4 NULL 10 Using where; Using index select * from t1 where a >= 1 and a < 3 order by a desc; a b c 2 3 c @@ -286,7 +286,7 @@ a b c 1 NULL NULL explain select * from t1 where a = 1 order by a desc, b desc; table type possible_keys key key_len ref rows Extra -t1 ref a a 4 const 5 where used; Using index +t1 ref a a 4 const 5 Using where; Using index select * from t1 where a = 1 order by a desc, b desc; a b c 1 3 b @@ -297,30 +297,30 @@ a b c 1 NULL NULL explain select * from t1 where a = 1 and b is null order by a desc, b desc; table type possible_keys key key_len ref rows Extra -t1 ref a a 9 const,const 2 where used; Using index; Using filesort +t1 ref a a 9 const,const 2 Using where; Using index; Using filesort select * from t1 where a = 1 and b is null order by a desc, b desc; a b c 1 NULL NULL 1 NULL b explain select * from t1 where a >= 1 and a < 3 and b >0 order by a desc,b desc; table type possible_keys key key_len ref rows Extra -t1 range a a 9 NULL 8 where used; Using index; Using filesort +t1 range a a 9 NULL 8 Using where; Using index; Using filesort explain select * from t1 where a = 2 and b >0 order by a desc,b desc; table type possible_keys key key_len ref rows Extra -t1 range a a 9 NULL 5 where used; Using index +t1 range a a 9 NULL 5 Using where; Using index explain select * from t1 where a = 2 and b is null order by a desc,b desc; table type possible_keys key key_len ref rows Extra -t1 ref a a 9 const,const 1 where used; Using index; Using filesort +t1 ref a a 9 const,const 1 Using where; Using index; Using filesort explain select * from t1 where a = 2 and (b is null or b > 0) order by a desc,b desc; table type possible_keys key key_len ref rows Extra -t1 range a a 9 NULL 6 where used; Using index +t1 range a a 9 NULL 6 Using where; Using index explain select * from t1 where a = 2 and b > 0 order by a desc,b desc; table type possible_keys key key_len ref rows Extra -t1 range a a 9 NULL 5 where used; Using index +t1 range a a 9 NULL 5 Using where; Using index explain select * from t1 where a = 2 and b < 2 order by a desc,b desc; table type possible_keys key key_len ref rows Extra -t1 range a a 9 NULL 2 where used; Using index; Using filesort +t1 range a a 9 NULL 2 Using where; Using index; Using filesort alter table t1 modify b int not null, modify c varchar(10) not null; explain select * from t1 order by a, b, c; table type possible_keys key key_len ref rows Extra @@ -356,14 +356,14 @@ a b c 1 0 explain select * from t1 where (a = 1 and b = 1 and c = 'b') or (a > 2) order by a desc; table type possible_keys key key_len ref rows Extra -t1 range a a 18 NULL 3 where used; Using index +t1 range a a 18 NULL 3 Using where; Using index select * from t1 where (a = 1 and b = 1 and c = 'b') or (a > 2) order by a desc; a b c 1 1 b 1 1 b explain select * from t1 where a < 2 and b <= 1 order by a desc, b desc; table type possible_keys key key_len ref rows Extra -t1 range a a 4 NULL 6 where used; Using index +t1 range a a 4 NULL 6 Using where; Using index select * from t1 where a < 2 and b <= 1 order by a desc, b desc; a b c 1 1 b @@ -387,7 +387,7 @@ a b c 1 1 explain select * from t1 where a between 1 and 3 and b <= 1 order by a desc, b desc; table type possible_keys key key_len ref rows Extra -t1 range a a 8 NULL 10 where used; Using index +t1 range a a 8 NULL 10 Using where; Using index select * from t1 where a between 1 and 3 and b <= 1 order by a desc, b desc; a b c 2 1 b @@ -399,7 +399,7 @@ a b c 1 0 explain select * from t1 where a between 0 and 1 order by a desc, b desc; table type possible_keys key key_len ref rows Extra -t1 range a a 4 NULL 5 where used; Using index +t1 range a a 4 NULL 5 Using where; Using index select * from t1 where a between 0 and 1 order by a desc, b desc; a b c 1 3 b @@ -452,24 +452,24 @@ EXPLAIN select t1.gid, t2.sid, t3.uid from t3, t2, t1 where t2.gid = t1.gid and table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 6 Using index t2 eq_ref PRIMARY,uid PRIMARY 4 t1.gid 1 -t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 where used; Using index +t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 Using where; Using index EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.gid = t3.uid order by t1.gid,t3.skr; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 6 Using index -t3 eq_ref PRIMARY PRIMARY 2 t1.gid 1 where used +t3 eq_ref PRIMARY PRIMARY 2 t1.gid 1 Using where EXPLAIN SELECT t1.gid, t2.sid, t3.uid from t2, t1, t3 where t2.gid = t1.gid and t2.uid = t3.uid order by t3.uid, t1.gid; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 6 Using index; Using temporary; Using filesort t2 eq_ref PRIMARY,uid PRIMARY 4 t1.gid 1 -t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 where used; Using index +t3 eq_ref PRIMARY PRIMARY 2 t2.uid 1 Using where; Using index EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.gid = t3.uid order by t3.skr,t1.gid; table type possible_keys key key_len ref rows Extra t1 index PRIMARY PRIMARY 4 NULL 6 Using index; Using temporary; Using filesort -t3 eq_ref PRIMARY PRIMARY 2 t1.gid 1 where used +t3 eq_ref PRIMARY PRIMARY 2 t1.gid 1 Using where EXPLAIN SELECT t1.gid, t3.uid from t1, t3 where t1.skr = t3.uid order by t1.gid,t3.skr; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 6 Using temporary; Using filesort -t3 eq_ref PRIMARY PRIMARY 2 t1.skr 1 where used +t3 eq_ref PRIMARY PRIMARY 2 t1.skr 1 Using where drop table t1,t2,t3; CREATE TABLE t1 ( `titre` char(80) NOT NULL default '', diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index e0697f07cb8..1a40c5b11c3 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -1328,19 +1328,19 @@ select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%'; fld3 explain select t2.fld3 from t2 where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 ref fld3 fld3 30 const 1 where used; Using index +t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 index NULL fld3 30 NULL 1199 where used; Using index +t2 index NULL fld3 30 NULL 1199 Using where; Using index explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 index NULL fld3 30 NULL 1199 where used; Using index +t2 index NULL fld3 30 NULL 1199 Using where; Using index explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 ref fld3 fld3 30 const 1 where used; Using index +t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 use index (fld1,fld3) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 ref fld3 fld3 30 const 1 where used; Using index +t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3,not_used); Key column 'not_used' doesn't exist in table explain select fld3 from t2 use index (not_used); @@ -1351,7 +1351,7 @@ honeysuckle honoring explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; table type possible_keys key key_len ref rows Extra -t2 range fld3 fld3 30 NULL 2 where used; Using index +t2 range fld3 fld3 30 NULL 2 Using where; Using index select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; fld1 fld3 148504 Colombo @@ -1371,7 +1371,7 @@ fld1 250502 explain select fld1 from t2 where fld1=250501 or fld1="250502"; table type possible_keys key key_len ref rows Extra -t2 range fld1 fld1 4 NULL 2 where used; Using index +t2 range fld1 fld1 4 NULL 2 Using where; Using index select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502; fld1 250501 @@ -1380,7 +1380,7 @@ fld1 250601 explain select fld1 from t2 where fld1=250501 or fld1=250502 or fld1 >= 250505 and fld1 <= 250601 or fld1 between 250501 and 250502; table type possible_keys key key_len ref rows Extra -t2 range fld1 fld1 4 NULL 4 where used; Using index +t2 range fld1 fld1 4 NULL 4 Using where; Using index select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%'; fld1 fld3 218401 faithful @@ -1807,8 +1807,8 @@ select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr orde fld3 explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3; table type possible_keys key key_len ref rows Extra -t2 ALL fld1 NULL NULL NULL 1199 where used; Using temporary; Using filesort -t3 eq_ref PRIMARY PRIMARY 4 t2.fld1 1 where used; Using index +t2 ALL fld1 NULL NULL NULL 1199 Using where; Using temporary; Using filesort +t3 eq_ref PRIMARY PRIMARY 4 t2.fld1 1 Using where; Using index explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period; table type possible_keys key key_len ref rows Extra t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort @@ -2575,11 +2575,11 @@ companynr companyname explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null; table type possible_keys key key_len ref rows Extra t2 ALL NULL NULL NULL NULL 1199 -t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 where used; Not exists +t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null; table type possible_keys key key_len ref rows Extra t4 ALL NULL NULL NULL NULL 12 -t2 ALL NULL NULL NULL NULL 1199 where used; Not exists +t2 ALL NULL NULL NULL NULL 1199 Using where; Not exists select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; companynr companynr 37 36 @@ -2587,7 +2587,7 @@ companynr companynr explain select distinct t2.companynr,t4.companynr from t2,t4 where t2.companynr=t4.companynr+1; table type possible_keys key key_len ref rows Extra t2 ALL NULL NULL NULL NULL 1199 Using temporary -t4 index NULL PRIMARY 1 NULL 12 where used; Using index +t4 index NULL PRIMARY 1 NULL 12 Using where; Using index select t2.fld1,t2.companynr,fld3,period from t3,t2 where t2.fld1 = 38208 and t2.fld1=t3.t2nr and period = 1008 or t2.fld1 = 38008 and t2.fld1 =t3.t2nr and period = 1008; fld1 companynr fld3 period 038008 37 reporters 1008 diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index 84a00bfea34..45f879e182b 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -72,3 +72,25 @@ id val elt(two.val,'one','two') 2 1 one 4 2 two drop table t1,t2; +drop table if exists t1; +CREATE TABLE t1 ( +d datetime default NULL +) TYPE=MyISAM; +INSERT INTO t1 VALUES ('2002-10-24 14:50:32'),('2002-10-24 14:50:33'),('2002-10-24 14:50:34'),('2002-10-24 14:50:34'),('2002-10-24 14:50:34'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:38'),('2002-10-24 14:50:38'),('2002-10-24 14:50:38'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:40'),('2002-10-24 14:50:40'),('2002-10-24 14:50:40'); +flush status; +select * from t1 group by d; +d +2002-10-24 14:50:32 +2002-10-24 14:50:33 +2002-10-24 14:50:34 +2002-10-24 14:50:35 +2002-10-24 14:50:36 +2002-10-24 14:50:37 +2002-10-24 14:50:38 +2002-10-24 14:50:39 +2002-10-24 14:50:40 +show status like "created_tmp%tables"; +Variable_name Value +Created_tmp_disk_tables 0 +Created_tmp_tables 1 +drop table t1; diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index cae15d4f665..38b264b96b9 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -76,5 +76,5 @@ date numfacture expedition 0000-00-00 00:00:00 1212 0001-00-00 00:00:00 EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00'; table type possible_keys key key_len ref rows Extra -t1 ref expedition expedition 8 const 1 where used +t1 ref expedition expedition 8 const 1 Using where drop table t1; diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 5643900182e..5e9f3a720c2 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -19,14 +19,14 @@ i @vv1:=if(sv1.i,1,0) @vv2:=if(sv2.i,1,0) @vv3:=if(sv3.i,1,0) @vv1+@vv2+@vv3 2 1 0 0 1 explain select * from t1 where i=@vv1; table type possible_keys key key_len ref rows Extra -t1 ref i i 4 const 1 where used +t1 ref i i 4 const 1 Using where explain select * from t1 where @vv1:=@vv1+1 and i=@vv1; table type possible_keys key key_len ref rows Extra -t1 ALL NULL NULL NULL NULL 3 where used +t1 ALL NULL NULL NULL NULL 3 Using where explain select @vv1:=i from t1 where i=@vv1; table type possible_keys key key_len ref rows Extra -t1 index NULL i 4 NULL 3 where used; Using index +t1 index NULL i 4 NULL 3 Using where; Using index explain select * from t1 where i=@vv1; table type possible_keys key key_len ref rows Extra -t1 ref i i 4 const 1 where used +t1 ref i i 4 const 1 Using where drop table t1,t2; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index f708ddd2ee7..ff0f94ab4a6 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -108,7 +108,6 @@ show global variables like 'table_type'; Variable_name Value table_type INNODB set GLOBAL query_cache_size=100000; -set GLOBAL safe_show_database=0; set myisam_max_sort_file_size=10000, GLOBAL myisam_max_sort_file_size=20000; show variables like 'myisam_max_sort_file_size'; Variable_name Value @@ -276,7 +275,6 @@ set global query_cache_type=demand; set read_buffer_size=100; set read_rnd_buffer_size=100; set global rpl_recovery_rank=100; -set global safe_show_database=1; set global server_id=100; set global slave_net_timeout=100; set global slow_launch_time=100; diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index 3cf18bae9fe..10168cf13c7 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -60,3 +60,21 @@ insert into t2 values (1,1),(2,1),(3,1),(4,2); # do a query using ELT, a join and an ORDER BY. select one.id, two.val, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id; drop table t1,t2; + +# +# In MySQL 4.0.4 doing a GROUP BY on a NULL column created a disk based +# temporary table when a memory based one would be good enough. + +drop table if exists t1; + +CREATE TABLE t1 ( + d datetime default NULL +) TYPE=MyISAM; + + +INSERT INTO t1 VALUES ('2002-10-24 14:50:32'),('2002-10-24 14:50:33'),('2002-10-24 14:50:34'),('2002-10-24 14:50:34'),('2002-10-24 14:50:34'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:35'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:36'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:37'),('2002-10-24 14:50:38'),('2002-10-24 14:50:38'),('2002-10-24 14:50:38'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:39'),('2002-10-24 14:50:40'),('2002-10-24 14:50:40'),('2002-10-24 14:50:40'); + +flush status; +select * from t1 group by d; +show status like "created_tmp%tables"; +drop table t1; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 7a1d01c2cb5..e84a7fe404d 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -65,7 +65,6 @@ set table_type=MYISAM, table_type="HEAP", global table_type="INNODB"; show local variables like 'table_type'; show global variables like 'table_type'; set GLOBAL query_cache_size=100000; -set GLOBAL safe_show_database=0; set myisam_max_sort_file_size=10000, GLOBAL myisam_max_sort_file_size=20000; show variables like 'myisam_max_sort_file_size'; @@ -188,7 +187,6 @@ set global query_cache_type=demand; set read_buffer_size=100; set read_rnd_buffer_size=100; set global rpl_recovery_rank=100; -set global safe_show_database=1; set global server_id=100; set global slave_net_timeout=100; set global slow_launch_time=100; diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 9dea2eb3935..f51eff6585f 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -215,6 +215,7 @@ then if test -n "$open_files" then ulimit -n $open_files + args="open-files-limit=$open_files $args" fi if test -n "$core_file_size" then diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f3aef7f1622..810a013a71d 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -274,7 +274,7 @@ static char* pidfile_name_ptr= pidfile_name; static pthread_t select_thread; static my_bool opt_noacl=0, opt_bootstrap=0, opt_myisam_log=0; my_bool opt_safe_user_create = 0, opt_no_mix_types = 0; -my_bool opt_safe_show_db=0, lower_case_table_names, opt_old_rpl_compat; +my_bool lower_case_table_names, opt_old_rpl_compat; my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0; my_bool opt_log_slave_updates= 0; @@ -3234,8 +3234,7 @@ struct my_option my_long_options[] = #ifndef TO_BE_DELETED {"safe-show-database", OPT_SAFE_SHOW_DB, "Deprecated option; One should use GRANT SHOW DATABASES instead...", - (gptr*) &opt_safe_show_db, (gptr*) &opt_safe_show_db, 0, GET_BOOL, NO_ARG, - 0, 0, 0, 0, 0, 0}, + 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, #endif {"safe-user-create", OPT_SAFE_USER_CREATE, "Don't allow new user creation by the user who has no write privileges to the mysql.user table", diff --git a/sql/set_var.cc b/sql/set_var.cc index 5e90c1c1df7..80a0e0625cb 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -195,8 +195,6 @@ sys_var_thd_enum sys_query_cache_type("query_cache_type", &SV::query_cache_type, &query_cache_type_typelib); #endif /* HAVE_QUERY_CACHE */ -sys_var_bool_ptr sys_safe_show_db("safe_show_database", - &opt_safe_show_db); sys_var_long_ptr sys_server_id("server_id",&server_id); sys_var_bool_ptr sys_slave_compressed_protocol("slave_compressed_protocol", &opt_slave_compressed_protocol); @@ -356,7 +354,6 @@ sys_var *sys_variables[]= &sys_read_buff_size, &sys_read_rnd_buff_size, &sys_rpl_recovery_rank, - &sys_safe_show_db, &sys_safe_updates, &sys_select_limit, &sys_server_id, @@ -499,7 +496,6 @@ struct show_var_st init_vars[]= { {sys_query_cache_size.name, (char*) &sys_query_cache_size, SHOW_SYS}, {sys_query_cache_type.name, (char*) &sys_query_cache_type, SHOW_SYS}, #endif /* HAVE_QUERY_CACHE */ - {sys_safe_show_db.name, (char*) &sys_safe_show_db, SHOW_SYS}, {sys_server_id.name, (char*) &sys_server_id, SHOW_SYS}, {sys_slave_net_timeout.name,(char*) &sys_slave_net_timeout, SHOW_SYS}, {"skip_external_locking", (char*) &my_disable_locking, SHOW_MY_BOOL}, diff --git a/sql/slave.cc b/sql/slave.cc index 824191078fc..dd310b44c20 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1732,7 +1732,7 @@ int check_expected_error(THD* thd, RELAY_LOG_INFO* rli, int expected_error) "Slave: query '%s' partially completed on the master \ and was aborted. There is a chance that your master is inconsistent at this \ point. If you are sure that your master is ok, run this query manually on the\ - slave and then restart the slave with SET SQL_SLAVE_SKIP_COUNTER=1;\ + slave and then restart the slave with SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;\ SLAVE START;", thd->query); rli->last_slave_errno = expected_error; sql_print_error("%s",rli->last_slave_error); diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 287df717aec..be193ee0b55 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -77,9 +77,10 @@ int mysql_create_db(THD *thd, char *db, uint create_options, bool silent) { if (!thd->query) { + /* The client used the old obsolete mysql_create_db() call */ thd->query = path; - thd->query_length = (uint) (strxmov(path,"create database ", db, NullS)- - path); + thd->query_length = (uint) (strxmov(path,"create database `", db, "`", + NullS) - path); } { mysql_update_log.write(thd,thd->query, thd->query_length); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index fc5fe33288f..e9569fb8ec4 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3708,7 +3708,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, *blob_field= 0; // End marker /* If result table is small; use a heap */ - if (blob_count || using_unique_constraint || group_null_items || + if (blob_count || using_unique_constraint || (select_options & (OPTION_BIG_TABLES | SELECT_SMALL_RESULT)) == OPTION_BIG_TABLES) { @@ -7193,56 +7193,32 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, { if (tab->use_quick == 2) { - sprintf(buff_ptr,"range checked for each record (index map: %u)", + sprintf(buff_ptr,"; Range checked for each record (index map: %u)", tab->keys); buff_ptr=strend(buff_ptr); } else - buff_ptr=strmov(buff_ptr,"where used"); + buff_ptr=strmov(buff_ptr,"; Using where"); } if (key_read) - { - if (buff != buff_ptr) - { - buff_ptr[0]=';' ; buff_ptr[1]=' '; buff_ptr+=2; - } - buff_ptr=strmov(buff_ptr,"Using index"); - } + buff_ptr= strmov(buff_ptr,"; Using index"); if (table->reginfo.not_exists_optimize) - { - if (buff != buff_ptr) - { - buff_ptr[0]=';' ; buff_ptr[1]=' '; buff_ptr+=2; - } - buff_ptr=strmov(buff_ptr,"Not exists"); - } + buff_ptr= strmov(buff_ptr,"; Not exists"); if (need_tmp_table) { need_tmp_table=0; - if (buff != buff_ptr) - { - buff_ptr[0]=';' ; buff_ptr[1]=' '; buff_ptr+=2; - } - buff_ptr=strmov(buff_ptr,"Using temporary"); + buff_ptr= strmov(buff_ptr,"; Using temporary"); } if (need_order) { need_order=0; - if (buff != buff_ptr) - { - buff_ptr[0]=';' ; buff_ptr[1]=' '; buff_ptr+=2; - } - buff_ptr=strmov(buff_ptr,"Using filesort"); + buff_ptr= strmov(buff_ptr,"; Using filesort"); } - if (distinct & test_all_bits(used_tables,thd->used_tables)) - { - if (buff != buff_ptr) - { - buff_ptr[0]=';' ; buff_ptr[1]=' '; buff_ptr+=2; - } - buff_ptr=strmov(buff_ptr,"Distinct"); - } - item_list.push_back(new Item_string(buff,(uint) (buff_ptr - buff))); + if (distinct && test_all_bits(used_tables,thd->used_tables)) + buff_ptr= strmov(buff_ptr,"; Distinct"); + if (buff_ptr == buff) + buff_ptr+= 2; + item_list.push_back(new Item_string(buff+2,(uint) (buff_ptr - buff)-2)); // For next iteration used_tables|=table->map; if (result->send_data(item_list)) From 3cb98f0d66c8030a3532b67ff74e7211cca4c079 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Oct 2002 23:16:46 +0200 Subject: [PATCH 018/246] Many files: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution mysqld.cc: Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway sql/mysqld.cc: Change MySQL default isolation level to REPEATABLE READ; note that InnoDB has always had that default, and BDB and MyISAM always run at SERIALIZABLE level anyway sql/ha_innodb.cc: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution sql/ha_innodb.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/buf0buf.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/dict0dict.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/fil0fil.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/lock0lock.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/os0file.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/os0proc.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/os0thread.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/page0cur.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/page0page.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/read0read.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/rem0rec.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/srv0srv.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/sync0rw.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/sync0sync.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/trx0purge.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/trx0trx.h: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/include/rem0rec.ic: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/btr/btr0btr.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/btr/btr0cur.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/btr/btr0pcur.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/buf/buf0buf.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/buf/buf0flu.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/dict/dict0dict.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/fil/fil0fil.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/fsp/fsp0fsp.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/ibuf/ibuf0ibuf.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/lock/lock0lock.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/mem/mem0dbg.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/os/os0file.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/os/os0proc.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/page/page0cur.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/page/page0page.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/pars/lexyy.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/pars/pars0grm.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/read/read0read.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/row/row0ins.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/row/row0mysql.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/row/row0purge.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/row/row0sel.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/row/row0uins.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/row/row0undo.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/row/row0upd.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/srv/srv0srv.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/srv/srv0start.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/sync/sync0rw.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/sync/sync0sync.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/trx/trx0purge.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution innobase/trx/trx0trx.c: Merge InnoDB-4.0.5: new isolation levels READ COMMITTED and READ UNCOMMITTED now supported, selective deadlock resolution --- innobase/btr/btr0btr.c | 4 + innobase/btr/btr0cur.c | 43 ++- innobase/btr/btr0pcur.c | 1 + innobase/buf/buf0buf.c | 32 ++ innobase/buf/buf0flu.c | 19 ++ innobase/dict/dict0dict.c | 18 +- innobase/fil/fil0fil.c | 16 +- innobase/fsp/fsp0fsp.c | 24 +- innobase/ibuf/ibuf0ibuf.c | 3 + innobase/include/buf0buf.h | 17 ++ innobase/include/dict0dict.h | 14 +- innobase/include/fil0fil.h | 2 + innobase/include/lock0lock.h | 58 ++-- innobase/include/os0file.h | 3 +- innobase/include/os0proc.h | 9 + innobase/include/os0thread.h | 7 +- innobase/include/page0cur.h | 7 +- innobase/include/page0page.h | 10 + innobase/include/read0read.h | 8 + innobase/include/rem0rec.h | 12 +- innobase/include/rem0rec.ic | 18 ++ innobase/include/srv0srv.h | 30 +- innobase/include/sync0rw.h | 3 +- innobase/include/sync0sync.h | 6 +- innobase/include/trx0purge.h | 3 - innobase/include/trx0trx.h | 46 ++- innobase/lock/lock0lock.c | 552 ++++++++++++++++++++++------------- innobase/mem/mem0dbg.c | 12 +- innobase/os/os0file.c | 45 +-- innobase/os/os0proc.c | 17 ++ innobase/page/page0cur.c | 50 +++- innobase/page/page0page.c | 196 +++++++++++++ innobase/pars/lexyy.c | 9 +- innobase/pars/pars0grm.c | 2 - innobase/read/read0read.c | 22 ++ innobase/row/row0ins.c | 212 ++++++++------ innobase/row/row0mysql.c | 64 ++-- innobase/row/row0purge.c | 18 +- innobase/row/row0sel.c | 241 +++++++++++---- innobase/row/row0uins.c | 6 +- innobase/row/row0undo.c | 7 +- innobase/row/row0upd.c | 30 +- innobase/srv/srv0srv.c | 54 ++-- innobase/srv/srv0start.c | 94 +++--- innobase/sync/sync0rw.c | 3 +- innobase/sync/sync0sync.c | 9 +- innobase/trx/trx0purge.c | 3 - innobase/trx/trx0trx.c | 13 +- sql/ha_innodb.cc | 79 ++++- sql/ha_innodb.h | 2 +- sql/mysqld.cc | 4 +- 51 files changed, 1577 insertions(+), 580 deletions(-) diff --git a/innobase/btr/btr0btr.c b/innobase/btr/btr0btr.c index 7a7678b2dcf..62a86d342a2 100644 --- a/innobase/btr/btr0btr.c +++ b/innobase/btr/btr0btr.c @@ -274,6 +274,7 @@ btr_page_create( ut_ad(mtr_memo_contains(mtr, buf_block_align(page), MTR_MEMO_PAGE_X_FIX)); page_create(page, mtr); + buf_block_align(page)->check_index_page_at_flush = TRUE; btr_page_set_index_id(page, tree->id, mtr); } @@ -713,6 +714,7 @@ btr_create( /* Create a new index page on the the allocated segment page */ page = page_create(frame, mtr); + buf_block_align(page)->check_index_page_at_flush = TRUE; /* Set the index id of the page */ btr_page_set_index_id(page, index_id, mtr); @@ -847,6 +849,7 @@ btr_page_reorganize_low( segment headers, next page-field, etc.) is preserved intact */ page_create(page, mtr); + buf_block_align(page)->check_index_page_at_flush = TRUE; /* Copy the records from the temporary space to the recreated page; do not copy the lock bits yet */ @@ -919,6 +922,7 @@ btr_page_empty( segment headers, next page-field, etc.) is preserved intact */ page_create(page, mtr); + buf_block_align(page)->check_index_page_at_flush = TRUE; } /***************************************************************** diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c index 3d6b63def6c..24f0447d55d 100644 --- a/innobase/btr/btr0cur.c +++ b/innobase/btr/btr0cur.c @@ -121,16 +121,19 @@ btr_cur_latch_leaves( { ulint left_page_no; ulint right_page_no; - + page_t* get_page; + ut_ad(tree && page && mtr); if (latch_mode == BTR_SEARCH_LEAF) { - btr_page_get(space, page_no, RW_S_LATCH, mtr); + get_page = btr_page_get(space, page_no, RW_S_LATCH, mtr); + buf_block_align(get_page)->check_index_page_at_flush = TRUE; } else if (latch_mode == BTR_MODIFY_LEAF) { - btr_page_get(space, page_no, RW_X_LATCH, mtr); + get_page = btr_page_get(space, page_no, RW_X_LATCH, mtr); + buf_block_align(get_page)->check_index_page_at_flush = TRUE; } else if (latch_mode == BTR_MODIFY_TREE) { @@ -138,15 +141,22 @@ btr_cur_latch_leaves( left_page_no = btr_page_get_prev(page, mtr); if (left_page_no != FIL_NULL) { - btr_page_get(space, left_page_no, RW_X_LATCH, mtr); + get_page = btr_page_get(space, left_page_no, + RW_X_LATCH, mtr); + buf_block_align(get_page)->check_index_page_at_flush = + TRUE; } - btr_page_get(space, page_no, RW_X_LATCH, mtr); + get_page = btr_page_get(space, page_no, RW_X_LATCH, mtr); + buf_block_align(get_page)->check_index_page_at_flush = TRUE; right_page_no = btr_page_get_next(page, mtr); if (right_page_no != FIL_NULL) { - btr_page_get(space, right_page_no, RW_X_LATCH, mtr); + get_page = btr_page_get(space, right_page_no, + RW_X_LATCH, mtr); + buf_block_align(get_page)->check_index_page_at_flush = + TRUE; } } else if (latch_mode == BTR_SEARCH_PREV) { @@ -157,9 +167,12 @@ btr_cur_latch_leaves( if (left_page_no != FIL_NULL) { cursor->left_page = btr_page_get(space, left_page_no, RW_S_LATCH, mtr); + buf_block_align( + cursor->left_page)->check_index_page_at_flush = TRUE; } - btr_page_get(space, page_no, RW_S_LATCH, mtr); + get_page = btr_page_get(space, page_no, RW_S_LATCH, mtr); + buf_block_align(get_page)->check_index_page_at_flush = TRUE; } else if (latch_mode == BTR_MODIFY_PREV) { @@ -169,9 +182,12 @@ btr_cur_latch_leaves( if (left_page_no != FIL_NULL) { cursor->left_page = btr_page_get(space, left_page_no, RW_X_LATCH, mtr); + buf_block_align( + cursor->left_page)->check_index_page_at_flush = TRUE; } - btr_page_get(space, page_no, RW_X_LATCH, mtr); + get_page = btr_page_get(space, page_no, RW_X_LATCH, mtr); + buf_block_align(get_page)->check_index_page_at_flush = TRUE; } else { ut_error; } @@ -274,6 +290,7 @@ btr_cur_search_to_nth_level( if (btr_search_latch.writer == RW_LOCK_NOT_LOCKED && latch_mode <= BTR_MODIFY_LEAF && info->last_hash_succ && !estimate + && mode != PAGE_CUR_LE_OR_EXTENDS && btr_search_guess_on_hash(index, info, tuple, mode, latch_mode, cursor, has_search_latch, mtr)) { @@ -334,12 +351,18 @@ btr_cur_search_to_nth_level( rw_latch = RW_NO_LATCH; buf_mode = BUF_GET; + /* We use these modified search modes on non-leaf levels of the + B-tree. These let us end up in the right B-tree leaf. In that leaf + we use the original search mode. */ + if (mode == PAGE_CUR_GE) { page_mode = PAGE_CUR_L; } else if (mode == PAGE_CUR_G) { page_mode = PAGE_CUR_LE; } else if (mode == PAGE_CUR_LE) { page_mode = PAGE_CUR_LE; + } else if (mode == PAGE_CUR_LE_OR_EXTENDS) { + page_mode = PAGE_CUR_LE_OR_EXTENDS; } else { ut_ad(mode == PAGE_CUR_L); page_mode = PAGE_CUR_L; @@ -390,6 +413,8 @@ retry_page_get: goto retry_page_get; } + + buf_block_align(page)->check_index_page_at_flush = TRUE; #ifdef UNIV_SYNC_DEBUG if (rw_latch != RW_NO_LATCH) { @@ -543,6 +568,8 @@ btr_cur_open_at_index_side( ut_ad(0 == ut_dulint_cmp(tree->id, btr_page_get_index_id(page))); + buf_block_align(page)->check_index_page_at_flush = TRUE; + if (height == ULINT_UNDEFINED) { /* We are in the root node */ diff --git a/innobase/btr/btr0pcur.c b/innobase/btr/btr0pcur.c index 8ca3d41f7f9..b2115dfdd6c 100644 --- a/innobase/btr/btr0pcur.c +++ b/innobase/btr/btr0pcur.c @@ -354,6 +354,7 @@ btr_pcur_move_to_next_page( ut_ad(next_page_no != FIL_NULL); next_page = btr_page_get(space, next_page_no, cursor->latch_mode, mtr); + buf_block_align(next_page)->check_index_page_at_flush = TRUE; btr_leaf_page_release(page, cursor->latch_mode, mtr); diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c index ee8e8b91f8d..4524fa1a4f9 100644 --- a/innobase/buf/buf0buf.c +++ b/innobase/buf/buf0buf.c @@ -331,6 +331,11 @@ buf_page_print( index->table_name, index->name); } + } else if (fil_page_get_type(read_buf) == FIL_PAGE_INODE) { + fprintf(stderr, "InnoDB: Page may be an 'inode' page\n"); + } else if (fil_page_get_type(read_buf) == FIL_PAGE_IBUF_FREE_LIST) { + fprintf(stderr, + "InnoDB: Page may be an insert buffer free list page\n"); } } @@ -351,6 +356,8 @@ buf_block_init( block->file_page_was_freed = FALSE; + block->check_index_page_at_flush = FALSE; + rw_lock_create(&(block->lock)); ut_ad(rw_lock_validate(&(block->lock))); @@ -616,6 +623,29 @@ buf_page_peek_block( return(block); } +/************************************************************************ +Resets the check_index_page_at_flush field of a page if found in the buffer +pool. */ + +void +buf_reset_check_index_page_at_flush( +/*================================*/ + ulint space, /* in: space id */ + ulint offset) /* in: page number */ +{ + buf_block_t* block; + + mutex_enter_fast(&(buf_pool->mutex)); + + block = buf_page_hash_get(space, offset); + + if (block) { + block->check_index_page_at_flush = FALSE; + } + + mutex_exit(&(buf_pool->mutex)); +} + /************************************************************************ Returns the current state of is_hashed of a page. FALSE if the page is not in the pool. NOTE that this operation does not fix the page in the @@ -1185,6 +1215,8 @@ buf_page_init( block->space = space; block->offset = offset; + block->check_index_page_at_flush = FALSE; + block->lock_hash_val = lock_rec_hash(space, offset); block->lock_mutex = NULL; diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c index 4c6850af078..78bde60c9b2 100644 --- a/innobase/buf/buf0flu.c +++ b/innobase/buf/buf0flu.c @@ -15,6 +15,7 @@ Created 11/11/1995 Heikki Tuuri #include "ut0byte.h" #include "ut0lst.h" +#include "page0page.h" #include "fil0fil.h" #include "buf0buf.h" #include "buf0lru.h" @@ -225,6 +226,24 @@ buf_flush_buffered_writes(void) return; } + for (i = 0; i < trx_doublewrite->first_free; i++) { + block = trx_doublewrite->buf_block_arr[i]; + + if (block->check_index_page_at_flush + && !page_simple_validate(block->frame)) { + + buf_page_print(block->frame); + + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Apparent corruption of an index page\n" + "InnoDB: to be written to data file. We intentionally crash server\n" + "InnoDB: to prevent corrupt data from ending up in data\n" + "InnoDB: files.\n"); + ut_a(0); + } + } + if (trx_doublewrite->first_free > TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) { len = TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE; } else { diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index 095c27f1c5f..2ee2c9d18a9 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -29,7 +29,14 @@ Created 1/8/1996 Heikki Tuuri dict_sys_t* dict_sys = NULL; /* the dictionary system */ -rw_lock_t dict_foreign_key_check_lock; +rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve + this in X-mode, implicit or backround + operations purge, rollback, foreign + key checks reserve this in S-mode; we + cannot trust that MySQL protects + implicit or background operations + from dropping a table: this is our + mechanism */ #define DICT_HEAP_SIZE 100 /* initial memory heap size when creating a table or index object */ @@ -509,9 +516,8 @@ dict_init(void) UT_LIST_INIT(dict_sys->table_LRU); - rw_lock_create(&dict_foreign_key_check_lock); - rw_lock_set_level(&dict_foreign_key_check_lock, - SYNC_FOREIGN_KEY_CHECK); + rw_lock_create(&dict_operation_lock); + rw_lock_set_level(&dict_operation_lock, SYNC_DICT_OPERATION); } /************************************************************************** @@ -1851,14 +1857,14 @@ loop: /************************************************************************* Accepts a specified string. Comparisons are case-insensitive. */ -static + char* dict_accept( /*========*/ /* out: if string was accepted, the pointer is moved after that, else ptr is returned */ char* ptr, /* in: scan from this */ - const char* string, /* in: accept only this string as the next + const char* string,/* in: accept only this string as the next non-whitespace string */ ibool* success)/* out: TRUE if accepted */ { diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index 3e0f21395ef..98980f6c337 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -967,6 +967,7 @@ fil_extend_last_data_file( fil_node_t* node; fil_space_t* space; fil_system_t* system = fil_system; + byte* buf2; byte* buf; ibool success; ulint i; @@ -981,19 +982,23 @@ fil_extend_last_data_file( fil_node_prepare_for_io(node, system, space); - buf = mem_alloc(1024 * 1024); + buf2 = mem_alloc(1024 * 1024 + UNIV_PAGE_SIZE); + buf = ut_align(buf2, UNIV_PAGE_SIZE); memset(buf, '\0', 1024 * 1024); for (i = 0; i < size_increase / ((1024 * 1024) / UNIV_PAGE_SIZE); i++) { - success = os_file_write(node->name, node->handle, buf, + /* If we use native Windows aio, then also this write is + done using it */ + + success = os_aio(OS_FILE_WRITE, OS_AIO_SYNC, + node->name, node->handle, buf, (node->size << UNIV_PAGE_SIZE_SHIFT) & 0xFFFFFFFF, node->size >> (32 - UNIV_PAGE_SIZE_SHIFT), - 1024 * 1024); + 1024 * 1024, NULL, NULL); if (!success) { - break; } @@ -1003,7 +1008,7 @@ fil_extend_last_data_file( os_has_said_disk_full = FALSE; } - mem_free(buf); + mem_free(buf2); fil_node_complete_io(node, system, OS_FILE_WRITE); @@ -1528,7 +1533,6 @@ fil_page_set_type( ulint type) /* in: type */ { ut_ad(page); - ut_ad((type == FIL_PAGE_INDEX) || (type == FIL_PAGE_UNDO_LOG)); mach_write_to_2(page + FIL_PAGE_TYPE, type); } diff --git a/innobase/fsp/fsp0fsp.c b/innobase/fsp/fsp0fsp.c index 1abb043fdc2..ff586819d4a 100644 --- a/innobase/fsp/fsp0fsp.c +++ b/innobase/fsp/fsp0fsp.c @@ -769,6 +769,8 @@ fsp_init_file_page_low( #endif page = buf_frame_align(ptr); + buf_block_align(page)->check_index_page_at_flush = FALSE; + #ifdef UNIV_BASIC_LOG_DEBUG /* printf("In log debug version: Erase the contents of the file page\n"); */ @@ -1097,7 +1099,7 @@ fsp_fill_free_list( /* Initialize the ibuf page in a separate mini-transaction because it is low in the latching - order, and we must be able to release the its latch + order, and we must be able to release its latch before returning from the fsp routine */ mtr_start(&ibuf_mtr); @@ -1264,7 +1266,12 @@ fsp_alloc_free_page( free = xdes_find_bit(descr, XDES_FREE_BIT, TRUE, hint % FSP_EXTENT_SIZE, mtr); - ut_a(free != ULINT_UNDEFINED); + if (free == ULINT_UNDEFINED) { + + ut_print_buf(((byte*)descr) - 500, 1000); + + ut_a(0); + } xdes_set_bit(descr, XDES_FREE_BIT, free, FALSE, mtr); @@ -1412,7 +1419,12 @@ fsp_free_extent( descr = xdes_get_descriptor_with_space_hdr(header, space, page, mtr); - ut_a(xdes_get_state(descr, mtr) != XDES_FREE); + if (xdes_get_state(descr, mtr) == XDES_FREE) { + + ut_print_buf(((byte*)descr) - 500, 1000); + + ut_a(0); + } xdes_init(descr, mtr); @@ -1523,6 +1535,10 @@ fsp_alloc_seg_inode_page( page = buf_page_get(space, page_no, RW_X_LATCH, mtr); + buf_block_align(page)->check_index_page_at_flush = FALSE; + + fil_page_set_type(page, FIL_PAGE_INODE); + buf_page_dbg_add_level(page, SYNC_FSP_PAGE); for (i = 0; i < FSP_SEG_INODES_PER_PAGE; i++) { @@ -2298,6 +2314,8 @@ fseg_alloc_free_page_low( fseg_mark_page_used(seg_inode, space, ret_page, mtr); } + buf_reset_check_index_page_at_flush(space, ret_page); + return(ret_page); } diff --git a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c index b7d691485cc..143b3bfa584 100644 --- a/innobase/ibuf/ibuf0ibuf.c +++ b/innobase/ibuf/ibuf0ibuf.c @@ -1295,6 +1295,8 @@ ibuf_add_free_page( flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST, page + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, &mtr); + fil_page_set_type(page, FIL_PAGE_IBUF_FREE_LIST); + ibuf_data->seg_size++; ibuf_data->free_list_len++; @@ -1305,6 +1307,7 @@ ibuf_add_free_page( ibuf_bitmap_page_set_bits(bitmap_page, page_no, IBUF_BITMAP_IBUF, TRUE, &mtr); + mtr_commit(&mtr); mutex_exit(&ibuf_mutex); diff --git a/innobase/include/buf0buf.h b/innobase/include/buf0buf.h index 591c0ec54ab..f76c437bd1d 100644 --- a/innobase/include/buf0buf.h +++ b/innobase/include/buf0buf.h @@ -274,6 +274,15 @@ buf_page_peek_block( ulint space, /* in: space id */ ulint offset);/* in: page number */ /************************************************************************ +Resets the check_index_page_at_flush field of a page if found in the buffer +pool. */ + +void +buf_reset_check_index_page_at_flush( +/*================================*/ + ulint space, /* in: space id */ + ulint offset);/* in: page number */ +/************************************************************************ Sets file_page_was_freed TRUE if the page is found in the buffer pool. This function should be called when we free a file page and want the debug version to check that it is not accessed any more unless @@ -648,6 +657,14 @@ struct buf_block_struct{ then it can wait for this rw-lock */ buf_block_t* hash; /* node used in chaining to the page hash table */ + ibool check_index_page_at_flush; + /* TRUE if we know that this is + an index page, and want the database + to check its consistency before flush; + note that there may be pages in the + buffer pool which are index pages, + but this flag is not set because + we do not keep track of all pages */ /* 2. Page flushing fields */ UT_LIST_NODE_T(buf_block_t) flush_list; diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h index dd92c5aa467..b5e6e04a1de 100644 --- a/innobase/include/dict0dict.h +++ b/innobase/include/dict0dict.h @@ -26,6 +26,18 @@ Created 1/8/1996 Heikki Tuuri #include "ut0byte.h" #include "trx0types.h" +/************************************************************************* +Accepts a specified string. Comparisons are case-insensitive. */ + +char* +dict_accept( +/*========*/ + /* out: if string was accepted, the pointer + is moved after that, else ptr is returned */ + char* ptr, /* in: scan from this */ + const char* string,/* in: accept only this string as the next + non-whitespace string */ + ibool* success);/* out: TRUE if accepted */ /************************************************************************ Decrements the count of open MySQL handles to a table. */ @@ -798,7 +810,7 @@ dict_mutex_exit_for_mysql(void); extern dict_sys_t* dict_sys; /* the dictionary system */ -extern rw_lock_t dict_foreign_key_check_lock; +extern rw_lock_t dict_operation_lock; /* Dictionary system struct */ struct dict_sys_struct{ diff --git a/innobase/include/fil0fil.h b/innobase/include/fil0fil.h index 63e20221c16..23ef0304b2d 100644 --- a/innobase/include/fil0fil.h +++ b/innobase/include/fil0fil.h @@ -73,6 +73,8 @@ extern fil_addr_t fil_addr_null; /* File page types */ #define FIL_PAGE_INDEX 17855 #define FIL_PAGE_UNDO_LOG 2 +#define FIL_PAGE_INODE 3 +#define FIL_PAGE_IBUF_FREE_LIST 4 /* Space types */ #define FIL_TABLESPACE 501 diff --git a/innobase/include/lock0lock.h b/innobase/include/lock0lock.h index 288356d3270..d3b3d55d015 100644 --- a/innobase/include/lock0lock.h +++ b/innobase/include/lock0lock.h @@ -292,6 +292,27 @@ lock_sec_rec_modify_check_and_lock( dict_index_t* index, /* in: secondary index */ que_thr_t* thr); /* in: query thread */ /************************************************************************* +Like the counterpart for a clustered index below, but now we read a +secondary index record. */ + +ulint +lock_sec_rec_read_check_and_lock( +/*=============================*/ + /* out: DB_SUCCESS, DB_LOCK_WAIT, + DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */ + ulint flags, /* in: if BTR_NO_LOCKING_FLAG bit is set, + does nothing */ + rec_t* rec, /* in: user record or page supremum record + which should be read or passed over by a read + cursor */ + dict_index_t* index, /* in: secondary index */ + ulint mode, /* in: mode of the lock which the read cursor + should set on records: LOCK_S or LOCK_X; the + latter is possible in SELECT FOR UPDATE */ + ulint gap_mode,/* in: LOCK_ORDINARY, LOCK_GAP, or + LOCK_REC_NOT_GAP */ + que_thr_t* thr); /* in: query thread */ +/************************************************************************* Checks if locks of other transactions prevent an immediate read, or passing over by a read cursor, of a clustered index record. If they do, first tests if the query thread should anyway be suspended for some reason; if not, then @@ -313,25 +334,8 @@ lock_clust_rec_read_check_and_lock( ulint mode, /* in: mode of the lock which the read cursor should set on records: LOCK_S or LOCK_X; the latter is possible in SELECT FOR UPDATE */ - que_thr_t* thr); /* in: query thread */ -/************************************************************************* -Like the counterpart for a clustered index above, but now we read a -secondary index record. */ - -ulint -lock_sec_rec_read_check_and_lock( -/*=============================*/ - /* out: DB_SUCCESS, DB_LOCK_WAIT, - DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */ - ulint flags, /* in: if BTR_NO_LOCKING_FLAG bit is set, - does nothing */ - rec_t* rec, /* in: user record or page supremum record - which should be read or passed over by a read - cursor */ - dict_index_t* index, /* in: secondary index */ - ulint mode, /* in: mode of the lock which the read cursor - should set on records: LOCK_S or LOCK_X; the - latter is possible in SELECT FOR UPDATE */ + ulint gap_mode,/* in: LOCK_ORDINARY, LOCK_GAP, or + LOCK_REC_NOT_GAP */ que_thr_t* thr); /* in: query thread */ /************************************************************************* Checks that a record is seen in a consistent read. */ @@ -509,6 +513,7 @@ lock_validate(void); extern lock_sys_t* lock_sys; /* Lock modes and types */ +/* Basic modes */ #define LOCK_NONE 0 /* this flag is used elsewhere to note consistent read */ #define LOCK_IS 2 /* intention shared */ @@ -519,15 +524,20 @@ extern lock_sys_t* lock_sys; in an exclusive mode */ #define LOCK_MODE_MASK 0xF /* mask used to extract mode from the type_mode field in a lock */ +/* Lock types */ #define LOCK_TABLE 16 /* these type values should be so high that */ #define LOCK_REC 32 /* they can be ORed to the lock mode */ #define LOCK_TYPE_MASK 0xF0 /* mask used to extract lock type from the type_mode field in a lock */ +/* Waiting lock flag */ #define LOCK_WAIT 256 /* this wait bit should be so high that it can be ORed to the lock mode and type; when this bit is set, it means that the lock has not yet been granted, it is just waiting for its turn in the wait queue */ +/* Precise modes */ +#define LOCK_ORDINARY 0 /* this flag denotes an ordinary next-key lock + in contrast to LOCK_GAP or LOCK_REC_NOT_GAP */ #define LOCK_GAP 512 /* this gap bit should be so high that it can be ORed to the other flags; when this bit is set, it means that the @@ -537,7 +547,15 @@ extern lock_sys_t* lock_sys; the bit is set; locks of this type are created when records are removed from the index chain of records */ -#define LOCK_INSERT_INTENTION 1024 /* this bit is set when we place a waiting +#define LOCK_REC_NOT_GAP 1024 /* this bit means that the lock is only on + the index record and does NOT block inserts + to the gap before the index record; this is + used in the case when we retrieve a record + with a unique key, and is also used in + locking plain SELECTs (not part of UPDATE + or DELETE) when the user has set the READ + COMMITTED isolation level */ +#define LOCK_INSERT_INTENTION 2048 /* this bit is set when we place a waiting gap type record lock request in order to let an insert of an index record to wait until there are no conflicting locks by other diff --git a/innobase/include/os0file.h b/innobase/include/os0file.h index d65c7fd47e3..a7624a90d5e 100644 --- a/innobase/include/os0file.h +++ b/innobase/include/os0file.h @@ -111,6 +111,7 @@ log. */ #define OS_WIN31 1 #define OS_WIN95 2 #define OS_WINNT 3 +#define OS_WIN2000 4 extern ulint os_n_file_reads; extern ulint os_n_file_writes; @@ -122,7 +123,7 @@ Gets the operating system version. Currently works only on Windows. */ ulint os_get_os_version(void); /*===================*/ - /* out: OS_WIN95, OS_WIN31, OS_WINNT (2000 == NT) */ + /* out: OS_WIN95, OS_WIN31, OS_WINNT, or OS_WIN2000 */ /******************************************************************** Creates the seek mutexes used in positioned reads and writes. */ diff --git a/innobase/include/os0proc.h b/innobase/include/os0proc.h index 9da1f33e070..79750e5c1f7 100644 --- a/innobase/include/os0proc.h +++ b/innobase/include/os0proc.h @@ -15,6 +15,15 @@ Created 9/30/1995 Heikki Tuuri typedef void* os_process_t; typedef unsigned long int os_process_id_t; +/******************************************************************** +Converts the current process id to a number. It is not guaranteed that the +number is unique. In Linux returns the 'process number' of the current +thread. That number is the same as one sees in 'top', for example. In Linux +the thread id is not the same as one sees in 'top'. */ + +ulint +os_proc_get_number(void); +/*====================*/ /******************************************************************** Allocates non-cacheable memory. */ diff --git a/innobase/include/os0thread.h b/innobase/include/os0thread.h index 8355afa46e9..efc8651e06d 100644 --- a/innobase/include/os0thread.h +++ b/innobase/include/os0thread.h @@ -16,11 +16,8 @@ Created 9/8/1995 Heikki Tuuri this is also the size of the wait slot array for MySQL threads which can wait inside InnoDB */ #ifdef __WIN__ -/* Windows 95/98/ME seemed to have difficulties creating the all -the event semaphores for the wait array slots. If the computer had -<= 64 MB memory, InnoDB startup could take minutes or even crash. -That is why we set this to only 1000 in Windows. */ - +/* Create less event semaphores because Win 98/ME had difficult creating +40000 event semaphores */ #define OS_THREAD_MAX_N 1000 #else #define OS_THREAD_MAX_N 10000 diff --git a/innobase/include/page0cur.h b/innobase/include/page0cur.h index 144e0e02b21..c3f0decdb4b 100644 --- a/innobase/include/page0cur.h +++ b/innobase/include/page0cur.h @@ -26,7 +26,12 @@ Created 10/4/1994 Heikki Tuuri #define PAGE_CUR_GE 2 #define PAGE_CUR_L 3 #define PAGE_CUR_LE 4 -#define PAGE_CUR_DBG 5 +#define PAGE_CUR_LE_OR_EXTENDS 5 /* This is a search mode used in + "column LIKE 'abc%' ORDER BY column DESC"; + we have to find strings which are <= 'abc' or + which extend it */ +#define PAGE_CUR_DBG 6 + extern ulint page_cur_short_succ; diff --git a/innobase/include/page0page.h b/innobase/include/page0page.h index 2f77127466f..b5e33af5bc0 100644 --- a/innobase/include/page0page.h +++ b/innobase/include/page0page.h @@ -666,6 +666,16 @@ page_rec_validate( /* out: TRUE if ok */ rec_t* rec); /* in: record on the page */ /******************************************************************* +This function checks the consistency of an index page when we do not +know the index. This is also resilient so that this should never crash +even if the page is total garbage. */ + +ibool +page_simple_validate( +/*=================*/ + /* out: TRUE if ok */ + page_t* page); /* in: index page */ +/******************************************************************* This function checks the consistency of an index page. */ ibool diff --git a/innobase/include/read0read.h b/innobase/include/read0read.h index cebb2d6701c..db6bf888095 100644 --- a/innobase/include/read0read.h +++ b/innobase/include/read0read.h @@ -45,6 +45,14 @@ read_view_close( /*============*/ read_view_t* view); /* in: read view */ /************************************************************************* +Closes a consistent read view for MySQL. This function is called at an SQL +statement end if the trx isolation level is <= TRX_ISO_READ_COMMITTED. */ + +void +read_view_close_for_mysql( +/*======================*/ + trx_t* trx); /* in: trx which has a read view */ +/************************************************************************* Checks if a read view sees the specified transaction. */ UNIV_INLINE ibool diff --git a/innobase/include/rem0rec.h b/innobase/include/rem0rec.h index 12e3a8b39d6..b28f39925c1 100644 --- a/innobase/include/rem0rec.h +++ b/innobase/include/rem0rec.h @@ -148,12 +148,22 @@ data field in the record. */ byte* rec_get_nth_field( /*==============*/ - /* out: pointer to the field, NULL if SQL null */ + /* out: pointer to the field */ rec_t* rec, /* in: record */ ulint n, /* in: index of the field */ ulint* len); /* out: length of the field; UNIV_SQL_NULL if SQL null */ /**************************************************************** +Return field length or UNIV_SQL_NULL. */ +UNIV_INLINE +ulint +rec_get_nth_field_len( +/*==================*/ + /* out: length of the field; UNIV_SQL_NULL if SQL + null */ + rec_t* rec, /* in: record */ + ulint n); /* in: index of the field */ +/**************************************************************** Gets the physical size of a field. Also an SQL null may have a field of size > 0, if the data type is of a fixed size. */ UNIV_INLINE diff --git a/innobase/include/rem0rec.ic b/innobase/include/rem0rec.ic index aaa3c58a003..9dfd4faeec8 100644 --- a/innobase/include/rem0rec.ic +++ b/innobase/include/rem0rec.ic @@ -65,6 +65,24 @@ a field stored to another page: */ #define REC_2BYTE_EXTERN_MASK 0x4000 +/**************************************************************** +Return field length or UNIV_SQL_NULL. */ +UNIV_INLINE +ulint +rec_get_nth_field_len( +/*==================*/ + /* out: length of the field; UNIV_SQL_NULL if SQL + null */ + rec_t* rec, /* in: record */ + ulint n) /* in: index of the field */ +{ + ulint len; + + rec_get_nth_field(rec, n, &len); + + return(len); +} + /*************************************************************** Sets the value of the ith field SQL null bit. */ diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h index 9de5e9ccfc9..4d2768cf109 100644 --- a/innobase/include/srv0srv.h +++ b/innobase/include/srv0srv.h @@ -57,8 +57,6 @@ extern ulint srv_flush_log_at_trx_commit; extern byte srv_latin1_ordering[256];/* The sort order table of the latin1 character set */ -extern ibool srv_use_native_aio; - extern ulint srv_pool_size; extern ulint srv_mem_pool_size; extern ulint srv_lock_table_size; @@ -70,8 +68,9 @@ extern dulint srv_archive_recovery_limit_lsn; extern ulint srv_lock_wait_timeout; -extern char* srv_unix_file_flush_method_str; +extern char* srv_file_flush_method_str; extern ulint srv_unix_file_flush_method; +extern ulint srv_win_file_flush_method; extern ulint srv_force_recovery; extern ulint srv_thread_concurrency; @@ -154,13 +153,19 @@ typedef struct srv_sys_struct srv_sys_t; /* The server system */ extern srv_sys_t* srv_sys; -/* Alternatives for the field flush option in Unix; see the InnoDB manual about +/* Alternatives for the file flush option in Unix; see the InnoDB manual about what these mean */ -#define SRV_UNIX_FDATASYNC 1 +#define SRV_UNIX_FDATASYNC 1 /* This is the default; it is currently mapped + to a call of fsync() because fdatasync() + seemed to corrupt files in Linux and Solaris */ #define SRV_UNIX_O_DSYNC 2 #define SRV_UNIX_LITTLESYNC 3 #define SRV_UNIX_NOSYNC 4 +/* Alternatives for file i/o in Windows */ +#define SRV_WIN_IO_NORMAL 1 +#define SRV_WIN_IO_UNBUFFERED 2 /* This is the default */ + /* Alternatives for srv_force_recovery. Non-zero values are intended to help the user get a damaged database up so that he can dump intact tables and rows with SELECT INTO OUTFILE. The database must not otherwise @@ -311,15 +316,17 @@ srv_conc_exit_innodb( trx_t* trx); /* in: transaction object associated with the thread */ /******************************************************************* -Puts a MySQL OS thread to wait for a lock to be released. */ +Puts a MySQL OS thread to wait for a lock to be released. If an error +occurs during the wait trx->error_state associated with thr is +!= DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK +are possible errors. DB_DEADLOCK is returned if selective deadlock +resolution chose this transaction as a victim. */ -ibool +void srv_suspend_mysql_thread( /*=====================*/ - /* out: TRUE if the lock wait timeout was - exceeded */ - que_thr_t* thr); /* in: query thread associated with - the MySQL OS thread */ + que_thr_t* thr); /* in: query thread associated with the MySQL + OS thread */ /************************************************************************ Releases a MySQL OS thread waiting for a lock to be released, if the thread is already suspended. */ @@ -407,3 +414,4 @@ struct srv_sys_struct{ extern ulint srv_n_threads_active[]; #endif + diff --git a/innobase/include/sync0rw.h b/innobase/include/sync0rw.h index 7ad38f5bc7f..5aa3dcdffc3 100644 --- a/innobase/include/sync0rw.h +++ b/innobase/include/sync0rw.h @@ -335,7 +335,8 @@ ibool rw_lock_own( /*========*/ rw_lock_t* lock, /* in: rw-lock */ - ulint lock_type); /* in: lock type */ + ulint lock_type); /* in: lock type: RW_LOCK_SHARED, + RW_LOCK_EX */ /********************************************************************** Checks if somebody has locked the rw-lock in the specified mode. */ diff --git a/innobase/include/sync0sync.h b/innobase/include/sync0sync.h index 5bfa0bc2d48..320f8faf12d 100644 --- a/innobase/include/sync0sync.h +++ b/innobase/include/sync0sync.h @@ -371,10 +371,12 @@ or row lock! */ #define SYNC_NO_ORDER_CHECK 3000 /* this can be used to suppress latching order checking */ #define SYNC_LEVEL_NONE 2000 /* default: level not defined */ -#define SYNC_FOREIGN_KEY_CHECK 1001 +#define SYNC_DICT_OPERATION 1001 /* table create, drop, etc. reserve + this in X-mode, implicit or backround + operations purge, rollback, foreign + key checks reserve this in S-mode */ #define SYNC_DICT 1000 #define SYNC_DICT_AUTOINC_MUTEX 999 -#define SYNC_PURGE_IS_RUNNING 997 #define SYNC_DICT_HEADER 995 #define SYNC_IBUF_HEADER 914 #define SYNC_IBUF_PESS_INSERT_MUTEX 912 diff --git a/innobase/include/trx0purge.h b/innobase/include/trx0purge.h index 087be2f060e..049c79aec9b 100644 --- a/innobase/include/trx0purge.h +++ b/innobase/include/trx0purge.h @@ -111,9 +111,6 @@ struct trx_purge_struct{ of the trx system and it never ends */ que_t* query; /* The query graph which will do the parallelized purge operation */ - rw_lock_t purge_is_running;/* Purge operation set an x-latch here - while it is accessing a table: this - prevents dropping of the table */ rw_lock_t latch; /* The latch protecting the purge view. A purge operation must acquire an x-latch here for the instant at which diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 9b29c481b6d..874b126e47c 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -327,6 +327,7 @@ struct trx_struct{ time_t start_time; /* time the trx object was created or the state last time became TRX_ACTIVE */ + ulint isolation_level;/* TRX_ISO_REPEATABLE_READ, ... */ ibool check_foreigns; /* normally TRUE, but if the user wants to suppress foreign key checks, (in table imports, for example) we @@ -350,6 +351,9 @@ struct trx_struct{ /*------------------------------*/ void* mysql_thd; /* MySQL thread handle corresponding to this trx, or NULL */ + char** mysql_query_str;/* pointer to the field in mysqld_thd + which contains the pointer to the + current SQL query string */ char* mysql_log_file_name; /* if MySQL binlog is used, this field contains a pointer to the latest file @@ -371,6 +375,9 @@ struct trx_struct{ replication has processed */ os_thread_id_t mysql_thread_id;/* id of the MySQL thread associated with this transaction object */ + ulint mysql_process_no;/* since in Linux, 'top' reports + process id's and not thread id's, we + store the process number too */ /*------------------------------*/ ulint n_mysql_tables_in_use; /* number of Innobase tables used in the processing of the current @@ -379,9 +386,9 @@ struct trx_struct{ /* how many tables the current SQL statement uses, except those in consistent read */ - ibool has_dict_foreign_key_check_lock; + ibool has_dict_operation_lock; /* TRUE if the trx currently holds - an s-lock on dict_foreign_... */ + an s-lock on dict_operation_lock */ ibool has_search_latch; /* TRUE if this trx has latched the search system latch in S-mode */ @@ -523,6 +530,41 @@ struct trx_struct{ #define TRX_QUE_ROLLING_BACK 3 /* transaction is rolling back */ #define TRX_QUE_COMMITTING 4 /* transaction is committing */ +/* Transaction isolation levels */ +#define TRX_ISO_READ_UNCOMMITTED 1 /* dirty read: non-locking + SELECTs are performed so that + we do not look at a possible + earlier version of a record; + thus they are not 'consistent' + reads under this isolation + level; otherwise like level + 2 */ + +#define TRX_ISO_READ_COMMITTED 2 /* somewhat Oracle-like + isolation, except that in + range UPDATE and DELETE we + must block phantom rows + with next-key locks; + SELECT ... FOR UPDATE and ... + LOCK IN SHARE MODE only lock + the index records, NOT the + gaps before them, and thus + allow free inserting; + each consistent read reads its + own snapshot */ + +#define TRX_ISO_REPEATABLE_READ 3 /* this is the default; + all consistent reads in the + same trx read the same + snapshot; + full next-key locking used + in locking reads to block + insertions into gaps */ + +#define TRX_ISO_SERIALIZABLE 4 /* all plain SELECTs are + converted to LOCK IN SHARE + MODE reads */ + /* Types of a trx signal */ #define TRX_SIG_NO_SIGNAL 100 #define TRX_SIG_TOTAL_ROLLBACK 1 diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c index 866fe556af9..92ee5ee6cbe 100644 --- a/innobase/lock/lock0lock.c +++ b/innobase/lock/lock0lock.c @@ -70,6 +70,11 @@ A waiting record lock can also be of the gap type. A waiting lock request can be granted when there is no conflicting mode lock request by another transaction ahead of it in the explicit lock queue. +In version 4.0.5 we added yet another explicit lock type: LOCK_REC_NOT_GAP. +It only locks the record it is placed on, not the gap before the record. +This lock type is necessary to emulate an Oracle-like READ COMMITTED isolation +level. + ------------------------------------------------------------------------- RULE 1: If there is an implicit x-lock on a record, and there are non-gap ------- @@ -294,7 +299,9 @@ struct lock_struct{ UT_LIST_NODE_T(lock_t) trx_locks; /* list of the locks of the transaction */ - ulint type_mode; /* lock type, mode, gap flag, and + ulint type_mode; /* lock type, mode, LOCK_GAP or + LOCK_REC_NOT_GAP, + LOCK_INSERT_INTENTION, wait flag, ORed */ hash_node_t hash; /* hash chain node for a record lock */ dict_index_t* index; /* index for a record lock */ @@ -309,6 +316,10 @@ Monitor will then fetch it and print */ ibool lock_deadlock_found = FALSE; char* lock_latest_err_buf; /* We allocate 5000 bytes for this */ +/* Flags for recursive deadlock search */ +#define LOCK_VICTIM_IS_START 1 +#define LOCK_VICTIM_IS_OTHER 2 + /************************************************************************ Checks if a lock request results in a deadlock. */ static @@ -700,23 +711,23 @@ lock_rec_get_gap( } /************************************************************************* -Sets the gap flag of a record lock. */ +Gets the LOCK_REC_NOT_GAP flag of a record lock. */ UNIV_INLINE -void -lock_rec_set_gap( -/*=============*/ - lock_t* lock, /* in: record lock */ - ibool val) /* in: value to set: TRUE or FALSE */ +ibool +lock_rec_get_rec_not_gap( +/*=====================*/ + /* out: TRUE if LOCK_REC_NOT_GAP flag set */ + lock_t* lock) /* in: record lock */ { ut_ad(lock); - ut_ad((val == TRUE) || (val == FALSE)); ut_ad(lock_get_type(lock) == LOCK_REC); - if (val) { - lock->type_mode = lock->type_mode | LOCK_GAP; - } else { - lock->type_mode = lock->type_mode & ~LOCK_GAP; + if (lock->type_mode & LOCK_REC_NOT_GAP) { + + return(TRUE); } + + return(FALSE); } /************************************************************************* @@ -739,26 +750,6 @@ lock_rec_get_insert_intention( return(FALSE); } -/************************************************************************* -Sets the waiting insert flag of a record lock. */ -UNIV_INLINE -void -lock_rec_set_insert_intention( -/*==========================*/ - lock_t* lock, /* in: record lock */ - ibool val) /* in: value to set: TRUE or FALSE */ -{ - ut_ad(lock); - ut_ad((val == TRUE) || (val == FALSE)); - ut_ad(lock_get_type(lock) == LOCK_REC); - - if (val) { - lock->type_mode = lock->type_mode | LOCK_INSERT_INTENTION; - } else { - lock->type_mode = lock->type_mode & ~LOCK_INSERT_INTENTION; - } -} - /************************************************************************* Calculates if lock mode 1 is stronger or equal to lock mode 2. */ UNIV_INLINE @@ -848,48 +839,53 @@ lock_rec_has_to_wait( /* out: TRUE if new lock has to wait for lock2 to be removed */ trx_t* trx, /* in: trx of new lock */ - ulint mode, /* in: LOCK_S or LOCK_X */ - ulint gap, /* in: LOCK_GAP or 0 */ - ulint insert_intention, - /* in: LOCK_INSERT_INTENTION or 0 */ + ulint type_mode,/* in: precise mode of the new lock to set: + LOCK_S or LOCK_X, possibly ORed to + LOCK_GAP or LOCK_REC_NOT_GAP, LOCK_INSERT_INTENTION */ lock_t* lock2) /* in: another record lock; NOTE that it is assumed that this has a lock bit set on the same record as - in lock1 */ + in the new lock we are setting */ { ut_ad(trx && lock2); ut_ad(lock_get_type(lock2) == LOCK_REC); - ut_ad(mode == LOCK_S || mode == LOCK_X); - ut_ad(gap == LOCK_GAP || gap == 0); - ut_ad(insert_intention == LOCK_INSERT_INTENTION - || insert_intention == 0); - if (trx != lock2->trx && !lock_mode_compatible(mode, + if (trx != lock2->trx + && !lock_mode_compatible(LOCK_MODE_MASK & type_mode, lock_get_mode(lock2))) { - /* We have somewhat complex rules when gap type - record locks cause waits */ + /* We have somewhat complex rules when gap type record locks + cause waits */ - if (!gap && lock_rec_get_insert_intention(lock2)) { + if ((type_mode & LOCK_REC_NOT_GAP) + && lock_rec_get_gap(lock2)) { + /* Lock on just the record does not need to wait for + a gap type lock */ - /* Request of a full next-key record does not - need to wait for an insert intention lock to be - removed. This is ok since our rules allow conflicting - locks on gaps. This eliminates a spurious deadlock - caused by a next-key lock waiting for an insert - intention lock; when the insert intention lock was - granted, the insert deadlocked on the waiting - next-key lock. */ - return(FALSE); } - if (insert_intention && lock_rec_get_insert_intention(lock2)) { + if ((type_mode & LOCK_GAP) + && lock_rec_get_rec_not_gap(lock2)) { + + /* Lock on gap does not need to wait for + a LOCK_REC_NOT_GAP type lock */ - /* An insert intention is not disturbed by another - insert intention; this removes a spurious deadlock - caused by inserts which had to wait for a next-key - lock to be removed */ + return(FALSE); + } + if (lock_rec_get_insert_intention(lock2)) { + + /* No lock request needs to wait for an insert + intention lock to be removed. This is ok since our + rules allow conflicting locks on gaps. This eliminates + a spurious deadlock caused by a next-key lock waiting + for an insert intention lock; when the insert + intention lock was granted, the insert deadlocked on + the waiting next-key lock. + + Also, insert intention locks do not disturb each + other. */ + return(FALSE); } @@ -921,10 +917,7 @@ lock_has_to_wait( ut_ad(lock_get_type(lock2) == LOCK_REC); return(lock_rec_has_to_wait(lock1->trx, - lock_get_mode(lock1), - lock_rec_get_gap(lock1), - lock_rec_get_insert_intention(lock1), - lock2)); + lock1->type_mode, lock2)); } return(TRUE); @@ -1386,32 +1379,41 @@ lock_table_has( /*============= FUNCTIONS FOR ANALYZING RECORD LOCK QUEUE ================*/ /************************************************************************* -Checks if a transaction has a GRANTED explicit lock on rec, where the gap -flag or the insert intention flag is not set, stronger or equal to mode. -Note that locks on the supremum of a page are a special case here, since -they are always gap type locks, even if the gap flag is not set in them. */ +Checks if a transaction has a GRANTED explicit lock on rec stronger or equal +to precise_mode. */ UNIV_INLINE lock_t* lock_rec_has_expl( /*==============*/ /* out: lock or NULL */ - ulint mode, /* in: lock mode */ + ulint precise_mode,/* in: LOCK_S or LOCK_X possibly ORed to + LOCK_GAP or LOCK_REC_NOT_GAP, + for a supremum record we regard this always a gap + type request */ rec_t* rec, /* in: record */ trx_t* trx) /* in: transaction */ { lock_t* lock; - - ut_ad(mutex_own(&kernel_mutex)); - ut_ad((mode == LOCK_X) || (mode == LOCK_S)); + ut_ad(mutex_own(&kernel_mutex)); + ut_ad((precise_mode & LOCK_MODE_MASK) == LOCK_S + || (precise_mode & LOCK_MODE_MASK) == LOCK_X); + ut_ad(!(precise_mode & LOCK_INSERT_INTENTION)); + lock = lock_rec_get_first(rec); while (lock) { if (lock->trx == trx - && lock_mode_stronger_or_eq(lock_get_mode(lock), mode) + && lock_mode_stronger_or_eq(lock_get_mode(lock), + precise_mode & LOCK_MODE_MASK) && !lock_get_wait(lock) - && !lock_rec_get_insert_intention(lock) - && !lock_rec_get_gap(lock)) { + && (!lock_rec_get_rec_not_gap(lock) + || (precise_mode & LOCK_REC_NOT_GAP) + || page_rec_is_supremum(rec)) + && (!lock_rec_get_gap(lock) + || (precise_mode & LOCK_GAP) + || page_rec_is_supremum(rec)) + && (!lock_rec_get_insert_intention(lock))) { return(lock); } @@ -1429,7 +1431,7 @@ lock_t* lock_rec_other_has_expl_req( /*========================*/ /* out: lock or NULL */ - ulint mode, /* in: lock mode */ + ulint mode, /* in: LOCK_S or LOCK_X */ ulint gap, /* in: LOCK_GAP if also gap locks are taken into account, or 0 if not */ ulint wait, /* in: LOCK_WAIT if also waiting locks are @@ -1471,27 +1473,21 @@ lock_t* lock_rec_other_has_conflicting( /*===========================*/ /* out: lock or NULL */ - ulint mode, /* in: lock mode of the lock we are going to reserve */ - ulint gap, /* in: LOCK_GAP if we are going to reserve a gap type - lock, else 0 */ - ulint insert_intention, - /* in: LOCK_INSERT_INTENTION if we are going to - reserve an insert intention lock */ + ulint mode, /* in: LOCK_S or LOCK_X, + possibly ORed to LOCK_GAP or LOC_REC_NOT_GAP, + LOCK_INSERT_INTENTION */ rec_t* rec, /* in: record to look at */ trx_t* trx) /* in: our transaction */ { lock_t* lock; ut_ad(mutex_own(&kernel_mutex)); - ut_ad(mode == LOCK_X || mode == LOCK_S); - ut_ad(gap == 0 || gap == LOCK_GAP); - ut_ad(insert_intention == LOCK_INSERT_INTENTION - || insert_intention == 0); + lock = lock_rec_get_first(rec); while (lock) { - if (lock_rec_has_to_wait(trx, mode, gap, insert_intention, - lock)) { + if (lock_rec_has_to_wait(trx, mode, lock)) { + return(lock); } @@ -1607,14 +1603,14 @@ lock_rec_create( page_no = buf_frame_get_page_no(page); heap_no = rec_get_heap_no(rec); - /* If rec is the supremum record, then we reset the gap bit, as - all locks on the supremum are automatically of the gap type, and - we try to avoid unnecessary memory consumption of a new record lock - struct for a gap type lock */ + /* If rec is the supremum record, then we reset the gap and + LOCK_REC_NOT_GAP bits, as all locks on the supremum are + automatically of the gap type */ if (rec == page_get_supremum_rec(page)) { + ut_ad(!(type_mode & LOCK_REC_NOT_GAP)); - type_mode = type_mode & ~LOCK_GAP; + type_mode = type_mode & ~(LOCK_GAP | LOCK_REC_NOT_GAP); } /* Make lock bitmap bigger by a safety margin */ @@ -1666,10 +1662,14 @@ ulint lock_rec_enqueue_waiting( /*=====================*/ /* out: DB_LOCK_WAIT, DB_DEADLOCK, or - DB_QUE_THR_SUSPENDED */ + DB_QUE_THR_SUSPENDED, or DB_SUCCESS; + DB_SUCCESS means that there was a deadlock, + but another transaction was chosen as a + victim, and we got the lock immediately: + no need to wait then */ ulint type_mode,/* in: lock mode this transaction is - requesting: LOCK_S or LOCK_X, ORed with - LOCK_GAP if a gap lock is requested, ORed + requesting: LOCK_S or LOCK_X, possibly ORed + with LOCK_GAP or LOCK_REC_NOT_GAP, ORed with LOCK_INSERT_INTENTION if this waiting lock request is set when performing an insert of an index record */ @@ -1718,6 +1718,14 @@ index->table_name); return(DB_DEADLOCK); } + /* If there was a deadlock but we chose another transaction as a + victim, it is possible that we already have the lock now granted! */ + + if (trx->wait_lock == NULL) { + + return(DB_SUCCESS); + } + trx->que_state = TRX_QUE_LOCK_WAIT; trx->wait_started = time(NULL); @@ -1744,8 +1752,8 @@ lock_rec_add_to_queue( /*==================*/ /* out: lock where the bit was set, NULL if out of memory */ - ulint type_mode,/* in: lock mode, wait, and gap flags; type - is ignored and replaced by LOCK_REC */ + ulint type_mode,/* in: lock mode, wait, gap etc. flags; + type is ignored and replaced by LOCK_REC */ rec_t* rec, /* in: record on page */ dict_index_t* index, /* in: index of record */ trx_t* trx) /* in: transaction */ @@ -1759,12 +1767,11 @@ lock_rec_add_to_queue( ut_ad(mutex_own(&kernel_mutex)); ut_ad((type_mode & (LOCK_WAIT | LOCK_GAP)) || ((type_mode & LOCK_MODE_MASK) != LOCK_S) - || !lock_rec_other_has_expl_req(LOCK_X, 0, LOCK_WAIT, - rec, trx)); + || !lock_rec_other_has_expl_req(LOCK_X, 0, LOCK_WAIT, rec, trx)); ut_ad((type_mode & (LOCK_WAIT | LOCK_GAP)) || ((type_mode & LOCK_MODE_MASK) != LOCK_X) - || !lock_rec_other_has_expl_req(LOCK_S, 0, LOCK_WAIT, - rec, trx)); + || !lock_rec_other_has_expl_req(LOCK_S, 0, LOCK_WAIT, rec, trx)); + type_mode = type_mode | LOCK_REC; page = buf_frame_align(rec); @@ -1775,12 +1782,15 @@ lock_rec_add_to_queue( struct for a gap type lock */ if (rec == page_get_supremum_rec(page)) { + ut_ad(!(type_mode & LOCK_REC_NOT_GAP)); - type_mode = type_mode & ~LOCK_GAP; + /* There should never be LOCK_REC_NOT_GAP on a supremum + record, but let us play safe */ + + type_mode = type_mode & ~(LOCK_GAP | LOCK_REC_NOT_GAP); } - /* Look for a waiting lock request on the same record, or for a - similar record lock on the same page */ + /* Look for a waiting lock request on the same record or on a gap */ heap_no = rec_get_heap_no(rec); lock = lock_rec_get_first_on_page(rec); @@ -1795,6 +1805,9 @@ lock_rec_add_to_queue( lock = lock_rec_get_next_on_page(lock); } + /* Look for a similar record lock on the same page: if one is found + and there are no waiting lock requests, we can just set the bit */ + similar_lock = lock_rec_find_similar_on_page(type_mode, rec, trx); if (similar_lock && !somebody_waits && !(type_mode & LOCK_WAIT)) { @@ -1822,7 +1835,8 @@ lock_rec_lock_fast( ibool impl, /* in: if TRUE, no lock is set if no wait is necessary: we assume that the caller will set an implicit lock */ - ulint mode, /* in: lock mode */ + ulint mode, /* in: lock mode: LOCK_X or LOCK_S possibly + ORed to either LOCK_GAP or LOCK_REC_NOT_GAP */ rec_t* rec, /* in: record */ dict_index_t* index, /* in: index of record */ que_thr_t* thr) /* in: query thread */ @@ -1831,8 +1845,16 @@ lock_rec_lock_fast( ulint heap_no; ut_ad(mutex_own(&kernel_mutex)); - ut_ad((mode == LOCK_X) || (mode == LOCK_S)); - + ut_ad((LOCK_MODE_MASK & mode) != LOCK_S + || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); + ut_ad((LOCK_MODE_MASK & mode) != LOCK_X + || lock_table_has(thr_get_trx(thr), index->table, LOCK_IX)); + ut_ad((LOCK_MODE_MASK & mode) == LOCK_S + || (LOCK_MODE_MASK & mode) == LOCK_X); + ut_ad(mode - (LOCK_MODE_MASK & mode) == LOCK_GAP + || mode - (LOCK_MODE_MASK & mode) == 0 + || mode - (LOCK_MODE_MASK & mode) == LOCK_REC_NOT_GAP); + heap_no = rec_get_heap_no(rec); lock = lock_rec_get_first_on_page(rec); @@ -1877,7 +1899,8 @@ lock_rec_lock_slow( ibool impl, /* in: if TRUE, no lock is set if no wait is necessary: we assume that the caller will set an implicit lock */ - ulint mode, /* in: lock mode */ + ulint mode, /* in: lock mode: LOCK_X or LOCK_S possibly + ORed to either LOCK_GAP or LOCK_REC_NOT_GAP */ rec_t* rec, /* in: record */ dict_index_t* index, /* in: index of record */ que_thr_t* thr) /* in: query thread */ @@ -1886,20 +1909,24 @@ lock_rec_lock_slow( ulint err; ut_ad(mutex_own(&kernel_mutex)); - ut_ad((mode == LOCK_X) || (mode == LOCK_S)); - + ut_ad((LOCK_MODE_MASK & mode) != LOCK_S + || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); + ut_ad((LOCK_MODE_MASK & mode) != LOCK_X + || lock_table_has(thr_get_trx(thr), index->table, LOCK_IX)); + ut_ad((LOCK_MODE_MASK & mode) == LOCK_S + || (LOCK_MODE_MASK & mode) == LOCK_X); + ut_ad(mode - (LOCK_MODE_MASK & mode) == LOCK_GAP + || mode - (LOCK_MODE_MASK & mode) == 0 + || mode - (LOCK_MODE_MASK & mode) == LOCK_REC_NOT_GAP); + trx = thr_get_trx(thr); - - ut_ad((mode != LOCK_S) || lock_table_has(trx, index->table, - LOCK_IS)); - ut_ad((mode != LOCK_X) || lock_table_has(trx, index->table, - LOCK_IX)); + if (lock_rec_has_expl(mode, rec, trx)) { /* The trx already has a strong enough lock on rec: do nothing */ err = DB_SUCCESS; - } else if (lock_rec_other_has_conflicting(mode, 0, 0, rec, trx)) { + } else if (lock_rec_other_has_conflicting(mode, rec, trx)) { /* If another transaction has a non-gap conflicting request in the queue, as this transaction does not have a lock strong @@ -1935,7 +1962,8 @@ lock_rec_lock( ibool impl, /* in: if TRUE, no lock is set if no wait is necessary: we assume that the caller will set an implicit lock */ - ulint mode, /* in: lock mode */ + ulint mode, /* in: lock mode: LOCK_X or LOCK_S possibly + ORed to either LOCK_GAP or LOCK_REC_NOT_GAP */ rec_t* rec, /* in: record */ dict_index_t* index, /* in: index of record */ que_thr_t* thr) /* in: query thread */ @@ -1943,11 +1971,16 @@ lock_rec_lock( ulint err; ut_ad(mutex_own(&kernel_mutex)); - ut_ad((mode != LOCK_S) || lock_table_has(thr_get_trx(thr), - index->table, LOCK_IS)); - ut_ad((mode != LOCK_X) || lock_table_has(thr_get_trx(thr), - index->table, LOCK_IX)); - + ut_ad((LOCK_MODE_MASK & mode) != LOCK_S + || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); + ut_ad((LOCK_MODE_MASK & mode) != LOCK_X + || lock_table_has(thr_get_trx(thr), index->table, LOCK_IX)); + ut_ad((LOCK_MODE_MASK & mode) == LOCK_S + || (LOCK_MODE_MASK & mode) == LOCK_X); + ut_ad(mode - (LOCK_MODE_MASK & mode) == LOCK_GAP + || mode - (LOCK_MODE_MASK & mode) == LOCK_REC_NOT_GAP + || mode - (LOCK_MODE_MASK & mode) == 0); + if (lock_rec_lock_fast(impl, mode, rec, index, thr)) { /* We try a simplified and faster subroutine for the most @@ -2011,26 +2044,33 @@ lock_grant( ut_ad(mutex_own(&kernel_mutex)); lock_reset_lock_and_trx_wait(lock); - - if (lock_get_mode(lock) == LOCK_AUTO_INC) { - if (lock->trx->auto_inc_lock != NULL) { - fprintf(stderr, - "InnoDB: Error: trx already had an AUTO-INC lock!\n"); - } + if (lock_get_mode(lock) == LOCK_AUTO_INC) { - /* Store pointer to lock to trx so that we know to - release it at the end of the SQL statement */ + if (lock->trx->auto_inc_lock != NULL) { + fprintf(stderr, + "InnoDB: Error: trx already had an AUTO-INC lock!\n"); + } - lock->trx->auto_inc_lock = lock; - } + /* Store pointer to lock to trx so that we know to + release it at the end of the SQL statement */ + + lock->trx->auto_inc_lock = lock; + } if (lock_print_waits) { printf("Lock wait for trx %lu ends\n", ut_dulint_get_low(lock->trx->id)); } + + /* If we are resolving a deadlock by choosing another transaction + as a victim, then our original transaction may not be in the + TRX_QUE_LOCK_WAIT state, and there is no need to end the lock wait + for it */ - trx_end_lock_wait(lock->trx); + if (lock->trx->que_state == TRX_QUE_LOCK_WAIT) { + trx_end_lock_wait(lock->trx); + } } /***************************************************************** @@ -2080,7 +2120,7 @@ lock_rec_dequeue_from_page( ut_ad(lock_get_type(in_lock) == LOCK_REC); trx = in_lock->trx; - + space = in_lock->un_member.rec_lock.space; page_no = in_lock->un_member.rec_lock.page_no; @@ -2199,9 +2239,10 @@ lock_rec_reset_and_release_wait( } /***************************************************************** -Makes a record to inherit the locks of another record as gap type locks, but -does not reset the lock bits of the other record. Also waiting lock requests -on rec are inherited as GRANTED gap locks. */ +Makes a record to inherit the locks (except LOCK_INSERT_INTENTION type) +of another record as gap type locks, but does not reset the lock bits of +the other record. Also waiting lock requests on rec are inherited as +GRANTED gap locks. */ void lock_rec_inherit_to_gap( @@ -2217,9 +2258,45 @@ lock_rec_inherit_to_gap( lock = lock_rec_get_first(rec); while (lock != NULL) { - lock_rec_add_to_queue(((lock->type_mode | LOCK_GAP) - & ~LOCK_WAIT), + if (!lock_rec_get_insert_intention(lock)) { + + lock_rec_add_to_queue(LOCK_REC | lock_get_mode(lock) + | LOCK_GAP, heir, lock->index, lock->trx); + } + + lock = lock_rec_get_next(rec, lock); + } +} + +/***************************************************************** +Makes a record to inherit the gap locks (except LOCK_INSERT_INTENTION type) +of another record as gap type locks, but does not reset the lock bits of the +other record. Also waiting lock requests are inherited as GRANTED gap locks. */ + +void +lock_rec_inherit_to_gap_if_gap_lock( +/*================================*/ + rec_t* heir, /* in: record which inherits */ + rec_t* rec) /* in: record from which inherited; does NOT reset + the locks on this record */ +{ + lock_t* lock; + + ut_ad(mutex_own(&kernel_mutex)); + + lock = lock_rec_get_first(rec); + + while (lock != NULL) { + if (!lock_rec_get_insert_intention(lock) + && (page_rec_is_supremum(rec) + || !lock_rec_get_rec_not_gap(lock))) { + + lock_rec_add_to_queue(LOCK_REC | lock_get_mode(lock) + | LOCK_GAP, + heir, lock->index, lock->trx); + } + lock = lock_rec_get_next(rec, lock); } } @@ -2778,9 +2855,10 @@ lock_update_insert( { lock_mutex_enter_kernel(); - /* Inherit the locks for rec, in gap mode, from the next record */ + /* Inherit the gap-locking locks for rec, in gap mode, from the next + record */ - lock_rec_inherit_to_gap(rec, page_rec_get_next(rec)); + lock_rec_inherit_to_gap_if_gap_lock(rec, page_rec_get_next(rec)); lock_mutex_exit_kernel(); } @@ -2859,20 +2937,23 @@ static ibool lock_deadlock_occurs( /*=================*/ - /* out: TRUE if a deadlock was detected */ + /* out: TRUE if a deadlock was detected and we + chose trx as a victim; FALSE if no deadlock, or + there was a deadlock, but we chose other + transaction(s) as victim(s) */ lock_t* lock, /* in: lock the transaction is requesting */ trx_t* trx) /* in: transaction */ { dict_table_t* table; dict_index_t* index; trx_t* mark_trx; - ibool ret; + ulint ret; ulint cost = 0; char* err_buf; ut_ad(trx && lock); ut_ad(mutex_own(&kernel_mutex)); - +retry: /* We check that adding this trx to the waits-for graph does not produce a cycle. First mark all active transactions with 0: */ @@ -2886,7 +2967,14 @@ lock_deadlock_occurs( ret = lock_deadlock_recursive(trx, trx, lock, &cost); - if (ret) { + if (ret == LOCK_VICTIM_IS_OTHER) { + /* We chose some other trx as a victim: retry if there still + is a deadlock */ + + goto retry; + } + + if (ret == LOCK_VICTIM_IS_START) { if (lock_get_type(lock) == LOCK_TABLE) { table = lock->un_member.tab_lock.table; index = NULL; @@ -2898,19 +2986,6 @@ lock_deadlock_occurs( lock_deadlock_found = TRUE; err_buf = lock_latest_err_buf + strlen(lock_latest_err_buf); - - err_buf += sprintf(err_buf, - "*** (2) WAITING FOR THIS LOCK TO BE GRANTED:\n"); - - ut_a(err_buf <= lock_latest_err_buf + 4000); - - if (lock_get_type(lock) == LOCK_REC) { - lock_rec_print(err_buf, lock); - err_buf += strlen(err_buf); - } else { - lock_table_print(err_buf, lock); - err_buf += strlen(err_buf); - } ut_a(err_buf <= lock_latest_err_buf + 4000); @@ -2923,30 +2998,39 @@ lock_deadlock_occurs( sess_raise_error_low(trx, DB_DEADLOCK, lock->type_mode, table, index, NULL, NULL, NULL); */ + + return(TRUE); } - return(ret); + return(FALSE); } /************************************************************************ Looks recursively for a deadlock. */ static -ibool +ulint lock_deadlock_recursive( /*====================*/ - /* out: TRUE if a deadlock was detected - or the calculation took too long */ + /* out: 0 if no deadlock found, + LOCK_VICTIM_IS_START if there was a deadlock + and we chose 'start' as the victim, + LOCK_VICTIM_IS_OTHER if a deadlock + was found and we chose some other trx as a + victim: we must do the search again in this + last case because there may be another + deadlock! */ trx_t* start, /* in: recursion starting point */ trx_t* trx, /* in: a transaction waiting for a lock */ lock_t* wait_lock, /* in: the lock trx is waiting to be granted */ ulint* cost) /* in/out: number of calculation steps thus far: if this exceeds LOCK_MAX_N_STEPS_... - we return TRUE */ + we return LOCK_VICTIM_IS_START */ { lock_t* lock; ulint bit_no; trx_t* lock_trx; char* err_buf; + ulint ret; ut_a(trx && start && wait_lock); ut_ad(mutex_own(&kernel_mutex)); @@ -2955,14 +3039,14 @@ lock_deadlock_recursive( /* We have already exhaustively searched the subtree starting from this trx */ - return(FALSE); + return(0); } *cost = *cost + 1; if (*cost > LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK) { - return(TRUE); + return(LOCK_VICTIM_IS_START); } lock = wait_lock; @@ -2998,6 +3082,9 @@ lock_deadlock_recursive( lock_trx = lock->trx; if (lock_trx == start) { + /* We came back to the recursion starting + point: a deadlock detected */ + err_buf = lock_latest_err_buf; ut_sprintf_timestamp(err_buf); @@ -3045,11 +3132,59 @@ lock_deadlock_recursive( ut_a(err_buf <= lock_latest_err_buf + 4000); + err_buf += sprintf(err_buf, + "*** (2) WAITING FOR THIS LOCK TO BE GRANTED:\n"); + + ut_a(err_buf <= lock_latest_err_buf + 4000); + + if (lock_get_type(start->wait_lock) + == LOCK_REC) { + lock_rec_print(err_buf, + start->wait_lock); + err_buf += strlen(err_buf); + } else { + lock_table_print(err_buf, + start->wait_lock); + err_buf += strlen(err_buf); + } + if (lock_print_waits) { printf("Deadlock detected\n"); } - return(TRUE); + if (ut_dulint_cmp(wait_lock->trx->undo_no, + start->undo_no) >= 0) { + /* Our recursion starting point + transaction is 'smaller', let us + choose 'start' as the victim and roll + back it */ + + return(LOCK_VICTIM_IS_START); + } + + lock_deadlock_found = TRUE; + + ut_a(err_buf <= lock_latest_err_buf + 4000); + + /* Let us choose the transaction of wait_lock + as a victim to try to avoid deadlocking our + recursion starting point transaction */ + + err_buf += sprintf(err_buf, + "*** WE ROLL BACK TRANSACTION (1)\n"); + + wait_lock->trx->error_state = DB_DEADLOCK; + + lock_cancel_waiting_and_release(wait_lock); + + /* Since trx and wait_lock are no longer + in the waits-for graph, we can return FALSE; + note that our selective algorithm can choose + several transactions as victims, but still + we may end up rolling back also the recursion + starting point transaction! */ + + return(LOCK_VICTIM_IS_OTHER); } if (lock_trx->que_state == TRX_QUE_LOCK_WAIT) { @@ -3058,10 +3193,11 @@ lock_deadlock_recursive( incompatible mode, and is itself waiting for a lock */ - if (lock_deadlock_recursive(start, lock_trx, - lock_trx->wait_lock, cost)) { + ret = lock_deadlock_recursive(start, lock_trx, + lock_trx->wait_lock, cost); + if (ret != 0) { - return(TRUE); + return(ret); } } } @@ -3153,12 +3289,16 @@ lock_table_remove_low( /************************************************************************* Enqueues a waiting request for a table lock which cannot be granted immediately. Checks for deadlocks. */ - +static ulint lock_table_enqueue_waiting( /*=======================*/ /* out: DB_LOCK_WAIT, DB_DEADLOCK, or - DB_QUE_THR_SUSPENDED */ + DB_QUE_THR_SUSPENDED, or DB_SUCCESS; + DB_SUCCESS means that there was a deadlock, + but another transaction was chosen as a + victim, and we got the lock immediately: + no need to wait then */ ulint mode, /* in: lock mode this transaction is requesting */ dict_table_t* table, /* in: table */ @@ -3205,6 +3345,13 @@ table->name); return(DB_DEADLOCK); } + if (trx->wait_lock == NULL) { + /* Deadlock resolution chose another transaction as a victim, + and we accidentally got our lock granted! */ + + return(DB_SUCCESS); + } + trx->que_state = TRX_QUE_LOCK_WAIT; trx->wait_started = time(NULL); @@ -3292,7 +3439,7 @@ lock_table( if (lock_table_other_has_incompatible(trx, LOCK_WAIT, table, mode)) { /* Another trx has a request on the table in an incompatible - mode: this trx must wait */ + mode: this trx may have to wait */ err = lock_table_enqueue_waiting(mode, table, thr); @@ -3659,7 +3806,11 @@ lock_rec_print( } if (lock_rec_get_gap(lock)) { - buf += sprintf(buf, " gap type lock"); + buf += sprintf(buf, " locks gap before rec"); + } + + if (lock_rec_get_rec_not_gap(lock)) { + buf += sprintf(buf, " locks rec but not gap"); } if (lock_rec_get_insert_intention(lock)) { @@ -3776,8 +3927,8 @@ lock_print_info( mtr_t mtr; if (buf_end - buf < 600) { - sprintf(buf, "... output truncated!\n"); - + sprintf(buf, "... output truncated!\n"); + return; } @@ -3802,8 +3953,8 @@ lock_print_info( if ((ulint)(buf_end - buf) < 100 + strlen(lock_latest_err_buf)) { - lock_mutex_exit_kernel(); - sprintf(buf, "... output truncated!\n"); + lock_mutex_exit_kernel(); + sprintf(buf, "... output truncated!\n"); return; } @@ -3826,8 +3977,8 @@ lock_print_info( while (trx) { if (buf_end - buf < 900) { - lock_mutex_exit_kernel(); - sprintf(buf, "... output truncated!\n"); + lock_mutex_exit_kernel(); + sprintf(buf, "... output truncated!\n"); return; } @@ -3879,8 +4030,8 @@ loop: buf += strlen(buf); if (buf_end - buf < 500) { - lock_mutex_exit_kernel(); - sprintf(buf, "... output truncated!\n"); + lock_mutex_exit_kernel(); + sprintf(buf, "... output truncated!\n"); return; } @@ -3936,7 +4087,7 @@ loop: } if (buf_end - buf < 500) { - lock_mutex_exit_kernel(); + lock_mutex_exit_kernel(); sprintf(buf, "... output truncated!\n"); return; @@ -4080,7 +4231,8 @@ lock_rec_queue_validate( if (impl_trx && lock_rec_other_has_expl_req(LOCK_S, 0, LOCK_WAIT, rec, impl_trx)) { - ut_a(lock_rec_has_expl(LOCK_X, rec, impl_trx)); + ut_a(lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP, rec, + impl_trx)); } } @@ -4095,7 +4247,8 @@ lock_rec_queue_validate( if (impl_trx && lock_rec_other_has_expl_req(LOCK_S, 0, LOCK_WAIT, rec, impl_trx)) { - ut_a(lock_rec_has_expl(LOCK_X, rec, impl_trx)); + ut_a(lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP, rec, + impl_trx)); } } @@ -4359,8 +4512,8 @@ lock_rec_insert_check_and_lock( *inherit = TRUE; - /* If another transaction has an explicit lock request, gap or not, - waiting or granted, on the successor, the insert has to wait. + /* If another transaction has an explicit lock request which locks + the gap, waiting or granted, on the successor, the insert has to wait. An exception is the case where the lock by the another transaction is a gap type lock which it placed to wait for its turn to insert. We @@ -4369,8 +4522,10 @@ lock_rec_insert_check_and_lock( had to wait for their insert. Both had waiting gap type lock requests on the successor, which produced an unnecessary deadlock. */ - if (lock_rec_other_has_conflicting(LOCK_X, LOCK_GAP, - LOCK_INSERT_INTENTION, next_rec, trx)) { + if (lock_rec_other_has_conflicting(LOCK_X | LOCK_GAP + | LOCK_INSERT_INTENTION, next_rec, trx)) { + + /* Note that we may get DB_SUCCESS also here! */ err = lock_rec_enqueue_waiting(LOCK_X | LOCK_GAP | LOCK_INSERT_INTENTION, next_rec, index, thr); @@ -4418,9 +4573,11 @@ lock_rec_convert_impl_to_expl( /* If the transaction has no explicit x-lock set on the record, set one for it */ - if (!lock_rec_has_expl(LOCK_X, rec, impl_trx)) { + if (!lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP, rec, + impl_trx)) { - lock_rec_add_to_queue(LOCK_REC | LOCK_X, rec, index, + lock_rec_add_to_queue(LOCK_REC | LOCK_X + | LOCK_REC_NOT_GAP, rec, index, impl_trx); } } @@ -4466,7 +4623,7 @@ lock_clust_rec_modify_check_and_lock( lock_rec_convert_impl_to_expl(rec, index); - err = lock_rec_lock(TRUE, LOCK_X, rec, index, thr); + err = lock_rec_lock(TRUE, LOCK_X | LOCK_REC_NOT_GAP, rec, index, thr); lock_mutex_exit_kernel(); @@ -4511,7 +4668,7 @@ lock_sec_rec_modify_check_and_lock( ut_ad(lock_table_has(thr_get_trx(thr), index->table, LOCK_IX)); - err = lock_rec_lock(TRUE, LOCK_X, rec, index, thr); + err = lock_rec_lock(TRUE, LOCK_X | LOCK_REC_NOT_GAP, rec, index, thr); lock_mutex_exit_kernel(); @@ -4545,6 +4702,8 @@ lock_sec_rec_read_check_and_lock( ulint mode, /* in: mode of the lock which the read cursor should set on records: LOCK_S or LOCK_X; the latter is possible in SELECT FOR UPDATE */ + ulint gap_mode,/* in: LOCK_ORDINARY, LOCK_GAP, or + LOCK_REC_NOT_GAP */ que_thr_t* thr) /* in: query thread */ { ulint err; @@ -4576,7 +4735,7 @@ lock_sec_rec_read_check_and_lock( lock_rec_convert_impl_to_expl(rec, index); } - err = lock_rec_lock(FALSE, mode, rec, index, thr); + err = lock_rec_lock(FALSE, mode | gap_mode, rec, index, thr); lock_mutex_exit_kernel(); @@ -4607,13 +4766,16 @@ lock_clust_rec_read_check_and_lock( ulint mode, /* in: mode of the lock which the read cursor should set on records: LOCK_S or LOCK_X; the latter is possible in SELECT FOR UPDATE */ + ulint gap_mode,/* in: LOCK_ORDINARY, LOCK_GAP, or + LOCK_REC_NOT_GAP */ que_thr_t* thr) /* in: query thread */ { ulint err; ut_ad(index->type & DICT_CLUSTERED); ut_ad(page_rec_is_user_rec(rec) || page_rec_is_supremum(rec)); - + ut_ad(gap_mode == LOCK_ORDINARY || gap_mode == LOCK_GAP + || gap_mode == LOCK_REC_NOT_GAP); if (flags & BTR_NO_LOCKING_FLAG) { return(DB_SUCCESS); @@ -4631,7 +4793,7 @@ lock_clust_rec_read_check_and_lock( lock_rec_convert_impl_to_expl(rec, index); } - err = lock_rec_lock(FALSE, mode, rec, index, thr); + err = lock_rec_lock(FALSE, mode | gap_mode, rec, index, thr); lock_mutex_exit_kernel(); diff --git a/innobase/mem/mem0dbg.c b/innobase/mem/mem0dbg.c index 23585e494b8..22d0bab0da2 100644 --- a/innobase/mem/mem0dbg.c +++ b/innobase/mem/mem0dbg.c @@ -347,9 +347,19 @@ mem_hash_remove( NULL, NULL); if (error) { printf("Inconsistency in memory heap or buffer n:o %lu created\n", - node->nth_heap); + node->nth_heap); printf("in %s line %lu and tried to free in %s line %lu.\n", node->file_name, node->line, file_name, line); + + printf( + "Hex dump of 400 bytes around memory heap first block start:\n"); + + ut_print_buf((byte*)(node->heap) - 200, 400); + + printf("\nDump of the mem heap:\n"); + + mem_heap_validate_or_print(node->heap, NULL, TRUE, &error, &size, + NULL, NULL); ut_error; } diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 098d5b25e89..9eae358c7fb 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -148,7 +148,7 @@ Gets the operating system version. Currently works only on Windows. */ ulint os_get_os_version(void) /*===================*/ - /* out: OS_WIN95, OS_WIN31, OS_WINNT (2000 == NT) */ + /* out: OS_WIN95, OS_WIN31, OS_WINNT, OS_WIN2000 */ { #ifdef __WIN__ OSVERSIONINFO os_info; @@ -162,7 +162,11 @@ os_get_os_version(void) } else if (os_info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { return(OS_WIN95); } else if (os_info.dwPlatformId == VER_PLATFORM_WIN32_NT) { - return(OS_WINNT); + if (os_info.dwMajorVersion <= 4) { + return(OS_WINNT); + } else { + return(OS_WIN2000); + } } else { ut_error; return(0); @@ -268,9 +272,7 @@ os_file_get_last_error(void) } /******************************************************************** -Does error handling when a file operation fails. If we have run out -of disk space, then the user can clean the disk. If we do not find -a specified file, then the user can copy it to disk. */ +Does error handling when a file operation fails. */ static ibool os_file_handle_error( @@ -503,7 +505,11 @@ try_again: value 2 denotes that we do not flush the log at every commit, but only once per second */ } else { - attributes = attributes | FILE_FLAG_NO_BUFFERING; + if (srv_win_file_flush_method == + SRV_WIN_IO_UNBUFFERED) { + attributes = attributes + | FILE_FLAG_NO_BUFFERING; + } } #endif } else if (purpose == OS_FILE_NORMAL) { @@ -514,7 +520,11 @@ try_again: value 2 denotes that we do not flush the log at every commit, but only once per second */ } else { - attributes = attributes | FILE_FLAG_NO_BUFFERING; + if (srv_win_file_flush_method == + SRV_WIN_IO_UNBUFFERED) { + attributes = attributes + | FILE_FLAG_NO_BUFFERING; + } } #endif } else { @@ -1752,6 +1762,7 @@ os_aio( os_aio_array_t* array; os_aio_slot_t* slot; #ifdef WIN_ASYNC_IO + ibool retval; BOOL ret = TRUE; DWORD len = n; void* dummy_mess1; @@ -1824,6 +1835,8 @@ try_again: if (os_aio_use_native_aio) { #ifdef WIN_ASYNC_IO os_n_file_reads++; + os_bytes_read_since_printout += len; + ret = ReadFile(file, buf, (DWORD)n, &len, &(slot->control)); #elif defined(POSIX_ASYNC_IO) @@ -1870,10 +1883,12 @@ try_again: where we also use async i/o: in Windows we must use the same wait mechanism as for async i/o */ - return(os_aio_windows_handle(ULINT_UNDEFINED, + retval = os_aio_windows_handle(ULINT_UNDEFINED, slot->pos, &dummy_mess1, &dummy_mess2, - &dummy_type)); + &dummy_type); + + return(retval); } return(TRUE); @@ -1897,8 +1912,6 @@ try_again: goto try_again; } - ut_error; - return(FALSE); } @@ -1958,14 +1971,14 @@ os_aio_windows_handle( n = array->n_slots / array->n_segments; if (array == os_aio_sync_array) { - srv_io_thread_op_info[orig_seg] = "wait windows aio for 1 page"; + srv_io_thread_op_info[orig_seg] = "wait Windows aio for 1 page"; ut_ad(pos < array->n_slots); os_event_wait(array->events[pos]); i = pos; } else { srv_io_thread_op_info[orig_seg] = - "wait windows aio for n pages"; + "wait Windows aio"; i = os_event_wait_multiple(n, (array->events) + segment * n); } @@ -1991,10 +2004,8 @@ os_aio_windows_handle( ut_a(TRUE == os_file_flush(slot->file)); } } else { - os_file_get_last_error(); - - ut_error; - + os_file_handle_error(slot->file, slot->name); + ret_val = FALSE; } diff --git a/innobase/os/os0proc.c b/innobase/os/os0proc.c index 43a2db4d306..1ee448a4a44 100644 --- a/innobase/os/os0proc.c +++ b/innobase/os/os0proc.c @@ -18,6 +18,23 @@ Created 9/30/1995 Heikki Tuuri #include "ut0mem.h" +/******************************************************************** +Converts the current process id to a number. It is not guaranteed that the +number is unique. In Linux returns the 'process number' of the current +thread. That number is the same as one sees in 'top', for example. In Linux +the thread id is not the same as one sees in 'top'. */ + +ulint +os_proc_get_number(void) +/*====================*/ +{ +#ifdef __WIN__ + return((ulint)GetCurrentProcessId()); +#else + return((ulint)getpid()); +#endif +} + /******************************************************************** Allocates non-cacheable memory. */ diff --git a/innobase/page/page0cur.c b/innobase/page/page0cur.c index 2909573b14b..bb49e9080ce 100644 --- a/innobase/page/page0cur.c +++ b/innobase/page/page0cur.c @@ -169,7 +169,7 @@ page_cur_search_with_match( ut_ad(dtuple_check_typed(tuple)); ut_ad((mode == PAGE_CUR_L) || (mode == PAGE_CUR_LE) || (mode == PAGE_CUR_G) || (mode == PAGE_CUR_GE) - || (mode == PAGE_CUR_DBG)); + || (mode == PAGE_CUR_LE_OR_EXTENDS) || (mode == PAGE_CUR_DBG)); #ifdef PAGE_CUR_ADAPT if ((page_header_get_field(page, PAGE_LEVEL) == 0) @@ -232,9 +232,26 @@ page_cur_search_with_match( low_matched_bytes = cur_matched_bytes; } else if (cmp == -1) { - up = mid; - up_matched_fields = cur_matched_fields; - up_matched_bytes = cur_matched_bytes; + + if (mode == PAGE_CUR_LE_OR_EXTENDS + && dfield_get_len(dtuple_get_nth_field(tuple, + cur_matched_fields)) + == cur_matched_bytes + && rec_get_nth_field_len(mid_rec, + cur_matched_fields) + != UNIV_SQL_NULL) { + + /* This means current dfield is not SQL + NULL, and the current rec field extends it */ + + low = mid; + low_matched_fields = cur_matched_fields; + low_matched_bytes = cur_matched_bytes; + } else { + up = mid; + up_matched_fields = cur_matched_fields; + up_matched_bytes = cur_matched_bytes; + } } else if ((mode == PAGE_CUR_G) || (mode == PAGE_CUR_LE)) { low = mid; @@ -252,8 +269,8 @@ page_cur_search_with_match( slot = page_dir_get_nth_slot(page, up); up_rec = page_dir_slot_get_rec(slot); - /* Perform linear search until the upper and lower records - come to distance 1 of each other. */ + /* Perform linear search until the upper and lower records come to + distance 1 of each other. */ while (page_rec_get_next(low_rec) != up_rec) { @@ -272,10 +289,25 @@ page_cur_search_with_match( low_matched_bytes = cur_matched_bytes; } else if (cmp == -1) { - up_rec = mid_rec; - up_matched_fields = cur_matched_fields; - up_matched_bytes = cur_matched_bytes; + if (mode == PAGE_CUR_LE_OR_EXTENDS + && dfield_get_len(dtuple_get_nth_field(tuple, + cur_matched_fields)) + == cur_matched_bytes + && rec_get_nth_field_len(mid_rec, + cur_matched_fields) + != UNIV_SQL_NULL) { + /* This means current dfield is not SQL + NULL, and the current rec field extends it */ + + low = mid; + low_matched_fields = cur_matched_fields; + low_matched_bytes = cur_matched_bytes; + } else { + up_rec = mid_rec; + up_matched_fields = cur_matched_fields; + up_matched_bytes = cur_matched_bytes; + } } else if ((mode == PAGE_CUR_G) || (mode == PAGE_CUR_LE)) { low_rec = mid_rec; low_matched_fields = cur_matched_fields; diff --git a/innobase/page/page0page.c b/innobase/page/page0page.c index ed74736c8da..7d0d88c6afc 100644 --- a/innobase/page/page0page.c +++ b/innobase/page/page0page.c @@ -1312,6 +1312,194 @@ page_rec_validate( return(TRUE); } +/******************************************************************* +This function checks the consistency of an index page when we do not +know the index. This is also resilient so that this should never crash +even if the page is total garbage. */ + +ibool +page_simple_validate( +/*=================*/ + /* out: TRUE if ok */ + page_t* page) /* in: index page */ +{ + page_cur_t cur; + page_dir_slot_t* slot; + ulint slot_no; + ulint n_slots; + rec_t* rec; + byte* rec_heap_top; + ulint count; + ulint own_count; + ibool ret = FALSE; + + /* Check first that the record heap and the directory do not + overlap. */ + + n_slots = page_dir_get_n_slots(page); + + if (n_slots > UNIV_PAGE_SIZE / 4) { + fprintf(stderr, + "Nonsensical number %lu of page dir slots\n", n_slots); + + goto func_exit; + } + + rec_heap_top = page_header_get_ptr(page, PAGE_HEAP_TOP); + + if (rec_heap_top > page_dir_get_nth_slot(page, n_slots - 1)) { + + fprintf(stderr, + "Record heap and dir overlap on a page, heap top %lu, dir %lu\n", + (ulint)(page_header_get_ptr(page, PAGE_HEAP_TOP) - page), + (ulint)(page_dir_get_nth_slot(page, n_slots - 1) - page)); + + goto func_exit; + } + + /* Validate the record list in a loop checking also that it is + consistent with the page record directory. */ + + count = 0; + own_count = 1; + slot_no = 0; + slot = page_dir_get_nth_slot(page, slot_no); + + page_cur_set_before_first(page, &cur); + + for (;;) { + rec = (&cur)->rec; + + if (rec > rec_heap_top) { + fprintf(stderr, + "Record %lu is above rec heap top %lu\n", + (ulint)(rec - page), (ulint)(rec_heap_top - page)); + + goto func_exit; + } + + if (rec_get_n_owned(rec) != 0) { + /* This is a record pointed to by a dir slot */ + if (rec_get_n_owned(rec) != own_count) { + + fprintf(stderr, + "Wrong owned count %lu, %lu, rec %lu\n", + rec_get_n_owned(rec), own_count, + (ulint)(rec - page)); + + goto func_exit; + } + + if (page_dir_slot_get_rec(slot) != rec) { + fprintf(stderr, + "Dir slot does not point to right rec %lu\n", + (ulint)(rec - page)); + + goto func_exit; + } + + own_count = 0; + + if (!page_cur_is_after_last(&cur)) { + slot_no++; + slot = page_dir_get_nth_slot(page, slot_no); + } + } + + if (page_cur_is_after_last(&cur)) { + + break; + } + + if (rec_get_next_offs(rec) < FIL_PAGE_DATA + || rec_get_next_offs(rec) >= UNIV_PAGE_SIZE) { + fprintf(stderr, + "Next record offset nonsensical %lu for rec %lu\n", + rec_get_next_offs(rec), + (ulint)(rec - page)); + + goto func_exit; + } + + count++; + + if (count > UNIV_PAGE_SIZE) { + fprintf(stderr, + "Page record list appears to be circular %lu\n", + count); + goto func_exit; + } + + page_cur_move_to_next(&cur); + own_count++; + } + + if (rec_get_n_owned(rec) == 0) { + fprintf(stderr, "n owned is zero in a supremum rec\n"); + + goto func_exit; + } + + if (slot_no != n_slots - 1) { + fprintf(stderr, "n slots wrong %lu, %lu\n", + slot_no, n_slots - 1); + goto func_exit; + } + + if (page_header_get_field(page, PAGE_N_RECS) + 2 != count + 1) { + fprintf(stderr, "n recs wrong %lu %lu\n", + page_header_get_field(page, PAGE_N_RECS) + 2, count + 1); + + goto func_exit; + } + + /* Check then the free list */ + rec = page_header_get_ptr(page, PAGE_FREE); + + while (rec != NULL) { + if (rec < page + FIL_PAGE_DATA + || rec >= page + UNIV_PAGE_SIZE) { + fprintf(stderr, + "Free list record has a nonsensical offset %lu\n", + (ulint)(rec - page)); + + goto func_exit; + } + + if (rec > rec_heap_top) { + fprintf(stderr, + "Free list record %lu is above rec heap top %lu\n", + (ulint)(rec - page), (ulint)(rec_heap_top - page)); + + goto func_exit; + } + + count++; + + if (count > UNIV_PAGE_SIZE) { + fprintf(stderr, + "Page free list appears to be circular %lu\n", + count); + goto func_exit; + } + + rec = page_rec_get_next(rec); + } + + if (page_header_get_field(page, PAGE_N_HEAP) != count + 1) { + + fprintf(stderr, "N heap is wrong %lu, %lu\n", + page_header_get_field(page, PAGE_N_HEAP), count + 1); + + goto func_exit; + } + + ret = TRUE; + +func_exit: + return(ret); +} + /******************************************************************* This function checks the consistency of an index page. */ @@ -1339,6 +1527,14 @@ page_validate( ulint i; char err_buf[1000]; + if (!page_simple_validate(page)) { + buf_page_print(page); + + fprintf(stderr, "Apparent corruption in a page in index %s\n", + index->name); + return(FALSE); + } + heap = mem_heap_create(UNIV_PAGE_SIZE); /* The following buffer is used to check that the diff --git a/innobase/pars/lexyy.c b/innobase/pars/lexyy.c index 782fca35f66..f7edc9d195f 100644 --- a/innobase/pars/lexyy.c +++ b/innobase/pars/lexyy.c @@ -4,8 +4,6 @@ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ */ -#include "univ.i" - #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 @@ -609,18 +607,13 @@ How to make the InnoDB parser and lexer C files: 6. Remove the #include of unistd.h from about line 2500 of lexyy.c -7. Move #include in pars0grm.c after #include "univ.i" to remove - a large file compilation error on AIX. - -8. Move #include "univ.i" in lexyy.c to the file start to remove a large - file compilation error on AIX. - These instructions seem to work at least with bison-1.28 and flex-2.5.4 on Linux. *******************************************************/ #line 36 "pars0lex.l" #define YYSTYPE que_node_t* +#include "univ.i" #include "pars0pars.h" #include "pars0grm.h" #include "pars0sym.h" diff --git a/innobase/pars/pars0grm.c b/innobase/pars/pars0grm.c index ce575063610..05b75398084 100644 --- a/innobase/pars/pars0grm.c +++ b/innobase/pars/pars0grm.c @@ -102,8 +102,6 @@ que_node_t */ #include "que0que.h" #include "row0sel.h" -#include - #define YYSTYPE que_node_t* /* #define __STDC__ */ diff --git a/innobase/read/read0read.c b/innobase/read/read0read.c index a5048c0c909..5c1d2d5418e 100644 --- a/innobase/read/read0read.c +++ b/innobase/read/read0read.c @@ -200,6 +200,28 @@ read_view_close( UT_LIST_REMOVE(view_list, trx_sys->view_list, view); } +/************************************************************************* +Closes a consistent read view for MySQL. This function is called at an SQL +statement end if the trx isolation level is <= TRX_ISO_READ_COMMITTED. */ + +void +read_view_close_for_mysql( +/*======================*/ + trx_t* trx) /* in: trx which has a read view */ +{ + ut_a(trx->read_view); + + mutex_enter(&kernel_mutex); + + read_view_close(trx->read_view); + + mem_heap_empty(trx->read_view_heap); + + trx->read_view = NULL; + + mutex_exit(&kernel_mutex); +} + /************************************************************************* Prints a read view to stderr. */ diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index 941c9d5759d..4e8b487a0f1 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -321,59 +321,6 @@ row_ins_clust_index_entry_by_modify( return(err); } -/******************************************************************* -Checks if a unique key violation to rec would occur at the index entry -insert. */ -static -ibool -row_ins_dupl_error_with_rec( -/*========================*/ - /* out: TRUE if error */ - rec_t* rec, /* in: user record; NOTE that we assume - that the caller already has a record lock on - the record! */ - dtuple_t* entry, /* in: entry to insert */ - dict_index_t* index) /* in: index */ -{ - ulint matched_fields; - ulint matched_bytes; - ulint n_unique; - ulint i; - - n_unique = dict_index_get_n_unique(index); - - matched_fields = 0; - matched_bytes = 0; - - cmp_dtuple_rec_with_match(entry, rec, &matched_fields, &matched_bytes); - - if (matched_fields < n_unique) { - - return(FALSE); - } - - /* In a unique secondary index we allow equal key values if they - contain SQL NULLs */ - - if (!(index->type & DICT_CLUSTERED)) { - - for (i = 0; i < n_unique; i++) { - if (UNIV_SQL_NULL == dfield_get_len( - dtuple_get_nth_field(entry, i))) { - - return(FALSE); - } - } - } - - if (!rec_get_deleted_flag(rec)) { - - return(TRUE); - } - - return(FALSE); -} - /************************************************************************* Either deletes or sets the referencing columns SQL NULL in a child row. Used in ON DELETE ... clause for foreign keys when a parent row is @@ -533,8 +480,12 @@ row_ins_foreign_delete_or_set_null( err = lock_table(0, table, LOCK_IX, thr); if (err == DB_SUCCESS) { + /* Here it suffices to use a LOCK_REC_NOT_GAP type lock; + we already have a normal shared lock on the appropriate + gap if the search criterion was not unique */ + err = lock_clust_rec_read_check_and_lock(0, clust_rec, - clust_index, LOCK_X, thr); + clust_index, LOCK_X, LOCK_REC_NOT_GAP, thr); } if (err != DB_SUCCESS) { @@ -630,12 +581,14 @@ nonstandard_exit_func: /************************************************************************* Sets a shared lock on a record. Used in locking possible duplicate key -records. */ +records and also in checking foreign key constraints. */ static ulint row_ins_set_shared_rec_lock( /*========================*/ /* out: DB_SUCCESS or error code */ + ulint type, /* in: LOCK_ORDINARY, LOCK_GAP, or + LOCK_REC_NOT_GAP type lock */ rec_t* rec, /* in: record */ dict_index_t* index, /* in: index */ que_thr_t* thr) /* in: query thread */ @@ -644,10 +597,10 @@ row_ins_set_shared_rec_lock( if (index->type & DICT_CLUSTERED) { err = lock_clust_rec_read_check_and_lock(0, rec, index, LOCK_S, - thr); + type, thr); } else { err = lock_sec_rec_read_check_and_lock(0, rec, index, LOCK_S, - thr); + type, thr); } return(err); @@ -656,7 +609,7 @@ row_ins_set_shared_rec_lock( /******************************************************************* Checks if foreign key constraint fails for an index entry. Sets shared locks which lock either the success or the failure of the constraint. NOTE that -the caller must have a shared latch on dict_foreign_key_check_lock. */ +the caller must have a shared latch on dict_operation_lock. */ ulint row_ins_check_foreign_constraint( @@ -679,7 +632,7 @@ row_ins_check_foreign_constraint( dict_table_t* check_table; dict_index_t* check_index; ulint n_fields_cmp; - ibool timeout_expired; + ibool unique_search; rec_t* rec; btr_pcur_t pcur; ibool moved; @@ -689,7 +642,9 @@ row_ins_check_foreign_constraint( mtr_t mtr; run_again: - ut_ad(rw_lock_own(&dict_foreign_key_check_lock, RW_LOCK_SHARED)); + ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED)); + + err = DB_SUCCESS; if (thr_get_trx(thr)->check_foreigns == FALSE) { /* The user has suppressed foreign key checks currently for @@ -748,6 +703,14 @@ run_again: dtuple_set_n_fields_cmp(entry, foreign->n_fields); + if (dict_index_get_n_unique(check_index) <= foreign->n_fields) { + /* We can just set a LOCK_REC_NOT_GAP type lock */ + + unique_search = TRUE; + } else { + unique_search = FALSE; + } + btr_pcur_open(check_index, entry, PAGE_CUR_GE, BTR_SEARCH_LEAF, &pcur, &mtr); @@ -761,25 +724,45 @@ run_again: goto next_rec; } - /* Try to place a lock on the index record */ - - err = row_ins_set_shared_rec_lock(rec, check_index, thr); - - if (err != DB_SUCCESS) { - - break; - } - if (rec == page_get_supremum_rec(buf_frame_align(rec))) { + err = row_ins_set_shared_rec_lock(LOCK_ORDINARY, rec, + check_index, thr); + if (err != DB_SUCCESS) { + + break; + } + goto next_rec; } cmp = cmp_dtuple_rec(entry, rec); if (cmp == 0) { - if (!rec_get_deleted_flag(rec)) { + if (rec_get_deleted_flag(rec)) { + err = row_ins_set_shared_rec_lock(LOCK_ORDINARY, + rec, check_index, thr); + if (err != DB_SUCCESS) { + + break; + } + } else { /* Found a matching record */ + + if (unique_search) { + err = row_ins_set_shared_rec_lock( + LOCK_REC_NOT_GAP, + rec, check_index, thr); + } else { + err = row_ins_set_shared_rec_lock( + LOCK_ORDINARY, + rec, check_index, thr); + } + + if (err != DB_SUCCESS) { + + break; + } /* printf( "FOREIGN: Found matching record from %s %s\n", @@ -807,6 +790,13 @@ run_again: } if (cmp < 0) { + err = row_ins_set_shared_rec_lock(LOCK_GAP, + rec, check_index, thr); + if (err != DB_SUCCESS) { + + break; + } + if (check_ref) { err = DB_NO_REFERENCED_ROW; } else { @@ -844,14 +834,14 @@ do_possible_lock_wait: que_thr_stop_for_mysql(thr); - timeout_expired = srv_suspend_mysql_thread(thr); + srv_suspend_mysql_thread(thr); - if (!timeout_expired) { + if (thr_get_trx(thr)->error_state == DB_SUCCESS) { goto run_again; } - err = DB_LOCK_WAIT_TIMEOUT; + err = thr_get_trx(thr)->error_state; } return(err); @@ -890,21 +880,21 @@ row_ins_check_foreign_constraints( trx); } - if (!trx->has_dict_foreign_key_check_lock) { + if (!trx->has_dict_operation_lock) { got_s_lock = TRUE; - rw_lock_s_lock(&dict_foreign_key_check_lock); + rw_lock_s_lock(&dict_operation_lock); - trx->has_dict_foreign_key_check_lock = TRUE; + trx->has_dict_operation_lock = TRUE; } err = row_ins_check_foreign_constraint(TRUE, foreign, table, index, entry, thr); if (got_s_lock) { - rw_lock_s_unlock(&dict_foreign_key_check_lock); + rw_lock_s_unlock(&dict_operation_lock); - trx->has_dict_foreign_key_check_lock = FALSE; + trx->has_dict_operation_lock = FALSE; } if (err != DB_SUCCESS) { @@ -918,6 +908,59 @@ row_ins_check_foreign_constraints( return(DB_SUCCESS); } +/******************************************************************* +Checks if a unique key violation to rec would occur at the index entry +insert. */ +static +ibool +row_ins_dupl_error_with_rec( +/*========================*/ + /* out: TRUE if error */ + rec_t* rec, /* in: user record; NOTE that we assume + that the caller already has a record lock on + the record! */ + dtuple_t* entry, /* in: entry to insert */ + dict_index_t* index) /* in: index */ +{ + ulint matched_fields; + ulint matched_bytes; + ulint n_unique; + ulint i; + + n_unique = dict_index_get_n_unique(index); + + matched_fields = 0; + matched_bytes = 0; + + cmp_dtuple_rec_with_match(entry, rec, &matched_fields, &matched_bytes); + + if (matched_fields < n_unique) { + + return(FALSE); + } + + /* In a unique secondary index we allow equal key values if they + contain SQL NULLs */ + + if (!(index->type & DICT_CLUSTERED)) { + + for (i = 0; i < n_unique; i++) { + if (UNIV_SQL_NULL == dfield_get_len( + dtuple_get_nth_field(entry, i))) { + + return(FALSE); + } + } + } + + if (!rec_get_deleted_flag(rec)) { + + return(TRUE); + } + + return(FALSE); +} + /******************************************************************* Scans a unique non-clustered index at a given index entry to determine whether a uniqueness violation has occurred for the key value of the entry. @@ -976,9 +1019,10 @@ row_ins_scan_sec_index_for_duplicate( goto next_rec; } - /* Try to place a lock on the index record */ + /* Try to place a lock on the index record */ - err = row_ins_set_shared_rec_lock(rec, index, thr); + err = row_ins_set_shared_rec_lock(LOCK_ORDINARY, rec, index, + thr); if (err != DB_SUCCESS) { @@ -1082,8 +1126,8 @@ row_ins_duplicate_error_in_clust( sure that in roll-forward we get the same duplicate errors as in original execution */ - err = row_ins_set_shared_rec_lock(rec, cursor->index, - thr); + err = row_ins_set_shared_rec_lock(LOCK_REC_NOT_GAP, + rec, cursor->index, thr); if (err != DB_SUCCESS) { return(err); @@ -1105,8 +1149,8 @@ row_ins_duplicate_error_in_clust( if (rec != page_get_supremum_rec(page)) { - err = row_ins_set_shared_rec_lock(rec, cursor->index, - thr); + err = row_ins_set_shared_rec_lock(LOCK_REC_NOT_GAP, + rec, cursor->index, thr); if (err != DB_SUCCESS) { return(err); diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index cea8f1316fe..6fde57eb75a 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -27,6 +27,7 @@ Created 9/17/2000 Heikki Tuuri #include "lock0lock.h" #include "rem0cmp.h" #include "log0log.h" +#include "btr0sea.h" /* A dummy variable used to fool the compiler */ ibool row_mysql_identically_false = FALSE; @@ -203,7 +204,6 @@ row_mysql_handle_errors( que_thr_t* thr, /* in: query thread */ trx_savept_t* savept) /* in: savepoint or NULL */ { - ibool timeout_expired; ulint err; handle_new_error: @@ -240,11 +240,9 @@ handle_new_error: /* MySQL will roll back the latest SQL statement */ } else if (err == DB_LOCK_WAIT) { - timeout_expired = srv_suspend_mysql_thread(thr); - - if (timeout_expired) { - trx->error_state = DB_LOCK_WAIT_TIMEOUT; + srv_suspend_mysql_thread(thr); + if (trx->error_state != DB_SUCCESS) { que_thr_stop_for_mysql(thr); goto handle_new_error; @@ -1146,7 +1144,7 @@ row_mysql_lock_data_dictionary(void) /* Serialize data dictionary operations with dictionary mutex: no deadlocks or lock waits can occur then in these operations */ - rw_lock_x_lock(&(dict_foreign_key_check_lock)); + rw_lock_x_lock(&dict_operation_lock); mutex_enter(&(dict_sys->mutex)); } @@ -1161,7 +1159,7 @@ row_mysql_unlock_data_dictionary(void) no deadlocks can occur then in these operations */ mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&(dict_foreign_key_check_lock)); + rw_lock_x_unlock(&dict_operation_lock); } /************************************************************************* @@ -1184,6 +1182,7 @@ row_create_table_for_mysql( ulint err; ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); + ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); ut_ad(mutex_own(&(dict_sys->mutex))); if (srv_created_new_raw) { @@ -1383,7 +1382,8 @@ row_create_index_for_mysql( ulint namelen; ulint keywordlen; ulint err; - + + ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); ut_ad(mutex_own(&(dict_sys->mutex))); ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); @@ -1464,6 +1464,7 @@ row_table_add_foreign_constraints( ulint err; ut_ad(mutex_own(&(dict_sys->mutex))); + ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); ut_a(sql_string); trx->op_info = (char *) "adding foreign keys"; @@ -1846,12 +1847,16 @@ row_drop_table_for_mysql( no deadlocks can occur then in these operations */ if (!has_dict_mutex) { - /* Prevent foreign key checks while we are dropping the table */ - rw_lock_x_lock(&(dict_foreign_key_check_lock)); + /* Prevent foreign key checks etc. while we are dropping the + table */ + rw_lock_x_lock(&dict_operation_lock); mutex_enter(&(dict_sys->mutex)); } + ut_ad(mutex_own(&(dict_sys->mutex))); + ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); + graph = pars_sql(buf); ut_a(graph); @@ -1861,9 +1866,6 @@ row_drop_table_for_mysql( graph->fork_type = QUE_FORK_MYSQL_INTERFACE; - /* Prevent purge from running while we are dropping the table */ - rw_lock_s_lock(&(purge_sys->purge_is_running)); - table = dict_table_get_low(name); if (!table) { @@ -1944,12 +1946,11 @@ row_drop_table_for_mysql( } } -funct_exit: - rw_lock_s_unlock(&(purge_sys->purge_is_running)); +funct_exit: if (!has_dict_mutex) { mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&(dict_foreign_key_check_lock)); + rw_lock_x_unlock(&dict_operation_lock); } que_graph_free(graph); @@ -1985,7 +1986,7 @@ row_drop_database_for_mysql( trx_start_if_not_started(trx); loop: - rw_lock_x_lock(&(dict_foreign_key_check_lock)); + rw_lock_x_lock(&dict_operation_lock); mutex_enter(&(dict_sys->mutex)); while ((table_name = dict_get_first_table_name_in_db(name))) { @@ -2000,7 +2001,7 @@ loop: if (table->n_mysql_handles_opened > 0) { mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&(dict_foreign_key_check_lock)); + rw_lock_x_unlock(&dict_operation_lock); ut_print_timestamp(stderr); fprintf(stderr, @@ -2028,7 +2029,7 @@ loop: } mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&(dict_foreign_key_check_lock)); + rw_lock_x_unlock(&dict_operation_lock); trx_commit_for_mysql(trx); @@ -2165,7 +2166,7 @@ row_rename_table_for_mysql( /* Serialize data dictionary operations with dictionary mutex: no deadlocks can occur then in these operations */ - rw_lock_x_lock(&(dict_foreign_key_check_lock)); + rw_lock_x_lock(&dict_operation_lock); mutex_enter(&(dict_sys->mutex)); table = dict_table_get_low(old_name); @@ -2249,7 +2250,7 @@ row_rename_table_for_mysql( } funct_exit: mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&(dict_foreign_key_check_lock)); + rw_lock_x_unlock(&dict_operation_lock); que_graph_free(graph); @@ -2394,18 +2395,28 @@ row_check_table_for_mysql( row_prebuilt_t* prebuilt) /* in: prebuilt struct in MySQL handle */ { - dict_table_t* table = prebuilt->table; + dict_table_t* table = prebuilt->table; dict_index_t* index; ulint n_rows; ulint n_rows_in_table = ULINT_UNDEFINED; - ulint ret = DB_SUCCESS; - + ulint ret = DB_SUCCESS; + ulint old_isolation_level; + prebuilt->trx->op_info = (char *) "checking table"; + old_isolation_level = prebuilt->trx->isolation_level; + + /* We must run the index record counts at an isolation level + >= READ COMMITTED, because a dirty read can see a wrong number + of records in some index; to play safe, we use always + REPEATABLE READ here */ + + prebuilt->trx->isolation_level = TRX_ISO_REPEATABLE_READ; + index = dict_table_get_first_index(table); while (index != NULL) { - /* fprintf(stderr, "Validating index %s\n", index->name); */ + /* fprintf(stderr, "Validating index %s\n", index->name); */ if (!btr_validate_tree(index->tree)) { ret = DB_ERROR; @@ -2433,6 +2444,9 @@ row_check_table_for_mysql( index = dict_table_get_next_index(index); } + /* Restore the original isolation level */ + prebuilt->trx->isolation_level = old_isolation_level; + /* We validate also the whole adaptive hash index for all tables at every CHECK TABLE */ diff --git a/innobase/row/row0purge.c b/innobase/row/row0purge.c index 60e057b816e..3d9ae6aad8b 100644 --- a/innobase/row/row0purge.c +++ b/innobase/row/row0purge.c @@ -453,7 +453,9 @@ static ibool row_purge_parse_undo_rec( /*=====================*/ - /* out: TRUE if purge operation required */ + /* out: TRUE if purge operation required: + NOTE that then the CALLER must s-unlock + dict_operation_lock! */ purge_node_t* node, /* in: row undo node */ ibool* updated_extern, /* out: TRUE if an externally stored field @@ -493,18 +495,20 @@ row_purge_parse_undo_rec( return(FALSE); } + /* Prevent DROP TABLE etc. from running when we are doing the purge + for this row */ + + rw_lock_s_lock(&dict_operation_lock); mutex_enter(&(dict_sys->mutex)); node->table = dict_table_get_on_id_low(table_id, thr_get_trx(thr)); - rw_lock_x_lock(&(purge_sys->purge_is_running)); - mutex_exit(&(dict_sys->mutex)); if (node->table == NULL) { /* The table has been dropped: no need to do purge */ - rw_lock_x_unlock(&(purge_sys->purge_is_running)); + rw_lock_s_unlock(&dict_operation_lock); return(FALSE); } @@ -514,7 +518,7 @@ row_purge_parse_undo_rec( if (clust_index == NULL) { /* The table was corrupt in the data dictionary */ - rw_lock_x_unlock(&(purge_sys->purge_is_running)); + rw_lock_s_unlock(&dict_operation_lock); return(FALSE); } @@ -573,6 +577,8 @@ row_purge( } else { purge_needed = row_purge_parse_undo_rec(node, &updated_extern, thr); + /* If purge_needed == TRUE, we must also remember to unlock + dict_operation_lock! */ } if (purge_needed) { @@ -594,7 +600,7 @@ row_purge( btr_pcur_close(&(node->pcur)); } - rw_lock_x_unlock(&(purge_sys->purge_is_running)); + rw_lock_s_unlock(&dict_operation_lock); } /* Do some cleanup */ diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index 4af04251996..fcf48dd15cf 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -606,7 +606,7 @@ row_sel_get_clust_rec( /* Try to place a lock on the index record */ err = lock_clust_rec_read_check_and_lock(0, clust_rec, index, - node->row_lock_mode, thr); + node->row_lock_mode, LOCK_ORDINARY, thr); if (err != DB_SUCCESS) { return(err); @@ -621,7 +621,7 @@ row_sel_get_clust_rec( node->read_view)) { err = row_sel_build_prev_vers(node->read_view, plan, - clust_rec, &old_vers, mtr); + clust_rec, &old_vers, mtr); if (err != DB_SUCCESS) { return(err); @@ -678,16 +678,17 @@ sel_set_rec_lock( rec_t* rec, /* in: record */ dict_index_t* index, /* in: index */ ulint mode, /* in: lock mode */ + ulint type, /* in: LOCK_ORDINARY, LOCK_GAP, or LOC_REC_NOT_GAP */ que_thr_t* thr) /* in: query thread */ { ulint err; if (index->type & DICT_CLUSTERED) { err = lock_clust_rec_read_check_and_lock(0, rec, index, mode, - thr); + type, thr); } else { err = lock_sec_rec_read_check_and_lock(0, rec, index, mode, - thr); + type, thr); } return(err); @@ -1154,7 +1155,7 @@ rec_loop: if (!consistent_read) { err = sel_set_rec_lock(page_rec_get_next(rec), index, - node->row_lock_mode, thr); + node->row_lock_mode, LOCK_ORDINARY, thr); if (err != DB_SUCCESS) { /* Note that in this case we will store in pcur the PREDECESSOR of the record we are waiting @@ -1180,8 +1181,8 @@ rec_loop: if (!consistent_read) { /* Try to place a lock on the index record */ - err = sel_set_rec_lock(rec, index, node->row_lock_mode, thr); - + err = sel_set_rec_lock(rec, index, node->row_lock_mode, + LOCK_ORDINARY, thr); if (err != DB_SUCCESS) { goto lock_wait_or_error; @@ -2200,6 +2201,7 @@ row_sel_get_clust_rec_for_mysql( rec_t* old_vers; ulint err; trx_t* trx; + char err_buf[1000]; *out_rec = NULL; @@ -2213,14 +2215,40 @@ row_sel_get_clust_rec_for_mysql( clust_rec = btr_pcur_get_rec(prebuilt->clust_pcur); - ut_ad(page_rec_is_user_rec(clust_rec)); + if (!page_rec_is_user_rec(clust_rec)) { + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: error clustered record for sec rec not found\n" + "InnoDB: index %s table %s\n", sec_index->name, + sec_index->table->name); + + rec_sprintf(err_buf, 900, rec); + fprintf(stderr, "InnoDB: sec index record %s\n", err_buf); + + rec_sprintf(err_buf, 900, clust_rec); + fprintf(stderr, "InnoDB: clust index record %s\n", err_buf); + + trx_print(err_buf, trx); + + fprintf(stderr, + "%s\nInnoDB: Make a detailed bug report and send it\n", + err_buf); + fprintf(stderr, "InnoDB: to mysql@lists.mysql.com\n"); + + clust_rec = NULL; + + goto func_exit; + } if (prebuilt->select_lock_type != LOCK_NONE) { - /* Try to place a lock on the index record */ + /* Try to place a lock on the index record; we are searching + the clust rec with a unique condition, hence + we set a LOCK_REC_NOT_GAP type lock */ err = lock_clust_rec_read_check_and_lock(0, clust_rec, clust_index, - prebuilt->select_lock_type, thr); + prebuilt->select_lock_type, + LOCK_REC_NOT_GAP, thr); if (err != DB_SUCCESS) { return(err); @@ -2232,8 +2260,12 @@ row_sel_get_clust_rec_for_mysql( trx = thr_get_trx(thr); old_vers = NULL; - - if (!lock_clust_rec_cons_read_sees(clust_rec, clust_index, + + /* If the isolation level allows reading of uncommitted data, + then we never look for an earlier version */ + + if (trx->isolation_level > TRX_ISO_READ_UNCOMMITTED + && !lock_clust_rec_cons_read_sees(clust_rec, clust_index, trx->read_view)) { err = row_sel_build_prev_vers_for_mysql( @@ -2275,6 +2307,7 @@ row_sel_get_clust_rec_for_mysql( } } +func_exit: *out_rec = clust_rec; if (prebuilt->select_lock_type == LOCK_X) { @@ -2407,7 +2440,7 @@ row_sel_push_cache_row_for_mysql( /************************************************************************* Tries to do a shortcut to fetch a clustered index record with a unique key, using the hash index if possible (not always). We assume that the search -mode is PAGE_CUR_GE, it is a consistent read, trx has already a read view, +mode is PAGE_CUR_GE, it is a consistent read, there is a read view in trx, btr search latch has been locked in S-mode. */ static ulint @@ -2426,7 +2459,7 @@ row_sel_try_search_shortcut_for_mysql( ut_ad(index->type & DICT_CLUSTERED); ut_ad(!prebuilt->templ_contains_blob); - + btr_pcur_open_with_no_init(index, search_tuple, PAGE_CUR_GE, BTR_SEARCH_LEAF, pcur, #ifndef UNIV_SEARCH_DEBUG @@ -2516,17 +2549,22 @@ row_search_for_mysql( ibool was_lock_wait; ulint ret; ulint shortcut; + ibool unique_search = FALSE; ibool unique_search_from_clust_index = FALSE; ibool mtr_has_extra_clust_latch = FALSE; ibool moves_up = FALSE; + ibool set_also_gap_locks = TRUE; + /* if the query is a plain + locking SELECT, and the isolation + level is <= TRX_ISO_READ_COMMITTED, + then this is set to FALSE */ + ibool success; ulint cnt = 0; mtr_t mtr; ut_ad(index && pcur && search_tuple); ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); - - ut_ad(sync_thread_levels_empty_gen(FALSE)); - + if (prebuilt->magic_n != ROW_PREBUILT_ALLOCATED) { fprintf(stderr, "InnoDB: Error: trying to free a corrupt\n" @@ -2543,6 +2581,9 @@ row_search_for_mysql( printf("N tables locked %lu\n", trx->mysql_n_tables_locked); */ + /*-------------------------------------------------------------*/ + /* PHASE 1: Try to pop the row from the prefetch cache */ + if (direction == 0) { trx->op_info = (char *) "starting index read"; @@ -2608,18 +2649,35 @@ row_search_for_mysql( mtr_start(&mtr); - /* Since we must release the search system latch when we retrieve an - externally stored field, we cannot use the adaptive hash index in a - search in the case the row may be long and there may be externally - stored fields */ + /* In a search where at most one record in the index may match, we + can use a LOCK_REC_NOT_GAP type record lock when locking a non-delete + marked matching record. + + Note that in a unique secondary index there may be different delete + marked versions of a record where only the primary key values differ: + thus in a secondary index we must use next-key locks when locking + delete marked records. */ if (match_mode == ROW_SEL_EXACT - && index->type & DICT_UNIQUE - && index->type & DICT_CLUSTERED - && !prebuilt->templ_contains_blob - && (prebuilt->mysql_row_len < UNIV_PAGE_SIZE / 8) - && dtuple_get_n_fields(search_tuple) + && index->type & DICT_UNIQUE + && dtuple_get_n_fields(search_tuple) == dict_index_get_n_unique(index)) { + unique_search = TRUE; + } + + /*-------------------------------------------------------------*/ + /* PHASE 2: Try fast adaptive hash index search if possible */ + + /* Next test if this is the special case where we can use the fast + adaptive hash index to try the search. Since we must release the + search system latch when we retrieve an externally stored field, we + cannot use the adaptive hash index in a search in the case the row + may be long and there may be externally stored fields */ + + if (unique_search + && index->type & DICT_CLUSTERED + && !prebuilt->templ_contains_blob + && (prebuilt->mysql_row_len < UNIV_PAGE_SIZE / 8)) { if (direction == ROW_SEL_NEXT) { /* MySQL sometimes seems to do fetch next even @@ -2642,8 +2700,9 @@ row_search_for_mysql( unique_search_from_clust_index = TRUE; - if (trx->mysql_n_tables_locked == 0 - && !prebuilt->sql_stat_start) { + if (prebuilt->select_lock_type == LOCK_NONE + && trx->isolation_level > TRX_ISO_READ_UNCOMMITTED + && trx->read_view) { /* This is a SELECT query done as a consistent read, and the read view has already been allocated: @@ -2722,13 +2781,34 @@ row_search_for_mysql( mtr_start(&mtr); } } -no_shortcut: + +no_shortcut: + /*-------------------------------------------------------------*/ + /* PHASE 3: Open or restore index cursor position */ + if (trx->has_search_latch) { rw_lock_s_unlock(&btr_search_latch); trx->has_search_latch = FALSE; } trx_start_if_not_started(trx); + + if (trx->isolation_level <= TRX_ISO_READ_COMMITTED + && prebuilt->select_lock_type != LOCK_NONE + && trx->mysql_query_str) { + + /* Scan the MySQL query string; check if SELECT is the first + word there */ + + dict_accept(*trx->mysql_query_str, "SELECT", &success); + + if (success) { + /* It is a plain locking SELECT and the isolation + level is low: do not lock gaps */ + + set_also_gap_locks = FALSE; + } + } /* Note that if the search mode was GE or G, then the cursor naturally moves upward (in fetch next) in alphabetical order, @@ -2793,8 +2873,10 @@ no_shortcut: prebuilt->sql_stat_start = FALSE; } - /*-------------------------------------------------------------*/ rec_loop: + /*-------------------------------------------------------------*/ + /* PHASE 4: Look for matching records in a loop */ + cons_read_requires_clust_rec = FALSE; rec = btr_pcur_get_rec(pcur); @@ -2812,22 +2894,24 @@ rec_loop: goto next_rec; } - - if (prebuilt->select_lock_type != LOCK_NONE) { - /* Try to place a lock on the index record */ - - err = sel_set_rec_lock(rec, index, prebuilt->select_lock_type, - thr); - if (err != DB_SUCCESS) { - - goto lock_wait_or_error; - } - } if (rec == page_get_supremum_rec(buf_frame_align(rec))) { + if (prebuilt->select_lock_type != LOCK_NONE + && set_also_gap_locks) { + + /* Try to place a lock on the index record */ + + err = sel_set_rec_lock(rec, index, + prebuilt->select_lock_type, + LOCK_ORDINARY, thr); + if (err != DB_SUCCESS) { + + goto lock_wait_or_error; + } + } /* A page supremum record cannot be in the result set: skip - it now when we have placed a possible lock on it */ + it now that we have placed a possible lock on it */ goto next_rec; } @@ -2850,6 +2934,19 @@ rec_loop: if (0 != cmp_dtuple_rec(search_tuple, rec)) { + if (prebuilt->select_lock_type != LOCK_NONE + && set_also_gap_locks) { + /* Try to place a lock on the index record */ + + err = sel_set_rec_lock(rec, index, + prebuilt->select_lock_type, + LOCK_GAP, thr); + if (err != DB_SUCCESS) { + + goto lock_wait_or_error; + } + } + btr_pcur_store_position(pcur, &mtr); ret = DB_RECORD_NOT_FOUND; @@ -2862,6 +2959,19 @@ rec_loop: if (!cmp_dtuple_is_prefix_of_rec(search_tuple, rec)) { + if (prebuilt->select_lock_type != LOCK_NONE + && set_also_gap_locks) { + /* Try to place a lock on the index record */ + + err = sel_set_rec_lock(rec, index, + prebuilt->select_lock_type, + LOCK_GAP, thr); + if (err != DB_SUCCESS) { + + goto lock_wait_or_error; + } + } + btr_pcur_store_position(pcur, &mtr); ret = DB_RECORD_NOT_FOUND; @@ -2874,16 +2984,39 @@ rec_loop: /* We are ready to look at a possible new index entry in the result set: the cursor is now placed on a user record */ - /* Get the right version of the row in a consistent read */ + if (prebuilt->select_lock_type != LOCK_NONE) { + /* Try to place a lock on the index record; note that delete + marked records are a special case in a unique search. If there + is a non-delete marked record, then it is enough to lock its + existence with LOCK_REC_NOT_GAP. */ - if (prebuilt->select_lock_type == LOCK_NONE) { + if (!set_also_gap_locks + || (unique_search && !rec_get_deleted_flag(rec))) { + err = sel_set_rec_lock(rec, index, + prebuilt->select_lock_type, + LOCK_REC_NOT_GAP, thr); + } else { + err = sel_set_rec_lock(rec, index, + prebuilt->select_lock_type, + LOCK_ORDINARY, thr); + } + + if (err != DB_SUCCESS) { + goto lock_wait_or_error; + } + } else { /* This is a non-locking consistent read: if necessary, fetch a previous version of the record */ cons_read_requires_clust_rec = FALSE; - if (index == clust_index) { + if (trx->isolation_level == TRX_ISO_READ_UNCOMMITTED) { + + /* Do nothing: we let a non-locking SELECT read the + latest version of the record */ + + } else if (index == clust_index) { if (!lock_clust_rec_cons_read_sees(rec, index, trx->read_view)) { @@ -3020,8 +3153,11 @@ got_row: ret = DB_SUCCESS; goto normal_return; - /*-------------------------------------------------------------*/ + next_rec: + /*-------------------------------------------------------------*/ + /* PHASE 5: Move the cursor to the next index record */ + if (mtr_has_extra_clust_latch) { /* We must commit mtr if we are moving to the next non-clustered index record, because we could break the @@ -3064,8 +3200,10 @@ next_rec: cnt++; goto rec_loop; - /*-------------------------------------------------------------*/ + lock_wait_or_error: + /*-------------------------------------------------------------*/ + btr_pcur_store_position(pcur, &mtr); mtr_commit(&mtr); @@ -3096,6 +3234,7 @@ lock_wait_or_error: return(err); normal_return: + /*-------------------------------------------------------------*/ que_thr_stop_for_mysql_no_error(thr, trx); mtr_commit(&mtr); @@ -3156,10 +3295,12 @@ row_search_check_if_query_cache_permitted( ret = TRUE; - /* Assign a read view for the transaction if it does not yet - have one */ + /* If the isolation level is high, assign a read view for the + transaction if it does not yet have one */ + + if (trx->isolation_level >= TRX_ISO_REPEATABLE_READ + && !trx->read_view) { - if (!trx->read_view) { trx->read_view = read_view_open_now(trx, trx->read_view_heap); } diff --git a/innobase/row/row0uins.c b/innobase/row/row0uins.c index 9990f893432..fff67dcd627 100644 --- a/innobase/row/row0uins.c +++ b/innobase/row/row0uins.c @@ -254,7 +254,8 @@ row_undo_ins_parse_undo_rec( node->table = dict_table_get_on_id(table_id, node->trx); if (node->table == NULL) { - return; + + return; } clust_index = dict_table_get_first_index(node->table); @@ -281,7 +282,7 @@ row_undo_ins( ut_ad(node && thr); ut_ad(node->state == UNDO_NODE_INSERT); - + row_undo_ins_parse_undo_rec(node, thr); if (node->table == NULL) { @@ -292,6 +293,7 @@ row_undo_ins( if (!found) { trx_undo_rec_release(node->trx, node->undo_no); + return(DB_SUCCESS); } diff --git a/innobase/row/row0undo.c b/innobase/row/row0undo.c index 5119254f405..b40d36533a4 100644 --- a/innobase/row/row0undo.c +++ b/innobase/row/row0undo.c @@ -211,7 +211,6 @@ row_undo( if (node->state == UNDO_NODE_FETCH_NEXT) { - /* The call below also starts &mtr */ node->undo_rec = trx_roll_pop_top_rec_of_trx(trx, trx->roll_limit, &roll_ptr, @@ -254,6 +253,10 @@ row_undo( } } + /* Prevent DROP TABLE etc. while we are rolling back this row */ + + rw_lock_s_lock(&dict_operation_lock); + if (node->state == UNDO_NODE_INSERT) { err = row_undo_ins(node, thr); @@ -264,6 +267,8 @@ row_undo( err = row_undo_mod(node, thr); } + rw_lock_s_unlock(&dict_operation_lock); + /* Do some cleanup */ btr_pcur_close(&(node->pcur)); diff --git a/innobase/row/row0upd.c b/innobase/row/row0upd.c index 25c82f39da9..0be4f901d16 100644 --- a/innobase/row/row0upd.c +++ b/innobase/row/row0upd.c @@ -79,7 +79,7 @@ ibool row_upd_index_is_referenced( /*========================*/ /* out: TRUE if referenced; NOTE that since - we do not hold dict_foreign_key_check_lock + we do not hold dict_operation_lock when leaving the function, it may be that the referencing table has been dropped when we leave this function: this function is only @@ -95,8 +95,8 @@ row_upd_index_is_referenced( return(FALSE); } - if (!trx->has_dict_foreign_key_check_lock) { - rw_lock_s_lock(&dict_foreign_key_check_lock); + if (!trx->has_dict_operation_lock) { + rw_lock_s_lock(&dict_operation_lock); } foreign = UT_LIST_GET_FIRST(table->referenced_list); @@ -104,8 +104,8 @@ row_upd_index_is_referenced( while (foreign) { if (foreign->referenced_index == index) { - if (!trx->has_dict_foreign_key_check_lock) { - rw_lock_s_unlock(&dict_foreign_key_check_lock); + if (!trx->has_dict_operation_lock) { + rw_lock_s_unlock(&dict_operation_lock); } return(TRUE); @@ -114,8 +114,8 @@ row_upd_index_is_referenced( foreign = UT_LIST_GET_NEXT(referenced_list, foreign); } - if (!trx->has_dict_foreign_key_check_lock) { - rw_lock_s_unlock(&dict_foreign_key_check_lock); + if (!trx->has_dict_operation_lock) { + rw_lock_s_unlock(&dict_operation_lock); } return(FALSE); @@ -162,12 +162,12 @@ row_upd_check_references_constraints( mtr_start(mtr); - if (!trx->has_dict_foreign_key_check_lock) { + if (!trx->has_dict_operation_lock) { got_s_lock = TRUE; - rw_lock_s_lock(&dict_foreign_key_check_lock); + rw_lock_s_lock(&dict_operation_lock); - trx->has_dict_foreign_key_check_lock = TRUE; + trx->has_dict_operation_lock = TRUE; } foreign = UT_LIST_GET_FIRST(table->referenced_list); @@ -189,7 +189,7 @@ row_upd_check_references_constraints( } /* NOTE that if the thread ends up waiting for a lock - we will release dict_foreign_key_check_lock + we will release dict_operation_lock temporarily! But the counter on the table protects 'foreign' from being dropped while the check is running. */ @@ -212,8 +212,8 @@ row_upd_check_references_constraints( if (err != DB_SUCCESS) { if (got_s_lock) { rw_lock_s_unlock( - &dict_foreign_key_check_lock); - trx->has_dict_foreign_key_check_lock + &dict_operation_lock); + trx->has_dict_operation_lock = FALSE; } @@ -227,8 +227,8 @@ row_upd_check_references_constraints( } if (got_s_lock) { - rw_lock_s_unlock(&dict_foreign_key_check_lock); - trx->has_dict_foreign_key_check_lock = FALSE; + rw_lock_s_unlock(&dict_operation_lock); + trx->has_dict_operation_lock = FALSE; } mem_heap_free(heap); diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index d754f603efc..11e45df4ce3 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -135,8 +135,6 @@ byte srv_latin1_ordering[256] /* The sort order table of the latin1 , 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x5D, 0xF7 , 0xD8, 0x55, 0x55, 0x55, 0x59, 0x59, 0xDE, 0xFF }; - -ibool srv_use_native_aio = FALSE; ulint srv_pool_size = ULINT_MAX; /* size in database pages; MySQL originally sets this @@ -151,8 +149,9 @@ dulint srv_archive_recovery_limit_lsn; ulint srv_lock_wait_timeout = 1024 * 1024 * 1024; -char* srv_unix_file_flush_method_str = NULL; -ulint srv_unix_file_flush_method = 0; +char* srv_file_flush_method_str = NULL; +ulint srv_unix_file_flush_method = SRV_UNIX_FDATASYNC; +ulint srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; /* If the following is != 0 we do not allow inserts etc. This protects the user from forgetting the innodb_force_recovery keyword to my.cnf */ @@ -281,6 +280,9 @@ time_t srv_last_monitor_time; mutex_t srv_innodb_monitor_mutex; +ulint srv_main_thread_process_no = 0; +ulint srv_main_thread_id = 0; + /* IMPLEMENTATION OF THE SERVER MAIN PROGRAM ========================================= @@ -2046,13 +2048,15 @@ srv_table_reserve_slot_for_mysql(void) } /******************************************************************* -Puts a MySQL OS thread to wait for a lock to be released. */ +Puts a MySQL OS thread to wait for a lock to be released. If an error +occurs during the wait trx->error_state associated with thr is +!= DB_SUCCESS when we return. DB_LOCK_WAIT_TIMEOUT and DB_DEADLOCK +are possible errors. DB_DEADLOCK is returned if selective deadlock +resolution chose this transaction as a victim. */ -ibool +void srv_suspend_mysql_thread( /*=====================*/ - /* out: TRUE if the lock wait timeout was - exceeded */ que_thr_t* thr) /* in: query thread associated with the MySQL OS thread */ { @@ -2069,13 +2073,15 @@ srv_suspend_mysql_thread( mutex_enter(&kernel_mutex); + trx->error_state = DB_SUCCESS; + if (thr->state == QUE_THR_RUNNING) { /* The lock has already been released: no need to suspend */ mutex_exit(&kernel_mutex); - return(FALSE); + return; } slot = srv_table_reserve_slot_for_mysql(); @@ -2101,18 +2107,18 @@ srv_suspend_mysql_thread( srv_conc_force_exit_innodb(thr_get_trx(thr)); /* Release possible foreign key check latch */ - if (trx->has_dict_foreign_key_check_lock) { + if (trx->has_dict_operation_lock) { - rw_lock_s_unlock(&dict_foreign_key_check_lock); + rw_lock_s_unlock(&dict_operation_lock); } /* Wait for the release */ os_event_wait(event); - if (trx->has_dict_foreign_key_check_lock) { + if (trx->has_dict_operation_lock) { - rw_lock_s_lock(&dict_foreign_key_check_lock); + rw_lock_s_lock(&dict_operation_lock); } /* Return back inside InnoDB */ @@ -2131,10 +2137,9 @@ srv_suspend_mysql_thread( if (srv_lock_wait_timeout < 100000000 && wait_time > (double)srv_lock_wait_timeout) { - return(TRUE); - } - return(FALSE); + trx->error_state = DB_LOCK_WAIT_TIMEOUT; + } } /************************************************************************ @@ -2300,9 +2305,19 @@ srv_sprintf_innodb_monitor( "ROW OPERATIONS\n" "--------------\n"); buf += sprintf(buf, - "%ld queries inside InnoDB, %ld queries in queue; main thread: %s\n", - srv_conc_n_threads, srv_conc_n_waiting_threads, + "%ld queries inside InnoDB, %ld queries in queue\n", + srv_conc_n_threads, srv_conc_n_waiting_threads); +#ifdef UNIV_LINUX + buf += sprintf(buf, + "Main thread process no %lu, state: %s\n", + srv_main_thread_process_no, srv_main_thread_op_info); +#else + buf += sprintf(buf, + "Main thread id %lu, state: %s\n", + srv_main_thread_id, + srv_main_thread_op_info); +#endif buf += sprintf(buf, "Number of rows inserted %lu, updated %lu, deleted %lu, read %lu\n", srv_n_rows_inserted, @@ -2636,6 +2651,9 @@ srv_master_thread( UT_NOT_USED(arg); + srv_main_thread_process_no = os_proc_get_number(); + srv_main_thread_id = os_thread_pf(os_thread_get_curr_id()); + srv_table_reserve_slot(SRV_MASTER); mutex_enter(&kernel_mutex); diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index dfa122b2ece..d6d610bb5b8 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -515,7 +515,7 @@ srv_calc_high32( } /************************************************************************* -Creates or opens the log files. */ +Creates or opens the log files and closes them. */ static ulint open_or_create_log_file( @@ -640,7 +640,7 @@ open_or_create_log_file( } /************************************************************************* -Creates or opens database data files. */ +Creates or opens database data files and closes them. */ static ulint open_or_create_data_files( @@ -965,31 +965,63 @@ innobase_start_or_create_for_mysql(void) srv_is_being_started = TRUE; srv_startup_is_before_trx_rollback_phase = TRUE; + os_aio_use_native_aio = FALSE; - if (0 == ut_strcmp(srv_unix_file_flush_method_str, "fdatasync")) { +#ifdef __WIN__ + if (os_get_os_version() == OS_WIN95 + || os_get_os_version() == OS_WIN31 + || os_get_os_version() == OS_WINNT) { + + /* On Win 95, 98, ME, Win32 subsystem for Windows 3.1, + and NT use simulated aio. In NT Windows provides async i/o, + but when run in conjunction with InnoDB Hot Backup, it seemed + to corrupt the data files. */ + + os_aio_use_native_aio = FALSE; + } else { + /* On Win 2000 and XP use async i/o */ + os_aio_use_native_aio = TRUE; + } +#endif + if (srv_file_flush_method_str == NULL) { + /* These are the default options */ + + srv_unix_file_flush_method = SRV_UNIX_FDATASYNC; + + srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; +#ifndef __WIN__ + } else if (0 == ut_strcmp(srv_file_flush_method_str, "fdatasync")) { srv_unix_file_flush_method = SRV_UNIX_FDATASYNC; - } else if (0 == ut_strcmp(srv_unix_file_flush_method_str, "O_DSYNC")) { + } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DSYNC")) { srv_unix_file_flush_method = SRV_UNIX_O_DSYNC; - } else if (0 == ut_strcmp(srv_unix_file_flush_method_str, + } else if (0 == ut_strcmp(srv_file_flush_method_str, "littlesync")) { srv_unix_file_flush_method = SRV_UNIX_LITTLESYNC; - } else if (0 == ut_strcmp(srv_unix_file_flush_method_str, "nosync")) { + } else if (0 == ut_strcmp(srv_file_flush_method_str, "nosync")) { srv_unix_file_flush_method = SRV_UNIX_NOSYNC; +#else + } else if (0 == ut_strcmp(srv_file_flush_method_str, "normal")) { + srv_win_file_flush_method = SRV_WIN_IO_NORMAL; + os_aio_use_native_aio = FALSE; + + } else if (0 == ut_strcmp(srv_file_flush_method_str, "unbuffered")) { + srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; + os_aio_use_native_aio = FALSE; + + } else if (0 == ut_strcmp(srv_file_flush_method_str, + "async_unbuffered")) { + srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; +#endif } else { fprintf(stderr, "InnoDB: Unrecognized value %s for innodb_flush_method\n", - srv_unix_file_flush_method_str); + srv_file_flush_method_str); return(DB_ERROR); } - /* - printf("srv_unix set to %lu\n", srv_unix_file_flush_method); - */ - os_aio_use_native_aio = srv_use_native_aio; - err = srv_boot(); if (err != DB_SUCCESS) { @@ -999,34 +1031,15 @@ innobase_start_or_create_for_mysql(void) /* Restrict the maximum number of file i/o threads */ if (srv_n_file_io_threads > SRV_MAX_N_IO_THREADS) { + srv_n_file_io_threads = SRV_MAX_N_IO_THREADS; } -#if !(defined(WIN_ASYNC_IO) || defined(POSIX_ASYNC_IO)) - /* In simulated aio we currently have use only for 4 threads */ - - os_aio_use_native_aio = FALSE; - - srv_n_file_io_threads = 4; -#endif - -#ifdef __WIN__ - if (os_get_os_version() == OS_WIN95 - || os_get_os_version() == OS_WIN31) { - - /* On Win 95, 98, ME, and Win32 subsystem for Windows 3.1 use - simulated aio */ - - os_aio_use_native_aio = FALSE; - srv_n_file_io_threads = 4; - } else { - /* On NT and Win 2000 always use aio */ - os_aio_use_native_aio = TRUE; - } -#endif - os_aio_use_native_aio = FALSE; - if (!os_aio_use_native_aio) { + /* In simulated aio we currently have use only for 4 threads */ + + srv_n_file_io_threads = 4; + os_aio_init(8 * SRV_N_PENDING_IOS_PER_THREAD * srv_n_file_io_threads, srv_n_file_io_threads, @@ -1047,15 +1060,6 @@ innobase_start_or_create_for_mysql(void) lock_sys_create(srv_lock_table_size); -#ifdef POSIX_ASYNC_IO - if (os_aio_use_native_aio) { - /* There is only one thread per async io array: - one for ibuf i/o, one for log i/o, one for ordinary reads, - one for ordinary writes; we need only 4 i/o threads */ - - srv_n_file_io_threads = 4; - } -#endif /* Create i/o-handler threads: */ for (i = 0; i < srv_n_file_io_threads; i++) { diff --git a/innobase/sync/sync0rw.c b/innobase/sync/sync0rw.c index fe837b119f3..b214bca0470 100644 --- a/innobase/sync/sync0rw.c +++ b/innobase/sync/sync0rw.c @@ -663,7 +663,8 @@ rw_lock_own( /*========*/ /* out: TRUE if locked */ rw_lock_t* lock, /* in: rw-lock */ - ulint lock_type) /* in: lock type */ + ulint lock_type) /* in: lock type: RW_LOCK_SHARED, + RW_LOCK_EX */ { rw_lock_debug_t* info; diff --git a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c index 3ea996afd6b..376be2e723a 100644 --- a/innobase/sync/sync0sync.c +++ b/innobase/sync/sync0sync.c @@ -901,8 +901,7 @@ sync_thread_levels_empty_gen( if (slot->latch != NULL && (!dict_mutex_allowed || (slot->level != SYNC_DICT - && slot->level != SYNC_FOREIGN_KEY_CHECK - && slot->level != SYNC_PURGE_IS_RUNNING))) { + && slot->level != SYNC_DICT_OPERATION))) { lock = slot->latch; mutex = slot->latch; @@ -1087,12 +1086,10 @@ sync_thread_add_level( SYNC_IBUF_PESS_INSERT_MUTEX)); } else if (level == SYNC_DICT_AUTOINC_MUTEX) { ut_a(sync_thread_levels_g(array, SYNC_DICT_AUTOINC_MUTEX)); - } else if (level == SYNC_FOREIGN_KEY_CHECK) { - ut_a(sync_thread_levels_g(array, SYNC_FOREIGN_KEY_CHECK)); + } else if (level == SYNC_DICT_OPERATION) { + ut_a(sync_thread_levels_g(array, SYNC_DICT_OPERATION)); } else if (level == SYNC_DICT_HEADER) { ut_a(sync_thread_levels_g(array, SYNC_DICT_HEADER)); - } else if (level == SYNC_PURGE_IS_RUNNING) { - ut_a(sync_thread_levels_g(array, SYNC_PURGE_IS_RUNNING)); } else if (level == SYNC_DICT) { ut_a(buf_debug_prints || sync_thread_levels_g(array, SYNC_DICT)); diff --git a/innobase/trx/trx0purge.c b/innobase/trx/trx0purge.c index 97362d00b4b..d58240d3c11 100644 --- a/innobase/trx/trx0purge.c +++ b/innobase/trx/trx0purge.c @@ -209,9 +209,6 @@ trx_purge_sys_create(void) purge_sys->purge_undo_no = ut_dulint_zero; purge_sys->next_stored = FALSE; - rw_lock_create(&(purge_sys->purge_is_running)); - rw_lock_set_level(&(purge_sys->purge_is_running), - SYNC_PURGE_IS_RUNNING); rw_lock_create(&(purge_sys->latch)); rw_lock_set_level(&(purge_sys->latch), SYNC_PURGE_LATCH); diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 994a6777924..7566fe1839e 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -23,7 +23,7 @@ Created 3/26/1996 Heikki Tuuri #include "srv0srv.h" #include "thr0loc.h" #include "btr0sea.h" - +#include "os0proc.h" /* Copy of the prototype for innobase_mysql_print_thd: this copy MUST be equal to the one in mysql/sql/ha_innobase.cc ! */ @@ -85,12 +85,14 @@ trx_create( trx->conc_state = TRX_NOT_STARTED; trx->start_time = time(NULL); + trx->isolation_level = TRX_ISO_REPEATABLE_READ; trx->check_foreigns = TRUE; trx->check_unique_secondary = TRUE; trx->dict_operation = FALSE; trx->mysql_thd = NULL; + trx->mysql_query_str = NULL; trx->n_mysql_tables_in_use = 0; trx->mysql_n_tables_locked = 0; @@ -132,7 +134,7 @@ trx_create( trx->lock_heap = mem_heap_create_in_buffer(256); UT_LIST_INIT(trx->trx_locks); - trx->has_dict_foreign_key_check_lock = FALSE; + trx->has_dict_operation_lock = FALSE; trx->has_search_latch = FALSE; trx->search_latch_timeout = BTR_SEA_TIMEOUT; @@ -175,6 +177,8 @@ trx_allocate_for_mysql(void) mutex_exit(&kernel_mutex); trx->mysql_thread_id = os_thread_get_curr_id(); + + trx->mysql_process_no = os_proc_get_number(); return(trx); } @@ -1497,9 +1501,12 @@ trx_print( default: buf += sprintf(buf, " state %lu", trx->conc_state); } +#ifdef UNIV_LINUX + buf += sprintf(buf, ", process no %lu", trx->mysql_process_no); +#else buf += sprintf(buf, ", OS thread id %lu", os_thread_pf(trx->mysql_thread_id)); - +#endif if (ut_strlen(trx->op_info) > 0) { buf += sprintf(buf, " %s", trx->op_info); } diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 9e174d7ee59..f4125f2259e 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -97,6 +97,8 @@ are determined in innobase_init below: */ char* innobase_data_home_dir = NULL; char* innobase_log_group_home_dir = NULL; char* innobase_log_arch_dir = NULL; +/* The following has a midleading name: starting from 4.0.5 this also +affects Windows */ char* innobase_unix_file_flush_method = NULL; /* Below we have boolean-valued start-up parameters, and their default @@ -346,7 +348,8 @@ check_trx_exists( trx = trx_allocate_for_mysql(); trx->mysql_thd = thd; - + trx->mysql_query_str = &((*thd).query); + thd->transaction.all.innobase_tid = trx; /* The execution of a single SQL statement is denoted by @@ -713,9 +716,10 @@ innobase_init(void) DBUG_RETURN(TRUE); } - srv_unix_file_flush_method_str = (innobase_unix_file_flush_method ? + + srv_file_flush_method_str = (innobase_unix_file_flush_method ? innobase_unix_file_flush_method : - (char*)"fdatasync"); + NULL); srv_n_log_groups = (ulint) innobase_mirrored_log_groups; srv_n_log_files = (ulint) innobase_log_files_in_group; @@ -725,8 +729,6 @@ innobase_init(void) srv_log_buffer_size = (ulint) innobase_log_buffer_size; srv_flush_log_at_trx_commit = (ulint) innobase_flush_log_at_trx_commit; - srv_use_native_aio = 0; - srv_pool_size = (ulint) innobase_buffer_pool_size; srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size; @@ -2179,8 +2181,16 @@ convert_search_mode_to_innobase( case HA_READ_AFTER_KEY: return(PAGE_CUR_G); case HA_READ_BEFORE_KEY: return(PAGE_CUR_L); case HA_READ_PREFIX: return(PAGE_CUR_GE); - case HA_READ_PREFIX_LAST: return(PAGE_CUR_LE); - /* HA_READ_PREFIX_LAST does not yet work in InnoDB! */ + case HA_READ_PREFIX_LAST: + /* ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Warning: Using HA_READ_PREFIX_LAST\n"); */ + return(PAGE_CUR_LE); + + /* InnoDB does not yet support ..PREFIX_LAST! + We have to add a new search flag + PAGE_CUR_LE_OR_PREFIX to InnoDB. */ + /* the above PREFIX flags mean that the last field in the key value may just be a prefix of the complete fixed length field */ @@ -3639,7 +3649,6 @@ ha_innobase::reset(void) return(0); } - /********************************************************************** When we create a temporary table inside MySQL LOCK TABLES, MySQL will not call external_lock for the temporary table when it uses it. Instead, @@ -3661,6 +3670,14 @@ ha_innobase::start_stmt( innobase_release_stat_resources(trx); trx_mark_sql_stat_end(trx); + if (trx->isolation_level <= TRX_ISO_READ_COMMITTED + && trx->read_view) { + /* At low transaction isolation levels we let + each consistent read set its own snapshot */ + + read_view_close_for_mysql(trx); + } + auto_inc_counter_for_this_stat = 0; prebuilt->sql_stat_start = TRUE; prebuilt->hint_no_need_to_fetch_extra_cols = TRUE; @@ -3680,6 +3697,24 @@ ha_innobase::start_stmt( return(0); } +/********************************************************************** +Maps a MySQL trx isolation level code to the InnoDB isolation level code */ +inline +ulint +innobase_map_isolation_level( +/*=========================*/ + /* out: InnoDB isolation level */ + enum_tx_isolation iso) /* in: MySQL isolation level code */ +{ + switch(iso) { + case ISO_READ_COMMITTED: return(TRX_ISO_READ_COMMITTED); + case ISO_REPEATABLE_READ: return(TRX_ISO_REPEATABLE_READ); + case ISO_SERIALIZABLE: return(TRX_ISO_SERIALIZABLE); + case ISO_READ_UNCOMMITTED: return(TRX_ISO_READ_UNCOMMITTED); + default: ut_a(0); return(0); + } +} + /********************************************************************** As MySQL will execute an external lock for every new table it uses when it starts to process an SQL statement (an exception is when MySQL calls @@ -3726,7 +3761,13 @@ ha_innobase::external_lock( thd->transaction.all.innodb_active_trans = 1; trx->n_mysql_tables_in_use++; - if (thd->variables.tx_isolation == ISO_SERIALIZABLE + if (thd->variables.tx_isolation != ISO_REPEATABLE_READ) { + trx->isolation_level = innobase_map_isolation_level( + (enum_tx_isolation) + thd->variables.tx_isolation); + } + + if (trx->isolation_level == TRX_ISO_SERIALIZABLE && prebuilt->select_lock_type == LOCK_NONE) { /* To get serializable execution we let InnoDB @@ -3753,6 +3794,15 @@ ha_innobase::external_lock( innobase_release_stat_resources(trx); + if (trx->isolation_level <= TRX_ISO_READ_COMMITTED + && trx->read_view) { + + /* At low transaction isolation levels we let + each consistent read set its own snapshot */ + + read_view_close_for_mysql(trx); + } + if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { @@ -3777,14 +3827,13 @@ innodb_show_status( char* buf; DBUG_ENTER("innodb_show_status"); - + if (innodb_skip) { + fprintf(stderr, + "Cannot call SHOW INNODB STATUS because skip-innodb is defined\n"); - fprintf(stderr, - "Cannot call SHOW INNODB STATUS because skip-innodb is defined\n"); - - DBUG_RETURN(-1); - } + DBUG_RETURN(-1); + } /* We let the InnoDB Monitor to output at most 100 kB of text, add a safety margin of 10 kB for buffer overruns */ diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h index 357fb31b5e3..d2639f39c5b 100644 --- a/sql/ha_innodb.h +++ b/sql/ha_innodb.h @@ -96,7 +96,7 @@ class ha_innobase: public handler ulong index_flags(uint idx) const { return (HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | - HA_KEY_READ_ONLY | HA_NOT_READ_PREFIX_LAST); + HA_KEY_READ_ONLY); } uint max_record_length() const { return HA_MAX_REC_LENGTH; } uint max_keys() const { return MAX_KEY; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b2114b2192a..ebc6100a71b 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3879,7 +3879,7 @@ static void set_options(void) /* Set default values for some variables */ global_system_variables.table_type=DB_TYPE_MYISAM; - global_system_variables.tx_isolation=ISO_READ_COMMITTED; + global_system_variables.tx_isolation=ISO_REPEATABLE_READ; global_system_variables.select_limit= (ulong) HA_POS_ERROR; max_system_variables.select_limit= (ulong) HA_POS_ERROR; global_system_variables.max_join_size= (ulong) HA_POS_ERROR; @@ -4351,7 +4351,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } global_system_variables.tx_isolation= ((opt_sql_mode & MODE_SERIALIZABLE) ? ISO_SERIALIZABLE : - ISO_READ_COMMITTED); + ISO_REPEATABLE_READ); break; } case OPT_MASTER_PASSWORD: From 2f7981b73df1d0f7a13aa292945b68187596aac5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Oct 2002 23:26:21 +0200 Subject: [PATCH 019/246] configure.in: In Linux do not printb thread id's but process no's in SHOW INNODB STATUS innobase/configure.in: In Linux do not printb thread id's but process no's in SHOW INNODB STATUS --- innobase/configure.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/innobase/configure.in b/innobase/configure.in index 761859e5da3..59d213fef12 100644 --- a/innobase/configure.in +++ b/innobase/configure.in @@ -86,6 +86,8 @@ else fi case "$target_os" in + lin*) + CFLAGS="$CFLAGS -DUNIV_LINUX";; hpux10*) CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE -DUNIV_HPUX -DUNIV_HPUX10";; hp*) From af85803133fc1cb57f0ce9fe245b16b4de872e2d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2002 00:11:40 +0200 Subject: [PATCH 020/246] lexyy.c: Update instructions about editing the files generated by flex and bison innobase/pars/lexyy.c: Update instructions about editing the files generated by flex and bison --- innobase/pars/lexyy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/innobase/pars/lexyy.c b/innobase/pars/lexyy.c index f7edc9d195f..71507ccd868 100644 --- a/innobase/pars/lexyy.c +++ b/innobase/pars/lexyy.c @@ -607,6 +607,9 @@ How to make the InnoDB parser and lexer C files: 6. Remove the #include of unistd.h from about line 2500 of lexyy.c +7. Add '#include "univ.i"' before #include in lexyy.c + (Needed for AIX) + These instructions seem to work at least with bison-1.28 and flex-2.5.4 on Linux. *******************************************************/ From 59f65c4b0b3ddd1e75566b0021b9e25580829835 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2002 09:44:06 +0200 Subject: [PATCH 021/246] row0undo.c: Partial fix to a hang introduced in CREATE TABLE in the push last night innobase/row/row0undo.c: Partial fix to a hang introduced in CREATE TABLE in the push last night --- innobase/row/row0undo.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/innobase/row/row0undo.c b/innobase/row/row0undo.c index b40d36533a4..6f1cfc4db9f 100644 --- a/innobase/row/row0undo.c +++ b/innobase/row/row0undo.c @@ -253,9 +253,17 @@ row_undo( } } - /* Prevent DROP TABLE etc. while we are rolling back this row */ + /* Prevent DROP TABLE etc. while we are rolling back this row. + If we are doing a TABLE CREATE or some other dictionary operation, + then we already have dict_operation_lock locked in x-mode. Do not + try to lock again in s-mode, because that would cause a hang. + + TODO: keep track when trx exactly has the latch locked!!! + TODO: trx->dict_operation tells it only in some cases!!! */ - rw_lock_s_lock(&dict_operation_lock); + if (!trx->dict_operation) { + rw_lock_s_lock(&dict_operation_lock); + } if (node->state == UNDO_NODE_INSERT) { @@ -267,7 +275,10 @@ row_undo( err = row_undo_mod(node, thr); } - rw_lock_s_unlock(&dict_operation_lock); + if (!trx->dict_operation) { + + rw_lock_s_unlock(&dict_operation_lock); + } /* Do some cleanup */ btr_pcur_close(&(node->pcur)); From f6b9a33fb67c9143bda91e2fbdef6272c6d2e209 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2002 18:27:15 +0400 Subject: [PATCH 022/246] Some changes for SSL sql-bench/bench-init.pl.sh: Add option connect-options(using with SSL) sql-bench/server-cfg.sh: Add option connect-option(using with SSL) sql/sql_acl.cc: Fix bug when GRANT ... REQUIRE NONE doesn't unset SSL requirements BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BitKeeper/etc/logging_ok | 1 + sql-bench/bench-init.pl.sh | 12 ++++++++---- sql-bench/server-cfg.sh | 7 ++++--- sql/sql_acl.cc | 9 +++++++-- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 8c51faa4411..ba06996cac1 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -14,6 +14,7 @@ bar@bar.udmsearch.izhnet.ru bell@sanja.is.com.ua bk@admin.bk davida@isil.mysql.com +gluh@gluh.(none) heikki@donna.mysql.fi heikki@hundin.mysql.fi heikki@rescue. diff --git a/sql-bench/bench-init.pl.sh b/sql-bench/bench-init.pl.sh index 4e7e1c29504..9b999ee7f95 100644 --- a/sql-bench/bench-init.pl.sh +++ b/sql-bench/bench-init.pl.sh @@ -39,7 +39,7 @@ require "$pwd/server-cfg" || die "Can't read Configuration file: $!\n"; $|=1; # Output data immediately $opt_skip_test=$opt_skip_create=$opt_skip_delete=$opt_verbose=$opt_fast_insert=$opt_lock_tables=$opt_debug=$opt_skip_delete=$opt_fast=$opt_force=$opt_log=$opt_use_old_results=$opt_help=$opt_odbc=$opt_small_test=$opt_small_tables=$opt_samll_key_tables=$opt_stage=$opt_old_headers=$opt_die_on_errors=$opt_tcpip=$opt_random=0; -$opt_cmp=$opt_user=$opt_password=""; +$opt_cmp=$opt_user=$opt_password=$opt_connect_options=""; $opt_server="mysql"; $opt_dir="output"; $opt_host="localhost";$opt_database="test"; $opt_machine=""; $opt_suffix=""; @@ -55,11 +55,11 @@ $log_prog_args=join(" ", skip_arguments(\@ARGV,"comments","cmp","server", "use-old-results","skip-test", "optimization","hw", "machine", "dir", "suffix", "log")); -GetOptions("skip-test=s","comments=s","cmp=s","server=s","user=s","host=s","database=s","password=s","loop-count=i","row-count=i","skip-create","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","field-count=i","regions=i","groups=i","time-limit=i","log","use-old-results","machine=s","dir=s","suffix=s","help","odbc","small-test","small-tables","small-key-tables","stage=i","threads=i","random","old-headers","die-on-errors","create-options=s","hires","tcpip","silent","optimization=s","hw=s","socket=s") || usage(); +GetOptions("skip-test=s","comments=s","cmp=s","server=s","user=s","host=s","database=s","password=s","loop-count=i","row-count=i","skip-create","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","field-count=i","regions=i","groups=i","time-limit=i","log","use-old-results","machine=s","dir=s","suffix=s","help","odbc","small-test","small-tables","small-key-tables","stage=i","threads=i","random","old-headers","die-on-errors","create-options=s","hires","tcpip","silent","optimization=s","hw=s","socket=s","connect-options=s") || usage(); usage() if ($opt_help); $server=get_server($opt_server,$opt_host,$opt_database,$opt_odbc, - machine_part(), $opt_socket); + machine_part(), $opt_socket, $opt_connect_options); $limits=merge_limits($server,$opt_cmp); $date=date(); @estimated=(0.0,0.0,0.0); # For estimated time support @@ -593,7 +593,11 @@ All benchmarks takes the following options: --hw='some comments' Add coments about hardware used for this test. - + +--connect-options='some connect options' + Add options, which uses at DBI connect. + For example --connect-options=mysql_read_default_file=/etc/my.cnf. + EOF exit(0); } diff --git a/sql-bench/server-cfg.sh b/sql-bench/server-cfg.sh index d1205d55842..e53190a75ec 100644 --- a/sql-bench/server-cfg.sh +++ b/sql-bench/server-cfg.sh @@ -33,10 +33,10 @@ sub get_server { - my ($name,$host,$database,$odbc,$machine,$socket)=@_; + my ($name,$host,$database,$odbc,$machine,$socket,$connect_options)=@_; my ($server); if ($name =~ /mysql/i) - { $server=new db_MySQL($host, $database, $machine, $socket); } + { $server=new db_MySQL($host, $database, $machine, $socket,$connect_options); } elsif ($name =~ /pg/i) { $server= new db_Pg($host,$database); } elsif ($name =~ /msql/i) @@ -106,7 +106,7 @@ package db_MySQL; sub new { - my ($type,$host,$database,$machine,$socket)= @_; + my ($type,$host,$database,$machine,$socket,$connect_options)= @_; my $self= {}; my %limits; bless $self; @@ -114,6 +114,7 @@ sub new $self->{'cmp_name'} = "mysql"; $self->{'data_source'} = "DBI:mysql:database=$database;host=$host"; $self->{'data_source'} .= ";mysql_socket=$socket" if($socket); + $self->{'data_source'} .= ";$connect_options" if($connect_options); $self->{'limits'} = \%limits; $self->{'smds'} = \%smds; $self->{'blob'} = "blob"; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 867163be90d..380b0e4fd87 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1348,8 +1348,13 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo, strlen(thd->lex.x509_subject)); break; case SSL_TYPE_NOT_SPECIFIED: - case SSL_TYPE_NONE: // Impossible - break; // Nothing to do + break; + case SSL_TYPE_NONE: + table->field[24]->store("",0); + table->field[25]->store("",0); + table->field[26]->store("",0); + table->field[27]->store("",0); + break; } USER_RESOURCES mqh = thd->lex.mqh; From 1ede1572a716d2ee7a4e84834aafb7f12fb351ad Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2002 16:45:11 +0100 Subject: [PATCH 023/246] - Do-compile: added a fast test run with dynamic-row tables - Do-compile: fix small (cosmetical, not critical) typo Build-tools/Do-compile: - added a fast test run with dynamic-row tables - fix small (cosmetical, not critical) typo --- Build-tools/Do-compile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index bdec06a5f9f..067b88888ac 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -381,13 +381,15 @@ if ($opt_stage <= 9 && !$opt_no_test) log_system("rm -f output/*"); $tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : ""; check_system("perl ./run-all-tests --log --die-on-errors $connect_option $tmp","RUN-mysql"); + # Run additional fast test with dynamic-row tables + check_system("perl ./run-all-tests --log --suffix=\"_dynamic_rows\" --die-on-errors $connect_option --fast --user=root --small-test --create-options=\"row_format=dynamic\"","RUN-mysql"); if ($opt_innodb) { - check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-option=\"type=innodb\"","RUN-mysql"); + check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-options=\"type=innodb\"","RUN-mysql"); } if ($opt_bdb) { - check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-option=\"type=bdb\"","RUN-mysql"); + check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql"); } } From 6b5860130aed12a537f674d2a2ac867d24dc0528 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2002 19:39:52 +0300 Subject: [PATCH 024/246] Decimal field fix overflow sql/field.cc: Fixes for Decimal crash bug patch according to Monty's comments ? --- sql/field.cc | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/sql/field.cc b/sql/field.cc index 9cb13e96cc1..f06cd7b3604 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -41,6 +41,11 @@ #include #endif +// Maximum allowed exponent value for converting string to decimal +#define MAX_EXPONENT 1024 + + + /***************************************************************************** Instansiate templates and static variables *****************************************************************************/ @@ -367,7 +372,6 @@ void Field_decimal::store(const char *from,uint len) /* The pointer where the field value starts (i.e., "where to write") */ char *to=ptr; uint tmp_dec, tmp_uint; - ulonglong tmp_ulonglong; /* The sign of the number : will be 0 (means positive but sign not specified), '+' or '-' @@ -381,8 +385,7 @@ void Field_decimal::store(const char *from,uint len) const char *frac_digits_from, *frac_digits_end; /* The sign of the exponent : will be 0 (means no exponent), '+' or '-' */ char expo_sign_char=0; - uint exponent=0; // value of the exponent - ulonglong exponent_ulonglong=0; + uint exponent=0; // value of the exponent /* Pointers used when digits move from the left of the '.' to the right of the '.' (explained below) @@ -485,14 +488,13 @@ void Field_decimal::store(const char *from,uint len) */ for (;from!=end && isdigit(*from); from++) { - exponent_ulonglong=10*exponent_ulonglong+(ulonglong)(*from-'0'); - if (exponent_ulonglong>(ulonglong)UINT_MAX) + exponent=10*exponent+(*from-'0'); + if (exponent>MAX_EXPONENT) { - exponent_ulonglong=(ulonglong)UINT_MAX; + exponent=MAX_EXPONENT; break; } } - exponent=(uint)(exponent_ulonglong); } /* @@ -534,21 +536,21 @@ void Field_decimal::store(const char *from,uint len) */ /* - Below tmp_ulongulong cannot overflow, + Below tmp_uint cannot overflow with small enough MAX_EXPONENT setting, as int_digits_added_zeros<=exponent<4G and (ulonglong)(int_digits_end-int_digits_from)<=max_allowed_packet<=2G and (ulonglong)(frac_digits_from-int_digits_tail_from)<=max_allowed_packet<=2G */ if (!expo_sign_char) - tmp_ulonglong=(ulonglong)tmp_dec+(ulonglong)(int_digits_end-int_digits_from); + tmp_uint=tmp_dec+(uint)(int_digits_end-int_digits_from); else if (expo_sign_char == '-') { tmp_uint=min(exponent,(uint)(int_digits_end-int_digits_from)); frac_digits_added_zeros=exponent-tmp_uint; int_digits_end -= tmp_uint; frac_digits_head_end=int_digits_end+tmp_uint; - tmp_ulonglong=(ulonglong)tmp_dec+(ulonglong)(int_digits_end-int_digits_from); + tmp_uint=tmp_dec+(uint)(int_digits_end-int_digits_from); } else // (expo_sign_char=='+') { @@ -575,9 +577,9 @@ void Field_decimal::store(const char *from,uint len) int_digits_added_zeros=0; } } - tmp_ulonglong=(ulonglong)tmp_dec+(ulonglong)(int_digits_end-int_digits_from) - +(ulonglong)(frac_digits_from-int_digits_tail_from)+ - (ulonglong)int_digits_added_zeros; + tmp_uint=tmp_dec+(int_digits_end-int_digits_from) + +(uint)(frac_digits_from-int_digits_tail_from)+ + int_digits_added_zeros; } /* @@ -588,7 +590,7 @@ void Field_decimal::store(const char *from,uint len) If the sign is defined and '-', we need one position for it */ - if ((ulonglong)field_length < tmp_ulonglong + (ulonglong) (sign_char == '-')) + if (field_length < tmp_uint + (sign_char == '-')) //the rightmost sum above cannot overflow { // too big number, change to max or min number @@ -596,11 +598,6 @@ void Field_decimal::store(const char *from,uint len) return; } - /* - If the above test was ok, then tmp_ulonglong<4G and the following cast is valid - */ - tmp_uint=(uint)tmp_ulonglong; - /* Tmp_left_pos is the position where the leftmost digit of the int_% parts will be written From 1c8ca97fd61de53449de644f94bf5bdaf03b16e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2002 22:08:34 +0200 Subject: [PATCH 025/246] A fix for bug when comparing a datetime column with timestamp values with BETWEEN clause --- mysql-test/r/func_test.result | 14 ++++++++++++++ mysql-test/t/func_test.test | 10 ++++++++++ sql/field.h | 1 + sql/item_cmpfunc.cc | 1 + 4 files changed, 26 insertions(+) diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 8cfae44b9dd..ef93096478f 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -46,6 +46,20 @@ select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; 1 XOR 1 1 XOR 0 0 XOR 1 0 XOR 0 NULL XOR 1 1 XOR NULL 0 XOR NULL 0 1 1 0 NULL NULL NULL +drop table if exists t1,t2; +CREATE TABLE t1 ( start datetime default NULL) TYPE=MyISAM; +INSERT INTO t1 VALUES ('2002-10-21 00:00:00'); +INSERT INTO t1 VALUES ('2002-10-28 00:00:00'); +INSERT INTO t1 VALUES ('2002-11-04 00:00:00'); +CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL) TYPE=MyISAM; +INSERT INTO t2 VALUES (20021029165106,20021105164731); +select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; +start ctime1 ctime2 +2002-11-04 00:00:00 20021029165106 20021105164731 +select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; +start ctime1 ctime2 +2002-11-04 00:00:00 20021029165106 20021105164731 +drop table if exists t1,t2; select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; 5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1 0 1 diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index f5ad2e21c73..1486e5bcca8 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -17,6 +17,16 @@ select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2, select -1.49 or -1.49,0.6 or 0.6; select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; +drop table if exists t1,t2; +CREATE TABLE t1 ( start datetime default NULL) TYPE=MyISAM; +INSERT INTO t1 VALUES ('2002-10-21 00:00:00'); +INSERT INTO t1 VALUES ('2002-10-28 00:00:00'); +INSERT INTO t1 VALUES ('2002-11-04 00:00:00'); +CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL) TYPE=MyISAM; +INSERT INTO t2 VALUES (20021029165106,20021105164731); +select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; +select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; +drop table if exists t1,t2; # # Wrong usage of functions diff --git a/sql/field.h b/sql/field.h index 4290f99ea3e..de9e98290e7 100644 --- a/sql/field.h +++ b/sql/field.h @@ -544,6 +544,7 @@ public: enum Item_result result_type () const { return field_length == 8 || field_length == 14 ? INT_RESULT : STRING_RESULT; } enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } + enum Item_result cmp_type () const { return INT_RESULT; } void store(const char *to,uint length); void store(double nr); void store(longlong nr); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 79d695eea1e..42cd0a2ee4f 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -360,6 +360,7 @@ void Item_func_between::fix_length_and_dec() if (args[0]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[0])->field; + cmp_type=field->cmp_type(); if (field->store_for_compare()) { if (convert_constant_item(field,&args[1])) From 360b64379daf7d485d43089d4e42dc891b09e1b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2002 21:55:56 +0100 Subject: [PATCH 026/246] - Applied fix made in 4.0 tree to fix a bug when comparing a datetime column with timestamp values with BETWEEN clause --- sql/field.h | 1 + sql/item_cmpfunc.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/sql/field.h b/sql/field.h index e822f6a71d6..92e098c75c4 100644 --- a/sql/field.h +++ b/sql/field.h @@ -533,6 +533,7 @@ public: enum Item_result result_type () const { return field_length == 8 || field_length == 14 ? INT_RESULT : STRING_RESULT; } enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } + enum Item_result cmp_type () const { return INT_RESULT; } void store(const char *to,uint length); void store(double nr); void store(longlong nr); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 36ecde337a7..4650b770299 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -354,6 +354,7 @@ void Item_func_between::fix_length_and_dec() if (args[0]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[0])->field; + cmp_type=field->cmp_type(); if (field->store_for_compare()) { if (convert_constant_item(field,&args[1])) From 35396ec7cd72580e952463a403f5105d2c3b6b62 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2002 23:51:12 +0200 Subject: [PATCH 027/246] innodb.result: We changed MySQL default isolation yesterday to REPEATABLE READ mysql-test/r/innodb.result: We changed MySQL default isolation yesterday to REPEATABLE READ --- mysql-test/r/innodb.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 78b0da2769e..5ccd3a1c4cc 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -988,7 +988,7 @@ BEGIN; SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; SELECT @@tx_isolation,@@global.tx_isolation; @@tx_isolation @@global.tx_isolation -SERIALIZABLE READ-COMMITTED +SERIALIZABLE REPEATABLE-READ insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'); select id, code, name from t1 order by id; id code name From 842fc58e01bf856b0e175cceaf806b1d841e5e58 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 00:26:04 +0200 Subject: [PATCH 028/246] ha_innodb.cc: Fix bug in MySQL-3.23 ORDER BY from a table with no PRIMARY KEY and where the user had added UNIQUE indexes with CREATE INDEX sql/ha_innodb.cc: Fix bug in MySQL-3.23 ORDER BY from a table with no PRIMARY KEY and where the user had added UNIQUE indexes with CREATE INDEX --- sql/ha_innodb.cc | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index f4125f2259e..588c37e9cf3 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1171,7 +1171,10 @@ how you can resolve the problem.\n", ((row_prebuilt_t*)innobase_prebuilt)->mysql_row_len = table->reclength; - primary_key = MAX_KEY; + /* Looks like MySQL-3.23 sometimes has primary key number != 0 */ + + primary_key = table->primary_key; + key_used_on_scan = primary_key; /* Allocate a buffer for a 'row reference'. A row reference is a string of bytes of length ref_length which uniquely specifies @@ -1180,13 +1183,14 @@ how you can resolve the problem.\n", of length ref_length! */ if (!row_table_got_default_clust_index(ib_table)) { + if (primary_key >= MAX_KEY) { + fprintf(stderr, + "InnoDB: Error: table %s has a primary key in InnoDB\n" + "InnoDB: data dictionary, but not in MySQL!\n", name); + } ((row_prebuilt_t*)innobase_prebuilt) ->clust_index_was_generated = FALSE; - - primary_key = 0; - key_used_on_scan = 0; - /* MySQL allocates the buffer for ref. key_info->key_length includes space for all key columns + one byte for each column @@ -1195,8 +1199,14 @@ how you can resolve the problem.\n", based on ref_length. */ - ref_length = table->key_info->key_length; + ref_length = table->key_info[primary_key].key_length; } else { + if (primary_key != MAX_KEY) { + fprintf(stderr, + "InnoDB: Error: table %s has no primary key in InnoDB\n" + "InnoDB: data dictionary, but has one in MySQL!\n", name); + } + ((row_prebuilt_t*)innobase_prebuilt) ->clust_index_was_generated = TRUE; @@ -1501,7 +1511,8 @@ ha_innobase::store_key_val_for_row( are equal */ bzero(buff, (ref_length- (uint) (buff - buff_start))); - DBUG_RETURN(ref_length); + + DBUG_RETURN((uint)(buff - buff_start)); } /****************************************************************** @@ -2759,7 +2770,11 @@ ha_innobase::position( that len is always fixed for this table. The following assertion checks this. */ - ut_a(len == ref_length); + if (len != ref_length) { + fprintf(stderr, + "InnoDB: Error: stored ref len is %lu, but table ref len is %lu\n", + (ulint)len, (ulint)ref_length); + } } From 8ade6771d79a0cebbbe6560b77cae257d72ac958 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 00:30:19 +0200 Subject: [PATCH 029/246] ha_innobase.cc: Backport from 4.0: Fix bug in MySQL-3.23 ORDER BY from a table with no PRIMARY KEY and where the user had added UNIQUE indexes with CREATE INDEX pars0grm.y: Move inclusion of math.h after univ.i also in the .y file; this fix is already done in 4.0 innobase/pars/pars0grm.y: Move inclusion of math.h after univ.i also in the .y file; this fix is already done in 4.0 sql/ha_innobase.cc: Backport from 4.0: Fix bug in MySQL-3.23 ORDER BY from a table with no PRIMARY KEY and where the user had added UNIQUE indexes with CREATE INDEX --- innobase/pars/pars0grm.y | 3 +-- sql/ha_innobase.cc | 36 ++++++++++++++++++++++++------------ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/innobase/pars/pars0grm.y b/innobase/pars/pars0grm.y index 67289222594..eedc42bee57 100644 --- a/innobase/pars/pars0grm.y +++ b/innobase/pars/pars0grm.y @@ -14,9 +14,8 @@ the InnoDB parser. /* The value of the semantic attribute is a pointer to a query tree node que_node_t */ -#include - #include "univ.i" +#include #include "pars0pars.h" #include "mem0mem.h" #include "que0types.h" diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 13912ad5919..6b5ba7d841e 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -993,7 +993,10 @@ how you can resolve the problem.\n", ((row_prebuilt_t*)innobase_prebuilt)->mysql_row_len = table->reclength; - primary_key = MAX_KEY; + /* Looks like MySQL-3.23 sometimes has primary key number != 0 */ + + primary_key = table->primary_key; + key_used_on_scan = primary_key; /* Allocate a buffer for a 'row reference'. A row reference is a string of bytes of length ref_length which uniquely specifies @@ -1002,21 +1005,30 @@ how you can resolve the problem.\n", of length ref_length! */ if (!row_table_got_default_clust_index(ib_table)) { + if (primary_key >= MAX_KEY) { + fprintf(stderr, + "InnoDB: Error: table %s has a primary key in InnoDB\n" + "InnoDB: data dictionary, but not in MySQL!\n", name); + } ((row_prebuilt_t*)innobase_prebuilt) ->clust_index_was_generated = FALSE; - - primary_key = 0; - key_used_on_scan = 0; - - /* MySQL allocates the buffer for ref. key_info->key_length - includes space for all key columns + one byte for each column - that may be NULL. ref_length must be as exact as possible to - save space, because all row reference buffers are allocated - based on ref_length. */ - - ref_length = table->key_info->key_length; + /* + MySQL allocates the buffer for ref. key_info->key_length + includes space for all key columns + one byte for each column + that may be NULL. ref_length must be as exact as possible to + save space, because all row reference buffers are allocated + based on ref_length. + */ + + ref_length = table->key_info[primary_key].key_length; } else { + if (primary_key != MAX_KEY) { + fprintf(stderr, + "InnoDB: Error: table %s has no primary key in InnoDB\n" + "InnoDB: data dictionary, but has one in MySQL!\n", name); + } + ((row_prebuilt_t*)innobase_prebuilt) ->clust_index_was_generated = TRUE; From f2649f104b821c370955aab1270da8bafce0bae0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 11:32:42 +0200 Subject: [PATCH 030/246] ha_innodb.cc: Fix bug: mysqld-debug-max failed standard test because a safe mutex size was seen as 24 bytes in the body of ha_innodb.cc, but 64 bytes in read0read.c sql/ha_innodb.cc: Fix bug: mysqld-debug-max failed standard test because a safe mutex size was seen as 24 bytes in the body of ha_innodb.cc, but 64 bytes in read0read.c --- sql/ha_innodb.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 588c37e9cf3..79c85985f23 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -40,17 +40,12 @@ InnoDB */ #include "ha_innodb.h" -/* We must declare this here because we undef SAFE_MUTEX below */ pthread_mutex_t innobase_mutex; /* Store MySQL definition of 'byte': in Linux it is char while InnoDB uses unsigned char */ typedef byte mysql_byte; -#ifdef SAFE_MUTEX -#undef pthread_mutex_t -#endif - #define INSIDE_HA_INNOBASE_CC /* Include necessary InnoDB headers */ From e53b7488dcd18705fd785915f48cc64abd2fdb27 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 12:03:34 +0200 Subject: [PATCH 031/246] srv0start.h, srv0start.c, ha_innodb.cc: Add check that sizeof(trx_t) is the same in ha_inndob.cc and InnoDB compilation modules sql/ha_innodb.cc: Add check that sizeof(trx_t) is the same in ha_inndob.cc and InnoDB compilation modules innobase/srv/srv0start.c: Add check that sizeof(trx_t) is the same in ha_inndob.cc and InnoDB compilation modules innobase/include/srv0start.h: Add check that sizeof(trx_t) is the same in ha_inndob.cc and InnoDB compilation modules --- innobase/include/srv0start.h | 2 ++ innobase/srv/srv0start.c | 11 +++++++++++ sql/ha_innodb.cc | 8 ++++++++ 3 files changed, 21 insertions(+) diff --git a/innobase/include/srv0start.h b/innobase/include/srv0start.h index 646d2c1bb06..24cdecb7341 100644 --- a/innobase/include/srv0start.h +++ b/innobase/include/srv0start.h @@ -79,6 +79,8 @@ innobase_shutdown_for_mysql(void); /*=============================*/ /* out: DB_SUCCESS or error code */ +extern ulint srv_sizeof_trx_t_in_ha_innodb_cc; + extern ibool srv_startup_is_before_trx_rollback_phase; extern ibool srv_is_being_shut_down; diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index d6d610bb5b8..cad946b1e54 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -56,6 +56,8 @@ Created 2/16/1996 Heikki Tuuri #include "srv0start.h" #include "que0que.h" +ulint srv_sizeof_trx_t_in_ha_innodb_cc; + ibool srv_startup_is_before_trx_rollback_phase = FALSE; ibool srv_is_being_started = FALSE; ibool srv_was_started = FALSE; @@ -960,6 +962,15 @@ innobase_start_or_create_for_mysql(void) "InnoDB: !!!!!!!!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!!!!!!!\n"); #endif + if (srv_sizeof_trx_t_in_ha_innodb_cc != (ulint)sizeof(trx_t)) { + fprintf(stderr, + "InnoDB: Error: trx_t size is %lu in ha_innodb.cc but %lu in srv0start.c\n" + "InnoDB: Check that pthread_mutex_t is defined in the same way in these\n" + "InnoDB: compilation modules. Cannot continue.\n", + srv_sizeof_trx_t_in_ha_innodb_cc, (ulint)sizeof(trx_t)); + return(DB_ERROR); + } + log_do_write = TRUE; /* yydebug = TRUE; */ diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 79c85985f23..b849bbb76b2 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -747,6 +747,14 @@ innobase_init(void) default_charset_info->sort_order, 256); } + /* Since we in this module access directly the fields of a trx + struct, and due to different headers and flags it might happen that + mutex_t has a different size in this module and in InnoDB + modules, we check at run time that the size is the same in + these compilation modules. */ + + srv_sizeof_trx_t_in_ha_innodb_cc = sizeof(trx_t); + err = innobase_start_or_create_for_mysql(); if (err != DB_SUCCESS) { From 7ff18489f931c1dd47bee8e569dfd82d18b00182 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 14:58:05 +0400 Subject: [PATCH 032/246] discard superflous os2/Makefile in dependence list.. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index f007d511865..11b207da5fe 100644 --- a/configure.in +++ b/configure.in @@ -2417,7 +2417,7 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile \ os2/Makefile os2/include/Makefile os2/include/sys/Makefile \ man/Makefile BUILD/Makefile readline/Makefile vio/Makefile \ libmysql_r/Makefile libmysqld/Makefile libmysqld/examples/Makefile \ - libmysql/Makefile client/Makefile os2/Makefile \ + libmysql/Makefile client/Makefile \ pstack/Makefile pstack/aout/Makefile sql/Makefile sql/share/Makefile \ merge/Makefile dbug/Makefile scripts/Makefile \ include/Makefile sql-bench/Makefile tools/Makefile \ From 0bd1b796915a84884ea637b6382b37961903543f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Oct 2002 13:56:25 +0100 Subject: [PATCH 033/246] - Do-compile: added a fast test run with dynamic-row tables - Do-compile: fix small (cosmetical, not critical) typo Build-tools/Do-compile: - added a fast test run with dynamic-row tables - fix small (cosmetical, not critical) typo --- Build-tools/Do-compile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index a29bd99191d..367911bb252 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -381,13 +381,15 @@ if ($opt_stage <= 9 && !$opt_no_test) log_system("rm -f output/*"); $tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : ""; check_system("perl ./run-all-tests --log --die-on-errors $connect_option $tmp","RUN-mysql"); + # Run additional fast test with dynamic-row tables + check_system("perl ./run-all-tests --log --suffix=\"_dynamic_rows\" --die-on-errors $connect_option --fast --user=root --small-test --create-options=\"row_format=dynamic\"","RUN-mysql"); if ($opt_innodb) { - check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-option=\"type=innodb\"","RUN-mysql"); + check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-options=\"type=innodb\"","RUN-mysql"); } if ($opt_bdb) { - check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-option=\"type=bdb\"","RUN-mysql"); + check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql"); } } From 54ebb4175bc98d1ba2ca0e72abd83150d722ce8a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 1 Nov 2002 11:30:19 +0200 Subject: [PATCH 034/246] Remove warnings/errors on Solaris when doing automake (Has to be properly fixed at some point) --- mysys/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 98f9e13c778..9fea00e23e8 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -55,11 +55,11 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c\ EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ thr_mutex.c thr_rwlock.c libmysys_a_LIBADD = @THREAD_LOBJECTS@ -# test_fn removed 980815 since it not upp to date test_dir -noinst_PROGRAMS = test_charset @THREAD_LPROGRAMS@ +# test_fn removed 980815 since it not up to date test_dir +noinst_PROGRAMS = @THREAD_LPROGRAMS@ # test_dir_DEPENDENCIES= $(LIBRARIES) # testhash_DEPENDENCIES= $(LIBRARIES) -test_charset_DEPENDENCIES= $(LIBRARIES) +# test_charset_DEPENDENCIES= $(LIBRARIES) EXTRA_PROGRAMS = DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ From 646ae53f8a8715c1a8d66de4696a101df7bc3924 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 2 Nov 2002 16:10:53 +0200 Subject: [PATCH 035/246] Added test case for the last fix --- mysql-test/r/func_test.result | 4 ++++ mysql-test/t/func_test.test | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 586e345ea10..da82567db4d 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -26,6 +26,10 @@ 1 1 1 -1.49 or -1.49 0.6 or 0.6 1 1 +start ctime1 ctime2 +2002-11-04 00:00:00 20021029165106 20021105164731 +start ctime1 ctime2 +2002-11-04 00:00:00 20021029165106 20021105164731 5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1 0 1 1 and 2 between 2 and 10 2 between 2 and 10 and 1 diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index ec44009b1a6..ccbb531e2e6 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -15,6 +15,16 @@ select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between select 'b' between 'a' and 'c', 'B' between 'a' and 'c'; select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,1.0); select -1.49 or -1.49,0.6 or 0.6; +drop table if exists t1,t2; +CREATE TABLE t1 ( start datetime default NULL) TYPE=MyISAM; +INSERT INTO t1 VALUES ('2002-10-21 00:00:00'); +INSERT INTO t1 VALUES ('2002-10-28 00:00:00'); +INSERT INTO t1 VALUES ('2002-11-04 00:00:00'); +CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL) TYPE=MyISAM; +INSERT INTO t2 VALUES (20021029165106,20021105164731); +select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; +select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; +drop table if exists t1,t2; # # Wrong usage of functions From 195aa6c98f94254b33b3d2423833275485de6eca Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 2 Nov 2002 20:35:32 +0100 Subject: [PATCH 036/246] fixed a bug where "MATCH ... AGAINST () >=0" was treated as if it was > --- sql/sql_select.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 49502a7a116..0c3c19c6e69 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1371,15 +1371,15 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, *arg1=(Item_func *)(func->arguments()[1]); if ((functype == Item_func::GE_FUNC || functype == Item_func::GT_FUNC) && - arg0->type() == Item::FUNC_ITEM && + arg0->type() == Item::FUNC_ITEM && arg0->functype() == Item_func::FT_FUNC && - arg1->const_item() && arg1->val()>=0) + arg1->const_item() && arg1->val()>0) cond_func=(Item_func_match *) arg0; else if ((functype == Item_func::LE_FUNC || functype == Item_func::LT_FUNC) && arg1->type() == Item::FUNC_ITEM && arg1->functype() == Item_func::FT_FUNC && - arg0->const_item() && arg0->val()>=0) + arg0->const_item() && arg0->val()>0) cond_func=(Item_func_match *) arg1; } } From 0a5ed3de92c42928e03251ec87dfd1039cccb0b6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 00:04:36 +0200 Subject: [PATCH 037/246] Fix to get core file on Linux Docs/manual.texi: ChangeLog sql/mysqld.cc: Write info about writing core file to stderr --- BUILD/compile-pentium-valgrind-max | 13 +++++++++++++ Docs/manual.texi | 2 ++ sql/mysqld.cc | 4 ++++ sql/stacktrace.c | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 BUILD/compile-pentium-valgrind-max diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max new file mode 100755 index 00000000000..d58ee723aee --- /dev/null +++ b/BUILD/compile-pentium-valgrind-max @@ -0,0 +1,13 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$pentium_cflags $debug_cflags -DHAVE_purify" +c_warnings="$c_warnings $debug_extra_warnings" +cxx_warnings="$cxx_warnings $debug_extra_warnings" +extra_configs="$pentium_configs $debug_configs" + +extra_configs="$extra_configs" + +. "$path/FINISH.sh" diff --git a/Docs/manual.texi b/Docs/manual.texi index 2314c51a92a..7291abae07e 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -46930,6 +46930,8 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.54 @itemize @item +Fixed that @code{--core-file} works on Linux (at least on kernel 2.4.18). +@item Fixed a problem with BDB and @code{ALTER TABLE}. @item Fixed reference to freed memory when doing complicated @code{GROUP BY diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f7be5525e34..71b832f24f4 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1326,7 +1326,11 @@ information that should help you find out what is causing the crash\n"); #endif /* HAVE_STACKTRACE */ if (test_flags & TEST_CORE_ON_SIGNAL) + { + fprintf(stderr, "Writing a core file\n"); + fflush(stderr); write_core(sig); + } exit(1); } diff --git a/sql/stacktrace.c b/sql/stacktrace.c index f4415571f1b..d5711bcd78e 100644 --- a/sql/stacktrace.c +++ b/sql/stacktrace.c @@ -206,7 +206,7 @@ resolve it\n"); /* Produce a core for the thread */ -#ifdef HAVE_LINUXTHREADS +#ifdef NOT_USED /* HAVE_LINUXTHREADS */ void write_core(int sig) { signal(sig, SIG_DFL); From 94cbd46aa5074f59c103d1474213e776eeafde96 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 00:24:59 +0200 Subject: [PATCH 038/246] Removed wrong bug fix for problem with timestamp and BETWEEN. Will be properly fixed in 4.1 and 5.0 sql/field.h: Removed wrong (not used code) sql/item_cmpfunc.cc: Removed wrong bug fix for problem with timestamp and BETWEEN. --- sql/field.h | 1 - sql/item_cmpfunc.cc | 1 - 2 files changed, 2 deletions(-) diff --git a/sql/field.h b/sql/field.h index 92e098c75c4..e822f6a71d6 100644 --- a/sql/field.h +++ b/sql/field.h @@ -533,7 +533,6 @@ public: enum Item_result result_type () const { return field_length == 8 || field_length == 14 ? INT_RESULT : STRING_RESULT; } enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } - enum Item_result cmp_type () const { return INT_RESULT; } void store(const char *to,uint length); void store(double nr); void store(longlong nr); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 4650b770299..36ecde337a7 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -354,7 +354,6 @@ void Item_func_between::fix_length_and_dec() if (args[0]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[0])->field; - cmp_type=field->cmp_type(); if (field->store_for_compare()) { if (convert_constant_item(field,&args[1])) From 3fbb70294662f3bc604c68d25d44d802c9835c8e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 00:00:51 +0100 Subject: [PATCH 039/246] TEMPORARY MERGE tables are allowed --- mysql-test/r/merge.result | 6 ++++++ mysql-test/t/merge.test | 19 +++++++++++++++++++ sql/ha_myisammrg.cc | 23 ++++++++++++++++++++++- 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 653e25af799..bdde202b335 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -130,3 +130,9 @@ a a b 1 1 1 2 +a +1 +2 +a +1 +2 diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 238dd599664..6ea9ecc269f 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -114,3 +114,22 @@ insert into t2 values (1,1),(2,2),(0,0),(4,4),(5,5),(6,6); flush tables; select * from t3 where a=1 order by b limit 2; drop table t3,t1,t2; + +# +# temporary merge tables +# +drop table if exists t1, t2, t3, t4, t5, t6; +create table t1 (a int not null); +create table t2 (a int not null); +insert into t1 values (1); +insert into t2 values (2); +create temporary table t3 (a int not null) TYPE=MERGE UNION=(t1,t2); +select * from t3; +create temporary table t4 (a int not null); +create temporary table t5 (a int not null); +insert into t4 values (1); +insert into t5 values (2); +create temporary table t6 (a int not null) TYPE=MERGE UNION=(t4,t5); +select * from t6; +drop table if exists t1, t2, t3, t4, t5, t6; + diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index e5fb0310a36..e9b6a048264 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -264,7 +264,28 @@ int ha_myisammrg::create(const char *name, register TABLE *form, sizeof(char*)))) DBUG_RETURN(1); for (pos=table_names ; tables ; tables=tables->next) - *pos++= tables->real_name; + { + char *table_name; + if (create_info->options & HA_LEX_CREATE_TMP_TABLE) + { + TABLE **tbl=find_temporary_table(current_thd, + tables->db, tables->real_name); + if (!tbl) + { + table_name=sql_alloc(1+ + my_snprintf(buff,FN_REFLEN,"%s/%s/%s",mysql_real_data_home, + tables->db, tables->real_name)); + if (!table_name) + DBUG_RETURN(1); + strcpy(table_name, buff); + } + else + table_name=(*tbl)->path; + } + else + table_name=tables->real_name; + *pos++= table_name; + } *pos=0; DBUG_RETURN(myrg_create(fn_format(buff,name,"","",2+4+16), (const char **) table_names, (my_bool) 0)); From 69a5dd196cc89c690b3531b75bb77f9c4a048b50 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 12:05:58 +0400 Subject: [PATCH 040/246] Error code for ssl connection Fix bug when server hang(with SSL, with modified libmysql) Add options master-ssl-capath and master-ssl-cipher Add some error checking(SSL) include/errmsg.h: Error code for SSL connection include/violite.h: Change return value in sslaccept Remove unused variable open_ libmysql/errmsg.c: Add client side descriptive message when ssl handshake fail libmysql/libmysql.c: Add ssl error code Add proper error checking sql/mysqld.cc: Add options master-ssl-capath and master-ssl-cipher sql/sql_parse.cc: Add error checking after sslaccept vio/viossl.c: Add ssl handshake error cheking vio/viosslfactories.c: Change error description when using wrong key or certificate --- include/errmsg.h | 1 + include/violite.h | 3 +-- libmysql/errmsg.c | 9 ++++++--- libmysql/libmysql.c | 13 +++++++----- sql/mysqld.cc | 15 +++++++++++--- sql/sql_parse.cc | 8 +++++++- vio/viossl.c | 46 +++++++++++++++++++++++++++++++++---------- vio/viosslfactories.c | 6 ++++++ 8 files changed, 77 insertions(+), 24 deletions(-) diff --git a/include/errmsg.h b/include/errmsg.h index 76a57f47611..842d53c9303 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -61,3 +61,4 @@ extern const char *client_errors[]; /* Error messages */ #define CR_PROBE_SLAVE_HOSTS 2023 #define CR_PROBE_SLAVE_CONNECT 2024 #define CR_PROBE_MASTER_CONNECT 2025 +#define CR_SSL_CONNECTION_ERROR 2026 diff --git a/include/violite.h b/include/violite.h index f4f40dcb64b..6c8ad1f4b69 100644 --- a/include/violite.h +++ b/include/violite.h @@ -174,7 +174,7 @@ struct st_VioSSLConnectorFd SSL_METHOD* ssl_method_; }; -void sslaccept(struct st_VioSSLAcceptorFd*, Vio*, long timeout); +int sslaccept(struct st_VioSSLAcceptorFd*, Vio*, long timeout); int sslconnect(struct st_VioSSLConnectorFd*, Vio*, long timeout); struct st_VioSSLConnectorFd @@ -231,7 +231,6 @@ struct st_vio #ifdef HAVE_OPENSSL SSL* ssl_; - my_bool open_; #endif /* HAVE_OPENSSL */ #endif /* HAVE_VIO */ }; diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c index 3fdb9c0ddc6..47d19281a04 100644 --- a/libmysql/errmsg.c +++ b/libmysql/errmsg.c @@ -49,7 +49,8 @@ const char *client_errors[]= "Error on SHOW SLAVE STATUS:", "Error on SHOW SLAVE HOSTS:", "Error connecting to slave:", - "Error connecting to master:" + "Error connecting to master:", + "SSL connection error" }; /* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */ @@ -82,7 +83,8 @@ const char *client_errors[]= "Error on SHOW SLAVE STATUS:", "Error on SHOW SLAVE HOSTS:", "Error connecting to slave:", - "Error connecting to master:" + "Error connecting to master:", + "SSL connection error" }; #else /* ENGLISH */ @@ -113,7 +115,8 @@ const char *client_errors[]= "Error on SHOW SLAVE STATUS:", "Error on SHOW SLAVE HOSTS:", "Error connecting to slave:", - "Error connecting to master:" + "Error connecting to master:", + "SSL connection error" }; #endif diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index c1d8dd6283f..c9fb2f84a3c 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1872,15 +1872,18 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, options->ssl_capath, options->ssl_cipher))) { - /* TODO: Change to SSL error */ - net->last_errno= CR_SERVER_LOST; + net->last_errno= CR_SSL_CONNECTION_ERROR; strmov(net->last_error,ER(net->last_errno)); goto error; } DBUG_PRINT("info", ("IO layer change in progress...")); - /* TODO: Add proper error checking here, with return error message */ - sslconnect((struct st_VioSSLConnectorFd*)(mysql->connector_fd), - mysql->net.vio, (long) (mysql->options.connect_timeout)); + if(sslconnect((struct st_VioSSLConnectorFd*)(mysql->connector_fd), + mysql->net.vio, (long) (mysql->options.connect_timeout))) + { + net->last_errno= CR_SSL_CONNECTION_ERROR; + strmov(net->last_error,ER(net->last_errno)); + goto error; + } DBUG_PRINT("info", ("IO layer change done!")); } #endif /* HAVE_OPENSSL */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ebc6100a71b..ed10a8535c9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -339,7 +339,7 @@ volatile ulong cached_thread_count=0; my_string master_user = (char*) "test", master_password = 0, master_host=0, master_info_file = (char*) "master.info", relay_log_info_file = (char*) "relay-log.info", - master_ssl_key=0, master_ssl_cert=0; + master_ssl_key=0, master_ssl_cert=0, master_ssl_capath=0, master_ssl_cipher=0; my_string report_user = 0, report_password = 0, report_host=0; const char *localhost=LOCAL_HOST; @@ -2814,8 +2814,9 @@ enum options { OPT_MASTER_PASSWORD, OPT_MASTER_PORT, OPT_MASTER_INFO_FILE, OPT_MASTER_CONNECT_RETRY, OPT_MASTER_RETRY_COUNT, - OPT_MASTER_SSL, OPT_MASTER_SSL_KEY, - OPT_MASTER_SSL_CERT, + OPT_MASTER_SSL, OPT_MASTER_SSL_KEY, + OPT_MASTER_SSL_CERT, OPT_MASTER_SSL_CAPATH, + OPT_MASTER_SSL_CIPHER, OPT_SQL_BIN_UPDATE_SAME, OPT_REPLICATE_DO_DB, OPT_REPLICATE_IGNORE_DB, OPT_LOG_SLAVE_UPDATES, OPT_BINLOG_DO_DB, OPT_BINLOG_IGNORE_DB, @@ -3124,6 +3125,14 @@ struct my_option my_long_options[] = "Master SSL certificate file name. Only applies if you have enabled master-ssl.", (gptr*) &master_ssl_cert, (gptr*) &master_ssl_cert, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, + {"master-ssl-capath", OPT_MASTER_SSL_CAPATH, + "Master SSL CA path. Only applies if you have enabled master-ssl.", + (gptr*) &master_ssl_capath, (gptr*) &master_ssl_capath, 0, GET_STR, OPT_ARG, + 0, 0, 0, 0, 0, 0}, + {"master-ssl-cipher", OPT_MASTER_SSL_CIPHER, + "Master SSL cipher. Only applies if you have enabled master-ssl.", + (gptr*) &master_ssl_cipher, (gptr*) &master_ssl_capath, 0, GET_STR, OPT_ARG, + 0, 0, 0, 0, 0, 0}, {"myisam-recover", OPT_MYISAM_RECOVER, "Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP or FORCE.", (gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0, diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index bdc6ab16a0e..2e718dd8d6a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -554,7 +554,13 @@ check_connections(THD *thd) { /* Do the SSL layering. */ DBUG_PRINT("info", ("IO layer change in progress...")); - sslaccept(ssl_acceptor_fd, net->vio, thd->variables.net_wait_timeout); + if (sslaccept(ssl_acceptor_fd, net->vio, thd->variables.net_wait_timeout)) + { + DBUG_PRINT("error", ("Failed to read user information (pkt_len= %lu)", + pkt_len)); + inc_host_errors(&thd->remote.sin_addr); + return(ER_HANDSHAKE_ERROR); + } DBUG_PRINT("info", ("Reading user information over SSL layer")); if ((pkt_len=my_net_read(net)) == packet_error || pkt_len < NORMAL_HANDSHAKE_SIZE) diff --git a/vio/viossl.c b/vio/viossl.c index 56d3da8a1ac..cf1c98b5382 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -249,35 +249,48 @@ void vio_ssl_in_addr(Vio *vio, struct in_addr *in) /* - TODO: Add documentation and error handling + TODO: Add documentation */ -void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout) +int sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout) { char *str; char buf[1024]; X509* client_cert; my_bool unused; + my_bool net_blocking; + enum enum_vio_type old_type; DBUG_ENTER("sslaccept"); DBUG_PRINT("enter", ("sd=%d ptr=%p", vio->sd,ptr)); + old_type= vio->type; + net_blocking = vio_is_blocking(vio); vio_blocking(vio, 1, &unused); /* Must be called before reset */ vio_reset(vio,VIO_TYPE_SSL,vio->sd,0,FALSE); vio->ssl_=0; - vio->open_=FALSE; if (!(vio->ssl_ = SSL_new(ptr->ssl_context_))) { DBUG_PRINT("error", ("SSL_new failure")); report_errors(); - DBUG_VOID_RETURN; + vio_reset(vio, old_type,vio->sd,0,FALSE); + vio_blocking(vio, net_blocking, &unused); + DBUG_RETURN(1); } DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout)); SSL_clear(vio->ssl_); SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout); SSL_set_fd(vio->ssl_,vio->sd); SSL_set_accept_state(vio->ssl_); - SSL_do_handshake(vio->ssl_); - vio->open_ = TRUE; + if (SSL_do_handshake(vio->ssl_) < 1) + { + DBUG_PRINT("error", ("SSL_do_handshake failure")); + report_errors(); + SSL_free(vio->ssl_); + vio->ssl_=0; + vio_reset(vio, old_type,vio->sd,0,FALSE); + vio_blocking(vio, net_blocking, &unused); + DBUG_RETURN(1); + } #ifndef DBUF_OFF DBUG_PRINT("info",("SSL_get_cipher_name() = '%s'" ,SSL_get_cipher_name(vio->ssl_))); @@ -309,7 +322,7 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout) } #endif - DBUG_VOID_RETURN; + DBUG_RETURN(0); } @@ -318,17 +331,22 @@ int sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout) char *str; X509* server_cert; my_bool unused; + my_bool net_blocking; + enum enum_vio_type old_type; DBUG_ENTER("sslconnect"); DBUG_PRINT("enter", ("sd=%d ptr=%p ctx: %p", vio->sd,ptr,ptr->ssl_context_)); + old_type= vio->type; + net_blocking = vio_is_blocking(vio); vio_blocking(vio, 1, &unused); /* Must be called before reset */ vio_reset(vio,VIO_TYPE_SSL,vio->sd,0,FALSE); vio->ssl_=0; - vio->open_=FALSE; if (!(vio->ssl_ = SSL_new(ptr->ssl_context_))) { DBUG_PRINT("error", ("SSL_new failure")); report_errors(); + vio_reset(vio, old_type,vio->sd,0,FALSE); + vio_blocking(vio, net_blocking, &unused); DBUG_RETURN(1); } DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout)); @@ -336,8 +354,16 @@ int sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout) SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout); SSL_set_fd (vio->ssl_, vio->sd); SSL_set_connect_state(vio->ssl_); - SSL_do_handshake(vio->ssl_); - vio->open_ = TRUE; + if (SSL_do_handshake(vio->ssl_) < 1) + { + DBUG_PRINT("error", ("SSL_do_handshake failure")); + report_errors(); + SSL_free(vio->ssl_); + vio->ssl_=0; + vio_reset(vio, old_type,vio->sd,0,FALSE); + vio_blocking(vio, net_blocking, &unused); + DBUG_RETURN(1); + } #ifndef DBUG_OFF DBUG_PRINT("info",("SSL_get_cipher_name() = '%s'" ,SSL_get_cipher_name(vio->ssl_))); diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 9e7a1475951..31bc457d1ae 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -93,7 +93,10 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) { DBUG_PRINT("error",("unable to get certificate from '%s'\n",cert_file)); /* FIX stderr */ + fprintf(stderr,"Error when connection to server using SSL:"); ERR_print_errors_fp(stderr); + fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file); + fflush(stderr); DBUG_RETURN(0); } if (key_file == NULL) @@ -103,7 +106,10 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file) { DBUG_PRINT("error", ("unable to get private key from '%s'\n",key_file)); /* FIX stderr */ + fprintf(stderr,"Error when connection to server using SSL:"); ERR_print_errors_fp(stderr); + fprintf(stderr,"Unable to get private key from '%s'\n", cert_file); + fflush(stderr); DBUG_RETURN(0); } From 7675eafe155a67567c37d1e955d70eb2e80bad0e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 15:15:56 +0100 Subject: [PATCH 041/246] DBUG_ENTER/RETURN tags added perl script to tag all the functions in a C/C++ file automatically sql/opt_range.cc: DBUG_ENTER/RETURN tags added sql/sql_select.cc: DBUG_ENTER/RETURN tags added --- dbug/dbug_add_tags.pl | 74 +++++ sql/opt_range.cc | 350 +++++++++++++++-------- sql/sql_select.cc | 633 ++++++++++++++++++++++++++---------------- 3 files changed, 709 insertions(+), 348 deletions(-) create mode 100755 dbug/dbug_add_tags.pl diff --git a/dbug/dbug_add_tags.pl b/dbug/dbug_add_tags.pl new file mode 100755 index 00000000000..a376fdb2f59 --- /dev/null +++ b/dbug/dbug_add_tags.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl + +die "No files specified\n" unless $ARGV[0]; + +$ctags="exctags -x -f - --c-types=f -u"; + +sub get_tag { + local $_=; + ($symbol, $line)= /^(.*\S)\s+function\s+(\d+)/; + $symbol=$1 if /\s(\S+)\s*\(/; + $line=1e50 unless $line; +} + +while($src=shift) +{ + warn "==> $src\n"; + + $dst=$src.$$; + open(TAGS, "$ctags $src|") || die "Cannot exec('$ctags $src'): $!"; + open(SRC, "<$src") || die "Cannot open $src: $!"; + open(DST, ">$dst") || die "Cannot create $dst: $!"; + select DST; + + &get_tag; + $in_func=0; + while() + { + my $orig=$_; + if ($in_func) + { + if (/\breturn\b/ && !/\/\*.*\breturn\b.*\*\// && !/;/ ) + { + $_.= until /;/; + } + s/(?<=\s)return\s*;/DBUG_VOID_RETURN;/; + s/(?<=\s)return\s*(.+)\s*;/DBUG_RETURN(\1);/s; + $ret_line=$. if /DBUG_(VOID_)?RETURN/; #{{ + print "$tab DBUG_VOID_RETURN;\n" if /^$tab}/ && $ret_line < $.-1; + $in_func=0 if /^$tab}/; + warn "$src:".($.-1)."\t$orig" if /\breturn\b/; + } + print; + next if /DBUG_ENTER/; + next if $. < $line; + die "Something wrong: \$.=$., \$line=$line, \$symbol=$symbol\n" if $. > $line; + &get_tag && next if /^\s*inline /; + print $_= until /{/; $tab=$`; + &get_tag && next if /}/; # skip one-liners + $semicolon=1; + while() + { + $skip=!$semicolon; + $semicolon= /;\s*$/; + print && next if $skip || + (/^\s+\w+((::\w+)?|<\w+>)\s+\**\w+/ && !/^\s*return/); + last if /DBUG_ENTER/; + print "$tab DBUG_ENTER(\"$symbol\");\n"; + print "\n" unless $_ eq "\n"; + last; + } + $in_func=1; + &get_tag; + redo; + } + close SRC; + close DST; + close TAGS; + unlink("$src.orig"); + rename($src, "$src.orig") || die "Cannot rename $src to $src.orig: $!"; + rename($dst, $src) || die "Cannot rename $dst to $src: $!"; +} + +warn "All done!\n"; + diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 181d97ceacc..4a3b3f4bbfa 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -100,6 +100,8 @@ public: { // Get overlapping range char *new_min,*new_max; uint8 flag_min,flag_max; + DBUG_ENTER("*clone_and"); + if (cmp_min_to_min(arg) >= 0) { new_min=min_value; flag_min=min_flag; @@ -116,64 +118,83 @@ public: { new_max=arg->max_value; flag_max=arg->max_flag; } - return new SEL_ARG(field, part, new_min, new_max, flag_min, flag_max, - test(maybe_flag && arg->maybe_flag)); + DBUG_RETURN(new SEL_ARG(field, part, new_min, new_max, flag_min, flag_max, + test(maybe_flag && arg->maybe_flag))); } SEL_ARG *clone_first(SEL_ARG *arg) { // min <= X < arg->min - return new SEL_ARG(field,part, min_value, arg->min_value, + DBUG_ENTER("*clone_first"); + + DBUG_RETURN(new SEL_ARG(field,part, min_value, arg->min_value, min_flag, arg->min_flag & NEAR_MIN ? 0 : NEAR_MAX, - maybe_flag | arg->maybe_flag); + maybe_flag | arg->maybe_flag)); } SEL_ARG *clone_last(SEL_ARG *arg) { // min <= X <= key_max - return new SEL_ARG(field, part, min_value, arg->max_value, - min_flag, arg->max_flag, maybe_flag | arg->maybe_flag); + DBUG_ENTER("*clone_last"); + + DBUG_RETURN(new SEL_ARG(field, part, min_value, arg->max_value, + min_flag, arg->max_flag, maybe_flag | arg->maybe_flag)); } SEL_ARG *clone(SEL_ARG *new_parent,SEL_ARG **next); bool copy_min(SEL_ARG* arg) { // Get overlapping range + DBUG_ENTER("copy_min"); + if (cmp_min_to_min(arg) > 0) { min_value=arg->min_value; min_flag=arg->min_flag; if ((max_flag & (NO_MAX_RANGE | NO_MIN_RANGE)) == (NO_MAX_RANGE | NO_MIN_RANGE)) - return 1; // Full range + DBUG_RETURN(1); // Full range } maybe_flag|=arg->maybe_flag; - return 0; + DBUG_RETURN(0); } bool copy_max(SEL_ARG* arg) { // Get overlapping range + DBUG_ENTER("copy_max"); + if (cmp_max_to_max(arg) <= 0) { max_value=arg->max_value; max_flag=arg->max_flag; if ((max_flag & (NO_MAX_RANGE | NO_MIN_RANGE)) == (NO_MAX_RANGE | NO_MIN_RANGE)) - return 1; // Full range + DBUG_RETURN(1); // Full range } maybe_flag|=arg->maybe_flag; - return 0; + DBUG_RETURN(0); } void copy_min_to_min(SEL_ARG *arg) { + DBUG_ENTER("copy_min_to_min"); + min_value=arg->min_value; min_flag=arg->min_flag; + DBUG_VOID_RETURN; } void copy_min_to_max(SEL_ARG *arg) { + DBUG_ENTER("copy_min_to_max"); + max_value=arg->min_value; max_flag=arg->min_flag & NEAR_MIN ? 0 : NEAR_MAX; + DBUG_VOID_RETURN; } void copy_max_to_min(SEL_ARG *arg) { + DBUG_ENTER("copy_max_to_min"); + min_value=arg->max_value; min_flag=arg->max_flag & NEAR_MAX ? 0 : NEAR_MIN; + DBUG_VOID_RETURN; } void store(uint length,char **min_key,uint min_key_flag, char **max_key, uint max_key_flag) { + DBUG_ENTER("store"); + if (!(min_flag & NO_MIN_RANGE) && !(min_key_flag & (NO_MIN_RANGE | NEAR_MIN))) { @@ -198,11 +219,14 @@ public: memcpy(*max_key,max_value,length+(int) maybe_null); (*max_key)+= length+(int) maybe_null; } + DBUG_VOID_RETURN; } void store_min_key(KEY_PART *key,char **range_key, uint *range_key_flag) { SEL_ARG *key_tree= first(); + DBUG_ENTER("store_min_key"); + key_tree->store(key[key_tree->part].part_length, range_key,*range_key_flag,range_key,NO_MAX_RANGE); *range_key_flag|= key_tree->min_flag; @@ -211,11 +235,14 @@ public: !(*range_key_flag & (NO_MIN_RANGE | NEAR_MIN)) && key_tree->next_key_part->type == SEL_ARG::KEY_RANGE) key_tree->next_key_part->store_min_key(key,range_key, range_key_flag); + DBUG_VOID_RETURN; } void store_max_key(KEY_PART *key,char **range_key, uint *range_key_flag) { SEL_ARG *key_tree= last(); + DBUG_ENTER("store_max_key"); + key_tree->store(key[key_tree->part].part_length, range_key, NO_MIN_RANGE, range_key,*range_key_flag); (*range_key_flag)|= key_tree->max_flag; @@ -224,6 +251,7 @@ public: !(*range_key_flag & (NO_MAX_RANGE | NEAR_MAX)) && key_tree->next_key_part->type == SEL_ARG::KEY_RANGE) key_tree->next_key_part->store_max_key(key,range_key, range_key_flag); + DBUG_VOID_RETURN; } SEL_ARG *insert(SEL_ARG *key); @@ -244,6 +272,8 @@ public: } void increment_use_count(long count) { + DBUG_ENTER("increment_use_count"); + if (next_key_part) { next_key_part->use_count+=count; @@ -252,15 +282,19 @@ public: if (pos->next_key_part) pos->increment_use_count(count); } + DBUG_VOID_RETURN; } void free_tree() { + DBUG_ENTER("free_tree"); + for (SEL_ARG *pos=first(); pos ; pos=pos->next) if (pos->next_key_part) { pos->next_key_part->use_count--; pos->next_key_part->free_tree(); } + DBUG_VOID_RETURN; } inline SEL_ARG **parent_ptr() @@ -369,17 +403,23 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables, SQL_SELECT::SQL_SELECT() :quick(0),cond(0),free_cond(0) { + DBUG_ENTER("SQL_SELECT::SQL_SELECT"); + quick_keys=0; needed_reg=0; my_b_clear(&file); + DBUG_VOID_RETURN; } SQL_SELECT::~SQL_SELECT() { delete quick; + DBUG_ENTER("SQL_SELECT::~SQL_SELECT"); + if (free_cond) delete cond; close_cached_file(&file); + DBUG_VOID_RETURN; } #undef index // Fix for Unixware 7 @@ -388,6 +428,8 @@ QUICK_SELECT::QUICK_SELECT(TABLE *table,uint key_nr,bool no_alloc) :dont_free(0),error(0),index(key_nr),max_used_key_length(0),head(table), it(ranges),range(0) { + DBUG_ENTER("QUICK_SELECT::QUICK_SELECT"); + if (!no_alloc) { init_sql_alloc(&alloc,1024,0); // Allocates everything here @@ -398,15 +440,19 @@ QUICK_SELECT::QUICK_SELECT(TABLE *table,uint key_nr,bool no_alloc) file=head->file; record=head->record[0]; init(); + DBUG_VOID_RETURN; } QUICK_SELECT::~QUICK_SELECT() { + DBUG_ENTER("QUICK_SELECT::~QUICK_SELECT"); + if (!dont_free) { file->index_end(); free_root(&alloc,MYF(0)); } + DBUG_VOID_RETURN; } QUICK_RANGE::QUICK_RANGE() @@ -416,6 +462,8 @@ QUICK_RANGE::QUICK_RANGE() SEL_ARG::SEL_ARG(SEL_ARG &arg) :Sql_alloc() { + DBUG_ENTER("SEL_ARG::SEL_ARG"); + type=arg.type; min_flag=arg.min_flag; max_flag=arg.max_flag; @@ -427,6 +475,7 @@ SEL_ARG::SEL_ARG(SEL_ARG &arg) :Sql_alloc() max_value=arg.max_value; next_key_part=arg.next_key_part; use_count=1; elements=1; + DBUG_VOID_RETURN; } @@ -444,7 +493,10 @@ SEL_ARG::SEL_ARG(Field *f,const char *min_value_arg,const char *max_value_arg) max_value((char*) max_value_arg), next(0),prev(0), next_key_part(0),color(BLACK),type(KEY_RANGE) { + DBUG_ENTER("SEL_ARG::SEL_ARG"); + left=right= &null_element; + DBUG_VOID_RETURN; } SEL_ARG::SEL_ARG(Field *field_,uint8 part_,char *min_value_,char *max_value_, @@ -454,12 +506,17 @@ SEL_ARG::SEL_ARG(Field *field_,uint8 part_,char *min_value_,char *max_value_, field(field_), min_value(min_value_), max_value(max_value_), next(0),prev(0),next_key_part(0),color(BLACK),type(KEY_RANGE) { + DBUG_ENTER("SEL_ARG::SEL_ARG"); + left=right= &null_element; + DBUG_VOID_RETURN; } SEL_ARG *SEL_ARG::clone(SEL_ARG *new_parent,SEL_ARG **next_arg) { SEL_ARG *tmp; + DBUG_ENTER("*SEL_ARG::clone"); + if (type != KEY_RANGE) { tmp=new SEL_ARG(type); @@ -484,27 +541,31 @@ SEL_ARG *SEL_ARG::clone(SEL_ARG *new_parent,SEL_ARG **next_arg) tmp->right=right->clone(tmp,next_arg); } increment_use_count(1); - return tmp; + DBUG_RETURN(tmp); } SEL_ARG *SEL_ARG::first() { SEL_ARG *next_arg=this; + DBUG_ENTER("*SEL_ARG::first"); + if (!next_arg->left) - return 0; // MAYBE_KEY + DBUG_RETURN(0); // MAYBE_KEY while (next_arg->left != &null_element) next_arg=next_arg->left; - return next_arg; + DBUG_RETURN(next_arg); } SEL_ARG *SEL_ARG::last() { SEL_ARG *next_arg=this; + DBUG_ENTER("*SEL_ARG::last"); + if (!next_arg->right) - return 0; // MAYBE_KEY + DBUG_RETURN(0); // MAYBE_KEY while (next_arg->right != &null_element) next_arg=next_arg->right; - return next_arg; + DBUG_RETURN(next_arg); } /* @@ -515,55 +576,59 @@ SEL_ARG *SEL_ARG::last() static int sel_cmp(Field *field, char *a,char *b,uint8 a_flag,uint8 b_flag) { int cmp; + DBUG_ENTER("sel_cmp"); + /* First check if there was a compare to a min or max element */ if (a_flag & (NO_MIN_RANGE | NO_MAX_RANGE)) { if ((a_flag & (NO_MIN_RANGE | NO_MAX_RANGE)) == (b_flag & (NO_MIN_RANGE | NO_MAX_RANGE))) - return 0; - return (a_flag & NO_MIN_RANGE) ? -1 : 1; + DBUG_RETURN(0); + DBUG_RETURN((a_flag & NO_MIN_RANGE) ? -1 : 1); } if (b_flag & (NO_MIN_RANGE | NO_MAX_RANGE)) - return (b_flag & NO_MIN_RANGE) ? 1 : -1; + DBUG_RETURN((b_flag & NO_MIN_RANGE) ? 1 : -1); if (field->real_maybe_null()) // If null is part of key { if (*a != *b) { - return *a ? -1 : 1; + DBUG_RETURN(*a ? -1 : 1); } if (*a) goto end; // NULL where equal a++; b++; // Skip NULL marker } cmp=field->key_cmp((byte*) a,(byte*) b); - if (cmp) return cmp < 0 ? -1 : 1; // The values differed + if (cmp) DBUG_RETURN(cmp < 0 ? -1 : 1); // The values differed // Check if the compared equal arguments was defined with open/closed range end: if (a_flag & (NEAR_MIN | NEAR_MAX)) { if ((a_flag & (NEAR_MIN | NEAR_MAX)) == (b_flag & (NEAR_MIN | NEAR_MAX))) - return 0; + DBUG_RETURN(0); if (!(b_flag & (NEAR_MIN | NEAR_MAX))) - return (a_flag & NEAR_MIN) ? 2 : -2; - return (a_flag & NEAR_MIN) ? 1 : -1; + DBUG_RETURN((a_flag & NEAR_MIN) ? 2 : -2); + DBUG_RETURN((a_flag & NEAR_MIN) ? 1 : -1); } if (b_flag & (NEAR_MIN | NEAR_MAX)) - return (b_flag & NEAR_MIN) ? -2 : 2; - return 0; // The elements where equal + DBUG_RETURN((b_flag & NEAR_MIN) ? -2 : 2); + DBUG_RETURN(0); // The elements where equal } SEL_ARG *SEL_ARG::clone_tree() { SEL_ARG tmp_link,*next_arg,*root; + DBUG_ENTER("*SEL_ARG::clone_tree"); + next_arg= &tmp_link; root=clone((SEL_ARG *) 0, &next_arg); next_arg->next=0; // Fix last link tmp_link.next->prev=0; // Fix first link root->use_count=0; - return root; + DBUG_RETURN(root); } /***************************************************************************** @@ -1102,6 +1167,7 @@ static bool like_range(const char *ptr,uint ptr_length,char escape, const char *end=ptr+ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; + DBUG_ENTER("like_range"); for (; ptr != end && min_str != min_end ; ptr++) { @@ -1125,7 +1191,7 @@ static bool like_range(const char *ptr,uint ptr_length,char escape, *min_str++ = ' '; // Because if key compression *max_str++ = max_sort_chr; } while (min_str != min_end); - return 0; + DBUG_RETURN(0); } *min_str++= *max_str++ = *ptr; } @@ -1137,7 +1203,7 @@ static bool like_range(const char *ptr,uint ptr_length,char escape, while (min_str != min_end) *min_str++ = *max_str++ = ' '; // Because if key compression - return 0; + DBUG_RETURN(0); } @@ -1162,11 +1228,12 @@ static SEL_ARG * sel_add(SEL_ARG *key1,SEL_ARG *key2) { SEL_ARG *root,**key_link; + DBUG_ENTER("sel_add"); if (!key1) - return key2; + DBUG_RETURN(key2); if (!key2) - return key1; + DBUG_RETURN(key1); key_link= &root; while (key1 && key2) @@ -1185,7 +1252,7 @@ sel_add(SEL_ARG *key1,SEL_ARG *key2) } } *key_link=key1 ? key1 : key2; - return root; + DBUG_RETURN(root); } #define CLONE_KEY1_MAYBE 1 @@ -1286,6 +1353,7 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) { SEL_ARG *next; ulong use_count=key1->use_count; + DBUG_ENTER("and_all_keys"); if (key1->elements != 1) { @@ -1315,9 +1383,9 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) next->next_key_part=key2; } if (!key1) - return &null_element; // Impossible ranges + DBUG_RETURN(&null_element); // Impossible ranges key1->use_count++; - return key1; + DBUG_RETURN(key1); } @@ -1325,10 +1393,12 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) static SEL_ARG * key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) { + DBUG_ENTER("key_and"); + if (!key1) - return key2; + DBUG_RETURN(key2); if (!key2) - return key1; + DBUG_RETURN(key1); if (key1->part != key2->part) { if (key1->part > key2->part) @@ -1340,7 +1410,7 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) key1->use_count--; if (key1->use_count > 0) key1=key1->clone_tree(); - return and_all_keys(key1,key2,clone_flag); + DBUG_RETURN(and_all_keys(key1,key2,clone_flag)); } if (((clone_flag & CLONE_KEY2_MAYBE) && @@ -1366,16 +1436,16 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) clone_flag); if (key1->next_key_part && key1->next_key_part->type == SEL_ARG::IMPOSSIBLE) - return key1; + DBUG_RETURN(key1); } else { key1->maybe_smaller(); if (key2->next_key_part) - return and_all_keys(key1,key2,clone_flag); + DBUG_RETURN(and_all_keys(key1,key2,clone_flag)); key2->use_count--; // Key2 doesn't have a tree } - return key1; + DBUG_RETURN(key1); } key1->use_count--; @@ -1414,32 +1484,36 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) key1->free_tree(); key2->free_tree(); if (!new_tree) - return &null_element; // Impossible range - return new_tree; + DBUG_RETURN(&null_element); // Impossible range + DBUG_RETURN(new_tree); } static bool get_range(SEL_ARG **e1,SEL_ARG **e2,SEL_ARG *root1) { + DBUG_ENTER("get_range"); + (*e1)=root1->find_range(*e2); // first e1->min < e2->min if ((*e1)->cmp_max_to_min(*e2) < 0) { if (!((*e1)=(*e1)->next)) - return 1; + DBUG_RETURN(1); if ((*e1)->cmp_min_to_max(*e2) > 0) { (*e2)=(*e2)->next; - return 1; + DBUG_RETURN(1); } } - return 0; + DBUG_RETURN(0); } static SEL_ARG * key_or(SEL_ARG *key1,SEL_ARG *key2) { + DBUG_ENTER("key_or"); + if (!key1) { if (key2) @@ -1447,13 +1521,13 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) key2->use_count--; key2->free_tree(); } - return 0; + DBUG_RETURN(0); } else if (!key2) { key1->use_count--; key1->free_tree(); - return 0; + DBUG_RETURN(0); } key1->use_count--; key2->use_count--; @@ -1462,7 +1536,7 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) { key1->free_tree(); key2->free_tree(); - return 0; // Can't optimize this + DBUG_RETURN(0); // Can't optimize this } // If one of the key is MAYBE_KEY then the found region may be bigger @@ -1470,13 +1544,13 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) { key2->free_tree(); key1->use_count++; - return key1; + DBUG_RETURN(key1); } if (key2->type == SEL_ARG::MAYBE_KEY) { key1->free_tree(); key2->use_count++; - return key2; + DBUG_RETURN(key2); } if (key1->use_count > 0) @@ -1541,8 +1615,8 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) tmp->max_flag & NO_MAX_RANGE) { if (key1->maybe_flag) - return new SEL_ARG(SEL_ARG::MAYBE_KEY); - return 0; + DBUG_RETURN(new SEL_ARG(SEL_ARG::MAYBE_KEY)); + DBUG_RETURN(0); } key2->increment_use_count(-1); // Free not used tree key2=key2->next; @@ -1588,8 +1662,8 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) for (; key2 ; key2=key2->next) key2->increment_use_count(-1); // Free not used tree if (key1->maybe_flag) - return new SEL_ARG(SEL_ARG::MAYBE_KEY); - return 0; + DBUG_RETURN(new SEL_ARG(SEL_ARG::MAYBE_KEY)); + DBUG_RETURN(0); } } key2=key2->next; @@ -1663,7 +1737,7 @@ end: key2=next; } key1->use_count++; - return key1; + DBUG_RETURN(key1); } @@ -1671,31 +1745,33 @@ end: static bool eq_tree(SEL_ARG* a,SEL_ARG *b) { + DBUG_ENTER("eq_tree"); + if (a == b) - return 1; + DBUG_RETURN(1); if (!a || !b || !a->is_same(b)) - return 0; + DBUG_RETURN(0); if (a->left != &null_element && b->left != &null_element) { if (!eq_tree(a->left,b->left)) - return 0; + DBUG_RETURN(0); } else if (a->left != &null_element || b->left != &null_element) - return 0; + DBUG_RETURN(0); if (a->right != &null_element && b->right != &null_element) { if (!eq_tree(a->right,b->right)) - return 0; + DBUG_RETURN(0); } else if (a->right != &null_element || b->right != &null_element) - return 0; + DBUG_RETURN(0); if (a->next_key_part != b->next_key_part) { // Sub range if (!a->next_key_part != !b->next_key_part || !eq_tree(a->next_key_part, b->next_key_part)) - return 0; + DBUG_RETURN(0); } - return 1; + DBUG_RETURN(1); } @@ -1703,6 +1779,7 @@ SEL_ARG * SEL_ARG::insert(SEL_ARG *key) { SEL_ARG *element,**par,*last_element; + DBUG_ENTER("SEL_ARG::insert"); LINT_INIT(par); LINT_INIT(last_element); for (element= this; element != &null_element ; ) @@ -1739,7 +1816,7 @@ SEL_ARG::insert(SEL_ARG *key) root->use_count=this->use_count; // copy root info root->elements= this->elements+1; root->maybe_flag=this->maybe_flag; - return root; + DBUG_RETURN(root); } @@ -1752,14 +1829,15 @@ SEL_ARG * SEL_ARG::find_range(SEL_ARG *key) { SEL_ARG *element=this,*found=0; + DBUG_ENTER("SEL_ARG::find_range"); for (;;) { if (element == &null_element) - return found; + DBUG_RETURN(found); int cmp=element->cmp_min_to_min(key); if (cmp == 0) - return element; + DBUG_RETURN(element); if (cmp < 0) { found=element; @@ -1768,6 +1846,7 @@ SEL_ARG::find_range(SEL_ARG *key) else element=element->left; } + DBUG_RETURN(NULL); // impossible } @@ -1781,6 +1860,8 @@ SEL_ARG::tree_delete(SEL_ARG *key) { enum leaf_color remove_color; SEL_ARG *root,*nod,**par,*fix_par; + DBUG_ENTER("SEL_ARG::tree_delete"); + root=this; this->parent= 0; /* Unlink from list */ @@ -1828,7 +1909,7 @@ SEL_ARG::tree_delete(SEL_ARG *key) } if (root == &null_element) - return 0; // Maybe root later + DBUG_RETURN(0); // Maybe root later if (remove_color == BLACK) root=rb_delete_fixup(root,nod,fix_par); test_rb_tree(root,root->parent); @@ -1836,7 +1917,7 @@ SEL_ARG::tree_delete(SEL_ARG *key) root->use_count=this->use_count; // Fix root counters root->elements=this->elements-1; root->maybe_flag=this->maybe_flag; - return root; + DBUG_RETURN(root); } @@ -1845,6 +1926,8 @@ SEL_ARG::tree_delete(SEL_ARG *key) static void left_rotate(SEL_ARG **root,SEL_ARG *leaf) { SEL_ARG *y=leaf->right; + DBUG_ENTER("left_rotate"); + leaf->right=y->left; if (y->left != &null_element) y->left->parent=leaf; @@ -1854,11 +1937,14 @@ static void left_rotate(SEL_ARG **root,SEL_ARG *leaf) *leaf->parent_ptr()=y; y->left=leaf; leaf->parent=y; + DBUG_VOID_RETURN; } static void right_rotate(SEL_ARG **root,SEL_ARG *leaf) { SEL_ARG *y=leaf->left; + DBUG_ENTER("right_rotate"); + leaf->left=y->right; if (y->right != &null_element) y->right->parent=leaf; @@ -1868,6 +1954,7 @@ static void right_rotate(SEL_ARG **root,SEL_ARG *leaf) *leaf->parent_ptr()=y; y->right=leaf; leaf->parent=y; + DBUG_VOID_RETURN; } @@ -1875,6 +1962,8 @@ SEL_ARG * SEL_ARG::rb_insert(SEL_ARG *leaf) { SEL_ARG *y,*par,*par2,*root; + DBUG_ENTER("SEL_ARG::rb_insert"); + root= this; root->parent= 0; leaf->color=RED; @@ -1929,13 +2018,15 @@ SEL_ARG::rb_insert(SEL_ARG *leaf) } root->color=BLACK; test_rb_tree(root,root->parent); - return root; + DBUG_RETURN(root); } SEL_ARG *rb_delete_fixup(SEL_ARG *root,SEL_ARG *key,SEL_ARG *par) { SEL_ARG *x,*w; + DBUG_ENTER("*rb_delete_fixup"); + root->parent=0; x= key; @@ -2008,7 +2099,7 @@ SEL_ARG *rb_delete_fixup(SEL_ARG *root,SEL_ARG *key,SEL_ARG *par) par=x->parent; } x->color=SEL_ARG::BLACK; - return root; + DBUG_RETURN(root); } @@ -2018,41 +2109,44 @@ SEL_ARG *rb_delete_fixup(SEL_ARG *root,SEL_ARG *key,SEL_ARG *par) int test_rb_tree(SEL_ARG *element,SEL_ARG *parent) { int count_l,count_r; + DBUG_ENTER("test_rb_tree"); if (element == &null_element) - return 0; // Found end of tree + DBUG_RETURN(0); // Found end of tree if (element->parent != parent) { sql_print_error("Wrong tree: Parent doesn't point at parent"); - return -1; + DBUG_RETURN(-1); } if (element->color == SEL_ARG::RED && (element->left->color == SEL_ARG::RED || element->right->color == SEL_ARG::RED)) { sql_print_error("Wrong tree: Found two red in a row"); - return -1; + DBUG_RETURN(-1); } if (element->left == element->right && element->left != &null_element) { // Dummy test sql_print_error("Wrong tree: Found right == left"); - return -1; + DBUG_RETURN(-1); } count_l=test_rb_tree(element->left,element); count_r=test_rb_tree(element->right,element); if (count_l >= 0 && count_r >= 0) { if (count_l == count_r) - return count_l+(element->color == SEL_ARG::BLACK); + DBUG_RETURN(count_l+(element->color == SEL_ARG::BLACK)); sql_print_error("Wrong tree: Incorrect black-count: %d - %d", count_l,count_r); } - return -1; // Error, no more warnings + DBUG_RETURN(-1); // Error, no more warnings } static ulong count_key_part_usage(SEL_ARG *root, SEL_ARG *key) { ulong count= 0; + DBUG_ENTER("count_key_part_usage"); + for (root=root->first(); root ; root=root->next) { if (root->next_key_part) @@ -2063,19 +2157,21 @@ static ulong count_key_part_usage(SEL_ARG *root, SEL_ARG *key) count+=count_key_part_usage(root->next_key_part,key); } } - return count; + DBUG_RETURN(count); } void SEL_ARG::test_use_count(SEL_ARG *root) { + DBUG_ENTER("SEL_ARG::test_use_count"); + if (this == root && use_count != 1) { sql_print_error("Use_count: Wrong count %lu for root",use_count); - return; + DBUG_VOID_RETURN; } if (this->type != SEL_ARG::KEY_RANGE) - return; + DBUG_VOID_RETURN; uint e_count=0; for (SEL_ARG *pos=first(); pos ; pos=pos->next) { @@ -2087,7 +2183,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root) { sql_print_error("Use_count: Wrong count for key at %lx, %lu should be %lu", pos,pos->next_key_part->use_count,count); - return; + DBUG_VOID_RETURN; } pos->next_key_part->test_use_count(root); } @@ -2095,6 +2191,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root) if (e_count != elements) sql_print_error("Wrong use count: %u for tree at %lx", e_count, (gptr) this); + DBUG_VOID_RETURN; } #endif @@ -2136,6 +2233,7 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree, uint max_key_flag) { ha_rows records=0,tmp; + DBUG_ENTER("check_quick_keys"); param->max_key_part=max(param->max_key_part,key_tree->part); if (key_tree->left != &null_element) @@ -2143,7 +2241,7 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree, records=check_quick_keys(param,idx,key_tree->left,min_key,min_key_flag, max_key,max_key_flag); if (records == HA_POS_ERROR) // Impossible - return records; + DBUG_RETURN(records); } uint tmp_min_flag,tmp_max_flag,keynr; @@ -2206,17 +2304,17 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree, HA_READ_BEFORE_KEY : HA_READ_AFTER_KEY)); end: if (tmp == HA_POS_ERROR) // Impossible range - return tmp; + DBUG_RETURN(tmp); records+=tmp; if (key_tree->right != &null_element) { tmp=check_quick_keys(param,idx,key_tree->right,min_key,min_key_flag, max_key,max_key_flag); if (tmp == HA_POS_ERROR) - return tmp; + DBUG_RETURN(tmp); records+=tmp; } - return records; + DBUG_RETURN(records); } @@ -2262,12 +2360,13 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key, { QUICK_RANGE *range; uint flag; + DBUG_ENTER("get_quick_keys"); if (key_tree->left != &null_element) { if (get_quick_keys(param,quick,key,key_tree->left, min_key,min_key_flag, max_key, max_key_flag)) - return 1; + DBUG_RETURN(1); } char *tmp_min_key=min_key,*tmp_max_key=max_key; key_tree->store(key[key_tree->part].part_length, @@ -2284,7 +2383,7 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key, if (get_quick_keys(param,quick,key,key_tree->next_key_part, tmp_min_key, min_key_flag | key_tree->min_flag, tmp_max_key, max_key_flag | key_tree->max_flag)) - return 1; + DBUG_RETURN(1); goto end; // Ugly, but efficient } { @@ -2342,15 +2441,15 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key, set_if_bigger(quick->max_used_key_length,range->min_length); set_if_bigger(quick->max_used_key_length,range->max_length); if (!range) // Not enough memory - return 1; + DBUG_RETURN(1); quick->ranges.push_back(range); end: if (key_tree->right != &null_element) - return get_quick_keys(param,quick,key,key_tree->right, + DBUG_RETURN(get_quick_keys(param,quick,key,key_tree->right, min_key,min_key_flag, - max_key,max_key_flag); - return 0; + max_key,max_key_flag)); + DBUG_RETURN(0); } /* @@ -2359,17 +2458,19 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key, bool QUICK_SELECT::unique_key_range() { + DBUG_ENTER("QUICK_SELECT::unique_key_range"); + if (ranges.elements == 1) { QUICK_RANGE *tmp; if (((tmp=ranges.head())->flag & (EQ_RANGE | NULL_RANGE)) == EQ_RANGE) { KEY *key=head->key_info+index; - return ((key->flags & HA_NOSAME) && - key->key_length == tmp->min_length); + DBUG_RETURN(((key->flags & HA_NOSAME) && + key->key_length == tmp->min_length)); } } - return 0; + DBUG_RETURN(0); } @@ -2377,6 +2478,8 @@ bool QUICK_SELECT::unique_key_range() static bool null_part_in_key(KEY_PART *key_part, const char *key, uint length) { + DBUG_ENTER("null_part_in_key"); + for (const char *end=key+length ; key < end; key+= key_part++->part_length) @@ -2384,10 +2487,10 @@ static bool null_part_in_key(KEY_PART *key_part, const char *key, uint length) if (key_part->null_bit) { if (*key++) - return 1; + DBUG_RETURN(1); } } - return 0; + DBUG_RETURN(0); } /**************************************************************************** @@ -2396,6 +2499,8 @@ static bool null_part_in_key(KEY_PART *key_part, const char *key, uint length) QUICK_SELECT *get_quick_select_for_ref(TABLE *table, TABLE_REF *ref) { + DBUG_ENTER("*get_quick_select_for_ref"); + table->file->index_end(); // Remove old cursor QUICK_SELECT *quick=new QUICK_SELECT(table, ref->key, 1); KEY *key_info = &table->key_info[ref->key]; @@ -2403,7 +2508,7 @@ QUICK_SELECT *get_quick_select_for_ref(TABLE *table, TABLE_REF *ref) uint part; if (!quick) - return 0; + DBUG_RETURN(0); QUICK_RANGE *range= new QUICK_RANGE(); if (!range || cp_buffer_from_ref(ref)) goto err; @@ -2426,11 +2531,11 @@ QUICK_SELECT *get_quick_select_for_ref(TABLE *table, TABLE_REF *ref) key_part->null_bit= key_info->key_part[part].null_bit; } if (!quick->ranges.push_back(range)) - return quick; + DBUG_RETURN(quick); err: delete quick; - return 0; + DBUG_RETURN(0); } /* get next possible record using quick-struct */ @@ -2491,6 +2596,7 @@ int QUICK_SELECT::get_next() } range=0; // To next range } + DBUG_RETURN(0); // impossible } /* compare if found key is over max-value */ @@ -2498,8 +2604,10 @@ int QUICK_SELECT::get_next() int QUICK_SELECT::cmp_next(QUICK_RANGE *range) { + DBUG_ENTER("QUICK_SELECT::cmp_next"); + if (range->flag & NO_MAX_RANGE) - return (0); /* key can't be to large */ + DBUG_RETURN((0)); /* key can't be to large */ KEY_PART *key_part=key_parts; for (char *key=range->max_key, *end=key+range->max_length; @@ -2512,18 +2620,18 @@ int QUICK_SELECT::cmp_next(QUICK_RANGE *range) if (*key++) { if (!key_part->field->is_null()) - return 1; + DBUG_RETURN(1); continue; } else if (key_part->field->is_null()) - return 0; + DBUG_RETURN(0); } if ((cmp=key_part->field->key_cmp((byte*) key, key_part->part_length)) < 0) - return 0; + DBUG_RETURN(0); if (cmp > 0) - return 1; + DBUG_RETURN(1); } - return (range->flag & NEAR_MAX) ? 1 : 0; // Exact match + DBUG_RETURN((range->flag & NEAR_MAX) ? 1 : 0); // Exact match } @@ -2542,6 +2650,7 @@ QUICK_SELECT_DESC::QUICK_SELECT_DESC(QUICK_SELECT *q, uint used_key_parts) { bool not_read_after_key = file->table_flags() & HA_NOT_READ_AFTER_KEY; QUICK_RANGE *r; + DBUG_ENTER("QUICK_SELECT_DESC::QUICK_SELECT_DESC"); it.rewind(); for (r = it++; r; r = it++) @@ -2553,7 +2662,7 @@ QUICK_SELECT_DESC::QUICK_SELECT_DESC(QUICK_SELECT *q, uint used_key_parts) it.rewind(); // Reset range error = HA_ERR_UNSUPPORTED; dont_free=1; // Don't free memory from 'q' - return; + DBUG_VOID_RETURN; } } /* Remove EQ_RANGE flag for keys that are not using the full key */ @@ -2566,6 +2675,7 @@ QUICK_SELECT_DESC::QUICK_SELECT_DESC(QUICK_SELECT *q, uint used_key_parts) rev_it.rewind(); q->dont_free=1; // Don't free shared mem delete q; + DBUG_VOID_RETURN; } @@ -2653,6 +2763,7 @@ int QUICK_SELECT_DESC::get_next() } range = 0; // To next range } + DBUG_RETURN(0); // impossible } /* @@ -2660,8 +2771,10 @@ int QUICK_SELECT_DESC::get_next() */ int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range) { + DBUG_ENTER("QUICK_SELECT_DESC::cmp_prev"); + if (range->flag & NO_MIN_RANGE) - return (0); /* key can't be to small */ + DBUG_RETURN((0)); /* key can't be to small */ KEY_PART *key_part = key_parts; for (char *key = range->min_key, *end = key + range->min_length; @@ -2676,19 +2789,19 @@ int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range) { // the range is expecting a null value if (!key_part->field->is_null()) - return 0; // not null -- still inside the range + DBUG_RETURN(0); // not null -- still inside the range continue; // null -- exact match, go to next key part } else if (key_part->field->is_null()) - return 1; // null -- outside the range + DBUG_RETURN(1); // null -- outside the range } if ((cmp = key_part->field->key_cmp((byte*) key, key_part->part_length)) > 0) - return 0; + DBUG_RETURN(0); if (cmp < 0) - return 1; + DBUG_RETURN(1); } - return (range->flag & NEAR_MIN) ? 1 : 0; // Exact match + DBUG_RETURN((range->flag & NEAR_MIN) ? 1 : 0); // Exact match } /* @@ -2698,9 +2811,11 @@ int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range) bool QUICK_SELECT_DESC::range_reads_after_key(QUICK_RANGE *range) { - return ((range->flag & (NO_MAX_RANGE | NEAR_MAX)) || + DBUG_ENTER("QUICK_SELECT_DESC::range_reads_after_key"); + + DBUG_RETURN(((range->flag & (NO_MAX_RANGE | NEAR_MAX)) || !(range->flag & EQ_RANGE) || - head->key_info[index].key_length != range->max_length) ? 1 : 0; + head->key_info[index].key_length != range->max_length) ? 1 : 0); } /* True if we are reading over a key that may have a NULL value */ @@ -2711,6 +2826,7 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range, uint offset,end; KEY_PART *key_part = key_parts, *key_part_end= key_part+used_key_parts; + DBUG_ENTER("QUICK_SELECT_DESC::test_if_null_range"); for (offset= 0, end = min(range->min_length, range->max_length) ; offset < end && key_part != key_part_end ; @@ -2724,7 +2840,7 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range, continue; } if (null_length && range->min_key[offset]) - return 1; // min_key is null and max_key isn't + DBUG_RETURN(1); // min_key is null and max_key isn't // Range doesn't cover NULL. This is ok if there is no more null parts break; } @@ -2737,7 +2853,7 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range, if (key_part != key_part_end && key_part->null_bit) { if (offset >= range->min_length || range->min_key[offset]) - return 1; // Could be null + DBUG_RETURN(1); // Could be null key_part++; } /* @@ -2746,8 +2862,8 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range, */ for (; key_part != key_part_end ; key_part++) if (key_part->null_bit) - return 1; // Covers null part - return 0; + DBUG_RETURN(1); // Covers null part + DBUG_RETURN(0); } @@ -2765,6 +2881,7 @@ print_key(KEY_PART *key_part,const char *key,uint used_length) { char buff[1024]; String tmp(buff,sizeof(buff)); + DBUG_ENTER("print_key"); for (uint length=0; length < used_length ; @@ -2788,6 +2905,7 @@ print_key(KEY_PART *key_part,const char *key,uint used_length) field->val_str(&tmp,&tmp); fwrite(tmp.ptr(),sizeof(char),tmp.length(),DBUG_FILE); } + DBUG_VOID_RETURN; } static void print_quick(QUICK_SELECT *quick,key_map needed_reg) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index e9569fb8ec4..9914b422878 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -156,6 +156,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result) { int res; register SELECT_LEX *select_lex = &lex->select_lex; + DBUG_ENTER("handle_select"); #ifdef DISABLED_UNTIL_REWRITTEN_IN_4_1 if (lex->olap) @@ -168,7 +169,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result) if (sl->olap != UNSPECIFIED_OLAP_TYPE) { if ((error=handle_olaps(lex,sl))) - return error; + DBUG_RETURN(error); lex->last_selects->next=sl_next; } } @@ -190,7 +191,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result) if (res && result) result->abort(); delete result; - return res; + DBUG_RETURN(res); } @@ -1266,10 +1267,12 @@ static KEY_FIELD * merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end, uint and_level) { + DBUG_ENTER("merge_key_fields"); + if (start == new_fields) - return start; // Impossible or + DBUG_RETURN(start); // Impossible or if (new_fields == end) - return start; // No new fields, skip all + DBUG_RETURN(start); // No new fields, skip all KEY_FIELD *first_free=new_fields; @@ -1316,7 +1319,7 @@ merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end, } old++; } - return first_free; + DBUG_RETURN(first_free); } @@ -1326,12 +1329,14 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, table_map usable_tables) { bool exists_optimize=0; + DBUG_ENTER("add_key_field"); + if (!(field->flags & PART_KEY_FLAG)) { // Don't remove column IS NULL on a LEFT JOIN table if (!eq_func || !value || value->type() != Item::NULL_ITEM || !field->table->maybe_null || field->null_ptr) - return; // Not a key. Skip it + DBUG_VOID_RETURN; // Not a key. Skip it exists_optimize=1; } else @@ -1339,12 +1344,12 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, table_map used_tables=0; if (value && (used_tables=value->used_tables()) & (field->table->map | RAND_TABLE_BIT)) - return; + DBUG_VOID_RETURN; if (!(usable_tables & field->table->map)) { if (!eq_func || !value || value->type() != Item::NULL_ITEM || !field->table->maybe_null || field->null_ptr) - return; // Can't use left join optimize + DBUG_VOID_RETURN; // Can't use left join optimize exists_optimize=1; } else @@ -1357,7 +1362,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, if (!value) { // Probably BETWEEN or IN stat[0].const_keys |= possible_keys; - return; // Can't be used as eq key + DBUG_VOID_RETURN; // Can't be used as eq key } /* Save the following cases: @@ -1378,7 +1383,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, field->result_type() == STRING_RESULT && value->result_type() != STRING_RESULT && field->cmp_type() != value->result_type()) - return; + DBUG_VOID_RETURN; } } /* Store possible eq field */ @@ -1388,6 +1393,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, (*key_fields)->level=(*key_fields)->const_level=and_level; (*key_fields)->exists_optimize=exists_optimize; (*key_fields)++; + DBUG_VOID_RETURN; } @@ -1395,6 +1401,8 @@ static void add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level, COND *cond, table_map usable_tables) { + DBUG_ENTER("add_key_fields"); + if (cond->type() == Item_func::COND_ITEM) { List_iterator_fast li(*((Item_cond*) cond)->argument_list()); @@ -1427,12 +1435,12 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level, *key_fields,++(*and_level)); } } - return; + DBUG_VOID_RETURN; } /* If item is of type 'field op field/constant' add it to key_fields */ if (cond->type() != Item::FUNC_ITEM) - return; + DBUG_VOID_RETURN; Item_func *cond_func= (Item_func*) cond; switch (cond_func->select_optimize()) { case Item_func::OPTIMIZE_NONE: @@ -1476,7 +1484,7 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level, } break; } - return; + DBUG_VOID_RETURN; } /* @@ -1488,8 +1496,10 @@ static uint max_part_bit(key_map bits) { uint found; + DBUG_ENTER("max_part_bit"); + for (found=0; bits & 1 ; found++,bits>>=1) ; - return found; + DBUG_RETURN(found); } @@ -1499,6 +1509,7 @@ add_key_part(DYNAMIC_ARRAY *keyuse_array,KEY_FIELD *key_field) Field *field=key_field->field; TABLE *form= field->table; KEYUSE keyuse; + DBUG_ENTER("add_key_part"); if (key_field->eq_func && !key_field->exists_optimize) { @@ -1528,6 +1539,7 @@ add_key_part(DYNAMIC_ARRAY *keyuse_array,KEY_FIELD *key_field) if (key_field->val->type() == Item::NULL_ITEM && !key_field->field->real_maybe_null()) key_field->field->table->reginfo.not_exists_optimize=1; + DBUG_VOID_RETURN; } static void @@ -1535,9 +1547,10 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, JOIN_TAB *stat,COND *cond,table_map usable_tables) { Item_func_match *cond_func=NULL; + DBUG_ENTER("add_ft_keys"); if (!cond) - return; + DBUG_VOID_RETURN; if (cond->type() == Item::FUNC_ITEM) { @@ -1589,7 +1602,7 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, } if (!cond_func || cond_func->key == NO_SUCH_KEY) - return; + DBUG_VOID_RETURN; KEYUSE keyuse; @@ -1600,18 +1613,21 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, keyuse.keypart=FT_KEYPART; keyuse.used_tables=cond_func->key_item()->used_tables(); VOID(insert_dynamic(keyuse_array,(gptr) &keyuse)); + DBUG_VOID_RETURN; } static int sort_keyuse(KEYUSE *a,KEYUSE *b) { + DBUG_ENTER("sort_keyuse"); + if (a->table->tablenr != b->table->tablenr) - return (int) (a->table->tablenr - b->table->tablenr); + DBUG_RETURN((int) (a->table->tablenr - b->table->tablenr)); if (a->key != b->key) - return (int) (a->key - b->key); + DBUG_RETURN((int) (a->key - b->key)); if (a->keypart != b->keypart) - return (int) (a->keypart - b->keypart); - return test(a->used_tables) - test(b->used_tables); // Place const first + DBUG_RETURN((int) (a->keypart - b->keypart)); + DBUG_RETURN(test(a->used_tables) - test(b->used_tables)); // Place const first } @@ -1626,13 +1642,14 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, uint tables, COND *cond, table_map normal_tables) { uint and_level,i,found_eq_constant; + DBUG_ENTER("update_ref_and_keys"); { KEY_FIELD *key_fields,*end; if (!(key_fields=(KEY_FIELD*) thd->alloc(sizeof(key_fields[0])*(thd->cond_count+1)*2))) - return TRUE; /* purecov: inspected */ + DBUG_RETURN(TRUE); /* purecov: inspected */ and_level=0; end=key_fields; if (cond) add_key_fields(join_tab,&end,&and_level,cond,normal_tables); @@ -1645,7 +1662,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, } } if (my_init_dynamic_array(keyuse,sizeof(KEYUSE),20,64)) - return TRUE; + DBUG_RETURN(TRUE); /* fill keyuse with found key parts */ for (KEY_FIELD *field=key_fields ; field != end ; field++) add_key_part(keyuse,field); @@ -1704,7 +1721,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, VOID(set_dynamic(keyuse,(gptr) &end,i)); keyuse->elements=i; } - return FALSE; + DBUG_RETURN(FALSE); } @@ -1718,6 +1735,8 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, static void set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key) { + DBUG_ENTER("set_position"); + join->positions[idx].table= table; join->positions[idx].key=key; join->positions[idx].records_read=1.0; /* This is a const table */ @@ -1732,6 +1751,7 @@ set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key) next=tmp; } join->best_ref[idx]=table; + DBUG_VOID_RETURN; } @@ -1752,6 +1772,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, ulong rec; double tmp; THD *thd= current_thd; + DBUG_ENTER("find_best"); if (!rest_tables) { @@ -1768,10 +1789,10 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, sizeof(POSITION)*idx); join->best_read=read_time; } - return; + DBUG_VOID_RETURN; } if (read_time+record_count/(double) TIME_FOR_COMPARE >= join->best_read) - return; /* Found better before */ + DBUG_VOID_RETURN; /* Found better before */ JOIN_TAB *s; double best_record_count=DBL_MAX,best_read_time=DBL_MAX; @@ -2068,6 +2089,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, break; // Don't test all combinations } } + DBUG_VOID_RETURN; } @@ -2078,6 +2100,8 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, static void calc_used_field_length(THD *thd, JOIN_TAB *join_tab) { uint null_fields,blobs,fields,rec_length; + DBUG_ENTER("calc_used_field_length"); + null_fields=blobs=fields=rec_length=0; Field **f_ptr,*field; @@ -2107,6 +2131,7 @@ static void calc_used_field_length(THD *thd, JOIN_TAB *join_tab) join_tab->used_fields=fields; join_tab->used_fieldlength=rec_length; join_tab->used_blobs=blobs; + DBUG_VOID_RETURN; } @@ -2116,6 +2141,7 @@ cache_record_length(JOIN *join,uint idx) uint length=0; JOIN_TAB **pos,**end; THD *thd=join->thd; + DBUG_ENTER("cache_record_length"); for (pos=join->best_ref+join->const_tables,end=join->best_ref+idx ; pos != end ; @@ -2126,7 +2152,7 @@ cache_record_length(JOIN *join,uint idx) calc_used_field_length(thd, join_tab); length+=join_tab->used_fieldlength; } - return length; + DBUG_RETURN(length); } @@ -2134,6 +2160,7 @@ static double prev_record_reads(JOIN *join,table_map found_ref) { double found=1.0; + DBUG_ENTER("prev_record_reads"); for (POSITION *pos=join->positions ; found_ref ; pos++) { @@ -2143,7 +2170,7 @@ prev_record_reads(JOIN *join,table_map found_ref) found*=pos->records_read; } } - return found; + DBUG_RETURN(found); } @@ -2160,11 +2187,12 @@ get_best_combination(JOIN *join) KEYUSE *keyuse; uint table_count; THD *thd=join->thd; + DBUG_ENTER("get_best_combination"); table_count=join->tables; if (!(join->join_tab=join_tab= (JOIN_TAB*) thd->alloc(sizeof(JOIN_TAB)*table_count))) - return TRUE; + DBUG_RETURN(TRUE); join->full_join=0; @@ -2193,13 +2221,13 @@ get_best_combination(JOIN *join) join->full_join=1; } else if (create_ref_for_key(join, j, keyuse, used_tables)) - return TRUE; // Something went wrong + DBUG_RETURN(TRUE); // Something went wrong } for (i=0 ; i < table_count ; i++) join->map2table[join->join_tab[i].table->tablenr]=join->join_tab+i; update_depend_map(join); - return 0; + DBUG_RETURN(0); } @@ -2212,6 +2240,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, uint keyparts,length,key; TABLE *table; KEY *keyinfo; + DBUG_ENTER("create_ref_for_key"); /* Use best key from find_best @@ -2255,7 +2284,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, (keyparts+1)))) || !(j->ref.items= (Item**) thd->alloc(sizeof(Item*)*keyparts))) { - return TRUE; + DBUG_RETURN(TRUE); } j->ref.key_buff2=j->ref.key_buff+ALIGN_SIZE(length); j->ref.key_err=1; @@ -2267,7 +2296,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, { j->ref.items[0]=((Item_func*)(keyuse->val))->key_item(); if (keyuse->used_tables) - return TRUE; // not supported yet. SerG + DBUG_RETURN(TRUE); // not supported yet. SerG j->type=JT_FT; } @@ -2295,7 +2324,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, keyuse->val); if (thd->fatal_error) { - return TRUE; + DBUG_RETURN(TRUE); } tmp->copy(); } @@ -2328,7 +2357,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, } else j->type=JT_EQ_REF; - return 0; + DBUG_RETURN(0); } @@ -2337,29 +2366,31 @@ static store_key * get_store_key(THD *thd, KEYUSE *keyuse, table_map used_tables, KEY_PART_INFO *key_part, char *key_buff, uint maybe_null) { + DBUG_ENTER("get_store_key"); + if (!((~used_tables) & keyuse->used_tables)) // if const item { - return new store_key_const_item(thd, + DBUG_RETURN(new store_key_const_item(thd, key_part->field, key_buff + maybe_null, maybe_null ? key_buff : 0, key_part->length, - keyuse->val); + keyuse->val)); } else if (keyuse->val->type() == Item::FIELD_ITEM) - return new store_key_field(thd, + DBUG_RETURN(new store_key_field(thd, key_part->field, key_buff + maybe_null, maybe_null ? key_buff : 0, key_part->length, ((Item_field*) keyuse->val)->field, - keyuse->val->full_name()); - return new store_key_item(thd, + keyuse->val->full_name())); + DBUG_RETURN(new store_key_item(thd, key_part->field, key_buff + maybe_null, maybe_null ? key_buff : 0, key_part->length, - keyuse->val); + keyuse->val)); } /* @@ -2372,10 +2403,12 @@ store_val_in_field(Field *field,Item *item) { THD *thd=current_thd; ulong cuted_fields=thd->cuted_fields; + DBUG_ENTER("store_val_in_field"); + thd->count_cuted_fields=1; item->save_in_field(field); thd->count_cuted_fields=0; - return cuted_fields != thd->cuted_fields; + DBUG_RETURN(cuted_fields != thd->cuted_fields); } @@ -2384,10 +2417,11 @@ make_simple_join(JOIN *join,TABLE *tmp_table) { TABLE **tableptr; JOIN_TAB *join_tab; + DBUG_ENTER("make_simple_join"); if (!(tableptr=(TABLE**) join->thd->alloc(sizeof(TABLE*))) || !(join_tab=(JOIN_TAB*) join->thd->alloc(sizeof(JOIN_TAB)))) - return TRUE; + DBUG_RETURN(TRUE); join->join_tab=join_tab; join->table=tableptr; tableptr[0]=tmp_table; join->tables=1; @@ -2419,7 +2453,7 @@ make_simple_join(JOIN *join,TABLE *tmp_table) bzero((char*) &join_tab->read_record,sizeof(join_tab->read_record)); tmp_table->status=0; tmp_table->null_row=0; - return FALSE; + DBUG_RETURN(FALSE); } @@ -2791,13 +2825,15 @@ join_free(JOIN *join) static bool eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab) { + DBUG_ENTER("eq_ref_table"); + if (tab->cached_eq_ref_table) // If cached - return tab->eq_ref_table; + DBUG_RETURN(tab->eq_ref_table); tab->cached_eq_ref_table=1; if (tab->type == JT_CONST) // We can skip const tables - return (tab->eq_ref_table=1); /* purecov: inspected */ + DBUG_RETURN((tab->eq_ref_table=1)); /* purecov: inspected */ if (tab->type != JT_EQ_REF) - return (tab->eq_ref_table=0); // We must use this + DBUG_RETURN((tab->eq_ref_table=0)); // We must use this Item **ref_item=tab->ref.items; Item **end=ref_item+tab->ref.key_parts; uint found=0; @@ -2821,7 +2857,7 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab) continue; // Used in ORDER BY } if (!only_eq_ref_tables(join,start_order, (*ref_item)->used_tables())) - return (tab->eq_ref_table=0); + DBUG_RETURN((tab->eq_ref_table=0)); } } /* Check that there was no reference to table before sort order */ @@ -2833,23 +2869,25 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab) continue; } if (start_order->depend_map & map) - return (tab->eq_ref_table=0); + DBUG_RETURN((tab->eq_ref_table=0)); } - return tab->eq_ref_table=1; + DBUG_RETURN(tab->eq_ref_table=1); } static bool only_eq_ref_tables(JOIN *join,ORDER *order,table_map tables) { + DBUG_ENTER("only_eq_ref_tables"); + if (specialflag & SPECIAL_SAFE_MODE) - return 0; // skip this optimize /* purecov: inspected */ + DBUG_RETURN(0); // skip this optimize /* purecov: inspected */ for (JOIN_TAB **tab=join->map2table ; tables ; tab++, tables>>=1) { if (tables & 1 && !eq_ref_table(join, order, *tab)) - return 0; + DBUG_RETURN(0); } - return 1; + DBUG_RETURN(1); } @@ -2858,6 +2896,7 @@ only_eq_ref_tables(JOIN *join,ORDER *order,table_map tables) static void update_depend_map(JOIN *join) { JOIN_TAB *join_tab=join->join_tab, *end=join_tab+join->tables; + DBUG_ENTER("update_depend_map"); for (; join_tab != end ; join_tab++) { @@ -2876,6 +2915,7 @@ static void update_depend_map(JOIN *join) ref->depend_map|=(*tab)->ref.depend_map; } } + DBUG_VOID_RETURN; } @@ -2883,6 +2923,8 @@ static void update_depend_map(JOIN *join) static void update_depend_map(JOIN *join, ORDER *order) { + DBUG_ENTER("update_depend_map"); + for (; order ; order=order->next) { table_map depend_map; @@ -2899,6 +2941,7 @@ static void update_depend_map(JOIN *join, ORDER *order) } } } + DBUG_VOID_RETURN; } @@ -2910,9 +2953,10 @@ static void update_depend_map(JOIN *join, ORDER *order) static ORDER * remove_const(JOIN *join,ORDER *first_order, COND *cond, bool *simple_order) { - if (join->tables == join->const_tables) - return 0; // No need to sort DBUG_ENTER("remove_const"); + + if (join->tables == join->const_tables) + DBUG_RETURN(0); // No need to sort ORDER *order,**prev_ptr; table_map first_table= join->join_tab[join->const_tables].table->map; table_map not_const_tables= ~join->const_table_map; @@ -3009,8 +3053,11 @@ return_zero_rows(JOIN *join, select_result *result,TABLE_LIST *tables, static void clear_tables(JOIN *join) { + DBUG_ENTER("clear_tables"); + for (uint i=0 ; i < join->tables ; i++) mark_as_null_row(join->table[i]); // All fields are NULL + DBUG_VOID_RETURN; } /***************************************************************************** @@ -3049,6 +3096,8 @@ static void change_cond_ref_to_const(I_List *save_list,Item *and_father, Item *cond, Item *field, Item *value) { + DBUG_ENTER("change_cond_ref_to_const"); + if (cond->type() == Item::COND_ITEM) { bool and_level= ((Item_cond*) cond)->functype() == @@ -3058,10 +3107,10 @@ change_cond_ref_to_const(I_List *save_list,Item *and_father, while ((item=li++)) change_cond_ref_to_const(save_list,and_level ? cond : item, item, field, value); - return; + DBUG_VOID_RETURN; } if (cond->eq_cmp_result() == Item::COND_OK) - return; // Not a boolean function + DBUG_VOID_RETURN; // Not a boolean function Item_bool_func2 *func= (Item_bool_func2*) cond; Item *left_item= func->arguments()[0]; @@ -3108,6 +3157,7 @@ change_cond_ref_to_const(I_List *save_list,Item *and_father, func->arguments()[1]->result_type())); } } + DBUG_VOID_RETURN; } @@ -3115,6 +3165,8 @@ static void propagate_cond_constants(I_List *save_list,COND *and_level, COND *cond) { + DBUG_ENTER("propagate_cond_constants"); + if (cond->type() == Item::COND_ITEM) { bool and_level= ((Item_cond*) cond)->functype() == @@ -3172,16 +3224,19 @@ propagate_cond_constants(I_List *save_list,COND *and_level, } } } + DBUG_VOID_RETURN; } static COND * optimize_cond(COND *conds,Item::cond_result *cond_value) { + DBUG_ENTER("optimize_cond"); + if (!conds) { *cond_value= Item::COND_TRUE; - return conds; + DBUG_RETURN(conds); } /* change field = field to field = const for each found field = const */ DBUG_EXECUTE("where",print_where(conds,"original");); @@ -3193,7 +3248,7 @@ optimize_cond(COND *conds,Item::cond_result *cond_value) DBUG_EXECUTE("where",print_where(conds,"after const change");); conds=remove_eq_conds(conds,cond_value) ; DBUG_EXECUTE("info",print_where(conds,"after remove");); - return conds; + DBUG_RETURN(conds); } @@ -3208,6 +3263,8 @@ optimize_cond(COND *conds,Item::cond_result *cond_value) static COND * remove_eq_conds(COND *cond,Item::cond_result *cond_value) { + DBUG_ENTER("remove_eq_conds"); + if (cond->type() == Item::COND_ITEM) { bool and_level= ((Item_cond*) cond)->functype() @@ -3245,14 +3302,14 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) if (and_level) { *cond_value=tmp_cond_value; - return (COND*) 0; // Always false + DBUG_RETURN((COND*) 0); // Always false } break; case Item::COND_TRUE: if (!and_level) { *cond_value= tmp_cond_value; - return (COND*) 0; // Always true + DBUG_RETURN((COND*) 0); // Always true } break; case Item::COND_UNDEF: // Impossible @@ -3261,12 +3318,12 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) } if (!((Item_cond*) cond)->argument_list()->elements || *cond_value != Item::COND_OK) - return (COND*) 0; + DBUG_RETURN((COND*) 0); if (((Item_cond*) cond)->argument_list()->elements == 1) { // Remove list item= ((Item_cond*) cond)->argument_list()->head(); ((Item_cond*) cond)->argument_list()->empty(); - return item; + DBUG_RETURN(item); } } else if (cond->type() == Item::FUNC_ITEM && @@ -3322,7 +3379,7 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) else if (cond->const_item()) { *cond_value= eval_const_cond(cond) ? Item::COND_TRUE : Item::COND_FALSE; - return (COND*) 0; + DBUG_RETURN((COND*) 0); } else if ((*cond_value= cond->eq_cmp_result()) != Item::COND_OK) { // boolan compare function @@ -3332,11 +3389,11 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) { if (!left_item->maybe_null || ((Item_func*) cond)->functype() == Item_func::EQUAL_FUNC) - return (COND*) 0; // Compare of identical items + DBUG_RETURN((COND*) 0); // Compare of identical items } } *cond_value=Item::COND_OK; - return cond; // Point at next and level + DBUG_RETURN(cond); // Point at next and level } /* @@ -3346,6 +3403,8 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) static bool const_expression_in_where(COND *cond, Item *comp_item, Item **const_item) { + DBUG_ENTER("const_expression_in_where"); + if (cond->type() == Item::COND_ITEM) { bool and_level= (((Item_cond*) cond)->functype() @@ -3358,19 +3417,19 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item) if (res) // Is a const value { if (and_level) - return 1; + DBUG_RETURN(1); } else if (!and_level) - return 0; + DBUG_RETURN(0); } - return and_level ? 0 : 1; + DBUG_RETURN(and_level ? 0 : 1); } else if (cond->eq_cmp_result() != Item::COND_OK) { // boolan compare function Item_func* func= (Item_func*) cond; if (func->functype() != Item_func::EQUAL_FUNC && func->functype() != Item_func::EQ_FUNC) - return 0; + DBUG_RETURN(0); Item *left_item= ((Item_func*) cond)->arguments()[0]; Item *right_item= ((Item_func*) cond)->arguments()[1]; if (left_item->eq(comp_item,1)) @@ -3378,9 +3437,9 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item) if (right_item->const_item()) { if (*const_item) - return right_item->eq(*const_item, 1); + DBUG_RETURN(right_item->eq(*const_item, 1)); *const_item=right_item; - return 1; + DBUG_RETURN(1); } } else if (right_item->eq(comp_item,1)) @@ -3388,13 +3447,13 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item) if (left_item->const_item()) { if (*const_item) - return left_item->eq(*const_item, 1); + DBUG_RETURN(left_item->eq(*const_item, 1)); *const_item=left_item; - return 1; + DBUG_RETURN(1); } } } - return 0; + DBUG_RETURN(0); } @@ -3409,6 +3468,8 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, Item_result_field ***copy_func, Field **from_field, bool group, bool modify_item) { + DBUG_ENTER("*create_tmp_field"); + switch (type) { case Item::SUM_FUNC_ITEM: { @@ -3417,38 +3478,46 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, switch (item_sum->sum_func()) { case Item_sum::AVG_FUNC: /* Place for sum & count */ if (group) - return new Field_string(sizeof(double)+sizeof(longlong), - maybe_null, item->name,table,1); + { + DBUG_RETURN(new Field_string(sizeof(double)+sizeof(longlong), + maybe_null, item->name,table,1)); + } else - return new Field_double(item_sum->max_length,maybe_null, - item->name, table, item_sum->decimals); + { + DBUG_RETURN(new Field_double(item_sum->max_length,maybe_null, + item->name, table, item_sum->decimals)); + } case Item_sum::STD_FUNC: /* Place for sum & count */ if (group) - return new Field_string(sizeof(double)*2+sizeof(longlong), - maybe_null, item->name,table,1); + { + DBUG_RETURN(new Field_string(sizeof(double)*2+sizeof(longlong), + maybe_null, item->name,table,1)); + } else - return new Field_double(item_sum->max_length, maybe_null, - item->name,table,item_sum->decimals); + { + DBUG_RETURN(new Field_double(item_sum->max_length, maybe_null, + item->name,table,item_sum->decimals)); + } case Item_sum::UNIQUE_USERS_FUNC: - return new Field_long(9,maybe_null,item->name,table,1); + DBUG_RETURN(new Field_long(9,maybe_null,item->name,table,1)); default: switch (item_sum->result_type()) { case REAL_RESULT: - return new Field_double(item_sum->max_length,maybe_null, - item->name,table,item_sum->decimals); + DBUG_RETURN(new Field_double(item_sum->max_length,maybe_null, + item->name,table,item_sum->decimals)); case INT_RESULT: - return new Field_longlong(item_sum->max_length,maybe_null, - item->name,table,item->unsigned_flag); + DBUG_RETURN(new Field_longlong(item_sum->max_length,maybe_null, + item->name,table,item->unsigned_flag)); case STRING_RESULT: if (item_sum->max_length > 255) - return new Field_blob(item_sum->max_length,maybe_null, - item->name,table,item->binary); - return new Field_string(item_sum->max_length,maybe_null, - item->name,table,item->binary); + DBUG_RETURN(new Field_blob(item_sum->max_length,maybe_null, + item->name,table,item->binary)); + DBUG_RETURN(new Field_string(item_sum->max_length,maybe_null, + item->name,table,item->binary)); } } thd->fatal_error=1; - return 0; // Error + DBUG_RETURN(0); // Error } case Item::FIELD_ITEM: { @@ -3465,7 +3534,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, if (org_field->maybe_null()) new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join } - return new_field; + DBUG_RETURN(new_field); } case Item::PROC_ITEM: case Item::FUNC_ITEM: @@ -3505,11 +3574,12 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, *((*copy_func)++) = (Item_result_field*) item; // Save for copy_funcs if (modify_item) ((Item_result_field*) item)->result_field=new_field; - return new_field; + DBUG_RETURN(new_field); } default: // Dosen't have to be stored - return 0; + DBUG_RETURN(0); } + DBUG_RETURN(0); // impossible } @@ -3534,8 +3604,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, Item_result_field **copy_func; MI_COLUMNDEF *recinfo; uint temp_pool_slot=MY_BIT_NONE; - DBUG_ENTER("create_tmp_table"); + DBUG_PRINT("enter",("distinct: %d save_sum_fields: %d allow_distinct_limit: %d group: %d", (int) distinct, (int) save_sum_fields, (int) allow_distinct_limit,test(group))); @@ -3983,15 +4053,17 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, static bool open_tmp_table(TABLE *table) { int error; + DBUG_ENTER("open_tmp_table"); + if ((error=table->file->ha_open(table->real_name,O_RDWR,HA_OPEN_TMP_TABLE))) { table->file->print_error(error,MYF(0)); /* purecov: inspected */ table->db_stat=0; - return(1); + DBUG_RETURN((1)); } /* VOID(ha_lock(table,F_WRLCK)); */ /* Single thread table */ (void) table->file->extra(HA_EXTRA_QUICK); /* Faster */ - return(0); + DBUG_RETURN((0)); } @@ -4002,8 +4074,8 @@ static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param, MI_KEYDEF keydef; MI_UNIQUEDEF uniquedef; KEY *keyinfo=param->keyinfo; - DBUG_ENTER("create_myisam_tmp_table"); + if (table->keys) { // Get keys for ni_create bool using_unique_constraint=0; @@ -4340,37 +4412,39 @@ static int sub_select_cache(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) { int error; + DBUG_ENTER("sub_select_cache"); if (end_of_records) { if ((error=flush_cached_records(join,join_tab,FALSE)) < 0) - return error; /* purecov: inspected */ - return sub_select(join,join_tab,end_of_records); + DBUG_RETURN(error); /* purecov: inspected */ + DBUG_RETURN(sub_select(join,join_tab,end_of_records)); } if (join->thd->killed) // If aborted by user { my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */ - return -2; /* purecov: inspected */ + DBUG_RETURN(-2); /* purecov: inspected */ } if (join_tab->use_quick != 2 || test_if_quick_select(join_tab) <= 0) { if (!store_record_in_cache(&join_tab->cache)) - return 0; // There is more room in cache - return flush_cached_records(join,join_tab,FALSE); + DBUG_RETURN(0); // There is more room in cache + DBUG_RETURN(flush_cached_records(join,join_tab,FALSE)); } if ((error=flush_cached_records(join,join_tab,TRUE)) < 0) - return error; /* purecov: inspected */ - return sub_select(join,join_tab,end_of_records); /* Use ordinary select */ + DBUG_RETURN(error); /* purecov: inspected */ + DBUG_RETURN(sub_select(join,join_tab,end_of_records)); /* Use ordinary select */ } static int sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) { + DBUG_ENTER("sub_select"); join_tab->table->null_row=0; if (end_of_records) - return (*join_tab->next_select)(join,join_tab+1,end_of_records); + DBUG_RETURN((*join_tab->next_select)(join,join_tab+1,end_of_records)); /* Cache variables for faster loop */ int error; @@ -4389,7 +4463,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) if (join->thd->killed) // Aborted by user { my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */ - return -2; /* purecov: inspected */ + DBUG_RETURN(-2); /* purecov: inspected */ } join->examined_rows++; if (!on_expr || on_expr->val_int()) @@ -4400,9 +4474,9 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) if (!select_cond || select_cond->val_int()) { if ((error=(*join_tab->next_select)(join,join_tab+1,0)) < 0) - return error; + DBUG_RETURN(error); if (not_used_in_distinct && found_records != join->found_records) - return 0; + DBUG_RETURN(0); } else info->file->unlock_row(); @@ -4410,7 +4484,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) } while (!(error=info->read_record(info))); } if (error > 0) // Fatal error - return -1; + DBUG_RETURN(-1); if (!found && on_expr) { // OUTER JOIN @@ -4419,10 +4493,10 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) if (!select_cond || select_cond->val_int()) { if ((error=(*join_tab->next_select)(join,join_tab+1,0)) < 0) - return error; /* purecov: inspected */ + DBUG_RETURN(error); /* purecov: inspected */ } } - return 0; + DBUG_RETURN(0); } @@ -4431,9 +4505,10 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) { int error; READ_RECORD *info; + DBUG_ENTER("flush_cached_records"); if (!join_tab->cache.records) - return 0; /* Nothing to do */ + DBUG_RETURN(0); /* Nothing to do */ if (skipp_last) (void) store_record_in_cache(&join_tab->cache); // Must save this for later if (join_tab->use_quick == 2) @@ -4449,7 +4524,7 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) { reset_cache(&join_tab->cache); join_tab->cache.records=0; join_tab->cache.ptr_record= (uint) ~0; - return -error; /* No records or error */ + DBUG_RETURN(-error); /* No records or error */ } for (JOIN_TAB *tmp=join->join_tab; tmp != join_tab ; tmp++) @@ -4464,7 +4539,7 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) if (join->thd->killed) { my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */ - return -2; // Aborted by user /* purecov: inspected */ + DBUG_RETURN(-2); // Aborted by user /* purecov: inspected */ } SQL_SELECT *select=join_tab->select; if (!error && (!join_tab->cache.select || @@ -4477,7 +4552,7 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) read_cached_record(join_tab); if (!select || !select->skipp_record()) if ((error=(join_tab->next_select)(join,join_tab+1,0)) < 0) - return error; /* purecov: inspected */ + DBUG_RETURN(error); /* purecov: inspected */ } } } while (!(error=info->read_record(info))); @@ -4487,10 +4562,10 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) reset_cache(&join_tab->cache); join_tab->cache.records=0; join_tab->cache.ptr_record= (uint) ~0; if (error > 0) // Fatal error - return -1; /* purecov: inspected */ + DBUG_RETURN(-1); /* purecov: inspected */ for (JOIN_TAB *tmp2=join->join_tab; tmp2 != join_tab ; tmp2++) tmp2->table->status=tmp2->status; - return 0; + DBUG_RETURN(0); } @@ -4546,6 +4621,8 @@ join_read_system(JOIN_TAB *tab) { TABLE *table= tab->table; int error; + DBUG_ENTER("join_read_system"); + if (table->status & STATUS_GARBAGE) // If first read { if ((error=table->file->read_first_row(table->record[0], @@ -4554,18 +4631,18 @@ join_read_system(JOIN_TAB *tab) if (error != HA_ERR_END_OF_FILE) { table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } table->null_row=1; // This is ok. empty_record(table); // Make empty record - return -1; + DBUG_RETURN(-1); } store_record(table,1); } else if (!table->status) // Only happens with left join restore_record(table,1); // restore old record table->null_row=0; - return table->status ? -1 : 0; + DBUG_RETURN(table->status ? -1 : 0); } @@ -4574,6 +4651,8 @@ join_read_const(JOIN_TAB *tab) { int error; TABLE *table= tab->table; + DBUG_ENTER("join_read_const"); + if (table->status & STATUS_GARBAGE) // If first read { if (cp_buffer_from_ref(&tab->ref)) @@ -4593,9 +4672,9 @@ join_read_const(JOIN_TAB *tab) sql_print_error("read_const: Got error %d when reading table %s", error, table->path); table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; + DBUG_RETURN(-1); } store_record(table,1); } @@ -4605,7 +4684,7 @@ join_read_const(JOIN_TAB *tab) restore_record(table,1); // restore old record } table->null_row=0; - return table->status ? -1 : 0; + DBUG_RETURN(table->status ? -1 : 0); } @@ -4614,6 +4693,7 @@ join_read_key(JOIN_TAB *tab) { int error; TABLE *table= tab->table; + DBUG_ENTER("join_read_key"); if (cmp_buffer_with_ref(tab) || (table->status & (STATUS_GARBAGE | STATUS_NO_PARENT | STATUS_NULL_ROW))) @@ -4621,7 +4701,7 @@ join_read_key(JOIN_TAB *tab) if (tab->ref.key_err) { table->status=STATUS_NOT_FOUND; - return -1; + DBUG_RETURN(-1); } error=table->file->index_read(table->record[0], tab->ref.key_buff, @@ -4631,11 +4711,11 @@ join_read_key(JOIN_TAB *tab) sql_print_error("read_key: Got error %d when reading table '%s'",error, table->path); table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } } table->null_row=0; - return table->status ? -1 : 0; + DBUG_RETURN(table->status ? -1 : 0); } @@ -4644,9 +4724,10 @@ join_read_always_key(JOIN_TAB *tab) { int error; TABLE *table= tab->table; + DBUG_ENTER("join_read_always_key"); if (cp_buffer_from_ref(&tab->ref)) - return -1; + DBUG_RETURN(-1); if ((error=table->file->index_read(table->record[0], tab->ref.key_buff, tab->ref.key_length,HA_READ_KEY_EXACT))) @@ -4656,11 +4737,11 @@ join_read_always_key(JOIN_TAB *tab) sql_print_error("read_const: Got error %d when reading table %s",error, table->path); table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; /* purecov: inspected */ + DBUG_RETURN(-1); /* purecov: inspected */ } - return 0; + DBUG_RETURN(0); } /* @@ -4673,9 +4754,10 @@ join_read_last_key(JOIN_TAB *tab) { int error; TABLE *table= tab->table; + DBUG_ENTER("join_read_last_key"); if (cp_buffer_from_ref(&tab->ref)) - return -1; + DBUG_RETURN(-1); if ((error=table->file->index_read_last(table->record[0], tab->ref.key_buff, tab->ref.key_length))) @@ -4685,11 +4767,11 @@ join_read_last_key(JOIN_TAB *tab) sql_print_error("read_const: Got error %d when reading table %s",error, table->path); table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; /* purecov: inspected */ + DBUG_RETURN(-1); /* purecov: inspected */ } - return 0; + DBUG_RETURN(0); } @@ -4697,7 +4779,8 @@ join_read_last_key(JOIN_TAB *tab) static int join_no_more_records(READ_RECORD *info __attribute__((unused))) { - return -1; + DBUG_ENTER("join_no_more_records"); + DBUG_RETURN(-1); } @@ -4707,6 +4790,7 @@ join_read_next_same(READ_RECORD *info) int error; TABLE *table= info->table; JOIN_TAB *tab=table->reginfo.join_tab; + DBUG_ENTER("join_read_next_same"); if ((error=table->file->index_next_same(table->record[0], tab->ref.key_buff, @@ -4717,12 +4801,12 @@ join_read_next_same(READ_RECORD *info) sql_print_error("read_next: Got error %d when reading table %s",error, table->path); table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } table->status= STATUS_GARBAGE; - return -1; + DBUG_RETURN(-1); } - return 0; + DBUG_RETURN(0); } static int @@ -4731,6 +4815,7 @@ join_read_prev_same(READ_RECORD *info) int error; TABLE *table= info->table; JOIN_TAB *tab=table->reginfo.join_tab; + DBUG_ENTER("join_read_prev_same"); if ((error=table->file->index_prev(table->record[0]))) { @@ -4753,16 +4838,18 @@ join_read_prev_same(READ_RECORD *info) table->status=STATUS_NOT_FOUND; error= -1; } - return error; + DBUG_RETURN(error); } static int join_init_quick_read_record(JOIN_TAB *tab) { + DBUG_ENTER("join_init_quick_read_record"); + if (test_if_quick_select(tab) == -1) - return -1; /* No possible records */ - return join_init_read_record(tab); + DBUG_RETURN(-1); /* No possible records */ + DBUG_RETURN(join_init_read_record(tab)); } @@ -4770,19 +4857,23 @@ static int test_if_quick_select(JOIN_TAB *tab) { delete tab->select->quick; + DBUG_ENTER("test_if_quick_select"); + tab->select->quick=0; - return tab->select->test_quick_select(tab->keys,(table_map) 0,HA_POS_ERROR); + DBUG_RETURN(tab->select->test_quick_select(tab->keys,(table_map) 0,HA_POS_ERROR)); } static int join_init_read_record(JOIN_TAB *tab) { + DBUG_ENTER("join_init_read_record"); + if (tab->select && tab->select->quick) tab->select->quick->reset(); init_read_record(&tab->read_record, tab->join->thd, tab->table, tab->select,1,1); - return (*tab->read_record.read_record)(&tab->read_record); + DBUG_RETURN((*tab->read_record.read_record)(&tab->read_record)); } static int @@ -4790,6 +4881,8 @@ join_read_first(JOIN_TAB *tab) { int error; TABLE *table=tab->table; + DBUG_ENTER("join_read_first"); + if (!table->key_read && (table->used_keys & ((key_map) 1 << tab->index)) && !table->no_keyread) { @@ -4810,11 +4903,11 @@ join_read_first(JOIN_TAB *tab) sql_print_error("read_first_with_key: Got error %d when reading table", error); table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; + DBUG_RETURN(-1); } - return 0; + DBUG_RETURN(0); } @@ -4822,6 +4915,8 @@ static int join_read_next(READ_RECORD *info) { int error=info->file->index_next(info->record); + DBUG_ENTER("join_read_next"); + if (error) { if (error != HA_ERR_END_OF_FILE) @@ -4829,11 +4924,11 @@ join_read_next(READ_RECORD *info) sql_print_error("read_next_with_key: Got error %d when reading table %s", error, info->table->path); info->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; + DBUG_RETURN(-1); } - return 0; + DBUG_RETURN(0); } static int @@ -4841,6 +4936,8 @@ join_read_last(JOIN_TAB *tab) { TABLE *table=tab->table; int error; + DBUG_ENTER("join_read_last"); + if (!table->key_read && (table->used_keys & ((key_map) 1 << tab->index)) && !table->no_keyread) { @@ -4861,11 +4958,11 @@ join_read_last(JOIN_TAB *tab) sql_print_error("read_last_with_key: Got error %d when reading table", error, table->path); table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; + DBUG_RETURN(-1); } - return 0; + DBUG_RETURN(0); } @@ -4873,6 +4970,8 @@ static int join_read_prev(READ_RECORD *info) { int error=info->file->index_prev(info->record); + DBUG_ENTER("join_read_prev"); + if (error) { if (error != HA_ERR_END_OF_FILE) @@ -4880,11 +4979,11 @@ join_read_prev(READ_RECORD *info) sql_print_error("read_prev_with_key: Got error %d when reading table: %s", error,info->table->path); info->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; + DBUG_RETURN(-1); } - return 0; + DBUG_RETURN(0); } @@ -4893,10 +4992,11 @@ join_ft_read_first(JOIN_TAB *tab) { int error; TABLE *table= tab->table; + DBUG_ENTER("join_ft_read_first"); #if NOT_USED_YET if (cp_buffer_from_ref(&tab->ref)) // as ft-key doesn't use store_key's - return -1; // see also FT_SELECT::init() + DBUG_RETURN(-1); // see also FT_SELECT::init() #endif table->file->ft_init(); @@ -4908,17 +5008,19 @@ join_ft_read_first(JOIN_TAB *tab) sql_print_error("ft_read_first: Got error %d when reading table %s", error, table->path); table->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; + DBUG_RETURN(-1); } - return 0; + DBUG_RETURN(0); } static int join_ft_read_next(READ_RECORD *info) { int error=info->file->ft_read(info->table->record[0]); + DBUG_ENTER("join_ft_read_next"); + if (error) { if (error != HA_ERR_END_OF_FILE) @@ -4926,11 +5028,11 @@ join_ft_read_next(READ_RECORD *info) sql_print_error("ft_read_next: Got error %d when reading table %s", error, info->table->path); info->file->print_error(error,MYF(0)); - return 1; + DBUG_RETURN(1); } - return -1; + DBUG_RETURN(-1); } - return 0; + DBUG_RETURN(0); } @@ -5347,6 +5449,8 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), static bool test_if_ref(Item_field *left_item,Item *right_item) { Field *field=left_item->field; + DBUG_ENTER("test_if_ref"); + // No need to change const test. We also have to keep tests on LEFT JOIN if (!field->table->const_table && !field->table->maybe_null) { @@ -5354,7 +5458,7 @@ static bool test_if_ref(Item_field *left_item,Item *right_item) if (ref_item && ref_item->eq(right_item,1)) { if (right_item->type() == Item::FIELD_ITEM) - return (field->eq_def(((Item_field *) right_item)->field)); + DBUG_RETURN((field->eq_def(((Item_field *) right_item)->field))); if (right_item->const_item() && !(right_item->is_null())) { /* @@ -5364,27 +5468,29 @@ static bool test_if_ref(Item_field *left_item,Item *right_item) if (field->binary() && (field->type() != FIELD_TYPE_FLOAT || field->decimals() == 0)) { - return !store_val_in_field(field,right_item); + DBUG_RETURN(!store_val_in_field(field,right_item)); } } } } - return 0; // keep test + DBUG_RETURN(0); // keep test } static COND * make_cond_for_table(COND *cond,table_map tables,table_map used_table) { + DBUG_ENTER("make_cond_for_table"); + if (used_table && !(cond->used_tables() & used_table)) - return (COND*) 0; // Already checked + DBUG_RETURN((COND*) 0); // Already checked if (cond->type() == Item::COND_ITEM) { if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC) { Item_cond_and *new_cond=new Item_cond_and; if (!new_cond) - return (COND*) 0; // OOM /* purecov: inspected */ + DBUG_RETURN((COND*) 0); // OOM /* purecov: inspected */ List_iterator li(*((Item_cond*) cond)->argument_list()); Item *item; while ((item=li++)) @@ -5395,31 +5501,31 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) } switch (new_cond->argument_list()->elements) { case 0: - return (COND*) 0; // Always true + DBUG_RETURN((COND*) 0); // Always true case 1: - return new_cond->argument_list()->head(); + DBUG_RETURN(new_cond->argument_list()->head()); default: new_cond->used_tables_cache=((Item_cond*) cond)->used_tables_cache & tables; - return new_cond; + DBUG_RETURN(new_cond); } } else { // Or list Item_cond_or *new_cond=new Item_cond_or; if (!new_cond) - return (COND*) 0; // OOM /* purecov: inspected */ + DBUG_RETURN((COND*) 0); // OOM /* purecov: inspected */ List_iterator li(*((Item_cond*) cond)->argument_list()); Item *item; while ((item=li++)) { Item *fix=make_cond_for_table(item,tables,0L); if (!fix) - return (COND*) 0; // Always true + DBUG_RETURN((COND*) 0); // Always true new_cond->argument_list()->push_back(fix); } new_cond->used_tables_cache=((Item_cond_or*) cond)->used_tables_cache; - return new_cond; + DBUG_RETURN(new_cond); } } @@ -5430,9 +5536,9 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) */ if (cond->marker == 3 || (cond->used_tables() & ~tables)) - return (COND*) 0; // Can't check this yet + DBUG_RETURN((COND*) 0); // Can't check this yet if (cond->marker == 2 || cond->eq_cmp_result() == Item::COND_OK) - return cond; // Not boolean op + DBUG_RETURN(cond); // Not boolean op if (((Item_func*) cond)->functype() == Item_func::EQ_FUNC) { @@ -5442,23 +5548,25 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) test_if_ref((Item_field*) left_item,right_item)) { cond->marker=3; // Checked when read - return (COND*) 0; + DBUG_RETURN((COND*) 0); } if (right_item->type() == Item::FIELD_ITEM && test_if_ref((Item_field*) right_item,left_item)) { cond->marker=3; // Checked when read - return (COND*) 0; + DBUG_RETURN((COND*) 0); } } cond->marker=2; - return cond; + DBUG_RETURN(cond); } static Item * part_of_refkey(TABLE *table,Field *field) { uint ref_parts=table->reginfo.join_tab->ref.key_parts; + DBUG_ENTER("part_of_refkey"); + if (ref_parts) { KEY_PART_INFO *key_part= @@ -5467,9 +5575,9 @@ part_of_refkey(TABLE *table,Field *field) for (uint part=0 ; part < ref_parts ; part++,key_part++) if (field->eq(key_part->field) && !(key_part->key_part_flag & HA_PART_KEY)) - return table->reginfo.join_tab->ref.items[part]; + DBUG_RETURN(table->reginfo.join_tab->ref.items[part]); } - return (Item*) 0; + DBUG_RETURN((Item*) 0); } @@ -5485,6 +5593,8 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, uint *used_key_parts) { KEY_PART_INFO *key_part,*key_part_end; + DBUG_ENTER("test_if_order_by_key"); + key_part=table->key_info[idx].key_part; key_part_end=key_part+table->key_info[idx].key_parts; key_part_map const_key_parts=table->const_key_parts[idx]; @@ -5504,24 +5614,26 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, key_part++; const_key_parts>>=1; } if (key_part == key_part_end || key_part->field != field) - return 0; + DBUG_RETURN(0); /* set flag to 1 if we can use read-next on key, else to -1 */ flag=(order->asc == !(key_part->key_part_flag & HA_REVERSE_SORT)) ? 1 : -1; if (reverse && flag != reverse) - return 0; + DBUG_RETURN(0); reverse=flag; // Remember if reverse key_part++; } *used_key_parts= (uint) (key_part - table->key_info[idx].key_part); - return reverse; + DBUG_RETURN(reverse); } static uint find_shortest_key(TABLE *table, key_map usable_keys) { uint min_length= (uint) ~0; uint best= MAX_KEY; + DBUG_ENTER("find_shortest_key"); + for (uint nr=0; usable_keys ; usable_keys>>=1, nr++) { if (usable_keys & 1) @@ -5533,7 +5645,7 @@ static uint find_shortest_key(TABLE *table, key_map usable_keys) } } } - return best; + DBUG_RETURN(best); } @@ -5752,6 +5864,8 @@ err: #ifdef NOT_YET static bool fix_having(JOIN *join, Item **having) { + DBUG_ENTER("fix_having"); + (*having)->update_used_tables(); // Some tables may have been const JOIN_TAB *table=&join->join_tab[join->const_tables]; table_map used_tables= join->const_table_map | table->table->map; @@ -5762,20 +5876,20 @@ static bool fix_having(JOIN *join, Item **having) { if (!table->select) if (!(table->select=new SQL_SELECT)) - return 1; + DBUG_RETURN(1); if (!table->select->cond) table->select->cond=sort_table_cond; else // This should never happen if (!(table->select->cond=new Item_cond_and(table->select->cond, sort_table_cond))) - return 1; + DBUG_RETURN(1); table->select_cond=table->select->cond; DBUG_EXECUTE("where",print_where(table->select_cond, "select and having");); *having=make_cond_for_table(*having,~ (table_map) 0,~used_tables); DBUG_EXECUTE("where",print_where(*having,"having after make_cond");); } - return 0; + DBUG_RETURN(0); } #endif @@ -5790,32 +5904,39 @@ static bool fix_having(JOIN *join, Item **having) static bool compare_record(TABLE *table, Field **ptr) { + DBUG_ENTER("compare_record"); + for (; *ptr ; ptr++) { if ((*ptr)->cmp_offset(table->rec_buff_length)) - return 1; + DBUG_RETURN(1); } - return 0; + DBUG_RETURN(0); } static bool copy_blobs(Field **ptr) { + DBUG_ENTER("copy_blobs"); + for (; *ptr ; ptr++) { if ((*ptr)->flags & BLOB_FLAG) if (((Field_blob *) (*ptr))->copy()) - return 1; // Error + DBUG_RETURN(1); // Error } - return 0; + DBUG_RETURN(0); } static void free_blobs(Field **ptr) { + DBUG_ENTER("free_blobs"); + for (; *ptr ; ptr++) { if ((*ptr)->flags & BLOB_FLAG) ((Field_blob *) (*ptr))->free(); } + DBUG_VOID_RETURN; } @@ -6062,7 +6183,7 @@ SORT_FIELD *make_unireg_sortorder(ORDER *order, uint *length) count++; pos=sort=(SORT_FIELD*) sql_alloc(sizeof(SORT_FIELD)*(count+1)); if (!pos) - return 0; + DBUG_RETURN(0); for (;order;order=order->next,pos++) { @@ -6188,13 +6309,15 @@ static ulong used_blob_length(CACHE_FIELD **ptr) { uint length,blob_length; + DBUG_ENTER("used_blob_length"); + for (length=0 ; *ptr ; ptr++) { (*ptr)->blob_length=blob_length=(*ptr)->blob_field->get_length(); length+=blob_length; (*ptr)->blob_field->get_ptr(&(*ptr)->str); } - return length; + DBUG_RETURN(length); } @@ -6205,6 +6328,7 @@ store_record_in_cache(JOIN_CACHE *cache) uchar *pos; CACHE_FIELD *copy,*end_field; bool last_record; + DBUG_ENTER("store_record_in_cache"); pos=cache->pos; end_field=cache->field+cache->fields; @@ -6256,15 +6380,18 @@ store_record_in_cache(JOIN_CACHE *cache) } } cache->pos=pos; - return last_record || (uint) (cache->end -pos) < cache->length; + DBUG_RETURN(last_record || (uint) (cache->end -pos) < cache->length); } static void reset_cache(JOIN_CACHE *cache) { + DBUG_ENTER("reset_cache"); + cache->record_nr=0; cache->pos=cache->buff; + DBUG_VOID_RETURN; } @@ -6275,6 +6402,7 @@ read_cached_record(JOIN_TAB *tab) uint length; bool last_record; CACHE_FIELD *copy,*end_field; + DBUG_ENTER("read_cached_record"); last_record=tab->cache.record_nr++ == tab->cache.ptr_record; pos=tab->cache.pos; @@ -6312,7 +6440,7 @@ read_cached_record(JOIN_TAB *tab) } } tab->cache.pos=pos; - return; + DBUG_VOID_RETURN; } @@ -6320,24 +6448,28 @@ static bool cmp_buffer_with_ref(JOIN_TAB *tab) { bool diff; + DBUG_ENTER("cmp_buffer_with_ref"); + if (!(diff=tab->ref.key_err)) { memcpy(tab->ref.key_buff2, tab->ref.key_buff, tab->ref.key_length); } if ((tab->ref.key_err=cp_buffer_from_ref(&tab->ref)) || diff) - return 1; - return memcmp(tab->ref.key_buff2, tab->ref.key_buff, tab->ref.key_length) - != 0; + DBUG_RETURN(1); + DBUG_RETURN(memcmp(tab->ref.key_buff2, tab->ref.key_buff, tab->ref.key_length) + != 0); } bool cp_buffer_from_ref(TABLE_REF *ref) { + DBUG_ENTER("cp_buffer_from_ref"); + for (store_key **copy=ref->key_copy ; *copy ; copy++) if ((*copy)->copy()) - return 1; // Something went wrong - return 0; + DBUG_RETURN(1); // Something went wrong + DBUG_RETURN(0); } @@ -6355,6 +6487,8 @@ static int find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, List &all_fields) { + DBUG_ENTER("find_order_in_list"); + if ((*order->item)->type() == Item::INT_ITEM) { /* Order by position */ Item *item=0; @@ -6367,11 +6501,11 @@ find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, my_printf_error(ER_BAD_FIELD_ERROR,ER(ER_BAD_FIELD_ERROR), MYF(0),(*order->item)->full_name(), thd->where); - return 1; + DBUG_RETURN(1); } order->item=li.ref(); order->in_field_list=1; - return 0; + DBUG_RETURN(0); } const char *save_where=thd->where; thd->where=0; // No error if not found @@ -6381,14 +6515,14 @@ find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, { order->item=item; // use it order->in_field_list=1; - return 0; + DBUG_RETURN(0); } order->in_field_list=0; if ((*order->item)->fix_fields(thd,tables) || thd->fatal_error) - return 1; // Wrong field + DBUG_RETURN(1); // Wrong field all_fields.push_front(*order->item); // Add new field to field list order->item=(Item**) all_fields.head_ref(); - return 0; + DBUG_RETURN(0); } @@ -6400,13 +6534,15 @@ find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, int setup_order(THD *thd,TABLE_LIST *tables,List &fields, List &all_fields, ORDER *order) { + DBUG_ENTER("setup_order"); + thd->where="order clause"; for (; order; order=order->next) { if (find_order_in_list(thd,tables,order,fields,all_fields)) - return 1; + DBUG_RETURN(1); } - return 0; + DBUG_RETURN(0); } @@ -6414,9 +6550,11 @@ static int setup_group(THD *thd,TABLE_LIST *tables,List &fields, List &all_fields, ORDER *order, bool *hidden_group_fields) { + DBUG_ENTER("setup_group"); + *hidden_group_fields=0; if (!order) - return 0; /* Everything is ok */ + DBUG_RETURN(0); /* Everything is ok */ if (thd->sql_mode & MODE_ONLY_FULL_GROUP_BY) { @@ -6431,13 +6569,13 @@ setup_group(THD *thd,TABLE_LIST *tables,List &fields, for (; order; order=order->next) { if (find_order_in_list(thd,tables,order,fields,all_fields)) - return 1; + DBUG_RETURN(1); (*order->item)->marker=1; /* Mark found */ if ((*order->item)->with_sum_func) { my_printf_error(ER_WRONG_GROUP_FIELD, ER(ER_WRONG_GROUP_FIELD),MYF(0), (*order->item)->full_name()); - return 1; + DBUG_RETURN(1); } } if (thd->sql_mode & MODE_ONLY_FULL_GROUP_BY) @@ -6453,13 +6591,13 @@ setup_group(THD *thd,TABLE_LIST *tables,List &fields, my_printf_error(ER_WRONG_FIELD_WITH_GROUP, ER(ER_WRONG_FIELD_WITH_GROUP), MYF(0),item->full_name()); - return 1; + DBUG_RETURN(1); } } } if (org_fields != all_fields.elements) *hidden_group_fields=1; // group fields is not used - return 0; + DBUG_RETURN(0); } /* @@ -6504,6 +6642,7 @@ create_distinct_group(ORDER *order_list,List &fields) List_iterator li(fields); Item *item; ORDER *order,*group,**prev; + DBUG_ENTER("create_distinct_group"); while ((item=li++)) item->marker=0; /* Marker that field is not used */ @@ -6515,7 +6654,7 @@ create_distinct_group(ORDER *order_list,List &fields) { ORDER *ord=(ORDER*) sql_memdup(order,sizeof(ORDER)); if (!ord) - return 0; + DBUG_RETURN(0); *prev=ord; prev= &ord->next; (*ord->item)->marker=1; @@ -6531,7 +6670,7 @@ create_distinct_group(ORDER *order_list,List &fields) { ORDER *ord=(ORDER*) sql_calloc(sizeof(ORDER)); if (!ord) - return 0; + DBUG_RETURN(0); ord->item=li.ref(); ord->asc=1; *prev=ord; @@ -6539,7 +6678,7 @@ create_distinct_group(ORDER *order_list,List &fields) } } *prev=0; - return group; + DBUG_RETURN(group); } @@ -6553,6 +6692,7 @@ count_field_types(TMP_TABLE_PARAM *param, List &fields, { List_iterator li(fields); Item *field; + DBUG_ENTER("count_field_types"); param->field_count=param->sum_func_count=param->func_count= param->hidden_field_count=0; @@ -6587,6 +6727,7 @@ count_field_types(TMP_TABLE_PARAM *param, List &fields, field->with_sum_func=0; } } + DBUG_VOID_RETURN; } @@ -6599,14 +6740,16 @@ count_field_types(TMP_TABLE_PARAM *param, List &fields, static bool test_if_subpart(ORDER *a,ORDER *b) { + DBUG_ENTER("test_if_subpart"); + for (; a && b; a=a->next,b=b->next) { if ((*a->item)->eq(*b->item,1)) a->asc=b->asc; else - return 0; + DBUG_RETURN(0); } - return test(!b); + DBUG_RETURN(test(!b)); } /* @@ -6649,6 +6792,7 @@ static void calc_group_buffer(JOIN *join,ORDER *group) { uint key_length=0, parts=0, null_parts=0; + DBUG_ENTER("calc_group_buffer"); if (group) join->group= 1; @@ -6675,6 +6819,7 @@ calc_group_buffer(JOIN *join,ORDER *group) join->tmp_table_param.group_length=key_length+null_parts; join->tmp_table_param.group_parts=parts; join->tmp_table_param.group_null_parts=null_parts; + DBUG_VOID_RETURN; } @@ -6686,17 +6831,19 @@ calc_group_buffer(JOIN *join,ORDER *group) static bool alloc_group_fields(JOIN *join,ORDER *group) { + DBUG_ENTER("alloc_group_fields"); + if (group) { for (; group ; group=group->next) { Item_buff *tmp=new_Item_buff(*group->item); if (!tmp || join->group_fields.push_front(tmp)) - return TRUE; + DBUG_RETURN(TRUE); } } join->sort_and_group=1; /* Mark for do_select */ - return FALSE; + DBUG_RETURN(FALSE); } @@ -6706,13 +6853,14 @@ test_if_group_changed(List &list) List_iterator li(list); int idx= -1,i; Item_buff *buff; + DBUG_ENTER("test_if_group_changed"); for (i=(int) list.elements-1 ; (buff=li++) ; i--) { if (buff->cmp()) idx=i; } - return idx; + DBUG_RETURN(idx); } @@ -6798,6 +6946,7 @@ copy_fields(TMP_TABLE_PARAM *param) { Copy_field *ptr=param->copy_field; Copy_field *end=param->copy_field_end; + DBUG_ENTER("copy_fields"); for (; ptr != end; ptr++) (*ptr->do_copy)(ptr); @@ -6807,6 +6956,7 @@ copy_fields(TMP_TABLE_PARAM *param) Item_copy_string *item; while ((item = (Item_copy_string*) it++)) item->copy(); + DBUG_VOID_RETURN; } @@ -6851,6 +7001,7 @@ change_to_use_tmp_fields(List &items) { List_iterator it(items); Item *item_field,*item; + DBUG_ENTER("change_to_use_tmp_fields"); while ((item=it++)) { @@ -6869,7 +7020,7 @@ change_to_use_tmp_fields(List &items) else item_field=(Item*) new Item_field(field); if (!item_field) - return TRUE; // Fatal error + DBUG_RETURN(TRUE); // Fatal error item_field->name=item->name; /*lint -e613 */ #ifndef DBUG_OFF if (_db_on_ && !item_field->name) @@ -6888,7 +7039,7 @@ change_to_use_tmp_fields(List &items) #endif } } - return FALSE; + DBUG_RETURN(FALSE); } @@ -6902,6 +7053,7 @@ change_refs_to_tmp_fields(THD *thd,List &items) { List_iterator it(items); Item *item; + DBUG_ENTER("change_refs_to_tmp_fields"); while ((item= it++)) { @@ -6944,7 +7096,7 @@ change_refs_to_tmp_fields(THD *thd,List &items) ((Item_field*)item)->field=((Item_field*) item)->result_field; } } - return thd->fatal_error; + DBUG_RETURN(thd->fatal_error); } @@ -6957,8 +7109,11 @@ static void init_tmptable_sum_functions(Item_sum **func_ptr) { Item_sum *func; + DBUG_ENTER("init_tmptable_sum_functions"); + while ((func= *(func_ptr++))) func->reset_field(); + DBUG_VOID_RETURN; } @@ -6969,8 +7124,11 @@ update_tmptable_sum_func(Item_sum **func_ptr, TABLE *tmp_table __attribute__((unused))) { Item_sum *func; + DBUG_ENTER("update_tmptable_sum_func"); + while ((func= *(func_ptr++))) func->update_field(0); + DBUG_VOID_RETURN; } @@ -6980,9 +7138,11 @@ static void copy_sum_funcs(Item_sum **func_ptr) { Item_sum *func; + DBUG_ENTER("copy_sum_funcs"); + for (; (func = *func_ptr) ; func_ptr++) (void) func->save_in_field(func->result_field); - return; + DBUG_VOID_RETURN; } @@ -6990,8 +7150,11 @@ static void init_sum_functions(Item_sum **func_ptr) { Item_sum *func; + DBUG_ENTER("init_sum_functions"); + for (; (func= (Item_sum*) *func_ptr) ; func_ptr++) func->reset(); + DBUG_VOID_RETURN; } @@ -6999,10 +7162,12 @@ static bool update_sum_func(Item_sum **func_ptr) { Item_sum *func; + DBUG_ENTER("update_sum_func"); + for (; (func= (Item_sum*) *func_ptr) ; func_ptr++) if (func->add()) - return 1; - return 0; + DBUG_RETURN(1); + DBUG_RETURN(0); } /* Copy result of functions to record in tmp_table */ @@ -7011,9 +7176,11 @@ void copy_funcs(Item_result_field **func_ptr) { Item_result_field *func; + DBUG_ENTER("copy_funcs"); + for (; (func = *func_ptr) ; func_ptr++) (void) func->save_in_field(func->result_field); - return; + DBUG_VOID_RETURN; } @@ -7096,7 +7263,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, field_list.push_back(new Item_real("rows",0.0,0,10)); field_list.push_back(new Item_empty_string("Extra",255)); if (result->send_fields(field_list,1)) - return; + DBUG_VOID_RETURN; } if (message) @@ -7239,11 +7406,12 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, static void describe_info(JOIN *join, const char *info) { THD *thd= join->thd; + DBUG_ENTER("describe_info"); if (thd->lex.select_lex.next) /* If in UNION */ { select_describe(join,FALSE,FALSE,FALSE,info); - return; + DBUG_VOID_RETURN; } List field_list; String *packet= &thd->packet; @@ -7253,9 +7421,10 @@ static void describe_info(JOIN *join, const char *info) QUERY_NO_GOOD_INDEX_USED); field_list.push_back(new Item_empty_string("Comment",80)); if (send_fields(thd,field_list,1)) - return; /* purecov: inspected */ + DBUG_VOID_RETURN; /* purecov: inspected */ packet->length(0); net_store_data(packet,info); if (!my_net_write(&thd->net,(char*) packet->ptr(),packet->length())) send_eof(&thd->net); + DBUG_VOID_RETURN; } From c0309e5a2f2b6f3f060f0a5b5fb781c1206c2c58 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 16:06:11 +0100 Subject: [PATCH 042/246] added DBUG_ENTER/RETURN tags, dbug_add_tags.pl bugfix dbug/dbug_add_tags.pl: small fix sql/ha_myisam.cc: added DBUG_ENTER/RETURN tags sql/ha_myisammrg.cc: added DBUG_ENTER/RETURN tags sql/handler.cc: added DBUG_ENTER/RETURN tags --- dbug/dbug_add_tags.pl | 3 +- sql/ha_myisam.cc | 245 ++++++++++++++++++++++++++++-------------- sql/ha_myisammrg.cc | 103 +++++++++++++----- sql/handler.cc | 131 +++++++++++++++------- 4 files changed, 339 insertions(+), 143 deletions(-) diff --git a/dbug/dbug_add_tags.pl b/dbug/dbug_add_tags.pl index a376fdb2f59..141a2ed85f1 100755 --- a/dbug/dbug_add_tags.pl +++ b/dbug/dbug_add_tags.pl @@ -5,7 +5,7 @@ die "No files specified\n" unless $ARGV[0]; $ctags="exctags -x -f - --c-types=f -u"; sub get_tag { - local $_=; + local $.; local $_=; ($symbol, $line)= /^(.*\S)\s+function\s+(\d+)/; $symbol=$1 if /\s(\S+)\s*\(/; $line=1e50 unless $line; @@ -40,7 +40,6 @@ while($src=shift) warn "$src:".($.-1)."\t$orig" if /\breturn\b/; } print; - next if /DBUG_ENTER/; next if $. < $line; die "Something wrong: \$.=$., \$line=$line, \$symbol=$symbol\n" if $. > $line; &get_tag && next if /^\s*inline /; diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index f96ef7210ac..930eca07895 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -48,6 +48,8 @@ TYPELIB myisam_recover_typelib= {array_elements(myisam_recover_names)-1,"", static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, const char *fmt, va_list args) { + DBUG_ENTER("mi_check_print_msg"); + THD* thd = (THD*)param->thd; String* packet = &thd->packet; uint length; @@ -64,12 +66,12 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, if (thd->net.vio == 0) { sql_print_error(msgbuf); - return; + DBUG_VOID_RETURN; } if (param->testflag & (T_CREATE_MISSING_KEYS | T_SAFE_REPAIR | T_AUTO_REPAIR)) { my_message(ER_NOT_KEYFILE,msgbuf,MYF(MY_WME)); - return; + DBUG_VOID_RETURN; } length=(uint) (strxmov(name, param->db_name,".",param->table_name,NullS) - name); @@ -81,37 +83,46 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, if (my_net_write(&thd->net, (char*)thd->packet.ptr(), thd->packet.length())) sql_print_error("Failed on my_net_write, writing to stderr instead: %s\n", msgbuf); - return; + DBUG_VOID_RETURN; } extern "C" { void mi_check_print_error(MI_CHECK *param, const char *fmt,...) { + DBUG_ENTER("mi_check_print_error"); + param->error_printed|=1; param->out_flag|= O_DATA_LOST; va_list args; va_start(args, fmt); mi_check_print_msg(param, "error", fmt, args); va_end(args); + DBUG_VOID_RETURN; } void mi_check_print_info(MI_CHECK *param, const char *fmt,...) { va_list args; + DBUG_ENTER("mi_check_print_info"); + va_start(args, fmt); mi_check_print_msg(param, "info", fmt, args); va_end(args); + DBUG_VOID_RETURN; } void mi_check_print_warning(MI_CHECK *param, const char *fmt,...) { + DBUG_ENTER("mi_check_print_warning"); + param->warning_printed=1; param->out_flag|= O_DATA_LOST; va_list args; va_start(args, fmt); mi_check_print_msg(param, "warning", fmt, args); va_end(args); + DBUG_VOID_RETURN; } } @@ -122,15 +133,18 @@ const char **ha_myisam::bas_ext() const const char *ha_myisam::index_type(uint key_number) { - return ((table->key_info[key_number].flags & HA_FULLTEXT) ? + DBUG_ENTER("*ha_myisam::index_type"); + + DBUG_RETURN(((table->key_info[key_number].flags & HA_FULLTEXT) ? "FULLTEXT" : - "BTREE"); + "BTREE")); } int ha_myisam::net_read_dump(NET* net) { int data_fd = file->dfile; int error = 0; + DBUG_ENTER("ha_myisam::net_read_dump"); my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)); for (;;) @@ -153,12 +167,14 @@ int ha_myisam::net_read_dump(NET* net) } err: - return error; + DBUG_RETURN(error); } int ha_myisam::dump(THD* thd, int fd) { + DBUG_ENTER("ha_myisam::dump"); + MYISAM_SHARE* share = file->s; NET* net = &thd->net; uint blocksize = share->blocksize; @@ -166,7 +182,7 @@ int ha_myisam::dump(THD* thd, int fd) int data_fd = file->dfile; byte * buf = (byte*) my_malloc(blocksize, MYF(MY_WME)); if (!buf) - return ENOMEM; + DBUG_RETURN(ENOMEM); int error = 0; my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)); @@ -206,15 +222,17 @@ int ha_myisam::dump(THD* thd, int fd) err: my_free((gptr) buf, MYF(0)); - return error; + DBUG_RETURN(error); } /* Name is here without an extension */ int ha_myisam::open(const char *name, int mode, uint test_if_locked) { + DBUG_ENTER("ha_myisam::open"); + if (!(file=mi_open(name, mode, test_if_locked))) - return (my_errno ? my_errno : -1); + DBUG_RETURN((my_errno ? my_errno : -1)); if (test_if_locked & (HA_OPEN_IGNORE_IF_LOCKED | HA_OPEN_TMP_TABLE)) VOID(mi_extra(file, HA_EXTRA_NO_WAIT_LOCK, 0)); @@ -223,18 +241,22 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked) VOID(mi_extra(file, HA_EXTRA_WAIT_LOCK, 0)); if (!table->db_record_offset) int_table_flags|=HA_REC_NOT_IN_SEQ; - return (0); + DBUG_RETURN((0)); } int ha_myisam::close(void) { MI_INFO *tmp=file; + DBUG_ENTER("ha_myisam::close"); + file=0; - return mi_close(tmp); + DBUG_RETURN(mi_close(tmp)); } int ha_myisam::write_row(byte * buf) { + DBUG_ENTER("ha_myisam::write_row"); + statistic_increment(ha_write_count,&LOCK_status); /* If we have a timestamp column, update it to the current time */ @@ -248,12 +270,14 @@ int ha_myisam::write_row(byte * buf) */ if (table->next_number_field && buf == table->record[0]) update_auto_increment(); - return mi_write(file,buf); + DBUG_RETURN(mi_write(file,buf)); } int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) { - if (!file) return HA_ADMIN_INTERNAL_ERROR; + DBUG_ENTER("ha_myisam::check"); + + if (!file) DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR); int error; MI_CHECK param; MYISAM_SHARE* share = file->s; @@ -278,7 +302,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) share->state.open_count == 0) || ((param.testflag & T_FAST) && (share->state.open_count == (uint) (share->global_changed ? 1 : 0))))) - return HA_ADMIN_ALREADY_DONE; + DBUG_RETURN(HA_ADMIN_ALREADY_DONE); error = chk_status(¶m, file); // Not fatal error = chk_size(¶m, file); @@ -331,7 +355,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) } thd->proc_info=old_proc_info; - return error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK; + DBUG_RETURN(error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK); } @@ -345,6 +369,8 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) { int error=0; MI_CHECK param; + DBUG_ENTER("ha_myisam::analyze"); + MYISAM_SHARE* share = file->s; myisamchk_init(¶m); @@ -357,7 +383,7 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) param.using_global_keycache = 1; if (!(share->state.changed & STATE_NOT_ANALYZED)) - return HA_ADMIN_ALREADY_DONE; + DBUG_RETURN(HA_ADMIN_ALREADY_DONE); error = chk_key(¶m, file); if (!error) @@ -368,7 +394,7 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) } else if (!mi_is_crashed(file)) mi_mark_crashed(file); - return error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK; + DBUG_RETURN(error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK); } @@ -380,7 +406,7 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt) char* table_name = table->real_name; int error; const char* errmsg; - DBUG_ENTER("restore"); + DBUG_ENTER("ha_myisam::restore"); if (fn_format_relative_to_data_home(src_path, table_name, backup_dir, MI_NAME_DEXT)) @@ -399,17 +425,15 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt) DBUG_RETURN(repair(thd, &tmp_check_opt)); err: - { - MI_CHECK param; - myisamchk_init(¶m); - param.thd = thd; - param.op_name = (char*)"restore"; - param.db_name = table->table_cache_key; - param.table_name = table->table_name; - param.testflag = 0; - mi_check_print_error(¶m,errmsg, my_errno); - DBUG_RETURN(error); - } + MI_CHECK param; + myisamchk_init(¶m); + param.thd = thd; + param.op_name = (char*)"restore"; + param.db_name = table->table_cache_key; + param.table_name = table->table_name; + param.testflag = 0; + mi_check_print_error(¶m,errmsg, my_errno); + DBUG_RETURN(error); } @@ -460,17 +484,15 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt) DBUG_RETURN(HA_ADMIN_OK); err: - { - MI_CHECK param; - myisamchk_init(¶m); - param.thd = thd; - param.op_name = (char*)"backup"; - param.db_name = table->table_cache_key; - param.table_name = table->table_name; - param.testflag = 0; - mi_check_print_error(¶m,errmsg, my_errno); - DBUG_RETURN(error); - } + MI_CHECK param; + myisamchk_init(¶m); + param.thd = thd; + param.op_name = (char*)"backup"; + param.db_name = table->table_cache_key; + param.table_name = table->table_name; + param.testflag = 0; + mi_check_print_error(¶m,errmsg, my_errno); + DBUG_RETURN(error); } @@ -479,8 +501,9 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt) int error; MI_CHECK param; ha_rows start_records; + DBUG_ENTER("ha_myisam::repair"); - if (!file) return HA_ADMIN_INTERNAL_ERROR; + if (!file) DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR); myisamchk_init(¶m); param.thd = thd; @@ -520,12 +543,14 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt) llstr(start_records, llbuff2), table->path); } - return error; + DBUG_RETURN(error); } int ha_myisam::optimize(THD* thd, HA_CHECK_OPT *check_opt) { - if (!file) return HA_ADMIN_INTERNAL_ERROR; + DBUG_ENTER("ha_myisam::optimize"); + + if (!file) DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR); MI_CHECK param; myisamchk_init(¶m); @@ -534,7 +559,7 @@ int ha_myisam::optimize(THD* thd, HA_CHECK_OPT *check_opt) param.testflag = (check_opt->flags | T_SILENT | T_FORCE_CREATE | T_REP_BY_SORT | T_STATISTICS | T_SORT_INDEX); param.sort_buffer_length= check_opt->sort_buffer_size; - return repair(thd,param,1); + DBUG_RETURN(repair(thd,param,1)); } @@ -669,6 +694,8 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) void ha_myisam::deactivate_non_unique_index(ha_rows rows) { + DBUG_ENTER("ha_myisam::deactivate_non_unique_index"); + MYISAM_SHARE* share = file->s; if (share->state.key_map == ((ulonglong) 1L << share->base.keys)-1) { @@ -690,6 +717,7 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows) } else enable_activate_all_index=0; + DBUG_VOID_RETURN; } @@ -698,7 +726,7 @@ bool ha_myisam::activate_all_index(THD *thd) int error=0; MI_CHECK param; MYISAM_SHARE* share = file->s; - DBUG_ENTER("activate_all_index"); + DBUG_ENTER("ha_myisam::activate_all_index"); mi_extra(file, HA_EXTRA_BULK_INSERT_END, 0); table->bulk_insert= 0; @@ -752,131 +780,165 @@ bool ha_myisam::check_and_repair(THD *thd) bool ha_myisam::is_crashed() const { - return (file->s->state.changed & STATE_CRASHED || - (my_disable_locking && file->s->state.open_count)); + DBUG_ENTER("ha_myisam::is_crashed"); + + DBUG_RETURN((file->s->state.changed & STATE_CRASHED || + (my_disable_locking && file->s->state.open_count))); } int ha_myisam::update_row(const byte * old_data, byte * new_data) { + DBUG_ENTER("ha_myisam::update_row"); + statistic_increment(ha_update_count,&LOCK_status); if (table->time_stamp) update_timestamp(new_data+table->time_stamp-1); - return mi_update(file,old_data,new_data); + DBUG_RETURN(mi_update(file,old_data,new_data)); } int ha_myisam::delete_row(const byte * buf) { + DBUG_ENTER("ha_myisam::delete_row"); + statistic_increment(ha_delete_count,&LOCK_status); - return mi_delete(file,buf); + DBUG_RETURN(mi_delete(file,buf)); } int ha_myisam::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { + DBUG_ENTER("ha_myisam::index_read"); + statistic_increment(ha_read_key_count,&LOCK_status); int error=mi_rkey(file,buf,active_index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { + DBUG_ENTER("ha_myisam::index_read_idx"); + statistic_increment(ha_read_key_count,&LOCK_status); int error=mi_rkey(file,buf,index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::index_read_last(byte * buf, const byte * key, uint key_len) { + DBUG_ENTER("ha_myisam::index_read_last"); + statistic_increment(ha_read_key_count,&LOCK_status); int error=mi_rkey(file,buf,active_index, key, key_len, HA_READ_PREFIX_LAST); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::index_next(byte * buf) { + DBUG_ENTER("ha_myisam::index_next"); + statistic_increment(ha_read_next_count,&LOCK_status); int error=mi_rnext(file,buf,active_index); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::index_prev(byte * buf) { + DBUG_ENTER("ha_myisam::index_prev"); + statistic_increment(ha_read_prev_count,&LOCK_status); int error=mi_rprev(file,buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::index_first(byte * buf) { + DBUG_ENTER("ha_myisam::index_first"); + statistic_increment(ha_read_first_count,&LOCK_status); int error=mi_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::index_last(byte * buf) { + DBUG_ENTER("ha_myisam::index_last"); + statistic_increment(ha_read_last_count,&LOCK_status); int error=mi_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::index_next_same(byte * buf, const byte *key __attribute__((unused)), uint length __attribute__((unused))) { + DBUG_ENTER("ha_myisam::index_next_same"); + statistic_increment(ha_read_next_count,&LOCK_status); int error=mi_rnext_same(file,buf); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::rnd_init(bool scan) { + DBUG_ENTER("ha_myisam::rnd_init"); + if (scan) - return mi_scan_init(file); - return mi_extra(file, HA_EXTRA_RESET, 0); + DBUG_RETURN(mi_scan_init(file)); + DBUG_RETURN(mi_extra(file, HA_EXTRA_RESET, 0)); } int ha_myisam::rnd_next(byte *buf) { + DBUG_ENTER("ha_myisam::rnd_next"); + statistic_increment(ha_read_rnd_next_count,&LOCK_status); int error=mi_scan(file, buf); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisam::restart_rnd_next(byte *buf, byte *pos) { - return rnd_pos(buf,pos); + DBUG_ENTER("ha_myisam::restart_rnd_next"); + + DBUG_RETURN(rnd_pos(buf,pos)); } int ha_myisam::rnd_pos(byte * buf, byte *pos) { + DBUG_ENTER("ha_myisam::rnd_pos"); + statistic_increment(ha_read_rnd_count,&LOCK_status); int error=mi_rrnd(file, buf, ha_get_ptr(pos,ref_length)); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } void ha_myisam::position(const byte* record) { my_off_t position=mi_position(file); + DBUG_ENTER("ha_myisam::position"); + ha_store_ptr(ref, ref_length, position); + DBUG_VOID_RETURN; } void ha_myisam::info(uint flag) { MI_ISAMINFO info; char name_buff[FN_REFLEN]; + DBUG_ENTER("ha_myisam::info"); (void) mi_status(file,&info,flag); if (flag & HA_STATUS_VARIABLE) @@ -930,14 +992,17 @@ void ha_myisam::info(uint flag) update_time = info.update_time; if (flag & HA_STATUS_AUTO) auto_increment_value= info.auto_increment; + DBUG_VOID_RETURN; } int ha_myisam::extra(enum ha_extra_function operation) { + DBUG_ENTER("ha_myisam::extra"); + if ((specialflag & SPECIAL_SAFE_MODE) && operation == HA_EXTRA_KEYREAD) - return 0; - return mi_extra(file, operation, 0); + DBUG_RETURN(0); + DBUG_RETURN(mi_extra(file, operation, 0)); } @@ -945,34 +1010,44 @@ int ha_myisam::extra(enum ha_extra_function operation) int ha_myisam::extra_opt(enum ha_extra_function operation, ulong cache_size) { + DBUG_ENTER("ha_myisam::extra_opt"); + if ((specialflag & SPECIAL_SAFE_MODE) & (operation == HA_EXTRA_WRITE_CACHE || operation == HA_EXTRA_BULK_INSERT_BEGIN)) - return 0; - return mi_extra(file, operation, (void*) &cache_size); + DBUG_RETURN(0); + DBUG_RETURN(mi_extra(file, operation, (void*) &cache_size)); } int ha_myisam::reset(void) { - return mi_extra(file, HA_EXTRA_RESET, 0); + DBUG_ENTER("ha_myisam::reset"); + + DBUG_RETURN(mi_extra(file, HA_EXTRA_RESET, 0)); } int ha_myisam::delete_all_rows() { - return mi_delete_all_rows(file); + DBUG_ENTER("ha_myisam::delete_all_rows"); + + DBUG_RETURN(mi_delete_all_rows(file)); } int ha_myisam::delete_table(const char *name) { - return mi_delete_table(name); + DBUG_ENTER("ha_myisam::delete_table"); + + DBUG_RETURN(mi_delete_table(name)); } int ha_myisam::external_lock(THD *thd, int lock_type) { + DBUG_ENTER("ha_myisam::external_lock"); + if (!table->tmp_table) - return mi_lock_database(file,lock_type); - return 0; + DBUG_RETURN(mi_lock_database(file,lock_type)); + DBUG_RETURN(0); } @@ -980,14 +1055,18 @@ THR_LOCK_DATA **ha_myisam::store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) { + DBUG_ENTER("**ha_myisam::store_lock"); + if (lock_type != TL_IGNORE && file->lock.type == TL_UNLOCK) file->lock.type=lock_type; *to++= &file->lock; - return to; + DBUG_RETURN(to); } void ha_myisam::update_create_info(HA_CREATE_INFO *create_info) { + DBUG_ENTER("ha_myisam::update_create_info"); + table->file->info(HA_STATUS_AUTO | HA_STATUS_CONST); if (!(create_info->used_fields & HA_CREATE_USED_AUTO)) { @@ -1001,6 +1080,7 @@ void ha_myisam::update_create_info(HA_CREATE_INFO *create_info) } create_info->data_file_name=data_file_name; create_info->index_file_name=index_file_name; + DBUG_VOID_RETURN; } @@ -1196,16 +1276,20 @@ int ha_myisam::create(const char *name, register TABLE *table, int ha_myisam::rename_table(const char * from, const char * to) { - return mi_rename(from,to); + DBUG_ENTER("ha_myisam::rename_table"); + + DBUG_RETURN(mi_rename(from,to)); } longlong ha_myisam::get_auto_increment() { + DBUG_ENTER("ha_myisam::get_auto_increment"); + if (!table->next_number_key_offset) { // Autoincrement at key-start ha_myisam::info(HA_STATUS_AUTO); - return auto_increment_value; + DBUG_RETURN(auto_increment_value); } if (table->bulk_insert) @@ -1226,7 +1310,7 @@ longlong ha_myisam::get_auto_increment() nr=(longlong) table->next_number_field->val_int_offset(table->rec_buff_length)+1; extra(HA_EXTRA_NO_KEYREAD); - return nr; + DBUG_RETURN(nr); } @@ -1236,25 +1320,28 @@ ha_rows ha_myisam::records_in_range(int inx, const byte *end_key,uint end_key_len, enum ha_rkey_function end_search_flag) { - return (ha_rows) mi_records_in_range(file, + DBUG_ENTER("ha_myisam::records_in_range"); + + DBUG_RETURN((ha_rows) mi_records_in_range(file, inx, start_key,start_key_len, start_search_flag, end_key,end_key_len, - end_search_flag); + end_search_flag)); } int ha_myisam::ft_read(byte * buf) { int error; + DBUG_ENTER("ha_myisam::ft_read"); if (!ft_handler) - return -1; + DBUG_RETURN(-1); thread_safe_increment(ha_read_next_count,&LOCK_status); // why ? error=ft_handler->please->read_next(ft_handler,(char*) buf); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index c35bf657445..bba59dd49eb 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -38,12 +38,14 @@ const char **ha_myisammrg::bas_ext() const int ha_myisammrg::open(const char *name, int mode, uint test_if_locked) { char name_buff[FN_REFLEN]; + DBUG_ENTER("ha_myisammrg::open"); + DBUG_PRINT("info", ("ha_myisammrg::open")); if (!(file=myrg_open(fn_format(name_buff,name,"","",2 | 4), mode, test_if_locked))) { DBUG_PRINT("info", ("ha_myisammrg::open exit %d", my_errno)); - return (my_errno ? my_errno : -1); + DBUG_RETURN((my_errno ? my_errno : -1)); } DBUG_PRINT("info", ("ha_myisammrg::open myrg_extrafunc...")) myrg_extrafunc(file, query_cache_invalidate_by_MyISAM_filename_ref); @@ -65,132 +67,165 @@ int ha_myisammrg::open(const char *name, int mode, uint test_if_locked) if (table->crashed) goto err; #endif - return (0); + DBUG_RETURN((0)); err: myrg_close(file); file=0; - return (my_errno= HA_ERR_WRONG_TABLE_DEF); + DBUG_RETURN((my_errno= HA_ERR_WRONG_TABLE_DEF)); } int ha_myisammrg::close(void) { - return myrg_close(file); + DBUG_ENTER("ha_myisammrg::close"); + + DBUG_RETURN(myrg_close(file)); } int ha_myisammrg::write_row(byte * buf) { + DBUG_ENTER("ha_myisammrg::write_row"); + statistic_increment(ha_write_count,&LOCK_status); if (table->time_stamp) update_timestamp(buf+table->time_stamp-1); if (table->next_number_field && buf == table->record[0]) update_auto_increment(); - return myrg_write(file,buf); + DBUG_RETURN(myrg_write(file,buf)); } int ha_myisammrg::update_row(const byte * old_data, byte * new_data) { + DBUG_ENTER("ha_myisammrg::update_row"); + statistic_increment(ha_update_count,&LOCK_status); if (table->time_stamp) update_timestamp(new_data+table->time_stamp-1); - return myrg_update(file,old_data,new_data); + DBUG_RETURN(myrg_update(file,old_data,new_data)); } int ha_myisammrg::delete_row(const byte * buf) { + DBUG_ENTER("ha_myisammrg::delete_row"); + statistic_increment(ha_delete_count,&LOCK_status); - return myrg_delete(file,buf); + DBUG_RETURN(myrg_delete(file,buf)); } int ha_myisammrg::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { + DBUG_ENTER("ha_myisammrg::index_read"); + statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,active_index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { + DBUG_ENTER("ha_myisammrg::index_read_idx"); + statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisammrg::index_read_last(byte * buf, const byte * key, uint key_len) { + DBUG_ENTER("ha_myisammrg::index_read_last"); + statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,active_index, key, key_len, HA_READ_PREFIX_LAST); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisammrg::index_next(byte * buf) { + DBUG_ENTER("ha_myisammrg::index_next"); + statistic_increment(ha_read_next_count,&LOCK_status); int error=myrg_rnext(file,buf,active_index); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisammrg::index_prev(byte * buf) { + DBUG_ENTER("ha_myisammrg::index_prev"); + statistic_increment(ha_read_prev_count,&LOCK_status); int error=myrg_rprev(file,buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisammrg::index_first(byte * buf) { + DBUG_ENTER("ha_myisammrg::index_first"); + statistic_increment(ha_read_first_count,&LOCK_status); int error=myrg_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisammrg::index_last(byte * buf) { + DBUG_ENTER("ha_myisammrg::index_last"); + statistic_increment(ha_read_last_count,&LOCK_status); int error=myrg_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisammrg::rnd_init(bool scan) { - return myrg_extra(file,HA_EXTRA_RESET,0); + DBUG_ENTER("ha_myisammrg::rnd_init"); + + DBUG_RETURN(myrg_extra(file,HA_EXTRA_RESET,0)); } int ha_myisammrg::rnd_next(byte *buf) { + DBUG_ENTER("ha_myisammrg::rnd_next"); + statistic_increment(ha_read_rnd_next_count,&LOCK_status); int error=myrg_rrnd(file, buf, HA_OFFSET_ERROR); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } int ha_myisammrg::rnd_pos(byte * buf, byte *pos) { + DBUG_ENTER("ha_myisammrg::rnd_pos"); + statistic_increment(ha_read_rnd_count,&LOCK_status); int error=myrg_rrnd(file, buf, ha_get_ptr(pos,ref_length)); table->status=error ? STATUS_NOT_FOUND: 0; - return error; + DBUG_RETURN(error); } void ha_myisammrg::position(const byte *record) { ulonglong position= myrg_position(file); + DBUG_ENTER("ha_myisammrg::position"); + ha_store_ptr(ref, ref_length, (my_off_t) position); + DBUG_VOID_RETURN; } void ha_myisammrg::info(uint flag) { MYMERGE_INFO info; + DBUG_ENTER("ha_myisammrg::info"); + (void) myrg_status(file,&info,flag); /* The following fails if one has not compiled MySQL with -DBIG_TABLES @@ -216,17 +251,20 @@ void ha_myisammrg::info(uint flag) #else ref_length=4; // Can't be > than my_off_t #endif + DBUG_VOID_RETURN; } int ha_myisammrg::extra(enum ha_extra_function operation) { + DBUG_ENTER("ha_myisammrg::extra"); + /* As this is just a mapping, we don't have to force the underlying tables to be closed */ if (operation == HA_EXTRA_FORCE_REOPEN || operation == HA_EXTRA_PREPARE_FOR_DELETE) - return 0; - return myrg_extra(file,operation,0); + DBUG_RETURN(0); + DBUG_RETURN(myrg_extra(file,operation,0)); } @@ -234,27 +272,35 @@ int ha_myisammrg::extra(enum ha_extra_function operation) int ha_myisammrg::extra_opt(enum ha_extra_function operation, ulong cache_size) { + DBUG_ENTER("ha_myisammrg::extra_opt"); + if ((specialflag & SPECIAL_SAFE_MODE) & (operation == HA_EXTRA_WRITE_CACHE || operation == HA_EXTRA_BULK_INSERT_BEGIN)) - return 0; - return myrg_extra(file, operation, (void*) &cache_size); + DBUG_RETURN(0); + DBUG_RETURN(myrg_extra(file, operation, (void*) &cache_size)); } int ha_myisammrg::reset(void) { - return myrg_extra(file,HA_EXTRA_RESET,0); + DBUG_ENTER("ha_myisammrg::reset"); + + DBUG_RETURN(myrg_extra(file,HA_EXTRA_RESET,0)); } int ha_myisammrg::external_lock(THD *thd, int lock_type) { - return myrg_lock_database(file,lock_type); + DBUG_ENTER("ha_myisammrg::external_lock"); + + DBUG_RETURN(myrg_lock_database(file,lock_type)); } uint ha_myisammrg::lock_count(void) const { - return file->tables; + DBUG_ENTER("ha_myisammrg::lock_count"); + + DBUG_RETURN(file->tables); } @@ -263,6 +309,7 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd, enum thr_lock_type lock_type) { MYRG_TABLE *table; + DBUG_ENTER("**ha_myisammrg::store_lock"); for (table=file->open_tables ; table != file->end_table ; table++) { @@ -270,13 +317,14 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd, if (lock_type != TL_IGNORE && table->table->lock.type == TL_UNLOCK) table->table->lock.type=lock_type; } - return to; + DBUG_RETURN(to); } void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info) { - // [phi] auto_increment stuff is missing (but currently not needed) DBUG_ENTER("ha_myisammrg::update_create_info"); + + // [phi] auto_increment stuff is missing (but currently not needed) if (!(create_info->used_fields & HA_CREATE_USED_UNION)) { MYRG_TABLE *table; @@ -334,6 +382,8 @@ int ha_myisammrg::create(const char *name, register TABLE *form, void ha_myisammrg::append_create_info(String *packet) { char buff[FN_REFLEN]; + DBUG_ENTER("ha_myisammrg::append_create_info"); + if (file->merge_insert_method != MERGE_INSERT_DISABLED) { packet->append(" INSERT_METHOD=",15); @@ -351,4 +401,5 @@ void ha_myisammrg::append_create_info(String *packet) packet->append(buff,(uint) strlen(buff)); } packet->append(')'); + DBUG_VOID_RETURN; } diff --git a/sql/handler.cc b/sql/handler.cc index 7aba6817eca..4a43186103c 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -72,14 +72,16 @@ TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"", enum db_type ha_checktype(enum db_type database_type) { + DBUG_ENTER("ha_checktype"); + switch (database_type) { #ifdef HAVE_BERKELEY_DB case DB_TYPE_BERKELEY_DB: - return(berkeley_skip ? DB_TYPE_MYISAM : database_type); + DBUG_RETURN((berkeley_skip ? DB_TYPE_MYISAM : database_type)); #endif #ifdef HAVE_INNOBASE_DB case DB_TYPE_INNODB: - return(innodb_skip ? DB_TYPE_MYISAM : database_type); + DBUG_RETURN((innodb_skip ? DB_TYPE_MYISAM : database_type)); #endif #ifndef NO_HASH case DB_TYPE_HASH: @@ -91,52 +93,57 @@ enum db_type ha_checktype(enum db_type database_type) case DB_TYPE_HEAP: case DB_TYPE_MYISAM: case DB_TYPE_MRG_MYISAM: - return (database_type); /* Database exists on system */ + DBUG_RETURN((database_type)); /* Database exists on system */ default: break; } - return(DB_TYPE_MYISAM); /* Use this as default */ + DBUG_RETURN((DB_TYPE_MYISAM)); /* Use this as default */ } /* ha_checktype */ handler *get_new_handler(TABLE *table, enum db_type db_type) { + DBUG_ENTER("*get_new_handler"); + switch (db_type) { #ifndef NO_HASH - return new ha_hash(table); + DBUG_RETURN(new ha_hash(table)); #endif #ifdef HAVE_ISAM case DB_TYPE_MRG_ISAM: - return new ha_isammrg(table); + DBUG_RETURN(new ha_isammrg(table)); case DB_TYPE_ISAM: - return new ha_isam(table); + DBUG_RETURN(new ha_isam(table)); #endif #ifdef HAVE_BERKELEY_DB case DB_TYPE_BERKELEY_DB: - return new ha_berkeley(table); + DBUG_RETURN(new ha_berkeley(table)); #endif #ifdef HAVE_INNOBASE_DB case DB_TYPE_INNODB: - return new ha_innobase(table); + DBUG_RETURN(new ha_innobase(table)); #endif case DB_TYPE_HEAP: - return new ha_heap(table); + DBUG_RETURN(new ha_heap(table)); case DB_TYPE_MYISAM: default: // should never happen - return new ha_myisam(table); + DBUG_RETURN(new ha_myisam(table)); case DB_TYPE_MRG_MYISAM: - return new ha_myisammrg(table); + DBUG_RETURN(new ha_myisammrg(table)); } + DBUG_RETURN(NULL); // impossible } int ha_init() { + DBUG_ENTER("ha_init"); + #ifdef HAVE_BERKELEY_DB if (!berkeley_skip) { int error; if ((error=berkeley_init())) - return error; + DBUG_RETURN(error); if (!berkeley_skip) // If we couldn't use handler opt_using_transactions=1; else @@ -147,14 +154,14 @@ int ha_init() if (!innodb_skip) { if (innobase_init()) - return -1; + DBUG_RETURN(-1); if (!innodb_skip) // If we couldn't use handler opt_using_transactions=1; else have_innodb=SHOW_OPTION_DISABLED; } #endif - return 0; + DBUG_RETURN(0); } /* close, flush or restart databases */ @@ -163,6 +170,8 @@ int ha_init() int ha_panic(enum ha_panic_function flag) { int error=0; + DBUG_ENTER("ha_panic"); + #ifndef NO_HASH error|=h_panic(flag); /* fix hash */ #endif @@ -181,23 +190,29 @@ int ha_panic(enum ha_panic_function flag) if (!innodb_skip) error|=innobase_end(); #endif - return error; + DBUG_RETURN(error); } /* ha_panic */ void ha_drop_database(char* path) { + DBUG_ENTER("ha_drop_database"); + #ifdef HAVE_INNOBASE_DB if (!innodb_skip) innobase_drop_database(path); #endif + DBUG_VOID_RETURN; } void ha_close_connection(THD* thd) { + DBUG_ENTER("ha_close_connection"); + #ifdef HAVE_INNOBASE_DB if (!innodb_skip) innobase_close_connection(thd); #endif + DBUG_VOID_RETURN; } /* @@ -247,6 +262,8 @@ int ha_report_binlog_offset_and_commit(THD *thd, my_off_t end_offset) { int error= 0; + DBUG_ENTER("ha_report_binlog_offset_and_commit"); + #ifdef HAVE_INNOBASE_DB THD_TRANS *trans; trans = &thd->transaction.all; @@ -263,7 +280,7 @@ int ha_report_binlog_offset_and_commit(THD *thd, trans->innodb_active_trans=0; } #endif - return error; + DBUG_RETURN(error); } int ha_commit_trans(THD *thd, THD_TRANS* trans) @@ -380,6 +397,8 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans) bool ha_flush_logs() { bool result=0; + DBUG_ENTER("ha_flush_logs"); + #ifdef HAVE_BERKELEY_DB if (!berkeley_skip && berkeley_flush_logs()) result=1; @@ -388,7 +407,7 @@ bool ha_flush_logs() if (!innodb_skip && innobase_flush_logs()) result=1; #endif - return result; + DBUG_RETURN(result); } /* @@ -399,15 +418,19 @@ bool ha_flush_logs() int ha_delete_table(enum db_type table_type, const char *path) { handler *file=get_new_handler((TABLE*) 0, table_type); + DBUG_ENTER("ha_delete_table"); + if (!file) - return ENOENT; + DBUG_RETURN(ENOENT); int error=file->delete_table(path); delete file; - return error; + DBUG_RETURN(error); } void ha_store_ptr(byte *buff, uint pack_length, my_off_t pos) { + DBUG_ENTER("ha_store_ptr"); + switch (pack_length) { #if SIZEOF_OFF_T > 4 case 8: mi_int8store(buff,pos); break; @@ -420,12 +443,14 @@ void ha_store_ptr(byte *buff, uint pack_length, my_off_t pos) case 2: mi_int2store(buff,(uint) pos); break; case 1: buff[0]= (uchar) pos; break; } - return; + DBUG_VOID_RETURN; } my_off_t ha_get_ptr(byte *ptr, uint pack_length) { my_off_t pos; + DBUG_ENTER("ha_get_ptr"); + switch (pack_length) { #if SIZEOF_OFF_T > 4 case 8: @@ -457,7 +482,7 @@ my_off_t ha_get_ptr(byte *ptr, uint pack_length) pos=0; // Impossible break; } - return pos; + DBUG_RETURN(pos); } /**************************************************************************** @@ -511,32 +536,44 @@ int handler::ha_open(const char *name, int mode, int test_if_locked) int handler::check(THD* thd, HA_CHECK_OPT* check_opt) { - return HA_ADMIN_NOT_IMPLEMENTED; + DBUG_ENTER("handler::check"); + + DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); } int handler::backup(THD* thd, HA_CHECK_OPT* check_opt) { - return HA_ADMIN_NOT_IMPLEMENTED; + DBUG_ENTER("handler::backup"); + + DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); } int handler::restore(THD* thd, HA_CHECK_OPT* check_opt) { - return HA_ADMIN_NOT_IMPLEMENTED; + DBUG_ENTER("handler::restore"); + + DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); } int handler::repair(THD* thd, HA_CHECK_OPT* check_opt) { - return HA_ADMIN_NOT_IMPLEMENTED; + DBUG_ENTER("handler::repair"); + + DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); } int handler::optimize(THD* thd, HA_CHECK_OPT* check_opt) { - return HA_ADMIN_NOT_IMPLEMENTED; + DBUG_ENTER("handler::optimize"); + + DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); } int handler::analyze(THD* thd, HA_CHECK_OPT* check_opt) { - return HA_ADMIN_NOT_IMPLEMENTED; + DBUG_ENTER("handler::analyze"); + + DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); } /* @@ -581,7 +618,9 @@ int handler::read_first_row(byte * buf, uint primary_key) int handler::restart_rnd_next(byte *buf, byte *pos) { - return HA_ERR_WRONG_COMMAND; + DBUG_ENTER("handler::restart_rnd_next"); + + DBUG_RETURN(HA_ERR_WRONG_COMMAND); } @@ -590,6 +629,8 @@ int handler::restart_rnd_next(byte *buf, byte *pos) void handler::update_timestamp(byte *record) { long skr= (long) current_thd->query_start(); + DBUG_ENTER("handler::update_timestamp"); + #ifdef WORDS_BIGENDIAN if (table->db_low_byte_first) { @@ -598,7 +639,7 @@ void handler::update_timestamp(byte *record) else #endif longstore(record,skr); - return; + DBUG_VOID_RETURN; } /* @@ -632,6 +673,7 @@ longlong handler::get_auto_increment() { longlong nr; int error; + DBUG_ENTER("handler::get_auto_increment"); (void) extra(HA_EXTRA_KEYREAD); index_init(table->next_number_index); @@ -655,7 +697,7 @@ longlong handler::get_auto_increment() val_int_offset(table->rec_buff_length)+1; index_end(); (void) extra(HA_EXTRA_NO_KEYREAD); - return nr; + DBUG_RETURN(nr); } /* Print error that we got from handler function */ @@ -777,6 +819,8 @@ uint handler::get_dup_key(int error) int handler::delete_table(const char *name) { int error=0; + DBUG_ENTER("handler::delete_table"); + for (const char **ext=bas_ext(); *ext ; ext++) { if (delete_file(name,*ext,2)) @@ -785,7 +829,7 @@ int handler::delete_table(const char *name) break; } } - return error; + DBUG_RETURN(error); } @@ -806,14 +850,16 @@ int handler::rename_table(const char * from, const char * to) int ha_recovery_logging(THD *thd, bool on) { int error=0; - DBUG_ENTER("ha_recovery_logging"); + DBUG_RETURN(error); } int handler::index_next_same(byte *buf, const byte *key, uint keylen) { int error; + DBUG_ENTER("handler::index_next_same"); + if (!(error=index_next(buf))) { if (key_cmp(table, key, active_index, keylen)) @@ -822,7 +868,7 @@ int handler::index_next_same(byte *buf, const byte *key, uint keylen) error=HA_ERR_END_OF_FILE; } } - return error; + DBUG_RETURN(error); } @@ -835,7 +881,9 @@ int handler::index_next_same(byte *buf, const byte *key, uint keylen) int handler::delete_all_rows() { - return (my_errno=HA_ERR_WRONG_COMMAND); + DBUG_ENTER("handler::delete_all_rows"); + + DBUG_RETURN((my_errno=HA_ERR_WRONG_COMMAND)); } /**************************************************************************** @@ -881,26 +929,37 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info, void ha_key_cache(void) { + DBUG_ENTER("ha_key_cache"); + if (keybuff_size) (void) init_key_cache(keybuff_size); + DBUG_VOID_RETURN; } void ha_resize_key_cache(void) { + DBUG_ENTER("ha_resize_key_cache"); + (void) resize_key_cache(keybuff_size); + DBUG_VOID_RETURN; } static int NEAR_F delete_file(const char *name,const char *ext,int extflag) { char buff[FN_REFLEN]; + DBUG_ENTER("delete_file"); + VOID(fn_format(buff,name,"",ext,extflag | 4)); - return(my_delete_with_symlink(buff,MYF(MY_WME))); + DBUG_RETURN((my_delete_with_symlink(buff,MYF(MY_WME)))); } void st_ha_check_opt::init() { + DBUG_ENTER("st_ha_check_opt::init"); + flags= sql_flags= 0; sort_buffer_size = current_thd->variables.myisam_sort_buff_size; + DBUG_VOID_RETURN; } From 781c7901cbe120bec3776fcec23fe6fc13ca1e64 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 18:38:27 +0100 Subject: [PATCH 043/246] updated test results --- mysql-test/r/merge.result | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 3c4793a36c5..c6546d8cac6 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -541,3 +541,23 @@ select max(b) from t1 where a = 2; max(b) 1 drop table if exists t,t1,t2; +drop table if exists t1, t2, t3, t4, t5, t6; +create table t1 (a int not null); +create table t2 (a int not null); +insert into t1 values (1); +insert into t2 values (2); +create temporary table t3 (a int not null) TYPE=MERGE UNION=(t1,t2); +select * from t3; +a +1 +2 +create temporary table t4 (a int not null); +create temporary table t5 (a int not null); +insert into t4 values (1); +insert into t5 values (2); +create temporary table t6 (a int not null) TYPE=MERGE UNION=(t4,t5); +select * from t6; +a +1 +2 +drop table if exists t1, t2, t3, t4, t5, t6; From 841fa6f694a5d998b94a6cd4508fe7d26e8407f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 22:45:42 +0200 Subject: [PATCH 044/246] Removed wrong patch to fix DATE BETWEEN TIMESTAMP1 AND TIMESTAMP2 Some simple optimizations Docs/manual.texi: Updted how binary log works mysql-test/mysql-test-run.sh: Added usage of --port to mysqltest mysql-test/r/func_test.result: Moved test of datetime comparison to func_time mysql-test/r/func_time.result: New test mysql-test/t/func_test.test: Moved test of datetime comparison to func_time mysql-test/t/func_time.test: Test of DATE BETWEEN TIMESTAMPS sql/field.h: Removed wrong patch sql/item_cmpfunc.cc: Removed wrong patch (Need to be fixed by taking into account all arguments to between) sql/lock.cc: Removed call to current_thd sql/set_var.cc: Don't show 'socket' variable if sockets are not used sql/sql_base.cc: Simple optimisation --- Docs/manual.texi | 14 +++++++++----- mysql-test/mysql-test-run.sh | 2 +- mysql-test/r/func_test.result | 14 -------------- mysql-test/r/func_time.result | 17 ++++++++++++++++- mysql-test/t/func_test.test | 10 ---------- mysql-test/t/func_time.test | 19 ++++++++++++++++++- sql/field.h | 1 - sql/item_cmpfunc.cc | 1 - sql/lock.cc | 7 +++---- sql/set_var.cc | 2 ++ sql/sql_base.cc | 2 +- 11 files changed, 50 insertions(+), 39 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index 1e1c080d6b3..049f4099eef 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -23510,17 +23510,21 @@ will be logged in the execution order. Updates to non-transactional tables are stored in the binary log immediately after execution. For transactional tables such as @code{BDB} or @code{InnoDB} tables, all updates (@code{UPDATE}, @code{DELETE} -or @code{INSERT}) that change tables are cached until a @code{COMMIT}. +or @code{INSERT}) that change tables are cached until a @code{COMMIT} command +is sent to the server. At this point mysqld writes the whole transaction to +the binary log before the @code{COMMIT} is executed. Every thread will, on start, allocate a buffer of @code{binlog_cache_size} to buffer queries. If a query is bigger than this, the thread will open -a temporary file to handle the bigger cache. The temporary file will +a temporary file to store the transcation. The temporary file will be deleted when the thread ends. -The @code{max_binlog_cache_size} can be used to restrict the total size used -to cache a multi-query transaction. +The @code{max_binlog_cache_size} (default 4G) can be used to restrict +the total size used to cache a multi-query transaction. If a transaction is +bigger than this it will fail and roll back. If you are using the update or binary log, concurrent inserts will -not work together with @code{CREATE ... SELECT} and @code{INSERT ... SELECT}. +be converted to normal inserts when using @code{CREATE ... SELECT} and +@code{INSERT ... SELECT}. This is to ensure that you can recreate an exact copy of your tables by applying the log on a backup. diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index ac312af02cb..4317ba0e749 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -468,7 +468,7 @@ fi MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \ --user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \ - --tmpdir=$MYSQL_TMP_DIR" + --tmpdir=$MYSQL_TMP_DIR --port=$MASTER_MYPORT" MYSQL_TEST_BIN=$MYSQL_TEST MYSQL_TEST="$MYSQL_TEST $MYSQL_TEST_ARGS" GDB_CLIENT_INIT=$MYSQL_TMP_DIR/gdbinit.client diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index ef93096478f..8cfae44b9dd 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -46,20 +46,6 @@ select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; 1 XOR 1 1 XOR 0 0 XOR 1 0 XOR 0 NULL XOR 1 1 XOR NULL 0 XOR NULL 0 1 1 0 NULL NULL NULL -drop table if exists t1,t2; -CREATE TABLE t1 ( start datetime default NULL) TYPE=MyISAM; -INSERT INTO t1 VALUES ('2002-10-21 00:00:00'); -INSERT INTO t1 VALUES ('2002-10-28 00:00:00'); -INSERT INTO t1 VALUES ('2002-11-04 00:00:00'); -CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL) TYPE=MyISAM; -INSERT INTO t2 VALUES (20021029165106,20021105164731); -select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; -start ctime1 ctime2 -2002-11-04 00:00:00 20021029165106 20021105164731 -select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; -start ctime1 ctime2 -2002-11-04 00:00:00 20021029165106 20021105164731 -drop table if exists t1,t2; select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; 5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1 0 1 diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 5433194c719..671b56ef005 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(date_add(curdate(), interval 1 day))-to_days(curdate()),weekday("1997-11-29"); from_days(to_days("960101")) to_days(960201)-to_days("19960101") to_days(date_add(curdate(), interval 1 day))-to_days(curdate()) weekday("1997-11-29") 1996-01-01 31 1 5 @@ -372,3 +372,18 @@ select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM extract(MONTH FROM "0000-00-00") extract(MONTH FROM d) extract(MONTH FROM dt) extract(MONTH FROM t) extract(MONTH FROM c) 0 0 0 0 0 drop table t1; +CREATE TABLE t1 ( start datetime default NULL); +INSERT INTO t1 VALUES ('2002-10-21 00:00:00'),('2002-10-28 00:00:00'),('2002-11-04 00:00:00'); +CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL); +INSERT INTO t2 VALUES (20021029165106,20021105164731); +CREATE TABLE t3 (ctime1 char(19) NOT NULL, ctime2 char(19) NOT NULL); +INSERT INTO t3 VALUES ("2002-10-29 16:51:06","2002-11-05 16:47:31"); +select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; +start ctime1 ctime2 +select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; +start ctime1 ctime2 +2002-11-04 00:00:00 20021029165106 20021105164731 +select * from t1, t3 where t1.start between t3.ctime1 and t3.ctime2; +start ctime1 ctime2 +2002-11-04 00:00:00 2002-10-29 16:51:06 2002-11-05 16:47:31 +drop table t1,t2,t3; diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index 1486e5bcca8..f5ad2e21c73 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -17,16 +17,6 @@ select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2, select -1.49 or -1.49,0.6 or 0.6; select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; -drop table if exists t1,t2; -CREATE TABLE t1 ( start datetime default NULL) TYPE=MyISAM; -INSERT INTO t1 VALUES ('2002-10-21 00:00:00'); -INSERT INTO t1 VALUES ('2002-10-28 00:00:00'); -INSERT INTO t1 VALUES ('2002-11-04 00:00:00'); -CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL) TYPE=MyISAM; -INSERT INTO t2 VALUES (20021029165106,20021105164731); -select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; -select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; -drop table if exists t1,t2; # # Wrong usage of functions diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index a052f5f2d92..7d5ab73fa4c 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1,7 +1,7 @@ # # time functions # -drop table if exists t1,t2; +drop table if exists t1,t2,t3; select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(date_add(curdate(), interval 1 day))-to_days(curdate()),weekday("1997-11-29"); select period_add("9602",-12),period_diff(199505,"9404") ; @@ -160,3 +160,20 @@ select yearweek("0000-00-00"),yearweek(d),yearweek(dt),yearweek(t),yearweek(c) f select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(t),to_days(c) from t1; select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM dt),extract(MONTH FROM t),extract(MONTH FROM c) from t1; drop table t1; + +# +# Test problem with TIMESTAMP and BETWEEN +# + +CREATE TABLE t1 ( start datetime default NULL); +INSERT INTO t1 VALUES ('2002-10-21 00:00:00'),('2002-10-28 00:00:00'),('2002-11-04 00:00:00'); +CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL); +INSERT INTO t2 VALUES (20021029165106,20021105164731); +CREATE TABLE t3 (ctime1 char(19) NOT NULL, ctime2 char(19) NOT NULL); +INSERT INTO t3 VALUES ("2002-10-29 16:51:06","2002-11-05 16:47:31"); + +# The following statement should be fixed to return a row in 4.1 +select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; +select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; +select * from t1, t3 where t1.start between t3.ctime1 and t3.ctime2; +drop table t1,t2,t3; diff --git a/sql/field.h b/sql/field.h index de9e98290e7..4290f99ea3e 100644 --- a/sql/field.h +++ b/sql/field.h @@ -544,7 +544,6 @@ public: enum Item_result result_type () const { return field_length == 8 || field_length == 14 ? INT_RESULT : STRING_RESULT; } enum_field_types type() const { return FIELD_TYPE_TIMESTAMP;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; } - enum Item_result cmp_type () const { return INT_RESULT; } void store(const char *to,uint length); void store(double nr); void store(longlong nr); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 42cd0a2ee4f..79d695eea1e 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -360,7 +360,6 @@ void Item_func_between::fix_length_and_dec() if (args[0]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[0])->field; - cmp_type=field->cmp_type(); if (field->store_for_compare()) { if (convert_constant_item(field,&args[1])) diff --git a/sql/lock.cc b/sql/lock.cc index aed0e1988ea..9063b1273e0 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -74,7 +74,7 @@ extern HASH open_cache; static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table,uint count, bool unlock, TABLE **write_locked); -static int lock_external(TABLE **table,uint count); +static int lock_external(THD *thd, TABLE **table,uint count); static int unlock_external(THD *thd, TABLE **table,uint count); static void print_lock_error(int error); @@ -110,7 +110,7 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd,TABLE **tables,uint count) } thd->proc_info="System lock"; - if (lock_external(tables,count)) + if (lock_external(thd, tables, count)) { my_free((gptr) sql_lock,MYF(0)); sql_lock=0; @@ -159,11 +159,10 @@ retry: } -static int lock_external(TABLE **tables,uint count) +static int lock_external(THD *thd, TABLE **tables, uint count) { reg1 uint i; int lock_type,error; - THD *thd=current_thd; DBUG_ENTER("lock_external"); for (i=1 ; i <= count ; i++, tables++) diff --git a/sql/set_var.cc b/sql/set_var.cc index 80a0e0625cb..a992ddf6044 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -502,7 +502,9 @@ struct show_var_st init_vars[]= { {"skip_networking", (char*) &opt_disable_networking, SHOW_BOOL}, {"skip_show_database", (char*) &opt_skip_show_db, SHOW_BOOL}, {sys_slow_launch_time.name, (char*) &sys_slow_launch_time, SHOW_SYS}, +#ifdef HAVE_SYS_UN_H {"socket", (char*) &mysql_unix_port, SHOW_CHAR_PTR}, +#endif {sys_sort_buffer.name, (char*) &sys_sort_buffer, SHOW_SYS}, {"sql_mode", (char*) &opt_sql_mode, SHOW_LONG}, {"table_cache", (char*) &table_cache_size, SHOW_LONG}, diff --git a/sql/sql_base.cc b/sql/sql_base.cc index fa967d645ef..3b46c53f75c 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1275,7 +1275,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db, int error; DBUG_ENTER("open_unireg_entry"); - (void) sprintf(path,"%s/%s/%s",mysql_data_home,db,name); + strxmov(path, mysql_data_home, "/", db, "/", name, NullS); if (openfrm(path,alias, (uint) (HA_OPEN_KEYFILE | HA_OPEN_RNDFILE | HA_GET_INDEX | HA_TRY_READ_ONLY), From 2eb2786dcc1cbd217b5df9992571afa75b83f083 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Nov 2002 00:41:25 +0200 Subject: [PATCH 045/246] fixed bdb transaction with query cache bug --- mysql-test/r/bdb_cache.result | 100 ++++++++++++++++++++++++++++++ mysql-test/t/bdb_cache-master.opt | 1 + mysql-test/t/bdb_cache.test | 50 +++++++++++++++ sql/handler.cc | 3 +- 4 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/bdb_cache.result create mode 100644 mysql-test/t/bdb_cache-master.opt create mode 100644 mysql-test/t/bdb_cache.test diff --git a/mysql-test/r/bdb_cache.result b/mysql-test/r/bdb_cache.result new file mode 100644 index 00000000000..e5c6923162a --- /dev/null +++ b/mysql-test/r/bdb_cache.result @@ -0,0 +1,100 @@ +drop table if exists t1, t2, t3; +flush status; +set autocommit=0; +create table t1 (a int not null) type=bdb; +insert into t1 values (1),(2),(3); +select * from t1; +a +1 +2 +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +drop table t1; +commit; +set autocommit=1; +begin; +create table t1 (a int not null) type=bdb; +insert into t1 values (1),(2),(3); +select * from t1; +a +1 +2 +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +drop table t1; +commit; +create table t1 (a int not null) type=bdb; +create table t2 (a int not null) type=bdb; +create table t3 (a int not null) type=bdb; +insert into t1 values (1),(2); +insert into t2 values (1),(2); +insert into t3 values (1),(2); +select * from t1; +a +1 +2 +select * from t2; +a +1 +2 +select * from t3; +a +1 +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +begin; +select * from t1; +a +1 +2 +select * from t2; +a +1 +2 +select * from t3; +a +1 +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +insert into t1 values (3); +insert into t2 values (3); +insert into t1 values (4); +select * from t1; +a +1 +2 +3 +4 +select * from t2; +a +1 +2 +3 +select * from t3; +a +1 +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 diff --git a/mysql-test/t/bdb_cache-master.opt b/mysql-test/t/bdb_cache-master.opt new file mode 100644 index 00000000000..5f0ebff98f6 --- /dev/null +++ b/mysql-test/t/bdb_cache-master.opt @@ -0,0 +1 @@ +--set-variable=query_cache_size=1M diff --git a/mysql-test/t/bdb_cache.test b/mysql-test/t/bdb_cache.test new file mode 100644 index 00000000000..aa5572886c5 --- /dev/null +++ b/mysql-test/t/bdb_cache.test @@ -0,0 +1,50 @@ +-- source include/have_bdb.inc +-- source include/have_query_cache.inc + +# +# Without auto_commit. +# +drop table if exists t1, t2, t3; +flush status; +set autocommit=0; +create table t1 (a int not null) type=bdb; +insert into t1 values (1),(2),(3); +select * from t1; +show status like "Qcache_queries_in_cache"; +drop table t1; +commit; +set autocommit=1; +begin; +create table t1 (a int not null) type=bdb; +insert into t1 values (1),(2),(3); +select * from t1; +show status like "Qcache_queries_in_cache"; +drop table t1; +commit; +create table t1 (a int not null) type=bdb; +create table t2 (a int not null) type=bdb; +create table t3 (a int not null) type=bdb; +insert into t1 values (1),(2); +insert into t2 values (1),(2); +insert into t3 values (1),(2); +select * from t1; +select * from t2; +select * from t3; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; +begin; +select * from t1; +select * from t2; +select * from t3; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; +insert into t1 values (3); +insert into t2 values (3); +insert into t1 values (4); +select * from t1; +select * from t2; +select * from t3; +show status like "Qcache_queries_in_cache"; +show status like "Qcache_hits"; +commit; +show status like "Qcache_queries_in_cache"; \ No newline at end of file diff --git a/sql/handler.cc b/sql/handler.cc index 7aba6817eca..f07e90d2eb9 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -294,7 +294,8 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans) error=1; } else - transaction_commited= 1; + if (!(thd->options & OPTION_BEGIN)) + transaction_commited= 1; trans->bdb_tid=0; } #endif From 444d8207d9a277231733dc6cd58bf21b626bba31 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Nov 2002 00:41:27 +0200 Subject: [PATCH 046/246] Many files: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock sql/ha_innodb.cc: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/dict/dict0crea.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/dict/dict0dict.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/include/log0recv.h: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/include/row0mysql.h: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/include/srv0srv.h: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/include/trx0trx.h: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/log/log0recv.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/os/os0sync.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/os/os0thread.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/row/row0ins.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/row/row0mysql.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/row/row0purge.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/row/row0undo.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/row/row0upd.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/srv/srv0srv.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/srv/srv0start.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/trx/trx0roll.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock innobase/trx/trx0trx.c: Merge InnoDB-4.0.5b: minor improvements to foreign keys, more logical data dictionary lock --- innobase/dict/dict0crea.c | 18 +-- innobase/dict/dict0dict.c | 221 ++++++++++++++++++++++++++++++----- innobase/include/log0recv.h | 1 + innobase/include/row0mysql.h | 39 +++++-- innobase/include/srv0srv.h | 3 + innobase/include/trx0trx.h | 63 +++++----- innobase/log/log0recv.c | 20 +++- innobase/os/os0sync.c | 10 +- innobase/os/os0thread.c | 13 ++- innobase/row/row0ins.c | 13 +-- innobase/row/row0mysql.c | 98 +++++++++++----- innobase/row/row0purge.c | 30 +++-- innobase/row/row0undo.c | 20 ++-- innobase/row/row0upd.c | 28 ++--- innobase/srv/srv0srv.c | 17 ++- innobase/srv/srv0start.c | 16 ++- innobase/trx/trx0roll.c | 8 +- innobase/trx/trx0trx.c | 4 +- sql/ha_innodb.cc | 64 +++++++--- 19 files changed, 490 insertions(+), 196 deletions(-) diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c index 60beeacf435..b0f84e5663a 100644 --- a/innobase/dict/dict0crea.c +++ b/innobase/dict/dict0crea.c @@ -1041,7 +1041,7 @@ dict_create_or_check_foreign_constraint_tables(void) que_t* graph; ulint error; trx_t* trx; - char* str; + char* str; mutex_enter(&(dict_sys->mutex)); @@ -1060,20 +1060,24 @@ dict_create_or_check_foreign_constraint_tables(void) return(DB_SUCCESS); } + mutex_exit(&(dict_sys->mutex)); + trx = trx_allocate_for_mysql(); trx->op_info = (char *) "creating foreign key sys tables"; + row_mysql_lock_data_dictionary(trx); + if (table1) { fprintf(stderr, "InnoDB: dropping incompletely created SYS_FOREIGN table\n"); - row_drop_table_for_mysql((char *) "SYS_FOREIGN", trx, TRUE); + row_drop_table_for_mysql((char *) "SYS_FOREIGN", trx); } if (table2) { fprintf(stderr, "InnoDB: dropping incompletely created SYS_FOREIGN_COLS table\n"); - row_drop_table_for_mysql((char *) "SYS_FOREIGN_COLS",trx,TRUE); + row_drop_table_for_mysql((char *) "SYS_FOREIGN_COLS", trx); } fprintf(stderr, @@ -1122,8 +1126,8 @@ dict_create_or_check_foreign_constraint_tables(void) fprintf(stderr, "InnoDB: dropping incompletely created SYS_FOREIGN tables\n"); - row_drop_table_for_mysql((char *) "SYS_FOREIGN", trx, TRUE); - row_drop_table_for_mysql((char *) "SYS_FOREIGN_COLS",trx,TRUE); + row_drop_table_for_mysql((char *) "SYS_FOREIGN", trx); + row_drop_table_for_mysql((char *) "SYS_FOREIGN_COLS", trx); error = DB_MUST_GET_MORE_FILE_SPACE; } @@ -1132,6 +1136,8 @@ dict_create_or_check_foreign_constraint_tables(void) trx->op_info = (char *) ""; + row_mysql_unlock_data_dictionary(trx); + trx_free_for_mysql(trx); if (error == DB_SUCCESS) { @@ -1139,8 +1145,6 @@ dict_create_or_check_foreign_constraint_tables(void) "InnoDB: Foreign key constraint system tables created\n"); } - mutex_exit(&(dict_sys->mutex)); - return(error); } diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index 2ee2c9d18a9..18f27602cf0 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -30,13 +30,16 @@ Created 1/8/1996 Heikki Tuuri dict_sys_t* dict_sys = NULL; /* the dictionary system */ rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve - this in X-mode, implicit or backround + this in X-mode; implicit or backround operations purge, rollback, foreign key checks reserve this in S-mode; we cannot trust that MySQL protects implicit or background operations - from dropping a table: this is our - mechanism */ + a table drop since MySQL does not + know of them; therefore we need this; + NOTE: a transaction which reserves + this must keep book on the mode in + trx->dict_operation_lock_mode */ #define DICT_HEAP_SIZE 100 /* initial memory heap size when creating a table or index object */ @@ -182,6 +185,58 @@ dict_foreign_free( /*==============*/ dict_foreign_t* foreign); /* in, own: foreign key struct */ +/************************************************************************ +Checks if the database name in two table names is the same. */ +static +ibool +dict_tables_have_same_db( +/*=====================*/ + /* out: TRUE if same db name */ + char* name1, /* in: table name in the form dbname '/' tablename */ + char* name2) /* in: table name in the form dbname '/' tablename */ +{ + ulint i; + + for (i = 0; i < 100000; i++) { + if (name1[i] == '/' && name2[i] == '/') { + + return(TRUE); + } + + if (name1[i] != name2[i]) { + + return(FALSE); + } + } + + ut_a(0); + + return(FALSE); +} + +/************************************************************************ +Return the end of table name where we have removed dbname and '/'. */ +static +char* +dict_remove_db_name( +/*================*/ + /* out: table name */ + char* name) /* in: table name in the form dbname '/' tablename */ +{ + ulint i; + + for (i = 0; i < 100000 ; i++) { + if (name[i] == '/') { + + return(name + i + 1); + } + } + + ut_a(0); + + return(NULL); +} + /************************************************************************ Reserves the dictionary system mutex for MySQL. */ @@ -1926,7 +1981,8 @@ dict_scan_col( old_ptr = ptr; - while (!isspace(*ptr) && *ptr != ',' && *ptr != ')' && *ptr != '`') { + while (!isspace(*ptr) && *ptr != ',' && *ptr != ')' && *ptr != '`' + && *ptr != '\0') { ptr++; } @@ -2000,7 +2056,7 @@ dict_scan_table_name( old_ptr = ptr; - while (!isspace(*ptr) && *ptr != '(' && *ptr != '`') { + while (!isspace(*ptr) && *ptr != '(' && *ptr != '`' && *ptr != '\0') { if (*ptr == '.') { dot_ptr = ptr; } @@ -2023,17 +2079,28 @@ dict_scan_table_name( } #ifdef __WIN__ ut_cpy_in_lower_case(second_table_name + i, old_ptr, - ptr - old_ptr); + ptr - old_ptr); #else - ut_memcpy(second_table_name + i, old_ptr, ptr - old_ptr); + if (srv_lower_case_table_names) { + ut_cpy_in_lower_case(second_table_name + i, old_ptr, + ptr - old_ptr); + } else { + ut_memcpy(second_table_name + i, old_ptr, + ptr - old_ptr); + } #endif second_table_name[i + (ptr - old_ptr)] = '\0'; } else { #ifdef __WIN__ ut_cpy_in_lower_case(second_table_name, old_ptr, - ptr - old_ptr); + ptr - old_ptr); #else - ut_memcpy(second_table_name, old_ptr, ptr - old_ptr); + if (srv_lower_case_table_names) { + ut_cpy_in_lower_case(second_table_name, old_ptr, + ptr - old_ptr); + } else { + ut_memcpy(second_table_name, old_ptr, ptr - old_ptr); + } #endif second_table_name[dot_ptr - old_ptr] = '/'; second_table_name[ptr - old_ptr] = '\0'; @@ -2050,6 +2117,44 @@ dict_scan_table_name( return(ptr); } +/************************************************************************* +Skips one 'word', like an id. For the lexical definition of 'word', see the +code below. */ +static +char* +dict_skip_word( +/*===========*/ + /* out: scanned to */ + char* ptr, /* in: scanned to */ + ibool* success)/* out: TRUE if success, FALSE if just spaces left in + string */ +{ + *success = FALSE; + + while (isspace(*ptr)) { + ptr++; + } + + if (*ptr == '\0') { + + return(ptr); + } + + if (*ptr == '`') { + ptr++; + } + + while (!isspace(*ptr) && *ptr != ',' && *ptr != '(' && *ptr != '`' + && *ptr != '\0') { + + ptr++; + } + + *success = TRUE; + + return(ptr); +} + /************************************************************************* Returns the number of opening brackets '(' subtracted by the number of closing brackets ')' between string and ptr. */ @@ -2119,7 +2224,6 @@ dict_create_foreign_constraints( if (table == NULL) { return(DB_ERROR); } - loop: ptr = dict_scan_to(ptr, (char *) "FOREIGN"); @@ -2148,7 +2252,19 @@ loop: ptr = dict_accept(ptr, (char *) "(", &success); if (!success) { - goto loop; + /* MySQL allows also an index id before the '('; we + skip it */ + ptr = dict_skip_word(ptr, &success); + + if (!success) { + return(DB_CANNOT_ADD_CONSTRAINT); + } + + ptr = dict_accept(ptr, (char *) "(", &success); + + if (!success) { + return(DB_CANNOT_ADD_CONSTRAINT); + } } i = 0; @@ -2223,6 +2339,7 @@ col_loop1: if (!success) { dict_foreign_free(foreign); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -2236,6 +2353,7 @@ col_loop2: if (!success) { dict_foreign_free(foreign); + return(DB_CANNOT_ADD_CONSTRAINT); } @@ -2263,14 +2381,20 @@ col_loop2: ptr = dict_accept(ptr, "DELETE", &success); if (!success) { + dict_foreign_free(foreign); + + return(DB_CANNOT_ADD_CONSTRAINT); + } + ptr = dict_accept(ptr, "RESTRICT", &success); + + if (success) { goto try_find_index; } ptr = dict_accept(ptr, "CASCADE", &success); if (success) { - foreign->type = DICT_FOREIGN_ON_DELETE_CASCADE; goto try_find_index; @@ -2279,32 +2403,47 @@ col_loop2: ptr = dict_accept(ptr, "SET", &success); if (!success) { - - goto try_find_index; + dict_foreign_free(foreign); + + return(DB_CANNOT_ADD_CONSTRAINT); } ptr = dict_accept(ptr, "NULL", &success); - if (success) { - for (j = 0; j < foreign->n_fields; j++) { - if ((dict_index_get_nth_type( + if (!success) { + dict_foreign_free(foreign); + + return(DB_CANNOT_ADD_CONSTRAINT); + } + + for (j = 0; j < foreign->n_fields; j++) { + if ((dict_index_get_nth_type( foreign->foreign_index, j)->prtype) & DATA_NOT_NULL) { - /* It is not sensible to define SET NULL - if the column is not allowed to be NULL! */ + /* It is not sensible to define SET NULL + if the column is not allowed to be NULL! */ - dict_foreign_free(foreign); - return(DB_CANNOT_ADD_CONSTRAINT); - } + dict_foreign_free(foreign); + + return(DB_CANNOT_ADD_CONSTRAINT); } - - foreign->type = DICT_FOREIGN_ON_DELETE_SET_NULL; - - goto try_find_index; } + + foreign->type = DICT_FOREIGN_ON_DELETE_SET_NULL; try_find_index: + /* We check that there are no superfluous words like 'ON UPDATE ...' + which we do not support yet. */ + + ptr = dict_accept(ptr, (char *) "ON", &success); + + if (success) { + dict_foreign_free(foreign); + + return(DB_CANNOT_ADD_CONSTRAINT); + } + /* Try to find an index which contains the columns as the first fields and in the right order, and the types are the same as in foreign->foreign_index */ @@ -2351,6 +2490,7 @@ try_find_index: referenced_table->referenced_list, foreign); } + goto loop; } @@ -2849,6 +2989,14 @@ dict_update_statistics_low( ulint size; ulint sum_of_index_sizes = 0; + /* If we have set a high innodb_force_recovery level, do not calculate + statistics, as a badly corrupted index can cause a crash in it. */ + + if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) { + + return; + } + /* Find out the sizes of the indexes and how many different values for the key they approximately have */ @@ -3152,16 +3300,25 @@ dict_print_info_on_foreign_keys_in_create_format( } } - buf2 += sprintf(buf2, ") REFERENCES `%s` (", + if (dict_tables_have_same_db(table->name, + foreign->referenced_table_name)) { + /* Do not print the database name of the referenced + table */ + buf2 += sprintf(buf2, ") REFERENCES `%s` (", + dict_remove_db_name( + foreign->referenced_table_name)); + } else { + buf2 += sprintf(buf2, ") REFERENCES `%s` (", foreign->referenced_table_name); - /* Change the '/' in the table name to '.' */ + /* Change the '/' in the table name to '.' */ - for (i = ut_strlen(buf); i > 0; i--) { - if (buf[i] == '/') { + for (i = ut_strlen(buf); i > 0; i--) { + if (buf[i] == '/') { - buf[i] = '.'; + buf[i] = '.'; - break; + break; + } } } diff --git a/innobase/include/log0recv.h b/innobase/include/log0recv.h index baa2ba50c7d..7418e4abf1b 100644 --- a/innobase/include/log0recv.h +++ b/innobase/include/log0recv.h @@ -334,6 +334,7 @@ extern ibool recv_no_ibuf_operations; extern ibool recv_needed_recovery; extern ibool recv_is_making_a_backup; +extern ulint recv_max_parsed_page_no; /* Size of the parsing buffer; it must accommodate RECV_SCAN_SIZE many times! */ diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h index 8152c534f48..c72c905edf5 100644 --- a/innobase/include/row0mysql.h +++ b/innobase/include/row0mysql.h @@ -230,18 +230,35 @@ row_update_cascade_for_mysql( or set null operation */ dict_table_t* table); /* in: table where we do the operation */ /************************************************************************* -Locks the data dictionary exclusively for performing a table create -operation. */ +Locks the data dictionary exclusively for performing a table create or other +data dictionary modification operation. */ void -row_mysql_lock_data_dictionary(void); -/*================================*/ +row_mysql_lock_data_dictionary( +/*===========================*/ + trx_t* trx); /* in: transaction */ /************************************************************************* -Unlocks the data dictionary exclusively lock. */ +Unlocks the data dictionary exclusive lock. */ void -row_mysql_unlock_data_dictionary(void); -/*==================================*/ +row_mysql_unlock_data_dictionary( +/*=============================*/ + trx_t* trx); /* in: transaction */ +/************************************************************************* +Locks the data dictionary in shared mode from modifications, for performing +foreign key check, rollback, or other operation invisible to MySQL. */ + +void +row_mysql_freeze_data_dictionary( +/*=============================*/ + trx_t* trx); /* in: transaction */ +/************************************************************************* +Unlocks the data dictionary shared lock. */ + +void +row_mysql_unfreeze_data_dictionary( +/*===============================*/ + trx_t* trx); /* in: transaction */ /************************************************************************* Does a table creation operation for MySQL. If the name of the created table ends to characters INNODB_MONITOR, then this also starts @@ -310,11 +327,9 @@ output by the master thread. */ int row_drop_table_for_mysql( /*=====================*/ - /* out: error code or DB_SUCCESS */ - char* name, /* in: table name */ - trx_t* trx, /* in: transaction handle */ - ibool has_dict_mutex);/* in: TRUE if the caller already owns the - dictionary system mutex */ + /* out: error code or DB_SUCCESS */ + char* name, /* in: table name */ + trx_t* trx); /* in: transaction handle */ /************************************************************************* Drops a database for MySQL. */ diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h index 4d2768cf109..ad6f71f7a3a 100644 --- a/innobase/include/srv0srv.h +++ b/innobase/include/srv0srv.h @@ -28,6 +28,9 @@ extern os_event_t srv_lock_timeout_thread_event; at a time */ #define SRV_AUTO_EXTEND_INCREMENT (8 * ((1024 * 1024) / UNIV_PAGE_SIZE)) +/* This is set to TRUE if the MySQL user has set it in MySQL */ +extern ibool srv_lower_case_table_names; + /* Server parameters which are read from the initfile */ extern char* srv_data_home; diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 874b126e47c..1468ef449e7 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -386,9 +386,10 @@ struct trx_struct{ /* how many tables the current SQL statement uses, except those in consistent read */ - ibool has_dict_operation_lock; - /* TRUE if the trx currently holds - an s-lock on dict_operation_lock */ + ibool dict_operation_lock_mode; + /* 0, RW_S_LATCH, or RW_X_LATCH: + the latch mode trx currently holds + on dict_operation_lock */ ibool has_search_latch; /* TRUE if this trx has latched the search system latch in S-mode */ @@ -427,34 +428,6 @@ struct trx_struct{ mysql_trx_list; /* list of transactions created for MySQL */ /*------------------------------*/ - mutex_t undo_mutex; /* mutex protecting the fields in this - section (down to undo_no_arr), EXCEPT - last_sql_stat_start, which can be - accessed only when we know that there - cannot be any activity in the undo - logs! */ - dulint undo_no; /* next undo log record number to - assign */ - trx_savept_t last_sql_stat_start; - /* undo_no when the last sql statement - was started: in case of an error, trx - is rolled back down to this undo - number; see note at undo_mutex! */ - trx_rseg_t* rseg; /* rollback segment assigned to the - transaction, or NULL if not assigned - yet */ - trx_undo_t* insert_undo; /* pointer to the insert undo log, or - NULL if no inserts performed yet */ - trx_undo_t* update_undo; /* pointer to the update undo log, or - NULL if no update performed yet */ - dulint roll_limit; /* least undo number to undo during - a rollback */ - ulint pages_undone; /* number of undo log pages undone - since the last undo log truncation */ - trx_undo_arr_t* undo_no_arr; /* array of undo numbers of undo log - records which are currently processed - by a rollback operation */ - /*------------------------------*/ ulint error_state; /* 0 if no error, otherwise error number */ void* error_info; /* if the error number indicates a @@ -508,6 +481,34 @@ struct trx_struct{ /*------------------------------*/ mem_heap_t* read_view_heap; /* memory heap for the read view */ read_view_t* read_view; /* consistent read view or NULL */ + /*------------------------------*/ + mutex_t undo_mutex; /* mutex protecting the fields in this + section (down to undo_no_arr), EXCEPT + last_sql_stat_start, which can be + accessed only when we know that there + cannot be any activity in the undo + logs! */ + dulint undo_no; /* next undo log record number to + assign */ + trx_savept_t last_sql_stat_start; + /* undo_no when the last sql statement + was started: in case of an error, trx + is rolled back down to this undo + number; see note at undo_mutex! */ + trx_rseg_t* rseg; /* rollback segment assigned to the + transaction, or NULL if not assigned + yet */ + trx_undo_t* insert_undo; /* pointer to the insert undo log, or + NULL if no inserts performed yet */ + trx_undo_t* update_undo; /* pointer to the update undo log, or + NULL if no update performed yet */ + dulint roll_limit; /* least undo number to undo during + a rollback */ + ulint pages_undone; /* number of undo log pages undone + since the last undo log truncation */ + trx_undo_arr_t* undo_no_arr; /* array of undo numbers of undo log + records which are currently processed + by a rollback operation */ }; #define TRX_MAX_N_THREADS 32 /* maximum number of concurrent diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c index 1223f9b6041..0fcf32ad99e 100644 --- a/innobase/log/log0recv.c +++ b/innobase/log/log0recv.c @@ -69,6 +69,8 @@ ulint recv_previous_parsed_rec_type = 999999; ulint recv_previous_parsed_rec_offset = 0; ulint recv_previous_parsed_rec_is_multi = 0; +ulint recv_max_parsed_page_no = 0; + /************************************************************ Creates the recovery system. */ @@ -141,7 +143,13 @@ recv_sys_empty_hash(void) /*=====================*/ { ut_ad(mutex_own(&(recv_sys->mutex))); - ut_a(recv_sys->n_addrs == 0); + if (recv_sys->n_addrs != 0) { + fprintf(stderr, +"InnoDB: Error: %lu pages with log records were left unprocessed!\n" +"InnoDB: Maximum page number with log records on it %lu\n", + recv_sys->n_addrs, recv_max_parsed_page_no); + ut_a(0); + } hash_table_free(recv_sys->addr_hash); mem_heap_empty(recv_sys->heap); @@ -1361,6 +1369,12 @@ recv_apply_log_recs_for_backup( n_pages_total += file_sizes[i]; } + if (recv_max_parsed_page_no >= n_pages_total) { + printf( +"InnoDB: Error: tablespace size %lu pages, but a log record on page %lu!\n", + n_pages_total, recv_max_parsed_page_no); + } + printf( "InnoDB: Starting an apply batch of log records to the database...\n" "InnoDB: Progress in percents: "); @@ -1701,6 +1715,10 @@ recv_parse_log_rec( return(0); } + if (*page_no > recv_max_parsed_page_no) { + recv_max_parsed_page_no = *page_no; + } + return(new_ptr - ptr); } diff --git a/innobase/os/os0sync.c b/innobase/os/os0sync.c index 14677ede20f..bac1f23a1af 100644 --- a/innobase/os/os0sync.c +++ b/innobase/os/os0sync.c @@ -66,8 +66,12 @@ os_event_create( event = ut_malloc(sizeof(struct os_event_struct)); os_fast_mutex_init(&(event->os_mutex)); - pthread_cond_init(&(event->cond_var), NULL); +#if defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10) + pthread_cond_init(&(event->cond_var), pthread_condattr_default); +#else + pthread_cond_init(&(event->cond_var), NULL); +#endif event->is_set = FALSE; return(event); @@ -440,9 +444,13 @@ os_fast_mutex_init( ut_a(fast_mutex); InitializeCriticalSection((LPCRITICAL_SECTION) fast_mutex); +#else +#if defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10) + pthread_mutex_init(fast_mutex, pthread_mutexattr_default); #else pthread_mutex_init(fast_mutex, MY_MUTEX_INIT_FAST); #endif +#endif } /************************************************************** diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c index 48aea4b8abb..30404c4e66b 100644 --- a/innobase/os/os0thread.c +++ b/innobase/os/os0thread.c @@ -126,8 +126,10 @@ os_thread_create( os_thread_t pthread; pthread_attr_t attr; +#if !(defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10)) pthread_attr_init(&attr); - +#endif + #ifdef UNIV_AIX /* We must make sure a thread stack is at least 32 kB, otherwise InnoDB might crash; we do not know if the default stack size on @@ -142,16 +144,21 @@ os_thread_create( exit(1); } #endif - ret = pthread_create(&pthread, &attr, start_f, arg); +#if defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10) + ret = pthread_create(&pthread, pthread_attr_default, start_f, arg); +#else + ret = pthread_create(&pthread, &attr, start_f, arg); +#endif if (ret) { fprintf(stderr, "InnoDB: Error: pthread_create returned %d\n", ret); exit(1); } +#if !(defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10)) pthread_attr_destroy(&attr); - +#endif if (srv_set_thread_priorities) { my_pthread_setprio(pthread, srv_query_thread_priority); diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index 4e8b487a0f1..d0a5cfec604 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -643,7 +643,7 @@ row_ins_check_foreign_constraint( run_again: ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_SHARED)); - + err = DB_SUCCESS; if (thr_get_trx(thr)->check_foreigns == FALSE) { @@ -880,21 +880,16 @@ row_ins_check_foreign_constraints( trx); } - if (!trx->has_dict_operation_lock) { + if (0 == trx->dict_operation_lock_mode) { got_s_lock = TRUE; - rw_lock_s_lock(&dict_operation_lock); - - trx->has_dict_operation_lock = TRUE; + row_mysql_freeze_data_dictionary(trx); } err = row_ins_check_foreign_constraint(TRUE, foreign, table, index, entry, thr); if (got_s_lock) { - - rw_lock_s_unlock(&dict_operation_lock); - - trx->has_dict_operation_lock = FALSE; + row_mysql_unfreeze_data_dictionary(trx); } if (err != DB_SUCCESS) { diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index 6fde57eb75a..b109b785a45 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -1134,32 +1134,73 @@ row_mysql_recover_tmp_table( } /************************************************************************* -Locks the data dictionary exclusively for performing a table create -operation. */ +Locks the data dictionary in shared mode from modifications, for performing +foreign key check, rollback, or other operation invisible to MySQL. */ void -row_mysql_lock_data_dictionary(void) -/*================================*/ +row_mysql_freeze_data_dictionary( +/*=============================*/ + trx_t* trx) /* in: transaction */ { + ut_a(trx->dict_operation_lock_mode == 0); + + rw_lock_s_lock(&dict_operation_lock); + + trx->dict_operation_lock_mode = RW_S_LATCH; +} + +/************************************************************************* +Unlocks the data dictionary shared lock. */ + +void +row_mysql_unfreeze_data_dictionary( +/*===============================*/ + trx_t* trx) /* in: transaction */ +{ + ut_a(trx->dict_operation_lock_mode == RW_S_LATCH); + + rw_lock_s_unlock(&dict_operation_lock); + + trx->dict_operation_lock_mode = 0; +} + +/************************************************************************* +Locks the data dictionary exclusively for performing a table create or other +data dictionary modification operation. */ + +void +row_mysql_lock_data_dictionary( +/*===========================*/ + trx_t* trx) /* in: transaction */ +{ + ut_a(trx->dict_operation_lock_mode == 0); + /* Serialize data dictionary operations with dictionary mutex: no deadlocks or lock waits can occur then in these operations */ rw_lock_x_lock(&dict_operation_lock); + trx->dict_operation_lock_mode = RW_X_LATCH; + mutex_enter(&(dict_sys->mutex)); } /************************************************************************* -Unlocks the data dictionary exclusively lock. */ +Unlocks the data dictionary exclusive lock. */ void -row_mysql_unlock_data_dictionary(void) -/*==================================*/ +row_mysql_unlock_data_dictionary( +/*=============================*/ + trx_t* trx) /* in: transaction */ { + ut_a(trx->dict_operation_lock_mode == RW_X_LATCH); + /* Serialize data dictionary operations with dictionary mutex: no deadlocks can occur then in these operations */ mutex_exit(&(dict_sys->mutex)); rw_lock_x_unlock(&dict_operation_lock); + + trx->dict_operation_lock_mode = 0; } /************************************************************************* @@ -1183,6 +1224,7 @@ row_create_table_for_mysql( ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); + ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); ut_ad(mutex_own(&(dict_sys->mutex))); if (srv_created_new_raw) { @@ -1331,7 +1373,7 @@ row_create_table_for_mysql( fprintf(stderr, "InnoDB: Warning: cannot create table %s because tablespace full\n", table->name); - row_drop_table_for_mysql(table->name, trx, TRUE); + row_drop_table_for_mysql(table->name, trx); } else { ut_a(err == DB_DUPLICATE_KEY); @@ -1425,7 +1467,7 @@ row_create_index_for_mysql( trx_general_rollback_for_mysql(trx, FALSE, NULL); - row_drop_table_for_mysql(index->table_name, trx, TRUE); + row_drop_table_for_mysql(index->table_name, trx); trx->error_state = DB_SUCCESS; } @@ -1499,7 +1541,7 @@ row_table_add_foreign_constraints( trx_general_rollback_for_mysql(trx, FALSE, NULL); - row_drop_table_for_mysql(name, trx, TRUE); + row_drop_table_for_mysql(name, trx); trx->error_state = DB_SUCCESS; } @@ -1530,7 +1572,7 @@ row_drop_table_for_mysql_in_background( name); */ /* Drop the table in InnoDB */ - error = row_drop_table_for_mysql(name, trx, FALSE); + error = row_drop_table_for_mysql(name, trx); if (error != DB_SUCCESS) { fprintf(stderr, @@ -1689,9 +1731,7 @@ row_drop_table_for_mysql( /*=====================*/ /* out: error code or DB_SUCCESS */ char* name, /* in: table name */ - trx_t* trx, /* in: transaction handle */ - ibool has_dict_mutex) /* in: TRUE if the caller already owns the - dictionary system mutex */ + trx_t* trx) /* in: transaction handle */ { dict_table_t* table; que_thr_t* thr; @@ -1703,6 +1743,7 @@ row_drop_table_for_mysql( ulint namelen; ulint keywordlen; ulint rounds = 0; + ibool locked_dictionary = FALSE; char buf[10000]; ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); @@ -1846,12 +1887,13 @@ row_drop_table_for_mysql( /* Serialize data dictionary operations with dictionary mutex: no deadlocks can occur then in these operations */ - if (!has_dict_mutex) { + if (trx->dict_operation_lock_mode != RW_X_LATCH) { /* Prevent foreign key checks etc. while we are dropping the table */ - rw_lock_x_lock(&dict_operation_lock); - mutex_enter(&(dict_sys->mutex)); + row_mysql_lock_data_dictionary(trx); + + locked_dictionary = TRUE; } ut_ad(mutex_own(&(dict_sys->mutex))); @@ -1948,9 +1990,8 @@ row_drop_table_for_mysql( } funct_exit: - if (!has_dict_mutex) { - mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&dict_operation_lock); + if (locked_dictionary) { + row_mysql_unlock_data_dictionary(trx); } que_graph_free(graph); @@ -1986,8 +2027,7 @@ row_drop_database_for_mysql( trx_start_if_not_started(trx); loop: - rw_lock_x_lock(&dict_operation_lock); - mutex_enter(&(dict_sys->mutex)); + row_mysql_lock_data_dictionary(trx); while ((table_name = dict_get_first_table_name_in_db(name))) { ut_a(memcmp(table_name, name, strlen(name)) == 0); @@ -2000,8 +2040,7 @@ loop: the table */ if (table->n_mysql_handles_opened > 0) { - mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&dict_operation_lock); + row_mysql_unlock_data_dictionary(trx); ut_print_timestamp(stderr); fprintf(stderr, @@ -2016,7 +2055,7 @@ loop: goto loop; } - err = row_drop_table_for_mysql(table_name, trx, TRUE); + err = row_drop_table_for_mysql(table_name, trx); mem_free(table_name); @@ -2028,8 +2067,7 @@ loop: } } - mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&dict_operation_lock); + row_mysql_unlock_data_dictionary(trx); trx_commit_for_mysql(trx); @@ -2166,8 +2204,7 @@ row_rename_table_for_mysql( /* Serialize data dictionary operations with dictionary mutex: no deadlocks can occur then in these operations */ - rw_lock_x_lock(&dict_operation_lock); - mutex_enter(&(dict_sys->mutex)); + row_mysql_lock_data_dictionary(trx); table = dict_table_get_low(old_name); @@ -2249,8 +2286,7 @@ row_rename_table_for_mysql( } } funct_exit: - mutex_exit(&(dict_sys->mutex)); - rw_lock_x_unlock(&dict_operation_lock); + row_mysql_unlock_data_dictionary(trx); que_graph_free(graph); diff --git a/innobase/row/row0purge.c b/innobase/row/row0purge.c index 3d9ae6aad8b..b64003f22d4 100644 --- a/innobase/row/row0purge.c +++ b/innobase/row/row0purge.c @@ -24,6 +24,7 @@ Created 3/14/1997 Heikki Tuuri #include "row0row.h" #include "row0upd.h" #include "row0vers.h" +#include "row0mysql.h" #include "log0log.h" /************************************************************************ @@ -454,8 +455,8 @@ ibool row_purge_parse_undo_rec( /*=====================*/ /* out: TRUE if purge operation required: - NOTE that then the CALLER must s-unlock - dict_operation_lock! */ + NOTE that then the CALLER must unfreeze + data dictionary! */ purge_node_t* node, /* in: row undo node */ ibool* updated_extern, /* out: TRUE if an externally stored field @@ -464,6 +465,7 @@ row_purge_parse_undo_rec( { dict_index_t* clust_index; byte* ptr; + trx_t* trx; dulint undo_no; dulint table_id; dulint trx_id; @@ -473,6 +475,8 @@ row_purge_parse_undo_rec( ulint cmpl_info; ut_ad(node && thr); + + trx = thr_get_trx(thr); ptr = trx_undo_rec_get_pars(node->undo_rec, &type, &cmpl_info, updated_extern, &undo_no, &table_id); @@ -498,17 +502,18 @@ row_purge_parse_undo_rec( /* Prevent DROP TABLE etc. from running when we are doing the purge for this row */ - rw_lock_s_lock(&dict_operation_lock); - mutex_enter(&(dict_sys->mutex)); + row_mysql_freeze_data_dictionary(trx); + + mutex_enter(&(dict_sys->mutex)); node->table = dict_table_get_on_id_low(table_id, thr_get_trx(thr)); - - mutex_exit(&(dict_sys->mutex)); + mutex_exit(&(dict_sys->mutex)); + if (node->table == NULL) { /* The table has been dropped: no need to do purge */ - rw_lock_s_unlock(&dict_operation_lock); + row_mysql_unfreeze_data_dictionary(trx); return(FALSE); } @@ -518,7 +523,7 @@ row_purge_parse_undo_rec( if (clust_index == NULL) { /* The table was corrupt in the data dictionary */ - rw_lock_s_unlock(&dict_operation_lock); + row_mysql_unfreeze_data_dictionary(trx); return(FALSE); } @@ -556,9 +561,12 @@ row_purge( dulint roll_ptr; ibool purge_needed; ibool updated_extern; + trx_t* trx; ut_ad(node && thr); + trx = thr_get_trx(thr); + node->undo_rec = trx_purge_fetch_next_rec(&roll_ptr, &(node->reservation), node->heap); @@ -577,8 +585,8 @@ row_purge( } else { purge_needed = row_purge_parse_undo_rec(node, &updated_extern, thr); - /* If purge_needed == TRUE, we must also remember to unlock - dict_operation_lock! */ + /* If purge_needed == TRUE, we must also remember to unfreeze + data dictionary! */ } if (purge_needed) { @@ -600,7 +608,7 @@ row_purge( btr_pcur_close(&(node->pcur)); } - rw_lock_s_unlock(&dict_operation_lock); + row_mysql_unfreeze_data_dictionary(trx); } /* Do some cleanup */ diff --git a/innobase/row/row0undo.c b/innobase/row/row0undo.c index 6f1cfc4db9f..01b0b1ab41e 100644 --- a/innobase/row/row0undo.c +++ b/innobase/row/row0undo.c @@ -24,6 +24,7 @@ Created 1/8/1997 Heikki Tuuri #include "row0row.h" #include "row0uins.h" #include "row0umod.h" +#include "row0mysql.h" #include "srv0srv.h" /* How to undo row operations? @@ -204,6 +205,7 @@ row_undo( ulint err; trx_t* trx; dulint roll_ptr; + ibool froze_data_dict = FALSE; ut_ad(node && thr); @@ -256,13 +258,13 @@ row_undo( /* Prevent DROP TABLE etc. while we are rolling back this row. If we are doing a TABLE CREATE or some other dictionary operation, then we already have dict_operation_lock locked in x-mode. Do not - try to lock again in s-mode, because that would cause a hang. - - TODO: keep track when trx exactly has the latch locked!!! - TODO: trx->dict_operation tells it only in some cases!!! */ - - if (!trx->dict_operation) { - rw_lock_s_lock(&dict_operation_lock); + try to lock again in s-mode, because that would cause a hang. */ + + if (trx->dict_operation_lock_mode == 0) { + + row_mysql_freeze_data_dictionary(trx); + + froze_data_dict = TRUE; } if (node->state == UNDO_NODE_INSERT) { @@ -275,9 +277,9 @@ row_undo( err = row_undo_mod(node, thr); } - if (!trx->dict_operation) { + if (froze_data_dict) { - rw_lock_s_unlock(&dict_operation_lock); + row_mysql_unfreeze_data_dictionary(trx); } /* Do some cleanup */ diff --git a/innobase/row/row0upd.c b/innobase/row/row0upd.c index 0be4f901d16..1231c94da63 100644 --- a/innobase/row/row0upd.c +++ b/innobase/row/row0upd.c @@ -89,14 +89,16 @@ row_upd_index_is_referenced( { dict_table_t* table = index->table; dict_foreign_t* foreign; + ibool froze_data_dict = FALSE; if (!UT_LIST_GET_FIRST(table->referenced_list)) { return(FALSE); } - if (!trx->has_dict_operation_lock) { - rw_lock_s_lock(&dict_operation_lock); + if (trx->dict_operation_lock_mode == 0) { + row_mysql_freeze_data_dictionary(trx); + froze_data_dict = TRUE; } foreign = UT_LIST_GET_FIRST(table->referenced_list); @@ -104,8 +106,8 @@ row_upd_index_is_referenced( while (foreign) { if (foreign->referenced_index == index) { - if (!trx->has_dict_operation_lock) { - rw_lock_s_unlock(&dict_operation_lock); + if (froze_data_dict) { + row_mysql_unfreeze_data_dictionary(trx); } return(TRUE); @@ -114,8 +116,8 @@ row_upd_index_is_referenced( foreign = UT_LIST_GET_NEXT(referenced_list, foreign); } - if (!trx->has_dict_operation_lock) { - rw_lock_s_unlock(&dict_operation_lock); + if (froze_data_dict) { + row_mysql_unfreeze_data_dictionary(trx); } return(FALSE); @@ -162,12 +164,10 @@ row_upd_check_references_constraints( mtr_start(mtr); - if (!trx->has_dict_operation_lock) { + if (trx->dict_operation_lock_mode == 0) { got_s_lock = TRUE; - rw_lock_s_lock(&dict_operation_lock); - - trx->has_dict_operation_lock = TRUE; + row_mysql_freeze_data_dictionary(trx); } foreign = UT_LIST_GET_FIRST(table->referenced_list); @@ -211,10 +211,7 @@ row_upd_check_references_constraints( if (err != DB_SUCCESS) { if (got_s_lock) { - rw_lock_s_unlock( - &dict_operation_lock); - trx->has_dict_operation_lock - = FALSE; + row_mysql_unfreeze_data_dictionary(trx); } mem_heap_free(heap); @@ -227,8 +224,7 @@ row_upd_check_references_constraints( } if (got_s_lock) { - rw_lock_s_unlock(&dict_operation_lock); - trx->has_dict_operation_lock = FALSE; + row_mysql_unfreeze_data_dictionary(trx); } mem_heap_free(heap); diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index 11e45df4ce3..51d7878fd29 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -51,6 +51,10 @@ Created 10/8/1995 Heikki Tuuri #include "srv0start.h" #include "row0mysql.h" +/* This is set to TRUE if the MySQL user has set it in MySQL; currently +affects only FOREIGN KEY definition parsing */ +ibool srv_lower_case_table_names = FALSE; + /* Buffer which can be used in printing fatal error messages */ char srv_fatal_errbuf[5000]; @@ -2064,6 +2068,7 @@ srv_suspend_mysql_thread( os_event_t event; double wait_time; trx_t* trx; + ibool had_dict_lock = FALSE; ut_ad(!mutex_own(&kernel_mutex)); @@ -2107,18 +2112,22 @@ srv_suspend_mysql_thread( srv_conc_force_exit_innodb(thr_get_trx(thr)); /* Release possible foreign key check latch */ - if (trx->has_dict_operation_lock) { + if (trx->dict_operation_lock_mode == RW_S_LATCH) { - rw_lock_s_unlock(&dict_operation_lock); + had_dict_lock = TRUE; + + row_mysql_unfreeze_data_dictionary(trx); } + ut_a(trx->dict_operation_lock_mode == 0); + /* Wait for the release */ os_event_wait(event); - if (trx->has_dict_operation_lock) { + if (had_dict_lock) { - rw_lock_s_lock(&dict_operation_lock); + row_mysql_freeze_data_dictionary(trx); } /* Return back inside InnoDB */ diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index cad946b1e54..d006b4ec915 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -1380,7 +1380,7 @@ innobase_start_or_create_for_mysql(void) if (0 != os_fast_mutex_trylock(&srv_os_test_mutex)) { fprintf(stderr, "InnoDB: Error: pthread_mutex_trylock returns an unexpected value on\n" - "InnoDB: success! Cannot continue.\n"); +"InnoDB: success! Cannot continue.\n"); exit(1); } @@ -1390,11 +1390,17 @@ innobase_start_or_create_for_mysql(void) os_fast_mutex_unlock(&srv_os_test_mutex); - if (srv_print_verbose_log) - { - ut_print_timestamp(stderr); - fprintf(stderr, " InnoDB: Started\n"); + if (srv_print_verbose_log) { + ut_print_timestamp(stderr); + fprintf(stderr, " InnoDB: Started\n"); } + + if (srv_force_recovery > 0) { + fprintf(stderr, + "InnoDB: !!! innodb_force_recovery is set to %lu !!!\n", + srv_force_recovery); + } + return((int) DB_SUCCESS); } diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c index 4c2ee5dc9be..1f0e0c58ac7 100644 --- a/innobase/trx/trx0roll.c +++ b/innobase/trx/trx0roll.c @@ -254,7 +254,7 @@ loop: mutex_exit(&kernel_mutex); if (trx->dict_operation) { - mutex_enter(&(dict_sys->mutex)); + row_mysql_lock_data_dictionary(trx); } que_run_threads(thr); @@ -290,14 +290,14 @@ loop: fprintf(stderr, "InnoDB: Table found: dropping table %s in recovery\n", table->name); - err = row_drop_table_for_mysql(table->name, trx, - TRUE); + err = row_drop_table_for_mysql(table->name, trx); + ut_a(err == (int) DB_SUCCESS); } } if (trx->dict_operation) { - mutex_exit(&(dict_sys->mutex)); + row_mysql_unlock_data_dictionary(trx); } fprintf(stderr, "InnoDB: Rolling back of trx id %lu %lu completed\n", diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 7566fe1839e..9f711890f60 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -134,7 +134,7 @@ trx_create( trx->lock_heap = mem_heap_create_in_buffer(256); UT_LIST_INIT(trx->trx_locks); - trx->has_dict_operation_lock = FALSE; + trx->dict_operation_lock_mode = 0; trx->has_search_latch = FALSE; trx->search_latch_timeout = BTR_SEA_TIMEOUT; @@ -261,6 +261,8 @@ trx_free( ut_a(!trx->has_search_latch); ut_a(!trx->auto_inc_lock); + ut_a(trx->dict_operation_lock_mode == 0); + if (trx->lock_heap) { mem_heap_free(trx->lock_heap); } diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index b849bbb76b2..17ac47eefd4 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1153,15 +1153,15 @@ ha_innobase::open( ib_table = dict_table_get_and_increment_handle_count( norm_name, NULL); if (NULL == ib_table) { - - sql_print_error("InnoDB error:\n\ -Cannot find table %s from the internal data dictionary\n\ -of InnoDB though the .frm file for the table exists. Maybe you\n\ -have deleted and recreated InnoDB data files but have forgotten\n\ -to delete the corresponding .frm files of InnoDB tables, or you\n\ -have moved .frm files to another database?\n\ -Look from section 15.1 of http://www.innodb.com/ibman.html\n\ -how you can resolve the problem.\n", + ut_print_timestamp(stderr); + fprintf(stderr, " InnoDB error:\n" +"Cannot find table %s from the internal data dictionary\n" +"of InnoDB though the .frm file for the table exists. Maybe you\n" +"have deleted and recreated InnoDB data files but have forgotten\n" +"to delete the corresponding .frm files of InnoDB tables, or you\n" +"have moved .frm files to another database?\n" +"Look from section 15.1 of http://www.innodb.com/ibman.html\n" +"how you can resolve the problem.\n", norm_name); free_share(share); @@ -2961,16 +2961,21 @@ ha_innobase::create( trx->check_unique_secondary = FALSE; } + if (lower_case_table_names) { + srv_lower_case_table_names = TRUE; + } else { + srv_lower_case_table_names = FALSE; + } fn_format(name2, name, "", "",2); // Remove the .frm extension normalize_table_name(norm_name, name2); - /* Latch the InnoDB data dictionary exclusive so that no deadlocks + /* Latch the InnoDB data dictionary exclusively so that no deadlocks or lock waits can happen in it during a table create operation. - (Drop table etc. do this latching in row0mysql.c.) */ + Drop table etc. do this latching in row0mysql.c. */ - row_mysql_lock_data_dictionary(); + row_mysql_lock_data_dictionary(trx); /* Create the table definition in InnoDB */ @@ -2979,7 +2984,7 @@ ha_innobase::create( if (error) { innobase_commit_low(trx); - row_mysql_unlock_data_dictionary(); + row_mysql_unlock_data_dictionary(trx); trx_free_for_mysql(trx); @@ -3009,7 +3014,7 @@ ha_innobase::create( if (error) { innobase_commit_low(trx); - row_mysql_unlock_data_dictionary(); + row_mysql_unlock_data_dictionary(trx); trx_free_for_mysql(trx); @@ -3024,7 +3029,7 @@ ha_innobase::create( (uint) primary_key_no))) { innobase_commit_low(trx); - row_mysql_unlock_data_dictionary(); + row_mysql_unlock_data_dictionary(trx); trx_free_for_mysql(trx); @@ -3040,7 +3045,7 @@ ha_innobase::create( innobase_commit_low(trx); - row_mysql_unlock_data_dictionary(); + row_mysql_unlock_data_dictionary(trx); trx_free_for_mysql(trx); @@ -3057,7 +3062,7 @@ ha_innobase::create( if (error) { innobase_commit_low(trx); - row_mysql_unlock_data_dictionary(); + row_mysql_unlock_data_dictionary(trx); trx_free_for_mysql(trx); @@ -3066,7 +3071,7 @@ ha_innobase::create( innobase_commit_low(trx); - row_mysql_unlock_data_dictionary(); + row_mysql_unlock_data_dictionary(trx); /* Flush the log to reduce probability that the .frm files and the InnoDB data dictionary get out-of-sync if the user runs @@ -3108,6 +3113,12 @@ ha_innobase::delete_table( DBUG_ENTER("ha_innobase::delete_table"); + if (lower_case_table_names) { + srv_lower_case_table_names = TRUE; + } else { + srv_lower_case_table_names = FALSE; + } + trx = trx_allocate_for_mysql(); name_len = strlen(name); @@ -3121,7 +3132,7 @@ ha_innobase::delete_table( /* Drop the table in InnoDB */ - error = row_drop_table_for_mysql(norm_name, trx, FALSE); + error = row_drop_table_for_mysql(norm_name, trx); /* Flush the log to reduce probability that the .frm files and the InnoDB data dictionary get out-of-sync if the user runs @@ -3218,6 +3229,12 @@ ha_innobase::rename_table( DBUG_ENTER("ha_innobase::rename_table"); + if (lower_case_table_names) { + srv_lower_case_table_names = TRUE; + } else { + srv_lower_case_table_names = FALSE; + } + trx = trx_allocate_for_mysql(); name_len1 = strlen(from); @@ -3406,6 +3423,15 @@ ha_innobase::info( DBUG_ENTER("info"); + /* If we are forcing recovery at a high level, we will suppress + statistics calculation on tables, because that may crash the + server if an index is badly corrupted. */ + + if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) { + + return; + } + /* Warning: since it is not sure that MySQL calls external_lock before calling this function, the trx field in prebuilt can be obsolete! */ From 071669d99adf3f22015b8c37960404389bb9d0ee Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Nov 2002 12:35:16 +0300 Subject: [PATCH 047/246] Final decimal bug fix changeset (hope) sql/field.cc: Code cleanup for Floating point overflow bug fix. According to Monty's comments --- sql/field.cc | 125 ++++++++++++++++++++++++--------------------------- 1 file changed, 59 insertions(+), 66 deletions(-) diff --git a/sql/field.cc b/sql/field.cc index f06cd7b3604..79c47886b7c 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -479,21 +479,16 @@ void Field_decimal::store(const char *from,uint len) else expo_sign_char= '+'; /* - Read digits of the exponent and compute its value. - We must care about 'exponent' overflow, because as - unsigned arithmetic is "modulo", big exponents - will become small (e.g. - 1e4294967296 will become 1e0, and the field - will finally contain 1 instead of its max possible value). + Read digits of the exponent and compute its value. We must care about + 'exponent' overflow, because as unsigned arithmetic is "modulo", big + exponents will become small (e.g. 1e4294967296 will become 1e0, and the + field will finally contain 1 instead of its max possible value). */ for (;from!=end && isdigit(*from); from++) { exponent=10*exponent+(*from-'0'); if (exponent>MAX_EXPONENT) - { - exponent=MAX_EXPONENT; break; - } } } @@ -538,8 +533,8 @@ void Field_decimal::store(const char *from,uint len) /* Below tmp_uint cannot overflow with small enough MAX_EXPONENT setting, as int_digits_added_zeros<=exponent<4G and - (ulonglong)(int_digits_end-int_digits_from)<=max_allowed_packet<=2G and - (ulonglong)(frac_digits_from-int_digits_tail_from)<=max_allowed_packet<=2G + (int_digits_end-int_digits_from)<=max_allowed_packet<=2G and + (frac_digits_from-int_digits_tail_from)<=max_allowed_packet<=2G */ if (!expo_sign_char) @@ -577,9 +572,9 @@ void Field_decimal::store(const char *from,uint len) int_digits_added_zeros=0; } } - tmp_uint=tmp_dec+(int_digits_end-int_digits_from) - +(uint)(frac_digits_from-int_digits_tail_from)+ - int_digits_added_zeros; + tmp_uint= (tmp_dec+(int_digits_end-int_digits_from)+ + (uint)(frac_digits_from-int_digits_tail_from)+ + int_digits_added_zeros); } /* @@ -590,8 +585,7 @@ void Field_decimal::store(const char *from,uint len) If the sign is defined and '-', we need one position for it */ - if (field_length < tmp_uint + (sign_char == '-')) - //the rightmost sum above cannot overflow + if (field_length < tmp_uint + (int) (sign_char == '-')) { // too big number, change to max or min number Field_decimal::overflow(sign_char == '-'); @@ -654,69 +648,68 @@ void Field_decimal::store(const char *from,uint len) *pos--=' '; //fill with blanks } - // if (tmp_dec) - { - /* - Write digits of the frac_% parts ; - Depending on current_thd->count_cutted_fields, we may also want - to know if some non-zero tail of these parts will - be truncated (for example, 0.002->0.00 will generate a warning, - while 0.000->0.00 will not) - (and 0E1000000000 will not, while 1E-1000000000 will) - */ + /* + Write digits of the frac_% parts ; + Depending on current_thd->count_cutted_fields, we may also want + to know if some non-zero tail of these parts will + be truncated (for example, 0.002->0.00 will generate a warning, + while 0.000->0.00 will not) + (and 0E1000000000 will not, while 1E-1000000000 will) + */ - pos=to+(uint)(field_length-tmp_dec); // Calculate post to '.' - right_wall=to+field_length; - if (pos != right_wall) *pos++='.'; + pos=to+(uint)(field_length-tmp_dec); // Calculate post to '.' + right_wall=to+field_length; + if (pos != right_wall) + *pos++='.'; - if (expo_sign_char == '-') + if (expo_sign_char == '-') + { + while (frac_digits_added_zeros-- > 0) { - while (frac_digits_added_zeros-- > 0) + if (pos == right_wall) { - if (pos == right_wall) - { - if (current_thd->count_cuted_fields && !is_cuted_fields_incr) - break; // Go on below to see if we lose non zero digits - return; - } - *pos++='0'; - } - while (int_digits_end != frac_digits_head_end) - { - tmp_char= *int_digits_end++; - if (pos == right_wall) - { - if (tmp_char != '0') // Losing a non zero digit ? - { - if (!is_cuted_fields_incr) - current_thd->cuted_fields++; - return; - } - continue; - } - *pos++= tmp_char; + if (current_thd->count_cuted_fields && !is_cuted_fields_incr) + break; // Go on below to see if we lose non zero digits + return; } + *pos++='0'; } - - for (;frac_digits_from!=frac_digits_end;) + while (int_digits_end != frac_digits_head_end) { - tmp_char= *frac_digits_from++; + tmp_char= *int_digits_end++; if (pos == right_wall) { - if (tmp_char != '0') // Losing a non zero digit ? - { - if (!is_cuted_fields_incr) - current_thd->cuted_fields++; - return; - } - continue; + if (tmp_char != '0') // Losing a non zero digit ? + { + if (!is_cuted_fields_incr) + current_thd->cuted_fields++; + return; + } + continue; } *pos++= tmp_char; } - - while (pos != right_wall) - *pos++='0'; // Fill with zeros at right of '.' } + + for (;frac_digits_from!=frac_digits_end;) + { + tmp_char= *frac_digits_from++; + if (pos == right_wall) + { + if (tmp_char != '0') // Losing a non zero digit ? + { + if (!is_cuted_fields_incr) + current_thd->cuted_fields++; + return; + } + continue; + } + *pos++= tmp_char; + } + + while (pos != right_wall) + *pos++='0'; // Fill with zeros at right of '.' + } From b0da9dbd24a7fdd89a2471be1fdcf889c3dfc7d6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Nov 2002 14:13:11 +0100 Subject: [PATCH 048/246] - configure.in: replaced AM_PROG_LIBTOOL with AC_PROG_LIBTOOL, since the old macro name is deprecated (according to the libtool 1.4.2 docs). configure.in: - replaced AM_PROG_LIBTOOL with AC_PROG_LIBTOOL, since the old macro name is deprecated (according to the libtool 1.4.2 docs). --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index c1a32249fba..5220b1c9ffd 100644 --- a/configure.in +++ b/configure.in @@ -161,7 +161,7 @@ fi AC_PROG_RANLIB # We use libtool #AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL +AC_PROG_LIBTOOL #AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_DISABLE_FAST_INSTALL AC_DISABLE_SHARED AC_DISABLE_STATIC From c5d4041347524e1e4e415db15071fb7dd6aa79ac Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Nov 2002 16:21:41 +0100 Subject: [PATCH 049/246] BETWEEN fixed myisam/ft_nlq_search.c: cleanup mysql-test/r/func_time.result: updated --- myisam/ft_nlq_search.c | 3 ++- mysql-test/r/func_time.result | 1 + sql/item_cmpfunc.cc | 12 +++++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/myisam/ft_nlq_search.c b/myisam/ft_nlq_search.c index 6df9fd235fa..8c5d504b8d5 100644 --- a/myisam/ft_nlq_search.c +++ b/myisam/ft_nlq_search.c @@ -154,7 +154,8 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio) if (doc_cnt) { word->weight*=GWS_IN_USE; - if (word->weight < 0) word->weight=0; + if (word->weight < 0) + word->weight=0; } DBUG_RETURN(0); diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 671b56ef005..e4fd25a34f0 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -380,6 +380,7 @@ CREATE TABLE t3 (ctime1 char(19) NOT NULL, ctime2 char(19) NOT NULL); INSERT INTO t3 VALUES ("2002-10-29 16:51:06","2002-11-05 16:47:31"); select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; start ctime1 ctime2 +2002-11-04 00:00:00 20021029165106 20021105164731 select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; start ctime1 ctime2 2002-11-04 00:00:00 20021029165106 20021105164731 diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 79d695eea1e..bf3c0af1ea6 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -350,13 +350,19 @@ void Item_func_between::fix_length_and_dec() */ if (!args[0] || !args[1] || !args[2]) return; - cmp_type=args[0]->result_type(); - if (args[0]->binary) + cmp_type=item_cmp_type(args[0]->result_type(), + item_cmp_type(args[1]->result_type(), + args[2]->result_type())); + if (args[0]->binary | args[1]->binary | args[2]->binary) string_compare=stringcmp; else string_compare=sortcmp; - // Make a special case of compare with fields to get nicer DATE comparisons + /* + Make a special case of compare with date/time and longlong fields. + They are compared as integers, so for const item this time-consuming + conversion can be done only once, not for every single comparison + */ if (args[0]->type() == FIELD_ITEM) { Field *field=((Item_field*) args[0])->field; From c88b91020866b1505404157c76c56cbb92410ec5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 03:54:00 +0200 Subject: [PATCH 050/246] Portability fixes for Fortre C++ 5.0 (on Sun) in 32 and 64 bit modes. client/mysqlbinlog.cc: Portability fix configure.in: Added use of ASFLAGS (For Solaris with Forte 5.0) include/my_global.h: Portability fix include/myisam.h: Portability fix include/queues.h: Portability fix innobase/include/ut0ut.h: Portability fix innobase/log/log0log.c: Portability fix innobase/rem/rem0cmp.c: Portability fix innobase/trx/trx0sys.c: Portability fix isam/pack_isam.c: Portability fix myisam/ft_boolean_search.c: Portability fix myisam/mi_dynrec.c: Code change to go around bug in Forte 5.0 myisam/sort.c: Portability fix mysys/my_aes.c: Portability fix scripts/Makefile.am: Support for ASFLAGS scripts/mysqlbug.sh: Support for ASFLAGS sql/field.cc: Portability fix sql/filesort.cc: Portability fix sql/gen_lex_hash.cc: Portability fix sql/ha_innodb.cc: Portability fix Changed SHOW INNODB STATUS to return error instead of writing message to log file. sql/ha_isammrg.cc: Portability fix sql/ha_myisam.cc: Portability fix sql/ha_myisammrg.cc: Portability fix sql/hash_filo.h: Portability fix sql/hostname.cc: Portability fix sql/item_cmpfunc.h: Indentation change sql/item_func.cc: Portability fix sql/item_func.h: Portability fix sql/log.cc: Portability fix sql/log_event.cc: Portability fix sql/mysql_priv.h: Portability fix sql/mysqld.cc: Portability fix Fixed bug with rpl_recovery_rank command line option on 64 bit systems sql/opt_range.cc: Portability fix sql/repl_failsafe.cc: Portability fix sql/slave.cc: Portability fix sql/slave.h: Portability fix sql/sql_acl.cc: Portability fix sql/sql_base.cc: Portability fix sql/sql_cache.cc: Portability fix sql/sql_cache.h: Portability fix sql/sql_class.cc: Portability fix sql/sql_delete.cc: Portability fix sql/sql_insert.cc: Portability fix sql/sql_manager.cc: Portability fix sql/sql_parse.cc: Portability fix BUILD/compile-solaris-sparc-forte: C sql/sql_udf.cc: Portability fix sql/sql_update.cc: Portability fix strings/Makefile.am: Portability fix strings/bmove_upp-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/str_test.c: Cleanup strings/strappend-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strend-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strmake-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strmov-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strnmov-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strstr-sparc.s: Fix so that this works on 32 and 64 bit sparcs strings/strxmov-sparc.s: Fixes to make this more portable, but it's still not usable on 64 bit systems :( BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BUILD/compile-solaris-sparc-forte | 39 +++++++++ BUILD/compile-solaris-sparc-fortre | 19 ----- BitKeeper/etc/logging_ok | 1 + client/mysqlbinlog.cc | 2 +- configure.in | 7 +- include/my_global.h | 31 ++++--- include/myisam.h | 2 +- include/queues.h | 5 +- innobase/include/ut0ut.h | 1 + innobase/log/log0log.c | 4 +- innobase/rem/rem0cmp.c | 2 +- innobase/trx/trx0sys.c | 2 +- isam/pack_isam.c | 14 ++-- myisam/ft_boolean_search.c | 12 +-- myisam/mi_dynrec.c | 18 +++-- myisam/sort.c | 2 +- mysys/my_aes.c | 24 +++--- scripts/Makefile.am | 1 + scripts/mysqlbug.sh | 2 +- sql/field.cc | 18 ++--- sql/filesort.cc | 2 +- sql/gen_lex_hash.cc | 2 +- sql/ha_innodb.cc | 12 +-- sql/ha_isammrg.cc | 12 +-- sql/ha_myisam.cc | 36 ++++----- sql/ha_myisammrg.cc | 30 ++++--- sql/hash_filo.h | 4 +- sql/hostname.cc | 2 +- sql/item_cmpfunc.h | 6 +- sql/item_func.cc | 61 +++++++------- sql/item_func.h | 2 +- sql/log.cc | 20 ++--- sql/log_event.cc | 32 ++++---- sql/mysql_priv.h | 9 +-- sql/mysqld.cc | 38 ++++----- sql/opt_range.cc | 55 +++++++------ sql/repl_failsafe.cc | 9 ++- sql/slave.cc | 6 +- sql/slave.h | 4 +- sql/sql_acl.cc | 2 +- sql/sql_base.cc | 6 +- sql/sql_cache.cc | 126 ++++++++++++++++------------- sql/sql_cache.h | 2 +- sql/sql_class.cc | 27 ++++--- sql/sql_delete.cc | 26 +++--- sql/sql_insert.cc | 4 +- sql/sql_manager.cc | 2 +- sql/sql_parse.cc | 10 +-- sql/sql_udf.cc | 2 +- sql/sql_update.cc | 59 +++++++------- strings/Makefile.am | 11 ++- strings/bmove_upp-sparc.s | 4 +- strings/str_test.c | 3 - strings/strappend-sparc.s | 14 ++-- strings/strend-sparc.s | 6 +- strings/strmake-sparc.s | 8 +- strings/strmov-sparc.s | 6 +- strings/strnmov-sparc.s | 8 +- strings/strstr-sparc.s | 18 ++--- strings/strxmov-sparc.s | 17 ++-- 60 files changed, 485 insertions(+), 424 deletions(-) create mode 100755 BUILD/compile-solaris-sparc-forte delete mode 100755 BUILD/compile-solaris-sparc-fortre diff --git a/BUILD/compile-solaris-sparc-forte b/BUILD/compile-solaris-sparc-forte new file mode 100755 index 00000000000..afd106afc67 --- /dev/null +++ b/BUILD/compile-solaris-sparc-forte @@ -0,0 +1,39 @@ +#! /bin/sh + +gmake -k clean || true +/bin/rm -f */.deps/*.P config.cache + +aclocal && autoheader && aclocal && automake && autoconf +(cd bdb/dist && sh s_all) +(cd innobase && aclocal && autoheader && aclocal && automake && autoconf) +if [ -d gemini ] +then + (cd gemini && aclocal && autoheader && aclocal && automake && autoconf) +fi + + +# Assume Forte is installed in /opt/SUNWSpro + +PATH=/opt/SUNWspro/bin/:$PATH + +# For "optimal" code for this computer add -fast to EXTRA +# To compile 64 bit, add -xarch=v9 to EXTRA_64_BIT + +EXTRA_64_BIT="-xarch=v9" # Remove comment to get 64 bit binaries +EXTRA="-fast" # Remove comment to target current machine + +# +# The following should not need to be touched +# + +STD="-mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT" +ASFLAGS="$EXTRA_64_BIT" \ +CC=cc-5.0 CFLAGS="-Xa -xstrconst $STD" \ +CXX=CC CXXFLAGS="-noex $STD" \ +./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client + +gmake -j 4 +if [ $? = 0 ] +then + make test +fi diff --git a/BUILD/compile-solaris-sparc-fortre b/BUILD/compile-solaris-sparc-fortre deleted file mode 100755 index dca0412c979..00000000000 --- a/BUILD/compile-solaris-sparc-fortre +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/sh - -gmake -k clean || true -/bin/rm -f */.deps/*.P config.cache - -aclocal && autoheader && aclocal && automake && autoconf -(cd bdb/dist && sh s_all) -(cd innobase && aclocal && autoheader && aclocal && automake && autoconf) -if [ -d gemini ] -then - (cd gemini && aclocal && autoheader && aclocal && automake && autoconf) -fi - -PATH=/opt/SUNWspro/bin/:$PATH -CC=cc CFLAGS="-Xa -fast -xO4 -native -xstrconst -mt -D_FORTREC_" \ -CXX=CC CXXFLAGS="-noex -xO4 -mt" \ -./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client - -gmake -j 4 diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index ba06996cac1..f4174cc2fbf 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -40,6 +40,7 @@ miguel@hegel.local miguel@light. miguel@light.local monty@bitch.mysql.fi +monty@butch. monty@donna.mysql.fi monty@hundin.mysql.fi monty@mashka.mysql.fi diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index b2100ac1596..fbded7aaaaf 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -176,7 +176,7 @@ static void dump_remote_file(NET* net, const char* fname) } -static my_bool +extern "C" static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) { diff --git a/configure.in b/configure.in index c1a32249fba..52b4e93e77d 100644 --- a/configure.in +++ b/configure.in @@ -72,12 +72,14 @@ case $MACHINE_TYPE in esac # Save some variables and the command line options for mysqlbug +SAVE_ASFLAGS="$ASFLAGS" SAVE_CFLAGS="$CFLAGS" SAVE_CXXFLAGS="$CXXFLAGS" SAVE_LDFLAGS="$LDFLAGS" SAVE_CXXLDFLAGS="$CXXLDFLAGS" CONF_COMMAND="$0 $ac_configure_args" AC_SUBST(CONF_COMMAND) +AC_SUBST(SAVE_ASFLAGS) AC_SUBST(SAVE_CFLAGS) AC_SUBST(SAVE_CXXFLAGS) AC_SUBST(SAVE_LDFLAGS) @@ -602,8 +604,9 @@ AC_ARG_ENABLE(assembler, AC_MSG_CHECKING(if we should use assembler functions) # For now we only support assembler on i386 and sparc systems AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386") -AM_CONDITIONAL(ASSEMBLER_sparc, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc") -AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc_TRUE" = "") +AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc") +AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9") +AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "") if test "$ASSEMBLER_TRUE" = "" then diff --git a/include/my_global.h b/include/my_global.h index 5a8e3b2cba7..f356cb1646b 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -38,6 +38,14 @@ #define HAVE_ERRNO_AS_DEFINE #endif /* __CYGWIN__ */ +/* Macros to make switching between C and C++ mode easier */ +#ifdef __cplusplus +#define C_MODE_START extern "C" { +#define C_MODE_END } +#else +#define C_MODE_START +#define C_MODE_END +#endif #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32) #include @@ -121,13 +129,9 @@ /* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */ #define ulonglong2double(A) my_ulonglong2double(A) #define my_off_t2double(A) my_ulonglong2double(A) -#ifdef __cplusplus -extern "C" { -#endif +C_MODE_START double my_ulonglong2double(unsigned long long A); -#ifdef __cplusplus -} -#endif +C_MODE_END #endif /* _AIX */ #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ @@ -385,7 +389,9 @@ typedef int my_socket; /* File descriptor for sockets */ #endif /* Type for fuctions that handles signals */ #define sig_handler RETSIGTYPE +C_MODE_START typedef void (*sig_return)();/* Returns type from signal */ +C_MODE_END #if defined(__GNUC__) && !defined(_lint) typedef char pchar; /* Mixed prototypes can take char */ typedef char puchar; /* Mixed prototypes can take char */ @@ -399,8 +405,10 @@ typedef int pbool; /* Mixed prototypes can't take char */ typedef int pshort; /* Mixed prototypes can't take short int */ typedef double pfloat; /* Mixed prototypes can't take float */ #endif +C_MODE_START typedef int (*qsort_cmp)(const void *,const void *); typedef int (*qsort_cmp2)(void*, const void *,const void *); +C_MODE_END #ifdef HAVE_mit_thread #define qsort_t void #undef QSORT_TYPE_IS_VOID @@ -1038,13 +1046,4 @@ typedef union { #define statistic_add(V,C,L) (V)+=(C) #endif -/* Macros to make switching between C and C++ mode easier */ -#ifdef __cplusplus -#define C_MODE_START extern "C" { -#define C_MODE_END } -#else -#define C_MODE_START -#define C_MODE_END -#endif - -#endif /* _global_h */ +#endif /* my_global_h */ diff --git a/include/myisam.h b/include/myisam.h index ff8544ba492..79d18bf8736 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -296,7 +296,7 @@ extern uint mi_get_pointer_length(ulonglong file_length, uint def); #define T_VERBOSE (1L << 28) #define T_VERY_SILENT (1L << 29) #define T_WAIT_FOREVER (1L << 30) -#define T_WRITE_LOOP (1L << 31) +#define T_WRITE_LOOP ((ulong) 1L << 31) #define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL) diff --git a/include/queues.h b/include/queues.h index 70cb99a1513..699705d0869 100644 --- a/include/queues.h +++ b/include/queues.h @@ -41,12 +41,13 @@ typedef struct st_queue { #define queue_element(queue,index) ((queue)->root[index+1]) #define queue_end(queue) ((queue)->root[(queue)->elements]) #define queue_replaced(queue) _downheap(queue,1) +typedef int (*queue_compare)(void *,byte *, byte *); int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key, - pbool max_at_top, int (*compare)(void *,byte *, byte *), + pbool max_at_top, queue_compare compare, void *first_cmp_arg); int reinit_queue(QUEUE *queue,uint max_elements,uint offset_to_key, - pbool max_at_top, int (*compare)(void *,byte *, byte *), + pbool max_at_top, queue_compare compare, void *first_cmp_arg); void delete_queue(QUEUE *queue); void queue_insert(QUEUE *queue,byte *element); diff --git a/innobase/include/ut0ut.h b/innobase/include/ut0ut.h index 8ec23b23dcd..d4697c47266 100644 --- a/innobase/include/ut0ut.h +++ b/innobase/include/ut0ut.h @@ -10,6 +10,7 @@ Created 1/20/1994 Heikki Tuuri #define ut0ut_h #include "univ.i" +#include #include #ifndef MYSQL_SERVER #include diff --git a/innobase/log/log0log.c b/innobase/log/log0log.c index c798a08e2de..f9b785ccbd5 100644 --- a/innobase/log/log0log.c +++ b/innobase/log/log0log.c @@ -1654,8 +1654,8 @@ log_reset_first_header_and_checkpoint( lsn = ut_dulint_add(start, LOG_BLOCK_HDR_SIZE); /* Write the label of ibbackup --restore */ - sprintf(hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, "ibbackup "); - ut_sprintf_timestamp(hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP + sprintf((char*) hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, "ibbackup "); + ut_sprintf_timestamp((char*) hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP + strlen("ibbackup ")); buf = hdr_buf + LOG_CHECKPOINT_1; diff --git a/innobase/rem/rem0cmp.c b/innobase/rem/rem0cmp.c index c50516dfc8b..e9740d7ea78 100644 --- a/innobase/rem/rem0cmp.c +++ b/innobase/rem/rem0cmp.c @@ -353,7 +353,7 @@ cmp_data_data_slow( data2++; } - return(0); + return(0); /* Not reached */ } /***************************************************************** diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c index 33c962772e8..19cf52c8676 100644 --- a/innobase/trx/trx0sys.c +++ b/innobase/trx/trx0sys.c @@ -474,7 +474,7 @@ trx_sys_update_mysql_binlog_offset( mlog_write_string(sys_header + field + TRX_SYS_MYSQL_LOG_NAME, - file_name, 1 + ut_strlen(file_name), mtr); + (byte*) file_name, 1 + ut_strlen(file_name), mtr); } if (mach_read_from_4(sys_header + field diff --git a/isam/pack_isam.c b/isam/pack_isam.c index 08cae65ef2c..b2e21afc743 100644 --- a/isam/pack_isam.c +++ b/isam/pack_isam.c @@ -67,7 +67,7 @@ struct st_file_buffer { char *buffer,*pos,*end; my_off_t pos_in_file; int bits; - uint byte; + uint bytes; }; struct st_huff_tree; @@ -1832,7 +1832,7 @@ static void init_file_buffer(File file, pbool read_buffer) file_buffer.pos=file_buffer.buffer; file_buffer.bits=BITS_SAVED; } - file_buffer.byte=0; + file_buffer.bytes=0; } @@ -1863,13 +1863,13 @@ static void write_bits (register ulong value, register uint bits) { if ((file_buffer.bits-=(int) bits) >= 0) { - file_buffer.byte|=value << file_buffer.bits; + file_buffer.bytes|=value << file_buffer.bits; } else { reg3 uint byte_buff; bits= (uint) -file_buffer.bits; - byte_buff=file_buffer.byte | (uint) (value >> bits); + byte_buff=file_buffer.bytes | (uint) (value >> bits); #if BITS_SAVED == 32 *file_buffer.pos++= (byte) (byte_buff >> 24) ; *file_buffer.pos++= (byte) (byte_buff >> 16) ; @@ -1895,7 +1895,7 @@ static void write_bits (register ulong value, register uint bits) if (file_buffer.pos >= file_buffer.end) VOID(flush_buffer((uint) ~0)); file_buffer.bits=(int) (BITS_SAVED - bits); - file_buffer.byte=(uint) (value << (BITS_SAVED - bits)); + file_buffer.bytes=(uint) (value << (BITS_SAVED - bits)); } return; } @@ -1907,7 +1907,7 @@ static void flush_bits (void) uint bits,byte_buff; bits=(file_buffer.bits) & ~7; - byte_buff = file_buffer.byte >> bits; + byte_buff = file_buffer.bytes >> bits; bits=BITS_SAVED - bits; while (bits > 0) { @@ -1915,7 +1915,7 @@ static void flush_bits (void) *file_buffer.pos++= (byte) (uchar) (byte_buff >> bits) ; } file_buffer.bits=BITS_SAVED; - file_buffer.byte=0; + file_buffer.bytes=0; return; } diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 5ad75ba30c4..a8fa011edf6 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -119,8 +119,8 @@ static int FTB_WORD_cmp(my_off_t *v, FTB_WORD *a, FTB_WORD *b) static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b) { /* ORDER BY word DESC, ndepth DESC */ - int i=_mi_compare_text(cs, (*b)->word+1,(*b)->len-1, - (*a)->word+1,(*a)->len-1,0); + int i=_mi_compare_text(cs, (uchar*) (*b)->word+1,(*b)->len-1, + (uchar*) (*a)->word+1,(*a)->len-1,0); if (!i) i=CMP_NUM((*b)->ndepth,(*a)->ndepth); return i; @@ -255,7 +255,7 @@ static void _ftb_init_index_search(FT_INFO *ftb) r=_mi_compare_text(ftb->charset, info->lastkey + (ftbw->flags&FTB_FLAG_TRUNC), ftbw->len - (ftbw->flags&FTB_FLAG_TRUNC), - ftbw->word + (ftbw->flags&FTB_FLAG_TRUNC), + (uchar*) ftbw->word + (ftbw->flags&FTB_FLAG_TRUNC), ftbw->len - (ftbw->flags&FTB_FLAG_TRUNC), 0); } @@ -473,7 +473,7 @@ int ft_boolean_read_next(FT_INFO *ftb, char *record) r=_mi_compare_text(ftb->charset, info->lastkey + (ftbw->flags&FTB_FLAG_TRUNC), ftbw->len - (ftbw->flags&FTB_FLAG_TRUNC), - ftbw->word + (ftbw->flags&FTB_FLAG_TRUNC), + (uchar*) ftbw->word + (ftbw->flags&FTB_FLAG_TRUNC), ftbw->len - (ftbw->flags&FTB_FLAG_TRUNC), 0); } @@ -576,7 +576,7 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length) for (a=0, b=ftb->queue.elements, c=(a+b)/2; b-a>1; c=(a+b)/2) { ftbw=ftb->list[c]; - if (_mi_compare_text(ftb->charset, word.pos, word.len, + if (_mi_compare_text(ftb->charset, (uchar*) word.pos, word.len, (uchar*) ftbw->word+1, ftbw->len-1, (my_bool) (ftbw->flags&FTB_FLAG_TRUNC)) >0) b=c; @@ -586,7 +586,7 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length) for (; c>=0; c--) { ftbw=ftb->list[c]; - if (_mi_compare_text(ftb->charset, word.pos,word.len, + if (_mi_compare_text(ftb->charset, (uchar*) word.pos, word.len, (uchar*) ftbw->word+1,ftbw->len-1, (my_bool) (ftbw->flags&FTB_FLAG_TRUNC))) break; diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 60e6fc0519a..d33aa2718b7 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -157,6 +157,7 @@ static int _mi_find_writepos(MI_INFO *info, ulong *length) /* length of block at filepos */ { MI_BLOCK_INFO block_info; + ulong tmp; DBUG_ENTER("_mi_find_writepos"); if (info->s->state.dellink != HA_OFFSET_ERROR) @@ -182,21 +183,22 @@ static int _mi_find_writepos(MI_INFO *info, { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; - if ((*length=reclength+3 + test(reclength >= (65520-3))) < + if ((tmp=reclength+3 + test(reclength >= (65520-3))) < info->s->base.min_block_length) - *length=info->s->base.min_block_length; + tmp= info->s->base.min_block_length; else - *length= ((*length+MI_DYN_ALIGN_SIZE-1) & - (~ (ulong) (MI_DYN_ALIGN_SIZE-1))); + tmp= ((tmp+MI_DYN_ALIGN_SIZE-1) & + (~ (ulong) (MI_DYN_ALIGN_SIZE-1))); if (info->state->data_file_length > - (info->s->base.max_data_file_length- *length)) + (info->s->base.max_data_file_length - tmp)) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(-1); } - if (*length > MI_MAX_BLOCK_LENGTH) - *length=MI_MAX_BLOCK_LENGTH; - info->state->data_file_length+= *length; + if (tmp > MI_MAX_BLOCK_LENGTH) + tmp=MI_MAX_BLOCK_LENGTH; + *length= tmp; + info->state->data_file_length+= tmp; info->s->state.split++; info->update|=HA_STATE_WRITE_AT_END; } diff --git a/myisam/sort.c b/myisam/sort.c index 79d31147bfc..fd5622e1340 100644 --- a/myisam/sort.c +++ b/myisam/sort.c @@ -488,7 +488,7 @@ int thr_write_keys(MI_SORT_PARAM *sort_param) printf("Key %d - Merging %u keys\n",sinfo->key+1, sinfo->keys); if (merge_many_buff(sinfo, keys, (uchar **)mergebuf, dynamic_element(&sinfo->buffpek, 0, BUFFPEK *), - &maxbuffer, &sinfo->tempfile)) + (int*) &maxbuffer, &sinfo->tempfile)) { got_error=1; continue; diff --git a/mysys/my_aes.c b/mysys/my_aes.c index a3618e44b82..16d326d7d1f 100644 --- a/mysys/my_aes.c +++ b/mysys/my_aes.c @@ -60,19 +60,19 @@ static int my_aes_create_key(KEYINSTANCE *aes_key, enum encrypt_dir direction, const char *key, int key_length) { - char rkey[AES_KEY_LENGTH/8]; /* The real key to be used for encryption */ - char *rkey_end=rkey+AES_KEY_LENGTH/8; /* Real key boundary */ - char *ptr; /* Start of the real key*/ + uint8 rkey[AES_KEY_LENGTH/8]; /* The real key to be used for encryption */ + uint8 *rkey_end=rkey+AES_KEY_LENGTH/8; /* Real key boundary */ + uint8 *ptr; /* Start of the real key*/ const char *sptr; /* Start of the working key */ const char *key_end=key+key_length; /* Working key boundary*/ - bzero(rkey,AES_KEY_LENGTH/8); /* Set initial key */ + bzero((char*) rkey,AES_KEY_LENGTH/8); /* Set initial key */ for (ptr= rkey, sptr= key; sptr < key_end; ptr++,sptr++) { if (ptr == rkey_end) ptr= rkey; /* Just loop over tmp_key until we used all key */ - *ptr^= *sptr; + *ptr^= (uint8) *sptr; } #ifdef AES_USE_KEY_BITS /* @@ -128,7 +128,7 @@ int my_aes_encrypt(const char* source, int source_length, char* dest, const char* key, int key_length) { KEYINSTANCE aes_key; - char block[AES_BLOCK_SIZE]; /* 128 bit block used for padding */ + uint8 block[AES_BLOCK_SIZE]; /* 128 bit block used for padding */ int rc; /* result codes */ int num_blocks; /* number of complete blocks */ char pad_len; /* pad size for the last block */ @@ -141,7 +141,8 @@ int my_aes_encrypt(const char* source, int source_length, char* dest, for (i = num_blocks; i > 0; i--) /* Encode complete blocks */ { - rijndaelEncrypt(aes_key.rk, aes_key.nr, source, dest); + rijndaelEncrypt(aes_key.rk, aes_key.nr, (const uint8*) source, + (uint8*) dest); source+= AES_BLOCK_SIZE; dest+= AES_BLOCK_SIZE; } @@ -150,7 +151,7 @@ int my_aes_encrypt(const char* source, int source_length, char* dest, pad_len = AES_BLOCK_SIZE - (source_length - AES_BLOCK_SIZE*num_blocks); memcpy(block, source, 16 - pad_len); bfill(block + AES_BLOCK_SIZE - pad_len, pad_len, pad_len); - rijndaelEncrypt(aes_key.rk, aes_key.nr, block, dest); + rijndaelEncrypt(aes_key.rk, aes_key.nr, block, (uint8*) dest); return AES_BLOCK_SIZE*(num_blocks + 1); } @@ -175,7 +176,7 @@ int my_aes_decrypt(const char *source, int source_length, char *dest, const char *key, int key_length) { KEYINSTANCE aes_key; - char block[AES_BLOCK_SIZE]; /* 128 bit block used for padding */ + uint8 block[AES_BLOCK_SIZE]; /* 128 bit block used for padding */ int rc; /* Result codes */ int num_blocks; /* Number of complete blocks */ uint pad_len; /* Pad size for the last block */ @@ -191,12 +192,13 @@ int my_aes_decrypt(const char *source, int source_length, char *dest, for (i = num_blocks-1; i > 0; i--) /* Decode all but last blocks */ { - rijndaelDecrypt(aes_key.rk, aes_key.nr, source, dest); + rijndaelDecrypt(aes_key.rk, aes_key.nr, (const uint8*) source, + (uint8*) dest); source+= AES_BLOCK_SIZE; dest+= AES_BLOCK_SIZE; } - rijndaelDecrypt(aes_key.rk, aes_key.nr, source, block); + rijndaelDecrypt(aes_key.rk, aes_key.nr, (const uint8*) source, block); /* Use last char in the block as size */ pad_len = (uint) (uchar) block[AES_BLOCK_SIZE-1]; diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 1469f3f2f2d..7ecd00f5b39 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -101,6 +101,7 @@ SUFFIXES = .sh -e 's!@''CXX''@!@CXX@!'\ -e 's!@''GXX''@!@GXX@!'\ -e 's!@''PERL''@!@PERL@!' \ + -e 's!@''ASFLAGS''@!@SAVE_ASFLAGS@!'\ -e 's!@''CFLAGS''@!@SAVE_CFLAGS@!'\ -e 's!@''CXXFLAGS''@!@SAVE_CXXFLAGS@!'\ -e 's!@''LDFLAGS''@!@SAVE_LDFLAGS@!'\ diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh index bd5cb497e59..8dbc931b7f6 100644 --- a/scripts/mysqlbug.sh +++ b/scripts/mysqlbug.sh @@ -8,7 +8,7 @@ VERSION="@VERSION@@MYSQL_SERVER_SUFFIX@" COMPILATION_COMMENT="@COMPILATION_COMMENT@" BUGmysql="mysql@lists.mysql.com" # This is set by configure -COMP_ENV_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@'" +COMP_ENV_INFO="CC='@CC@' CFLAGS='@CFLAGS@' CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' LDFLAGS='@LDFLAGS@' ASFLAGS='@ASFLAGS@'" CONFIGURE_LINE="@CONF_COMMAND@" LIBC_INFO="" diff --git a/sql/field.cc b/sql/field.cc index 42ddcc3b9d2..14cdc2dba95 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -3703,12 +3703,12 @@ int Field_string::pack_cmp(const char *b, uint length) } -uint Field_string::packed_col_length(const char *ptr, uint length) +uint Field_string::packed_col_length(const char *data_ptr, uint length) { if (length > 255) - return uint2korr(ptr)+2; + return uint2korr(data_ptr)+2; else - return (uint) ((uchar) *ptr)+1; + return (uint) ((uchar) *data_ptr)+1; } uint Field_string::max_packed_col_length(uint max_length) @@ -3922,12 +3922,12 @@ int Field_varstring::pack_cmp(const char *b, uint key_length) return my_sortncmp(a,a_length, b,b_length); } -uint Field_varstring::packed_col_length(const char *ptr, uint length) +uint Field_varstring::packed_col_length(const char *data_ptr, uint length) { if (length > 255) - return uint2korr(ptr)+2; + return uint2korr(data_ptr)+2; else - return (uint) ((uchar) *ptr)+1; + return (uint) ((uchar) *data_ptr)+1; } uint Field_varstring::max_packed_col_length(uint max_length) @@ -4408,12 +4408,12 @@ char *Field_blob::pack_key_from_key_image(char *to, const char *from, return to+length; } -uint Field_blob::packed_col_length(const char *ptr, uint length) +uint Field_blob::packed_col_length(const char *data_ptr, uint length) { if (length > 255) - return uint2korr(ptr)+2; + return uint2korr(data_ptr)+2; else - return (uint) ((uchar) *ptr)+1; + return (uint) ((uchar) *data_ptr)+1; } uint Field_blob::max_packed_col_length(uint max_length) diff --git a/sql/filesort.cc b/sql/filesort.cc index d8fcb0292ff..e42baf333a5 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -732,7 +732,7 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file, org_max_rows=max_rows=param->max_rows; if (init_queue(&queue,(uint) (Tb-Fb)+1,offsetof(BUFFPEK,key),0, - (int (*) (void *, byte *,byte*)) + (queue_compare) (cmp=get_ptr_compare(sort_length)),(void*) &sort_length)) DBUG_RETURN(1); /* purecov: inspected */ for (buffpek= Fb ; buffpek <= Tb ; buffpek++) diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index c24e7b6d124..bd3d5e1bf7a 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -360,7 +360,7 @@ static void usage(int version) } -static my_bool +extern "C" static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument __attribute__((unused))) { diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index b849bbb76b2..d06e0ab7b57 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3344,7 +3344,7 @@ ha_innobase::estimate_number_of_rows(void) row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; dict_index_t* index; ulonglong estimate; - ulonglong data_file_length; + ulonglong local_data_file_length; /* Warning: since it is not sure that MySQL calls external_lock before calling this function, the trx field in prebuilt can be @@ -3354,7 +3354,7 @@ ha_innobase::estimate_number_of_rows(void) index = dict_table_get_first_index_noninline(prebuilt->table); - data_file_length = ((ulonglong) index->stat_n_leaf_pages) + local_data_file_length = ((ulonglong) index->stat_n_leaf_pages) * UNIV_PAGE_SIZE; /* Calculate a minimum length for a clustered index record and from @@ -3363,7 +3363,7 @@ ha_innobase::estimate_number_of_rows(void) by a threshold factor, we must add a safety factor 2 in front of the formula below. */ - estimate = 2 * data_file_length / dict_index_calc_min_rec_len(index); + estimate = 2 * local_data_file_length / dict_index_calc_min_rec_len(index); DBUG_RETURN((ha_rows) estimate); } @@ -3847,9 +3847,9 @@ innodb_show_status( DBUG_ENTER("innodb_show_status"); if (innodb_skip) { - fprintf(stderr, - "Cannot call SHOW INNODB STATUS because skip-innodb is defined\n"); - + my_message(ER_NOT_SUPPORTED_YET, + "Cannot call SHOW INNODB STATUS because skip-innodb is defined", + MYF(0)); DBUG_RETURN(-1); } diff --git a/sql/ha_isammrg.cc b/sql/ha_isammrg.cc index b110ffba2f9..94e394e7665 100644 --- a/sql/ha_isammrg.cc +++ b/sql/ha_isammrg.cc @@ -190,13 +190,15 @@ THR_LOCK_DATA **ha_isammrg::store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) { - MRG_TABLE *table; + MRG_TABLE *open_table; - for (table=file->open_tables ; table != file->end_table ; table++) + for (open_table=file->open_tables ; + open_table != file->end_table ; + open_table++) { - *(to++)= &table->table->lock; - if (lock_type != TL_IGNORE && table->table->lock.type == TL_UNLOCK) - table->table->lock.type=lock_type; + *(to++)= &open_table->table->lock; + if (lock_type != TL_IGNORE && open_table->table->lock.type == TL_UNLOCK) + open_table->table->lock.type=lock_type; } return to; } diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index f96ef7210ac..a92c4f64668 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -1004,7 +1004,7 @@ void ha_myisam::update_create_info(HA_CREATE_INFO *create_info) } -int ha_myisam::create(const char *name, register TABLE *table, +int ha_myisam::create(const char *name, register TABLE *table_arg, HA_CREATE_INFO *info) { int error; @@ -1016,20 +1016,20 @@ int ha_myisam::create(const char *name, register TABLE *table, MI_KEYDEF *keydef; MI_COLUMNDEF *recinfo,*recinfo_pos; MI_KEYSEG *keyseg; - uint options=table->db_options_in_use; + uint options=table_arg->db_options_in_use; DBUG_ENTER("ha_myisam::create"); type=HA_KEYTYPE_BINARY; // Keep compiler happy if (!(my_multi_malloc(MYF(MY_WME), - &recinfo,(table->fields*2+2)*sizeof(MI_COLUMNDEF), - &keydef, table->keys*sizeof(MI_KEYDEF), + &recinfo,(table_arg->fields*2+2)*sizeof(MI_COLUMNDEF), + &keydef, table_arg->keys*sizeof(MI_KEYDEF), &keyseg, - ((table->key_parts + table->keys) * sizeof(MI_KEYSEG)), + ((table_arg->key_parts + table_arg->keys) * sizeof(MI_KEYSEG)), 0))) DBUG_RETURN(1); - pos=table->key_info; - for (i=0; i < table->keys ; i++, pos++) + pos=table_arg->key_info; + for (i=0; i < table_arg->keys ; i++, pos++) { keydef[i].flag= (pos->flags & (HA_NOSAME | HA_FULLTEXT)); keydef[i].seg=keyseg; @@ -1072,7 +1072,7 @@ int ha_myisam::create(const char *name, register TABLE *table, { keydef[i].seg[j].null_bit=field->null_bit; keydef[i].seg[j].null_pos= (uint) (field->null_ptr- - (uchar*) table->record[0]); + (uchar*) table_arg->record[0]); } else { @@ -1090,19 +1090,19 @@ int ha_myisam::create(const char *name, register TABLE *table, keydef[i].seg[j].flag|=HA_BLOB_PART; /* save number of bytes used to pack length */ keydef[i].seg[j].bit_start= (uint) (field->pack_length() - - table->blob_ptr_size); + table_arg->blob_ptr_size); } } keyseg+=pos->key_parts; } recpos=0; recinfo_pos=recinfo; - while (recpos < (uint) table->reclength) + while (recpos < (uint) table_arg->reclength) { Field **field,*found=0; - minpos=table->reclength; length=0; + minpos=table_arg->reclength; length=0; - for (field=table->field ; *field ; field++) + for (field=table_arg->field ; *field ; field++) { if ((fieldpos=(*field)->offset()) >= recpos && fieldpos <= minpos) @@ -1148,7 +1148,7 @@ int ha_myisam::create(const char *name, register TABLE *table, { recinfo_pos->null_bit=found->null_bit; recinfo_pos->null_pos= (uint) (found->null_ptr- - (uchar*) table->record[0]); + (uchar*) table_arg->record[0]); } else { @@ -1163,13 +1163,13 @@ int ha_myisam::create(const char *name, register TABLE *table, } MI_CREATE_INFO create_info; bzero((char*) &create_info,sizeof(create_info)); - create_info.max_rows=table->max_rows; - create_info.reloc_rows=table->min_rows; + create_info.max_rows=table_arg->max_rows; + create_info.reloc_rows=table_arg->min_rows; create_info.auto_increment=(info->auto_increment_value ? info->auto_increment_value -1 : (ulonglong) 0); - create_info.data_file_length= ((ulonglong) table->max_rows * - table->avg_row_length); + create_info.data_file_length= ((ulonglong) table_arg->max_rows * + table_arg->avg_row_length); create_info.raid_type=info->raid_type; create_info.raid_chunks= (info->raid_chunks ? info->raid_chunks : RAID_DEFAULT_CHUNKS); @@ -1179,7 +1179,7 @@ int ha_myisam::create(const char *name, register TABLE *table, create_info.index_file_name=info->index_file_name; error=mi_create(fn_format(buff,name,"","",2+4), - table->keys,keydef, + table_arg->keys,keydef, (uint) (recinfo_pos-recinfo), recinfo, 0, (MI_UNIQUEDEF*) 0, &create_info, diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index c35bf657445..281a4431045 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -262,13 +262,15 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) { - MYRG_TABLE *table; + MYRG_TABLE *open_table; - for (table=file->open_tables ; table != file->end_table ; table++) + for (open_table=file->open_tables ; + open_table != file->end_table ; + open_table++) { - *(to++)= &table->table->lock; - if (lock_type != TL_IGNORE && table->table->lock.type == TL_UNLOCK) - table->table->lock.type=lock_type; + *(to++)= &open_table->table->lock; + if (lock_type != TL_IGNORE && open_table->table->lock.type == TL_UNLOCK) + open_table->table->lock.type=lock_type; } return to; } @@ -279,14 +281,16 @@ void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info) DBUG_ENTER("ha_myisammrg::update_create_info"); if (!(create_info->used_fields & HA_CREATE_USED_UNION)) { - MYRG_TABLE *table; + MYRG_TABLE *open_table; THD *thd=current_thd; create_info->merge_list.next= &create_info->merge_list.first; create_info->merge_list.elements=0; - for (table=file->open_tables ; table != file->end_table ; table++) + for (open_table=file->open_tables ; + open_table != file->end_table ; + open_table++) { - char *name=table->table->filename; + char *name=open_table->table->filename; char buff[FN_REFLEN]; TABLE_LIST *ptr; if (!(ptr = (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST)))) @@ -340,13 +344,15 @@ void ha_myisammrg::append_create_info(String *packet) packet->append(get_type(&merge_insert_method,file->merge_insert_method-1)); } packet->append(" UNION=(",8); - MYRG_TABLE *table,*first; + MYRG_TABLE *open_table,*first; - for (first=table=file->open_tables ; table != file->end_table ; table++) + for (first=open_table=file->open_tables ; + open_table != file->end_table ; + open_table++) { - char *name=table->table->filename; + char *name= open_table->table->filename; fn_format(buff,name,"","",3); - if (table != first) + if (open_table != first) packet->append(','); packet->append(buff,(uint) strlen(buff)); } diff --git a/sql/hash_filo.h b/sql/hash_filo.h index b8d45f0d3be..34584b45d8c 100644 --- a/sql/hash_filo.h +++ b/sql/hash_filo.h @@ -40,7 +40,7 @@ class hash_filo { const uint size, key_offset, key_length; const hash_get_key get_key; - void (*free_element)(void*); + hash_free_key free_element; bool init; hash_filo_element *first_link,*last_link; @@ -49,7 +49,7 @@ public: HASH cache; hash_filo(uint size_arg, uint key_offset_arg , uint key_length_arg, - hash_get_key get_key_arg,void (*free_element_arg)(void*)) + hash_get_key get_key_arg, hash_free_key free_element_arg) :size(size_arg), key_offset(key_offset_arg), key_length(key_length_arg), get_key(get_key_arg), free_element(free_element_arg),init(0) { diff --git a/sql/hostname.cc b/sql/hostname.cc index abccc466a22..be035e52ac1 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -63,7 +63,7 @@ bool hostname_cache_init() if (!(hostname_cache=new hash_filo(HOST_CACHE_SIZE, offset, sizeof(struct in_addr),NULL, - (void (*)(void*)) free))) + (hash_free_key) free))) return 1; hostname_cache->clear(); return 0; diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 9d83a8a9673..214abff4b77 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -292,9 +292,9 @@ public: virtual void set(uint pos,Item *item)=0; virtual byte *get_value(Item *item)=0; void sort() - { - qsort(base,used_count,size,compare); - } + { + qsort(base,used_count,size,compare); + } int find(Item *item); }; diff --git a/sql/item_func.cc b/sql/item_func.cc index 7da5435276d..48b11efcace 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -711,13 +711,14 @@ double Item_func_rand::val() } else if (!thd->rand_used) { - // no need to send a Rand log event if seed was given eg: RAND(seed), - // as it will be replicated in the query as such. + /* + No need to send a Rand log event if seed was given eg: RAND(seed), + as it will be replicated in the query as such. - // save the seed only the first time RAND() is used in the query - - // once events are forwarded rather than recreated, - // the following can be skipped if inside the slave thread + Save the seed only the first time RAND() is used in the query + Once events are forwarded rather than recreated, + the following can be skipped if inside the slave thread + */ thd->rand_used=1; thd->rand_saved_seed1=thd->rand.seed1; thd->rand_saved_seed2=thd->rand.seed2; @@ -1957,13 +1958,13 @@ void Item_func_set_user_var::print(String *str) user_var_entry *Item_func_get_user_var::get_entry() { - if (!entry || ! entry->value) + if (!var_entry || ! var_entry->value) { null_value=1; return 0; } null_value=0; - return entry; + return var_entry; } @@ -2032,8 +2033,8 @@ void Item_func_get_user_var::fix_length_and_dec() maybe_null=1; decimals=NOT_FIXED_DEC; max_length=MAX_BLOB_WIDTH; - if ((entry= get_variable(&thd->user_vars, name, 0))) - const_var_flag= thd->query_id != entry->update_query_id; + if ((var_entry= get_variable(&thd->user_vars, name, 0))) + const_var_flag= thd->query_id != var_entry->update_query_id; } @@ -2208,18 +2209,18 @@ bool Item_func_match::fix_index() { List_iterator_fast li(fields); Item_field *item; - uint ft_to_key[MAX_KEY], ft_cnt[MAX_KEY], fts=0, key; + uint ft_to_key[MAX_KEY], ft_cnt[MAX_KEY], fts=0, keynr; uint max_cnt=0, mkeys=0; - if (this->key == NO_SUCH_KEY) + if (key == NO_SUCH_KEY) return 0; - for (key=0 ; keykeys ; key++) + for (keynr=0 ; keynr < table->keys ; keynr++) { - if ((table->key_info[key].flags & HA_FULLTEXT) && - (table->keys_in_use_for_query & (((key_map)1) << key))) + if ((table->key_info[keynr].flags & HA_FULLTEXT) && + (table->keys_in_use_for_query & (((key_map)1) << keynr))) { - ft_to_key[fts]=key; + ft_to_key[fts]=keynr; ft_cnt[fts]=0; fts++; } @@ -2230,45 +2231,45 @@ bool Item_func_match::fix_index() while ((item=(Item_field*)(li++))) { - for (key=0 ; keykey_info[ft_to_key[key]]; + KEY *ft_key=&table->key_info[ft_to_key[keynr]]; uint key_parts=ft_key->key_parts; for (uint part=0 ; part < key_parts ; part++) { if (item->field->eq(ft_key->key_part[part].field)) - ft_cnt[key]++; + ft_cnt[keynr]++; } } } - for (key=0 ; key max_cnt) + if (ft_cnt[keynr] > max_cnt) { mkeys=0; - max_cnt=ft_cnt[mkeys]=ft_cnt[key]; - ft_to_key[mkeys]=ft_to_key[key]; + max_cnt=ft_cnt[mkeys]=ft_cnt[keynr]; + ft_to_key[mkeys]=ft_to_key[keynr]; continue; } - if (max_cnt && ft_cnt[key] == max_cnt) + if (max_cnt && ft_cnt[keynr] == max_cnt) { mkeys++; - ft_cnt[mkeys]=ft_cnt[key]; - ft_to_key[mkeys]=ft_to_key[key]; + ft_cnt[mkeys]=ft_cnt[keynr]; + ft_to_key[mkeys]=ft_to_key[keynr]; continue; } } - for (key=0 ; key<=mkeys ; key++) + for (keynr=0 ; keynr <= mkeys ; keynr++) { // for now, partial keys won't work. SerG if (max_cnt < fields.elements || - max_cnt < table->key_info[ft_to_key[key]].key_parts) + max_cnt < table->key_info[ft_to_key[keynr]].key_parts) continue; - this->key=ft_to_key[key]; + key=ft_to_key[keynr]; return 0; } @@ -2276,7 +2277,7 @@ bool Item_func_match::fix_index() err: if (mode == FT_BOOL) { - this->key=NO_SUCH_KEY; + key=NO_SUCH_KEY; return 0; } my_printf_error(ER_FT_MATCHING_KEY_NOT_FOUND, diff --git a/sql/item_func.h b/sql/item_func.h index 736616b016a..2e02d7cfd28 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -901,7 +901,7 @@ public: class Item_func_get_user_var :public Item_func { LEX_STRING name; - user_var_entry *entry; + user_var_entry *var_entry; bool const_var_flag; public: diff --git a/sql/log.cc b/sql/log.cc index 32c0f4417f1..28acdb71ef8 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1027,7 +1027,7 @@ bool MYSQL_LOG::write(Log_event* event_info) { bool should_rotate = 0; THD *thd=event_info->thd; - const char* db = event_info->get_db(); + const char *local_db = event_info->get_db(); #ifdef USING_TRANSACTIONS IO_CACHE *file = ((event_info->get_cache_stmt()) ? &thd->transaction.trans_log : @@ -1037,7 +1037,7 @@ bool MYSQL_LOG::write(Log_event* event_info) #endif if ((thd && !(thd->options & OPTION_BIN_LOG) && (thd->master_access & SUPER_ACL)) || - (db && !db_ok(db, binlog_do_db, binlog_ignore_db))) + (local_db && !db_ok(local_db, binlog_do_db, binlog_ignore_db))) { VOID(pthread_mutex_unlock(&LOCK_log)); return 0; @@ -1237,7 +1237,7 @@ err: */ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, - time_t query_start) + time_t query_start_arg) { bool error=0; if (is_open()) @@ -1255,7 +1255,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, VOID(pthread_mutex_unlock(&LOCK_log)); return 0; } - if ((specialflag & SPECIAL_LONG_LOG_FORMAT) || query_start) + if ((specialflag & SPECIAL_LONG_LOG_FORMAT) || query_start_arg) { current_time=time(NULL); if (current_time != last_time) @@ -1283,13 +1283,13 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, thd->ip ? thd->ip : "") == (uint) -1) tmp_errno=errno; } - if (query_start) + if (query_start_arg) { /* For slow query log */ if (my_b_printf(&log_file, "# Query_time: %lu Lock_time: %lu Rows_sent: %lu Rows_examined: %lu\n", - (ulong) (current_time - query_start), - (ulong) (thd->time_after_lock - query_start), + (ulong) (current_time - query_start_arg), + (ulong) (thd->time_after_lock - query_start_arg), (ulong) thd->sent_row_count, (ulong) thd->examined_row_count) == (uint) -1) tmp_errno=errno; @@ -1316,11 +1316,11 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length, } if (thd->query_start_used) { - if (query_start != thd->query_start()) + if (query_start_arg != thd->query_start()) { - query_start=thd->query_start(); + query_start_arg=thd->query_start(); end=strmov(end,",timestamp="); - end=int10_to_str((long) query_start,end,10); + end=int10_to_str((long) query_start_arg,end,10); } } if (end != buff) diff --git a/sql/log_event.cc b/sql/log_event.cc index 871f72acbae..9d0c365505a 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -391,9 +391,9 @@ void Log_event::init_show_field_list(List* field_list) /* * only called by SHOW BINLOG EVENTS */ -int Log_event::net_send(THD* thd, const char* log_name, my_off_t pos) +int Log_event::net_send(THD* thd_arg, const char* log_name, my_off_t pos) { - String* packet = &thd->packet; + String* packet = &thd_arg->packet; const char* p = strrchr(log_name, FN_LIBCHAR); const char* event_type; if (p) @@ -407,7 +407,7 @@ int Log_event::net_send(THD* thd, const char* log_name, my_off_t pos) net_store_data(packet, server_id); net_store_data(packet, (longlong) log_pos); pack_info(packet); - return my_net_write(&thd->net, (char*) packet->ptr(), packet->length()); + return my_net_write(&thd_arg->net, (char*) packet->ptr(), packet->length()); } #endif /* MYSQL_CLIENT */ @@ -1090,18 +1090,18 @@ char* sql_ex_info::init(char* buf,char* buf_end,bool use_new_format) #ifndef MYSQL_CLIENT -Load_log_event::Load_log_event(THD* thd, sql_exchange* ex, +Load_log_event::Load_log_event(THD* thd_arg, sql_exchange* ex, const char* db_arg, const char* table_name_arg, List& fields_arg, enum enum_duplicates handle_dup) - :Log_event(thd),thread_id(thd->thread_id), num_fields(0),fields(0), + :Log_event(thd_arg),thread_id(thd_arg->thread_id), num_fields(0),fields(0), field_lens(0),field_block_len(0), table_name(table_name_arg ? table_name_arg : ""), db(db_arg), fname(ex->file_name) { time_t end_time; time(&end_time); - exec_time = (ulong) (end_time - thd->start_time); + exec_time = (ulong) (end_time - thd_arg->start_time); /* db can never be a zero pointer in 4.0 */ db_len = (uint32) strlen(db); table_name_len = (uint32) strlen(table_name); @@ -1170,8 +1170,8 @@ Load_log_event::Load_log_event(THD* thd, sql_exchange* ex, */ Load_log_event::Load_log_event(const char* buf, int event_len, - bool old_format): - Log_event(buf, old_format),num_fields(0),fields(0), + bool old_format) + :Log_event(buf, old_format),num_fields(0),fields(0), field_lens(0),field_block_len(0), table_name(0),db(0),fname(0) { @@ -1318,14 +1318,14 @@ void Log_event::set_log_pos(MYSQL_LOG* log) } -void Load_log_event::set_fields(List &fields) +void Load_log_event::set_fields(List &field_list) { uint i; - const char* field = this->fields; - for (i = 0; i < num_fields; i++) + const char *field= fields; + for (i= 0; i < num_fields; i++) { - fields.push_back(new Item_field(db, table_name, field)); - field += field_lens[i] + 1; + field_list.push_back(new Item_field(db, table_name, field)); + field+= field_lens[i] + 1; } } @@ -1799,8 +1799,8 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli) ex.field_term->length(0); ex.skip_lines = skip_lines; - List fields; - set_fields(fields); + List field_list; + set_fields(field_list); thd->slave_proxy_id = thd->thread_id; if (net) { @@ -1811,7 +1811,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli) */ thd->net.pkt_nr = net->pkt_nr; } - if (mysql_load(thd, &ex, &tables, fields, handle_dup, net != 0, + if (mysql_load(thd, &ex, &tables, field_list, handle_dup, net != 0, TL_WRITE)) thd->query_error = 1; if (thd->cuted_fields) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 05157cbd9b8..a763bdd35ad 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -311,9 +311,8 @@ void mysql_init_multi_delete(LEX *lex); void init_max_user_conn(void); void init_update_queries(void); void free_max_user_conn(void); -pthread_handler_decl(handle_one_connection,arg); -pthread_handler_decl(handle_bootstrap,arg); -sig_handler end_thread_signal(int sig); +extern "C" pthread_handler_decl(handle_one_connection,arg); +extern "C" pthread_handler_decl(handle_bootstrap,arg); void end_thread(THD *thd,bool put_in_cache); void flush_thread_cache(); void mysql_execute_command(void); @@ -559,7 +558,7 @@ int write_record(TABLE *table,COPY_INFO *info); extern ulong volatile manager_status; extern bool volatile manager_thread_in_use, mqh_used; extern pthread_t manager_thread; -pthread_handler_decl(handle_manager, arg); +extern "C" pthread_handler_decl(handle_manager, arg); /* sql_test.cc */ #ifndef DBUG_OFF @@ -736,7 +735,7 @@ timestamp_type str_to_TIME(const char *str, uint length, TIME *l_time, int test_if_number(char *str,int *res,bool allow_wildcards); void change_byte(byte *,uint,char,char); -void unireg_abort(int exit_code); +extern "C" void unireg_abort(int exit_code); void init_read_record(READ_RECORD *info, THD *thd, TABLE *reg_form, SQL_SELECT *select, int use_record_cache, bool print_errors); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9e0dfe17f1b..ef097809cf3 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -444,20 +444,20 @@ pthread_cond_t eventShutdown; #endif static void start_signal_handler(void); -static void *signal_hand(void *arg); +extern "C" static pthread_handler_decl(signal_hand, arg); static void set_options(void); static void get_options(int argc,char **argv); static char *get_relative_path(const char *path); static void fix_paths(void); -static pthread_handler_decl(handle_connections_sockets,arg); -static pthread_handler_decl(kill_server_thread,arg); +extern "C" static pthread_handler_decl(handle_connections_sockets,arg); +extern "C" static pthread_handler_decl(kill_server_thread,arg); static int bootstrap(FILE *file); static void close_server_sock(); static bool read_init_file(char *file_name); #ifdef __NT__ -static pthread_handler_decl(handle_connections_namedpipes,arg); +extern "C" static pthread_handler_decl(handle_connections_namedpipes,arg); #endif -extern pthread_handler_decl(handle_slave,arg); +extern "C" extern pthread_handler_decl(handle_slave,arg); #ifdef SET_RLIMIT_NOFILE static uint set_maximum_open_files(uint max_file_limit); #endif @@ -771,7 +771,7 @@ static void __cdecl kill_server(int sig_ptr) #ifdef USE_ONE_SIGNAL_HAND -static pthread_handler_decl(kill_server_thread,arg __attribute__((unused))) +extern "C" static pthread_handler_decl(kill_server_thread,arg __attribute__((unused))) { SHUTDOWN_THD; my_thread_init(); // Initialize new thread @@ -786,7 +786,7 @@ static pthread_handler_decl(kill_server_thread,arg __attribute__((unused))) #define sigset signal #endif -static sig_handler print_signal_warning(int sig) +extern "C" static sig_handler print_signal_warning(int sig) { if (!DBUG_IN_USE) { @@ -812,7 +812,7 @@ void unireg_end(int signal_number __attribute__((unused))) } -void unireg_abort(int exit_code) +extern "C" void unireg_abort(int exit_code) { DBUG_ENTER("unireg_abort"); if (exit_code) @@ -1162,7 +1162,7 @@ void close_connection(NET *net,uint errcode,bool lock) /* Called when a thread is aborted */ /* ARGSUSED */ -sig_handler end_thread_signal(int sig __attribute__((unused))) +extern "C" static sig_handler end_thread_signal(int sig __attribute__((unused))) { THD *thd=current_thd; DBUG_ENTER("end_thread_signal"); @@ -1253,7 +1253,7 @@ void flush_thread_cache() */ #ifdef THREAD_SPECIFIC_SIGPIPE -static sig_handler abort_thread(int sig __attribute__((unused))) +extern "C" static sig_handler abort_thread(int sig __attribute__((unused))) { THD *thd=current_thd; DBUG_ENTER("abort_thread"); @@ -1327,7 +1327,7 @@ static void start_signal_handler(void) #define UNSAFE_DEFAULT_LINUX_THREADS 200 #endif -static sig_handler handle_segfault(int sig) +extern "C" static sig_handler handle_segfault(int sig) { THD *thd=current_thd; /* @@ -1512,7 +1512,7 @@ static void start_signal_handler(void) /* This threads handles all signals and alarms */ /* ARGSUSED */ -static void *signal_hand(void *arg __attribute__((unused))) +extern "C" static void *signal_hand(void *arg __attribute__((unused))) { sigset_t set; int sig; @@ -1640,7 +1640,7 @@ static void *signal_hand(void *arg __attribute__((unused))) /* ARGSUSED */ -static int my_message_sql(uint error, const char *str, +extern "C" static int my_message_sql(uint error, const char *str, myf MyFlags __attribute__((unused))) { NET *net; @@ -1674,7 +1674,7 @@ int uname(struct utsname *a) #ifdef __WIN__ -pthread_handler_decl(handle_shutdown,arg) +extern "C" pthread_handler_decl(handle_shutdown,arg) { MSG msg; SHUTDOWN_THD; @@ -1702,7 +1702,7 @@ int __stdcall handle_kill(ulong ctrl_type) #endif #ifdef OS2 -pthread_handler_decl(handle_shutdown,arg) +extern "C" pthread_handler_decl(handle_shutdown,arg) { SHUTDOWN_THD; my_thread_init(); @@ -2500,7 +2500,7 @@ inline void kill_broken_server() /* Handle new connections and spawn new process to handle them */ -pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused))) +extern "C" pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused))) { my_socket sock,new_sock; uint error_count=0; @@ -2707,7 +2707,7 @@ pthread_handler_decl(handle_connections_sockets,arg __attribute__((unused))) #ifdef __NT__ -pthread_handler_decl(handle_connections_namedpipes,arg) +extern "C" pthread_handler_decl(handle_connections_namedpipes,arg) { HANDLE hConnectedPipe; BOOL fConnected; @@ -3218,7 +3218,7 @@ struct my_option my_long_options[] = (gptr*) &report_port, (gptr*) &report_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0}, {"rpl-recovery-rank", OPT_RPL_RECOVERY_RANK, "Undocumented", - (gptr*) &rpl_recovery_rank, (gptr*) &rpl_recovery_rank, 0, GET_UINT, + (gptr*) &rpl_recovery_rank, (gptr*) &rpl_recovery_rank, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"relay-log", OPT_RELAY_LOG, "Undocumented", (gptr*) &opt_relay_logname, (gptr*) &opt_relay_logname, 0, @@ -3910,7 +3910,7 @@ static void set_options(void) } -static my_bool +extern "C" static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) { diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 181d97ceacc..38fc8928eaf 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -2461,9 +2461,9 @@ int QUICK_SELECT::get_next() DBUG_RETURN(HA_ERR_END_OF_FILE); // All ranges used if (range->flag & NO_MIN_RANGE) // Read first record { - int error; - if ((error=file->index_first(record))) - DBUG_RETURN(error); // Empty table + int local_error; + if ((local_error=file->index_first(record))) + DBUG_RETURN(local_error); // Empty table if (cmp_next(range) == 0) DBUG_RETURN(0); range=0; // No matching records; go to next range @@ -2496,13 +2496,13 @@ int QUICK_SELECT::get_next() /* compare if found key is over max-value */ /* Returns 0 if key <= range->max_key */ -int QUICK_SELECT::cmp_next(QUICK_RANGE *range) +int QUICK_SELECT::cmp_next(QUICK_RANGE *range_arg) { - if (range->flag & NO_MAX_RANGE) + if (range_arg->flag & NO_MAX_RANGE) return (0); /* key can't be to large */ KEY_PART *key_part=key_parts; - for (char *key=range->max_key, *end=key+range->max_length; + for (char *key=range_arg->max_key, *end=key+range_arg->max_length; key < end; key+= key_part++->part_length) { @@ -2523,7 +2523,7 @@ int QUICK_SELECT::cmp_next(QUICK_RANGE *range) if (cmp > 0) return 1; } - return (range->flag & NEAR_MAX) ? 1 : 0; // Exact match + return (range_arg->flag & NEAR_MAX) ? 1 : 0; // Exact match } @@ -2607,9 +2607,9 @@ int QUICK_SELECT_DESC::get_next() if (range->flag & NO_MAX_RANGE) // Read last record { - int error; - if ((error=file->index_last(record))) - DBUG_RETURN(error); // Empty table + int local_error; + if ((local_error=file->index_last(record))) + DBUG_RETURN(local_error); // Empty table if (cmp_prev(range) == 0) DBUG_RETURN(0); range=0; // No matching records; go to next range @@ -2655,16 +2655,18 @@ int QUICK_SELECT_DESC::get_next() } } + /* - * Returns 0 if found key is inside range (found key >= range->min_key). - */ -int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range) + Returns 0 if found key is inside range (found key >= range->min_key). +*/ + +int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range_arg) { - if (range->flag & NO_MIN_RANGE) + if (range_arg->flag & NO_MIN_RANGE) return (0); /* key can't be to small */ KEY_PART *key_part = key_parts; - for (char *key = range->min_key, *end = key + range->min_length; + for (char *key = range_arg->min_key, *end = key + range_arg->min_length; key < end; key += key_part++->part_length) { @@ -2688,42 +2690,45 @@ int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range) if (cmp < 0) return 1; } - return (range->flag & NEAR_MIN) ? 1 : 0; // Exact match + return (range_arg->flag & NEAR_MIN) ? 1 : 0; // Exact match } + /* * True if this range will require using HA_READ_AFTER_KEY See comment in get_next() about this */ -bool QUICK_SELECT_DESC::range_reads_after_key(QUICK_RANGE *range) +bool QUICK_SELECT_DESC::range_reads_after_key(QUICK_RANGE *range_arg) { - return ((range->flag & (NO_MAX_RANGE | NEAR_MAX)) || - !(range->flag & EQ_RANGE) || - head->key_info[index].key_length != range->max_length) ? 1 : 0; + return ((range_arg->flag & (NO_MAX_RANGE | NEAR_MAX)) || + !(range_arg->flag & EQ_RANGE) || + head->key_info[index].key_length != range_arg->max_length) ? 1 : 0; } + /* True if we are reading over a key that may have a NULL value */ -bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range, +bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range_arg, uint used_key_parts) { uint offset,end; KEY_PART *key_part = key_parts, *key_part_end= key_part+used_key_parts; - for (offset= 0, end = min(range->min_length, range->max_length) ; + for (offset= 0, end = min(range_arg->min_length, range_arg->max_length) ; offset < end && key_part != key_part_end ; offset += key_part++->part_length) { uint null_length=test(key_part->null_bit); - if (!memcmp((char*) range->min_key+offset, (char*) range->max_key+offset, + if (!memcmp((char*) range_arg->min_key+offset, + (char*) range_arg->max_key+offset, key_part->part_length + null_length)) { offset+=null_length; continue; } - if (null_length && range->min_key[offset]) + if (null_length && range_arg->min_key[offset]) return 1; // min_key is null and max_key isn't // Range doesn't cover NULL. This is ok if there is no more null parts break; @@ -2736,7 +2741,7 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range, */ if (key_part != key_part_end && key_part->null_bit) { - if (offset >= range->min_length || range->min_key[offset]) + if (offset >= range_arg->min_length || range_arg->min_key[offset]) return 1; // Could be null key_part++; } diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 81627dceb0e..78b22a61b66 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -188,14 +188,15 @@ err2: return 1; } -static uint32* slave_list_key(SLAVE_INFO* si, uint* len, - my_bool not_used __attribute__((unused))) +extern "C" static uint32 +*slave_list_key(SLAVE_INFO* si, uint* len, + my_bool not_used __attribute__((unused))) { *len = 4; return &si->server_id; } -static void slave_info_free(void *s) +extern "C" static void slave_info_free(void *s) { my_free((gptr) s, MYF(MY_WME)); } @@ -203,7 +204,7 @@ static void slave_info_free(void *s) void init_slave_list() { hash_init(&slave_list, SLAVE_LIST_CHUNK, 0, 0, - (hash_get_key) slave_list_key, slave_info_free, 0); + (hash_get_key) slave_list_key, (hash_free_key) slave_info_free, 0); pthread_mutex_init(&LOCK_slave_list, MY_MUTEX_INIT_FAST); } diff --git a/sql/slave.cc b/sql/slave.cc index 620523dd47f..bccfe89f8c9 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -556,7 +556,7 @@ void init_table_rule_hash(HASH* h, bool* h_inited) { hash_init(h, TABLE_RULE_HASH_SIZE,0,0, (hash_get_key) get_table_key, - (void (*)(void*)) free_table_ent, 0); + (hash_free_key) free_table_ent, 0); *h_inited = 1; } @@ -1809,7 +1809,7 @@ This may also be a network problem, or just a bug in the master or slave code.\ /* slave I/O thread */ -pthread_handler_decl(handle_slave_io,arg) +extern "C" pthread_handler_decl(handle_slave_io,arg) { THD *thd; // needs to be first for thread_stack MYSQL *mysql; @@ -2080,7 +2080,7 @@ err: /* slave SQL logic thread */ -pthread_handler_decl(handle_slave_sql,arg) +extern "C" pthread_handler_decl(handle_slave_sql,arg) { THD *thd; /* needs to be first for thread_stack */ char llbuff[22],llbuff1[22]; diff --git a/sql/slave.h b/sql/slave.h index cbcd2957476..721fd8534a0 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -414,8 +414,8 @@ int init_relay_log_pos(RELAY_LOG_INFO* rli,const char* log,ulonglong pos, int purge_relay_logs(RELAY_LOG_INFO* rli, THD *thd, bool just_reset, const char** errmsg); -pthread_handler_decl(handle_slave_io,arg); -pthread_handler_decl(handle_slave_sql,arg); +extern "C" pthread_handler_decl(handle_slave_io,arg); +extern "C" pthread_handler_decl(handle_slave_sql,arg); extern bool volatile abort_loop; extern MASTER_INFO main_mi, *active_mi; /* active_mi for multi-master */ extern volatile int active_mi_in_use; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 1694e662b52..4a9fcefbda5 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -141,7 +141,7 @@ my_bool acl_init(THD *org_thd, bool dont_read_acl_tables) if (!acl_cache) acl_cache=new hash_filo(ACL_CACHE_SIZE,0,0, (hash_get_key) acl_entry_get_key, - (void (*)(void*)) free); + (hash_free_key) free); if (dont_read_acl_tables) DBUG_RETURN(0); /* purecov: tested */ diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 3b46c53f75c..a318f846a02 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -39,8 +39,8 @@ static key_map get_key_map_from_key_list(TABLE *table, List *index_list); -static byte *cache_key(const byte *record,uint *length, - my_bool not_used __attribute__((unused))) +extern "C" static byte *cache_key(const byte *record,uint *length, + my_bool not_used __attribute__((unused))) { TABLE *entry=(TABLE*) record; *length=entry->key_length; @@ -50,7 +50,7 @@ static byte *cache_key(const byte *record,uint *length, void table_cache_init(void) { VOID(hash_init(&open_cache,table_cache_size+16,0,0,cache_key, - (void (*)(void*)) free_cache_entry,0)); + (hash_free_key) free_cache_entry,0)); mysql_rm_tmp_tables(); } diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 0b9caf4e6c3..db601cd8a00 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -458,33 +458,6 @@ byte *query_cache_table_get_key(const byte *record, uint *length, Query_cache_query methods *****************************************************************************/ -void Query_cache_query::init_n_lock() -{ - DBUG_ENTER("Query_cache_query::init_n_lock"); - res=0; wri = 0; len = 0; - my_rwlock_init(&lock, NULL); - lock_writing(); - DBUG_PRINT("qcache", ("inited & locked query for block 0x%lx", - ((byte*) this)-ALIGN_SIZE(sizeof(Query_cache_block)))); - DBUG_VOID_RETURN; -} - - -void Query_cache_query::unlock_n_destroy() -{ - DBUG_ENTER("Query_cache_query::unlock_n_destroy"); - DBUG_PRINT("qcache", ("destroyed & unlocked query for block 0x%lx", - ((byte*)this)-ALIGN_SIZE(sizeof(Query_cache_block)))); - /* - The following call is not needed on system where one can destroy an - active semaphore - */ - this->unlock_writing(); - rwlock_destroy(&lock); - DBUG_VOID_RETURN; -} - - /* Following methods work for block read/write locking only in this particular case and in interaction with structure_guard_mutex. @@ -536,6 +509,34 @@ inline void Query_cache_query::unlock_reading() RW_UNLOCK(&lock); } + +void Query_cache_query::init_n_lock() +{ + DBUG_ENTER("Query_cache_query::init_n_lock"); + res=0; wri = 0; len = 0; + my_rwlock_init(&lock, NULL); + lock_writing(); + DBUG_PRINT("qcache", ("inited & locked query for block 0x%lx", + ((byte*) this)-ALIGN_SIZE(sizeof(Query_cache_block)))); + DBUG_VOID_RETURN; +} + + +void Query_cache_query::unlock_n_destroy() +{ + DBUG_ENTER("Query_cache_query::unlock_n_destroy"); + DBUG_PRINT("qcache", ("destroyed & unlocked query for block 0x%lx", + ((byte*)this)-ALIGN_SIZE(sizeof(Query_cache_block)))); + /* + The following call is not needed on system where one can destroy an + active semaphore + */ + this->unlock_writing(); + rwlock_destroy(&lock); + DBUG_VOID_RETURN; +} + + extern "C" { byte *query_cache_query_get_key(const byte *record, uint *length, @@ -699,19 +700,19 @@ void query_cache_invalidate_by_MyISAM_filename(const char *filename) Query_cache methods *****************************************************************************/ -Query_cache::Query_cache(ulong query_cache_limit, - ulong min_allocation_unit, - ulong min_result_data_size, - uint def_query_hash_size , - uint def_table_hash_size) +Query_cache::Query_cache(ulong query_cache_limit_arg, + ulong min_allocation_unit_arg, + ulong min_result_data_size_arg, + uint def_query_hash_size_arg, + uint def_table_hash_size_arg) :query_cache_size(0), - query_cache_limit(query_cache_limit), + query_cache_limit(query_cache_limit_arg), queries_in_cache(0), hits(0), inserts(0), refused(0), total_blocks(0), - min_allocation_unit(ALIGN_SIZE(min_allocation_unit)), - min_result_data_size(ALIGN_SIZE(min_result_data_size)), - def_query_hash_size(ALIGN_SIZE(def_query_hash_size)), - def_table_hash_size(ALIGN_SIZE(def_table_hash_size)), + min_allocation_unit(ALIGN_SIZE(min_allocation_unit_arg)), + min_result_data_size(ALIGN_SIZE(min_result_data_size_arg)), + def_query_hash_size(ALIGN_SIZE(def_query_hash_size_arg)), + def_table_hash_size(ALIGN_SIZE(def_table_hash_size_arg)), initialized(0) { ulong min_needed= (ALIGN_SIZE(sizeof(Query_cache_block)) + @@ -736,13 +737,13 @@ ulong Query_cache::resize(ulong query_cache_size_arg) void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) { - TABLE_COUNTER_TYPE tables; + TABLE_COUNTER_TYPE local_tables; ulong tot_length; DBUG_ENTER("Query_cache::store_query"); if (query_cache_size == 0) DBUG_VOID_RETURN; - if ((tables = is_cacheable(thd, thd->query_length, + if ((local_tables = is_cacheable(thd, thd->query_length, thd->query, &thd->lex, tables_used))) { NET *net = &thd->net; @@ -788,7 +789,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) Query_cache_block *query_block; query_block= write_block_data(tot_length, (gptr) thd->query, ALIGN_SIZE(sizeof(Query_cache_query)), - Query_cache_block::QUERY, tables, 1); + Query_cache_block::QUERY, local_tables, 1); if (query_block != 0) { DBUG_PRINT("qcache", ("query block 0x%lx allocated, %lu", @@ -805,7 +806,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) STRUCT_UNLOCK(&structure_guard_mutex); goto end; } - if (!register_all_tables(query_block, tables_used, tables)) + if (!register_all_tables(query_block, tables_used, local_tables)) { refused++; DBUG_PRINT("warning", ("tables list including failed")); @@ -1780,7 +1781,7 @@ inline ulong Query_cache::get_min_append_result_data_size() my_bool Query_cache::allocate_data_chain(Query_cache_block **result_block, ulong data_len, Query_cache_block *query_block, - my_bool first_block) + my_bool first_block_arg) { ulong all_headers_len = (ALIGN_SIZE(sizeof(Query_cache_block)) + ALIGN_SIZE(sizeof(Query_cache_result))); @@ -1790,7 +1791,7 @@ my_bool Query_cache::allocate_data_chain(Query_cache_block **result_block, DBUG_PRINT("qcache", ("data_len %lu, all_headers_len %lu", data_len, all_headers_len)); - ulong min_size = (first_block ? + ulong min_size = (first_block_arg ? get_min_first_result_data_size(): get_min_append_result_data_size()); *result_block = allocate_block(max(min_size, align_len), @@ -1817,7 +1818,7 @@ my_bool Query_cache::allocate_data_chain(Query_cache_block **result_block, Query_cache_block *next_block; if ((success = allocate_data_chain(&next_block, len - new_block->length, - query_block, first_block))) + query_block, first_block_arg))) double_linked_list_join(new_block, next_block); } if (success) @@ -1886,14 +1887,23 @@ void Query_cache::invalidate_table(Query_cache_block *table_block) } } +/* + Store all used tables + + SYNOPSIS + register_all_tables() + block Store tables in this block + tables_used List if used tables + tables_arg Not used ? +*/ my_bool Query_cache::register_all_tables(Query_cache_block *block, TABLE_LIST *tables_used, - TABLE_COUNTER_TYPE tables) + TABLE_COUNTER_TYPE tables_arg) { TABLE_COUNTER_TYPE n; DBUG_PRINT("qcache", ("register tables block 0x%lx, n %d, header %x", - (ulong) block, (int) tables, + (ulong) block, (int) tables_arg, (int) ALIGN_SIZE(sizeof(Query_cache_block)))); Query_cache_block_table *block_table = block->table(0); @@ -2185,28 +2195,28 @@ void Query_cache::split_block(Query_cache_block *block, ulong len) Query_cache_block * -Query_cache::join_free_blocks(Query_cache_block *first_block, +Query_cache::join_free_blocks(Query_cache_block *first_block_arg, Query_cache_block *block_in_list) { Query_cache_block *second_block; DBUG_ENTER("Query_cache::join_free_blocks"); DBUG_PRINT("qcache", ("join first 0x%lx, pnext 0x%lx, in list 0x%lx", - (ulong) first_block, (ulong) first_block->pnext, + (ulong) first_block_arg, (ulong) first_block_arg->pnext, (ulong) block_in_list)); exclude_from_free_memory_list(block_in_list); - second_block = first_block->pnext; + second_block = first_block_arg->pnext; // May be was not free block second_block->used=0; second_block->destroy(); total_blocks--; - first_block->length += second_block->length; - first_block->pnext = second_block->pnext; - second_block->pnext->pprev = first_block; + first_block_arg->length += second_block->length; + first_block_arg->pnext = second_block->pnext; + second_block->pnext->pprev = first_block_arg; - DBUG_RETURN(first_block); + DBUG_RETURN(first_block_arg); } @@ -2423,7 +2433,7 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len, char *query, LEX *lex, TABLE_LIST *tables_used) { - TABLE_COUNTER_TYPE tables = 0; + TABLE_COUNTER_TYPE table_count = 0; DBUG_ENTER("Query_cache::is_cacheable"); if (lex->sql_command == SQLCOM_SELECT && @@ -2440,7 +2450,7 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len, for (; tables_used; tables_used= tables_used->next) { - tables++; + table_count++; DBUG_PRINT("qcache", ("table %s, db %s, type %u", tables_used->real_name, tables_used->db, tables_used->table->db_type)); @@ -2464,7 +2474,7 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len, { ha_myisammrg *handler = (ha_myisammrg *)tables_used->table->file; MYRG_INFO *file = handler->myrg_info(); - tables+= (file->end_table - file->open_tables); + table_count+= (file->end_table - file->open_tables); } } @@ -2474,8 +2484,8 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len, DBUG_PRINT("qcache", ("not in autocommin mode")); DBUG_RETURN(0); } - DBUG_PRINT("qcache", ("select is using %d tables", tables)); - DBUG_RETURN(tables); + DBUG_PRINT("qcache", ("select is using %d tables", table_count)); + DBUG_RETURN(table_count); } DBUG_PRINT("qcache", diff --git a/sql/sql_cache.h b/sql/sql_cache.h index f19e6630da5..0c73c46652e 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -178,7 +178,7 @@ extern "C" my_bool not_used); } void query_cache_insert(NET *thd, const char *packet, ulong length); -void query_cache_invalidate_by_MyISAM_filename(const char* filename); +extern "C" void query_cache_invalidate_by_MyISAM_filename(const char* filename); struct Query_cache_memory_bin diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 11b2bb93430..0066bccbd73 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -59,14 +59,14 @@ template class List_iterator; ** User variables ****************************************************************************/ -static byte* get_var_key(user_var_entry *entry, uint *length, - my_bool not_used __attribute__((unused))) +extern "C" static byte *get_var_key(user_var_entry *entry, uint *length, + my_bool not_used __attribute__((unused))) { *length=(uint) entry->name.length; return (byte*) entry->name.str; } -static void free_var(user_var_entry *entry) +extern "C" static void free_var(user_var_entry *entry) { char *pos= (char*) entry+ALIGN_SIZE(sizeof(*entry)); if (entry->value && entry->value != pos) @@ -148,7 +148,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), user_connect=(USER_CONN *)0; hash_init(&user_vars, USER_VARS_HASH_SIZE, 0, 0, (hash_get_key) get_var_key, - (void (*)(void*)) free_var,0); + (hash_free_key) free_var,0); #ifdef USING_TRANSACTIONS bzero((char*) &transaction,sizeof(transaction)); if (opt_using_transactions) @@ -320,20 +320,21 @@ void THD::add_changed_table(TABLE *table) DBUG_VOID_RETURN; } + void THD::add_changed_table(const char *key, long key_length) { DBUG_ENTER("THD::add_changed_table(key)"); - CHANGED_TABLE_LIST** prev = &transaction.changed_tables; - CHANGED_TABLE_LIST* curr = transaction.changed_tables; + CHANGED_TABLE_LIST **prev_changed = &transaction.changed_tables; + CHANGED_TABLE_LIST *curr = transaction.changed_tables; - for (; curr; prev = &(curr->next), curr = curr->next) + for (; curr; prev_changed = &(curr->next), curr = curr->next) { int cmp = (long)curr->key_length - (long)key_length; if (cmp < 0) { - list_include(prev, curr, changed_table_dup(key, key_length)); + list_include(prev_changed, curr, changed_table_dup(key, key_length)); DBUG_PRINT("info", - ("key_length %u %u", key_length, (*prev)->key_length)); + ("key_length %u %u", key_length, (*prev_changed)->key_length)); DBUG_VOID_RETURN; } else if (cmp == 0) @@ -341,10 +342,10 @@ void THD::add_changed_table(const char *key, long key_length) cmp = memcmp(curr->key, key, curr->key_length); if (cmp < 0) { - list_include(prev, curr, changed_table_dup(key, key_length)); + list_include(prev_changed, curr, changed_table_dup(key, key_length)); DBUG_PRINT("info", ("key_length %u %u", key_length, - (*prev)->key_length)); + (*prev_changed)->key_length)); DBUG_VOID_RETURN; } else if (cmp == 0) @@ -354,9 +355,9 @@ void THD::add_changed_table(const char *key, long key_length) } } } - *prev = changed_table_dup(key, key_length); + *prev_changed = changed_table_dup(key, key_length); DBUG_PRINT("info", ("key_length %u %u", key_length, - (*prev)->key_length)); + (*prev_changed)->key_length)); DBUG_VOID_RETURN; } diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index b40e0b7b093..b69d4cf1e44 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -204,7 +204,7 @@ cleanup: #define MEM_STRIP_BUF_SIZE current_thd->variables.sortbuff_size -int refposcmp2(void* arg, const void *a,const void *b) +extern "C" static int refposcmp2(void* arg, const void *a,const void *b) { return memcmp(a,b, *(int*) arg); } @@ -392,7 +392,7 @@ void multi_delete::send_error(uint errcode,const char *err) int multi_delete::do_deletes(bool from_send_error) { - int error = 0, counter = 0; + int local_error= 0, counter= 0; if (from_send_error) { @@ -413,27 +413,27 @@ int multi_delete::do_deletes(bool from_send_error) TABLE *table = table_being_deleted->table; if (tempfiles[counter]->get(table)) { - error=1; + local_error=1; break; } READ_RECORD info; init_read_record(&info,thd,table,NULL,0,0); - while (!(error=info.read_record(&info)) && + while (!(local_error=info.read_record(&info)) && (!thd->killed || from_send_error || not_trans_safe)) { - if ((error=table->file->delete_row(table->record[0]))) + if ((local_error=table->file->delete_row(table->record[0]))) { - table->file->print_error(error,MYF(0)); + table->file->print_error(local_error,MYF(0)); break; } deleted++; } end_read_record(&info); - if (error == -1) // End of file - error = 0; + if (local_error == -1) // End of file + local_error = 0; } - return error; + return local_error; } @@ -449,11 +449,11 @@ bool multi_delete::send_eof() thd->proc_info="deleting from reference tables"; /* Does deletes for the last n - 1 tables, returns 0 if ok */ - int error = do_deletes(0); // returns 0 if success + int local_error= do_deletes(0); // returns 0 if success /* reset used flags */ thd->proc_info="end"; - if (error) + if (local_error) { ::send_error(&thd->net); return 1; @@ -473,10 +473,10 @@ bool multi_delete::send_eof() Query_log_event qinfo(thd, thd->query, thd->query_length); if (mysql_bin_log.write(&qinfo) && !not_trans_safe) - error=1; // Log write failed: roll back the SQL statement + local_error=1; // Log write failed: roll back the SQL statement } /* Commit or rollback the current SQL statement */ - VOID(ha_autocommit_or_rollback(thd,error > 0)); + VOID(ha_autocommit_or_rollback(thd,local_error > 0)); } if (deleted) { diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index bd379bf688d..c14672fd4b3 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -25,7 +25,7 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list); static int write_delayed(THD *thd,TABLE *table, enum_duplicates dup, char *query, uint query_length, bool log_on); static void end_delayed_insert(THD *thd); -static pthread_handler_decl(handle_delayed_insert,arg); +extern "C" static pthread_handler_decl(handle_delayed_insert,arg); static void unlink_blobs(register TABLE *table); /* Define to force use of my_malloc() if the allocated memory block is big */ @@ -913,7 +913,7 @@ void kill_delayed_threads(void) * Create a new delayed insert thread */ -static pthread_handler_decl(handle_delayed_insert,arg) +extern "C" static pthread_handler_decl(handle_delayed_insert,arg) { delayed_insert *di=(delayed_insert*) arg; THD *thd= &di->thd; diff --git a/sql/sql_manager.cc b/sql/sql_manager.cc index 13cac83fc3f..0af6a80d4c2 100644 --- a/sql/sql_manager.cc +++ b/sql/sql_manager.cc @@ -32,7 +32,7 @@ pthread_t manager_thread; pthread_mutex_t LOCK_manager; pthread_cond_t COND_manager; -pthread_handler_decl(handle_manager,arg __attribute__((unused))) +extern "C" pthread_handler_decl(handle_manager,arg __attribute__((unused))) { int error = 0; ulong status; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7416506fd02..23274c90367 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -259,14 +259,14 @@ static bool check_user(THD *thd,enum_server_command command, const char *user, started with corresponding variable that is greater then 0. */ -static byte* get_key_conn(user_conn *buff, uint *length, - my_bool not_used __attribute__((unused))) +extern "C" static byte *get_key_conn(user_conn *buff, uint *length, + my_bool not_used __attribute__((unused))) { *length=buff->len; return (byte*) buff->user; } -static void free_user(struct user_conn *uc) +extern "C" static void free_user(struct user_conn *uc) { my_free((char*) uc,MYF(0)); } @@ -274,7 +274,7 @@ static void free_user(struct user_conn *uc) void init_max_user_conn(void) { (void) hash_init(&hash_user_connections,max_connections,0,0, - (hash_get_key) get_key_conn, (void (*)(void*)) free_user, + (hash_get_key) get_key_conn, (hash_free_key) free_user, 0); } @@ -713,7 +713,7 @@ end_thread: Used when creating the initial grant tables */ -pthread_handler_decl(handle_bootstrap,arg) +extern "C" pthread_handler_decl(handle_bootstrap,arg) { THD *thd=(THD*) arg; FILE *file=bootstrap_file; diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index daf02b1c6d6..fe1fa3332cf 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -98,7 +98,7 @@ static void init_syms(udf_func *tmp) } } -static byte* get_hash_key(const byte *buff,uint *length, +extern "C" static byte* get_hash_key(const byte *buff,uint *length, my_bool not_used __attribute__((unused))) { udf_func *udf=(udf_func*) buff; diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 92decc63b6b..838554fde6d 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -688,7 +688,7 @@ void multi_update::send_error(uint errcode,const char *err) int multi_update::do_updates (bool from_send_error) { - int error = 0, counter = 0; + int local_error= 0, counter= 0; if (from_send_error) { @@ -713,7 +713,7 @@ int multi_update::do_updates (bool from_send_error) TABLE *tmp_table=tmp_tables[counter]; if (tmp_table->file->extra(HA_EXTRA_NO_CACHE)) { - error=1; + local_error=1; break; } List list; @@ -729,35 +729,36 @@ int multi_update::do_updates (bool from_send_error) tmp_table->used_keys&=field->part_of_key; } tmp_table->used_fields=tmp_table->fields; - error=0; list.pop(); // we get position some other way ... - error = tmp_table->file->rnd_init(1); - if (error) - return error; - while (!(error=tmp_table->file->rnd_next(tmp_table->record[0])) && + local_error=0; + list.pop(); // we get position some other way ... + local_error = tmp_table->file->rnd_init(1); + if (local_error) + return local_error; + while (!(local_error=tmp_table->file->rnd_next(tmp_table->record[0])) && (!thd->killed || from_send_error || not_trans_safe)) { found++; - error= table->file->rnd_pos(table->record[0], - (byte*) (*(tmp_table->field))->ptr); - if (error) - return error; + local_error= table->file->rnd_pos(table->record[0], + (byte*) (*(tmp_table->field))->ptr); + if (local_error) + return local_error; table->status|= STATUS_UPDATED; store_record(table,1); - error= fill_record(*fields_by_tables[counter + 1],list) || - /* compare_record(table, query_id) || */ - table->file->update_row(table->record[1],table->record[0]); - if (error) + local_error= (fill_record(*fields_by_tables[counter + 1],list) || + /* compare_record(table, query_id) || */ + table->file->update_row(table->record[1],table->record[0])); + if (local_error) { - table->file->print_error(error,MYF(0)); + table->file->print_error(local_error,MYF(0)); break; } else updated++; } - if (error == HA_ERR_END_OF_FILE) - error = 0; + if (local_error == HA_ERR_END_OF_FILE) + local_error = 0; } - return error; + return local_error; } @@ -768,17 +769,17 @@ bool multi_update::send_eof() thd->proc_info="updating the reference tables"; /* Does updates for the last n - 1 tables, returns 0 if ok */ - int error = (num_updated) ? do_updates(false) : 0; /* do_updates returns 0 if success */ + int local_error = (num_updated) ? do_updates(false) : 0; /* reset used flags */ #ifndef NOT_USED update_tables->table->no_keyread=0; #endif - if (error == -1) - error = 0; - thd->proc_info="end"; - if (error) - send_error(error,"An error occured in multi-table update"); + if (local_error == -1) + local_error= 0; + thd->proc_info= "end"; + if (local_error) + send_error(local_error, "An error occured in multi-table update"); /* Write the SQL statement to the binlog if we updated @@ -799,14 +800,14 @@ bool multi_update::send_eof() if (mysql_bin_log.is_open() && mysql_bin_log.write(&qinfo) && !not_trans_safe) - error=1; /* Log write failed: roll back the SQL statement */ + local_error=1; /* Log write failed: roll back the SQL statement */ /* Commit or rollback the current SQL statement */ - VOID(ha_autocommit_or_rollback(thd,error > 0)); + VOID(ha_autocommit_or_rollback(thd, local_error > 0)); } else - error=0; // this can happen only if it is end of file error - if (!error) // if the above log write did not fail ... + local_error= 0; // this can happen only if it is end of file error + if (!local_error) // if the above log write did not fail ... { char buff[80]; sprintf(buff,ER(ER_UPDATE_INFO), (long) found, (long) updated, diff --git a/strings/Makefile.am b/strings/Makefile.am index 9f55a4a8ff8..c5f3d4e4b2a 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -24,11 +24,11 @@ if ASSEMBLER_x86 ASRCS = strings-x86.s longlong2str-x86.s CSRCS = bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c strnlen.c else -if ASSEMBLER_sparc +if ASSEMBLER_sparc32 # These file MUST all be on the same line!! Otherwise automake # generats a very broken makefile -ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s strxmov-sparc.s -CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c strnlen.c +ASRCS = bmove_upp-sparc.s strappend-sparc.s strend-sparc.s strinstr-sparc.s strmake-sparc.s strmov-sparc.s strnmov-sparc.s strstr-sparc.s +CSRCS = strcont.c strfill.c strcend.c is_prefix.c longlong2str.c bfill.c bmove.c bmove512.c bchange.c strxnmov.c int2str.c str2int.c r_strinstr.c atof.c bcmp.c strtol.c strtoul.c strtoll.c strtoull.c llstr.c ctype.c strnlen.c strxmov.c else #no assembler ASRCS = @@ -75,8 +75,11 @@ clean-local: if ASSEMBLER # On Linux gcc can compile the assembly files %.o : %.s - $(AS) -o $@ $< + $(AS) $(ASFLAGS) -o $@ $< endif +str_test: str_test.c $(LIBRARIES) + $(LINK) $(FLAGS) -DMAIN $(srcdir)/str_test.c $(LDADD) $(LIBS) + # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/strings/bmove_upp-sparc.s b/strings/bmove_upp-sparc.s index 4fae7f5cc7c..f38c391f8ab 100644 --- a/strings/bmove_upp-sparc.s +++ b/strings/bmove_upp-sparc.s @@ -27,11 +27,11 @@ bmove_upp: nop .loop: sub %o1, 1, %o1 - ldub [%o1], %g2 + ldub [%o1], %o3 sub %o0, 1, %o0 subcc %o2, 1, %o2 bcc .loop - stb %g2, [%o0] + stb %o3, [%o0] .end: retl nop diff --git a/strings/str_test.c b/strings/str_test.c index bef48814f6d..0c3ff471ad7 100644 --- a/strings/str_test.c +++ b/strings/str_test.c @@ -130,9 +130,6 @@ int main(void) if (errors) fputs("--- Some functions doesn't work!! Fix them\n",stderr); return(errors > 0); - - fputs("Fatal error\n",stderr); - return(2); } /* main */ diff --git a/strings/strappend-sparc.s b/strings/strappend-sparc.s index 69bb555aa47..30b621c3fce 100644 --- a/strings/strappend-sparc.s +++ b/strings/strappend-sparc.s @@ -22,28 +22,28 @@ .type strappend,#function .proc 020 strappend: - add %o0, %o1, %g3 ! g3 = endpos - ldsb [%o0], %g2 + add %o0, %o1, %o3 ! o3 = endpos + ldsb [%o0], %o4 .loop1: add %o0, 1, %o0 ! find end of str - cmp %g2, 0 + cmp %o4, 0 bne,a .loop1 - ldsb [%o0], %g2 + ldsb [%o0], %o4 sub %o0, 1, %o0 - cmp %o0, %g3 + cmp %o0, %o3 bgeu .end nop stb %o2, [%o0] .loop2: add %o0, 1, %o0 - cmp %o0, %g3 + cmp %o0, %o3 blu,a .loop2 stb %o2, [%o0] .end: retl - stb %g0, [%g3] + stb %g0, [%o3] .strappend_end: .size strappend,.strappend_end-strappend .ident "Matt Wagner & Monty" diff --git a/strings/strend-sparc.s b/strings/strend-sparc.s index fd1dba4d36f..0f19f6a435a 100644 --- a/strings/strend-sparc.s +++ b/strings/strend-sparc.s @@ -22,12 +22,12 @@ .type strend,#function .proc 0102 strend: - ldsb [%o0], %g2 ! Handle first char differently to make + ldsb [%o0], %o3 ! Handle first char differently to make .loop: ! a faster loop add %o0, 1, %o0 - cmp %g2, 0 + cmp %o3, 0 bne,a .loop - ldsb [%o0], %g2 + ldsb [%o0], %o3 retl sub %o0,1,%o0 .strend_end: diff --git a/strings/strmake-sparc.s b/strings/strmake-sparc.s index 9fe72a9f9a2..4effe95774e 100644 --- a/strings/strmake-sparc.s +++ b/strings/strmake-sparc.s @@ -25,16 +25,16 @@ strmake: orcc %g0,%o2,%g0 be,a .end nop - ldsb [%o1],%g2 + ldsb [%o1],%o3 .loop: - stb %g2,[%o0] - cmp %g2,0 + stb %o3,[%o0] + cmp %o3,0 be .end ! Jump to end on end of string add %o1,1,%o1 add %o0,1,%o0 subcc %o2,1,%o2 bne,a .loop - ldsb [%o1],%g2 + ldsb [%o1],%o3 .end: retl stb %g0,[%o0] diff --git a/strings/strmov-sparc.s b/strings/strmov-sparc.s index 6114b0bf6e2..3536685b47b 100644 --- a/strings/strmov-sparc.s +++ b/strings/strmov-sparc.s @@ -23,10 +23,10 @@ .proc 0102 strmov: .loop: - ldub [%o1], %g2 - stb %g2, [%o0] + ldub [%o1], %o3 + stb %o3, [%o0] add %o1, 1, %o1 - cmp %g2, 0 + cmp %o3, 0 bne,a .loop add %o0, 1, %o0 retl diff --git a/strings/strnmov-sparc.s b/strings/strnmov-sparc.s index 2dfcb95ab76..f681318f410 100644 --- a/strings/strnmov-sparc.s +++ b/strings/strnmov-sparc.s @@ -25,16 +25,16 @@ strnmov: orcc %g0,%o2,%g0 be,a .end nop - ldsb [%o1],%g2 + ldsb [%o1],%o3 .loop: - stb %g2,[%o0] - cmp %g2,0 + stb %o3,[%o0] + cmp %o3,0 be .end ! Jump to end on end of string add %o1,1,%o1 add %o0,1,%o0 subcc %o2,1,%o2 bne,a .loop - ldsb [%o1],%g2 + ldsb [%o1],%o3 .end: retl nop diff --git a/strings/strstr-sparc.s b/strings/strstr-sparc.s index 1263236f107..eb658e9f7f0 100644 --- a/strings/strstr-sparc.s +++ b/strings/strstr-sparc.s @@ -33,10 +33,10 @@ strstr: ldsb [%o1],%o2 ! o2= First char of search .top: - ldsb [%o0],%g3 ! g3= First char of rest of str - cmp %g3,0 + ldsb [%o0],%o4 ! o4= First char of rest of str + cmp %o4,0 be .abort ! Found end null ; - cmp %g3,%o2 + cmp %o4,%o2 bne .top add %o0,1,%o0 @@ -45,20 +45,20 @@ strstr: ! while (*j) ! if (*i++ != *j++) goto skipp; - or %g0,%o0,%g2 - add %o1,1,%g3 ! g3= search+1 + or %g0,%o0,%o3 + add %o1,1,%o4 ! o4= search+1 ldsb [%o0],%o5 ! o5= [current_str+1] .loop2: - ldsb [%g3],%g4 - add %g3,1,%g3 + ldsb [%o4],%g4 + add %o4,1,%o4 cmp %g4,0 be .end cmp %o5,%g4 bne .top - add %g2,1,%g2 + add %o3,1,%o3 ba .loop2 - ldsb [%g2],%o5 + ldsb [%o3],%o5 .end: retl diff --git a/strings/strxmov-sparc.s b/strings/strxmov-sparc.s index e65b56d317d..b4ca531d2e4 100644 --- a/strings/strxmov-sparc.s +++ b/strings/strxmov-sparc.s @@ -15,12 +15,17 @@ ! Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ! MA 02111-1307, USA +! +! Note that this function only works on 32 bit sparc systems +! on 64 bits the offsets to %sp are different ! + .file "strxmov-sparc.s" .section ".text" .align 4 .global strxmov .type strxmov,#function .proc 0102 + strxmov: st %o2, [%sp+76] ! store 3rd param before other params st %o3, [%sp+80] ! store 4th param " " @@ -28,18 +33,18 @@ strxmov: st %o4, [%sp+84] ! store 5th param be .end st %o5, [%sp+88] ! store last - add %sp, 76, %g2 ! put pointer to 3rd arg + add %sp, 76, %o4 ! put pointer to 3rd arg .loop: - ldub [%o1], %g1 ! set values of src (o1) + ldub [%o1], %o5 ! set values of src (o1) add %o1, 1, %o1 ! inc src - stb %g1, [%o0] ! and dst (o2) equal - cmp %g1, 0 ! second while cmp + stb %o5, [%o0] ! and dst (o2) equal + cmp %o5, 0 ! second while cmp bne,a .loop add %o0, 1, %o0 ! inc dst - ld [%g2], %o1 ! get next param + ld [%o4], %o1 ! get next param cmp %o1, 0 ! check if last param bne .loop - add %g2, 4, %g2 ! advance to next param + add %o4, 4, %o4 ! advance to next param .end: retl stb %g0, [%o0] From 72413e7f81cb87327d8bb2094a43d66578cd1632 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 04:02:37 +0200 Subject: [PATCH 051/246] Put temporary files in binlog cache when using BEGIN/COMMIT Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions New variables @@rand_seed1 and @@rand_seed2 (used by replication) DROP TEMPORARY TABLE mysql-test/r/rpl_log.result: Update of results after last replication change mysql-test/r/variables.result: Test of new variables @@rand_seed1 and @@rand_seed2 mysql-test/t/variables.test: Test of new variables @@rand_seed1 and @@rand_seed2 sql/field.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/field.h: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/item_func.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/log.cc: Put temporary files in binlog cache when using BEGIN/COMMIT More debug information sql/log_event.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/log_event.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/set_var.cc: Add system variables @@rand_seed1 and @@rand_seed2 sql/set_var.h: Add system variables @@rand_seed1 and @@rand_seed2 sql/slave.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_acl.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_base.cc: Store DROP of temporary tables in binlog cache sql/sql_class.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_db.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_delete.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_insert.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_lex.h: DROP TEMPORARY TABLE sql/sql_load.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_parse.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_rename.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_repl.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_repl.h: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_table.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_update.cc: Put temporary files in binlog cache when using BEGIN/COMMIT sql/sql_yacc.yy: DROP TEMPORARY sql/table.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions sql/unireg.cc: Let MySQL 4.0 read 4.1 .frm files without 4.1 specific extensions --- mysql-test/r/rpl_log.result | 2 +- mysql-test/r/variables.result | 4 ++ mysql-test/t/variables.test | 4 ++ sql/field.cc | 11 +++- sql/field.h | 6 +- sql/item_func.cc | 2 +- sql/log.cc | 18 ++++-- sql/log_event.cc | 100 ++++++++++++++++++---------------- sql/log_event.h | 50 +++++++++-------- sql/set_var.cc | 17 ++++++ sql/set_var.h | 17 ++++++ sql/slave.cc | 4 +- sql/sql_acl.cc | 2 +- sql/sql_base.cc | 28 ++++------ sql/sql_class.h | 4 +- sql/sql_db.cc | 4 +- sql/sql_delete.cc | 57 +++++++++---------- sql/sql_insert.cc | 18 +++--- sql/sql_lex.h | 2 +- sql/sql_load.cc | 31 +++++++---- sql/sql_parse.cc | 6 +- sql/sql_rename.cc | 2 +- sql/sql_repl.cc | 5 +- sql/sql_repl.h | 4 +- sql/sql_table.cc | 55 ++++++++++++------- sql/sql_update.cc | 19 ++++--- sql/sql_yacc.yy | 13 ++++- sql/table.cc | 76 +++++++++++++++++--------- sql/unireg.cc | 1 + 29 files changed, 342 insertions(+), 220 deletions(-) diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 7d1843f95fc..835b5d6629a 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -72,7 +72,7 @@ show binlog events in 'slave-bin.001' from 4; Log_name Pos Event_type Server_id Orig_log_pos Info slave-bin.001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3 slave-bin.001 79 Query 1 79 use test; create table t1(n int not null auto_increment primary key) -slave-bin.001 172 Intvar 1 200 INSERT_ID=1 +slave-bin.001 172 Intvar 1 172 INSERT_ID=1 slave-bin.001 200 Query 1 200 use test; insert into t1 values (NULL) slave-bin.001 263 Query 1 263 use test; drop table t1 slave-bin.001 311 Query 1 311 use test; create table t1 (word char(20) not null) diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index ff0f94ab4a6..f8ac13477a9 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -170,6 +170,10 @@ convert_character_set cp1251_koi8 select @@timestamp>0; @@timestamp>0 1 +set @@rand_seed1=10000000,@@rand_seed2=1000000; +select ROUND(RAND(),5); +ROUND(RAND(),5) +0.02887 set big_tables=OFFF; Variable 'big_tables' can't be set to the value of 'OFFF' set big_tables="OFFF"; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index e84a7fe404d..e21fbd975e6 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -93,6 +93,10 @@ set global character set default, session character set default; show variables like "convert_character_set"; select @@timestamp>0; +set @@rand_seed1=10000000,@@rand_seed2=1000000; +select ROUND(RAND(),5); + + # The following should give errors --error 1231 diff --git a/sql/field.cc b/sql/field.cc index 42ddcc3b9d2..eed165f0ed1 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4864,6 +4864,7 @@ uint pack_length_to_packflag(uint type) Field *make_field(char *ptr, uint32 field_length, uchar *null_pos, uchar null_bit, uint pack_flag, + enum_field_types field_type, Field::utype unireg_check, TYPELIB *interval, const char *field_name, @@ -4889,6 +4890,9 @@ Field *make_field(char *ptr, uint32 field_length, return new Field_blob(ptr,null_pos,null_bit, unireg_check, field_name, table, pack_length,f_is_binary(pack_flag) != 0); + if (f_is_geom(pack_flag)) + return 0; + if (interval) { if (f_is_enum(pack_flag)) @@ -4902,7 +4906,7 @@ Field *make_field(char *ptr, uint32 field_length, } } - switch ((enum enum_field_types) f_packtype(pack_flag)) { + switch (field_type) { case FIELD_TYPE_DECIMAL: return new Field_decimal(ptr,field_length,null_pos,null_bit, unireg_check, field_name, table, @@ -4965,10 +4969,11 @@ Field *make_field(char *ptr, uint32 field_length, return new Field_datetime(ptr,null_pos,null_bit, unireg_check, field_name, table); case FIELD_TYPE_NULL: - default: // Impossible (Wrong version) return new Field_null(ptr,field_length,unireg_check,field_name,table); + default: // Impossible (Wrong version) + break; } - return 0; // Impossible (Wrong version) + return 0; // Impossible } diff --git a/sql/field.h b/sql/field.h index 4290f99ea3e..ba28a6a872e 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1050,7 +1050,9 @@ public: Field *make_field(char *ptr, uint32 field_length, uchar *null_pos, uchar null_bit, - uint pack_flag, Field::utype unireg_check, + uint pack_flag, + enum_field_types field_type, + Field::utype unireg_check, TYPELIB *interval, const char *field_name, struct st_table *table); uint pack_length_to_packflag(uint type); @@ -1073,6 +1075,7 @@ bool test_if_int(const char *str,int length); #define FIELDFLAG_INTERVAL 256 #define FIELDFLAG_BITFIELD 512 // mangled with dec! #define FIELDFLAG_BLOB 1024 // mangled with dec! +#define FIELDFLAG_GEOM 2048 #define FIELDFLAG_LEFT_FULLSCREEN 8192 #define FIELDFLAG_RIGHT_FULLSCREEN 16384 #define FIELDFLAG_FORMAT_NUMBER 16384 // predit: ###,,## in output @@ -1099,6 +1102,7 @@ bool test_if_int(const char *str,int length); #define f_is_enum(x) ((x) & FIELDFLAG_INTERVAL) #define f_is_bitfield(x) ((x) & FIELDFLAG_BITFIELD) #define f_is_blob(x) (((x) & (FIELDFLAG_BLOB | FIELDFLAG_NUMBER)) == FIELDFLAG_BLOB) +#define f_is_geom(x) ((x) & FIELDFLAG_GEOM) #define f_is_equ(x) ((x) & (1+2+FIELDFLAG_PACK+31*256)) #define f_settype(x) (((int) x) << FIELDFLAG_PACK_SHIFT) #define f_maybe_null(x) (x & FIELDFLAG_MAYBE_NULL) diff --git a/sql/item_func.cc b/sql/item_func.cc index 7da5435276d..fec0e448630 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1516,7 +1516,7 @@ void item_user_lock_release(ULL *ull) tmp.append("DO RELEASE_LOCK(\""); tmp.append(ull->key,ull->key_length); tmp.append("\")"); - Query_log_event qev(current_thd,tmp.ptr(), tmp.length()); + Query_log_event qev(current_thd, tmp.ptr(), tmp.length(),1); qev.error_code=0; // this query is always safe to run on slave mysql_bin_log.write(&qev); } diff --git a/sql/log.cc b/sql/log.cc index 32c0f4417f1..5dc1a677f76 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1017,9 +1017,13 @@ bool MYSQL_LOG::write(THD *thd,enum enum_server_command command, bool MYSQL_LOG::write(Log_event* event_info) { bool error=0; + DBUG_ENTER("MYSQL_LOG::write(event)"); if (!inited) // Can't use mutex if not init - return 0; + { + DBUG_PRINT("error",("not initied")); + DBUG_RETURN(0); + } pthread_mutex_lock(&LOCK_log); /* In most cases this is only called if 'is_open()' is true */ @@ -1040,7 +1044,8 @@ bool MYSQL_LOG::write(Log_event* event_info) (db && !db_ok(db, binlog_do_db, binlog_ignore_db))) { VOID(pthread_mutex_unlock(&LOCK_log)); - return 0; + DBUG_PRINT("error",("!db_ok")); + DBUG_RETURN(0); } error=1; @@ -1078,7 +1083,7 @@ bool MYSQL_LOG::write(Log_event* event_info) char buf[1024] = "SET CHARACTER SET "; char* p = strend(buf); p = strmov(p, thd->variables.convert_set->name); - Query_log_event e(thd, buf, (ulong)(p - buf)); + Query_log_event e(thd, buf, (ulong)(p - buf), 0); e.set_log_pos(this); if (e.write(file)) goto err; @@ -1126,7 +1131,7 @@ err: } pthread_mutex_unlock(&LOCK_log); - return error; + DBUG_RETURN(error); } @@ -1156,6 +1161,7 @@ uint MYSQL_LOG::next_file_id() bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache) { VOID(pthread_mutex_lock(&LOCK_log)); + DBUG_ENTER("MYSQL_LOG::write(cache"); if (is_open()) // Should always be true { @@ -1214,7 +1220,7 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache) signal_update(); } VOID(pthread_mutex_unlock(&LOCK_log)); - return 0; + DBUG_RETURN(0); err: if (!write_error) @@ -1223,7 +1229,7 @@ err: sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno); } VOID(pthread_mutex_unlock(&LOCK_log)); - return 1; + DBUG_RETURN(1); } diff --git a/sql/log_event.cc b/sql/log_event.cc index 871f72acbae..12f97d825a6 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -131,22 +131,25 @@ const char* Log_event::get_type_str() } #ifndef MYSQL_CLIENT -Log_event::Log_event(THD* thd_arg, uint16 flags_arg) - :exec_time(0), flags(flags_arg), cached_event_len(0), - temp_buf(0), thd(thd_arg) +Log_event::Log_event(THD* thd_arg, uint16 flags_arg, bool using_trans) + :temp_buf(0), exec_time(0), cached_event_len(0), flags(flags_arg), + thd(thd_arg) { - if (thd) - { - server_id = thd->server_id; - when = thd->start_time; - log_pos = thd->log_pos; - } - else - { - server_id = ::server_id; - when = time(NULL); - log_pos=0; - } + server_id = thd->server_id; + when = thd->start_time; + log_pos = thd->log_pos; + cache_stmt= (using_trans && + (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))); +} + + +Log_event::Log_event() + :temp_buf(0), exec_time(0), cached_event_len(0), flags(0), cache_stmt(0), + thd(0) +{ + server_id = ::server_id; + when = time(NULL); + log_pos=0; } /* @@ -179,7 +182,7 @@ static void cleanup_load_tmpdir() #endif Log_event::Log_event(const char* buf, bool old_format) - :cached_event_len(0), temp_buf(0) + :temp_buf(0), cached_event_len(0), cache_stmt(0) { when = uint4korr(buf); server_id = uint4korr(buf + SERVER_ID_OFFSET); @@ -350,14 +353,12 @@ void Intvar_log_event::pack_info(String* packet) void Rand_log_event::pack_info(String* packet) { - char buf1[256], buf[22]; - String tmp(buf1, sizeof(buf1)); - tmp.length(0); - tmp.append("randseed1="); - tmp.append(llstr(seed1, buf)); - tmp.append(",randseed2="); - tmp.append(llstr(seed2, buf)); - net_store_data(packet, tmp.ptr(), tmp.length()); + char buf1[256], *pos; + pos=strmov(buf1,"rand_seed1="); + pos=int10_to_str((long) seed1, pos, 10); + pos=strmov(pos, ",rand_seed2="); + pos=int10_to_str((long) seed2, pos, 10); + net_store_data(packet, buf1, (uint) (pos-buf1)); } void Slave_log_event::pack_info(String* packet) @@ -783,12 +784,10 @@ int Rotate_log_event::write_data(IO_CACHE* file) #ifndef MYSQL_CLIENT Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, ulong query_length, bool using_trans) - :Log_event(thd_arg), data_buf(0), query(query_arg), db(thd_arg->db), - q_len((uint32) query_length), + :Log_event(thd_arg, 0, using_trans), data_buf(0), query(query_arg), + db(thd_arg->db), q_len((uint32) query_length), error_code(thd_arg->killed ? ER_SERVER_SHUTDOWN: thd_arg->net.last_errno), - thread_id(thd_arg->thread_id), - cache_stmt(using_trans && - (thd_arg->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) + thread_id(thd_arg->thread_id) { time_t end_time; time(&end_time); @@ -963,8 +962,8 @@ void Rand_log_event::print(FILE* file, bool short_form, char* last_db) print_header(file); fprintf(file, "\tRand\n"); } - fprintf(file, "SET RAND SEED1=%s;\n", llstr(seed1, llbuff)); - fprintf(file, "SET RAND SEED2=%s;\n", llstr(seed2, llbuff)); + fprintf(file, "SET @@RAND_SEED1=%s, @@RAND_SEED2=%s;\n", + llstr(seed1, llbuff),llstr(seed2, llbuff)); fflush(file); } #endif @@ -1093,8 +1092,10 @@ char* sql_ex_info::init(char* buf,char* buf_end,bool use_new_format) Load_log_event::Load_log_event(THD* thd, sql_exchange* ex, const char* db_arg, const char* table_name_arg, List& fields_arg, - enum enum_duplicates handle_dup) - :Log_event(thd),thread_id(thd->thread_id), num_fields(0),fields(0), + enum enum_duplicates handle_dup, + bool using_trans) + :Log_event(thd, 0, using_trans),thread_id(thd->thread_id), + num_fields(0),fields(0), field_lens(0),field_block_len(0), table_name(table_name_arg ? table_name_arg : ""), db(db_arg), fname(ex->file_name) @@ -1332,7 +1333,7 @@ void Load_log_event::set_fields(List &fields) Slave_log_event::Slave_log_event(THD* thd_arg, struct st_relay_log_info* rli): - Log_event(thd_arg),mem_pool(0),master_host(0) + Log_event(thd_arg,0,0),mem_pool(0),master_host(0) { DBUG_ENTER("Slave_log_event"); if (!rli->inited) // QQ When can this happen ? @@ -1432,11 +1433,13 @@ Slave_log_event::Slave_log_event(const char* buf, int event_len) } #ifndef MYSQL_CLIENT -Create_file_log_event::Create_file_log_event(THD* thd_arg, sql_exchange* ex, - const char* db_arg, const char* table_name_arg, - List& fields_arg, enum enum_duplicates handle_dup, - char* block_arg, uint block_len_arg) - :Load_log_event(thd_arg,ex,db_arg,table_name_arg,fields_arg,handle_dup), +Create_file_log_event:: +Create_file_log_event(THD* thd_arg, sql_exchange* ex, + const char* db_arg, const char* table_name_arg, + List& fields_arg, enum enum_duplicates handle_dup, + char* block_arg, uint block_len_arg, bool using_trans) + :Load_log_event(thd_arg,ex,db_arg,table_name_arg,fields_arg,handle_dup, + using_trans), fake_base(0),block(block_arg),block_len(block_len_arg), file_id(thd_arg->file_id = mysql_bin_log.next_file_id()) { @@ -1532,9 +1535,10 @@ void Create_file_log_event::pack_info(String* packet) #ifndef MYSQL_CLIENT Append_block_log_event::Append_block_log_event(THD* thd_arg, char* block_arg, - uint block_len_arg) - :Log_event(thd_arg), block(block_arg),block_len(block_len_arg), - file_id(thd_arg->file_id) + uint block_len_arg, + bool using_trans) + :Log_event(thd_arg,0, using_trans), block(block_arg), + block_len(block_len_arg), file_id(thd_arg->file_id) { } #endif @@ -1578,8 +1582,8 @@ void Append_block_log_event::pack_info(String* packet) net_store_data(packet, buf1); } -Delete_file_log_event::Delete_file_log_event(THD* thd_arg) - :Log_event(thd_arg),file_id(thd_arg->file_id) +Delete_file_log_event::Delete_file_log_event(THD* thd_arg, bool using_trans) + :Log_event(thd_arg, 0, using_trans), file_id(thd_arg->file_id) { } #endif @@ -1624,14 +1628,14 @@ void Delete_file_log_event::pack_info(String* packet) #ifndef MYSQL_CLIENT -Execute_load_log_event::Execute_load_log_event(THD* thd_arg) - :Log_event(thd_arg),file_id(thd_arg->file_id) +Execute_load_log_event::Execute_load_log_event(THD* thd_arg, bool using_trans) + :Log_event(thd_arg, 0, using_trans), file_id(thd_arg->file_id) { } #endif -Execute_load_log_event::Execute_load_log_event(const char* buf,int len) - :Log_event(buf, 0),file_id(0) +Execute_load_log_event::Execute_load_log_event(const char* buf, int len) + :Log_event(buf, 0), file_id(0) { if ((uint)len < EXEC_LOAD_EVENT_OVERHEAD) return; diff --git a/sql/log_event.h b/sql/log_event.h index 2a133becbad..69a70d535ec 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -224,18 +224,19 @@ struct st_relay_log_info; class Log_event { public: + my_off_t log_pos; + char *temp_buf; time_t when; ulong exec_time; uint32 server_id; - my_off_t log_pos; + uint cached_event_len; uint16 flags; - int cached_event_len; - char* temp_buf; - + bool cache_stmt; #ifndef MYSQL_CLIENT THD* thd; - Log_event(THD* thd_arg, uint16 flags_arg = 0); + Log_event(THD* thd_arg, uint16 flags_arg, bool cache_stmt); + Log_event(); // if mutex is 0, the read will proceed without mutex static Log_event* read_log_event(IO_CACHE* file, pthread_mutex_t* log_lock, @@ -278,7 +279,7 @@ public: { return 0; } virtual Log_event_type get_type_code() = 0; virtual bool is_valid() = 0; - virtual bool get_cache_stmt() { return 0; } + inline bool get_cache_stmt() { return cache_stmt; } Log_event(const char* buf, bool old_format); virtual ~Log_event() { free_temp_buf();} void register_temp_buf(char* buf) { temp_buf = buf; } @@ -320,14 +321,12 @@ public: uint16 error_code; ulong thread_id; #ifndef MYSQL_CLIENT - bool cache_stmt; Query_log_event(THD* thd_arg, const char* query_arg, ulong query_length, - bool using_trans=0); + bool using_trans); const char* get_db() { return db; } void pack_info(String* packet); int exec_event(struct st_relay_log_info* rli); - bool get_cache_stmt() { return cache_stmt; } #else void print(FILE* file, bool short_form = 0, char* last_db = 0); #endif @@ -404,14 +403,15 @@ public: const char* fname; uint32 skip_lines; sql_ex_info sql_ex; - + #ifndef MYSQL_CLIENT String field_lens_buf; String fields_buf; Load_log_event(THD* thd, sql_exchange* ex, const char* db_arg, const char* table_name_arg, - List& fields_arg, enum enum_duplicates handle_dup); + List& fields_arg, enum enum_duplicates handle_dup, + bool using_trans); void set_fields(List &fields_arg); void pack_info(String* packet); const char* get_db() { return db; } @@ -427,8 +427,10 @@ public: Load_log_event(const char* buf, int event_len, bool old_format); ~Load_log_event() {} - Log_event_type get_type_code() { return sql_ex.new_format() ? - NEW_LOAD_EVENT: LOAD_EVENT; } + Log_event_type get_type_code() + { + return sql_ex.new_format() ? NEW_LOAD_EVENT: LOAD_EVENT; + } int write_data_header(IO_CACHE* file); int write_data_body(IO_CACHE* file); bool is_valid() { return table_name != 0; } @@ -454,7 +456,7 @@ public: char server_version[ST_SERVER_VER_LEN]; #ifndef MYSQL_CLIENT - Start_log_event() :Log_event((THD*)0),binlog_version(BINLOG_VERSION) + Start_log_event() :Log_event(), binlog_version(BINLOG_VERSION) { created = (uint32) when; memcpy(server_version, ::server_version, ST_SERVER_VER_LEN); @@ -485,7 +487,7 @@ public: #ifndef MYSQL_CLIENT Intvar_log_event(THD* thd_arg,uchar type_arg, ulonglong val_arg) - :Log_event(thd_arg),val(val_arg),type(type_arg) + :Log_event(),val(val_arg),type(type_arg) {} void pack_info(String* packet); int exec_event(struct st_relay_log_info* rli); @@ -515,7 +517,7 @@ class Rand_log_event: public Log_event #ifndef MYSQL_CLIENT Rand_log_event(THD* thd_arg, ulonglong seed1_arg, ulonglong seed2_arg) - :Log_event(thd_arg),seed1(seed1_arg),seed2(seed2_arg) + :Log_event(thd_arg,0,0),seed1(seed1_arg),seed2(seed2_arg) {} void pack_info(String* packet); int exec_event(struct st_relay_log_info* rli); @@ -536,7 +538,7 @@ class Stop_log_event: public Log_event { public: #ifndef MYSQL_CLIENT - Stop_log_event() :Log_event((THD*)0) + Stop_log_event() :Log_event() {} int exec_event(struct st_relay_log_info* rli); #else @@ -561,8 +563,9 @@ public: bool alloced; #ifndef MYSQL_CLIENT Rotate_log_event(THD* thd_arg, const char* new_log_ident_arg, - uint ident_len_arg = 0,ulonglong pos_arg = 4) - : Log_event(thd_arg), new_log_ident(new_log_ident_arg), + uint ident_len_arg = 0, + ulonglong pos_arg = LOG_EVENT_OFFSET) + :Log_event(thd_arg,0,0), new_log_ident(new_log_ident_arg), pos(pos_arg),ident_len(ident_len_arg ? ident_len_arg : (uint) strlen(new_log_ident_arg)), alloced(0) {} @@ -606,7 +609,8 @@ public: const char* table_name_arg, List& fields_arg, enum enum_duplicates handle_dup, - char* block_arg, uint block_len_arg); + char* block_arg, uint block_len_arg, + bool using_trans); void pack_info(String* packet); int exec_event(struct st_relay_log_info* rli); #else @@ -651,7 +655,7 @@ public: #ifndef MYSQL_CLIENT Append_block_log_event(THD* thd, char* block_arg, - uint block_len_arg); + uint block_len_arg, bool using_trans); int exec_event(struct st_relay_log_info* rli); void pack_info(String* packet); #else @@ -673,7 +677,7 @@ public: uint file_id; #ifndef MYSQL_CLIENT - Delete_file_log_event(THD* thd); + Delete_file_log_event(THD* thd, bool using_trans); void pack_info(String* packet); int exec_event(struct st_relay_log_info* rli); #else @@ -694,7 +698,7 @@ public: uint file_id; #ifndef MYSQL_CLIENT - Execute_load_log_event(THD* thd); + Execute_load_log_event(THD* thd, bool using_trans); void pack_info(String* packet); int exec_event(struct st_relay_log_info* rli); #else diff --git a/sql/set_var.cc b/sql/set_var.cc index a992ddf6044..ce85a81594c 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -283,6 +283,8 @@ static sys_var_last_insert_id sys_identity("identity"); static sys_var_insert_id sys_insert_id("insert_id"); /* alias for last_insert_id() to be compatible with Sybase */ static sys_var_slave_skip_counter sys_slave_skip_counter("sql_slave_skip_counter"); +static sys_var_rand_seed1 sys_rand_seed1("rand_seed1"); +static sys_var_rand_seed2 sys_rand_seed2("rand_seed2"); /* @@ -351,6 +353,8 @@ sys_var *sys_variables[]= &sys_query_cache_type, #endif /* HAVE_QUERY_CACHE */ &sys_quote_show_create, + &sys_rand_seed1, + &sys_rand_seed2, &sys_read_buff_size, &sys_read_rnd_buff_size, &sys_rpl_recovery_rank, @@ -1043,6 +1047,19 @@ bool sys_var_slave_skip_counter::update(THD *thd, set_var *var) } +bool sys_var_rand_seed1::update(THD *thd, set_var *var) +{ + thd->rand.seed1=var->value->val_int(); + return 0; +} + +bool sys_var_rand_seed2::update(THD *thd, set_var *var) +{ + thd->rand.seed2=var->value->val_int(); + return 0; +} + + /* Functions to update thd->options bits */ diff --git a/sql/set_var.h b/sql/set_var.h index c43cdbfd63e..a171c4f5e76 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -332,6 +332,23 @@ public: }; +class sys_var_rand_seed1 :public sys_var +{ +public: + sys_var_rand_seed1(const char *name_arg) :sys_var(name_arg) {} + bool update(THD *thd, set_var *var); + bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } +}; + +class sys_var_rand_seed2 :public sys_var +{ +public: + sys_var_rand_seed2(const char *name_arg) :sys_var(name_arg) {} + bool update(THD *thd, set_var *var); + bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } +}; + + class sys_var_thd_conv_charset :public sys_var_thd { public: diff --git a/sql/slave.cc b/sql/slave.cc index 620523dd47f..5d82f34bfab 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2252,7 +2252,7 @@ static int process_io_create_file(MASTER_INFO* mi, Create_file_log_event* cev) in the loop */ { - Append_block_log_event aev(thd,0,0); + Append_block_log_event aev(thd,0,0,0); for (;;) { @@ -2265,7 +2265,7 @@ static int process_io_create_file(MASTER_INFO* mi, Create_file_log_event* cev) if (unlikely(!num_bytes)) /* eof */ { send_ok(net); /* 3.23 master wants it */ - Execute_load_log_event xev(thd); + Execute_load_log_event xev(thd,0); xev.log_pos = mi->master_log_pos; if (unlikely(mi->rli.relay_log.append(&xev))) { diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 1694e662b52..dc59f3f3137 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1091,7 +1091,7 @@ bool change_password(THD *thd, const char *host, const char *user, acl_user->host.hostname ? acl_user->host.hostname : "", new_password)); mysql_update_log.write(thd, buff, query_length); - Query_log_event qinfo(thd, buff, query_length); + Query_log_event qinfo(thd, buff, query_length, 0); mysql_bin_log.write(&qinfo); DBUG_RETURN(0); } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 3b46c53f75c..838cf70f08d 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -539,26 +539,20 @@ void close_temporary_tables(THD *thd) { TABLE *table,*next; char *query, *end; - const uint init_query_buf_size = 11; // "drop table " uint query_buf_size; bool found_user_tables = 0; + if (!thd->temporary_tables) + return; + LINT_INIT(end); - query_buf_size = init_query_buf_size; + query_buf_size= 50; // Enough for DROP ... TABLE for (table=thd->temporary_tables ; table ; table=table->next) - { query_buf_size += table->key_length; - } - - if (query_buf_size == init_query_buf_size) - return; // no tables to close if ((query = alloc_root(&thd->mem_root, query_buf_size))) - { - memcpy(query, "drop table ", init_query_buf_size); - end = query + init_query_buf_size; - } + end=strmov(query, "DROP /*!40005 TEMPORARY */ TABLE "); for (table=thd->temporary_tables ; table ; table=next) { @@ -567,12 +561,14 @@ void close_temporary_tables(THD *thd) // skip temporary tables not created directly by the user if (table->real_name[0] != '#') { - end = strxmov(end,table->table_cache_key,".", - table->real_name,",", NullS); - // here we assume table_cache_key always starts - // with \0 terminated db name + /* + Here we assume table_cache_key always starts + with \0 terminated db name + */ found_user_tables = 1; } + end = strxmov(end,table->table_cache_key,".", + table->real_name,",", NullS); } next=table->next; close_temporary(table); @@ -580,7 +576,7 @@ void close_temporary_tables(THD *thd) if (query && found_user_tables && mysql_bin_log.is_open()) { /* The -1 is to remove last ',' */ - Query_log_event qinfo(thd, query, (ulong)(end-query)-1); + Query_log_event qinfo(thd, query, (ulong)(end-query)-1, 0); qinfo.error_code=0; mysql_bin_log.write(&qinfo); } diff --git a/sql/sql_class.h b/sql/sql_class.h index b8921964804..0f010b9de28 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -419,6 +419,7 @@ public: table_map used_tables; USER_CONN *user_connect; ulong query_id,version, options,thread_id, col_access; + ulong rand_saved_seed1, rand_saved_seed2; long dbug_thread_id; pthread_t real_id; uint current_tablenr,tmp_table,cond_count; @@ -433,7 +434,6 @@ public: bool set_query_id,locked,count_cuted_fields,some_tables_deleted; bool no_errors, allow_sum_func, password, fatal_error; bool query_start_used,last_insert_id_used,insert_id_used,rand_used; - ulonglong rand_saved_seed1, rand_saved_seed2; bool system_thread,in_lock_tables,global_read_lock; bool query_error, bootstrap, cleanup_done; bool safe_to_cache_query; @@ -805,7 +805,7 @@ public: uint num_of_tables; int error; thr_lock_type lock_option; - bool do_delete, not_trans_safe; + bool do_delete, transactional_tables, log_delayed, normal_tables; public: multi_delete(THD *thd, TABLE_LIST *dt, thr_lock_type lock_option_arg, uint num_of_tables); diff --git a/sql/sql_db.cc b/sql/sql_db.cc index be193ee0b55..cde0c6cc31f 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -86,7 +86,7 @@ int mysql_create_db(THD *thd, char *db, uint create_options, bool silent) mysql_update_log.write(thd,thd->query, thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } } @@ -174,7 +174,7 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) mysql_update_log.write(thd, thd->query, thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } if (thd->query == path) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index b40e0b7b093..1faa6e3250e 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -35,7 +35,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, SQL_SELECT *select=0; READ_RECORD info; bool using_limit=limit != HA_POS_ERROR; - bool using_transactions; + bool transactional_table, log_delayed; ha_rows deleted; DBUG_ENTER("mysql_delete"); @@ -161,21 +161,22 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, (void) table->file->extra(HA_EXTRA_NORMAL); cleanup: - using_transactions=table->file->has_transactions(); - if (deleted && (error <= 0 || !using_transactions)) + transactional_table= table->file->has_transactions(); + log_delayed= (transactional_table || table->tmp_table); + if (deleted && (error <= 0 || !transactional_table)) { mysql_update_log.write(thd,thd->query, thd->query_length); if (mysql_bin_log.is_open()) { Query_log_event qinfo(thd, thd->query, thd->query_length, - using_transactions); - if (mysql_bin_log.write(&qinfo) && using_transactions) + log_delayed); + if (mysql_bin_log.write(&qinfo) && transactional_table) error=1; } - if (!using_transactions) + if (!log_delayed) thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } - if (using_transactions && ha_autocommit_or_rollback(thd,error >= 0)) + if (transactional_table && ha_autocommit_or_rollback(thd,error >= 0)) error=1; if (deleted) { @@ -214,9 +215,8 @@ multi_delete::multi_delete(THD *thd_arg, TABLE_LIST *dt, uint num_of_tables_arg) : delete_tables (dt), thd(thd_arg), deleted(0), num_of_tables(num_of_tables_arg), error(0), lock_option(lock_option_arg), - do_delete(false) + do_delete(0), transactional_tables(0), log_delayed(0), normal_tables(0) { - not_trans_safe=false; tempfiles = (Unique **) sql_calloc(sizeof(Unique *) * (num_of_tables-1)); } @@ -266,8 +266,12 @@ multi_delete::initialize_tables(JOIN *join) /* Don't use KEYREAD optimization on this table */ tbl->no_keyread=1; walk=walk->next; - if (!not_trans_safe && !tbl->file->has_transactions()) - not_trans_safe=true; + if (tbl->file->has_transactions()) + log_delayed= transactional_tables= 1; + else if (tbl->tmp_table != NO_TMP_TABLE) + log_delayed= 1; + else + normal_tables= 1; } } walk= delete_tables; @@ -373,7 +377,7 @@ void multi_delete::send_error(uint errcode,const char *err) In all other cases do attempt deletes ... */ if ((table_being_deleted->table->file->has_transactions() && - table_being_deleted == delete_tables) || !not_trans_safe) + table_being_deleted == delete_tables) || !normal_tables) ha_rollback_stmt(thd); else if (do_delete) { @@ -419,8 +423,7 @@ int multi_delete::do_deletes(bool from_send_error) READ_RECORD info; init_read_record(&info,thd,table,NULL,0,0); - while (!(error=info.read_record(&info)) && - (!thd->killed || from_send_error || not_trans_safe)) + while (!(error=info.read_record(&info)) && !thd->killed) { if ((error=table->file->delete_row(table->record[0]))) { @@ -453,11 +456,6 @@ bool multi_delete::send_eof() /* reset used flags */ thd->proc_info="end"; - if (error) - { - ::send_error(&thd->net); - return 1; - } /* Write the SQL statement to the binlog if we deleted @@ -465,24 +463,25 @@ bool multi_delete::send_eof() was a non-transaction-safe table involved, since modifications in it cannot be rolled back. */ - if (deleted || not_trans_safe) + if (deleted) { mysql_update_log.write(thd,thd->query,thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); - if (mysql_bin_log.write(&qinfo) && - !not_trans_safe) + Query_log_event qinfo(thd, thd->query, thd->query_length, + log_delayed); + if (mysql_bin_log.write(&qinfo) && !normal_tables) error=1; // Log write failed: roll back the SQL statement } /* Commit or rollback the current SQL statement */ VOID(ha_autocommit_or_rollback(thd,error > 0)); - } - if (deleted) - { + query_cache_invalidate3(thd, delete_tables, 1); } - ::send_ok(&thd->net,deleted); + if (error) + ::send_error(&thd->net); + else + ::send_ok(&thd->net,deleted); return 0; } @@ -565,6 +564,7 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) *fn_ext(path)=0; // Remove the .frm extension error= ha_create_table(path,&create_info,1) ? -1 : 0; query_cache_invalidate3(thd, table_list, 0); + end: if (!dont_send_ok) { @@ -573,7 +573,8 @@ end: mysql_update_log.write(thd,thd->query,thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, + thd->tmp_table); mysql_bin_log.write(&qinfo); } send_ok(&thd->net); // This should return record count diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index bd379bf688d..81178809f8f 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -104,7 +104,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, int error; bool log_on= ((thd->options & OPTION_UPDATE_LOG) || !(thd->master_access & SUPER_ACL)); - bool using_transactions, bulk_insert=0; + bool transactional_table, log_delayed, bulk_insert=0; uint value_count; uint save_time_stamp; ulong counter = 1; @@ -297,21 +297,23 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, thd->insert_id(id); // For update log else if (table->next_number_field) id=table->next_number_field->val_int(); // Return auto_increment value - using_transactions=table->file->has_transactions(); - if ((info.copied || info.deleted) && (error <= 0 || !using_transactions)) + + transactional_table= table->file->has_transactions(); + log_delayed= (transactional_table || table->tmp_table); + if ((info.copied || info.deleted) && (error <= 0 || !transactional_table)) { mysql_update_log.write(thd, thd->query, thd->query_length); if (mysql_bin_log.is_open()) { Query_log_event qinfo(thd, thd->query, thd->query_length, - using_transactions); - if (mysql_bin_log.write(&qinfo) && using_transactions) + log_delayed); + if (mysql_bin_log.write(&qinfo) && transactional_table) error=1; } - if (!using_transactions) + if (!log_delayed) thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } - if (using_transactions) + if (transactional_table) error=ha_autocommit_or_rollback(thd,error); if (info.copied || info.deleted) { @@ -1197,7 +1199,7 @@ bool delayed_insert::handle_inserts(void) mysql_update_log.write(&thd,row->query, row->query_length); if (using_bin_log) { - Query_log_event qinfo(&thd, row->query, row->query_length); + Query_log_event qinfo(&thd, row->query, row->query_length,0); mysql_bin_log.write(&qinfo); } } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 16ef7e750cd..54e72fafdd5 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -176,7 +176,7 @@ typedef struct st_lex enum enum_var_type option_type; uint grant,grant_tot_col,which_columns, union_option; thr_lock_type lock_option; - bool drop_primary,drop_if_exists,local_file, olap; + bool drop_primary, drop_if_exists, drop_temporary, local_file, olap; bool in_comment,ignore_space,verbose,simple_alter; uint slave_thd_opt; } LEX; diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 8881c79eba4..cfb12b8a5bf 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -90,7 +90,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, bool is_fifo=0; LOAD_FILE_INFO lf_info; char * db = table_list->db ? table_list->db : thd->db; - bool using_transactions; + bool transactional_table, log_delayed; DBUG_ENTER("mysql_load"); #ifdef EMBEDDED_LIBRARY @@ -105,6 +105,9 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, } if (!(table = open_ltable(thd,table_list,lock_type))) DBUG_RETURN(-1); + transactional_table= table->file->has_transactions(); + log_delayed= (transactional_table || table->tmp_table); + if (!fields.elements) { Field **field; @@ -224,6 +227,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, lf_info.handle_dup = handle_duplicates; lf_info.wrote_create_file = 0; lf_info.last_pos_in_file = HA_POS_ERROR; + lf_info.log_delayed= log_delayed; read_info.set_io_cache_arg((void*) &lf_info); } restore_record(table,2); @@ -275,16 +279,16 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, free_blobs(table); /* if pack_blob was used */ table->copy_blobs=0; thd->count_cuted_fields=0; /* Don`t calc cuted fields */ - using_transactions = table->file->has_transactions(); + if (error) { - if (using_transactions) + if (transactional_table) ha_autocommit_or_rollback(thd,error); if (!opt_old_rpl_compat && mysql_bin_log.is_open()) { if (lf_info.wrote_create_file) { - Delete_file_log_event d(thd); + Delete_file_log_event d(thd, log_delayed); mysql_bin_log.write(&d); } } @@ -297,27 +301,30 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, if (!thd->slave_thread) mysql_update_log.write(thd,thd->query,thd->query_length); - if (!using_transactions) + if (!log_delayed) thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; if (mysql_bin_log.is_open()) { - if (opt_old_rpl_compat && !read_file_from_client) + if (opt_old_rpl_compat) { - Load_log_event qinfo(thd, ex, db, table->table_name, fields, - handle_duplicates); - mysql_bin_log.write(&qinfo); + if (!read_file_from_client) + { + Load_log_event qinfo(thd, ex, db, table->table_name, fields, + handle_duplicates, log_delayed); + mysql_bin_log.write(&qinfo); + } } - if (!opt_old_rpl_compat) + else { read_info.end_io_cache(); // make sure last block gets logged if (lf_info.wrote_create_file) { - Execute_load_log_event e(thd); + Execute_load_log_event e(thd, log_delayed); mysql_bin_log.write(&e); } } } - if (using_transactions) + if (transactional_table) error=ha_autocommit_or_rollback(thd,error); DBUG_RETURN(error); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7416506fd02..232f255da35 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2341,7 +2341,7 @@ mysql_execute_command(void) mysql_update_log.write(thd, thd->query, thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } } @@ -2361,7 +2361,7 @@ mysql_execute_command(void) mysql_update_log.write(thd, thd->query, thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } if (mqh_used && lex->sql_command == SQLCOM_GRANT) @@ -2723,8 +2723,8 @@ mysql_init_query(THD *thd) thd->lex.select->olap= UNSPECIFIED_OLAP_TYPE; thd->fatal_error=0; // Safety thd->last_insert_id_used=thd->query_start_used=thd->insert_id_used=0; - thd->sent_row_count=thd->examined_row_count=0; thd->rand_used=0; + thd->sent_row_count=thd->examined_row_count=0; thd->safe_to_cache_query=1; DBUG_VOID_RETURN; } diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index 049690eb318..3eddd2646d5 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -94,7 +94,7 @@ end: mysql_update_log.write(thd,thd->query,thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } send_ok(&thd->net); diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 47b258d9ed2..003bb290b41 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1132,7 +1132,8 @@ int log_loaded_block(IO_CACHE* file) lf_info->last_pos_in_file = file->pos_in_file; if (lf_info->wrote_create_file) { - Append_block_log_event a(lf_info->thd, buffer, block_len); + Append_block_log_event a(lf_info->thd, buffer, block_len, + lf_info->log_delayed); mysql_bin_log.write(&a); } else @@ -1140,7 +1141,7 @@ int log_loaded_block(IO_CACHE* file) Create_file_log_event c(lf_info->thd,lf_info->ex,lf_info->db, lf_info->table_name, *lf_info->fields, lf_info->handle_dup, buffer, - block_len); + block_len, lf_info->log_delayed); mysql_bin_log.write(&c); lf_info->wrote_create_file = 1; DBUG_SYNC_POINT("debug_lock.created_file_event",10); diff --git a/sql/sql_repl.h b/sql/sql_repl.h index 197fd03ec7c..15435382b08 100644 --- a/sql/sql_repl.h +++ b/sql/sql_repl.h @@ -43,13 +43,13 @@ int check_binlog_magic(IO_CACHE* log, const char** errmsg); typedef struct st_load_file_info { THD* thd; + my_off_t last_pos_in_file; sql_exchange* ex; List *fields; enum enum_duplicates handle_dup; char* db; char* table_name; - bool wrote_create_file; - my_off_t last_pos_in_file; + bool wrote_create_file, log_delayed; } LOAD_FILE_INFO; int log_loaded_block(IO_CACHE* file); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 865b30cdb39..36aa31e7553 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -110,6 +110,17 @@ int mysql_rm_table_part2_with_lock(THD *thd, return error; } +/* + TODO: + When logging to the binary log, we should log + tmp_tables and transactional tables as separate statements if we + are in a transaction; This is needed to get these tables into the + cached binary log that is only written on COMMIT. + + The current code only writes DROP statements that only uses temporary + tables to the cache binary log. This should be ok on most cases, but + not all. +*/ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, bool dont_log_query) @@ -119,7 +130,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, String wrong_tables; db_type table_type; int error; - bool some_tables_deleted=0; + bool some_tables_deleted=0, tmp_table_deleted=0; DBUG_ENTER("mysql_rm_table_part2"); for (table=tables ; table ; table=table->next) @@ -127,7 +138,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, char *db=table->db ? table->db : thd->db; if (!close_temporary_table(thd, db, table->real_name)) { - some_tables_deleted=1; // Log query + tmp_table_deleted=1; continue; // removed temporary table } @@ -143,8 +154,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, DBUG_RETURN(-1); /* remove form file and isam files */ - (void) sprintf(path,"%s/%s/%s%s",mysql_data_home,db,table->real_name, - reg_ext); + strxmov(path, mysql_data_home, "/", db, "/", table->real_name, reg_ext, + NullS); (void) unpack_filename(path,path); error=0; @@ -177,7 +188,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, wrong_tables.append(String(table->real_name)); } } - if (some_tables_deleted) + if (some_tables_deleted || tmp_table_deleted) { query_cache_invalidate3(thd, tables, 0); if (!dont_log_query) @@ -185,7 +196,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, mysql_update_log.write(thd, thd->query,thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, + tmp_table_deleted && !some_tables_deleted); mysql_bin_log.write(&qinfo); } } @@ -272,7 +284,8 @@ static int sort_keys(KEY *a, KEY *b) create_info Create information (like MAX_ROWS) fields List of fields to create keys List of keys to create - tmp_table Set to 1 if this is a temporary table + tmp_table Set to 1 if this is an internal temporary table + (From ALTER TABLE) no_log Don't log the query to binary log. DESCRIPTION @@ -690,16 +703,6 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, /* my_error(ER_CANT_CREATE_TABLE,MYF(0),table_name,my_errno); */ goto end; } - if (!tmp_table && !no_log) - { - // Must be written before unlock - mysql_update_log.write(thd,thd->query, thd->query_length); - if (mysql_bin_log.is_open()) - { - Query_log_event qinfo(thd, thd->query, thd->query_length); - mysql_bin_log.write(&qinfo); - } - } if (create_info->options & HA_LEX_CREATE_TMP_TABLE) { /* Open table and put in temporary table list */ @@ -709,6 +712,18 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, goto end; } } + if (!tmp_table && !no_log) + { + // Must be written before unlock + mysql_update_log.write(thd,thd->query, thd->query_length); + if (mysql_bin_log.is_open()) + { + Query_log_event qinfo(thd, thd->query, thd->query_length, + test(create_info->options & + HA_LEX_CREATE_TMP_TABLE)); + mysql_bin_log.write(&qinfo); + } + } error=0; end: VOID(pthread_mutex_unlock(&LOCK_open)); @@ -1408,7 +1423,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, mysql_update_log.write(thd, thd->query, thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } send_ok(&thd->net); @@ -1773,7 +1788,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, mysql_update_log.write(thd, thd->query,thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } goto end_temporary; @@ -1902,7 +1917,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, mysql_update_log.write(thd, thd->query,thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } VOID(pthread_cond_broadcast(&COND_refresh)); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 92decc63b6b..c1f02b5a30e 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -54,7 +54,7 @@ int mysql_update(THD *thd, thr_lock_type lock_type) { bool using_limit=limit != HA_POS_ERROR; - bool used_key_is_modified, using_transactions; + bool used_key_is_modified, transactional_table, log_delayed; int error=0; uint save_time_stamp, used_index, want_privilege; ulong query_id=thd->query_id, timestamp_query_id; @@ -301,21 +301,22 @@ int mysql_update(THD *thd, thd->proc_info="end"; VOID(table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY)); table->time_stamp=save_time_stamp; // Restore auto timestamp pointer - using_transactions=table->file->has_transactions(); - if (updated && (error <= 0 || !using_transactions)) + transactional_table= table->file->has_transactions(); + log_delayed= (transactional_table || table->tmp_table); + if (updated && (error <= 0 || !transactional_table)) { mysql_update_log.write(thd,thd->query,thd->query_length); if (mysql_bin_log.is_open()) { Query_log_event qinfo(thd, thd->query, thd->query_length, - using_transactions); - if (mysql_bin_log.write(&qinfo) && using_transactions) - error=1; + log_delayed); + if (mysql_bin_log.write(&qinfo) && transactional_table) + error=1; // Rollback update } - if (!using_transactions) + if (!log_delayed) thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } - if (using_transactions && ha_autocommit_or_rollback(thd, error >= 0)) + if (transactional_table && ha_autocommit_or_rollback(thd, error >= 0)) error=1; if (updated) { @@ -790,7 +791,7 @@ bool multi_update::send_eof() if (updated || not_trans_safe) { mysql_update_log.write(thd,thd->query,thd->query_length); - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); /* mysql_bin_log is not open if binlogging or replication diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index b4d1fa802bb..911fc12d9c4 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -513,6 +513,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); type int_type real_type order_dir opt_field_spec lock_option udf_type if_exists opt_local opt_table_options table_options table_option opt_if_not_exists opt_var_type opt_var_ident_type + opt_temporary %type ULONG_NUM raid_types merge_insert_types @@ -2383,11 +2384,12 @@ do: DO_SYM */ drop: - DROP TABLE_SYM if_exists table_list opt_restrict + DROP opt_temporary TABLE_SYM if_exists table_list opt_restrict { LEX *lex=Lex; lex->sql_command = SQLCOM_DROP_TABLE; - lex->drop_if_exists = $3; + lex->drop_temporary= $2; + lex->drop_if_exists= $4; } | DROP INDEX ident ON table_ident {} { @@ -2424,8 +2426,13 @@ table_name: if_exists: /* empty */ { $$=0; } - | IF EXISTS { $$= 1; }; + | IF EXISTS { $$= 1; } + ; +opt_temporary: + /* empty */ { $$= 0; } + | TEMPORARY { $$= 1; } + ; /* ** Insert : add new data to table */ diff --git a/sql/table.cc b/sql/table.cc index d3b719c553d..b68edac5fc2 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -47,19 +47,19 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, int j,error; uint rec_buff_length,n_length,int_length,records,key_parts,keys, interval_count,interval_parts,read_length,db_create_options; - uint key_info_length; + uint key_info_length, com_length; ulong pos; - char index_file[FN_REFLEN], *names,*keynames; + char index_file[FN_REFLEN], *names, *keynames; uchar head[288],*disk_buff,new_field_pack_flag; my_string record; const char **int_array; - bool new_frm_ver,use_hash, null_field_first; + bool use_hash, null_field_first; File file; Field **field_ptr,*reg_field; KEY *keyinfo; KEY_PART_INFO *key_part; uchar *null_pos; - uint null_bit; + uint null_bit, new_frm_ver, field_pack_length; SQL_CRYPT *crypted=0; DBUG_ENTER("openfrm"); DBUG_PRINT("enter",("name: '%s' form: %lx",name,outparam)); @@ -95,14 +95,15 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, if (my_read(file,(byte*) head,64,MYF(MY_NABP))) goto err_not_open; if (head[0] != (uchar) 254 || head[1] != 1 || - (head[2] != FRM_VER && head[2] != FRM_VER+1)) - goto err_not_open; /* purecov: inspected */ + (head[2] != FRM_VER && head[2] > FRM_VER+2)) + goto err_not_open; /* purecov: inspected */ new_field_pack_flag=head[27]; - new_frm_ver= (head[2] == FRM_VER+1); + new_frm_ver= (head[2] - FRM_VER); + field_pack_length= new_frm_ver < 2 ? 11 : 15; error=3; if (!(pos=get_form_pos(file,head,(TYPELIB*) 0))) - goto err_not_open; /* purecov: inspected */ + goto err_not_open; /* purecov: inspected */ *fn_ext(index_file)='\0'; // Remove .frm extension outparam->db_type=ha_checktype((enum db_type) (uint) *(head+3)); @@ -153,9 +154,23 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, for (i=0 ; i < keys ; i++, keyinfo++) { - keyinfo->flags= ((uint) strpos[0]) ^ HA_NOSAME; - keyinfo->key_length= (uint) uint2korr(strpos+1); - keyinfo->key_parts= (uint) strpos[3]; strpos+=4; + if (new_frm_ver == 2) + { + keyinfo->flags= (uint) uint2korr(strpos) ^ HA_NOSAME; + keyinfo->key_length= (uint) uint2korr(strpos+2); + keyinfo->key_parts= (uint) strpos[4]; + keyinfo->algorithm= (enum ha_key_alg) strpos[5]; + strpos+=8; + } + else + { + keyinfo->flags= ((uint) strpos[0]) ^ HA_NOSAME; + keyinfo->key_length= (uint) uint2korr(strpos+1); + keyinfo->key_parts= (uint) strpos[3]; + keyinfo->algorithm= HA_KEY_ALG_UNDEF; + strpos+=4; + } + keyinfo->key_part= key_part; keyinfo->rec_per_key= rec_per_key; for (j=keyinfo->key_parts ; j-- ; key_part++) @@ -165,7 +180,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, key_part->offset= (uint) uint2korr(strpos+2)-1; key_part->key_type= (uint) uint2korr(strpos+5); // key_part->field= (Field*) 0; // Will be fixed later - if (new_frm_ver) + if (new_frm_ver >= 1) { key_part->key_part_flag= *(strpos+4); key_part->length= (uint) uint2korr(strpos+7); @@ -191,14 +206,6 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, } keynames=(char*) key_part; strpos+= (strmov(keynames, (char *) strpos) - keynames)+1; - /* Test if new 4.0 format */ - if ((uint) (strpos - disk_buff) < key_info_length) - { - /* Read key types */ - keyinfo=outparam->key_info; - for (i=0 ; i < keys ; i++, keyinfo++) - keyinfo->algorithm= (enum ha_key_alg) *(strpos++); - } outparam->reclength = uint2korr((head+16)); if (*(head+26) == 1) @@ -267,6 +274,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, interval_parts=uint2korr(head+272); int_length=uint2korr(head+274); outparam->null_fields=uint2korr(head+282); + com_length=uint2korr(head+284); outparam->comment=strdup_root(&outparam->mem_root, (char*) head+47); @@ -278,12 +286,12 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, interval_count*sizeof(TYPELIB)+ (outparam->fields+interval_parts+ keys+3)*sizeof(my_string)+ - (n_length+int_length))))) + (n_length+int_length+com_length))))) goto err_not_open; /* purecov: inspected */ outparam->field=field_ptr; - read_length=((uint) (outparam->fields*11)+pos+ - (uint) (n_length+int_length)); + read_length=(uint) (outparam->fields * field_pack_length + + pos+ (uint) (n_length+int_length+com_length)); if (read_string(file,(gptr*) &disk_buff,read_length)) goto err_not_open; /* purecov: inspected */ if (crypted) @@ -299,7 +307,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, names= (char*) (int_array+outparam->fields+interval_parts+keys+3); if (!interval_count) outparam->intervals=0; // For better debugging - memcpy((char*) names, strpos+(outparam->fields*11), + memcpy((char*) names, strpos+(outparam->fields*field_pack_length), (uint) (n_length+int_length)); fix_type_pointers(&int_array,&outparam->fieldnames,1,&names); @@ -332,22 +340,40 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, (hash_get_key) get_field_name,0, HASH_CASE_INSENSITIVE); - for (i=0 ; i < outparam->fields; i++, strpos+= 11, field_ptr++) + for (i=0 ; i < outparam->fields; i++, strpos+=field_pack_length, field_ptr++) { uint pack_flag= uint2korr(strpos+6); uint interval_nr= (uint) strpos[10]; + enum_field_types field_type; + + if (new_frm_ver == 2) + { + /* new frm file in 4.1 */ + field_type=(enum_field_types) (uint) strpos[11]; + } + else + { + /* old frm file */ + field_type= (enum_field_types) f_packtype(pack_flag); + } *field_ptr=reg_field= make_field(record+uint2korr(strpos+4), (uint32) strpos[3], // field_length null_pos,null_bit, pack_flag, + field_type, (Field::utype) MTYP_TYPENR((uint) strpos[8]), (interval_nr ? outparam->intervals+interval_nr-1 : (TYPELIB*) 0), outparam->fieldnames.type_names[i], outparam); + if (!*field_ptr) // Field in 4.1 + { + error= 4; + goto err_not_open; /* purecov: inspected */ + } if (!(reg_field->flags & NOT_NULL_FLAG)) { if ((null_bit<<=1) == 256) diff --git a/sql/unireg.cc b/sql/unireg.cc index 7d0201f75ae..cc8440da1e4 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -557,6 +557,7 @@ static bool make_empty_rec(File file,enum db_type table_type, null_pos+null_count/8, 1 << (null_count & 7), field->pack_flag, + field->sql_type, field->unireg_check, field->interval, field->field_name, From 8fc4319ae36e106ed8474a567bd1bd00e6337d5f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 12:49:02 +0200 Subject: [PATCH 052/246] Portability fix extern "C" static -> extern "C" client/mysqlbinlog.cc: Portability fix sql/gen_lex_hash.cc: Portability fix sql/repl_failsafe.cc: Portability fix sql/sql_class.cc: Portability fix sql/sql_udf.cc: Portability fix sql/mysqld.cc: Portability fix sql/sql_base.cc: Portability fix sql/sql_insert.cc: Portability fix sql/sql_parse.cc: Portability fix sql/sql_delete.cc: Portability fix --- client/mysqlbinlog.cc | 2 +- sql/gen_lex_hash.cc | 2 +- sql/mysqld.cc | 28 ++++++++++++++-------------- sql/repl_failsafe.cc | 4 ++-- sql/sql_base.cc | 6 +++--- sql/sql_class.cc | 8 ++++---- sql/sql_delete.cc | 2 +- sql/sql_insert.cc | 2 +- sql/sql_parse.cc | 6 +++--- sql/sql_udf.cc | 4 ++-- 10 files changed, 32 insertions(+), 32 deletions(-) diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index fbded7aaaaf..14778876868 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -176,7 +176,7 @@ static void dump_remote_file(NET* net, const char* fname) } -extern "C" static my_bool +extern "C" my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) { diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index bd3d5e1bf7a..8139cf4fdb0 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -360,7 +360,7 @@ static void usage(int version) } -extern "C" static my_bool +extern "C" my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument __attribute__((unused))) { diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 06c69bd5559..d42b11496f3 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -444,20 +444,20 @@ pthread_cond_t eventShutdown; #endif static void start_signal_handler(void); -extern "C" static pthread_handler_decl(signal_hand, arg); +extern "C" pthread_handler_decl(signal_hand, arg); static void set_options(void); static void get_options(int argc,char **argv); static char *get_relative_path(const char *path); static void fix_paths(void); -extern "C" static pthread_handler_decl(handle_connections_sockets,arg); -extern "C" static pthread_handler_decl(kill_server_thread,arg); +extern "C" pthread_handler_decl(handle_connections_sockets,arg); +extern "C" pthread_handler_decl(kill_server_thread,arg); static int bootstrap(FILE *file); static void close_server_sock(); static bool read_init_file(char *file_name); #ifdef __NT__ -extern "C" static pthread_handler_decl(handle_connections_namedpipes,arg); +extern "C" pthread_handler_decl(handle_connections_namedpipes,arg); #endif -extern "C" extern pthread_handler_decl(handle_slave,arg); +extern "C" pthread_handler_decl(handle_slave,arg); #ifdef SET_RLIMIT_NOFILE static uint set_maximum_open_files(uint max_file_limit); #endif @@ -771,7 +771,7 @@ static void __cdecl kill_server(int sig_ptr) #ifdef USE_ONE_SIGNAL_HAND -extern "C" static pthread_handler_decl(kill_server_thread,arg __attribute__((unused))) +extern "C" pthread_handler_decl(kill_server_thread,arg __attribute__((unused))) { SHUTDOWN_THD; my_thread_init(); // Initialize new thread @@ -786,7 +786,7 @@ extern "C" static pthread_handler_decl(kill_server_thread,arg __attribute__((unu #define sigset signal #endif -extern "C" static sig_handler print_signal_warning(int sig) +extern "C" sig_handler print_signal_warning(int sig) { if (!DBUG_IN_USE) { @@ -1162,7 +1162,7 @@ void close_connection(NET *net,uint errcode,bool lock) /* Called when a thread is aborted */ /* ARGSUSED */ -extern "C" static sig_handler end_thread_signal(int sig __attribute__((unused))) +extern "C" sig_handler end_thread_signal(int sig __attribute__((unused))) { THD *thd=current_thd; DBUG_ENTER("end_thread_signal"); @@ -1253,7 +1253,7 @@ void flush_thread_cache() */ #ifdef THREAD_SPECIFIC_SIGPIPE -extern "C" static sig_handler abort_thread(int sig __attribute__((unused))) +extern "C" sig_handler abort_thread(int sig __attribute__((unused))) { THD *thd=current_thd; DBUG_ENTER("abort_thread"); @@ -1327,7 +1327,7 @@ static void start_signal_handler(void) #define UNSAFE_DEFAULT_LINUX_THREADS 200 #endif -extern "C" static sig_handler handle_segfault(int sig) +extern "C" sig_handler handle_segfault(int sig) { THD *thd=current_thd; /* @@ -1512,7 +1512,7 @@ static void start_signal_handler(void) /* This threads handles all signals and alarms */ /* ARGSUSED */ -extern "C" static void *signal_hand(void *arg __attribute__((unused))) +extern "C" void *signal_hand(void *arg __attribute__((unused))) { sigset_t set; int sig; @@ -1640,8 +1640,8 @@ extern "C" static void *signal_hand(void *arg __attribute__((unused))) /* ARGSUSED */ -extern "C" static int my_message_sql(uint error, const char *str, - myf MyFlags __attribute__((unused))) +extern "C" int my_message_sql(uint error, const char *str, + myf MyFlags __attribute__((unused))) { NET *net; DBUG_ENTER("my_message_sql"); @@ -3919,7 +3919,7 @@ static void set_options(void) } -extern "C" static my_bool +extern "C" my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), char *argument) { diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 78b22a61b66..4ebb2f5b476 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -188,7 +188,7 @@ err2: return 1; } -extern "C" static uint32 +extern "C" uint32 *slave_list_key(SLAVE_INFO* si, uint* len, my_bool not_used __attribute__((unused))) { @@ -196,7 +196,7 @@ extern "C" static uint32 return &si->server_id; } -extern "C" static void slave_info_free(void *s) +extern "C" void slave_info_free(void *s) { my_free((gptr) s, MYF(MY_WME)); } diff --git a/sql/sql_base.cc b/sql/sql_base.cc index c176d899b85..ec2e22d2a5d 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -39,8 +39,8 @@ static key_map get_key_map_from_key_list(TABLE *table, List *index_list); -extern "C" static byte *cache_key(const byte *record,uint *length, - my_bool not_used __attribute__((unused))) +extern "C" byte *table_cache_key(const byte *record,uint *length, + my_bool not_used __attribute__((unused))) { TABLE *entry=(TABLE*) record; *length=entry->key_length; @@ -49,7 +49,7 @@ extern "C" static byte *cache_key(const byte *record,uint *length, void table_cache_init(void) { - VOID(hash_init(&open_cache,table_cache_size+16,0,0,cache_key, + VOID(hash_init(&open_cache,table_cache_size+16,0,0,table_cache_key, (hash_free_key) free_cache_entry,0)); mysql_rm_tmp_tables(); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 0066bccbd73..c30d253828f 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -59,14 +59,14 @@ template class List_iterator; ** User variables ****************************************************************************/ -extern "C" static byte *get_var_key(user_var_entry *entry, uint *length, - my_bool not_used __attribute__((unused))) +extern "C" byte *get_var_key(user_var_entry *entry, uint *length, + my_bool not_used __attribute__((unused))) { *length=(uint) entry->name.length; return (byte*) entry->name.str; } -extern "C" static void free_var(user_var_entry *entry) +extern "C" void free_user_var(user_var_entry *entry) { char *pos= (char*) entry+ALIGN_SIZE(sizeof(*entry)); if (entry->value && entry->value != pos) @@ -148,7 +148,7 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), user_connect=(USER_CONN *)0; hash_init(&user_vars, USER_VARS_HASH_SIZE, 0, 0, (hash_get_key) get_var_key, - (hash_free_key) free_var,0); + (hash_free_key) free_user_var,0); #ifdef USING_TRANSACTIONS bzero((char*) &transaction,sizeof(transaction)); if (opt_using_transactions) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index fc32d6a4591..c40e8a4e947 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -205,7 +205,7 @@ cleanup: #define MEM_STRIP_BUF_SIZE current_thd->variables.sortbuff_size -extern "C" static int refposcmp2(void* arg, const void *a,const void *b) +extern "C" int refposcmp2(void* arg, const void *a,const void *b) { return memcmp(a,b, *(int*) arg); } diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 7a8ad1fd3e6..61b1a0dad45 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -915,7 +915,7 @@ void kill_delayed_threads(void) * Create a new delayed insert thread */ -extern "C" static pthread_handler_decl(handle_delayed_insert,arg) +extern "C" pthread_handler_decl(handle_delayed_insert,arg) { delayed_insert *di=(delayed_insert*) arg; THD *thd= &di->thd; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 9c618ac04d0..086a0a561a0 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -259,14 +259,14 @@ static bool check_user(THD *thd,enum_server_command command, const char *user, started with corresponding variable that is greater then 0. */ -extern "C" static byte *get_key_conn(user_conn *buff, uint *length, - my_bool not_used __attribute__((unused))) +extern "C" byte *get_key_conn(user_conn *buff, uint *length, + my_bool not_used __attribute__((unused))) { *length=buff->len; return (byte*) buff->user; } -extern "C" static void free_user(struct user_conn *uc) +extern "C" void free_user(struct user_conn *uc) { my_free((char*) uc,MYF(0)); } diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index fe1fa3332cf..420ec67f0c5 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -98,8 +98,8 @@ static void init_syms(udf_func *tmp) } } -extern "C" static byte* get_hash_key(const byte *buff,uint *length, - my_bool not_used __attribute__((unused))) +extern "C" byte* get_hash_key(const byte *buff,uint *length, + my_bool not_used __attribute__((unused))) { udf_func *udf=(udf_func*) buff; *length=(uint) udf->name_length; From 4fa5e50edbba856a2fe60d1dde7eb5571f42bd68 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 14:47:25 +0200 Subject: [PATCH 053/246] Many files: Fix hang introduced by selective deadlock resolution srv0srv.c, row0mysql.c: Fix hang introduced by selective deadlock resolution + corruption caused by lock timeout or sel deadl res in ON DELETE CASCADE innobase/include/que0que.h: Fix hang introduced by selective deadlock resolution innobase/include/trx0trx.h: Fix hang introduced by selective deadlock resolution innobase/include/ut0ut.h: Fix hang introduced by selective deadlock resolution innobase/lock/lock0lock.c: Fix hang introduced by selective deadlock resolution innobase/log/log0log.c: Fix hang introduced by selective deadlock resolution innobase/que/que0que.c: Fix hang introduced by selective deadlock resolution innobase/row/row0mysql.c: Fix hang introduced by selective deadlock resolution + corruption caused by lock timeout or sel deadl res in ON DELETE CASCADE innobase/srv/srv0srv.c: Fix hang introduced by selective deadlock resolution + corruption caused by lock timeout or sel deadl res in ON DELETE CASCADE innobase/trx/trx0sys.c: Fix hang introduced by selective deadlock resolution innobase/trx/trx0trx.c: Fix hang introduced by selective deadlock resolution --- innobase/include/que0que.h | 8 ++++++-- innobase/include/trx0trx.h | 11 ++++++++++- innobase/include/ut0ut.h | 1 - innobase/lock/lock0lock.c | 5 ++++- innobase/log/log0log.c | 4 ++-- innobase/que/que0que.c | 24 +++++++++++++++--------- innobase/row/row0mysql.c | 34 ++++++++++++++++++++++++++-------- innobase/srv/srv0srv.c | 19 ++++++++++++++++++- innobase/trx/trx0sys.c | 2 +- innobase/trx/trx0trx.c | 1 + 10 files changed, 83 insertions(+), 26 deletions(-) diff --git a/innobase/include/que0que.h b/innobase/include/que0que.h index cdaeeae1fde..a3ed18e2b14 100644 --- a/innobase/include/que0que.h +++ b/innobase/include/que0que.h @@ -117,6 +117,7 @@ que_thr_stop( /************************************************************************** Moves a thread from another state to the QUE_THR_RUNNING state. Increments the n_active_thrs counters of the query graph and transaction. */ + void que_thr_move_to_run_state_for_mysql( /*================================*/ @@ -125,14 +126,17 @@ que_thr_move_to_run_state_for_mysql( /************************************************************************** A patch for MySQL used to 'stop' a dummy query thread used in MySQL select, when there is no error or lock wait. */ + void que_thr_stop_for_mysql_no_error( /*============================*/ que_thr_t* thr, /* in: query thread */ trx_t* trx); /* in: transaction */ /************************************************************************** -A patch for MySQL used to 'stop' a dummy query thread used in MySQL -select. */ +A patch for MySQL used to 'stop' a dummy query thread used in MySQL. The +query thread is stopped and made inactive, except in the case where +it was put to the lock wait state in lock0lock.c, but the lock has already +been granted or the transaction chosen as a victim in deadlock resolution. */ void que_thr_stop_for_mysql( diff --git a/innobase/include/trx0trx.h b/innobase/include/trx0trx.h index 1468ef449e7..34f820f03e7 100644 --- a/innobase/include/trx0trx.h +++ b/innobase/include/trx0trx.h @@ -429,7 +429,10 @@ struct trx_struct{ MySQL */ /*------------------------------*/ ulint error_state; /* 0 if no error, otherwise error - number */ + number; NOTE That ONLY the thread + doing the transaction is allowed to + set this field: this is NOT protected + by the kernel mutex */ void* error_info; /* if the error number indicates a duplicate key error, a pointer to the problematic index is stored here */ @@ -466,6 +469,12 @@ struct trx_struct{ TRX_QUE_LOCK_WAIT, this points to the lock request, otherwise this is NULL */ + ibool was_chosen_as_deadlock_victim; + /* when the transaction decides to wait + for a lock, this it sets this to FALSE; + if another transaction chooses this + transaction as a victim in deadlock + resolution, it sets this to TRUE */ time_t wait_started; /* lock wait started at this time */ UT_LIST_BASE_NODE_T(que_thr_t) wait_thrs; /* query threads belonging to this diff --git a/innobase/include/ut0ut.h b/innobase/include/ut0ut.h index d4697c47266..8ec23b23dcd 100644 --- a/innobase/include/ut0ut.h +++ b/innobase/include/ut0ut.h @@ -10,7 +10,6 @@ Created 1/20/1994 Heikki Tuuri #define ut0ut_h #include "univ.i" -#include #include #ifndef MYSQL_SERVER #include diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c index 92ee5ee6cbe..7b08d6b89b8 100644 --- a/innobase/lock/lock0lock.c +++ b/innobase/lock/lock0lock.c @@ -1727,6 +1727,7 @@ index->table_name); } trx->que_state = TRX_QUE_LOCK_WAIT; + trx->was_chosen_as_deadlock_victim = FALSE; trx->wait_started = time(NULL); ut_a(que_thr_stop(thr)); @@ -3173,7 +3174,8 @@ lock_deadlock_recursive( err_buf += sprintf(err_buf, "*** WE ROLL BACK TRANSACTION (1)\n"); - wait_lock->trx->error_state = DB_DEADLOCK; + wait_lock->trx->was_chosen_as_deadlock_victim + = TRUE; lock_cancel_waiting_and_release(wait_lock); @@ -3353,6 +3355,7 @@ table->name); } trx->que_state = TRX_QUE_LOCK_WAIT; + trx->was_chosen_as_deadlock_victim = FALSE; trx->wait_started = time(NULL); ut_a(que_thr_stop(thr)); diff --git a/innobase/log/log0log.c b/innobase/log/log0log.c index f9b785ccbd5..c798a08e2de 100644 --- a/innobase/log/log0log.c +++ b/innobase/log/log0log.c @@ -1654,8 +1654,8 @@ log_reset_first_header_and_checkpoint( lsn = ut_dulint_add(start, LOG_BLOCK_HDR_SIZE); /* Write the label of ibbackup --restore */ - sprintf((char*) hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, "ibbackup "); - ut_sprintf_timestamp((char*) hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP + sprintf(hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, "ibbackup "); + ut_sprintf_timestamp(hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP + strlen("ibbackup ")); buf = hdr_buf + LOG_CHECKPOINT_1; diff --git a/innobase/que/que0que.c b/innobase/que/que0que.c index 7fa444f6741..a96c8840a03 100644 --- a/innobase/que/que0que.c +++ b/innobase/que/que0que.c @@ -1046,14 +1046,16 @@ que_thr_stop( } /************************************************************************** -A patch for MySQL used to 'stop' a dummy query thread used in MySQL. */ +A patch for MySQL used to 'stop' a dummy query thread used in MySQL. The +query thread is stopped and made inactive, except in the case where +it was put to the lock wait state in lock0lock.c, but the lock has already +been granted or the transaction chosen as a victim in deadlock resolution. */ void que_thr_stop_for_mysql( /*===================*/ que_thr_t* thr) /* in: query thread */ { - ibool stopped = FALSE; trx_t* trx; trx = thr_get_trx(thr); @@ -1067,13 +1069,10 @@ que_thr_stop_for_mysql( /* Error handling built for the MySQL interface */ thr->state = QUE_THR_COMPLETED; - - stopped = TRUE; - } - - if (!stopped) { - /* It must have been a lock wait but the - lock was already released */ + } else { + /* It must have been a lock wait but the lock was + already released, or this transaction was chosen + as a victim in selective deadlock resolution */ mutex_exit(&kernel_mutex); @@ -1081,6 +1080,10 @@ que_thr_stop_for_mysql( } } + ut_ad(thr->is_active == TRUE); + ut_ad(trx->n_active_thrs == 1); + ut_ad(thr->graph->n_active_thrs == 1); + thr->is_active = FALSE; (thr->graph)->n_active_thrs--; @@ -1132,6 +1135,9 @@ que_thr_stop_for_mysql_no_error( trx_t* trx) /* in: transaction */ { ut_ad(thr->state == QUE_THR_RUNNING); + ut_ad(thr->is_active == TRUE); + ut_ad(trx->n_active_thrs == 1); + ut_ad(thr->graph->n_active_thrs == 1); if (thr->magic_n != QUE_THR_MAGIC_N) { fprintf(stderr, diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index b109b785a45..f228a75ad3a 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -198,8 +198,9 @@ row_mysql_handle_errors( /* out: TRUE if it was a lock wait and we should continue running the query thread */ ulint* new_err,/* out: possible new error encountered in - rollback, or the old error which was - during the function entry */ + lock wait, or if no new error, the value + of trx->error_state at the entry of this + function */ trx_t* trx, /* in: transaction */ que_thr_t* thr, /* in: query thread */ trx_savept_t* savept) /* in: savepoint or NULL */ @@ -998,8 +999,8 @@ row_update_cascade_for_mysql( or set null operation */ dict_table_t* table) /* in: table where we do the operation */ { - ulint err; - trx_t* trx; + ulint err; + trx_t* trx; trx = thr_get_trx(thr); run_again: @@ -1010,11 +1011,28 @@ run_again: err = trx->error_state; - if (err == DB_LOCK_WAIT) { - que_thr_stop_for_mysql(thr); - - row_mysql_handle_errors(&err, trx, thr, NULL); + /* Note that the cascade node is a subnode of another InnoDB + query graph node. We do a normal lock wait in this node, but + all errors are handled by the parent node. */ + if (err == DB_LOCK_WAIT) { + /* Handle lock wait here */ + + que_thr_stop_for_mysql(thr); + + srv_suspend_mysql_thread(thr); + + /* Note that a lock wait may also end in a lock wait timeout, + or this transaction is picked as a victim in selective + deadlock resolution */ + + if (trx->error_state != DB_SUCCESS) { + + return(trx->error_state); + } + + /* Retry operation after a normal lock wait */ + goto run_again; } diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index 51d7878fd29..f9eba721cbc 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -2082,13 +2082,24 @@ srv_suspend_mysql_thread( if (thr->state == QUE_THR_RUNNING) { - /* The lock has already been released: no need to suspend */ + ut_ad(thr->is_active == TRUE); + + /* The lock has already been released or this transaction + was chosen as a deadlock victim: no need to suspend */ + + if (trx->was_chosen_as_deadlock_victim) { + + trx->error_state = DB_DEADLOCK; + trx->was_chosen_as_deadlock_victim = FALSE; + } mutex_exit(&kernel_mutex); return; } + ut_ad(thr->is_active == FALSE); + slot = srv_table_reserve_slot_for_mysql(); event = slot->event; @@ -2142,6 +2153,12 @@ srv_suspend_mysql_thread( wait_time = ut_difftime(ut_time(), slot->suspend_time); + if (trx->was_chosen_as_deadlock_victim) { + + trx->error_state = DB_DEADLOCK; + trx->was_chosen_as_deadlock_victim = FALSE; + } + mutex_exit(&kernel_mutex); if (srv_lock_wait_timeout < 100000000 && diff --git a/innobase/trx/trx0sys.c b/innobase/trx/trx0sys.c index 19cf52c8676..33c962772e8 100644 --- a/innobase/trx/trx0sys.c +++ b/innobase/trx/trx0sys.c @@ -474,7 +474,7 @@ trx_sys_update_mysql_binlog_offset( mlog_write_string(sys_header + field + TRX_SYS_MYSQL_LOG_NAME, - (byte*) file_name, 1 + ut_strlen(file_name), mtr); + file_name, 1 + ut_strlen(file_name), mtr); } if (mach_read_from_4(sys_header + field diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c index 9f711890f60..f0077f941de 100644 --- a/innobase/trx/trx0trx.c +++ b/innobase/trx/trx0trx.c @@ -129,6 +129,7 @@ trx_create( trx->graph = NULL; trx->wait_lock = NULL; + trx->was_chosen_as_deadlock_victim = FALSE; UT_LIST_INIT(trx->wait_thrs); trx->lock_heap = mem_heap_create_in_buffer(256); From f5e71883bef3d89cb05fa9ab6497dbaed66ad9b0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 15:05:26 +0200 Subject: [PATCH 054/246] row0mysql.c: Backport from 4.0: Fix corruption of ON DELETE CASCADE in lock wait timeout innobase/row/row0mysql.c: Backport from 4.0: Fix corruption of ON DELETE CASCADE in lock wait timeout --- innobase/row/row0mysql.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index 26878f8c97c..ebb3cbe8dc8 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -1000,8 +1000,8 @@ row_update_cascade_for_mysql( or set null operation */ dict_table_t* table) /* in: table where we do the operation */ { - ulint err; - trx_t* trx; + ulint err; + trx_t* trx; trx = thr_get_trx(thr); run_again: @@ -1012,11 +1012,26 @@ run_again: err = trx->error_state; - if (err == DB_LOCK_WAIT) { - que_thr_stop_for_mysql(thr); - - row_mysql_handle_errors(&err, trx, thr, NULL); + /* Note that the cascade node is a subnode of another InnoDB + query graph node. We do a normal lock wait in this node, but + all errors are handled by the parent node. */ + if (err == DB_LOCK_WAIT) { + /* Handle lock wait here */ + + que_thr_stop_for_mysql(thr); + + srv_suspend_mysql_thread(thr); + + /* Note that a lock wait may also end in a lock wait timeout */ + + if (trx->error_state != DB_SUCCESS) { + + return(trx->error_state); + } + + /* Retry operation after a normal lock wait */ + goto run_again; } From 3ef571302df5fa868d82e44a942e1b8de89362b9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 19:25:27 +0200 Subject: [PATCH 055/246] Portability fix (accidently left out from last changeset) --- sql/sql_insert.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 61b1a0dad45..c83e21ddcae 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -25,7 +25,7 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list); static int write_delayed(THD *thd,TABLE *table, enum_duplicates dup, char *query, uint query_length, bool log_on); static void end_delayed_insert(THD *thd); -extern "C" static pthread_handler_decl(handle_delayed_insert,arg); +extern "C" pthread_handler_decl(handle_delayed_insert,arg); static void unlink_blobs(register TABLE *table); /* Define to force use of my_malloc() if the allocated memory block is big */ From e3f2b294762deeec5bba40d761178cd526ff861c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 20:11:55 +0200 Subject: [PATCH 056/246] Small fix to avoid problems in building with --without-debug --- sql/sql_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_test.cc b/sql/sql_test.cc index b3bf47e7fd2..3fbeaa753db 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -41,6 +41,7 @@ static const char *lock_descriptions[] = "High priority write lock", "Highest priority write lock" }; +extern HASH open_cache; #ifndef DBUG_OFF @@ -64,7 +65,6 @@ print_where(COND *cond,const char *info) } /* This is for debugging purposes */ -extern HASH open_cache; extern TABLE *unused_tables; void print_cached_tables(void) From f57822ccfd0315e081f72799c2b6213ccab617fa Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Nov 2002 21:04:26 +0200 Subject: [PATCH 057/246] btr0btr.c, buf0buf.c: Fix a glitch: under heavy ibuf activity InnoDB could print the whole contents of ibuf tree to the error log innobase/buf/buf0buf.c: Fix a glitch: under heavy ibuf activity InnoDB could print the whole contents of ibuf tree to the error log innobase/btr/btr0btr.c: Fix a glitch: under heavy ibuf activity InnoDB could print the whole contents of ibuf tree to the error log --- innobase/btr/btr0btr.c | 8 ++++++++ innobase/buf/buf0buf.c | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/innobase/btr/btr0btr.c b/innobase/btr/btr0btr.c index 62a86d342a2..e4cfdf80fc6 100644 --- a/innobase/btr/btr0btr.c +++ b/innobase/btr/btr0btr.c @@ -2310,6 +2310,14 @@ btr_index_rec_validate( ulint i; char err_buf[1000]; + if (index->type & DICT_UNIVERSAL) { + /* The insert buffer index tree can contain records from any + other index: we cannot check the number of fields or + their length */ + + return(TRUE); + } + n = dict_index_get_n_fields(index); if (rec_get_n_fields(rec) != n) { diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c index 4524fa1a4f9..c9a5ec5307f 100644 --- a/innobase/buf/buf0buf.c +++ b/innobase/buf/buf0buf.c @@ -1357,11 +1357,6 @@ buf_page_create( ut_ad(mtr); free_block = buf_LRU_get_free_block(); - - /* Delete possible entries for the page from the insert buffer: - such can exist if the page belonged to an index which was dropped */ - - ibuf_merge_or_delete_for_page(NULL, space, offset); mutex_enter(&(buf_pool->mutex)); @@ -1410,6 +1405,11 @@ buf_page_create( mutex_exit(&(buf_pool->mutex)); + /* Delete possible entries for the page from the insert buffer: + such can exist if the page belonged to an index which was dropped */ + + ibuf_merge_or_delete_for_page(NULL, space, offset); + /* Flush pages from the end of the LRU list if necessary */ buf_flush_free_margin(); From 41f55113f4cfb814a3f69d47f26f484f0e6a4799 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 09:58:28 +0200 Subject: [PATCH 058/246] Fixed rare core dump bug when using complicated GROUP BY query that didn't return any results. This only showed up under heavy load. --- sql/sql_select.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 0c3c19c6e69..3596fdc0c05 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4970,6 +4970,8 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), } else { + if (end_of_records) + DBUG_RETURN(0); join->first_record=1; VOID(test_if_group_changed(join->group_fields)); } From 30396dac3bc959a8ce934e1ac54cabe6eae4ab7f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 11:52:16 +0100 Subject: [PATCH 059/246] Do-compile: - "--config-env" can now be given more than once - don't be smart about version suffixes Build-tools/Do-compile: - "--config-env" can now be given more than once - don't be smart about version suffixes --- Build-tools/Do-compile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 367911bb252..51ff8105b3b 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -14,7 +14,7 @@ $opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=0; GetOptions( "bdb", "build-thread=i", - "config-env=s", + "config-env=s" => \@config_env, "config-options=s" => \@config_options, "dbd-options=s", "debug", @@ -53,11 +53,6 @@ GetOptions( usage() if ($opt_help); usage() if (!$opt_distribution); -if ($opt_bdb && $opt_version_suffix eq "") -{ - $opt_version_suffix="-max"; -} - if (@make_options > 0) { chomp(@make_options); @@ -70,6 +65,12 @@ if (@config_options > 0) $opt_config_options= join(" ", @config_options); } +if (@config_env > 0) +{ + chomp(@config_env); + $opt_config_env= join(" ", @config_env); +} + chomp($host=`hostname`); $full_host_name=$host; $connect_option= ($opt_tcpip ? "--host=$host" : ""); From aaf6f63ba7238849eb4e1043a44a79a20ca3965d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 14:12:49 +0100 Subject: [PATCH 060/246] Do-compile: - added build option "--with-debug" to build unstripped binaries with debugging enabled Build-tools/Do-compile: - added build option "--with-debug" to build unstripped binaries with debugging enabled --- Build-tools/Do-compile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 51ff8105b3b..8381dd7c1ee 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -8,7 +8,7 @@ use Getopt::Long; $opt_distribution=$opt_user=$opt_config_env=""; $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix=""; $opt_tmp=$opt_version_suffix=""; -$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0; +$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=0; $opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=0; GetOptions( @@ -45,6 +45,7 @@ GetOptions( "use-old-distribution", "user=s", "version-suffix=s", + "with-debug", "with-low-memory", "with-other-libc=s", "with-small-disk", @@ -209,6 +210,7 @@ if ($opt_stage <= 1) $opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions $opt_config_options.= " --with-berkeley-db" if ($opt_bdb); $opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client); + $opt_config_options.= " --with-debug" if ($opt_with_debug); $opt_config_options.= " --with-libwrap" if ($opt_libwrap); $opt_config_options.= " --with-low-memory" if ($opt_with_low_memory); $opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server); @@ -259,7 +261,7 @@ if ($opt_stage <= 3) log_system("rm -fr mysql-3* mysql-4* $pwd/$host/*.tar.gz"); log_system("nm -n sql/mysqld | gzip -9 -v 2>&1 > sql/mysqld.sym.gz | cat"); - $flags.= "--no-strip" if ($opt_no_strip); + $flags.= "--no-strip" if ($opt_no_strip || $opt_with_debug); check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created"); safe_system("mv mysql*.tar.gz $pwd/$host"); if (-f "client/.libs/mysqladmin") @@ -501,6 +503,9 @@ If user is empty then no mail is sent. --version-suffix suffix Set name suffix (e.g. 'com' or '-max') for a distribution +--with-debug +Build binaries with debug information (implies "--no-strip") + --with-low-memory Use less memory when compiling. From 91181f0905d3b87e660f2b05118b7f95b426b833 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 17:02:33 +0200 Subject: [PATCH 061/246] Changes that will enable proper wildcarding of databases, plus proper escaping of databases with '_' in their name. More explanations in the manual. --- client/mysqlshow.c | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 5475fc7b531..0b47e06534f 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -51,6 +51,7 @@ static my_string opt_mysql_unix_port=0; int main(int argc, char **argv) { int error; + my_bool first_argument_uses_wildcards=0; char *wild; MYSQL mysql; MY_INIT(argv[0]); @@ -58,21 +59,37 @@ int main(int argc, char **argv) get_options(&argc,&argv); wild=0; - if (argc && strcont(argv[argc-1],"*?%_")) + if (argc) { - char *pos; - - wild=argv[--argc]; - for (pos=wild ; *pos ; pos++) - { /* Unix wildcards to sql */ - if (*pos == '*') - *pos='%'; - else if (*pos == '?') - *pos='_'; - } + char *pos= argv[argc-1], *to; + for (to= pos ; *pos ; pos++, to++) + { + switch (*pos) + { + case '*': + *pos= '%'; + first_argument_uses_wildcards= 1; + break; + case '?': + *pos= '_'; + first_argument_uses_wildcards= 1; + break; + case '%': + case '_': + first_argument_uses_wildcards= 1; + break; + case '\\': + pos++; + default: break; + } + *to= *pos; + } + *to= *pos; // just to copy a '\0' if '\\' was used } + if (first_argument_uses_wildcards) + wild= argv[--argc]; else if (argc == 3) /* We only want one field */ - wild=argv[--argc]; + wild= argv[--argc]; if (argc > 2) { @@ -88,7 +105,7 @@ int main(int argc, char **argv) opt_ssl_capath, opt_ssl_cipher); #endif if (!(mysql_real_connect(&mysql,host,user,opt_password, - argv[0],opt_mysql_port,opt_mysql_unix_port, + (first_argument_uses_wildcards) ? "" : argv[0],opt_mysql_port,opt_mysql_unix_port, 0))) { fprintf(stderr,"%s: %s\n",my_progname,mysql_error(&mysql)); From d3db9453c8f5aca9cdddd71ef4d63858ca5cbcc0 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 16:13:46 +0100 Subject: [PATCH 062/246] - Typo fixed --- BUILD/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am index 438b3a528cd..9c1ab24fde7 100644 --- a/BUILD/Makefile.am +++ b/BUILD/Makefile.am @@ -37,7 +37,7 @@ EXTRA_DIST = FINISH.sh \ compile-pentium-pgcc \ compile-solaris-sparc \ compile-solaris-sparc-debug \ - compile-solaris-sparc-fortre \ + compile-solaris-sparc-forte \ compile-solaris-sparc-purify # Don't update the files from bitkeeper From c219f509c2adfaaf1a46c67b78676d6c8fde682e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 18:44:42 +0200 Subject: [PATCH 063/246] log0recv.c: Removed compiler warnings about wrong printf formats innobase/log/log0recv.c: Removed compiler warnings about wrong printf formats --- innobase/log/log0recv.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c index 0fcf32ad99e..dfe67c444b4 100644 --- a/innobase/log/log0recv.c +++ b/innobase/log/log0recv.c @@ -1371,7 +1371,9 @@ recv_apply_log_recs_for_backup( if (recv_max_parsed_page_no >= n_pages_total) { printf( -"InnoDB: Error: tablespace size %lu pages, but a log record on page %lu!\n", +"InnoDB: Error: tablespace size %lu pages, but a log record on page %lu!\n" +"InnoDB: Are you sure you have specified all the ibdata files right in\n" +"InnoDB: the my.cnf file you gave as the argument to ibbackup --restore?\n", n_pages_total, recv_max_parsed_page_no); } @@ -1395,7 +1397,7 @@ recv_apply_log_recs_for_backup( &success); if (!success) { printf( -"InnoDB: Error: cannot open %lu'th data file %s\n", nth_file); +"InnoDB: Error: cannot open %lu'th data file\n", nth_file); exit(1); } @@ -1411,7 +1413,7 @@ recv_apply_log_recs_for_backup( UNIV_PAGE_SIZE); if (!success) { printf( -"InnoDB: Error: cannot read page no %lu from %lu'th data file %s\n", +"InnoDB: Error: cannot read page no %lu from %lu'th data file\n", nth_page_in_file, nth_file); exit(1); @@ -1439,7 +1441,7 @@ recv_apply_log_recs_for_backup( UNIV_PAGE_SIZE); if (!success) { printf( -"InnoDB: Error: cannot write page no %lu to %lu'th data file %s\n", +"InnoDB: Error: cannot write page no %lu to %lu'th data file\n", nth_page_in_file, nth_file); exit(1); @@ -1797,7 +1799,7 @@ recv_report_corrupt_log( "InnoDB: Recv offset %lu, prev %lu\n", recv_previous_parsed_rec_type, recv_previous_parsed_rec_is_multi, - ptr - recv_sys->buf, + (ulint)(ptr - recv_sys->buf), recv_previous_parsed_rec_offset); if ((ulint)(ptr - recv_sys->buf + 100) From 363cdb3aa797350f7861799407ab217265b39597 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 20:57:36 +0100 Subject: [PATCH 064/246] --use-frm option to mysqlcheck --- client/client_priv.h | 4 ++-- client/mysqlcheck.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/client/client_priv.h b/client/client_priv.h index acf9455bf9c..b8181245be2 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -17,7 +17,7 @@ /* Common defines for all clients */ #include -#include +#include #include #include #include @@ -37,4 +37,4 @@ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_SELECT_LIMIT, OPT_MAX_JOIN_SIZE, OPT_SSL_SSL, OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE, - OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION }; + OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION, OPT_FRM }; diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 24b67a60255..1f440992861 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -34,7 +34,7 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0, opt_compress = 0, opt_databases = 0, opt_fast = 0, opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0, opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0, - tty_password = 0; + tty_password = 0, opt_frm = 0; static uint verbose = 0, opt_mysql_port=0; static my_string opt_mysql_unix_port = 0; static char *opt_password = 0, *current_user = 0, *default_charset = 0, @@ -128,13 +128,17 @@ static struct my_option my_long_options[] = {"user", 'u', "User for login if not current user.", (gptr*) ¤t_user, (gptr*) ¤t_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #endif + {"use-frm", OPT_FRM, + "When used with REPAIR, get table structure from .frm file, so the table can be repaired even if .MYI header is corrupted.", + (gptr*) &opt_frm, (gptr*) &opt_frm, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, + 0}, {"verbose", 'v', "Print info about the various stages.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; - + static const char *load_default_groups[] = { "mysqlcheck", "client", 0 }; @@ -223,7 +227,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), opt_password = my_strdup(argument, MYF(MY_FAE)); while (*argument) *argument++= 'x'; /* Destroy argument */ if (*start) - start[1] = 0; /* Cut length of argument */ + start[1] = 0; /* Cut length of argument */ } else tty_password = 1; @@ -452,6 +456,7 @@ static int handle_request_for_tables(char *tables, uint length) op = "REPAIR"; if (opt_quick) end = strmov(end, " QUICK"); if (opt_extended) end = strmov(end, " EXTENDED"); + if (opt_frm) end = strmov(end, " USE_FRM"); break; case DO_ANALYZE: op = "ANALYZE"; From f76bf0d9db956b10d149d86f843b7d9ff305eee3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 21:16:30 +0100 Subject: [PATCH 065/246] Delete: innobase/stamp-h.in --- innobase/stamp-h.in | 1 - 1 file changed, 1 deletion(-) delete mode 100644 innobase/stamp-h.in diff --git a/innobase/stamp-h.in b/innobase/stamp-h.in deleted file mode 100644 index 9788f70238c..00000000000 --- a/innobase/stamp-h.in +++ /dev/null @@ -1 +0,0 @@ -timestamp From 93b95819daba16ce6ac2d915f34bae3c51be939b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 22:22:23 +0100 Subject: [PATCH 066/246] corrected error message for OPTIMIZE/ANALYZE/etc, also for InnoDB that supports CHECK table but not REPAIR --- sql/share/czech/errmsg.txt | 2 +- sql/share/danish/errmsg.txt | 2 +- sql/share/dutch/errmsg.txt | 2 +- sql/share/english/errmsg.txt | 2 +- sql/share/estonian/errmsg.txt | 2 +- sql/share/french/errmsg.txt | 2 +- sql/share/german/errmsg.txt | 2 +- sql/share/greek/errmsg.txt | 2 +- sql/share/hungarian/errmsg.txt | 2 +- sql/share/italian/errmsg.txt | 2 +- sql/share/japanese/errmsg.txt | 2 +- sql/share/korean/errmsg.txt | 2 +- sql/share/norwegian-ny/errmsg.txt | 2 +- sql/share/norwegian/errmsg.txt | 2 +- sql/share/polish/errmsg.txt | 2 +- sql/share/portuguese/errmsg.txt | 2 +- sql/share/romanian/errmsg.txt | 2 +- sql/share/russian/errmsg.txt | 2 +- sql/share/slovak/errmsg.txt | 2 +- sql/share/spanish/errmsg.txt | 2 +- sql/share/swedish/errmsg.txt | 2 +- sql/share/ukrainian/errmsg.txt | 2 +- sql/sql_table.cc | 9 +++++++-- 23 files changed, 29 insertions(+), 24 deletions(-) diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 18b32447dc9..b69484cb38b 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -188,7 +188,7 @@ "Update tabulky bez WHERE s kl-Bíèem není v módu bezpeèných update dovoleno", "Kl-Bíè '%-.64s' v tabulce '%-.64s' neexistuje", "Nemohu otev-Bøít tabulku", -"Handler tabulky nepodporuje check/repair", +"Handler tabulky nepodporuje %s", "Proveden-Bí tohoto pøíkazu není v transakci dovoleno", "Chyba %d p-Bøi COMMIT", "Chyba %d p-Bøi ROLLBACK", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index d6528753195..ccbc53a0d29 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -182,7 +182,7 @@ "Du bruger sikker opdaterings modus ('safe update mode') og du forsøgte at opdatere en tabel uden en WHERE klausul, der gør brug af et KEY felt", "Nøglen '%-.64s' eksisterer ikke i tabellen '%-.64s'", "Kan ikke åbne tabellen", -"Denne tabeltype understøtter ikke CHECK/REPAIR", +"Denne tabeltype understøtter ikke %s", "Du må ikke bruge denne kommando i en transaktion", "Modtog fejl %d mens kommandoen COMMIT blev udført", "Modtog fejl %d mens kommandoen ROLLBACK blev udført", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 514b4ee0780..7fce0c7b4f9 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -190,7 +190,7 @@ "U gebruikt 'safe update mode' en u probeerde een tabel te updaten zonder een WHERE met een KEY kolom", "Zoeksleutel '%-.64s' bestaat niet in tabel '%-.64s'", "Kan tabel niet openen", -"De 'handler' voor de tabel ondersteund geen check/repair", +"De 'handler' voor de tabel ondersteund geen %s", "Het is u niet toegestaan dit commando uit te voeren binnen een transactie", "Kreeg fout %d tijdens COMMIT", "Kreeg fout %d tijdens ROLLBACK", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 0999dce5712..105cf90ca7d 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -179,7 +179,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index f160be03e89..d0a30b2f434 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -184,7 +184,7 @@ "Katse muuta tabelit turvalises rezhiimis ilma WHERE klauslita", "Võti '%-.64s' ei eksisteeri tabelis '%-.64s'", "Ei suuda avada tabelit", -"Antud tabelitüüp ei toeta CHECK/REPAIR käske", +"Antud tabelitüüp ei toeta %s käske", "Seda käsku ei saa kasutada transaktsiooni sees", "Viga %d käsu COMMIT täitmisel", "Viga %d käsu ROLLBACK täitmisel", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index c8d92d72b5f..ab1761ca042 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -179,7 +179,7 @@ "Vous êtes en mode 'safe update' et vous essayez de faire un UPDATE sans clause WHERE utilisant un index", "L'index '%-.64s' n'existe pas sur la table '%-.64s'", "Impossible d'ouvrir la table", -"Ce type de table ne supporte pas les check/repair", +"Ce type de table ne supporte pas les %s", "Vous n'êtes pas autorisé à exécute cette commande dans une transaction", "Erreur %d lors du COMMIT", "Erreur %d lors du ROLLBACK", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 6de6e911cd0..a99aea38563 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -182,7 +182,7 @@ "Unter Verwendung des Sicheren Updatemodes wurde versucht eine Tabelle zu updaten ohne eine KEY-Spalte in der WHERE-Klausel", "Schlüssel '%-.64s' existiert nicht in der Tabelle '%-.64s'", "Kann Tabelle nicht öffnen", -"Der Tabellen-Handler für diese Tabelle unterstützt kein check/repair", +"Der Tabellen-Handler für diese Tabelle unterstützt kein %s", "Keine Berechtigung dieses Kommando in einer Transaktion auszuführen", "Fehler %d wärend COMMIT", "Fehler %d wärend ROLLBACK", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index 6a58bfb6ea8..554176e340b 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -179,7 +179,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 8da5eb6d8d6..32333ce4439 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -181,7 +181,7 @@ "On a biztonsagos update modot hasznalja, es WHERE that uses a KEY column", "A '%-.64s' kulcs nem letezik a '%-.64s' tablaban", "Nem tudom megnyitni a tablat", -"A tabla kezeloje (handler) nem tamogatja az ellenorzest/helyreallitast", +"A tabla kezeloje (handler) nem tamogatja az %s", "Az On szamara nem engedelyezett a parancs vegrehajtasa a tranzakcioban", "%d hiba a COMMIT vegrehajtasa soran", "%d hiba a ROLLBACK vegrehajtasa soran", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 0aa2ce07545..4dd7b02de4e 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -179,7 +179,7 @@ "In modalita` 'safe update' si e` cercato di aggiornare una tabella senza clausola WHERE su una chiave", "La chiave '%-.64s' non esiste nella tabella '%-.64s'", "Impossibile aprire la tabella", -"Il gestore per la tabella non supporta il controllo/riparazione", +"Il gestore per la tabella non supporta il %s", "Non puoi eseguire questo comando in una transazione", "Rilevato l'errore %d durante il COMMIT", "Rilevato l'errore %d durante il ROLLBACK", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index e81feded9d7..663676e0cf3 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -181,7 +181,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 45d049e2545..da1ee97f6b6 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -179,7 +179,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 6fd054fa5f2..bc334ace9f1 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -181,7 +181,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index a241a99b179..e7f54549462 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -181,7 +181,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 7184acf2495..0e92bf2f9b8 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -183,7 +183,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index e5de0d85b03..6f4f86f9024 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -179,7 +179,7 @@ "Você está usando modo de atualização seguro e tentou atualizar uma tabela sem uma cláusula WHERE que use uma coluna chave", "Chave '%-.64s' não existe na tabela '%-.64s'", "Não pode abrir a tabela", -"O manipulador de tabela não suporta checagem/reparação (check/repair)", +"O manipulador de tabela não suporta %s", "Não lhe é permitido executar este comando em uma transação", "Obteve erro %d durante COMMIT", "Obteve erro %d durante ROLLBACK", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 406c1ba3c70..b888a2bc8cd 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -183,7 +183,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index ec6f7d2818c..0329f760e38 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -182,7 +182,7 @@ "MySQL ÒÁÂÏÔÁÅÔ × ÒÅÖÉÍÅ ÚÁÝÉÔÙ ÏÔ ÄÕÒÁËÏ× (safe_mode) - ÎÅ ÍÏÇÕ UPDATE ÂÅÚ WHERE Ó ËÁËÉÍ-ÎÅÂÕÄØ KEY", "éÎÄÅËÓ '%-.64s' ÎÅ ÎÁÊÄÅÎ × ÔÁÂÌÉÃÅ '%-.64s'", "îÅ ÍÏÇÕ ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ", -"äÁÎÎÙÊ ÔÉÐ ÔÁÂÌÉà ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ check/repair", +"äÁÎÎÙÊ ÔÉÐ ÔÁÂÌÉà ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ËÏÍÁÎÄÕ %s", "üÔÁ ËÏÍÁÎÄÁ ×ÎÕÔÒÉ ÔÒÁÎÚÁËÃÉÉ ÚÁÐÒÅÝÅÎÁ", "ïÛÉÂËÁ %d ×Ï ×ÒÅÍÑ COMMIT", "ïÛÉÂËÁ %d ×Ï ×ÒÅÍÑ ROLLBACK", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 2e14be90bc0..1dd696affb0 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -187,7 +187,7 @@ "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", "Key '%-.64s' doesn't exist in table '%-.64s'", "Can't open table", -"The handler for the table doesn't support check/repair", +"The handler for the table doesn't support %s", "You are not allowed to execute this command in a transaction", "Got error %d during COMMIT", "Got error %d during ROLLBACK", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index fb1ab3c9b7d..c91726a6557 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -180,7 +180,7 @@ "Tu estás usando modo de actualización segura y tentado actualizar una tabla sin un WHERE que usa una KEY columna", "Clave '%-.64s' no existe en la tabla '%-.64s'", "No puedo abrir tabla", -"El manipulador de la tabla no permite soporte para check/repair", +"El manipulador de la tabla no permite soporte para %s", "No tienes el permiso para ejecutar este comando en una transición", "Obtenido error %d durante COMMIT", "Obtenido error %d durante ROLLBACK", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 1a352f16225..5b7ed499038 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -179,7 +179,7 @@ "Du använder 'säker uppdaterings mod' och försökte uppdatera en table utan en WHERE sats som använder sig av en nyckel", "Nyckel '%-.64s' finns inte in tabell '%-.64s'", "Kan inte öppna tabellen", -"Tabellhanteraren för denna tabell kan inte göra check/repair", +"Tabellhanteraren för denna tabell kan inte göra %s", "Du får inte utföra detta kommando i en transaktion", "Fick fel %d vid COMMIT", "Fick fel %d vid ROLLBACK", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 3a8a1abc429..6eeefa11ff2 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -184,7 +184,7 @@ "÷É Õ ÒÅÖÉͦ ÂÅÚÐÅÞÎÏÇÏ ÏÎÏ×ÌÅÎÎÑ ÔÁ ÎÁÍÁÇÁ¤ÔÅÓØ ÏÎÏ×ÉÔÉ ÔÁÂÌÉÃÀ ÂÅÚ ÏÐÅÒÁÔÏÒÁ WHERE, ÝÏ ×ÉËÏÒÉÓÔÏ×Õ¤ KEY ÓÔÏ×ÂÅÃØ", "ëÌÀÞ '%-.64s' ÎÅ ¦ÓÎÕ¤ × ÔÁÂÌÉæ '%-.64s'", "îÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ ÔÁÂÌÉÃÀ", -"÷ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕÅ ÐÅÒÅצÒËÕ/צÄÎÏ×ÌÅÎÎÑ", +"÷ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕÅ %s", "÷ÁÍ ÎÅ ÄÏÚ×ÏÌÅÎÏ ×ÉËÏÎÕ×ÁÔÉ ÃÀ ËÏÍÁÎÄÕ × ÔÒÁÎÚÁËæ§", "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d Ð¦Ä ÞÁÓ COMMIT", "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d Ð¦Ä ÞÁÓ ROLLBACK", diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 36aa31e7553..1e7614ccc95 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1167,8 +1167,13 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables, switch (result_code) { case HA_ADMIN_NOT_IMPLEMENTED: - net_store_data(packet, "error"); - net_store_data(packet, ER(ER_CHECK_NOT_IMPLEMENTED)); + { + char buf[ERRMSGSIZE+20]; + my_snprintf(buf, ERRMSGSIZE, + ER(ER_CHECK_NOT_IMPLEMENTED), operator_name); + net_store_data(packet, "error"); + net_store_data(packet, buf); + } break; case HA_ADMIN_OK: From 36f5ff834d62723e5a0e50b52ccb6cef157a276f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 22:45:31 +0100 Subject: [PATCH 067/246] fixed test for "root", on some installations / is mounted read-only --- scripts/mysqld_safe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index f51eff6585f..2cc11bb0979 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -204,7 +204,7 @@ else fi USER_OPTION="" -if test -w / +if test "x$USER" = "xroot" then if test "$user" != "root" -o $SET_USER = 1 then From 4a5097a4121dc40da85b3b1d751c9a0e242716b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 23:11:33 +0100 Subject: [PATCH 068/246] being tired to fix gone file in 4.0 after every pull from 3.23, I fixed it here --- BitKeeper/etc/gone | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index 6d4da9062d2..96afe34d5f3 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -164,9 +164,7 @@ BK|sql-bench/Results-linux/wisconsin-mysql_fast-Linux_2.2.13_SMP_alpha|197001010 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_i686_xeon|19700101030959|02044|3e820c28bf4af63a -BK|sql-bench/Results/ATIS-mysql-SunOS_5.5.1_sun4u|19700101030959|02031|dfb4c5f6b6db3b49 BK|sql-bench/Results/ATIS-mysql-SunOS_5.6_sun4m|19700101030959|02032|62028e0375b3b8b -BK|sql-bench/Results/ATIS-mysql-SunOS_5.7_sun4u|19700101030959|02034|be0d9789776c5ed7 BK|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02304|cbe120d860296d2f BK|sql-bench/Results/ATIS-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02027|a74e7b82d3908fa9 BK|sql-bench/Results/ATIS-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02313|8c6fc2968f78773 @@ -228,9 +226,7 @@ BK|sql-bench/Results/Attic/wisconsin-pg_fast-Linux_2.2.10_i686-cmp-mysql,pg|1970 BK|sql-bench/Results/RUN-mysql-Linux_2.2.10_i686|19700101030959|02041|712f52be5d195406 BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02038|8ee87b26b91c86fe BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_i686_xeon|19700101030959|02055|17854e751e1d9d1d -BK|sql-bench/Results/RUN-mysql-SunOS_5.5.1_sun4u|19700101030959|02058|afbba182428e20df BK|sql-bench/Results/RUN-mysql-SunOS_5.6_sun4m|19700101030959|02059|eafc8188345e262b -BK|sql-bench/Results/RUN-mysql-SunOS_5.7_sun4u|19700101030959|02061|86e1dc0e25a8b8f BK|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02310|a902e1a967d79c42 BK|sql-bench/Results/RUN-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02030|413ab3b8a99e61e9 BK|sql-bench/Results/RUN-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02046|a910a9b3fde431e1 @@ -238,9 +234,7 @@ BK|sql-bench/Results/RUN-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02165|e0f0 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.10_i686|19700101030959|02081|93b78a85b720a186 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02314|4ae4b989301df98b BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_i686_xeon|19700101030959|02057|64cc4b874cd6fabf -BK|sql-bench/Results/alter-table-mysql-SunOS_5.5.1_sun4u|19700101030959|02087|9d7e75667fcb29ec BK|sql-bench/Results/alter-table-mysql-SunOS_5.6_sun4m|19700101030959|02088|8a1bd6589a189890 -BK|sql-bench/Results/alter-table-mysql-SunOS_5.7_sun4u|19700101030959|02090|ce74c2f623d3bb3 BK|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02316|1390155aad5b6e86 BK|sql-bench/Results/alter-table-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02317|9090bebb62ef164b BK|sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02094|4e02d36dc17ecbfa @@ -248,9 +242,7 @@ BK|sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02 BK|sql-bench/Results/big-tables-mysql-Linux_2.2.10_i686|19700101030959|02109|99daa1c5370d077d BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02315|2804ec3c95be436a BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_i686_xeon|19700101030959|02074|290c2c3de9d8e6b -BK|sql-bench/Results/big-tables-mysql-SunOS_5.5.1_sun4u|19700101030959|02115|7d7b6c0bf58b9b79 BK|sql-bench/Results/big-tables-mysql-SunOS_5.6_sun4m|19700101030959|02116|f351a7f3e1e2257e -BK|sql-bench/Results/big-tables-mysql-SunOS_5.7_sun4u|19700101030959|02118|ebc379b231312bbe BK|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02318|c5eabcb89ceac698 BK|sql-bench/Results/big-tables-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02319|856d503725373684 BK|sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02122|a442a8aff47fae20 @@ -258,9 +250,7 @@ BK|sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|022 BK|sql-bench/Results/connect-mysql-Linux_2.2.10_i686|19700101030959|02137|c92505d77e19d5ec BK|sql-bench/Results/connect-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02084|e7e2959b7387251f BK|sql-bench/Results/connect-mysql-Linux_2.2.14_i686_xeon|19700101030959|02071|ea19dc3ec55b3618 -BK|sql-bench/Results/connect-mysql-SunOS_5.5.1_sun4u|19700101030959|02142|a9493110fe62e0b1 BK|sql-bench/Results/connect-mysql-SunOS_5.6_sun4m|19700101030959|02143|a10e3ddfa26a3e7f -BK|sql-bench/Results/connect-mysql-SunOS_5.7_sun4u|19700101030959|02145|c67beb9e9d2cf32e BK|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02320|ce69cc65bc827b5c BK|sql-bench/Results/connect-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02066|f801e08429a4f7c6 BK|sql-bench/Results/connect-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02086|1d95d36fd717990 @@ -268,9 +258,7 @@ BK|sql-bench/Results/connect-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02244| BK|sql-bench/Results/create-mysql-Linux_2.2.10_i686|19700101030959|02161|9e7822f66df6aa76 BK|sql-bench/Results/create-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02102|34ded91c5fc25de9 BK|sql-bench/Results/create-mysql-Linux_2.2.14_i686_xeon|19700101030959|02139|50d15991293030ef -BK|sql-bench/Results/create-mysql-SunOS_5.5.1_sun4u|19700101030959|02166|bbb5de66fc56de7b BK|sql-bench/Results/create-mysql-SunOS_5.6_sun4m|19700101030959|02221|9233114ae6f8c5f -BK|sql-bench/Results/create-mysql-SunOS_5.7_sun4u|19700101030959|02223|7ee13bfcafeab498 BK|sql-bench/Results/create-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02321|e985e71d552ff09e BK|sql-bench/Results/create-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02099|483dcf223d5abf81 BK|sql-bench/Results/create-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02112|a140e5e229a53b7b @@ -278,9 +266,7 @@ BK|sql-bench/Results/create-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02246|1 BK|sql-bench/Results/insert-mysql-Linux_2.2.10_i686|19700101030959|02242|763edf9aec633f51 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02130|5be3d6f299738a31 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_i686_xeon|19700101030959|02141|c683ee4b9d214298 -BK|sql-bench/Results/insert-mysql-SunOS_5.5.1_sun4u|19700101030959|02247|8a9ae41f9a79f79 BK|sql-bench/Results/insert-mysql-SunOS_5.6_sun4m|19700101030959|02248|3402d060ae20e19 -BK|sql-bench/Results/insert-mysql-SunOS_5.7_sun4u|19700101030959|02250|78efa132c6e252b9 BK|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02322|ed252140ff399961 BK|sql-bench/Results/insert-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02114|29a3b8a1ca8aa9d BK|sql-bench/Results/insert-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02148|e65dd14f2ed9abbf @@ -288,9 +274,7 @@ BK|sql-bench/Results/insert-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02259|b BK|sql-bench/Results/select-mysql-Linux_2.2.10_i686|19700101030959|02268|a2e264d777b787d BK|sql-bench/Results/select-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02227|308117295c3bc096 BK|sql-bench/Results/select-mysql-Linux_2.2.14_i686_xeon|19700101030959|02152|ead3f11b46ac626f -BK|sql-bench/Results/select-mysql-SunOS_5.5.1_sun4u|19700101030959|02273|c9a1a498a052e268 BK|sql-bench/Results/select-mysql-SunOS_5.6_sun4m|19700101030959|02274|4da215905bce988d -BK|sql-bench/Results/select-mysql-SunOS_5.7_sun4u|19700101030959|02276|632c92971c61e34a BK|sql-bench/Results/select-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02323|e8c0871a668a610d BK|sql-bench/Results/select-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02127|963a98ed526e2be4 BK|sql-bench/Results/select-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02254|f9ab7726ff14ea90 @@ -298,9 +282,7 @@ BK|sql-bench/Results/select-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02261|1 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.10_i686|19700101030959|02288|301a82b12a84922b BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02280|d01900af34fb33b8 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_i686_xeon|19700101030959|02154|7525b23938631801 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.5.1_sun4u|19700101030959|02297|379705afa2e12378 BK|sql-bench/Results/wisconsin-mysql-SunOS_5.6_sun4m|19700101030959|02298|ec61b14072715dc8 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.7_sun4u|19700101030959|02300|f27927f8c64ea8ad BK|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02324|ec075a89dbdbbe6a BK|sql-bench/Results/wisconsin-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02325|233d5aa529979990 BK|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02295|ec361eee4f4128cd @@ -368,37 +350,18 @@ mwagner@evoq.home.mwagner.org|mysql-test/var/lib/README|20001009213643|15351|3b6 mwagner@evoq.home.mwagner.org|mysql-test/var/log/README|20001009213643|16203|df5481fdbe6e5b6e mwagner@evoq.home.mwagner.org|mysql-test/var/run/README|20001009213643|17062|acb305e4c2ed5990 mwagner@evoq.home.mwagner.org|mysql-test/var/tmp/README|20001009213643|17904|b32d866bfd50e72e -mwagner@work.mysql.com|mysql-test/r/3.23/sel000001.result|20001010091454|28284|383913ae4505ec86 -mwagner@work.mysql.com|mysql-test/r/3.23/sel000002.result|20001010091454|29230|d1787e6fd5dbc1cc sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554 sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce -sasha@mysql.sashanet.com|mysql-test/README.gcov|20001214012355|41825|2de7575ca81155e5 sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5 sasha@mysql.sashanet.com|mysql-test/r/3.23/alt000001.result|20001122072330|24729|393103dbf15f35c9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/ins000001.result|20001018175743|49824|f45c599efdf8352b sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.a.result|20001118063528|39426|2987b17db06808c3 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.b.result|20001118063528|44057|62e1fa91167cacc3 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000002.result|20001118063528|46039|109f5ceed1e0d64 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000003.result|20001118063528|48148|68d6ee00beaa011 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.a.result|20001118063528|50132|3415f066cb91c460 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|52094|352b35351551485 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000005.result|20001118063528|54071|a50962bc2340ab9a -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000006.result|20001118063528|56081|5653051e8ce6b4aa -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000007.result|20001121063807|21606|e0c3b6134e0884da -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000008.result|20001121063807|23636|c5cfee19ca5a7da9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000009.result|20001121063807|25633|ed8042446ab97926 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000010.result|20001122072330|29430|3228109b8965b0f8 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000011.result|20001125024912|48851|c29dce30aa97f265 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.result|20001126062901|05938|35d6596da7b90fc5 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.result|20001202171150|03876|ac5024e6cf6daac6 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000003.result|20001011230020|64653|d7b657b1e3a286a7 -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000100.res|20001205131218|23520|84ed46856cb3a69f sasha@mysql.sashanet.com|mysql-test/r/3.23/shw000001.result|20001121234128|16652|8b20b03d8319b9a5 -sasha@mysql.sashanet.com|mysql-test/r/slave-running.result|20001208141122|24303|f73e49462cf59e1f -sasha@mysql.sashanet.com|mysql-test/r/slave-stopped.result|20001208141122|28916|25c134b1a4f1993a sasha@mysql.sashanet.com|mysql-test/std_data/select-key.master|20001009234916|07315|e6b83af25df0ce5 sasha@mysql.sashanet.com|mysql-test/std_data/simple-select.master|20001009234916|08299|6f3eb98812926caf sasha@mysql.sashanet.com|mysql-test/t/3.23/select-key.test|20001009234859|21197|5d785cef5c02c070 From 811e225933dece01ede7d3b9acb98159b207345b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 23:24:38 +0100 Subject: [PATCH 069/246] fixing gone file ONCE AGAIN --- BitKeeper/etc/gone | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index 6d4da9062d2..96afe34d5f3 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -164,9 +164,7 @@ BK|sql-bench/Results-linux/wisconsin-mysql_fast-Linux_2.2.13_SMP_alpha|197001010 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_i686_xeon|19700101030959|02044|3e820c28bf4af63a -BK|sql-bench/Results/ATIS-mysql-SunOS_5.5.1_sun4u|19700101030959|02031|dfb4c5f6b6db3b49 BK|sql-bench/Results/ATIS-mysql-SunOS_5.6_sun4m|19700101030959|02032|62028e0375b3b8b -BK|sql-bench/Results/ATIS-mysql-SunOS_5.7_sun4u|19700101030959|02034|be0d9789776c5ed7 BK|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02304|cbe120d860296d2f BK|sql-bench/Results/ATIS-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02027|a74e7b82d3908fa9 BK|sql-bench/Results/ATIS-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02313|8c6fc2968f78773 @@ -228,9 +226,7 @@ BK|sql-bench/Results/Attic/wisconsin-pg_fast-Linux_2.2.10_i686-cmp-mysql,pg|1970 BK|sql-bench/Results/RUN-mysql-Linux_2.2.10_i686|19700101030959|02041|712f52be5d195406 BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02038|8ee87b26b91c86fe BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_i686_xeon|19700101030959|02055|17854e751e1d9d1d -BK|sql-bench/Results/RUN-mysql-SunOS_5.5.1_sun4u|19700101030959|02058|afbba182428e20df BK|sql-bench/Results/RUN-mysql-SunOS_5.6_sun4m|19700101030959|02059|eafc8188345e262b -BK|sql-bench/Results/RUN-mysql-SunOS_5.7_sun4u|19700101030959|02061|86e1dc0e25a8b8f BK|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02310|a902e1a967d79c42 BK|sql-bench/Results/RUN-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02030|413ab3b8a99e61e9 BK|sql-bench/Results/RUN-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02046|a910a9b3fde431e1 @@ -238,9 +234,7 @@ BK|sql-bench/Results/RUN-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02165|e0f0 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.10_i686|19700101030959|02081|93b78a85b720a186 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02314|4ae4b989301df98b BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_i686_xeon|19700101030959|02057|64cc4b874cd6fabf -BK|sql-bench/Results/alter-table-mysql-SunOS_5.5.1_sun4u|19700101030959|02087|9d7e75667fcb29ec BK|sql-bench/Results/alter-table-mysql-SunOS_5.6_sun4m|19700101030959|02088|8a1bd6589a189890 -BK|sql-bench/Results/alter-table-mysql-SunOS_5.7_sun4u|19700101030959|02090|ce74c2f623d3bb3 BK|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02316|1390155aad5b6e86 BK|sql-bench/Results/alter-table-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02317|9090bebb62ef164b BK|sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02094|4e02d36dc17ecbfa @@ -248,9 +242,7 @@ BK|sql-bench/Results/alter-table-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02 BK|sql-bench/Results/big-tables-mysql-Linux_2.2.10_i686|19700101030959|02109|99daa1c5370d077d BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02315|2804ec3c95be436a BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_i686_xeon|19700101030959|02074|290c2c3de9d8e6b -BK|sql-bench/Results/big-tables-mysql-SunOS_5.5.1_sun4u|19700101030959|02115|7d7b6c0bf58b9b79 BK|sql-bench/Results/big-tables-mysql-SunOS_5.6_sun4m|19700101030959|02116|f351a7f3e1e2257e -BK|sql-bench/Results/big-tables-mysql-SunOS_5.7_sun4u|19700101030959|02118|ebc379b231312bbe BK|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02318|c5eabcb89ceac698 BK|sql-bench/Results/big-tables-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02319|856d503725373684 BK|sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02122|a442a8aff47fae20 @@ -258,9 +250,7 @@ BK|sql-bench/Results/big-tables-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|022 BK|sql-bench/Results/connect-mysql-Linux_2.2.10_i686|19700101030959|02137|c92505d77e19d5ec BK|sql-bench/Results/connect-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02084|e7e2959b7387251f BK|sql-bench/Results/connect-mysql-Linux_2.2.14_i686_xeon|19700101030959|02071|ea19dc3ec55b3618 -BK|sql-bench/Results/connect-mysql-SunOS_5.5.1_sun4u|19700101030959|02142|a9493110fe62e0b1 BK|sql-bench/Results/connect-mysql-SunOS_5.6_sun4m|19700101030959|02143|a10e3ddfa26a3e7f -BK|sql-bench/Results/connect-mysql-SunOS_5.7_sun4u|19700101030959|02145|c67beb9e9d2cf32e BK|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02320|ce69cc65bc827b5c BK|sql-bench/Results/connect-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02066|f801e08429a4f7c6 BK|sql-bench/Results/connect-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02086|1d95d36fd717990 @@ -268,9 +258,7 @@ BK|sql-bench/Results/connect-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02244| BK|sql-bench/Results/create-mysql-Linux_2.2.10_i686|19700101030959|02161|9e7822f66df6aa76 BK|sql-bench/Results/create-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02102|34ded91c5fc25de9 BK|sql-bench/Results/create-mysql-Linux_2.2.14_i686_xeon|19700101030959|02139|50d15991293030ef -BK|sql-bench/Results/create-mysql-SunOS_5.5.1_sun4u|19700101030959|02166|bbb5de66fc56de7b BK|sql-bench/Results/create-mysql-SunOS_5.6_sun4m|19700101030959|02221|9233114ae6f8c5f -BK|sql-bench/Results/create-mysql-SunOS_5.7_sun4u|19700101030959|02223|7ee13bfcafeab498 BK|sql-bench/Results/create-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02321|e985e71d552ff09e BK|sql-bench/Results/create-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02099|483dcf223d5abf81 BK|sql-bench/Results/create-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02112|a140e5e229a53b7b @@ -278,9 +266,7 @@ BK|sql-bench/Results/create-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02246|1 BK|sql-bench/Results/insert-mysql-Linux_2.2.10_i686|19700101030959|02242|763edf9aec633f51 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02130|5be3d6f299738a31 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_i686_xeon|19700101030959|02141|c683ee4b9d214298 -BK|sql-bench/Results/insert-mysql-SunOS_5.5.1_sun4u|19700101030959|02247|8a9ae41f9a79f79 BK|sql-bench/Results/insert-mysql-SunOS_5.6_sun4m|19700101030959|02248|3402d060ae20e19 -BK|sql-bench/Results/insert-mysql-SunOS_5.7_sun4u|19700101030959|02250|78efa132c6e252b9 BK|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02322|ed252140ff399961 BK|sql-bench/Results/insert-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02114|29a3b8a1ca8aa9d BK|sql-bench/Results/insert-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02148|e65dd14f2ed9abbf @@ -288,9 +274,7 @@ BK|sql-bench/Results/insert-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02259|b BK|sql-bench/Results/select-mysql-Linux_2.2.10_i686|19700101030959|02268|a2e264d777b787d BK|sql-bench/Results/select-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02227|308117295c3bc096 BK|sql-bench/Results/select-mysql-Linux_2.2.14_i686_xeon|19700101030959|02152|ead3f11b46ac626f -BK|sql-bench/Results/select-mysql-SunOS_5.5.1_sun4u|19700101030959|02273|c9a1a498a052e268 BK|sql-bench/Results/select-mysql-SunOS_5.6_sun4m|19700101030959|02274|4da215905bce988d -BK|sql-bench/Results/select-mysql-SunOS_5.7_sun4u|19700101030959|02276|632c92971c61e34a BK|sql-bench/Results/select-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02323|e8c0871a668a610d BK|sql-bench/Results/select-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02127|963a98ed526e2be4 BK|sql-bench/Results/select-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02254|f9ab7726ff14ea90 @@ -298,9 +282,7 @@ BK|sql-bench/Results/select-pg_fast-Linux_2.2.14_5.0_i686|19700101030959|02261|1 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.10_i686|19700101030959|02288|301a82b12a84922b BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02280|d01900af34fb33b8 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_i686_xeon|19700101030959|02154|7525b23938631801 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.5.1_sun4u|19700101030959|02297|379705afa2e12378 BK|sql-bench/Results/wisconsin-mysql-SunOS_5.6_sun4m|19700101030959|02298|ec61b14072715dc8 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.7_sun4u|19700101030959|02300|f27927f8c64ea8ad BK|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02324|ec075a89dbdbbe6a BK|sql-bench/Results/wisconsin-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02325|233d5aa529979990 BK|sql-bench/Results/wisconsin-pg_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02295|ec361eee4f4128cd @@ -368,37 +350,18 @@ mwagner@evoq.home.mwagner.org|mysql-test/var/lib/README|20001009213643|15351|3b6 mwagner@evoq.home.mwagner.org|mysql-test/var/log/README|20001009213643|16203|df5481fdbe6e5b6e mwagner@evoq.home.mwagner.org|mysql-test/var/run/README|20001009213643|17062|acb305e4c2ed5990 mwagner@evoq.home.mwagner.org|mysql-test/var/tmp/README|20001009213643|17904|b32d866bfd50e72e -mwagner@work.mysql.com|mysql-test/r/3.23/sel000001.result|20001010091454|28284|383913ae4505ec86 -mwagner@work.mysql.com|mysql-test/r/3.23/sel000002.result|20001010091454|29230|d1787e6fd5dbc1cc sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554 sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce -sasha@mysql.sashanet.com|mysql-test/README.gcov|20001214012355|41825|2de7575ca81155e5 sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5 sasha@mysql.sashanet.com|mysql-test/r/3.23/alt000001.result|20001122072330|24729|393103dbf15f35c9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/ins000001.result|20001018175743|49824|f45c599efdf8352b sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.a.result|20001118063528|39426|2987b17db06808c3 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.b.result|20001118063528|44057|62e1fa91167cacc3 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000002.result|20001118063528|46039|109f5ceed1e0d64 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000003.result|20001118063528|48148|68d6ee00beaa011 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.a.result|20001118063528|50132|3415f066cb91c460 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|52094|352b35351551485 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000005.result|20001118063528|54071|a50962bc2340ab9a -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000006.result|20001118063528|56081|5653051e8ce6b4aa -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000007.result|20001121063807|21606|e0c3b6134e0884da -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000008.result|20001121063807|23636|c5cfee19ca5a7da9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000009.result|20001121063807|25633|ed8042446ab97926 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000010.result|20001122072330|29430|3228109b8965b0f8 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000011.result|20001125024912|48851|c29dce30aa97f265 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.result|20001126062901|05938|35d6596da7b90fc5 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.result|20001202171150|03876|ac5024e6cf6daac6 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000003.result|20001011230020|64653|d7b657b1e3a286a7 -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000100.res|20001205131218|23520|84ed46856cb3a69f sasha@mysql.sashanet.com|mysql-test/r/3.23/shw000001.result|20001121234128|16652|8b20b03d8319b9a5 -sasha@mysql.sashanet.com|mysql-test/r/slave-running.result|20001208141122|24303|f73e49462cf59e1f -sasha@mysql.sashanet.com|mysql-test/r/slave-stopped.result|20001208141122|28916|25c134b1a4f1993a sasha@mysql.sashanet.com|mysql-test/std_data/select-key.master|20001009234916|07315|e6b83af25df0ce5 sasha@mysql.sashanet.com|mysql-test/std_data/simple-select.master|20001009234916|08299|6f3eb98812926caf sasha@mysql.sashanet.com|mysql-test/t/3.23/select-key.test|20001009234859|21197|5d785cef5c02c070 From 7ee75d7a9275b11df8878c5b6fbcd402d23120ba Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Nov 2002 23:34:17 +0100 Subject: [PATCH 070/246] fixed gone file ONCE AGAIN --- BitKeeper/etc/gone | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index 204044a2cc5..5f2b9e1209d 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -199,9 +199,7 @@ BK|sql-bench/Results/ATIS-mysql-3.21-Linux_2.2.1_i686|19700101030959|02022|660fb BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_i686_xeon|19700101030959|02044|3e820c28bf4af63a -BK|sql-bench/Results/ATIS-mysql-SunOS_5.5.1_sun4u|19700101030959|02031|dfb4c5f6b6db3b49 BK|sql-bench/Results/ATIS-mysql-SunOS_5.6_sun4m|19700101030959|02032|62028e0375b3b8b -BK|sql-bench/Results/ATIS-mysql-SunOS_5.7_sun4u|19700101030959|02034|be0d9789776c5ed7 BK|sql-bench/Results/ATIS-mysql_3.21-Linux_2.0.35_i686|19700101030959|02036|c25425e045ca8dfc BK|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02304|cbe120d860296d2f BK|sql-bench/Results/ATIS-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02027|a74e7b82d3908fa9 @@ -265,9 +263,7 @@ BK|sql-bench/Results/RUN-mysql-3.21-Linux_2.2.1_i686|19700101030959|02050|f6fdd6 BK|sql-bench/Results/RUN-mysql-Linux_2.2.10_i686|19700101030959|02041|712f52be5d195406 BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02038|8ee87b26b91c86fe BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_i686_xeon|19700101030959|02055|17854e751e1d9d1d -BK|sql-bench/Results/RUN-mysql-SunOS_5.5.1_sun4u|19700101030959|02058|afbba182428e20df BK|sql-bench/Results/RUN-mysql-SunOS_5.6_sun4m|19700101030959|02059|eafc8188345e262b -BK|sql-bench/Results/RUN-mysql-SunOS_5.7_sun4u|19700101030959|02061|86e1dc0e25a8b8f BK|sql-bench/Results/RUN-mysql_3.21-Linux_2.0.35_i686|19700101030959|02064|ea8672d8473435 BK|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02310|a902e1a967d79c42 BK|sql-bench/Results/RUN-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02030|413ab3b8a99e61e9 @@ -277,9 +273,7 @@ BK|sql-bench/Results/alter-table-mysql-3.21-Linux_2.2.1_i686|19700101030959|0207 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.10_i686|19700101030959|02081|93b78a85b720a186 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02314|4ae4b989301df98b BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_i686_xeon|19700101030959|02057|64cc4b874cd6fabf -BK|sql-bench/Results/alter-table-mysql-SunOS_5.5.1_sun4u|19700101030959|02087|9d7e75667fcb29ec BK|sql-bench/Results/alter-table-mysql-SunOS_5.6_sun4m|19700101030959|02088|8a1bd6589a189890 -BK|sql-bench/Results/alter-table-mysql-SunOS_5.7_sun4u|19700101030959|02090|ce74c2f623d3bb3 BK|sql-bench/Results/alter-table-mysql_3.21-Linux_2.0.35_i686|19700101030959|02092|762639f2560976bd BK|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02316|1390155aad5b6e86 BK|sql-bench/Results/alter-table-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02317|9090bebb62ef164b @@ -289,9 +283,7 @@ BK|sql-bench/Results/big-tables-mysql-3.21-Linux_2.2.1_i686|19700101030959|02106 BK|sql-bench/Results/big-tables-mysql-Linux_2.2.10_i686|19700101030959|02109|99daa1c5370d077d BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02315|2804ec3c95be436a BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_i686_xeon|19700101030959|02074|290c2c3de9d8e6b -BK|sql-bench/Results/big-tables-mysql-SunOS_5.5.1_sun4u|19700101030959|02115|7d7b6c0bf58b9b79 BK|sql-bench/Results/big-tables-mysql-SunOS_5.6_sun4m|19700101030959|02116|f351a7f3e1e2257e -BK|sql-bench/Results/big-tables-mysql-SunOS_5.7_sun4u|19700101030959|02118|ebc379b231312bbe BK|sql-bench/Results/big-tables-mysql_3.21-Linux_2.0.35_i686|19700101030959|02120|190e827e569c99a4 BK|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02318|c5eabcb89ceac698 BK|sql-bench/Results/big-tables-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02319|856d503725373684 @@ -301,9 +293,7 @@ BK|sql-bench/Results/connect-mysql-3.21-Linux_2.2.1_i686|19700101030959|02134|c0 BK|sql-bench/Results/connect-mysql-Linux_2.2.10_i686|19700101030959|02137|c92505d77e19d5ec BK|sql-bench/Results/connect-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02084|e7e2959b7387251f BK|sql-bench/Results/connect-mysql-Linux_2.2.14_i686_xeon|19700101030959|02071|ea19dc3ec55b3618 -BK|sql-bench/Results/connect-mysql-SunOS_5.5.1_sun4u|19700101030959|02142|a9493110fe62e0b1 BK|sql-bench/Results/connect-mysql-SunOS_5.6_sun4m|19700101030959|02143|a10e3ddfa26a3e7f -BK|sql-bench/Results/connect-mysql-SunOS_5.7_sun4u|19700101030959|02145|c67beb9e9d2cf32e BK|sql-bench/Results/connect-mysql_3.21-Linux_2.0.35_i686|19700101030959|02146|650abd213e6828c6 BK|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02320|ce69cc65bc827b5c BK|sql-bench/Results/connect-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02066|f801e08429a4f7c6 @@ -313,9 +303,7 @@ BK|sql-bench/Results/create-mysql-3.21-Linux_2.2.1_i686|19700101030959|02158|515 BK|sql-bench/Results/create-mysql-Linux_2.2.10_i686|19700101030959|02161|9e7822f66df6aa76 BK|sql-bench/Results/create-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02102|34ded91c5fc25de9 BK|sql-bench/Results/create-mysql-Linux_2.2.14_i686_xeon|19700101030959|02139|50d15991293030ef -BK|sql-bench/Results/create-mysql-SunOS_5.5.1_sun4u|19700101030959|02166|bbb5de66fc56de7b BK|sql-bench/Results/create-mysql-SunOS_5.6_sun4m|19700101030959|02221|9233114ae6f8c5f -BK|sql-bench/Results/create-mysql-SunOS_5.7_sun4u|19700101030959|02223|7ee13bfcafeab498 BK|sql-bench/Results/create-mysql_3.21-Linux_2.0.35_i686|19700101030959|02225|df1b037d17b33587 BK|sql-bench/Results/create-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02321|e985e71d552ff09e BK|sql-bench/Results/create-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02099|483dcf223d5abf81 @@ -325,9 +313,7 @@ BK|sql-bench/Results/insert-mysql-3.21-Linux_2.2.1_i686|19700101030959|02239|fd0 BK|sql-bench/Results/insert-mysql-Linux_2.2.10_i686|19700101030959|02242|763edf9aec633f51 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02130|5be3d6f299738a31 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_i686_xeon|19700101030959|02141|c683ee4b9d214298 -BK|sql-bench/Results/insert-mysql-SunOS_5.5.1_sun4u|19700101030959|02247|8a9ae41f9a79f79 BK|sql-bench/Results/insert-mysql-SunOS_5.6_sun4m|19700101030959|02248|3402d060ae20e19 -BK|sql-bench/Results/insert-mysql-SunOS_5.7_sun4u|19700101030959|02250|78efa132c6e252b9 BK|sql-bench/Results/insert-mysql_3.21-Linux_2.0.35_i686|19700101030959|02252|60c0965dff31db07 BK|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02322|ed252140ff399961 BK|sql-bench/Results/insert-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02114|29a3b8a1ca8aa9d @@ -337,9 +323,7 @@ BK|sql-bench/Results/select-mysql-3.21-Linux_2.2.1_i686|19700101030959|02265|ed3 BK|sql-bench/Results/select-mysql-Linux_2.2.10_i686|19700101030959|02268|a2e264d777b787d BK|sql-bench/Results/select-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02227|308117295c3bc096 BK|sql-bench/Results/select-mysql-Linux_2.2.14_i686_xeon|19700101030959|02152|ead3f11b46ac626f -BK|sql-bench/Results/select-mysql-SunOS_5.5.1_sun4u|19700101030959|02273|c9a1a498a052e268 BK|sql-bench/Results/select-mysql-SunOS_5.6_sun4m|19700101030959|02274|4da215905bce988d -BK|sql-bench/Results/select-mysql-SunOS_5.7_sun4u|19700101030959|02276|632c92971c61e34a BK|sql-bench/Results/select-mysql_3.21-Linux_2.0.35_i686|19700101030959|02278|5fadbac5f98696a BK|sql-bench/Results/select-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02323|e8c0871a668a610d BK|sql-bench/Results/select-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02127|963a98ed526e2be4 @@ -349,9 +333,7 @@ BK|sql-bench/Results/wisconsin-mysql-3.21-Linux_2.2.1_i686|19700101030959|02290| BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.10_i686|19700101030959|02288|301a82b12a84922b BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02280|d01900af34fb33b8 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_i686_xeon|19700101030959|02154|7525b23938631801 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.5.1_sun4u|19700101030959|02297|379705afa2e12378 BK|sql-bench/Results/wisconsin-mysql-SunOS_5.6_sun4m|19700101030959|02298|ec61b14072715dc8 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.7_sun4u|19700101030959|02300|f27927f8c64ea8ad BK|sql-bench/Results/wisconsin-mysql_3.21-Linux_2.0.35_i686|19700101030959|02302|31703d40ea6b4f66 BK|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02324|ec075a89dbdbbe6a BK|sql-bench/Results/wisconsin-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02325|233d5aa529979990 @@ -670,7 +652,6 @@ mwagner@evoq.home.mwagner.org|Docs/Books/prof.eps|20001231203220|15779|dc69b0395 mwagner@evoq.home.mwagner.org|Docs/Books/pthreads.eps|20001231203220|18899|d60ad51891ef4c49 mwagner@evoq.home.mwagner.org|Docs/Books/realmen.eps|20001231203220|22075|1ceb4839e835dad4 mwagner@evoq.home.mwagner.org|Docs/Books/sql-99.eps|20001231203220|25230|cec4ae16fee4c640 -mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b9394876 mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.res|20001014084759|41327|1295456b93948768 mwagner@evoq.home.mwagner.org|mysql-test/chew_on_this/select.tst|20001013104933|54568|2e626fa07144d2c8 mwagner@evoq.home.mwagner.org|mysql-test/mybin/start-mysqld|20001016055648|54840|9c8f21a7ab97793a @@ -745,8 +726,6 @@ mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000029.xml|20001017133713| mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000030.xml|20001017133600|63205|c2b25781eefaee9 mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/README|20001013051514|26509|cd4bb681e5a0cd10 mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/mysqltest.xsl|20001013051514|27425|1b8f6ec4f1b5f634 -mwagner@work.mysql.com|mysql-test/r/3.23/sel000001.result|20001010091454|28284|383913ae4505ec86 -mwagner@work.mysql.com|mysql-test/r/3.23/sel000002.result|20001010091454|29230|d1787e6fd5dbc1cc nick@nick.leippe.com|mysql-test/r/rpl_empty_master_crash.result|20020531235552|47718|615f521be2132141 nick@nick.leippe.com|mysql-test/t/rpl_empty_master_crash.test|20020531235552|52328|99464e737639ccc6 sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554 @@ -754,36 +733,19 @@ sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97 sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618 sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce -sasha@mysql.sashanet.com|mysql-test/README.gcov|20001214012355|41825|2de7575ca81155e5 sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5 sasha@mysql.sashanet.com|mysql-test/r/3.23/alt000001.result|20001122072330|24729|393103dbf15f35c9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/ins000001.result|20001018175743|49824|f45c599efdf8352b sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.a.result|20001118063528|39426|2987b17db06808c3 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.b.result|20001118063528|44057|62e1fa91167cacc3 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000002.result|20001118063528|46039|109f5ceed1e0d64 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000003.result|20001118063528|48148|68d6ee00beaa011 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.a.result|20001118063528|50132|3415f066cb91c460 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|52094|352b35351551485 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000005.result|20001118063528|54071|a50962bc2340ab9a -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000006.result|20001118063528|56081|5653051e8ce6b4aa -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000007.result|20001121063807|21606|e0c3b6134e0884da -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000008.result|20001121063807|23636|c5cfee19ca5a7da9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000009.result|20001121063807|25633|ed8042446ab97926 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000010.result|20001122072330|29430|3228109b8965b0f8 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000011.result|20001125024912|48851|c29dce30aa97f265 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.result|20001126062901|05938|35d6596da7b90fc5 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.result|20001202171150|03876|ac5024e6cf6daac6 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000003.result|20001011230020|64653|d7b657b1e3a286a7 -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000100.res|20001205131218|23520|84ed46856cb3a69f sasha@mysql.sashanet.com|mysql-test/r/3.23/shw000001.result|20001121234128|16652|8b20b03d8319b9a5 sasha@mysql.sashanet.com|mysql-test/r/binlog-backup-restore.result|20010424233926|16010|605de78abda64d27 sasha@mysql.sashanet.com|mysql-test/r/df_crash.result|20010406010433|59989|4a3dbee64843953d sasha@mysql.sashanet.com|mysql-test/r/identity.result|20010910233028|16331|e41453a364242503 sasha@mysql.sashanet.com|mysql-test/r/mrg000002.result|20001212152450|11492|745be0854aaaaf5e -sasha@mysql.sashanet.com|mysql-test/r/slave-running.result|20001208141122|24303|f73e49462cf59e1f -sasha@mysql.sashanet.com|mysql-test/r/slave-stopped.result|20001208141122|28916|25c134b1a4f1993a sasha@mysql.sashanet.com|mysql-test/std_data/m.MRG|20001212152450|17736|3f5632c37af00f18 sasha@mysql.sashanet.com|mysql-test/std_data/m.frm|20001212152450|13897|e351dfe0b6824c0c sasha@mysql.sashanet.com|mysql-test/std_data/select-key.master|20001009234916|07315|e6b83af25df0ce5 From b3a8b8bd193dc9b22b8d5bc28c894c49f6153647 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 09:51:03 +0200 Subject: [PATCH 071/246] Fixed bug in MAX() optimization when used with JOIN and ON expressions sql/item_cmpfunc.cc: Create an AND expression from two expressions sql/item_cmpfunc.h: Create an AND expression from two expressions --- mysql-test/r/group_by.result | 37 +++++++++++++++++++++++++++++++- mysql-test/t/group_by.test | 41 +++++++++++++++++++++++++++++++++++- sql/item_cmpfunc.cc | 39 ++++++++++++++++++++++++++++++++++ sql/item_cmpfunc.h | 3 +++ sql/opt_sum.cc | 13 ++++++++++++ 5 files changed, 131 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 95a272e7b4a..0e8c6520d5c 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; CREATE TABLE t1 ( spID int(10) unsigned, userID int(10) unsigned, @@ -417,3 +417,38 @@ xID xID1 Level 3 134 *** 4 185 **** drop table t1; +CREATE TABLE t1 ( +pid int(11) unsigned NOT NULL default '0', +c1id int(11) unsigned default NULL, +c2id int(11) unsigned default NULL, +value int(11) unsigned NOT NULL default '0', +UNIQUE KEY pid2 (pid,c1id,c2id), +UNIQUE KEY pid (pid,value) +) TYPE=MyISAM; +INSERT INTO t1 VALUES (1, 1, NULL, 1),(1, 2, NULL, 2),(1, NULL, 3, 3),(1, 4, NULL, 4),(1, 5, NULL, 5); +CREATE TABLE t2 ( +id int(11) unsigned NOT NULL default '0', +active enum('Yes','No') NOT NULL default 'Yes', +PRIMARY KEY (id) +) TYPE=MyISAM; +INSERT INTO t2 VALUES (1, 'Yes'),(2, 'No'),(4, 'Yes'),(5, 'No'); +CREATE TABLE t3 ( +id int(11) unsigned NOT NULL default '0', +active enum('Yes','No') NOT NULL default 'Yes', +PRIMARY KEY (id) +); +INSERT INTO t3 VALUES (3, 'Yes'); +select * from t1 AS m LEFT JOIN t2 AS c1 ON m.c1id = +c1.id AND c1.active = 'Yes' LEFT JOIN t3 AS c2 ON m.c2id = c2.id AND +c2.active = 'Yes' WHERE m.pid=1 AND (c1.id IS NOT NULL OR c2.id IS NOT NULL); +pid c1id c2id value id active id active +1 1 NULL 1 1 Yes NULL NULL +1 NULL 3 3 NULL NULL 3 Yes +1 4 NULL 4 4 Yes NULL NULL +select max(value) from t1 AS m LEFT JOIN t2 AS c1 ON +m.c1id = c1.id AND c1.active = 'Yes' LEFT JOIN t3 AS c2 ON m.c2id = +c2.id AND c2.active = 'Yes' WHERE m.pid=1 AND (c1.id IS NOT NULL OR c2.id IS +NOT NULL); +max(value) +4 +drop table t1,t2,t3; diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 072a1830f57..2f2f50c4085 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -2,7 +2,7 @@ # Test of group (Failed for Lars Hoss ) # -drop table if exists t1,t2; +drop table if exists t1,t2,t3; CREATE TABLE t1 ( spID int(10) unsigned, userID int(10) unsigned, @@ -312,3 +312,42 @@ insert into t1 values (1,244,NULL),(2,243,NULL),(134,223,NULL),(185,186,NULL); select S.ID as xID, S.ID1 as xID1 from t1 as S left join t1 as yS on S.ID1 between yS.ID1 and yS.ID2; select S.ID as xID, S.ID1 as xID1, repeat('*',count(distinct yS.ID)) as Level from t1 as S left join t1 as yS on S.ID1 between yS.ID1 and yS.ID2 group by xID order by xID1; drop table t1; + +# +# Problem with MAX and LEFT JOIN +# + +CREATE TABLE t1 ( + pid int(11) unsigned NOT NULL default '0', + c1id int(11) unsigned default NULL, + c2id int(11) unsigned default NULL, + value int(11) unsigned NOT NULL default '0', + UNIQUE KEY pid2 (pid,c1id,c2id), + UNIQUE KEY pid (pid,value) +) TYPE=MyISAM; + +INSERT INTO t1 VALUES (1, 1, NULL, 1),(1, 2, NULL, 2),(1, NULL, 3, 3),(1, 4, NULL, 4),(1, 5, NULL, 5); + +CREATE TABLE t2 ( + id int(11) unsigned NOT NULL default '0', + active enum('Yes','No') NOT NULL default 'Yes', + PRIMARY KEY (id) +) TYPE=MyISAM; + +INSERT INTO t2 VALUES (1, 'Yes'),(2, 'No'),(4, 'Yes'),(5, 'No'); + +CREATE TABLE t3 ( + id int(11) unsigned NOT NULL default '0', + active enum('Yes','No') NOT NULL default 'Yes', + PRIMARY KEY (id) +); +INSERT INTO t3 VALUES (3, 'Yes'); + +select * from t1 AS m LEFT JOIN t2 AS c1 ON m.c1id = +c1.id AND c1.active = 'Yes' LEFT JOIN t3 AS c2 ON m.c2id = c2.id AND +c2.active = 'Yes' WHERE m.pid=1 AND (c1.id IS NOT NULL OR c2.id IS NOT NULL); +select max(value) from t1 AS m LEFT JOIN t2 AS c1 ON +m.c1id = c1.id AND c1.active = 'Yes' LEFT JOIN t3 AS c2 ON m.c2id = +c2.id AND c2.active = 'Yes' WHERE m.pid=1 AND (c1.id IS NOT NULL OR c2.id IS +NOT NULL); +drop table t1,t2,t3; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index bf3c0af1ea6..3cd55934950 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1236,6 +1236,45 @@ longlong Item_cond_or::val_int() return 0; } +/* + Create an AND expression from two expressions + + SYNOPSIS + and_expressions() + a expression or NULL + b expression. + org_item Don't modify a if a == *org_item + If a == NULL, org_item is set to point at b, + to ensure that future calls will not modify b. + + NOTES + This will not modify item pointed to by org_item or b + The idea is that one can call this in a loop and create and + 'and' over all items without modifying any of the original items. + + RETURN + NULL Error + Item +*/ + +Item *and_expressions(Item *a, Item *b, Item **org_item) +{ + if (!a) + return (*org_item= (Item*) b); + if (a == *org_item) + { + Item_cond *res; + if ((res= new Item_cond_and(a, (Item*) b))) + res->used_tables_cache= a->used_tables() | b->used_tables(); + return res; + } + if (((Item_cond_and*) a)->add((Item*) b)) + return 0; + ((Item_cond_and*) a)->used_tables_cache|= b->used_tables(); + return a; +} + + longlong Item_func_isnull::val_int() { /* diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 214abff4b77..83035720df6 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -621,3 +621,6 @@ public: longlong val_int(); const char *func_name() const { return "xor"; } }; + + +Item *and_expressions(Item *a, Item *b, Item **org_item); diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 74e7b2ef3be..4b6a196051e 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -37,6 +37,19 @@ int opt_sum_query(TABLE_LIST *tables, List &all_fields,COND *conds) bool recalc_const_item=0; table_map removed_tables=0; Item *item; + COND *org_conds= conds; + + /* Add all ON conditions to WHERE condition */ + for (TABLE_LIST *tl=tables; tl ; tl= tl->next) + { + if (tl->on_expr) + conds= and_expressions(conds, tl->on_expr, &org_conds); + } + + /* + Iterate through item is select part and replace COUNT(), MIN() and MAX() + with constants (if possible) + */ while ((item= it++)) { From 212fe9d13ed51de7e858dedd2af71b115270af14 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 13:26:46 +0200 Subject: [PATCH 072/246] Portability fixes for HP compiler and HPUX11 Docs/internals.texi: Added protocol information (needs to be converted to texi and merged with the old documentation) configure.in: Updates for HP compiler (cc) include/my_global.h: Add option to handle bugs in 'inline' for HP compiler libmysql/password.c: Portability fix (for HP compiler) mysys/hash.c: Portability fix (for HP compiler) mysys/my_static.c: Portability fix (for HPUX11) mysys/my_static.h: Portability fix (for HPUX11) mysys/my_tempnam.c: Portability fix (for HPUX11) sql/sql_analyse.cc: Fixed bug in decimal handling --- Docs/internals.texi | 801 +++++++++++++++++++++++++++++++++++++++++++- configure.in | 10 + include/my_global.h | 4 + libmysql/password.c | 2 +- mysys/hash.c | 15 +- mysys/my_static.c | 2 +- mysys/my_static.h | 2 +- mysys/my_tempnam.c | 6 + sql/sql_analyse.cc | 2 +- 9 files changed, 831 insertions(+), 13 deletions(-) diff --git a/Docs/internals.texi b/Docs/internals.texi index 871e51c50bd..1f803f43a22 100644 --- a/Docs/internals.texi +++ b/Docs/internals.texi @@ -1,5 +1,5 @@ \input texinfo @c -*-texinfo-*- -@c Copyright 2002 MySQL AB, TcX AB, Detron HB and Monty Program KB +@c Copyright 2002 MySQL AB @c @c %**start of header @setfilename internals.info @@ -545,6 +545,8 @@ Print query. * basic packets:: * communication:: * fieldtype codes:: +* protocol functions:: +* protocol version 2:: @end menu @node raw packet without compression, raw packet with compression, protocol, protocol @@ -755,7 +757,7 @@ For details, see @file{sql/net_pkg.cc::send_ok()}. n data -@node fieldtype codes, , communication, protocol +@node fieldtype codes, protocol functions, communication, protocol @section Fieldtype Codes @example @@ -779,6 +781,797 @@ Time 03 08 00 00 |01 0B |03 00 00 00 Date 03 0A 00 00 |01 0A |03 00 00 00 @end example +@node protocol functions, protocol version 2, fieldtype codes, protocol +@section Functions used to implement the protocol + +This should be merged with the above one and changed to texi format + +Raw packets +----------- + +- The my_net_xxxx() functions handles the packaging of a stream of data + into a raw packet that contains a packet number, length and data. + +- This is implemented for the server in sql/net_serv.cc. + The client file, libmysql/net.c, is symlinked to this file + +The important functions are: + +my_net_write() Store a packet (= # number of bytes) to be sent +net_flush() Send the packets stored in the buffer +net_write_command() Send a command (1 byte) + packet to the server. +my_net_read() Read a packet + + +Include files +------------- + +- include/mysql.h is included by all MySQL clients. It includes the + MYSQL and MYSQL_RES structures. +- include/mysql_com.h is include by mysql.h and mysql_priv.h (the + server) and includes a lot of common functions and structures to + handle the client/server protocol. + + +Packets from server to client: +----------------------------- + +sql/net_pkg.cc: + + - Sending of error packets + - Sending of OK packets (= end of data) + - Storing of values in a packet + + +sql/sql_base.cc: + + - Function send_fields() sends the field description to the client. + +sql/sql_show.cc: + + - Sends results for a lot of SHOW commands, including: + SHOW DATABASES [like 'wildcard'] + SHOW TABLES [like 'wildcard'] + + +Packets from client to server: +------------------------------ + +This is done in libmysql/libmysql.c + +The important ones are: + +- mysql_real_connect() Connects to a mysqld server +- mysql_real_query() Sends a query to the server and + reads the ok packet or columns header. +- mysql_store_result() Read a result set from the server to memory +- mysql_use_result() Read a result set row by row from the server. + +- net_safe_read() Read a packet from the server with + error handling. +- net_field_length() Reads the length of a packet string. +- simple_command() Sends a command/query to the server. + + + +Connecting to mysqld (the MySQL server) +--------------------------------------- + +- On the client side: libmysql/libmysql.c::mysql_real_connect(). +- On the server side: sql/sql_parse.cc::check_connections() + +The packets sent during a connection are as follows + +Server: Send greeting package (includes server capabilites, server + version and a random string of bytes to be used to scramble + the password. +Client: Sends package with client capabilites, user name, scrambled + password, database name + +Server: Sends ok package or error package. + +Client: If init command specified, send it t the server and read + ok/error package. + + +Password functions +------------------ + +The passwords are scrambled to a random number and are stored in hex +format on the server. + +The password handling is done in sql/password.c. The important +function is 'scramble()', which takes the a password in clear text +and uses this to 'encrypt' the random string sent by the server +to a new message. + +The encrypted message is sent to the server which uses the stored +random number password to encrypt the random string sent to the +client. If this is equal to the new message the client sends to the +server then the password is accepted. + +@node protocol version 2, , protocol functions, protocol +@section Another description of the protocol + +This should be merged with the above one and changed to texi format. + +***************************** +* +* PROTOCOL OVERVIEW +* +***************************** + +The MySQL protocol is relatively simple, and is designed for high performance +through minimisation of overhead, and extensibility through versioning and +options flags. It is a request-response protocol, and does not allow +multitasking or multiplexing over a single connection. There are two packet +formats, 'raw' and 'compressed' (which is used when both client and +server support zlib compression, and the client requests that data be +compressed): + +* RAW PACKET, shorter than 16 M * + ++-----------------------------------------------+ +| Packet Length | Packet no | Data | +| 3 Bytes | 1 Byte | n Bytes | ++-----------------------------------------------+ +^ ^ +| 'HEADER' | ++-------------------------------+ + + + * Packet Length: Calculated with int3store. See include/global.h for + details. The basic computation is length = byte1 + + (256 * byte2) + (256 * 256 * byte3). The max packetsize + can be 16 MB. + + * Packet no: The packet number is incremented for each sent packet. + The first packet for each query from the client + starts with 0. + + * Data: Specific to the operation being performed. Most often + used to send string data, such as a SQL query. + +* COMPRESSED PACKET * + ++---------------------------------------------------+-----------------+ +| Packet Length | Packet no | Uncomp. Packet Length | Compressed Data | +| 3 Bytes | 1 Byte | 3 Bytes | n bytes | ++---------------------------------------------------+-----------------+ +^ ^ +| 'HEADER' | ++---------------------------------------------------+ + + * Packet Length: Calculated with int3store. See include/my_global.h for + details. The basic computation is length = byte1 + + (256 * byte2) + (256 * 256 * byte3). The max packetsize + can be 16 MB. + + * Packet no: The packet number is incremented for each sent packet. + The first packet starts with 0. + + * Uncomp. Packet Length: The length of the original, uncompressed packet + If this is zero then the data is not compressed. + + * Compressed Data: The original packet, compressed with zlib compression + + +When using the compressed protocol, the client/server will only compress +send packets where the new packet is smaller than the not compressed one. +In other words, some packets may be compressed while others will not. + +The 'compressed data' is one or more packets in *RAW PACKET* format. + +***************************** +* +* FLOW OF EVENTS +* +***************************** + +To understand how a client communicates with a MySQL server, it is easiest +to start with a high-level flow of events. Each event section will then be +followed by details of the exact contents of each type of packet involved +in the event flow. + +* * +* CONNECTION ESTABLISHMENT * +* * + +Clients connect to the server via a TCP/IP socket (port 3306 by default), a +Unix Domain Socket, or named pipes (on Windows). Once connected, the +following connection establishment sequence is followed: + ++--------+ +--------+ +| Client | | Server | ++--------+ +--------+ + | | + | Handshake initialisation, including MySQL server version, | + | protocol version and options supported, as well as the seed | + | for the password hash | + | | + | <-------------------------------------------------------------- | + | | + | Client options supported, max packet size for client | + | username, password crypted with seed from server, database | + | name. | + | | + | --------------------------------------------------------------> | + | | + | 'OK' packet if authentication succeeds, 'ERROR' packet if | + | authentication fails. | + | | + | <-------------------------------------------------------------- | + | | + + + +* HANDSHAKE INITIALISATION PACKET * + + ++--------------------------------------------------------------------+ +| Header | Prot. Version | Server Version String | 0x00 | +| | 1 Byte | n bytes | 1 byte | +|--------------------------------------------------------------------| +| Thread Number | Crypt Seed | 0x00 | CLIENT_xxx options | +| | | | supported by server | +| 4 Bytes | 8 Bytes | 1 Byte | 2 Bytes | +|--------------------------------------------------------------------| +| Server charset no. | Server status variables | 0x00 padding | +| 1 Byte | 2 Bytes | 13 bytes | ++--------------------------------------------------------------------+ + + * Protocol version (currently '10') + * Server Version String (e.g. '4.0.5-beta-log'). Can be any length as + it's followed by a 0 byte. + * Thread Number - ID of server thread handling this connection + * Crypt seed - seed used to crypt password in auth packet from client + * CLIENT_xxx options - see include/mysql_com.h + * Server charset no. - Index of charset in use by server + * Server status variables - see include/mysql_com.h + * The padding bytes are reserverd for future extensions to the protocol + +* CLIENT AUTH PACKET * + + ++--------------------------------------------------------------------+ +| Header | CLIENT_xxx options supported | max_allowed_packet | +| | by client | for client | +| | 2 Bytes | 3 bytes | +|--------------------------------------------------------------------| +| User Name | 0x00 | Crypted Password | 0x00 | Database Name | +| n Bytes | 1 Byte | 8 Bytes | 1 Byte | n Bytes | +|--------------------------------------------------------------------| +| 0x00 | +| 1 Byte | ++--------------------------------------------------------------------+ + + * CLIENT_xxx options that this client supports: + +#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */ +#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */ +#define CLIENT_LONG_FLAG 4 /* Get all column flags */ +#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */ +#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */ +#define CLIENT_COMPRESS 32 /* Can use compression protocol */ +#define CLIENT_ODBC 64 /* Odbc client */ +#define CLIENT_LOCAL_FILES 128 /* Can use LOAD DATA LOCAL */ +#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */ +#define CLIENT_INTERACTIVE 1024 /* This is an interactive client */ +#define CLIENT_SSL 2048 /* Switch to SSL after handshake */ +#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */ +#define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */ + + * max_allowed_packet for the client (in 'int3store' form) + * User Name - user to authenticate as. Is followed by a null byte. + * Crypted Password - password crypted with seed given in packet from + server, see scramble() in sql/password.c + * Database name (optional) - initial database to use once connected + Is followed by a null byte + +At the end of every client/server exchange there is either an 'OK' packet +or an 'ERROR' packet sent from the server. To determine whether a packet is +an 'OK' packet, or an 'ERROR' packet, check if the first byte (after the +header) is 0xFF. If it has the value of 0xFF, the packet is an 'ERROR' +packet. + + +* OK PACKET * + +For details, see sql/net_pkg.cc::send_ok() + ++-----------------------------------------------+ +| Header | No of Rows | Affected Rows | +| | 1 Byte | 1-9 Byte | +|-----------------------------------------------| +| ID (last_insert_id) | Status | Length | +| 1-9 Byte | 2 Byte | 1-9 Byte | +|-----------------------------------------------| +| Messagetext | +| n Byte | ++-----------------------------------------------+ + + * Number of rows, always 0 + * Affected rows + * ID (last_insert_id) - value for auto_increment column (if any) + * Status (usually 0) + +In general, in the MySQL protocol, fields in a packet that that +represent numeric data, such as lengths, that are labeled as '1-9' +bytes can be decoded by the following logic: + + If the first byte is '251', the + corresponding column value is NULL (only appropriate in + 'ROW DATA' packets). + + If the first byte is '252', the value stored can be read + from the following 2 bytes as a 16-bit integer. + + + If the first byte is '253' the value stored can be read + from the following 4 bytes as a 32-bit long integer + + + If the first byte is '254', the value stored can be read + from the following 8 bytes as a 64-byte long + + Otherwise (values 0-250), the value stored is the value of the + first byte itself. + + +If the OK-packet includes a message: + + * Length of message + * Message Text + + +* ERROR PACKET * + ++-----------------------------------------------+ +| Header | Status code | Error no | +| | 1 Byte | 2 Byte | +|-----------------------------------------------| +| Messagetext | | +| n Byte | | ++-----------------------------------------------+ + + * Status code (0xFF = ERROR) + * Error number (is only sent to 3.23 and newer clients) + * Error message text (ends at end of packet) + +Note that the error message is not null terminated. +The client code can however assume that the packet ends with a null +as my_net_read() will always add an end-null to all read packets to +make things easier for the client. + +Example: + +Packet dump of client connecting to server: + ++------------------------- Protocol Version (10) +| +| +---------------------- Server Version String (0x00 terminated) +| | +| | +0a 34 2e 30 2e 35 2d 62 . 4 . 0 . 5 - b +65 74 61 2d 6c 6f 67 00 e t a - l o g . +15 00 00 00 2b 5a 65 6c . . . . + Z e l + | | + | +------------ First 4 bytes of crypt seed + | + +------------------------ Thread Number + ++------------------------- Last 4 bytes of crypt seed +| +| +-------- CLIENT_XXX Options supported by server +| | +| +-+--+ +--- Server charset index +| | | | +6f 69 41 46 00 2c 28 08 o i A F . , ( . +02 00 00 00 00 00 00 00 . . . . . . . . +| | +| +---------------------- 0x00 padding begins +| ++------------------------- Server status (0x02 = + SERVER_STATUS_AUTOCOMMIT) + +00 00 00 00 00 00 00 00 . . . . . . . . + +* Client Authentication Response (Username 'test', no database + selected) * + + +--------------------- Packet Length (0x13 = 19 bytes) + | + | +--------------- Packet Sequence # + | | + | | +----------- CLIENT_XXX Options supported by client + | | ++---+---+ | +-+-+ +| | | | | +13 00 00 01 03 00 1e 00 . . . . . . . . +00 74 65 73 74 00 48 5e . t e s t . H ^ + | | | + +----+-----+ +------- Scrambled password, 0x00 terminated + | + +----------------- Username, 0x00 terminated + +57 4a 4e 41 4a 4e 00 00 W J N A J N . . +00 . + + +>From this point on, the server waits for 'commands' from the client +which include queries, database shutdown, quit, change user, etc (see +the COM_xxxx values in include/mysql_com.h for the latest +command codes). + +* * +* COMMAND PROCESSING * +* * + ++--------+ +--------+ +| Client | | Server | ++--------+ +--------+ + | | + | A command packet, with a command code, and string data | + | when appropriate (e.g. a query), (see the COM_xxxx values | + | in include/mysql_com.h for the command codes) | + | | + | --------------------------------------------------------------> | + | | + | A 'RESULT' packet if the command completed successfully, | + | an 'ERROR' packet if the command failed. 'RESULT' packets | + | take different forms (see the details following this chart) | + | depending on whether or not the command returns rows. | + | | + | <-------------------------------------------------------------- | + | | + | n 'FIELD PACKET's (if rows are returned) | + | | + | <-------------------------------------------------------------- | + | | + | 'LAST DATA' packet | + | | + | <-------------------------------------------------------------- | + | | + | n 'ROW PACKET's (if rows are returned) | + | | + | <-------------------------------------------------------------- | + | | + | 'LAST DATA' packet | + | | + | <-------------------------------------------------------------- | + | | + + +* Command Packet * + ++------------------------------------------------------+ +| Header | Command type | Query (if applicable) | +| | 1 Byte | n Bytes | ++------------------------------------------------------+ + + * Command type: (e.g.0x03 = query, see the COM_xxxx values in + include/mysql_com.h) + * Query (if applicable) + +Note that my_net_read() null-terminates all packets on the +receiving side of the channel to make it easier for the code +examining the packets. + +The current command codes are: + + 0x00 COM_SLEEP + 0x01 COM_QUIT + 0x02 COM_INIT_DB + 0x03 COM_QUERY + 0x04 COM_FIELD_LIST + 0x05 COM_CREATE_DB + 0x06 COM_DROP_DB + 0x07 COM_REFRESH + 0x08 COM_SHUTDOWN + 0x09 COM_STATISTICS + 0x0a COM_PROCESS_INFO + 0x0b COM_CONNECT + 0x0c COM_PROCESS_KILL + 0x0d COM_DEBUG + 0x0e COM_PING + 0x0f COM_TIME + 0x10 COM_DELAYED_INSERT + 0x11 COM_CHANGE_USER + 0x12 COM_BINLOG_DUMP + 0x13 COM_TABLE_DUMP + 0x14 COM_CONNECT_OUT + 0x15 COM_REGISTER_SLAVE + +* Result Packet * + +Result packet for a command returning _no_ rows: + ++-----------------------------------------------+ +| Header | Field Count | Affected Rows | +| | 1-9 Bytes | 1-9 Bytes | +|-----------------------------------------------| +| ID (last_insert_id) | Server Status | +| 1-9 Bytes | 2 Bytes | ++-----------------------------------------------+ + + * Field Count: Has value of '0' for commands returning _no_ rows + * Affected rows: Count of rows affected by INSERT/UPDATE/DELETE, etc. + * ID: value of auto_increment column in row (if any). 0 if + * Server Status: Usually 0 + +Result packet for a command returning rows: + ++-------------------------------+ +| Header | Field Count | +| | 1-9 Bytes | ++-------------------------------+ + + * Field Count: number of columns/fields in result set, + (packed with net_store_length() in sql/net_pkg.cc) + +This is followed by as many packets as the number of fields ('Field Count') +that contain the metadata for each column/field (see unpack_fields() in +libmysql/libmysql.c): + + +* FIELD PACKET * + ++-----------------------------------------------+ +| Header | Table Name | +| | length-coded-string | +|-----------------------------------------------| +| Field Name | +| length-code-string | +|-----------------------------------------------| +| Display length of field +| length-coded-binary (4 bytes) | +|-----------------------------------------------| +| Field Type (enum_field_types in mysql_com.h) | +| length-coded-binary (2 bytes) | +|-----------------------------------------------| +| Field Flags | Decimal Places| +| length-coded-binary (3 bytes) | 1 Byte | ++--------------+-------------+------------------+ + + * A length coded string is a string where we first have a packet + length (1-9 bytes, packed_with net_store_length()) followed + by a string. + * A length coded binary is a length (1 byte) followed by an integer + value in low-byte-first order. For the moment this type is always + fixed length in this packet. + + * Table Name - the name of the table the column comes from + * Field Name - the name of the column/field + * Display length of field - length of field + * Field Type - Type of field, see enum_field_types in + include/mysql_com.h + + Current field types are: + + 0x00 FIELD_TYPE_DECIMAL + 0x01 FIELD_TYPE_TINY + 0x02 FIELD_TYPE_SHORT + 0x03 FIELD_TYPE_LONG + 0x04 FIELD_TYPE_FLOAT + 0x05 FIELD_TYPE_DOUBLE + 0x06 FIELD_TYPE_NULL + 0x07 FIELD_TYPE_TIMESTAMP + 0x08 FIELD_TYPE_LONGLONG + 0x09 FIELD_TYPE_INT24 + 0x0a FIELD_TYPE_DATE + 0x0b FIELD_TYPE_TIME + 0x0c FIELD_TYPE_DATETIME + 0x0d FIELD_TYPE_YEAR + 0x0e FIELD_TYPE_NEWDATE + 0xf7 FIELD_TYPE_ENUM + 0xf8 FIELD_TYPE_SET + 0xf9 FIELD_TYPE_TINY_BLOB + 0xfa FIELD_TYPE_MEDIUM_BLOB + 0xfb FIELD_TYPE_LONG_BLOB + 0xfc FIELD_TYPE_BLOB + 0xfd FIELD_TYPE_VAR_STRING + 0xfe FIELD_TYPE_STRING + 0xff FIELD_TYPE_GEOMETRY + + * Field Flags - NOT_NULL_FLAG, PRI_KEY_FLAG, xxx_FLAG in + include/mysql_com.h + + +Note that the packet format in 4.1 has slightly changed to allow more values. + + +* ROW PACKET * + ++-----------------------------------------------+ +| Header | Data Length | Column Data | ....for each column +| | 1-9 Bytes | n Bytes | ++-----------------------------------------------+ + + * Data Length: (packed with net_store_length() in sql/net_pkg.cc) + + If 'Data Length' == 0, this is an 'ERROR PACKET'. + + * Column Data: String representation of data. MySQL always sends result set + data as strings. + +* LAST DATA PACKET * + +Packet length is < 9 bytes, and first byte is 0xFE + ++--------+ +| 0xFE | +| 1 Byte | ++--------+ + +Examples: + +*********** +* +* INITDB Command +* +*********** + +A client issuing an 'INITDB' (select the database to use) command, +followed by an 'OK' packet with no rows and no affected rows from +the server: + +* INITDB (select database to use) 'COMMAND' Packet * + + +--------------------- Packet Length (5 bytes) + | + | +--------------- Packet Sequence # + | | + | | +------------ Command # (INITDB = 0x02) + | | ++---+---+ | | +---------- Beginning of query data +| | | | | +05 00 00 00 02 74 65 73 . . . . . t e s +74 t + +* 'OK' Packet with no rows, and no rows affected * + + +--------------------- Packet Length (3 bytes) + | + | +--------------- Packet Sequence # + | | ++---+---+ | +| | | +03 00 00 01 00 00 00 . . . . . . . + + +*********** +* +* SELECT query example +* +*********** + +Client issuing a 'SELECT *' query on the following table: + + CREATE TABLE number_test (minBigInt bigint, + maxBigInt bigint, + testBigInt bigint) + +* 'COMMAND' Packet with QUERY (select ...) * + + +--------------------- Packet Length (26) + | + | +--------------- Packet Sequence # + | | + | | +------------ Command # (QUERY = 0x03) + | | ++---+---+ | | +---------- Beginning of query data +| | | | | +1a 00 00 00 03 53 45 4c . . . . . S E L +45 43 54 20 2a 20 66 72 E C T . * . f r +6f 6d 20 6e 75 6d 62 65 o m . n u m b e +72 5f 74 65 73 74 r _ t e s t + + +and receiving an 'OK' packet with a 'FIELD COUNT' of 3 + + +* 'OK' Packet with 3 fields * + + +--------------------- Packet Length (3 bytes) + | + | +--------------- Packet Sequence # + | | ++---+---+ | +| | | +01 00 00 01 03 . . . . . + +Followed immediately by 3 'FIELD' Packets. Note, the individual packets +are delimitted by =======, so that all fields can be annotated in the first +'FIELD' packet example: + +============================================================= + + +--------------------- Packet Length (0x1f = 31 bytes) + | + | +--------------- Packet Sequence # + | | + | | +------------ Block Length (0x0b = 11 bytes) + | | | ++---+---+ | | +--------- Table Name (11 bytes long) +| | | | | +1f 00 00 02 0b 6e 75 6d . . . . . n u m +62 65 72 5f 74 65 73 74 b e r _ t e s t + + +------------------------ Block Length (9 bytes) + | + | +--------------------- Column Name (9 bytes long) + | | +09 6d 69 6e 42 69 67 49 . m i n B i g I +6e 74 03 14 00 00 01 08 n t . . . . . . + | | | | | + | +---+---+ | +--- Field Type (0x08 = FIELD_TYPE_LONGLONG) + | | | + | | +------ Block Length (1) + | | + | +--------------- Display Length (0x14 = 20 chars) + | + +------------------ Block Length (3) + + +------------------------ Block Length (2) + | + | +-------------------- Field Flags (0 - no flags set) + | | + | +---+ +--------------- Decimal Places (0) + | | | | +02 00 00 00 . . . . + +============================================================= + +'FIELD' packet for the 'number_Test.maxBigInt' column + +1f 00 00 03 0b 6e 75 6d . . . . . n u m +62 65 72 5f 74 65 73 74 b e r _ t e s t +09 6d 61 78 42 69 67 49 . m a x B i g I +6e 74 03 14 00 00 01 08 n t . . . . . . +02 00 00 00 . . . . + +============================================================= + +'FIELD' packet for the 'number_test.testBigInt' column + +20 00 00 04 0b 6e 75 6d . . . . . n u m +62 65 72 5f 74 65 73 74 b e r _ t e s t +0a 74 65 73 74 42 69 67 . t e st B i g +49 6e 74 03 14 00 00 01 I n t . . . . . +08 02 00 00 00 . . . . . +============================================================= + +Followed immediately by one 'LAST DATA' packet: + +fe 00 . . + +Followed immediately by 'n' row packets (in this case, only +one packet is sent from the server, for simplicity's sake): + + + +--------------------- Packet Length (0x52 = 82 bytes) + | + | +--------------- Packet Sequence # + | | + | | +------------ Data Length (0x14 = 20 bytes) + | | | ++---+---+ | | +--------- String Data '-9223372036854775808' +| | | | | (repeat Data Length/Data sequence) + +52 00 00 06 14 2d 39 32 . . . . . - 9 2 +32 33 33 37 32 30 33 36 2 3 3 7 2 0 3 6 +38 35 34 37 37 35 38 30 8 5 4 7 7 5 8 0 +38 13 39 32 32 33 33 37 8 . 9 2 2 3 3 7 +32 30 33 36 38 35 34 37 2 0 3 6 8 5 4 7 +37 35 38 30 37 0a 36 31 7 5 8 0 7 . 6 1 +34 37 34 38 33 36 34 37 4 7 4 8 3 6 4 7 + +Followed immediately by one 'LAST DATA' packet: + +fe 00 . . + + + @c The Index was empty, and ugly, so I removed it. (jcole, Sep 7, 2000) @c @node Index @@ -794,10 +1587,10 @@ fulltext search algorithms. Now it's just unsorted notes. @menu -* Weighting in boolean mode:: +* Weighting in boolean mode:: @end menu -@node Weighting in boolean mode, , , Fulltext Search +@node Weighting in boolean mode, , Fulltext Search, Fulltext Search @section Weighting in boolean mode The basic idea is as follows: in expression diff --git a/configure.in b/configure.in index 61877c6b885..e4cf1d09dc5 100644 --- a/configure.in +++ b/configure.in @@ -934,6 +934,16 @@ case $SYSTEM_TYPE in echo "Using --with-named-thread=-lpthread" with_named_thread="-lpthread" fi + # Fixes for HPUX 11.0 compiler + if test "$ac_cv_prog_gcc" = "no" + then + CFLAGS="$CFLAGS +DD64 -DHAVE_BROKEN_INLINE" + CXXFLAGS="$CXXFLAGS +DD64" + if "$with_debug" = "no" + then + CXXFLAGS="$CXXFLAGS +O2" + fi + fi ;; *rhapsody*) if test "$ac_cv_prog_gcc" = "yes" diff --git a/include/my_global.h b/include/my_global.h index f356cb1646b..749a326f86f 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -141,6 +141,10 @@ C_MODE_END #undef HAVE_PREAD #undef HAVE_PWRITE #endif +#if defined(HAVE_BROKEN_INLINE) && !defined(__cplusplus) +#undef inline +#define inline +#endif #ifdef UNDEF_HAVE_GETHOSTBYNAME_R /* For OSF4.x */ #undef HAVE_GETHOSTBYNAME_R diff --git a/libmysql/password.c b/libmysql/password.c index 9b154603b98..1c2c5589215 100644 --- a/libmysql/password.c +++ b/libmysql/password.c @@ -91,7 +91,7 @@ void make_scrambled_password(char *to,const char *password) sprintf(to,"%08lx%08lx",hash_res[0],hash_res[1]); } -static inline uint char_val(char X) +static inline unsigned int char_val(char X) { return (uint) (X >= '0' && X <= '9' ? X-'0' : X >= 'A' && X <= 'Z' ? X-'A'+10 : diff --git a/mysys/hash.c b/mysys/hash.c index eaea6d7503f..3afd31a079b 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -82,7 +82,12 @@ void hash_free(HASH *hash) /* some helper functions */ -inline byte* +/* + This function is char* instead of byte* as HPUX11 compiler can't + handle inline functions that are not defined as native types +*/ + +inline char* hash_key(HASH *hash,const byte *record,uint *length,my_bool first) { if (hash->get_key) @@ -103,7 +108,7 @@ static uint hash_rec_mask(HASH *hash,HASH_LINK *pos,uint buffmax, uint maxlength) { uint length; - byte *key=hash_key(hash,pos->data,&length,0); + byte *key= (byte*) hash_key(hash,pos->data,&length,0); return hash_mask((*hash->calc_hashnr)(key,length),buffmax,maxlength); } @@ -180,10 +185,10 @@ uint calc_hashnr_caseup(const byte *key, uint len) #ifndef __SUNPRO_C /* SUNPRO can't handle this */ inline #endif -uint rec_hashnr(HASH *hash,const byte *record) +unsigned int rec_hashnr(HASH *hash,const byte *record) { uint length; - byte *key=hash_key(hash,record,&length,0); + byte *key= (byte*) hash_key(hash,record,&length,0); return (*hash->calc_hashnr)(key,length); } @@ -270,7 +275,7 @@ static void movelink(HASH_LINK *array,uint find,uint next_link,uint newlink) static int hashcmp(HASH *hash,HASH_LINK *pos,const byte *key,uint length) { uint rec_keylength; - byte *rec_key=hash_key(hash,pos->data,&rec_keylength,1); + byte *rec_key= (byte*) hash_key(hash,pos->data,&rec_keylength,1); return (length && length != rec_keylength) || (hash->flags & HASH_CASE_INSENSITIVE ? my_casecmp(rec_key,key,rec_keylength) : diff --git a/mysys/my_static.c b/mysys/my_static.c index 1eb6220f185..bbf7582a454 100644 --- a/mysys/my_static.c +++ b/mysys/my_static.c @@ -60,7 +60,7 @@ USED_MEM* my_once_root_block=0; /* pointer to first block */ uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */ /* from my_tempnam */ -#ifndef HAVE_TEMPNAM +#if !defined(HAVE_TEMPNAM) || defined(HPUX11) int _my_tempnam_used=0; #endif diff --git a/mysys/my_static.h b/mysys/my_static.h index 10b2e0fc2d2..c1893f4074f 100644 --- a/mysys/my_static.h +++ b/mysys/my_static.h @@ -65,7 +65,7 @@ extern const char *soundex_map; extern USED_MEM* my_once_root_block; extern uint my_once_extra; -#ifndef HAVE_TEMPNAM +#if !defined(HAVE_TEMPNAM) || defined(HPUX11) extern int _my_tempnam_used; #endif diff --git a/mysys/my_tempnam.c b/mysys/my_tempnam.c index 6c17aa5b165..4fa2dd2abc4 100644 --- a/mysys/my_tempnam.c +++ b/mysys/my_tempnam.c @@ -23,6 +23,12 @@ #include "mysys_priv.h" #include + +/* HPUX 11.0 doesn't allow us to change the environ pointer */ +#ifdef HPUX11 +#undef HAVE_TEMPNAM +#endif + #include "my_static.h" #include "mysys_err.h" diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index bbe82653190..96bbd731882 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -677,7 +677,7 @@ bool analyse::end_of_records() case FIELD_TYPE_DECIMAL: ans.append("DECIMAL", 7); // if item is FIELD_ITEM, it _must_be_ Field_num in this case - if (((Field_num*) (*f)->item)->zerofill) + if (((Field_num*) ((Item_field*) (*f)->item)->field)->zerofill) ans.append(" ZEROFILL"); break; default: From 52cc340c138cba9ba2502c725e6f04bcfff6a998 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 13:39:27 +0200 Subject: [PATCH 073/246] Small fix in configure for HPUX11 configure.in: Move +O2 up as with_debug wasn't defined at this point --- configure.in | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.in b/configure.in index e4cf1d09dc5..1bbb9fc68c5 100644 --- a/configure.in +++ b/configure.in @@ -938,11 +938,7 @@ case $SYSTEM_TYPE in if test "$ac_cv_prog_gcc" = "no" then CFLAGS="$CFLAGS +DD64 -DHAVE_BROKEN_INLINE" - CXXFLAGS="$CXXFLAGS +DD64" - if "$with_debug" = "no" - then - CXXFLAGS="$CXXFLAGS +O2" - fi + CXXFLAGS="$CXXFLAGS +DD64 +O2" fi ;; *rhapsody*) From e5d0df2c06f1a60e2d2737e27ccef6e01b04df1a Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 13:54:27 +0100 Subject: [PATCH 074/246] fixing gone file ONCE AGAIN --- BitKeeper/etc/gone | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/BitKeeper/etc/gone b/BitKeeper/etc/gone index 204044a2cc5..2c21b8e7e03 100644 --- a/BitKeeper/etc/gone +++ b/BitKeeper/etc/gone @@ -199,9 +199,7 @@ BK|sql-bench/Results/ATIS-mysql-3.21-Linux_2.2.1_i686|19700101030959|02022|660fb BK|sql-bench/Results/ATIS-mysql-Linux_2.2.10_i686|19700101030959|02025|3fa4d167cceff7e8 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02312|84ca3b85ff306133 BK|sql-bench/Results/ATIS-mysql-Linux_2.2.14_i686_xeon|19700101030959|02044|3e820c28bf4af63a -BK|sql-bench/Results/ATIS-mysql-SunOS_5.5.1_sun4u|19700101030959|02031|dfb4c5f6b6db3b49 BK|sql-bench/Results/ATIS-mysql-SunOS_5.6_sun4m|19700101030959|02032|62028e0375b3b8b -BK|sql-bench/Results/ATIS-mysql-SunOS_5.7_sun4u|19700101030959|02034|be0d9789776c5ed7 BK|sql-bench/Results/ATIS-mysql_3.21-Linux_2.0.35_i686|19700101030959|02036|c25425e045ca8dfc BK|sql-bench/Results/ATIS-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02304|cbe120d860296d2f BK|sql-bench/Results/ATIS-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02027|a74e7b82d3908fa9 @@ -265,9 +263,7 @@ BK|sql-bench/Results/RUN-mysql-3.21-Linux_2.2.1_i686|19700101030959|02050|f6fdd6 BK|sql-bench/Results/RUN-mysql-Linux_2.2.10_i686|19700101030959|02041|712f52be5d195406 BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02038|8ee87b26b91c86fe BK|sql-bench/Results/RUN-mysql-Linux_2.2.14_i686_xeon|19700101030959|02055|17854e751e1d9d1d -BK|sql-bench/Results/RUN-mysql-SunOS_5.5.1_sun4u|19700101030959|02058|afbba182428e20df BK|sql-bench/Results/RUN-mysql-SunOS_5.6_sun4m|19700101030959|02059|eafc8188345e262b -BK|sql-bench/Results/RUN-mysql-SunOS_5.7_sun4u|19700101030959|02061|86e1dc0e25a8b8f BK|sql-bench/Results/RUN-mysql_3.21-Linux_2.0.35_i686|19700101030959|02064|ea8672d8473435 BK|sql-bench/Results/RUN-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02310|a902e1a967d79c42 BK|sql-bench/Results/RUN-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02030|413ab3b8a99e61e9 @@ -277,9 +273,7 @@ BK|sql-bench/Results/alter-table-mysql-3.21-Linux_2.2.1_i686|19700101030959|0207 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.10_i686|19700101030959|02081|93b78a85b720a186 BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02314|4ae4b989301df98b BK|sql-bench/Results/alter-table-mysql-Linux_2.2.14_i686_xeon|19700101030959|02057|64cc4b874cd6fabf -BK|sql-bench/Results/alter-table-mysql-SunOS_5.5.1_sun4u|19700101030959|02087|9d7e75667fcb29ec BK|sql-bench/Results/alter-table-mysql-SunOS_5.6_sun4m|19700101030959|02088|8a1bd6589a189890 -BK|sql-bench/Results/alter-table-mysql-SunOS_5.7_sun4u|19700101030959|02090|ce74c2f623d3bb3 BK|sql-bench/Results/alter-table-mysql_3.21-Linux_2.0.35_i686|19700101030959|02092|762639f2560976bd BK|sql-bench/Results/alter-table-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02316|1390155aad5b6e86 BK|sql-bench/Results/alter-table-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02317|9090bebb62ef164b @@ -289,9 +283,7 @@ BK|sql-bench/Results/big-tables-mysql-3.21-Linux_2.2.1_i686|19700101030959|02106 BK|sql-bench/Results/big-tables-mysql-Linux_2.2.10_i686|19700101030959|02109|99daa1c5370d077d BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02315|2804ec3c95be436a BK|sql-bench/Results/big-tables-mysql-Linux_2.2.14_i686_xeon|19700101030959|02074|290c2c3de9d8e6b -BK|sql-bench/Results/big-tables-mysql-SunOS_5.5.1_sun4u|19700101030959|02115|7d7b6c0bf58b9b79 BK|sql-bench/Results/big-tables-mysql-SunOS_5.6_sun4m|19700101030959|02116|f351a7f3e1e2257e -BK|sql-bench/Results/big-tables-mysql-SunOS_5.7_sun4u|19700101030959|02118|ebc379b231312bbe BK|sql-bench/Results/big-tables-mysql_3.21-Linux_2.0.35_i686|19700101030959|02120|190e827e569c99a4 BK|sql-bench/Results/big-tables-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02318|c5eabcb89ceac698 BK|sql-bench/Results/big-tables-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02319|856d503725373684 @@ -301,9 +293,7 @@ BK|sql-bench/Results/connect-mysql-3.21-Linux_2.2.1_i686|19700101030959|02134|c0 BK|sql-bench/Results/connect-mysql-Linux_2.2.10_i686|19700101030959|02137|c92505d77e19d5ec BK|sql-bench/Results/connect-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02084|e7e2959b7387251f BK|sql-bench/Results/connect-mysql-Linux_2.2.14_i686_xeon|19700101030959|02071|ea19dc3ec55b3618 -BK|sql-bench/Results/connect-mysql-SunOS_5.5.1_sun4u|19700101030959|02142|a9493110fe62e0b1 BK|sql-bench/Results/connect-mysql-SunOS_5.6_sun4m|19700101030959|02143|a10e3ddfa26a3e7f -BK|sql-bench/Results/connect-mysql-SunOS_5.7_sun4u|19700101030959|02145|c67beb9e9d2cf32e BK|sql-bench/Results/connect-mysql_3.21-Linux_2.0.35_i686|19700101030959|02146|650abd213e6828c6 BK|sql-bench/Results/connect-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02320|ce69cc65bc827b5c BK|sql-bench/Results/connect-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02066|f801e08429a4f7c6 @@ -313,9 +303,7 @@ BK|sql-bench/Results/create-mysql-3.21-Linux_2.2.1_i686|19700101030959|02158|515 BK|sql-bench/Results/create-mysql-Linux_2.2.10_i686|19700101030959|02161|9e7822f66df6aa76 BK|sql-bench/Results/create-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02102|34ded91c5fc25de9 BK|sql-bench/Results/create-mysql-Linux_2.2.14_i686_xeon|19700101030959|02139|50d15991293030ef -BK|sql-bench/Results/create-mysql-SunOS_5.5.1_sun4u|19700101030959|02166|bbb5de66fc56de7b BK|sql-bench/Results/create-mysql-SunOS_5.6_sun4m|19700101030959|02221|9233114ae6f8c5f -BK|sql-bench/Results/create-mysql-SunOS_5.7_sun4u|19700101030959|02223|7ee13bfcafeab498 BK|sql-bench/Results/create-mysql_3.21-Linux_2.0.35_i686|19700101030959|02225|df1b037d17b33587 BK|sql-bench/Results/create-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02321|e985e71d552ff09e BK|sql-bench/Results/create-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02099|483dcf223d5abf81 @@ -325,9 +313,7 @@ BK|sql-bench/Results/insert-mysql-3.21-Linux_2.2.1_i686|19700101030959|02239|fd0 BK|sql-bench/Results/insert-mysql-Linux_2.2.10_i686|19700101030959|02242|763edf9aec633f51 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02130|5be3d6f299738a31 BK|sql-bench/Results/insert-mysql-Linux_2.2.14_i686_xeon|19700101030959|02141|c683ee4b9d214298 -BK|sql-bench/Results/insert-mysql-SunOS_5.5.1_sun4u|19700101030959|02247|8a9ae41f9a79f79 BK|sql-bench/Results/insert-mysql-SunOS_5.6_sun4m|19700101030959|02248|3402d060ae20e19 -BK|sql-bench/Results/insert-mysql-SunOS_5.7_sun4u|19700101030959|02250|78efa132c6e252b9 BK|sql-bench/Results/insert-mysql_3.21-Linux_2.0.35_i686|19700101030959|02252|60c0965dff31db07 BK|sql-bench/Results/insert-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02322|ed252140ff399961 BK|sql-bench/Results/insert-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02114|29a3b8a1ca8aa9d @@ -337,9 +323,7 @@ BK|sql-bench/Results/select-mysql-3.21-Linux_2.2.1_i686|19700101030959|02265|ed3 BK|sql-bench/Results/select-mysql-Linux_2.2.10_i686|19700101030959|02268|a2e264d777b787d BK|sql-bench/Results/select-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02227|308117295c3bc096 BK|sql-bench/Results/select-mysql-Linux_2.2.14_i686_xeon|19700101030959|02152|ead3f11b46ac626f -BK|sql-bench/Results/select-mysql-SunOS_5.5.1_sun4u|19700101030959|02273|c9a1a498a052e268 BK|sql-bench/Results/select-mysql-SunOS_5.6_sun4m|19700101030959|02274|4da215905bce988d -BK|sql-bench/Results/select-mysql-SunOS_5.7_sun4u|19700101030959|02276|632c92971c61e34a BK|sql-bench/Results/select-mysql_3.21-Linux_2.0.35_i686|19700101030959|02278|5fadbac5f98696a BK|sql-bench/Results/select-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02323|e8c0871a668a610d BK|sql-bench/Results/select-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02127|963a98ed526e2be4 @@ -349,9 +333,7 @@ BK|sql-bench/Results/wisconsin-mysql-3.21-Linux_2.2.1_i686|19700101030959|02290| BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.10_i686|19700101030959|02288|301a82b12a84922b BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02280|d01900af34fb33b8 BK|sql-bench/Results/wisconsin-mysql-Linux_2.2.14_i686_xeon|19700101030959|02154|7525b23938631801 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.5.1_sun4u|19700101030959|02297|379705afa2e12378 BK|sql-bench/Results/wisconsin-mysql-SunOS_5.6_sun4m|19700101030959|02298|ec61b14072715dc8 -BK|sql-bench/Results/wisconsin-mysql-SunOS_5.7_sun4u|19700101030959|02300|f27927f8c64ea8ad BK|sql-bench/Results/wisconsin-mysql_3.21-Linux_2.0.35_i686|19700101030959|02302|31703d40ea6b4f66 BK|sql-bench/Results/wisconsin-mysql_fast-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02324|ec075a89dbdbbe6a BK|sql-bench/Results/wisconsin-pg-Linux_2.2.14_5.0_i686-cmp-mysql,pg|19700101030959|02325|233d5aa529979990 @@ -745,8 +727,6 @@ mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000029.xml|20001017133713| mwagner@evoq.home.mwagner.org|mysql-test/xml/tests/sel000030.xml|20001017133600|63205|c2b25781eefaee9 mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/README|20001013051514|26509|cd4bb681e5a0cd10 mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/mysqltest.xsl|20001013051514|27425|1b8f6ec4f1b5f634 -mwagner@work.mysql.com|mysql-test/r/3.23/sel000001.result|20001010091454|28284|383913ae4505ec86 -mwagner@work.mysql.com|mysql-test/r/3.23/sel000002.result|20001010091454|29230|d1787e6fd5dbc1cc nick@nick.leippe.com|mysql-test/r/rpl_empty_master_crash.result|20020531235552|47718|615f521be2132141 nick@nick.leippe.com|mysql-test/t/rpl_empty_master_crash.test|20020531235552|52328|99464e737639ccc6 sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554 @@ -754,36 +734,19 @@ sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97 sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618 sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce -sasha@mysql.sashanet.com|mysql-test/README.gcov|20001214012355|41825|2de7575ca81155e5 sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5 sasha@mysql.sashanet.com|mysql-test/r/3.23/alt000001.result|20001122072330|24729|393103dbf15f35c9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/ins000001.result|20001018175743|49824|f45c599efdf8352b sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.a.result|20001118063528|39426|2987b17db06808c3 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.b.result|20001118063528|44057|62e1fa91167cacc3 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000002.result|20001118063528|46039|109f5ceed1e0d64 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000003.result|20001118063528|48148|68d6ee00beaa011 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.a.result|20001118063528|50132|3415f066cb91c460 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|52094|352b35351551485 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000005.result|20001118063528|54071|a50962bc2340ab9a -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000006.result|20001118063528|56081|5653051e8ce6b4aa -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000007.result|20001121063807|21606|e0c3b6134e0884da -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000008.result|20001121063807|23636|c5cfee19ca5a7da9 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000009.result|20001121063807|25633|ed8042446ab97926 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000010.result|20001122072330|29430|3228109b8965b0f8 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000011.result|20001125024912|48851|c29dce30aa97f265 -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.result|20001126062901|05938|35d6596da7b90fc5 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f -sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.result|20001202171150|03876|ac5024e6cf6daac6 sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000003.result|20001011230020|64653|d7b657b1e3a286a7 -sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000100.res|20001205131218|23520|84ed46856cb3a69f sasha@mysql.sashanet.com|mysql-test/r/3.23/shw000001.result|20001121234128|16652|8b20b03d8319b9a5 sasha@mysql.sashanet.com|mysql-test/r/binlog-backup-restore.result|20010424233926|16010|605de78abda64d27 sasha@mysql.sashanet.com|mysql-test/r/df_crash.result|20010406010433|59989|4a3dbee64843953d sasha@mysql.sashanet.com|mysql-test/r/identity.result|20010910233028|16331|e41453a364242503 sasha@mysql.sashanet.com|mysql-test/r/mrg000002.result|20001212152450|11492|745be0854aaaaf5e -sasha@mysql.sashanet.com|mysql-test/r/slave-running.result|20001208141122|24303|f73e49462cf59e1f -sasha@mysql.sashanet.com|mysql-test/r/slave-stopped.result|20001208141122|28916|25c134b1a4f1993a sasha@mysql.sashanet.com|mysql-test/std_data/m.MRG|20001212152450|17736|3f5632c37af00f18 sasha@mysql.sashanet.com|mysql-test/std_data/m.frm|20001212152450|13897|e351dfe0b6824c0c sasha@mysql.sashanet.com|mysql-test/std_data/select-key.master|20001009234916|07315|e6b83af25df0ce5 From f980950bb3b19df3de3030c531ecff99ecb323e1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 15:40:46 +0200 Subject: [PATCH 075/246] Some code optimisations related to EXPLAIN of derived tables and the resulting code cleanup in our main loop. --- mysql-test/r/subselect.result | 2 +- sql/mysql_priv.h | 3 +- sql/sql_derived.cc | 10 ++-- sql/sql_lex.cc | 1 + sql/sql_parse.cc | 107 +++++++++------------------------- sql/sql_select.cc | 4 +- 6 files changed, 37 insertions(+), 90 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index b1bf134fdde..5674bf3c473 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -71,8 +71,8 @@ select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from explain select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from (select * from t2 where a>1) as tt; id select_type table type possible_keys key key_len ref rows Extra -3 DERIVED t2 ALL NULL NULL NULL NULL 2 where used 1 PRIMARY system NULL NULL NULL NULL 1 +3 DERIVED t2 ALL NULL NULL NULL NULL 2 where used 2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 where used; Using filesort select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1); a diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index c61621bf91d..a6771c9754d 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -399,8 +399,7 @@ int mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, int mysql_explain_select(THD *thd, SELECT_LEX *sl, char const *type, select_result *result); int mysql_union(THD *thd, LEX *lex,select_result *result); -int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *s, TABLE_LIST *t, - bool tables_is_opened); +int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *s, TABLE_LIST *t); Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, Item_result_field ***copy_func, Field **from_field, bool group,bool modify_item); diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 1335618b90d..93627409d27 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -28,8 +28,7 @@ static const char *any_db="*any*"; // Special symbol for check_access -int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t, - bool tables_is_opened) +int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) { /* TODO: make derived tables with union inside (now only 1 SELECT may be @@ -58,7 +57,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t, if (cursor->derived) { res= mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived, - cursor, 0); + cursor); if (res) DBUG_RETURN(res); } } @@ -68,7 +67,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t, while ((item= it++)) item_list.push_back(item); - if (tables_is_opened || !(res=open_and_lock_tables(thd,tables))) + if (!(res=open_and_lock_tables(thd,tables))) { if (setup_fields(thd,tables,item_list,0,0,1)) { @@ -112,7 +111,8 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t, t->real_name=table->real_name; t->table=table; table->derived_select_number= sl->select_number; - sl->exclude(); + if (!lex->describe) + sl->exclude(); t->db= (tables && tables->db && tables->db[0]) ? t->db : thd->db; t->derived=(SELECT_LEX *)0; // just in case ... } diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 5327801bf9c..0865e6da05f 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -959,6 +959,7 @@ void st_select_lex::init_query() table_list.next= (byte**) &table_list.first; item_list.empty(); join= 0; + olap= UNSPECIFIED_OLAP_TYPE; } void st_select_lex::init_select() diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 57325ef19cf..4288773b00b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1328,74 +1328,24 @@ mysql_execute_command(THD *thd) #endif } - select_result *explain_result= 0; /* TODO: make derived tables processing 'inside' SELECT processing. TODO: solve problem with depended derived tables in subselects */ - if (lex->sql_command == SQLCOM_SELECT && - lex->describe && lex->derived_tables) - { - if (!(explain_result= new select_send())) - { - send_error(thd, ER_OUT_OF_RESOURCES); - DBUG_VOID_RETURN; - } - //check rights - for (cursor= tables; - cursor; - cursor= cursor->next) - if (cursor->derived) - { - TABLE_LIST *tables= - (TABLE_LIST *)((SELECT_LEX_UNIT *) - cursor->derived)->first_select()->table_list.first; - int res; - if (tables) - res= check_table_access(thd,SELECT_ACL, tables); - else - res= check_access(thd, SELECT_ACL, any_db); - if (res) - DBUG_VOID_RETURN; - } - thd->send_explain_fields(explain_result); - // EXPLAIN derived tables - for (cursor= tables; - cursor; - cursor= cursor->next) - if (cursor->derived) - { - SELECT_LEX *select_lex= ((SELECT_LEX_UNIT *) - cursor->derived)->first_select(); - if (!open_and_lock_tables(thd, - (TABLE_LIST*) select_lex->table_list.first)) - { - mysql_explain_select(thd, select_lex, - "DERIVED", explain_result); - // execute derived table SELECT to provide table for other SELECTs - if (mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived, - cursor, 1)) - DBUG_VOID_RETURN; - } - else - DBUG_VOID_RETURN; - } - - } - else if (lex->derived_tables) +if (lex->derived_tables) { for (TABLE_LIST *cursor= tables; cursor; cursor= cursor->next) if (cursor->derived && (res=mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived, - cursor, 0))) + cursor))) { if (res < 0) send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0); DBUG_VOID_RETURN; } - } + } if ((lex->select_lex.next_select_in_list() && lex->unit.create_total_list(thd, lex, &tables)) || (table_rules_on && tables && thd->slave_thread && @@ -1435,19 +1385,18 @@ mysql_execute_command(THD *thd) { if (lex->describe) { - if (!explain_result) - if (!(explain_result= new select_send())) - { - send_error(thd, ER_OUT_OF_RESOURCES); - DBUG_VOID_RETURN; - } - else - thd->send_explain_fields(explain_result); + if (!(result= new select_send())) + { + send_error(thd, ER_OUT_OF_RESOURCES); + DBUG_VOID_RETURN; + } + else + thd->send_explain_fields(result); fix_tables_pointers(select_lex); - res= mysql_explain_union(thd, &thd->lex.unit, explain_result); + res= mysql_explain_union(thd, &thd->lex.unit, result); MYSQL_LOCK *save_lock= thd->lock; thd->lock= (MYSQL_LOCK *)0; - explain_result->send_eof(); + result->send_eof(); thd->lock= save_lock; } else @@ -2901,26 +2850,24 @@ void mysql_init_query(THD *thd) { DBUG_ENTER("mysql_init_query"); - thd->lex.unit.init_query(); - thd->lex.unit.init_select(); - thd->lex.select_lex.init_query(); - thd->lex.unit.slave= &thd->lex.select_lex; - thd->lex.unit.global_parameters= &thd->lex.select_lex; //Global limit & order - thd->lex.select_lex.master= &thd->lex.unit; - thd->lex.select_lex.prev= &thd->lex.unit.slave; - thd->select_number= thd->lex.select_lex.select_number= 1; - thd->lex.value_list.empty(); + LEX *lex=&thd->lex; + lex->unit.init_query(); + lex->unit.init_select(); + lex->select_lex.init_query(); + lex->value_list.empty(); + lex->param_list.empty(); + lex->unit.global_parameters= lex->unit.slave= lex->current_select= &lex->select_lex; + lex->select_lex.master= &lex->unit; + lex->select_lex.prev= &lex->unit.slave; + lex->olap=lex->describe=0; + lex->derived_tables= false; + thd->select_number= lex->select_lex.select_number= 1; thd->free_list= 0; - thd->lex.current_select= &thd->lex.select_lex; - thd->lex.olap=thd->lex.describe=0; - thd->lex.select_lex.olap= UNSPECIFIED_OLAP_TYPE; - thd->fatal_error= 0; // Safety thd->total_warn_count=0; // Warnings for this query thd->last_insert_id_used= thd->query_start_used= thd->insert_id_used=0; thd->sent_row_count= thd->examined_row_count= 0; - thd->rand_used=0; + thd->fatal_error= thd->rand_used=0; thd->safe_to_cache_query= 1; - thd->lex.param_list.empty(); DBUG_VOID_RETURN; } @@ -2932,7 +2879,6 @@ mysql_init_select(LEX *lex) select_lex->init_select(); select_lex->master_unit()->select_limit= select_lex->select_limit= lex->thd->variables.select_limit; - select_lex->olap= UNSPECIFIED_OLAP_TYPE; lex->exchange= 0; lex->result= 0; lex->proc_list.first= 0; @@ -3016,14 +2962,13 @@ mysql_parse(THD *thd, char *inBuf, uint length) mysql_init_query(thd); thd->query_length = length; - thd->lex.derived_tables= false; if (query_cache_send_result_to_client(thd, inBuf, length) <= 0) { LEX *lex=lex_start(thd, (uchar*) inBuf, length); if (!yyparse() && ! thd->fatal_error) { if (mqh_used && thd->user_connect && - check_mqh(thd, thd->lex.sql_command)) + check_mqh(thd, lex->sql_command)) { thd->net.error = 0; } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b9162daadaa..674caed0cd0 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -7458,8 +7458,10 @@ int mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result) ((sl->next_select_in_list())?"PRIMARY": "SIMPLE"): ((sl == first)? + ((sl->linkage == DERIVED_TABLE_TYPE) ? + "DERIVED": ((sl->dependent)?"DEPENDENT SUBSELECT": - "SUBSELECT"): + "SUBSELECT")): ((sl->dependent)?"DEPENDENT UNION": "UNION"))), result); From 3cff56d096174c4b612d4b34649b595392d283d6 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 15:09:24 +0100 Subject: [PATCH 076/246] typo fixed --- myisam/myisamchk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index ca4e430d49b..d39b1e75c15 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -1638,7 +1638,7 @@ err: volatile bool *killed_ptr(MI_CHECK *param) { - return (bool *)(param->thd); /* always NULL */ + return (bool *)(& param->thd); /* always NULL */ } /* print warnings and errors */ From 04ca9bcdec44483007a79bf594d335b4f0cc85ca Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 18:23:09 +0200 Subject: [PATCH 077/246] Many files: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/include/btr0btr.h: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/include/btr0pcur.h: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/include/db0err.h: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/include/btr0pcur.ic: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/btr/btr0btr.c: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/page/page0page.c: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE innobase/row/row0sel.c: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE --- innobase/btr/btr0btr.c | 123 +++++++++++++++++++++++++---------- innobase/include/btr0btr.h | 13 ++++ innobase/include/btr0pcur.h | 8 +++ innobase/include/btr0pcur.ic | 18 +++++ innobase/include/db0err.h | 3 +- innobase/page/page0page.c | 92 ++++++++++++++++---------- innobase/row/row0sel.c | 55 +++++++++++++++- 7 files changed, 241 insertions(+), 71 deletions(-) diff --git a/innobase/btr/btr0btr.c b/innobase/btr/btr0btr.c index e4cfdf80fc6..a1665aefab7 100644 --- a/innobase/btr/btr0btr.c +++ b/innobase/btr/btr0btr.c @@ -2295,20 +2295,26 @@ btr_check_node_ptr( /**************************************************************** Checks the size and number of fields in a record based on the definition of the index. */ -static + ibool btr_index_rec_validate( /*====================*/ - /* out: TRUE if ok */ - rec_t* rec, /* in: index record */ - dict_index_t* index) /* in: index */ + /* out: TRUE if ok */ + rec_t* rec, /* in: index record */ + dict_index_t* index, /* in: index */ + ibool dump_on_error) /* in: TRUE if the function + should print hex dump of record + and page on error */ { dtype_t* type; byte* data; ulint len; ulint n; ulint i; + page_t* page; char err_buf[1000]; + + page = buf_frame_align(rec); if (index->type & DICT_UNIVERSAL) { /* The insert buffer index tree can contain records from any @@ -2321,11 +2327,22 @@ btr_index_rec_validate( n = dict_index_get_n_fields(index); if (rec_get_n_fields(rec) != n) { - fprintf(stderr, "Record has %lu fields, should have %lu\n", - rec_get_n_fields(rec), n); + fprintf(stderr, +"InnoDB: Record in index %s in table %s, page %lu, at offset %lu\n" +"InnoDB: has %lu fields, should have %lu\n", + index->name, index->table_name, + buf_frame_get_page_no(page), (ulint)(rec - page), + rec_get_n_fields(rec), n); + + if (!dump_on_error) { + + return(FALSE); + } + + buf_page_print(page); rec_sprintf(err_buf, 900, rec); - fprintf(stderr, "InnoDB: record %s\n", err_buf); + fprintf(stderr, "InnoDB: corrupt record %s\n", err_buf); return(FALSE); } @@ -2336,13 +2353,25 @@ btr_index_rec_validate( type = dict_index_get_nth_type(index, i); if (len != UNIV_SQL_NULL && dtype_is_fixed_size(type) - && len != dtype_get_fixed_size(type)) { + && len != dtype_get_fixed_size(type)) { fprintf(stderr, - "Record field %lu len is %lu, should be %lu\n", +"InnoDB: Record in index %s in table %s, page %lu, at offset %lu\n" +"InnoDB: field %lu len is %lu, should be %lu\n", + index->name, index->table_name, + buf_frame_get_page_no(page), + (ulint)(rec - page), i, len, dtype_get_fixed_size(type)); + if (!dump_on_error) { + + return(FALSE); + } + + buf_page_print(page); + rec_sprintf(err_buf, 900, rec); - fprintf(stderr, "InnoDB: record %s\n", err_buf); + fprintf(stderr, + "InnoDB: corrupt record %s\n", err_buf); return(FALSE); } @@ -2373,12 +2402,13 @@ btr_index_page_validate( rec = (&cur)->rec; if (page_cur_is_after_last(&cur)) { + break; } - if (!btr_index_rec_validate(rec, index)) { + if (!btr_index_rec_validate(rec, index, TRUE)) { - ret = FALSE; + return(FALSE); } page_cur_move_to_next(&cur); @@ -2435,25 +2465,26 @@ btr_validate_level( index = UT_LIST_GET_FIRST(tree->tree_indexes); - /* Now we are on the desired level */ + /* Now we are on the desired level. Loop through the pages on that + level. */ loop: mtr_x_lock(dict_tree_get_lock(tree), &mtr); /* Check ordering etc. of records */ if (!page_validate(page, index)) { - fprintf(stderr, "Error in page %lu in index %s\n", - buf_frame_get_page_no(page), index->name); + fprintf(stderr, +"InnoDB: Error in page %lu in index %s table %s, index tree level %lu\n", + buf_frame_get_page_no(page), index->name, + index->table_name, level); ret = FALSE; - } + } else if (level == 0) { + /* We are on level 0. Check that the records have the right + number of fields, and field lengths are right. */ - if (level == 0) { if (!btr_index_page_validate(page, index)) { - fprintf(stderr, - "Error in page %lu in index %s, level %lu\n", - buf_frame_get_page_no(page), index->name, - level); + ret = FALSE; } } @@ -2476,14 +2507,17 @@ loop: UT_LIST_GET_FIRST(tree->tree_indexes)) >= 0) { fprintf(stderr, - "InnoDB: Error on pages %lu and %lu in index %s\n", + "InnoDB: Error on pages %lu and %lu in index %s table %s\n", buf_frame_get_page_no(page), right_page_no, - index->name); + index->name, index->table_name); fprintf(stderr, "InnoDB: records in wrong order on adjacent pages\n"); + buf_page_print(page); + buf_page_print(right_page); + rec_sprintf(err_buf, 900, page_rec_get_prev(page_get_supremum_rec(page))); fprintf(stderr, "InnoDB: record %s\n", err_buf); @@ -2506,6 +2540,7 @@ loop: /* Check father node pointers */ node_ptr = btr_page_get_father_node_ptr(tree, page, &mtr); + father_page = buf_frame_align(node_ptr); if (btr_node_ptr_get_child_page_no(node_ptr) != buf_frame_get_page_no(page) @@ -2513,13 +2548,16 @@ loop: page_rec_get_prev(page_get_supremum_rec(page)), &mtr)) { fprintf(stderr, - "InnoDB: Error on page %lu in index %s\n", + "InnoDB: Error on page %lu in index %s table %s\n", buf_frame_get_page_no(page), - index->name); + index->name, index->table_name); fprintf(stderr, "InnoDB: node pointer to the page is wrong\n"); + buf_page_print(father_page); + buf_page_print(page); + rec_sprintf(err_buf, 900, node_ptr); fprintf(stderr, "InnoDB: node ptr %s\n", err_buf); @@ -2540,8 +2578,6 @@ loop: goto node_ptr_fails; } - father_page = buf_frame_align(node_ptr); - if (btr_page_get_level(page, &mtr) > 0) { heap = mem_heap_create(256); @@ -2555,9 +2591,12 @@ loop: if (cmp_dtuple_rec(node_ptr_tuple, node_ptr) != 0) { fprintf(stderr, - "InnoDB: Error on page %lu in index %s\n", + "InnoDB: Error on page %lu in index %s table %s\n", buf_frame_get_page_no(page), - index->name); + index->name, index->table_name); + + buf_page_print(father_page); + buf_page_print(page); fprintf(stderr, "InnoDB: Error: node ptrs differ on levels > 0\n"); @@ -2607,9 +2646,13 @@ loop: "InnoDB: node pointer to the right page is wrong\n"); fprintf(stderr, - "InnoDB: Error on page %lu in index %s\n", + "InnoDB: Error on page %lu in index %s table %s\n", buf_frame_get_page_no(page), - index->name); + index->name, index->table_name); + + buf_page_print(father_page); + buf_page_print(page); + buf_page_print(right_page); } } else { right_father_page = buf_frame_align( @@ -2623,9 +2666,14 @@ loop: "InnoDB: node pointer 2 to the right page is wrong\n"); fprintf(stderr, - "InnoDB: Error on page %lu in index %s\n", + "InnoDB: Error on page %lu in index %s table %s\n", buf_frame_get_page_no(page), - index->name); + index->name, index->table_name); + + buf_page_print(father_page); + buf_page_print(right_father_page); + buf_page_print(page); + buf_page_print(right_page); } if (buf_frame_get_page_no(right_father_page) @@ -2636,9 +2684,14 @@ loop: "InnoDB: node pointer 3 to the right page is wrong\n"); fprintf(stderr, - "InnoDB: Error on page %lu in index %s\n", + "InnoDB: Error on page %lu in index %s table %s\n", buf_frame_get_page_no(page), - index->name); + index->name, index->table_name); + + buf_page_print(father_page); + buf_page_print(right_father_page); + buf_page_print(page); + buf_page_print(right_page); } } } diff --git a/innobase/include/btr0btr.h b/innobase/include/btr0btr.h index f66ad3639d4..3cd44ab5175 100644 --- a/innobase/include/btr0btr.h +++ b/innobase/include/btr0btr.h @@ -399,6 +399,19 @@ btr_print_tree( dict_tree_t* tree, /* in: tree */ ulint width); /* in: print this many entries from start and end */ +/**************************************************************** +Checks the size and number of fields in a record based on the definition of +the index. */ + +ibool +btr_index_rec_validate( +/*====================*/ + /* out: TRUE if ok */ + rec_t* rec, /* in: index record */ + dict_index_t* index, /* in: index */ + ibool dump_on_error); /* in: TRUE if the function + should print hex dump of record + and page on error */ /****************************************************************** Checks the consistency of an index tree. */ diff --git a/innobase/include/btr0pcur.h b/innobase/include/btr0pcur.h index 05b55e4491d..9d07dd0de18 100644 --- a/innobase/include/btr0pcur.h +++ b/innobase/include/btr0pcur.h @@ -298,6 +298,14 @@ btr_pcur_move_to_prev( function may release the page latch */ mtr_t* mtr); /* in: mtr */ /************************************************************* +Moves the persistent cursor to the last record on the same page. */ +UNIV_INLINE +void +btr_pcur_move_to_last_on_page( +/*==========================*/ + btr_pcur_t* cursor, /* in: persistent cursor */ + mtr_t* mtr); /* in: mtr */ +/************************************************************* Moves the persistent cursor to the next user record in the tree. If no user records are left, the cursor ends up 'after last in tree'. */ UNIV_INLINE diff --git a/innobase/include/btr0pcur.ic b/innobase/include/btr0pcur.ic index a60140e4aa9..a1db2cc52dd 100644 --- a/innobase/include/btr0pcur.ic +++ b/innobase/include/btr0pcur.ic @@ -284,6 +284,24 @@ btr_pcur_move_to_prev_on_page( cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; } +/************************************************************* +Moves the persistent cursor to the last record on the same page. */ +UNIV_INLINE +void +btr_pcur_move_to_last_on_page( +/*==========================*/ + btr_pcur_t* cursor, /* in: persistent cursor */ + mtr_t* mtr) /* in: mtr */ +{ + UT_NOT_USED(mtr); + ut_ad(cursor->latch_mode != BTR_NO_LATCHES); + + page_cur_set_after_last(buf_frame_align(btr_pcur_get_rec(cursor)), + btr_pcur_get_page_cur(cursor)); + + cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; +} + /************************************************************* Moves the persistent cursor to the next user record in the tree. If no user records are left, the cursor ends up 'after last in tree'. */ diff --git a/innobase/include/db0err.h b/innobase/include/db0err.h index ddfbd5b7862..86b79b65bf2 100644 --- a/innobase/include/db0err.h +++ b/innobase/include/db0err.h @@ -41,7 +41,8 @@ Created 5/24/1996 Heikki Tuuri which is referenced */ #define DB_CANNOT_ADD_CONSTRAINT 38 /* adding a foreign key constraint to a table failed */ - +#define DB_CORRUPTION 39 /* data structure corruption noticed */ + /* The following are partial failure codes */ #define DB_FAIL 1000 #define DB_OVERFLOW 1001 diff --git a/innobase/page/page0page.c b/innobase/page/page0page.c index 7d0d88c6afc..7d240bdd5b0 100644 --- a/innobase/page/page0page.c +++ b/innobase/page/page0page.c @@ -1299,12 +1299,16 @@ page_rec_validate( heap_no = rec_get_heap_no(rec); if (!(n_owned <= PAGE_DIR_SLOT_MAX_N_OWNED)) { - fprintf(stderr, "Dir slot n owned too big %lu\n", n_owned); + fprintf(stderr, + "InnoDB: Dir slot of rec %lu, n owned too big %lu\n", + (ulint)(rec - page), n_owned); return(FALSE); } if (!(heap_no < page_header_get_field(page, PAGE_N_HEAP))) { - fprintf(stderr, "Heap no too big %lu %lu\n", heap_no, + fprintf(stderr, + "InnoDB: Heap no of rec %lu too big %lu %lu\n", + (ulint)(rec - page), heap_no, page_header_get_field(page, PAGE_N_HEAP)); return(FALSE); } @@ -1340,7 +1344,7 @@ page_simple_validate( if (n_slots > UNIV_PAGE_SIZE / 4) { fprintf(stderr, - "Nonsensical number %lu of page dir slots\n", n_slots); + "InnoDB: Nonsensical number %lu of page dir slots\n", n_slots); goto func_exit; } @@ -1350,7 +1354,7 @@ page_simple_validate( if (rec_heap_top > page_dir_get_nth_slot(page, n_slots - 1)) { fprintf(stderr, - "Record heap and dir overlap on a page, heap top %lu, dir %lu\n", + "InnoDB: Record heap and dir overlap on a page, heap top %lu, dir %lu\n", (ulint)(page_header_get_ptr(page, PAGE_HEAP_TOP) - page), (ulint)(page_dir_get_nth_slot(page, n_slots - 1) - page)); @@ -1372,7 +1376,7 @@ page_simple_validate( if (rec > rec_heap_top) { fprintf(stderr, - "Record %lu is above rec heap top %lu\n", + "InnoDB: Record %lu is above rec heap top %lu\n", (ulint)(rec - page), (ulint)(rec_heap_top - page)); goto func_exit; @@ -1383,7 +1387,7 @@ page_simple_validate( if (rec_get_n_owned(rec) != own_count) { fprintf(stderr, - "Wrong owned count %lu, %lu, rec %lu\n", + "InnoDB: Wrong owned count %lu, %lu, rec %lu\n", rec_get_n_owned(rec), own_count, (ulint)(rec - page)); @@ -1392,7 +1396,7 @@ page_simple_validate( if (page_dir_slot_get_rec(slot) != rec) { fprintf(stderr, - "Dir slot does not point to right rec %lu\n", + "InnoDB: Dir slot does not point to right rec %lu\n", (ulint)(rec - page)); goto func_exit; @@ -1414,7 +1418,7 @@ page_simple_validate( if (rec_get_next_offs(rec) < FIL_PAGE_DATA || rec_get_next_offs(rec) >= UNIV_PAGE_SIZE) { fprintf(stderr, - "Next record offset nonsensical %lu for rec %lu\n", + "InnoDB: Next record offset nonsensical %lu for rec %lu\n", rec_get_next_offs(rec), (ulint)(rec - page)); @@ -1425,7 +1429,7 @@ page_simple_validate( if (count > UNIV_PAGE_SIZE) { fprintf(stderr, - "Page record list appears to be circular %lu\n", + "InnoDB: Page record list appears to be circular %lu\n", count); goto func_exit; } @@ -1435,19 +1439,19 @@ page_simple_validate( } if (rec_get_n_owned(rec) == 0) { - fprintf(stderr, "n owned is zero in a supremum rec\n"); + fprintf(stderr, "InnoDB: n owned is zero in a supremum rec\n"); goto func_exit; } if (slot_no != n_slots - 1) { - fprintf(stderr, "n slots wrong %lu, %lu\n", + fprintf(stderr, "InnoDB: n slots wrong %lu, %lu\n", slot_no, n_slots - 1); goto func_exit; } if (page_header_get_field(page, PAGE_N_RECS) + 2 != count + 1) { - fprintf(stderr, "n recs wrong %lu %lu\n", + fprintf(stderr, "InnoDB: n recs wrong %lu %lu\n", page_header_get_field(page, PAGE_N_RECS) + 2, count + 1); goto func_exit; @@ -1460,7 +1464,7 @@ page_simple_validate( if (rec < page + FIL_PAGE_DATA || rec >= page + UNIV_PAGE_SIZE) { fprintf(stderr, - "Free list record has a nonsensical offset %lu\n", + "InnoDB: Free list record has a nonsensical offset %lu\n", (ulint)(rec - page)); goto func_exit; @@ -1468,7 +1472,7 @@ page_simple_validate( if (rec > rec_heap_top) { fprintf(stderr, - "Free list record %lu is above rec heap top %lu\n", + "InnoDB: Free list record %lu is above rec heap top %lu\n", (ulint)(rec - page), (ulint)(rec_heap_top - page)); goto func_exit; @@ -1478,7 +1482,7 @@ page_simple_validate( if (count > UNIV_PAGE_SIZE) { fprintf(stderr, - "Page free list appears to be circular %lu\n", + "InnoDB: Page free list appears to be circular %lu\n", count); goto func_exit; } @@ -1488,7 +1492,7 @@ page_simple_validate( if (page_header_get_field(page, PAGE_N_HEAP) != count + 1) { - fprintf(stderr, "N heap is wrong %lu, %lu\n", + fprintf(stderr, "InnoDB: N heap is wrong %lu, %lu\n", page_header_get_field(page, PAGE_N_HEAP), count + 1); goto func_exit; @@ -1528,10 +1532,13 @@ page_validate( char err_buf[1000]; if (!page_simple_validate(page)) { + fprintf(stderr, +"InnoDB: Apparent corruption in page %lu in index %s in table %s\n", + buf_frame_get_page_no(page), index->name, + index->table_name); + buf_page_print(page); - fprintf(stderr, "Apparent corruption in a page in index %s\n", - index->name); return(FALSE); } @@ -1553,7 +1560,7 @@ page_validate( if (!(page_header_get_ptr(page, PAGE_HEAP_TOP) <= page_dir_get_nth_slot(page, n_slots - 1))) { fprintf(stderr, - "Record heap and dir overlap on a page in index %s, %lu, %lu\n", +"InnoDB: Record heap and dir overlap on a page in index %s, %lu, %lu\n", index->name, (ulint)page_header_get_ptr(page, PAGE_HEAP_TOP), (ulint)page_dir_get_nth_slot(page, n_slots - 1)); @@ -1581,10 +1588,14 @@ page_validate( if ((count >= 2) && (!page_cur_is_after_last(&cur))) { if (!(1 == cmp_rec_rec(rec, old_rec, index))) { fprintf(stderr, - "Records in wrong order in index %s\n", - index->name); +"InnoDB: Records in wrong order on page %lu index %s table %s\n", + buf_frame_get_page_no(page), + index->name, + index->table_name); + rec_sprintf(err_buf, 900, old_rec); - fprintf(stderr, "InnoDB: record %s\n", err_buf); + fprintf(stderr, + "InnoDB: previous record %s\n", err_buf); rec_sprintf(err_buf, 900, rec); fprintf(stderr, "InnoDB: record %s\n", err_buf); @@ -1606,7 +1617,7 @@ page_validate( /* No other record may overlap this */ fprintf(stderr, - "Record overlaps another in index %s \n", + "InnoDB: Record overlaps another in index %s \n", index->name); goto func_exit; @@ -1619,7 +1630,7 @@ page_validate( /* This is a record pointed to by a dir slot */ if (rec_get_n_owned(rec) != own_count) { fprintf(stderr, - "Wrong owned count %lu, %lu, in index %s\n", + "InnoDB: Wrong owned count %lu, %lu, in index %s\n", rec_get_n_owned(rec), own_count, index->name); @@ -1628,7 +1639,7 @@ page_validate( if (page_dir_slot_get_rec(slot) != rec) { fprintf(stderr, - "Dir slot does not point to right rec in %s\n", + "InnoDB: Dir slot does not point to right rec in %s\n", index->name); goto func_exit; @@ -1650,7 +1661,7 @@ page_validate( if (rec_get_next_offs(rec) < FIL_PAGE_DATA || rec_get_next_offs(rec) >= UNIV_PAGE_SIZE) { fprintf(stderr, - "Next record offset wrong %lu in index %s\n", + "InnoDB: Next record offset wrong %lu in index %s\n", rec_get_next_offs(rec), index->name); goto func_exit; @@ -1663,19 +1674,20 @@ page_validate( } if (rec_get_n_owned(rec) == 0) { - fprintf(stderr, "n owned is zero in index %s\n", index->name); + fprintf(stderr, + "InnoDB: n owned is zero in index %s\n", index->name); goto func_exit; } if (slot_no != n_slots - 1) { - fprintf(stderr, "n slots wrong %lu %lu in index %s\n", + fprintf(stderr, "InnoDB: n slots wrong %lu %lu in index %s\n", slot_no, n_slots - 1, index->name); goto func_exit; } if (page_header_get_field(page, PAGE_N_RECS) + 2 != count + 1) { - fprintf(stderr, "n recs wrong %lu %lu in index %s\n", + fprintf(stderr, "InnoDB: n recs wrong %lu %lu in index %s\n", page_header_get_field(page, PAGE_N_RECS) + 2, count + 1, index->name); @@ -1683,7 +1695,8 @@ page_validate( } if (data_size != page_get_data_size(page)) { - fprintf(stderr, "Summed data size %lu, returned by func %lu\n", + fprintf(stderr, + "InnoDB: Summed data size %lu, returned by func %lu\n", data_size, page_get_data_size(page)); goto func_exit; } @@ -1704,7 +1717,7 @@ page_validate( if (buf[offs + i] != 0) { fprintf(stderr, - "Record overlaps another in free list, index %s \n", + "InnoDB: Record overlaps another in free list, index %s \n", index->name); goto func_exit; @@ -1718,9 +1731,11 @@ page_validate( if (page_header_get_field(page, PAGE_N_HEAP) != count + 1) { - fprintf(stderr, "N heap is wrong %lu %lu in index %s\n", - page_header_get_field(page, PAGE_N_HEAP), count + 1, - index->name); + fprintf(stderr, + "InnoDB: N heap is wrong %lu %lu in index %s\n", + page_header_get_field(page, PAGE_N_HEAP), count + 1, + index->name); + goto func_exit; } ret = TRUE; @@ -1728,6 +1743,15 @@ page_validate( func_exit: mem_heap_free(heap); + if (ret == FALSE) { + fprintf(stderr, +"InnoDB: Apparent corruption in page %lu in index %s in table %s\n", + buf_frame_get_page_no(page), index->name, + index->table_name); + + buf_page_print(page); + } + return(ret); } diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index fcf48dd15cf..ff23b4e5bca 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -2560,6 +2560,7 @@ row_search_for_mysql( then this is set to FALSE */ ibool success; ulint cnt = 0; + ulint next_offs; mtr_t mtr; ut_ad(index && pcur && search_tuple); @@ -2916,7 +2917,59 @@ rec_loop: goto next_rec; } - ut_ad(page_rec_is_user_rec(rec)); + /*-------------------------------------------------------------*/ + /* Do sanity checks in case our cursor has bumped into page + corruption */ + + next_offs = rec_get_next_offs(rec); + + if (next_offs >= UNIV_PAGE_SIZE || next_offs < PAGE_SUPREMUM) { + + if (srv_force_recovery == 0 || moves_up == FALSE) { + ut_print_timestamp(stderr); + fprintf(stderr, +" InnoDB: Index corruption: rec offs %lu next offs %lu, page no %lu,\n" +"InnoDB: index %s, table %s. Run CHECK TABLE to table. You may need to\n" +"InnoDB: restore from a backup, or dump + drop + reimport the table.\n", + (ulint)(rec - buf_frame_align(rec)), next_offs, + buf_frame_get_page_no(rec), index->name, + index->table_name); + + err = DB_CORRUPTION; + + goto lock_wait_or_error; + } else { + /* The user may be dumping a corrupt table. Jump + over the corruption to recover as much as possible. */ + + fprintf(stderr, +"InnoDB: Index corruption: rec offs %lu next offs %lu, page no %lu,\n" +"InnoDB: index %s, table %s. We try to skip the rest of the page.\n", + (ulint)(rec - buf_frame_align(rec)), next_offs, + buf_frame_get_page_no(rec), index->name, + index->table_name); + + btr_pcur_move_to_last_on_page(pcur, &mtr); + + goto next_rec; + } + } + + if (srv_force_recovery > 0) { + if (!rec_validate(rec) || !btr_index_rec_validate(rec, index, + FALSE)) { + fprintf(stderr, +"InnoDB: Index record corruption: rec offs %lu next offs %lu, page no %lu,\n" +"InnoDB: index %s, table %s. We try to skip the record.\n", + (ulint)(rec - buf_frame_align(rec)), next_offs, + buf_frame_get_page_no(rec), index->name, + index->table_name); + + goto next_rec; + } + } + + /*-------------------------------------------------------------*/ if (unique_search_from_clust_index && btr_pcur_get_up_match(pcur) == dtuple_get_n_fields(search_tuple)) { From bfec3dab334b133cc7a23f42aa6810844833b608 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 18:34:52 +0200 Subject: [PATCH 078/246] ha_innodb.cc: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE sql/ha_innodb.cc: Try to skip over corrupt records in SELECT if innodb_force_recovery > 0; print more page hex dumps in CHECK TABLE --- sql/ha_innodb.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 47014e595fe..62ba435b1d2 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -250,6 +250,10 @@ convert_error_code_to_mysql( } else if (error == (int) DB_TOO_BIG_RECORD) { return(HA_ERR_TO_BIG_ROW); + + } else if (error == (int) DB_CORRUPTION) { + + return(HA_ERR_CRASHED); } else { return(-1); // Unknown error } @@ -3874,7 +3878,7 @@ innodb_show_status( if (innodb_skip) { my_message(ER_NOT_SUPPORTED_YET, - "Cannot call SHOW INNODB STATUS because skip-innodb is defined", + "Cannot call SHOW INNODB STATUS because skip-innodb is defined", MYF(0)); DBUG_RETURN(-1); } From 8c14ed4230fb808c4bc5d7664345a909eb190520 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 19:15:46 +0100 Subject: [PATCH 079/246] IGNORE/USE INDEX now work with HA_EXTRA_KEYREAD BitKeeper/etc/ignore: Added depcomp to the ignore list --- .bzrignore | 1 + mysql-test/r/select.result | 4 ++-- sql/sql_base.cc | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.bzrignore b/.bzrignore index 63e77a9e30b..0cc24f9dbf6 100644 --- a/.bzrignore +++ b/.bzrignore @@ -321,3 +321,4 @@ sql-bench/innotest1b sql-bench/innotest2 sql-bench/innotest2a sql-bench/innotest2b +depcomp diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 413b03130f6..5ac5de05f97 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -94,9 +94,9 @@ fld3 table type possible_keys key key_len ref rows Extra t2 ref fld3 fld3 30 const 1 where used; Using index table type possible_keys key key_len ref rows Extra -t2 index fld3 fld3 30 NULL 1199 where used; Using index +t2 ALL fld3 NULL NULL NULL 1199 where used table type possible_keys key key_len ref rows Extra -t2 index fld3 fld3 30 NULL 1199 where used; Using index +t2 ALL fld3 NULL NULL NULL 1199 where used table type possible_keys key key_len ref rows Extra t2 ref fld3 fld3 30 const 1 where used; Using index table type possible_keys key key_len ref rows Extra diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 6b445442058..fb120442385 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1834,6 +1834,7 @@ bool setup_tables(TABLE_LIST *tables) DBUG_RETURN(1); table->table->keys_in_use_for_query &= ~map; } + table->table->used_keys &= table->table->keys_in_use_for_query; } if (tablenr > MAX_TABLES) { From bb2ceda1b2b8bba35bcabcc63dba3d95c67fa85a Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Nov 2002 19:57:13 +0100 Subject: [PATCH 080/246] results fixed mysql-test/r/isam.result: fixed result for new errmsg mysql-test/r/select.result: fixed result for IGNORE/USE INDEX --- mysql-test/r/isam.result | 6 +++--- mysql-test/r/select.result | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result index d19352aad42..0f7224f52da 100644 --- a/mysql-test/r/isam.result +++ b/mysql-test/r/isam.result @@ -47,14 +47,14 @@ test.t1 optimize status OK check table t1,t2; Table Op Msg_type Msg_text test.t1 check status OK -test.t2 check error The handler for the table doesn't support check/repair +test.t2 check error The handler for the table doesn't support check repair table t1,t2; Table Op Msg_type Msg_text test.t1 repair status OK -test.t2 repair error The handler for the table doesn't support check/repair +test.t2 repair error The handler for the table doesn't support repair check table t2,t1; Table Op Msg_type Msg_text -test.t2 check error The handler for the table doesn't support check/repair +test.t2 check error The handler for the table doesn't support check test.t1 check status OK lock tables t1 write; check table t2,t1; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 1a40c5b11c3..fdcc7f9cdea 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -1331,10 +1331,10 @@ table type possible_keys key key_len ref rows Extra t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 index NULL fld3 30 NULL 1199 Using where; Using index +t2 ALL NULL NULL NULL NULL 1199 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 index NULL fld3 30 NULL 1199 Using where; Using index +t2 ALL NULL NULL NULL NULL 1199 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra t2 ref fld3 fld3 30 const 1 Using where; Using index From c88db89d6212a0ce560654d878d6dc68a14fc111 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 10 Nov 2002 09:39:00 +0200 Subject: [PATCH 081/246] Added 4.1 protocol description innobase/log/log0log.c: Removed compiler warnings --- Docs/internals.texi | 270 +++++++++++++++++++++++++++++++++++++++++ innobase/log/log0log.c | 4 +- 2 files changed, 272 insertions(+), 2 deletions(-) diff --git a/Docs/internals.texi b/Docs/internals.texi index 1f803f43a22..7e364774e39 100644 --- a/Docs/internals.texi +++ b/Docs/internals.texi @@ -1579,6 +1579,276 @@ fe 00 . . @c @printindex fn +@node 4.1 protocol,,, +@subchapter MySQL 4.1 protocol + +@node 4.1 protocol changes,,, +@section Changes to 4.0 protocol in 4.1 + +All basic package handling is identical to 4.0. When communication +with an old 4.0 or 3.x client we will use the old protocol. + +The new things that we support with 4.1 are: + +@itemize @bullet +@item +Warnings +@item +Prepared statements +@item +Binary protocol (will be much faster than the current protocol that +converts everything to strings) +@end itemize + + +What has changed in 4.1 are: + +@itemize @bullet +@item +A lot of new field information (database, real table name etc) +@item +The 'ok' packet has more status fields +@item +The 'end' packet (send last for each result set) now contains some +extra information +@item +New protocol for prepared statements. In this case all parameters and +results will sent as binary (low-byte-first). +@end itemize + + +@node 4.1 field package,,, +@section 4.1 field description package + +The field description package is sent as a response to a query that +contains a result set. It can be distinguished from a ok package by +the fact that the first byte can't be 0 for a field package. +@xref {4.1 ok package}. + +The header package has the following structure: + +@multitable @columnfractions .10 .90 +@item Size @tab Comment +@item 1-9 @tab Number of columns in result set (never 0) +@item 1-9 @tab Extra information sent be some command (SHOW COLUMNS +uses this to send the number of rows in the table) +@end multitable + +This package is always followed by a field description set. +@xref{4.1 field desc}. + +@node 4.1 field desc,,, +@section 4.1 field description result set + +The field description result set contains the meta info for a result set. + +@multitable @columnfractions .20 .80 +@item Type @tab Comment +@item string @tab Database name +@item string @tab Table name alias (or table name if no alias) +@item string @tab Real table name +@item string @tab Alias for column name (or column name if not used) +@item 3 byte int @tab Length of column definition +@item 1 byte int @tab Enum value for field type +@item 3 byte int @tab 2 byte column flags (NOT_NULL_FLAG etc..) + 1 byte number of decimals. +@item string int @tab Default value, only set when using mysql_list_fields(). +@end multitable + + +@node 4.1 ok package,,, +@section 4.1 ok package + +The ok package is the first that is sent as an response for a query +that didn't return a result set. + +The ok package has the following structure: + +@multitable @columnfractions .10 .90 +@item Size @tab Comment +@item 1 @tab 0 ; Marker for ok package +@item 1-9 @tab Affected rows +@item 1-9 @tab Last insert id (0 if one wasn't used) +@item 2 @tab Server status; Can be used by client to check if we are inside an transaction +@item 2 @tab Warning count +@item 1-9 @tab Message length (optional) +@item xxx @tab Message (optional) +@end multitable + +Size 1-9 means that the parameter is packed in to 1-9 bytes depending on +the value. (See function sql/net_pkg.cc::net_store_length). + +The message is optional. For example for multi line INSERT it +contains a string for how many rows was inserted / deleted. + + +@node 4.1 end package,,, +@section 4.1 end package + +The end package is sent as the last package for + +@itemize @bullet +@item +End of field information +@item +End of parameter type information +@item +End of result set +@end itemize + +The end package has the following structure: + +@multitable @columnfractions .10 .90 +@item Size @tab Comment +@item 1 @tab 254 ; Marker for EOF package +@item 2 @tab Warning count +@item 2 @tab Status flags (For flags like SERVER_STATUS_MORE_RESULTS) +@end multitable + +Note that a normal package may start with byte 254, which means +'length stored in 9 bytes'. One can different between these cases +by checking the packet length < 9 bytes (in which case it's and end +packet). + + +@node 4.1 error package +@section 4.1 error package. + +The error package is sent when something goes wrong. +The error package has the following structure: + +@multitable @columnfractions .10 .90 +@item Size @tab Comment +@item 1 @tab 255 Error package marker +@item 1-255 @tab Null terminated error message +@end multitable + +The client/server protocol is designed in such a way that a package +can only start with 255 if it's an error package. + + +@node 4.1 prep init,,, +@section 4.1 prepared statement init package + +This is the return package when one sends a query with the COM_PREPARE +command. + +@multitable @columnfractions .10 .90 +@item Size @tab Comment +@item 4 @tab Statement handler id +@item 2 @tab Number of columns in result set +@item 2 @tab Number of parameters in query +@end multitable + +After this, there is a packet that contains the following for each +parameter in the query: + +@multitable @columnfractions .10 .90 +@item Size @tab Comment +@item 2 @tab Enum value for field type. (MYSQL_TYPE_UNKNOWN if not known) +@item 2 @tab 2 byte column flags (NOT_NULL_FLAG etc) +@item 1 @tab Number of decimals +@item 4 @tab Max column length. +@end itemize + +Note that the above is not yet in 4.1 but will be added this month. + +As MySQL can have a parameter 'anywhere' it will in many cases not be +able to provide the optimal information for all parameters. + +If number of columns, in the header package, is not 0 then the +prepared statement will contain a result set. In this case the package +is followed by a field description result set. @xref{4.1 field descr}. + + +@node 4.1 long data,,, +@section 4.1 long data handling + +This is used by mysql_send_long_data() to set any parameter to a string +value. One can call mysql_send_long_data() multiple times for the +same parameter; The server will concatenate the results to a one big +string. + +The server will not require an end package for the string. +mysql_send_long_data() is responsible updating a flag that all data +has been sent. (Ie; That the last call to mysql_send_long_data() has +the 'last_data' flag set). + +This package is sent from client -> server: + +@multitable @columnfractions .10 .90 +@item Size @tab Comment +@item 4 @tab Statement handler +@item 2 @tab Parameter number +@item 2 @tab Type of parameter (not used at this point) +@item # @tab data (Rest of package) +@end itemize + +The server will NOT send an @code{ok} or @code{error} package in +responce for this. If there is any errors (like to big string), one +will get the error when calling execute. + +@node 4.1 execute,,, +@section 4.1 execute + +On execute we send all parameters to the server in a COM_EXECUTE +package. + +The package contains the following information: + +@multitable @columnfractions .30 .70 +@item Size @tab Comment +@item (param_count+7)/8 @tab Null bit map +@item 1 @tab new_parameter_bound flag. Is set to 1 for first +execute or if one has rebound the parameters. +@item 2*param_count @tab Type of parameters (only given if new_parameter_bound flag is 1) +@item # @tab Parameter data, repeated for each parameter that are +NOT NULL and not used with mysql_send_long_data(). +@end itemize + +The null-bit-map is for all parameters (including parameters sent with +'mysql_send_long_data). If parameter 0 is NULL, then bit 0 in the +null-bit-map should be 1 (ie: first byte should be 1) + +The parameters are stored the following ways: + +@multitable @columnfractions .20 .10 .70 +@item Type @tab Size @tab Comment +@item tynyint @tab 1 @tab One byte integer +@item short @tab 2 @tab +@item int @tab 4 @tab +@item longlong @tab 8 @tab +@item float @tab 4 @tab +@item double @tab 8 @tab +@item string @tab 1-9 + # @tab Packed string length + string +@end multitable + +The result for this will be either an ok package or a binary result +set. + +@node 4.1 binary result,,, +@section 4.1 binary result set + +A binary result are sent the following way. + +For each result row: + +@itemize +@item +null bit map with first two bits set to 01 (bit 0,1 value 1) +@item +parameter data, repeated for each not null parameter. +@end itemize + +The idea with the reserving two bits in the null map is that we can +use standard error (first byte 255) and ok packages (first byte 0) +to end a result sets. + +Except that the null-bit-map is shifted two steps, the server is +sending the data to the client the same way that the server is sending +bound parameters to the client. The server is always sending the data +as type given for 'column type' for respective column. It's up to the +client to convert the parameter to the requested type. + @node Fulltext Search, , protocol, Top @chapter Fulltext Search in MySQL diff --git a/innobase/log/log0log.c b/innobase/log/log0log.c index c798a08e2de..f9b785ccbd5 100644 --- a/innobase/log/log0log.c +++ b/innobase/log/log0log.c @@ -1654,8 +1654,8 @@ log_reset_first_header_and_checkpoint( lsn = ut_dulint_add(start, LOG_BLOCK_HDR_SIZE); /* Write the label of ibbackup --restore */ - sprintf(hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, "ibbackup "); - ut_sprintf_timestamp(hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP + sprintf((char*) hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP, "ibbackup "); + ut_sprintf_timestamp((char*) hdr_buf + LOG_FILE_WAS_CREATED_BY_HOT_BACKUP + strlen("ibbackup ")); buf = hdr_buf + LOG_CHECKPOINT_1; From 74985d1353ac1acf478047c8c8393b4323850342 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 10 Nov 2002 14:05:17 +0400 Subject: [PATCH 082/246] Fixes for fault about String::copy() --- client/mysql.cc | 4 ++-- client/sql_string.cc | 51 ++++++++++++++++++++++++++++---------------- client/sql_string.h | 43 ++++++++++++++++++++----------------- 3 files changed, 59 insertions(+), 39 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index fbd3b13ca83..e4a481a5290 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -952,7 +952,7 @@ static bool add_line(String &buffer,char *line,char *in_string) } if ((com=find_command(NullS,(char) inchar))) { - const String tmp(line,(uint) (out-line)); + const String tmp(line,(uint) (out-line), system_charset_info); buffer.append(tmp); if ((*com->func)(&buffer,pos-1) > 0) return 1; // Quit @@ -1709,7 +1709,7 @@ print_table_data(MYSQL_RES *result) print_field_types(result); mysql_field_seek(result,0); } - separator.copy("+",1); + separator.copy("+",1,system_charset_info); while ((field = mysql_fetch_field(result))) { uint length= column_names ? (uint) strlen(field->name) : 0; diff --git a/client/sql_string.cc b/client/sql_string.cc index 65854ece0ef..f0f31004544 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -40,19 +40,16 @@ extern void sql_element_free(void *ptr); bool String::real_alloc(uint32 arg_length) { arg_length=ALIGN_SIZE(arg_length+1); + str_length=0; if (Alloced_length < arg_length) { free(); if (!(Ptr=(char*) my_malloc(arg_length,MYF(MY_WME)))) - { - str_length=0; return TRUE; - } Alloced_length=arg_length; alloced=1; } Ptr[0]=0; - str_length=0; return FALSE; } @@ -94,36 +91,40 @@ bool String::realloc(uint32 alloc_length) return FALSE; } -bool String::set(longlong num) +bool String::set(longlong num, CHARSET_INFO *cs) { if (alloc(21)) return TRUE; str_length=(uint32) (longlong10_to_str(num,Ptr,-10)-Ptr); + str_charset=cs; return FALSE; } -bool String::set(ulonglong num) +bool String::set(ulonglong num, CHARSET_INFO *cs) { if (alloc(21)) return TRUE; str_length=(uint32) (longlong10_to_str(num,Ptr,10)-Ptr); + str_charset=cs; return FALSE; } -bool String::set(double num,uint decimals) +bool String::set(double num,uint decimals, CHARSET_INFO *cs) { char buff[331]; + + str_charset=cs; if (decimals >= NOT_FIXED_DEC) { sprintf(buff,"%.14g",num); // Enough for a DATETIME - return copy(buff, (uint32) strlen(buff)); + return copy(buff, (uint32) strlen(buff), my_charset_latin1); } #ifdef HAVE_FCONVERT int decpt,sign; char *pos,*to; VOID(fconvert(num,(int) decimals,&decpt,&sign,buff+1)); - if (!isdigit(buff[1])) + if (!my_isdigit(system_charset_info, buff[1])) { // Nan or Inf pos=buff+1; if (sign) @@ -181,7 +182,7 @@ end: #else sprintf(buff,"%.*f",(int) decimals,num); #endif - return copy(buff,(uint32) strlen(buff)); + return copy(buff,(uint32) strlen(buff), my_charset_latin1); #endif } @@ -203,16 +204,18 @@ bool String::copy(const String &str) str_length=str.str_length; bmove(Ptr,str.Ptr,str_length); // May be overlapping Ptr[str_length]=0; + str_charset=str.str_charset; return FALSE; } -bool String::copy(const char *str,uint32 arg_length) +bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *cs) { if (alloc(arg_length)) return TRUE; if ((str_length=arg_length)) memcpy(Ptr,str,arg_length); Ptr[arg_length]=0; + str_charset=cs; return FALSE; } @@ -489,7 +492,7 @@ void String::qs_append(double d) void String::qs_append(double *d) { double ld; - float8get(ld, d); + float8get(ld, (char*) d); qs_append(ld); } @@ -523,12 +526,23 @@ int sortcmp(const String *x,const String *y) #endif /* USE_STRCOLL */ x_len-=len; // For easy end space test y_len-=len; - while (len--) + if (x->str_charset->sort_order) { - if (x->str_charset->sort_order[(uchar) *s++] != + while (len--) + { + if (x->str_charset->sort_order[(uchar) *s++] != x->str_charset->sort_order[(uchar) *t++]) - return ((int) x->str_charset->sort_order[(uchar) s[-1]] - - (int) x->str_charset->sort_order[(uchar) t[-1]]); + return ((int) x->str_charset->sort_order[(uchar) s[-1]] - + (int) x->str_charset->sort_order[(uchar) t[-1]]); + } + } + else + { + while (len--) + { + if (*s++ != *t++) + return ((int) s[-1] - (int) t[-1]); + } } #ifndef CMP_ENDSPACE /* Don't compare end space in strings */ @@ -586,6 +600,7 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length) return from; // Actually an error if ((to->str_length=min(from->str_length,from_length))) memcpy(to->Ptr,from->Ptr,to->str_length); + to->str_charset=from->str_charset; return to; } @@ -658,7 +673,7 @@ int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *str_end, { // Found wild_many wildstr++; /* Remove any '%' and '_' from the wild search string */ - for ( ; wildstr != wildend ; wildstr++) + for (; wildstr != wildend ; wildstr++) { if (*wildstr == wild_many) continue; @@ -787,7 +802,7 @@ int wild_compare(const char *str,const char *str_end, { // Found wild_many wildstr++; /* Remove any '%' and '_' from the wild search string */ - for ( ; wildstr != wildend ; wildstr++) + for (; wildstr != wildend ; wildstr++) { if (*wildstr == wild_many) continue; diff --git a/client/sql_string.h b/client/sql_string.h index 811e49a0d02..4ac4308f113 100644 --- a/client/sql_string.h +++ b/client/sql_string.h @@ -46,22 +46,22 @@ public: String(uint32 length_arg) { alloced=0; Alloced_length=0; (void) real_alloc(length_arg); - str_charset=default_charset_info; + str_charset=default_charset_info; } - String(const char *str) + String(const char *str, CHARSET_INFO *cs) { Ptr=(char*) str; str_length=(uint) strlen(str); Alloced_length=0; alloced=0; - str_charset=default_charset_info; + str_charset=cs; } - String(const char *str,uint32 len) + String(const char *str,uint32 len, CHARSET_INFO *cs) { Ptr=(char*) str; str_length=len; Alloced_length=0; alloced=0; - str_charset=default_charset_info; + str_charset=cs; } - String(char *str,uint32 len) + String(char *str,uint32 len, CHARSET_INFO *cs) { Ptr=(char*) str; Alloced_length=str_length=len; alloced=0; - str_charset=default_charset_info; + str_charset=cs; } String(const String &str) { @@ -74,6 +74,7 @@ public: { sql_element_free(ptr_arg); } ~String() { free(); } + inline void set_charset(CHARSET_INFO *charset) { str_charset=charset; } inline CHARSET_INFO *charset() const { return str_charset; } inline uint32 length() const { return str_length;} inline uint32 alloced_length() const { return Alloced_length;} @@ -102,28 +103,31 @@ public: Alloced_length=str.Alloced_length-offset; else Alloced_length=0; + str_charset=str.str_charset; } - inline void set(char *str,uint32 arg_length) + inline void set(char *str,uint32 arg_length, CHARSET_INFO *cs) { free(); Ptr=(char*) str; str_length=Alloced_length=arg_length ; alloced=0; + str_charset=cs; } - inline void set(const char *str,uint32 arg_length) + inline void set(const char *str,uint32 arg_length, CHARSET_INFO *cs) { free(); Ptr=(char*) str; str_length=arg_length; Alloced_length=0 ; alloced=0; + str_charset=cs; } - inline void set_quick(char *str,uint32 arg_length) + inline void set_quick(char *str,uint32 arg_length, CHARSET_INFO *cs) { if (!alloced) { Ptr=(char*) str; str_length=Alloced_length=arg_length; } + str_charset=cs; } - bool set(longlong num); - /* bool set(long num); */ - bool set(ulonglong num); - bool set(double num,uint decimals=2); + bool set(longlong num, CHARSET_INFO *cs); + bool set(ulonglong num, CHARSET_INFO *cs); + bool set(double num,uint decimals, CHARSET_INFO *cs); inline void free() { if (alloced) @@ -174,7 +178,7 @@ public: bool copy(); // Alloc string if not alloced bool copy(const String &s); // Allocate new string - bool copy(const char *s,uint32 arg_length); // Allocate new string + bool copy(const char *s,uint32 arg_length, CHARSET_INFO *cs); // Allocate new string bool append(const String &s); bool append(const char *s,uint32 arg_length=0); bool append(IO_CACHE* file, uint32 arg_length); @@ -208,16 +212,17 @@ public: uint32 numchars(); int charpos(int i,uint32 offset=0); -// added by Holyfoot for "geometry" needs int reserve(uint32 space_needed) { return realloc(str_length + space_needed); } int reserve(uint32 space_needed, uint32 grow_by); -// these append operations do NOT check alloced memory -// q_*** methods writes values of parameters itself -// qs_*** methods writes string representation of value + /* + The following append operations do NOT check alloced memory + q_*** methods writes values of parameters itself + qs_*** methods writes string representation of value + */ void q_append(const char &c) { Ptr[str_length++] = c; From 1a7533074ebe8e6ce1ed6af999a46be86f08d684 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 10 Nov 2002 14:45:21 +0400 Subject: [PATCH 083/246] Fix syntax to be more clean: SHOW CREATE DATABASE [WITH IF NOT EXISTS] dbname --- client/mysqldump.c | 2 +- sql/sql_yacc.yy | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 9470786705d..c99f1429a8b 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1252,7 +1252,7 @@ static int init_dumping(char *database) MYSQL_ROW row; MYSQL_RES *dbinfo; - sprintf(qbuf,"SHOW CREATE DATABASE IF NOT EXISTS %s",database); + sprintf(qbuf,"SHOW CREATE DATABASE WITH IF NOT EXISTS %s",database); if (mysql_query(sock, qbuf) || !(dbinfo = mysql_store_result(sock))) { diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 6235d93c18f..d432a76770d 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -549,7 +549,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); type int_type real_type order_dir opt_field_spec lock_option udf_type if_exists opt_local opt_table_options table_options table_option opt_if_not_exists opt_var_type opt_var_ident_type - delete_option + delete_option opt_with_if_not_exists %type ULONG_NUM raid_types merge_insert_types @@ -878,6 +878,10 @@ opt_if_not_exists: /* empty */ { $$= 0; } | IF NOT EXISTS { $$=HA_LEX_CREATE_IF_NOT_EXISTS; }; +opt_with_if_not_exists: + /* empty */ { $$= 0; } + | WITH IF NOT EXISTS { $$=HA_LEX_CREATE_IF_NOT_EXISTS; }; + opt_create_table_options: /* empty */ | create_table_options; @@ -3106,7 +3110,7 @@ show_param: lex->grant_user=$3; lex->grant_user->password.str=NullS; } - | CREATE DATABASE opt_if_not_exists ident + | CREATE DATABASE opt_with_if_not_exists ident { Lex->sql_command=SQLCOM_SHOW_CREATE_DB; Lex->create_info.options=$3; From 992075e209b5cbed30fd23fc95b2618dc8e6bfe3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 10 Nov 2002 16:14:39 +0400 Subject: [PATCH 084/246] New field snprintf() in CHARSET_INFO structure --- include/m_ctype.h | 8 +++- mysys/charset.c | 1 + strings/ctype-big5.c | 3 +- strings/ctype-bin.c | 3 +- strings/ctype-czech.c | 3 +- strings/ctype-euc_kr.c | 3 +- strings/ctype-gb2312.c | 3 +- strings/ctype-gbk.c | 3 +- strings/ctype-latin1_de.c | 3 +- strings/ctype-simple.c | 64 ++++++++++++++++++++++++++ strings/ctype-sjis.c | 3 +- strings/ctype-tis620.c | 3 +- strings/ctype-ujis.c | 3 +- strings/ctype-utf8.c | 94 ++++++++++++++++++++++++++++++++++++++- strings/ctype-win1250ch.c | 3 +- strings/ctype.c | 72 ++++++++++++++++++++---------- 16 files changed, 234 insertions(+), 38 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index 029a1a5db39..6a964bf3b97 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -112,8 +112,12 @@ typedef struct charset_info_st uint (*hash_caseup)(struct charset_info_st *cs, const byte *key, uint len); void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, ulong *nr1, ulong *nr2); - + char max_sort_char; /* For LIKE optimization */ + + /* Charset dependant snprintf() */ + int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt, ...); + } CHARSET_INFO; @@ -150,6 +154,8 @@ extern int my_strncasecmp_8bit(CHARSET_INFO * cs, const char *, const char *, ui int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e); int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); +int my_snprintf_8bit(struct charset_info_st *, char *to, uint n, const char *fmt, ...); + #ifdef USE_MB /* Functions for multibyte charsets */ diff --git a/mysys/charset.c b/mysys/charset.c index 9c977c7d145..3ad4b4e8faa 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -388,6 +388,7 @@ static CHARSET_INFO *add_charset(CHARSET_INFO *cs, myf flags) cs->wc_mb = my_wc_mb_8bit; cs->hash_caseup = my_hash_caseup_simple; cs->hash_sort = my_hash_sort_simple; + cs->snprintf = my_snprintf_8bit; set_max_sort_char(cs); create_fromuni(cs); diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index b9011ac12aa..8dff0d860a0 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -6247,7 +6247,8 @@ CHARSET_INFO my_charset_big5 = my_strncasecmp_mb, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 0a90a1e26e5..e479053071b 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -177,7 +177,8 @@ static CHARSET_INFO my_charset_bin_st = my_strncasecmp_bin, /* strncasecmp */ my_hash_caseup_bin, /* hash_caseup */ my_hash_sort_bin, /* hash_sort */ - 255 /* max_sort_char */ + 255, /* max_sort_char */ + my_snprintf_8bit /* snprintf */ }; diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index e6cab722a8e..6ce2bf13fce 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -625,7 +625,8 @@ CHARSET_INFO my_charset_czech = my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; #endif diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index a7d6044b378..154fada271e 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8664,7 +8664,8 @@ CHARSET_INFO my_charset_euc_kr = my_strncasecmp_mb, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; #endif diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index e931c7c1f31..ecd15830b3f 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -5714,7 +5714,8 @@ CHARSET_INFO my_charset_gb2312 = my_strncasecmp_mb, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; #endif diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index 0f2de81ccb6..bdfdfb9b256 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -9902,7 +9902,8 @@ CHARSET_INFO my_charset_gbk = my_strncasecmp_mb, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index 040bd11b5e9..574fbf41da3 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -443,7 +443,8 @@ CHARSET_INFO my_charset_latin1_de = my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; #endif diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index f27b113376b..9fef27cad10 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -15,8 +15,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include +#include "my_sys.h" #include "m_ctype.h" +#include "m_string.h" #include "dbug.h" +#include "stdarg.h" #include "assert.h" int my_strnxfrm_simple(CHARSET_INFO * cs, @@ -120,6 +123,67 @@ int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, } +static int my_vsnprintf_8bit(char *to, size_t n, const char* fmt, va_list ap) +{ + char *start=to, *end=to+n-1; + for (; *fmt ; fmt++) + { + if (fmt[0] != '%') + { + if (to == end) /* End of buffer */ + break; + *to++= *fmt; /* Copy ordinary char */ + continue; + } + /* Skip if max size is used (to be compatible with printf) */ + fmt++; + while (my_isdigit(system_charset_info,*fmt) || *fmt == '.' || *fmt == '-') + fmt++; + if (*fmt == 'l') + fmt++; + if (*fmt == 's') /* String parameter */ + { + reg2 char *par = va_arg(ap, char *); + uint plen,left_len = (uint)(end-to); + if (!par) par = (char*)"(null)"; + plen = (uint) strlen(par); + if (left_len <= plen) + plen = left_len - 1; + to=strnmov(to,par,plen); + continue; + } + else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ + { + register int iarg; + if ((uint) (end-to) < 16) + break; + iarg = va_arg(ap, int); + if (*fmt == 'd') + to=int10_to_str((long) iarg,to, -10); + else + to=int10_to_str((long) (uint) iarg,to,10); + continue; + } + /* We come here on '%%', unknown code or too long parameter */ + if (to == end) + break; + *to++='%'; /* % used as % or unknown code */ + } + DBUG_ASSERT(to <= end); + *to='\0'; /* End of errmessage */ + return (uint) (to - start); +} + + +int my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), + char* to, uint n, const char* fmt, ...) +{ + va_list args; + va_start(args,fmt); + return my_vsnprintf_8bit(to, n, fmt, args); +} + + #ifndef NEW_HASH_FUNCTION diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 9c8ac8d0c16..d657405137e 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -4489,7 +4489,8 @@ CHARSET_INFO my_charset_sjis = my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; #endif diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 88549e7ee69..de1a0e170fb 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -717,7 +717,8 @@ CHARSET_INFO my_charset_tis620 = my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index cb1da080951..85b51b0469c 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8458,7 +8458,8 @@ CHARSET_INFO my_charset_ujis = my_strncasecmp_mb, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 81671e28c3f..707ca8f5c77 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1983,7 +1983,8 @@ CHARSET_INFO my_charset_utf8 = my_strncasecmp_utf8, my_hash_caseup_utf8,/* hash_caseup */ my_hash_sort_utf8, /* hash_sort */ - 0 + 0, + my_snprintf_8bit }; @@ -2345,6 +2346,94 @@ static int my_mbcharlen_ucs2(CHARSET_INFO *cs __attribute__((unused)) , } +#include +#include +#include + +static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap) +{ + char *start=dst, *end=dst+n-1; + for (; *fmt ; fmt++) + { + if (fmt[0] != '%') + { + if (dst == end) /* End of buffer */ + break; + + *dst++='\0'; *dst++= *fmt; /* Copy ordinary char */ + continue; + } + + fmt++; + + /* Skip if max size is used (to be compatible with printf) */ + while (my_isdigit(system_charset_info,*fmt) || *fmt == '.' || *fmt == '-') + fmt++; + + if (*fmt == 'l') + fmt++; + + if (*fmt == 's') /* String parameter */ + { + reg2 char *par = va_arg(ap, char *); + uint plen; + uint left_len = (uint)(end-dst); + if (!par) par = (char*)"(null)"; + plen = (uint) strlen(par); + if (left_len <= plen*2) + plen = left_len/2 - 1; + dst=strnmov(dst,par,plen); + for ( ; plen ; plen--, dst++, par++) + { + dst[0]='\0'; + dst[1]=par[0]; + } + continue; + } + else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ + { + register int iarg; + char nbuf[16]; + char *pbuf=nbuf; + + if ((uint) (end-dst) < 32) + break; + iarg = va_arg(ap, int); + if (*fmt == 'd') + dst=int10_to_str((long) iarg, nbuf, -10); + else + dst=int10_to_str((long) (uint) iarg,nbuf,10); + + for (; pbuf[0]; pbuf++) + { + *dst++='\0'; + *dst++=*pbuf; + } + continue; + } + + /* We come here on '%%', unknown code or too long parameter */ + if (dst == end) + break; + *dst++='\0'; + *dst++='%'; /* % used as % or unknown code */ + } + + DBUG_ASSERT(dst <= end); + *dst='\0'; /* End of errmessage */ + return (uint) (dst - start); +} + +static int my_snprintf_ucs2(CHARSET_INFO *cs __attribute__((unused)) + ,char* to, uint n, const char* fmt, ...) +{ + va_list args; + va_start(args,fmt); + return my_vsnprintf_ucs2(to, n, fmt, args); +} + + + CHARSET_INFO my_charset_ucs2 = { 35, /* number */ @@ -2376,7 +2465,8 @@ CHARSET_INFO my_charset_ucs2 = my_strncasecmp_ucs2, my_hash_caseup_ucs2,/* hash_caseup */ my_hash_sort_ucs2, /* hash_sort */ - 0 + 0, + my_snprintf_ucs2 }; diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index f64eddd2c2b..64697ce08f3 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -651,7 +651,8 @@ CHARSET_INFO my_charset_win1250ch = my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }; diff --git a/strings/ctype.c b/strings/ctype.c index 1358fced15c..8fc189f4b7f 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -2838,7 +2838,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -2874,7 +2875,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -2909,7 +2911,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -2944,7 +2947,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -2980,7 +2984,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3015,7 +3020,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3050,7 +3056,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3085,7 +3092,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3121,7 +3129,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3156,7 +3165,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3191,7 +3201,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3226,7 +3237,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3261,7 +3273,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3296,7 +3309,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3331,7 +3345,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3367,7 +3382,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3402,7 +3418,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3438,7 +3455,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3474,7 +3492,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3509,7 +3528,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3544,7 +3564,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3579,7 +3600,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3614,7 +3636,8 @@ static CHARSET_INFO compiled_charsets[] = { my_strncasecmp_8bit, my_hash_caseup_simple, my_hash_sort_simple, - 0 + 0, + my_snprintf_8bit }, #endif @@ -3650,7 +3673,8 @@ static CHARSET_INFO compiled_charsets[] = { NULL, NULL, /* hash_caseup */ NULL, /* hash_sort */ - 0 + 0, + NULL } }; From 446a5b0ad584bca06a83f96acc15a2e085d93f75 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 10 Nov 2002 17:44:36 +0400 Subject: [PATCH 085/246] my_snprintf_ucs2 bug fix --- strings/ctype-utf8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 707ca8f5c77..87a91f18e5f 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -2382,7 +2382,7 @@ static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap) plen = (uint) strlen(par); if (left_len <= plen*2) plen = left_len/2 - 1; - dst=strnmov(dst,par,plen); + for ( ; plen ; plen--, dst++, par++) { dst[0]='\0'; @@ -2400,9 +2400,9 @@ static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap) break; iarg = va_arg(ap, int); if (*fmt == 'd') - dst=int10_to_str((long) iarg, nbuf, -10); + int10_to_str((long) iarg, nbuf, -10); else - dst=int10_to_str((long) (uint) iarg,nbuf,10); + int10_to_str((long) (uint) iarg,nbuf,10); for (; pbuf[0]; pbuf++) { From 828c0e9ac197f92d4b6d11aa58c312aef2c12c20 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 00:15:38 +0200 Subject: [PATCH 086/246] fix of yet another join_free bug decreased number of check of "!join->select_lex->dependent" mysql-test/r/subselect.result: test of yet another join_free bug mysql-test/t/subselect.test: test of yet another join_free bug --- mysql-test/r/subselect.result | 21 +++++++++++++++ mysql-test/t/subselect.test | 26 ++++++++++++++++++- sql/sql_select.cc | 48 +++++++++++++++++++++++------------ 3 files changed, 78 insertions(+), 17 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 5674bf3c473..4eaacfe66f7 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -220,3 +220,24 @@ id select_type table type possible_keys key key_len ref rows Extra 2 SUBSELECT No tables used 3 UNION No tables used drop table searchconthardwarefr3; +drop table if exists forumconthardwarefr7, searchconthardwarefr7; +CREATE TABLE `forumconthardwarefr7` ( +`numeropost` mediumint(8) unsigned NOT NULL auto_increment, +`maxnumrep` int(10) unsigned NOT NULL default '0', +PRIMARY KEY (`numeropost`), +UNIQUE KEY `maxnumrep` (`maxnumrep`) +) TYPE=MyISAM ROW_FORMAT=FIXED; +INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (40143,1),(43506,2); +CREATE TABLE `searchconthardwarefr7` ( +`mot` varchar(30) NOT NULL default '', +`topic` mediumint(8) unsigned NOT NULL default '0', +`date` date NOT NULL default '0000-00-00', +`pseudo` varchar(35) NOT NULL default '', +PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`) +) TYPE=MyISAM ROW_FORMAT=DYNAMIC; +INSERT INTO searchconthardwarefr7 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); +SELECT numeropost,maxnumrep FROM forumconthardwarefr7 WHERE exists (SELECT 1 FROM searchconthardwarefr7 WHERE (mot='joce') AND date >= '2002-10-21' AND forumconthardwarefr7.numeropost = searchconthardwarefr7.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; +numeropost maxnumrep +43506 2 +40143 1 +drop table forumconthardwarefr7, searchconthardwarefr7; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 841e98dd96c..12df155bc7f 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -114,4 +114,28 @@ SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL -- error 1240 SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; EXPLAIN SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1); -drop table searchconthardwarefr3; \ No newline at end of file +drop table searchconthardwarefr3; + +drop table if exists forumconthardwarefr7, searchconthardwarefr7; +CREATE TABLE `forumconthardwarefr7` ( + `numeropost` mediumint(8) unsigned NOT NULL auto_increment, + `maxnumrep` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`numeropost`), + UNIQUE KEY `maxnumrep` (`maxnumrep`) +) TYPE=MyISAM ROW_FORMAT=FIXED; + +INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (40143,1),(43506,2); + +CREATE TABLE `searchconthardwarefr7` ( + `mot` varchar(30) NOT NULL default '', + `topic` mediumint(8) unsigned NOT NULL default '0', + `date` date NOT NULL default '0000-00-00', + `pseudo` varchar(35) NOT NULL default '', + PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`) + ) TYPE=MyISAM ROW_FORMAT=DYNAMIC; + +INSERT INTO searchconthardwarefr7 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); + +SELECT numeropost,maxnumrep FROM forumconthardwarefr7 WHERE exists (SELECT 1 FROM searchconthardwarefr7 WHERE (mot='joce') AND date >= '2002-10-21' AND forumconthardwarefr7.numeropost = searchconthardwarefr7.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; + +drop table forumconthardwarefr7, searchconthardwarefr7; \ No newline at end of file diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 674caed0cd0..ecf06f0971a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2911,27 +2911,43 @@ join_free(JOIN *join) */ if (join->tables > join->const_tables) // Test for not-const tables free_io_cache(join->table[join->const_tables]); - for (tab=join->join_tab,end=tab+join->tables ; tab != end ; tab++) - { - delete tab->select; - delete tab->quick; - x_free(tab->cache.buff); - if (tab->table) + if (join->select_lex->dependent) + for (tab=join->join_tab,end=tab+join->tables ; tab != end ; tab++) { - if (tab->table->key_read) + if (tab->table) { - tab->table->key_read=0; - tab->table->file->extra(HA_EXTRA_NO_KEYREAD); + if (tab->table->key_read) + { + tab->table->key_read= 0; + tab->table->file->extra(HA_EXTRA_NO_KEYREAD); + } + /* Don't free index if we are using read_record */ + if (!tab->read_record.table) + tab->table->file->index_end(); } - /* Don't free index if we are using read_record */ - if (!tab->read_record.table) - tab->table->file->index_end(); } - end_read_record(&tab->read_record); + else + { + for (tab=join->join_tab,end=tab+join->tables ; tab != end ; tab++) + { + delete tab->select; + delete tab->quick; + x_free(tab->cache.buff); + if (tab->table) + { + if (tab->table->key_read) + { + tab->table->key_read= 0; + tab->table->file->extra(HA_EXTRA_NO_KEYREAD); + } + /* Don't free index if we are using read_record */ + if (!tab->read_record.table) + tab->table->file->index_end(); + } + end_read_record(&tab->read_record); + } + join->table= 0; } - //TODO: is enough join_free at the end of mysql_select? - if (!join->select_lex->dependent) - join->table=0; } /* We are not using tables anymore From 2d14fa5b39694a347c2ac97f16fc2c68a2f741a4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 00:08:42 +0100 Subject: [PATCH 087/246] disable chmod in bdb scripts - bk doesn't like somebody messing with permissions delete auto-generated files remove in-place editing BitKeeper/deleted/.del-ex_apprec_auto.c~6e4c8882b1f0fe9d: Delete: bdb/examples_c/ex_apprec/ex_apprec_auto.c BitKeeper/deleted/.del-ex_apprec_auto.h~d01f1e472bf1b59f: Delete: bdb/examples_c/ex_apprec/ex_apprec_auto.h BitKeeper/deleted/.del-ex_apprec_template~4157a705d73c1209: Delete: bdb/examples_c/ex_apprec/ex_apprec_template bdb/rpc_server/c/db_server_proc.c.in: Rename: bdb/rpc_server/c/db_server_proc.c -> bdb/rpc_server/c/db_server_proc.c.in BitKeeper/deleted/.del-rpc_defs.in~bfc9820a618d5926: Delete: bdb/dbinc_auto/rpc_defs.in BitKeeper/deleted/.del-db_server.h~1c77cc0d19f3ecf: Delete: bdb/dbinc_auto/db_server.h BitKeeper/deleted/.del-db_server_proc.sed~94a351b3e31c0ad0: Delete: bdb/rpc_server/c/db_server_proc.sed BitKeeper/deleted/.del-db_server_svc.c~66ae3c56737e07ab: Delete: bdb/rpc_server/c/db_server_svc.c BitKeeper/deleted/.del-db_server_xdr.c~518231ed78b9cdcf: Delete: bdb/rpc_server/c/db_server_xdr.c BitKeeper/deleted/.del-gen_db_server.c~51935e227c7c23ac: Delete: bdb/rpc_server/c/gen_db_server.c bdb/dist/RELEASE: disable chmod in bdb scripts - bk doesn't like somebody messing with permissions bdb/dist/s_crypto: disable chmod in bdb scripts - bk doesn't like somebody messing with permissions bdb/dist/s_perm: disable chmod in bdb scripts - bk doesn't like somebody messing with permissions bdb/dist/s_recover: disable chmod in bdb scripts - bk doesn't like somebody messing with permissions bdb/dist/s_rpc: NEVER modify files in-place!!! bdb/dist/s_symlink: disable chmod in bdb scripts - bk doesn't like somebody messing with permissions bdb/dist/s_tags: disable chmod in bdb scripts - bk doesn't like somebody messing with permissions --- bdb/dbinc_auto/db_server.h | 1006 ----------- bdb/dbinc_auto/rpc_defs.in | 4 - bdb/dist/RELEASE | 9 + bdb/dist/s_crypto | 2 + bdb/dist/s_perm | 2 + bdb/dist/s_recover | 2 + bdb/dist/s_rpc | 6 +- bdb/dist/s_symlink | 1 + bdb/dist/s_tags | 2 + bdb/examples_c/ex_apprec/ex_apprec_auto.c | 188 -- bdb/examples_c/ex_apprec/ex_apprec_auto.h | 13 - bdb/examples_c/ex_apprec/ex_apprec_template | 75 - .../{db_server_proc.c => db_server_proc.c.in} | 0 bdb/rpc_server/c/db_server_proc.sed | 772 --------- bdb/rpc_server/c/db_server_svc.c | 435 ----- bdb/rpc_server/c/db_server_xdr.c | 1512 ----------------- bdb/rpc_server/c/gen_db_server.c | 1169 ------------- 17 files changed, 19 insertions(+), 5179 deletions(-) delete mode 100644 bdb/dbinc_auto/db_server.h delete mode 100644 bdb/dbinc_auto/rpc_defs.in delete mode 100644 bdb/examples_c/ex_apprec/ex_apprec_auto.c delete mode 100644 bdb/examples_c/ex_apprec/ex_apprec_auto.h delete mode 100644 bdb/examples_c/ex_apprec/ex_apprec_template rename bdb/rpc_server/c/{db_server_proc.c => db_server_proc.c.in} (100%) delete mode 100644 bdb/rpc_server/c/db_server_proc.sed delete mode 100644 bdb/rpc_server/c/db_server_svc.c delete mode 100644 bdb/rpc_server/c/db_server_xdr.c delete mode 100644 bdb/rpc_server/c/gen_db_server.c diff --git a/bdb/dbinc_auto/db_server.h b/bdb/dbinc_auto/db_server.h deleted file mode 100644 index 3409eed1a9f..00000000000 --- a/bdb/dbinc_auto/db_server.h +++ /dev/null @@ -1,1006 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _DB_SERVER_H_RPCGEN -#define _DB_SERVER_H_RPCGEN - - -struct __env_cachesize_msg { - u_int dbenvcl_id; - u_int gbytes; - u_int bytes; - u_int ncache; -}; -typedef struct __env_cachesize_msg __env_cachesize_msg; - -struct __env_cachesize_reply { - int status; -}; -typedef struct __env_cachesize_reply __env_cachesize_reply; - -struct __env_close_msg { - u_int dbenvcl_id; - u_int flags; -}; -typedef struct __env_close_msg __env_close_msg; - -struct __env_close_reply { - int status; -}; -typedef struct __env_close_reply __env_close_reply; - -struct __env_create_msg { - u_int timeout; -}; -typedef struct __env_create_msg __env_create_msg; - -struct __env_create_reply { - int status; - u_int envcl_id; -}; -typedef struct __env_create_reply __env_create_reply; - -struct __env_dbremove_msg { - u_int dbenvcl_id; - u_int txnpcl_id; - char *name; - char *subdb; - u_int flags; -}; -typedef struct __env_dbremove_msg __env_dbremove_msg; - -struct __env_dbremove_reply { - int status; -}; -typedef struct __env_dbremove_reply __env_dbremove_reply; - -struct __env_dbrename_msg { - u_int dbenvcl_id; - u_int txnpcl_id; - char *name; - char *subdb; - char *newname; - u_int flags; -}; -typedef struct __env_dbrename_msg __env_dbrename_msg; - -struct __env_dbrename_reply { - int status; -}; -typedef struct __env_dbrename_reply __env_dbrename_reply; - -struct __env_encrypt_msg { - u_int dbenvcl_id; - char *passwd; - u_int flags; -}; -typedef struct __env_encrypt_msg __env_encrypt_msg; - -struct __env_encrypt_reply { - int status; -}; -typedef struct __env_encrypt_reply __env_encrypt_reply; - -struct __env_flags_msg { - u_int dbenvcl_id; - u_int flags; - u_int onoff; -}; -typedef struct __env_flags_msg __env_flags_msg; - -struct __env_flags_reply { - int status; -}; -typedef struct __env_flags_reply __env_flags_reply; - -struct __env_open_msg { - u_int dbenvcl_id; - char *home; - u_int flags; - u_int mode; -}; -typedef struct __env_open_msg __env_open_msg; - -struct __env_open_reply { - int status; - u_int envcl_id; -}; -typedef struct __env_open_reply __env_open_reply; - -struct __env_remove_msg { - u_int dbenvcl_id; - char *home; - u_int flags; -}; -typedef struct __env_remove_msg __env_remove_msg; - -struct __env_remove_reply { - int status; -}; -typedef struct __env_remove_reply __env_remove_reply; - -struct __txn_abort_msg { - u_int txnpcl_id; -}; -typedef struct __txn_abort_msg __txn_abort_msg; - -struct __txn_abort_reply { - int status; -}; -typedef struct __txn_abort_reply __txn_abort_reply; - -struct __txn_begin_msg { - u_int dbenvcl_id; - u_int parentcl_id; - u_int flags; -}; -typedef struct __txn_begin_msg __txn_begin_msg; - -struct __txn_begin_reply { - int status; - u_int txnidcl_id; -}; -typedef struct __txn_begin_reply __txn_begin_reply; - -struct __txn_commit_msg { - u_int txnpcl_id; - u_int flags; -}; -typedef struct __txn_commit_msg __txn_commit_msg; - -struct __txn_commit_reply { - int status; -}; -typedef struct __txn_commit_reply __txn_commit_reply; - -struct __txn_discard_msg { - u_int txnpcl_id; - u_int flags; -}; -typedef struct __txn_discard_msg __txn_discard_msg; - -struct __txn_discard_reply { - int status; -}; -typedef struct __txn_discard_reply __txn_discard_reply; - -struct __txn_prepare_msg { - u_int txnpcl_id; - char gid[128]; -}; -typedef struct __txn_prepare_msg __txn_prepare_msg; - -struct __txn_prepare_reply { - int status; -}; -typedef struct __txn_prepare_reply __txn_prepare_reply; - -struct __txn_recover_msg { - u_int dbenvcl_id; - u_int count; - u_int flags; -}; -typedef struct __txn_recover_msg __txn_recover_msg; - -struct __txn_recover_reply { - int status; - struct { - u_int txn_len; - u_int *txn_val; - } txn; - struct { - u_int gid_len; - char *gid_val; - } gid; - u_int retcount; -}; -typedef struct __txn_recover_reply __txn_recover_reply; - -struct __db_associate_msg { - u_int dbpcl_id; - u_int txnpcl_id; - u_int sdbpcl_id; - u_int flags; -}; -typedef struct __db_associate_msg __db_associate_msg; - -struct __db_associate_reply { - int status; -}; -typedef struct __db_associate_reply __db_associate_reply; - -struct __db_bt_maxkey_msg { - u_int dbpcl_id; - u_int maxkey; -}; -typedef struct __db_bt_maxkey_msg __db_bt_maxkey_msg; - -struct __db_bt_maxkey_reply { - int status; -}; -typedef struct __db_bt_maxkey_reply __db_bt_maxkey_reply; - -struct __db_bt_minkey_msg { - u_int dbpcl_id; - u_int minkey; -}; -typedef struct __db_bt_minkey_msg __db_bt_minkey_msg; - -struct __db_bt_minkey_reply { - int status; -}; -typedef struct __db_bt_minkey_reply __db_bt_minkey_reply; - -struct __db_close_msg { - u_int dbpcl_id; - u_int flags; -}; -typedef struct __db_close_msg __db_close_msg; - -struct __db_close_reply { - int status; -}; -typedef struct __db_close_reply __db_close_reply; - -struct __db_create_msg { - u_int dbenvcl_id; - u_int flags; -}; -typedef struct __db_create_msg __db_create_msg; - -struct __db_create_reply { - int status; - u_int dbcl_id; -}; -typedef struct __db_create_reply __db_create_reply; - -struct __db_del_msg { - u_int dbpcl_id; - u_int txnpcl_id; - u_int keydlen; - u_int keydoff; - u_int keyulen; - u_int keyflags; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; - u_int flags; -}; -typedef struct __db_del_msg __db_del_msg; - -struct __db_del_reply { - int status; -}; -typedef struct __db_del_reply __db_del_reply; - -struct __db_encrypt_msg { - u_int dbpcl_id; - char *passwd; - u_int flags; -}; -typedef struct __db_encrypt_msg __db_encrypt_msg; - -struct __db_encrypt_reply { - int status; -}; -typedef struct __db_encrypt_reply __db_encrypt_reply; - -struct __db_extentsize_msg { - u_int dbpcl_id; - u_int extentsize; -}; -typedef struct __db_extentsize_msg __db_extentsize_msg; - -struct __db_extentsize_reply { - int status; -}; -typedef struct __db_extentsize_reply __db_extentsize_reply; - -struct __db_flags_msg { - u_int dbpcl_id; - u_int flags; -}; -typedef struct __db_flags_msg __db_flags_msg; - -struct __db_flags_reply { - int status; -}; -typedef struct __db_flags_reply __db_flags_reply; - -struct __db_get_msg { - u_int dbpcl_id; - u_int txnpcl_id; - u_int keydlen; - u_int keydoff; - u_int keyulen; - u_int keyflags; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; - u_int datadlen; - u_int datadoff; - u_int dataulen; - u_int dataflags; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; - u_int flags; -}; -typedef struct __db_get_msg __db_get_msg; - -struct __db_get_reply { - int status; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; -}; -typedef struct __db_get_reply __db_get_reply; - -struct __db_h_ffactor_msg { - u_int dbpcl_id; - u_int ffactor; -}; -typedef struct __db_h_ffactor_msg __db_h_ffactor_msg; - -struct __db_h_ffactor_reply { - int status; -}; -typedef struct __db_h_ffactor_reply __db_h_ffactor_reply; - -struct __db_h_nelem_msg { - u_int dbpcl_id; - u_int nelem; -}; -typedef struct __db_h_nelem_msg __db_h_nelem_msg; - -struct __db_h_nelem_reply { - int status; -}; -typedef struct __db_h_nelem_reply __db_h_nelem_reply; - -struct __db_key_range_msg { - u_int dbpcl_id; - u_int txnpcl_id; - u_int keydlen; - u_int keydoff; - u_int keyulen; - u_int keyflags; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; - u_int flags; -}; -typedef struct __db_key_range_msg __db_key_range_msg; - -struct __db_key_range_reply { - int status; - double less; - double equal; - double greater; -}; -typedef struct __db_key_range_reply __db_key_range_reply; - -struct __db_lorder_msg { - u_int dbpcl_id; - u_int lorder; -}; -typedef struct __db_lorder_msg __db_lorder_msg; - -struct __db_lorder_reply { - int status; -}; -typedef struct __db_lorder_reply __db_lorder_reply; - -struct __db_open_msg { - u_int dbpcl_id; - u_int txnpcl_id; - char *name; - char *subdb; - u_int type; - u_int flags; - u_int mode; -}; -typedef struct __db_open_msg __db_open_msg; - -struct __db_open_reply { - int status; - u_int dbcl_id; - u_int type; - u_int dbflags; - u_int lorder; -}; -typedef struct __db_open_reply __db_open_reply; - -struct __db_pagesize_msg { - u_int dbpcl_id; - u_int pagesize; -}; -typedef struct __db_pagesize_msg __db_pagesize_msg; - -struct __db_pagesize_reply { - int status; -}; -typedef struct __db_pagesize_reply __db_pagesize_reply; - -struct __db_pget_msg { - u_int dbpcl_id; - u_int txnpcl_id; - u_int skeydlen; - u_int skeydoff; - u_int skeyulen; - u_int skeyflags; - struct { - u_int skeydata_len; - char *skeydata_val; - } skeydata; - u_int pkeydlen; - u_int pkeydoff; - u_int pkeyulen; - u_int pkeyflags; - struct { - u_int pkeydata_len; - char *pkeydata_val; - } pkeydata; - u_int datadlen; - u_int datadoff; - u_int dataulen; - u_int dataflags; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; - u_int flags; -}; -typedef struct __db_pget_msg __db_pget_msg; - -struct __db_pget_reply { - int status; - struct { - u_int skeydata_len; - char *skeydata_val; - } skeydata; - struct { - u_int pkeydata_len; - char *pkeydata_val; - } pkeydata; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; -}; -typedef struct __db_pget_reply __db_pget_reply; - -struct __db_put_msg { - u_int dbpcl_id; - u_int txnpcl_id; - u_int keydlen; - u_int keydoff; - u_int keyulen; - u_int keyflags; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; - u_int datadlen; - u_int datadoff; - u_int dataulen; - u_int dataflags; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; - u_int flags; -}; -typedef struct __db_put_msg __db_put_msg; - -struct __db_put_reply { - int status; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; -}; -typedef struct __db_put_reply __db_put_reply; - -struct __db_re_delim_msg { - u_int dbpcl_id; - u_int delim; -}; -typedef struct __db_re_delim_msg __db_re_delim_msg; - -struct __db_re_delim_reply { - int status; -}; -typedef struct __db_re_delim_reply __db_re_delim_reply; - -struct __db_re_len_msg { - u_int dbpcl_id; - u_int len; -}; -typedef struct __db_re_len_msg __db_re_len_msg; - -struct __db_re_len_reply { - int status; -}; -typedef struct __db_re_len_reply __db_re_len_reply; - -struct __db_re_pad_msg { - u_int dbpcl_id; - u_int pad; -}; -typedef struct __db_re_pad_msg __db_re_pad_msg; - -struct __db_re_pad_reply { - int status; -}; -typedef struct __db_re_pad_reply __db_re_pad_reply; - -struct __db_remove_msg { - u_int dbpcl_id; - char *name; - char *subdb; - u_int flags; -}; -typedef struct __db_remove_msg __db_remove_msg; - -struct __db_remove_reply { - int status; -}; -typedef struct __db_remove_reply __db_remove_reply; - -struct __db_rename_msg { - u_int dbpcl_id; - char *name; - char *subdb; - char *newname; - u_int flags; -}; -typedef struct __db_rename_msg __db_rename_msg; - -struct __db_rename_reply { - int status; -}; -typedef struct __db_rename_reply __db_rename_reply; - -struct __db_stat_msg { - u_int dbpcl_id; - u_int flags; -}; -typedef struct __db_stat_msg __db_stat_msg; - -struct __db_stat_reply { - int status; - struct { - u_int stats_len; - u_int *stats_val; - } stats; -}; -typedef struct __db_stat_reply __db_stat_reply; - -struct __db_sync_msg { - u_int dbpcl_id; - u_int flags; -}; -typedef struct __db_sync_msg __db_sync_msg; - -struct __db_sync_reply { - int status; -}; -typedef struct __db_sync_reply __db_sync_reply; - -struct __db_truncate_msg { - u_int dbpcl_id; - u_int txnpcl_id; - u_int flags; -}; -typedef struct __db_truncate_msg __db_truncate_msg; - -struct __db_truncate_reply { - int status; - u_int count; -}; -typedef struct __db_truncate_reply __db_truncate_reply; - -struct __db_cursor_msg { - u_int dbpcl_id; - u_int txnpcl_id; - u_int flags; -}; -typedef struct __db_cursor_msg __db_cursor_msg; - -struct __db_cursor_reply { - int status; - u_int dbcidcl_id; -}; -typedef struct __db_cursor_reply __db_cursor_reply; - -struct __db_join_msg { - u_int dbpcl_id; - struct { - u_int curs_len; - u_int *curs_val; - } curs; - u_int flags; -}; -typedef struct __db_join_msg __db_join_msg; - -struct __db_join_reply { - int status; - u_int dbcidcl_id; -}; -typedef struct __db_join_reply __db_join_reply; - -struct __dbc_close_msg { - u_int dbccl_id; -}; -typedef struct __dbc_close_msg __dbc_close_msg; - -struct __dbc_close_reply { - int status; -}; -typedef struct __dbc_close_reply __dbc_close_reply; - -struct __dbc_count_msg { - u_int dbccl_id; - u_int flags; -}; -typedef struct __dbc_count_msg __dbc_count_msg; - -struct __dbc_count_reply { - int status; - u_int dupcount; -}; -typedef struct __dbc_count_reply __dbc_count_reply; - -struct __dbc_del_msg { - u_int dbccl_id; - u_int flags; -}; -typedef struct __dbc_del_msg __dbc_del_msg; - -struct __dbc_del_reply { - int status; -}; -typedef struct __dbc_del_reply __dbc_del_reply; - -struct __dbc_dup_msg { - u_int dbccl_id; - u_int flags; -}; -typedef struct __dbc_dup_msg __dbc_dup_msg; - -struct __dbc_dup_reply { - int status; - u_int dbcidcl_id; -}; -typedef struct __dbc_dup_reply __dbc_dup_reply; - -struct __dbc_get_msg { - u_int dbccl_id; - u_int keydlen; - u_int keydoff; - u_int keyulen; - u_int keyflags; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; - u_int datadlen; - u_int datadoff; - u_int dataulen; - u_int dataflags; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; - u_int flags; -}; -typedef struct __dbc_get_msg __dbc_get_msg; - -struct __dbc_get_reply { - int status; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; -}; -typedef struct __dbc_get_reply __dbc_get_reply; - -struct __dbc_pget_msg { - u_int dbccl_id; - u_int skeydlen; - u_int skeydoff; - u_int skeyulen; - u_int skeyflags; - struct { - u_int skeydata_len; - char *skeydata_val; - } skeydata; - u_int pkeydlen; - u_int pkeydoff; - u_int pkeyulen; - u_int pkeyflags; - struct { - u_int pkeydata_len; - char *pkeydata_val; - } pkeydata; - u_int datadlen; - u_int datadoff; - u_int dataulen; - u_int dataflags; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; - u_int flags; -}; -typedef struct __dbc_pget_msg __dbc_pget_msg; - -struct __dbc_pget_reply { - int status; - struct { - u_int skeydata_len; - char *skeydata_val; - } skeydata; - struct { - u_int pkeydata_len; - char *pkeydata_val; - } pkeydata; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; -}; -typedef struct __dbc_pget_reply __dbc_pget_reply; - -struct __dbc_put_msg { - u_int dbccl_id; - u_int keydlen; - u_int keydoff; - u_int keyulen; - u_int keyflags; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; - u_int datadlen; - u_int datadoff; - u_int dataulen; - u_int dataflags; - struct { - u_int datadata_len; - char *datadata_val; - } datadata; - u_int flags; -}; -typedef struct __dbc_put_msg __dbc_put_msg; - -struct __dbc_put_reply { - int status; - struct { - u_int keydata_len; - char *keydata_val; - } keydata; -}; -typedef struct __dbc_put_reply __dbc_put_reply; - -#define __DB_env_cachesize ((unsigned long)(1)) -extern __env_cachesize_reply * __db_env_cachesize_4001(); -#define __DB_env_close ((unsigned long)(2)) -extern __env_close_reply * __db_env_close_4001(); -#define __DB_env_create ((unsigned long)(3)) -extern __env_create_reply * __db_env_create_4001(); -#define __DB_env_dbremove ((unsigned long)(4)) -extern __env_dbremove_reply * __db_env_dbremove_4001(); -#define __DB_env_dbrename ((unsigned long)(5)) -extern __env_dbrename_reply * __db_env_dbrename_4001(); -#define __DB_env_encrypt ((unsigned long)(6)) -extern __env_encrypt_reply * __db_env_encrypt_4001(); -#define __DB_env_flags ((unsigned long)(7)) -extern __env_flags_reply * __db_env_flags_4001(); -#define __DB_env_open ((unsigned long)(8)) -extern __env_open_reply * __db_env_open_4001(); -#define __DB_env_remove ((unsigned long)(9)) -extern __env_remove_reply * __db_env_remove_4001(); -#define __DB_txn_abort ((unsigned long)(10)) -extern __txn_abort_reply * __db_txn_abort_4001(); -#define __DB_txn_begin ((unsigned long)(11)) -extern __txn_begin_reply * __db_txn_begin_4001(); -#define __DB_txn_commit ((unsigned long)(12)) -extern __txn_commit_reply * __db_txn_commit_4001(); -#define __DB_txn_discard ((unsigned long)(13)) -extern __txn_discard_reply * __db_txn_discard_4001(); -#define __DB_txn_prepare ((unsigned long)(14)) -extern __txn_prepare_reply * __db_txn_prepare_4001(); -#define __DB_txn_recover ((unsigned long)(15)) -extern __txn_recover_reply * __db_txn_recover_4001(); -#define __DB_db_associate ((unsigned long)(16)) -extern __db_associate_reply * __db_db_associate_4001(); -#define __DB_db_bt_maxkey ((unsigned long)(17)) -extern __db_bt_maxkey_reply * __db_db_bt_maxkey_4001(); -#define __DB_db_bt_minkey ((unsigned long)(18)) -extern __db_bt_minkey_reply * __db_db_bt_minkey_4001(); -#define __DB_db_close ((unsigned long)(19)) -extern __db_close_reply * __db_db_close_4001(); -#define __DB_db_create ((unsigned long)(20)) -extern __db_create_reply * __db_db_create_4001(); -#define __DB_db_del ((unsigned long)(21)) -extern __db_del_reply * __db_db_del_4001(); -#define __DB_db_encrypt ((unsigned long)(22)) -extern __db_encrypt_reply * __db_db_encrypt_4001(); -#define __DB_db_extentsize ((unsigned long)(23)) -extern __db_extentsize_reply * __db_db_extentsize_4001(); -#define __DB_db_flags ((unsigned long)(24)) -extern __db_flags_reply * __db_db_flags_4001(); -#define __DB_db_get ((unsigned long)(25)) -extern __db_get_reply * __db_db_get_4001(); -#define __DB_db_h_ffactor ((unsigned long)(26)) -extern __db_h_ffactor_reply * __db_db_h_ffactor_4001(); -#define __DB_db_h_nelem ((unsigned long)(27)) -extern __db_h_nelem_reply * __db_db_h_nelem_4001(); -#define __DB_db_key_range ((unsigned long)(28)) -extern __db_key_range_reply * __db_db_key_range_4001(); -#define __DB_db_lorder ((unsigned long)(29)) -extern __db_lorder_reply * __db_db_lorder_4001(); -#define __DB_db_open ((unsigned long)(30)) -extern __db_open_reply * __db_db_open_4001(); -#define __DB_db_pagesize ((unsigned long)(31)) -extern __db_pagesize_reply * __db_db_pagesize_4001(); -#define __DB_db_pget ((unsigned long)(32)) -extern __db_pget_reply * __db_db_pget_4001(); -#define __DB_db_put ((unsigned long)(33)) -extern __db_put_reply * __db_db_put_4001(); -#define __DB_db_re_delim ((unsigned long)(34)) -extern __db_re_delim_reply * __db_db_re_delim_4001(); -#define __DB_db_re_len ((unsigned long)(35)) -extern __db_re_len_reply * __db_db_re_len_4001(); -#define __DB_db_re_pad ((unsigned long)(36)) -extern __db_re_pad_reply * __db_db_re_pad_4001(); -#define __DB_db_remove ((unsigned long)(37)) -extern __db_remove_reply * __db_db_remove_4001(); -#define __DB_db_rename ((unsigned long)(38)) -extern __db_rename_reply * __db_db_rename_4001(); -#define __DB_db_stat ((unsigned long)(39)) -extern __db_stat_reply * __db_db_stat_4001(); -#define __DB_db_sync ((unsigned long)(40)) -extern __db_sync_reply * __db_db_sync_4001(); -#define __DB_db_truncate ((unsigned long)(41)) -extern __db_truncate_reply * __db_db_truncate_4001(); -#define __DB_db_cursor ((unsigned long)(42)) -extern __db_cursor_reply * __db_db_cursor_4001(); -#define __DB_db_join ((unsigned long)(43)) -extern __db_join_reply * __db_db_join_4001(); -#define __DB_dbc_close ((unsigned long)(44)) -extern __dbc_close_reply * __db_dbc_close_4001(); -#define __DB_dbc_count ((unsigned long)(45)) -extern __dbc_count_reply * __db_dbc_count_4001(); -#define __DB_dbc_del ((unsigned long)(46)) -extern __dbc_del_reply * __db_dbc_del_4001(); -#define __DB_dbc_dup ((unsigned long)(47)) -extern __dbc_dup_reply * __db_dbc_dup_4001(); -#define __DB_dbc_get ((unsigned long)(48)) -extern __dbc_get_reply * __db_dbc_get_4001(); -#define __DB_dbc_pget ((unsigned long)(49)) -extern __dbc_pget_reply * __db_dbc_pget_4001(); -#define __DB_dbc_put ((unsigned long)(50)) -extern __dbc_put_reply * __db_dbc_put_4001(); -extern int db_rpc_serverprog_4001_freeresult(); - -/* the xdr functions */ -extern bool_t xdr___env_cachesize_msg(); -extern bool_t xdr___env_cachesize_reply(); -extern bool_t xdr___env_close_msg(); -extern bool_t xdr___env_close_reply(); -extern bool_t xdr___env_create_msg(); -extern bool_t xdr___env_create_reply(); -extern bool_t xdr___env_dbremove_msg(); -extern bool_t xdr___env_dbremove_reply(); -extern bool_t xdr___env_dbrename_msg(); -extern bool_t xdr___env_dbrename_reply(); -extern bool_t xdr___env_encrypt_msg(); -extern bool_t xdr___env_encrypt_reply(); -extern bool_t xdr___env_flags_msg(); -extern bool_t xdr___env_flags_reply(); -extern bool_t xdr___env_open_msg(); -extern bool_t xdr___env_open_reply(); -extern bool_t xdr___env_remove_msg(); -extern bool_t xdr___env_remove_reply(); -extern bool_t xdr___txn_abort_msg(); -extern bool_t xdr___txn_abort_reply(); -extern bool_t xdr___txn_begin_msg(); -extern bool_t xdr___txn_begin_reply(); -extern bool_t xdr___txn_commit_msg(); -extern bool_t xdr___txn_commit_reply(); -extern bool_t xdr___txn_discard_msg(); -extern bool_t xdr___txn_discard_reply(); -extern bool_t xdr___txn_prepare_msg(); -extern bool_t xdr___txn_prepare_reply(); -extern bool_t xdr___txn_recover_msg(); -extern bool_t xdr___txn_recover_reply(); -extern bool_t xdr___db_associate_msg(); -extern bool_t xdr___db_associate_reply(); -extern bool_t xdr___db_bt_maxkey_msg(); -extern bool_t xdr___db_bt_maxkey_reply(); -extern bool_t xdr___db_bt_minkey_msg(); -extern bool_t xdr___db_bt_minkey_reply(); -extern bool_t xdr___db_close_msg(); -extern bool_t xdr___db_close_reply(); -extern bool_t xdr___db_create_msg(); -extern bool_t xdr___db_create_reply(); -extern bool_t xdr___db_del_msg(); -extern bool_t xdr___db_del_reply(); -extern bool_t xdr___db_encrypt_msg(); -extern bool_t xdr___db_encrypt_reply(); -extern bool_t xdr___db_extentsize_msg(); -extern bool_t xdr___db_extentsize_reply(); -extern bool_t xdr___db_flags_msg(); -extern bool_t xdr___db_flags_reply(); -extern bool_t xdr___db_get_msg(); -extern bool_t xdr___db_get_reply(); -extern bool_t xdr___db_h_ffactor_msg(); -extern bool_t xdr___db_h_ffactor_reply(); -extern bool_t xdr___db_h_nelem_msg(); -extern bool_t xdr___db_h_nelem_reply(); -extern bool_t xdr___db_key_range_msg(); -extern bool_t xdr___db_key_range_reply(); -extern bool_t xdr___db_lorder_msg(); -extern bool_t xdr___db_lorder_reply(); -extern bool_t xdr___db_open_msg(); -extern bool_t xdr___db_open_reply(); -extern bool_t xdr___db_pagesize_msg(); -extern bool_t xdr___db_pagesize_reply(); -extern bool_t xdr___db_pget_msg(); -extern bool_t xdr___db_pget_reply(); -extern bool_t xdr___db_put_msg(); -extern bool_t xdr___db_put_reply(); -extern bool_t xdr___db_re_delim_msg(); -extern bool_t xdr___db_re_delim_reply(); -extern bool_t xdr___db_re_len_msg(); -extern bool_t xdr___db_re_len_reply(); -extern bool_t xdr___db_re_pad_msg(); -extern bool_t xdr___db_re_pad_reply(); -extern bool_t xdr___db_remove_msg(); -extern bool_t xdr___db_remove_reply(); -extern bool_t xdr___db_rename_msg(); -extern bool_t xdr___db_rename_reply(); -extern bool_t xdr___db_stat_msg(); -extern bool_t xdr___db_stat_reply(); -extern bool_t xdr___db_sync_msg(); -extern bool_t xdr___db_sync_reply(); -extern bool_t xdr___db_truncate_msg(); -extern bool_t xdr___db_truncate_reply(); -extern bool_t xdr___db_cursor_msg(); -extern bool_t xdr___db_cursor_reply(); -extern bool_t xdr___db_join_msg(); -extern bool_t xdr___db_join_reply(); -extern bool_t xdr___dbc_close_msg(); -extern bool_t xdr___dbc_close_reply(); -extern bool_t xdr___dbc_count_msg(); -extern bool_t xdr___dbc_count_reply(); -extern bool_t xdr___dbc_del_msg(); -extern bool_t xdr___dbc_del_reply(); -extern bool_t xdr___dbc_dup_msg(); -extern bool_t xdr___dbc_dup_reply(); -extern bool_t xdr___dbc_get_msg(); -extern bool_t xdr___dbc_get_reply(); -extern bool_t xdr___dbc_pget_msg(); -extern bool_t xdr___dbc_pget_reply(); -extern bool_t xdr___dbc_put_msg(); -extern bool_t xdr___dbc_put_reply(); - -#endif /* !_DB_SERVER_H_RPCGEN */ diff --git a/bdb/dbinc_auto/rpc_defs.in b/bdb/dbinc_auto/rpc_defs.in deleted file mode 100644 index cae76f5606d..00000000000 --- a/bdb/dbinc_auto/rpc_defs.in +++ /dev/null @@ -1,4 +0,0 @@ - -/* DO NOT EDIT: automatically built by dist/s_rpc. */ -#define DB_RPC_SERVERPROG ((unsigned long)(351457)) -#define DB_RPC_SERVERVERS ((unsigned long)(4001)) diff --git a/bdb/dist/RELEASE b/bdb/dist/RELEASE index fe9b6667bbe..9054f122cb4 100644 --- a/bdb/dist/RELEASE +++ b/bdb/dist/RELEASE @@ -9,3 +9,12 @@ DB_VERSION_UNIQUE_NAME=`printf "_%d%03d" $DB_VERSION_MAJOR $DB_VERSION_MINOR` DB_RELEASE_DATE=`date "+%B %e, %Y"` DB_VERSION_STRING="Sleepycat Software: Berkeley DB $DB_VERSION: ($DB_RELEASE_DATE)" + +# this file is included by all s_* scripts, so it's the way to apply +# hacks :) + +# bitkeeper doesn't like somebody to mess with permissions! +chmod() +{ + #echo "chmod $1 $2" +} diff --git a/bdb/dist/s_crypto b/bdb/dist/s_crypto index be7e5de0474..f7947cb3e10 100644 --- a/bdb/dist/s_crypto +++ b/bdb/dist/s_crypto @@ -3,6 +3,8 @@ # Remove crypto from the DB source tree. +. ./RELEASE + d=.. t=/tmp/__db_a diff --git a/bdb/dist/s_perm b/bdb/dist/s_perm index 03cc4a35a8a..c35278b8c83 100755 --- a/bdb/dist/s_perm +++ b/bdb/dist/s_perm @@ -4,6 +4,8 @@ d=.. echo 'Updating Berkeley DB source tree permissions...' +. ./RELEASE + run() { echo " $1 ($2)" diff --git a/bdb/dist/s_recover b/bdb/dist/s_recover index 331ae623d3f..869b5bfd363 100755 --- a/bdb/dist/s_recover +++ b/bdb/dist/s_recover @@ -3,6 +3,8 @@ # # Build the automatically generated logging/recovery files. +. ./RELEASE + tmp=/tmp/__db_a loglist=/tmp/__db_b source=/tmp/__db_c diff --git a/bdb/dist/s_rpc b/bdb/dist/s_rpc index 302930068ca..7c478c2b5e1 100644 --- a/bdb/dist/s_rpc +++ b/bdb/dist/s_rpc @@ -25,9 +25,6 @@ server_file=../rpc_server/c/gen_db_server.c stmpl_file=./template/db_server_proc xdr_file=../rpc_server/db_server.x -# -# NOTE: We do NOT want to remove proc_file. It is what we apply $sed_file -# to, but we do not want to remove it, it does not get built in place. rm -f $client_file \ $ctmpl_file \ $header_file \ @@ -92,8 +89,7 @@ ENDOFSEDTEXT sed -f $t $rpcsvc_file > ${rpcsvc_file}.new mv ${rpcsvc_file}.new $rpcsvc_file -sed -f $sed_file $proc_file > ${proc_file}.new -mv ${proc_file}.new $proc_file +sed -f $sed_file ${proc_file}.in > ${proc_file} # Run rpcgen files through sed to add HAVE_RPC ifdef and appropriate # includes. diff --git a/bdb/dist/s_symlink b/bdb/dist/s_symlink index e69bb57dc46..ee80a220a83 100755 --- a/bdb/dist/s_symlink +++ b/bdb/dist/s_symlink @@ -2,6 +2,7 @@ # $Id: s_symlink,v 1.28 2002/08/18 21:15:45 bostic Exp $ echo 'Creating Berkeley DB source tree symbolic links...' +. ./RELEASE build() { diff --git a/bdb/dist/s_tags b/bdb/dist/s_tags index d5037896443..18b6025aa86 100755 --- a/bdb/dist/s_tags +++ b/bdb/dist/s_tags @@ -3,6 +3,8 @@ # # Build tags files. +. ./RELEASE + files="../dbinc/*.h \ ../dbinc/*.in \ ../btree/*.[ch] \ diff --git a/bdb/examples_c/ex_apprec/ex_apprec_auto.c b/bdb/examples_c/ex_apprec/ex_apprec_auto.c deleted file mode 100644 index d8c27e762c7..00000000000 --- a/bdb/examples_c/ex_apprec/ex_apprec_auto.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ -#include -#include -#include -#include - -#include - -#include "ex_apprec.h" -/* - * PUBLIC: int ex_apprec_mkdir_log __P((DB_ENV *, DB_TXN *, DB_LSN *, - * PUBLIC: u_int32_t, const DBT *)); - */ -int -ex_apprec_mkdir_log(dbenv, txnid, ret_lsnp, flags, - dirname) - DB_ENV *dbenv; - DB_TXN *txnid; - DB_LSN *ret_lsnp; - u_int32_t flags; - const DBT *dirname; -{ - DBT logrec; - DB_LSN *lsnp, null_lsn; - u_int32_t zero; - u_int32_t npad, rectype, txn_num; - int ret; - u_int8_t *bp; - - rectype = DB_ex_apprec_mkdir; - npad = 0; - - if (txnid == NULL) { - txn_num = 0; - null_lsn.file = 0; - null_lsn.offset = 0; - lsnp = &null_lsn; - } else { - txn_num = txnid->txnid; - lsnp = &txnid->last_lsn; - } - - logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) - + sizeof(u_int32_t) + (dirname == NULL ? 0 : dirname->size); - if ((logrec.data = malloc(logrec.size)) == NULL) - return (ENOMEM); - - if (npad > 0) - memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad); - - bp = logrec.data; - - memcpy(bp, &rectype, sizeof(rectype)); - bp += sizeof(rectype); - - memcpy(bp, &txn_num, sizeof(txn_num)); - bp += sizeof(txn_num); - - memcpy(bp, lsnp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - if (dirname == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &dirname->size, sizeof(dirname->size)); - bp += sizeof(dirname->size); - memcpy(bp, dirname->data, dirname->size); - bp += dirname->size; - } - - ret = dbenv->log_put(dbenv, - ret_lsnp, (DBT *)&logrec, flags); - if (txnid != NULL && ret == 0) - txnid->last_lsn = *ret_lsnp; -#ifdef LOG_DIAGNOSTIC - if (ret != 0) - (void)ex_apprec_mkdir_print(dbenv, - (DBT *)&logrec, ret_lsnp, NULL, NULL); -#endif - free(logrec.data); - return (ret); -} - -/* - * PUBLIC: int ex_apprec_mkdir_print __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -ex_apprec_mkdir_print(dbenv, dbtp, lsnp, notused2, notused3) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops notused2; - void *notused3; -{ - ex_apprec_mkdir_args *argp; - u_int32_t i; - int ch; - int ret; - - notused2 = DB_TXN_ABORT; - notused3 = NULL; - - if ((ret = ex_apprec_mkdir_read(dbenv, dbtp->data, &argp)) != 0) - return (ret); - (void)printf( - "[%lu][%lu]ex_apprec_mkdir: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", - (u_long)lsnp->file, - (u_long)lsnp->offset, - (u_long)argp->type, - (u_long)argp->txnid->txnid, - (u_long)argp->prev_lsn.file, - (u_long)argp->prev_lsn.offset); - (void)printf("\tdirname: "); - for (i = 0; i < argp->dirname.size; i++) { - ch = ((u_int8_t *)argp->dirname.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\n"); - free(argp); - return (0); -} - -/* - * PUBLIC: int ex_apprec_mkdir_read __P((DB_ENV *, void *, - * PUBLIC: ex_apprec_mkdir_args **)); - */ -int -ex_apprec_mkdir_read(dbenv, recbuf, argpp) - DB_ENV *dbenv; - void *recbuf; - ex_apprec_mkdir_args **argpp; -{ - ex_apprec_mkdir_args *argp; - u_int8_t *bp; - /* Keep the compiler quiet. */ - - dbenv = NULL; - if ((argp = malloc(sizeof(ex_apprec_mkdir_args) + sizeof(DB_TXN))) == NULL) - return (ENOMEM); - - argp->txnid = (DB_TXN *)&argp[1]; - - bp = recbuf; - memcpy(&argp->type, bp, sizeof(argp->type)); - bp += sizeof(argp->type); - - memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); - bp += sizeof(argp->txnid->txnid); - - memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - memset(&argp->dirname, 0, sizeof(argp->dirname)); - memcpy(&argp->dirname.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->dirname.data = bp; - bp += argp->dirname.size; - - *argpp = argp; - return (0); -} - -/* - * PUBLIC: int ex_apprec_init_print __P((DB_ENV *, int (***)(DB_ENV *, - * PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *)); - */ -int -ex_apprec_init_print(dbenv, dtabp, dtabsizep) - DB_ENV *dbenv; - int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t *dtabsizep; -{ - int __db_add_recovery __P((DB_ENV *, - int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), - size_t *, - int (*)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), u_int32_t)); - int ret; - - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - ex_apprec_mkdir_print, DB_ex_apprec_mkdir)) != 0) - return (ret); - return (0); -} - diff --git a/bdb/examples_c/ex_apprec/ex_apprec_auto.h b/bdb/examples_c/ex_apprec/ex_apprec_auto.h deleted file mode 100644 index 358b1a9f091..00000000000 --- a/bdb/examples_c/ex_apprec/ex_apprec_auto.h +++ /dev/null @@ -1,13 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef ex_apprec_AUTO_H -#define ex_apprec_AUTO_H -#define DB_ex_apprec_mkdir 10000 -typedef struct _ex_apprec_mkdir_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - DBT dirname; -} ex_apprec_mkdir_args; - -#endif diff --git a/bdb/examples_c/ex_apprec/ex_apprec_template b/bdb/examples_c/ex_apprec/ex_apprec_template deleted file mode 100644 index e67ccb6d8c3..00000000000 --- a/bdb/examples_c/ex_apprec/ex_apprec_template +++ /dev/null @@ -1,75 +0,0 @@ -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/ex_apprec.h" -#include "dbinc/log.h" - -/* - * ex_apprec_mkdir_recover -- - * Recovery function for mkdir. - * - * PUBLIC: int ex_apprec_mkdir_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -ex_apprec_mkdir_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - ex_apprec_mkdir_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(ex_apprec_mkdir_print); - REC_INTRO(ex_apprec_mkdir_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - diff --git a/bdb/rpc_server/c/db_server_proc.c b/bdb/rpc_server/c/db_server_proc.c.in similarity index 100% rename from bdb/rpc_server/c/db_server_proc.c rename to bdb/rpc_server/c/db_server_proc.c.in diff --git a/bdb/rpc_server/c/db_server_proc.sed b/bdb/rpc_server/c/db_server_proc.sed deleted file mode 100644 index e11b2c33cfe..00000000000 --- a/bdb/rpc_server/c/db_server_proc.sed +++ /dev/null @@ -1,772 +0,0 @@ -/^\/\* BEGIN __env_cachesize_proc/,/^\/\* END __env_cachesize_proc/c\ -/* BEGIN __env_cachesize_proc */\ -/*\ -\ * PUBLIC: void __env_cachesize_proc __P((long, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, __env_cachesize_reply *));\ -\ */\ -void\ -__env_cachesize_proc(dbenvcl_id, gbytes, bytes,\ -\ \ ncache, replyp)\ -\ long dbenvcl_id;\ -\ u_int32_t gbytes;\ -\ u_int32_t bytes;\ -\ u_int32_t ncache;\ -\ __env_cachesize_reply *replyp;\ -/* END __env_cachesize_proc */ -/^\/\* BEGIN __env_close_proc/,/^\/\* END __env_close_proc/c\ -/* BEGIN __env_close_proc */\ -/*\ -\ * PUBLIC: void __env_close_proc __P((long, u_int32_t, __env_close_reply *));\ -\ */\ -void\ -__env_close_proc(dbenvcl_id, flags, replyp)\ -\ long dbenvcl_id;\ -\ u_int32_t flags;\ -\ __env_close_reply *replyp;\ -/* END __env_close_proc */ -/^\/\* BEGIN __env_create_proc/,/^\/\* END __env_create_proc/c\ -/* BEGIN __env_create_proc */\ -/*\ -\ * PUBLIC: void __env_create_proc __P((u_int32_t, __env_create_reply *));\ -\ */\ -void\ -__env_create_proc(timeout, replyp)\ -\ u_int32_t timeout;\ -\ __env_create_reply *replyp;\ -/* END __env_create_proc */ -/^\/\* BEGIN __env_dbremove_proc/,/^\/\* END __env_dbremove_proc/c\ -/* BEGIN __env_dbremove_proc */\ -/*\ -\ * PUBLIC: void __env_dbremove_proc __P((long, long, char *, char *, u_int32_t,\ -\ * PUBLIC: __env_dbremove_reply *));\ -\ */\ -void\ -__env_dbremove_proc(dbenvcl_id, txnpcl_id, name,\ -\ \ subdb, flags, replyp)\ -\ long dbenvcl_id;\ -\ long txnpcl_id;\ -\ char *name;\ -\ char *subdb;\ -\ u_int32_t flags;\ -\ __env_dbremove_reply *replyp;\ -/* END __env_dbremove_proc */ -/^\/\* BEGIN __env_dbrename_proc/,/^\/\* END __env_dbrename_proc/c\ -/* BEGIN __env_dbrename_proc */\ -/*\ -\ * PUBLIC: void __env_dbrename_proc __P((long, long, char *, char *, char *,\ -\ * PUBLIC: u_int32_t, __env_dbrename_reply *));\ -\ */\ -void\ -__env_dbrename_proc(dbenvcl_id, txnpcl_id, name,\ -\ \ subdb, newname, flags, replyp)\ -\ long dbenvcl_id;\ -\ long txnpcl_id;\ -\ char *name;\ -\ char *subdb;\ -\ char *newname;\ -\ u_int32_t flags;\ -\ __env_dbrename_reply *replyp;\ -/* END __env_dbrename_proc */ -/^\/\* BEGIN __env_encrypt_proc/,/^\/\* END __env_encrypt_proc/c\ -/* BEGIN __env_encrypt_proc */\ -/*\ -\ * PUBLIC: void __env_encrypt_proc __P((long, char *, u_int32_t,\ -\ * PUBLIC: __env_encrypt_reply *));\ -\ */\ -void\ -__env_encrypt_proc(dbenvcl_id, passwd, flags, replyp)\ -\ long dbenvcl_id;\ -\ char *passwd;\ -\ u_int32_t flags;\ -\ __env_encrypt_reply *replyp;\ -/* END __env_encrypt_proc */ -/^\/\* BEGIN __env_flags_proc/,/^\/\* END __env_flags_proc/c\ -/* BEGIN __env_flags_proc */\ -/*\ -\ * PUBLIC: void __env_flags_proc __P((long, u_int32_t, u_int32_t,\ -\ * PUBLIC: __env_flags_reply *));\ -\ */\ -void\ -__env_flags_proc(dbenvcl_id, flags, onoff, replyp)\ -\ long dbenvcl_id;\ -\ u_int32_t flags;\ -\ u_int32_t onoff;\ -\ __env_flags_reply *replyp;\ -/* END __env_flags_proc */ -/^\/\* BEGIN __env_open_proc/,/^\/\* END __env_open_proc/c\ -/* BEGIN __env_open_proc */\ -/*\ -\ * PUBLIC: void __env_open_proc __P((long, char *, u_int32_t, u_int32_t,\ -\ * PUBLIC: __env_open_reply *));\ -\ */\ -void\ -__env_open_proc(dbenvcl_id, home, flags,\ -\ \ mode, replyp)\ -\ long dbenvcl_id;\ -\ char *home;\ -\ u_int32_t flags;\ -\ u_int32_t mode;\ -\ __env_open_reply *replyp;\ -/* END __env_open_proc */ -/^\/\* BEGIN __env_remove_proc/,/^\/\* END __env_remove_proc/c\ -/* BEGIN __env_remove_proc */\ -/*\ -\ * PUBLIC: void __env_remove_proc __P((long, char *, u_int32_t,\ -\ * PUBLIC: __env_remove_reply *));\ -\ */\ -void\ -__env_remove_proc(dbenvcl_id, home, flags, replyp)\ -\ long dbenvcl_id;\ -\ char *home;\ -\ u_int32_t flags;\ -\ __env_remove_reply *replyp;\ -/* END __env_remove_proc */ -/^\/\* BEGIN __txn_abort_proc/,/^\/\* END __txn_abort_proc/c\ -/* BEGIN __txn_abort_proc */\ -/*\ -\ * PUBLIC: void __txn_abort_proc __P((long, __txn_abort_reply *));\ -\ */\ -void\ -__txn_abort_proc(txnpcl_id, replyp)\ -\ long txnpcl_id;\ -\ __txn_abort_reply *replyp;\ -/* END __txn_abort_proc */ -/^\/\* BEGIN __txn_begin_proc/,/^\/\* END __txn_begin_proc/c\ -/* BEGIN __txn_begin_proc */\ -/*\ -\ * PUBLIC: void __txn_begin_proc __P((long, long, u_int32_t,\ -\ * PUBLIC: __txn_begin_reply *));\ -\ */\ -void\ -__txn_begin_proc(dbenvcl_id, parentcl_id,\ -\ \ flags, replyp)\ -\ long dbenvcl_id;\ -\ long parentcl_id;\ -\ u_int32_t flags;\ -\ __txn_begin_reply *replyp;\ -/* END __txn_begin_proc */ -/^\/\* BEGIN __txn_commit_proc/,/^\/\* END __txn_commit_proc/c\ -/* BEGIN __txn_commit_proc */\ -/*\ -\ * PUBLIC: void __txn_commit_proc __P((long, u_int32_t,\ -\ * PUBLIC: __txn_commit_reply *));\ -\ */\ -void\ -__txn_commit_proc(txnpcl_id, flags, replyp)\ -\ long txnpcl_id;\ -\ u_int32_t flags;\ -\ __txn_commit_reply *replyp;\ -/* END __txn_commit_proc */ -/^\/\* BEGIN __txn_discard_proc/,/^\/\* END __txn_discard_proc/c\ -/* BEGIN __txn_discard_proc */\ -/*\ -\ * PUBLIC: void __txn_discard_proc __P((long, u_int32_t,\ -\ * PUBLIC: __txn_discard_reply *));\ -\ */\ -void\ -__txn_discard_proc(txnpcl_id, flags, replyp)\ -\ long txnpcl_id;\ -\ u_int32_t flags;\ -\ __txn_discard_reply *replyp;\ -/* END __txn_discard_proc */ -/^\/\* BEGIN __txn_prepare_proc/,/^\/\* END __txn_prepare_proc/c\ -/* BEGIN __txn_prepare_proc */\ -/*\ -\ * PUBLIC: void __txn_prepare_proc __P((long, u_int8_t *,\ -\ * PUBLIC: __txn_prepare_reply *));\ -\ */\ -void\ -__txn_prepare_proc(txnpcl_id, gid, replyp)\ -\ long txnpcl_id;\ -\ u_int8_t *gid;\ -\ __txn_prepare_reply *replyp;\ -/* END __txn_prepare_proc */ -/^\/\* BEGIN __txn_recover_proc/,/^\/\* END __txn_recover_proc/c\ -/* BEGIN __txn_recover_proc */\ -/*\ -\ * PUBLIC: void __txn_recover_proc __P((long, u_int32_t, u_int32_t,\ -\ * PUBLIC: __txn_recover_reply *, int *));\ -\ */\ -void\ -__txn_recover_proc(dbenvcl_id, count,\ -\ \ flags, replyp, freep)\ -\ long dbenvcl_id;\ -\ u_int32_t count;\ -\ u_int32_t flags;\ -\ __txn_recover_reply *replyp;\ -\ int * freep;\ -/* END __txn_recover_proc */ -/^\/\* BEGIN __db_associate_proc/,/^\/\* END __db_associate_proc/c\ -/* BEGIN __db_associate_proc */\ -/*\ -\ * PUBLIC: void __db_associate_proc __P((long, long, long, u_int32_t,\ -\ * PUBLIC: __db_associate_reply *));\ -\ */\ -void\ -__db_associate_proc(dbpcl_id, txnpcl_id, sdbpcl_id,\ -\ \ flags, replyp)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ long sdbpcl_id;\ -\ u_int32_t flags;\ -\ __db_associate_reply *replyp;\ -/* END __db_associate_proc */ -/^\/\* BEGIN __db_bt_maxkey_proc/,/^\/\* END __db_bt_maxkey_proc/c\ -/* BEGIN __db_bt_maxkey_proc */\ -/*\ -\ * PUBLIC: void __db_bt_maxkey_proc __P((long, u_int32_t,\ -\ * PUBLIC: __db_bt_maxkey_reply *));\ -\ */\ -void\ -__db_bt_maxkey_proc(dbpcl_id, maxkey, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t maxkey;\ -\ __db_bt_maxkey_reply *replyp;\ -/* END __db_bt_maxkey_proc */ -/^\/\* BEGIN __db_bt_minkey_proc/,/^\/\* END __db_bt_minkey_proc/c\ -/* BEGIN __db_bt_minkey_proc */\ -/*\ -\ * PUBLIC: void __db_bt_minkey_proc __P((long, u_int32_t,\ -\ * PUBLIC: __db_bt_minkey_reply *));\ -\ */\ -void\ -__db_bt_minkey_proc(dbpcl_id, minkey, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t minkey;\ -\ __db_bt_minkey_reply *replyp;\ -/* END __db_bt_minkey_proc */ -/^\/\* BEGIN __db_close_proc/,/^\/\* END __db_close_proc/c\ -/* BEGIN __db_close_proc */\ -/*\ -\ * PUBLIC: void __db_close_proc __P((long, u_int32_t, __db_close_reply *));\ -\ */\ -void\ -__db_close_proc(dbpcl_id, flags, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t flags;\ -\ __db_close_reply *replyp;\ -/* END __db_close_proc */ -/^\/\* BEGIN __db_create_proc/,/^\/\* END __db_create_proc/c\ -/* BEGIN __db_create_proc */\ -/*\ -\ * PUBLIC: void __db_create_proc __P((long, u_int32_t, __db_create_reply *));\ -\ */\ -void\ -__db_create_proc(dbenvcl_id, flags, replyp)\ -\ long dbenvcl_id;\ -\ u_int32_t flags;\ -\ __db_create_reply *replyp;\ -/* END __db_create_proc */ -/^\/\* BEGIN __db_del_proc/,/^\/\* END __db_del_proc/c\ -/* BEGIN __db_del_proc */\ -/*\ -\ * PUBLIC: void __db_del_proc __P((long, long, u_int32_t, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, void *, u_int32_t, u_int32_t, __db_del_reply *));\ -\ */\ -void\ -__db_del_proc(dbpcl_id, txnpcl_id, keydlen,\ -\ \ keydoff, keyulen, keyflags, keydata,\ -\ \ keysize, flags, replyp)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ u_int32_t keydlen;\ -\ u_int32_t keydoff;\ -\ u_int32_t keyulen;\ -\ u_int32_t keyflags;\ -\ void *keydata;\ -\ u_int32_t keysize;\ -\ u_int32_t flags;\ -\ __db_del_reply *replyp;\ -/* END __db_del_proc */ -/^\/\* BEGIN __db_encrypt_proc/,/^\/\* END __db_encrypt_proc/c\ -/* BEGIN __db_encrypt_proc */\ -/*\ -\ * PUBLIC: void __db_encrypt_proc __P((long, char *, u_int32_t,\ -\ * PUBLIC: __db_encrypt_reply *));\ -\ */\ -void\ -__db_encrypt_proc(dbpcl_id, passwd, flags, replyp)\ -\ long dbpcl_id;\ -\ char *passwd;\ -\ u_int32_t flags;\ -\ __db_encrypt_reply *replyp;\ -/* END __db_encrypt_proc */ -/^\/\* BEGIN __db_extentsize_proc/,/^\/\* END __db_extentsize_proc/c\ -/* BEGIN __db_extentsize_proc */\ -/*\ -\ * PUBLIC: void __db_extentsize_proc __P((long, u_int32_t,\ -\ * PUBLIC: __db_extentsize_reply *));\ -\ */\ -void\ -__db_extentsize_proc(dbpcl_id, extentsize, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t extentsize;\ -\ __db_extentsize_reply *replyp;\ -/* END __db_extentsize_proc */ -/^\/\* BEGIN __db_flags_proc/,/^\/\* END __db_flags_proc/c\ -/* BEGIN __db_flags_proc */\ -/*\ -\ * PUBLIC: void __db_flags_proc __P((long, u_int32_t, __db_flags_reply *));\ -\ */\ -void\ -__db_flags_proc(dbpcl_id, flags, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t flags;\ -\ __db_flags_reply *replyp;\ -/* END __db_flags_proc */ -/^\/\* BEGIN __db_get_proc/,/^\/\* END __db_get_proc/c\ -/* BEGIN __db_get_proc */\ -/*\ -\ * PUBLIC: void __db_get_proc __P((long, long, u_int32_t, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *,\ -\ * PUBLIC: u_int32_t, u_int32_t, __db_get_reply *, int *));\ -\ */\ -void\ -__db_get_proc(dbpcl_id, txnpcl_id, keydlen,\ -\ \ keydoff, keyulen, keyflags, keydata,\ -\ \ keysize, datadlen, datadoff, dataulen,\ -\ \ dataflags, datadata, datasize, flags, replyp, freep)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ u_int32_t keydlen;\ -\ u_int32_t keydoff;\ -\ u_int32_t keyulen;\ -\ u_int32_t keyflags;\ -\ void *keydata;\ -\ u_int32_t keysize;\ -\ u_int32_t datadlen;\ -\ u_int32_t datadoff;\ -\ u_int32_t dataulen;\ -\ u_int32_t dataflags;\ -\ void *datadata;\ -\ u_int32_t datasize;\ -\ u_int32_t flags;\ -\ __db_get_reply *replyp;\ -\ int * freep;\ -/* END __db_get_proc */ -/^\/\* BEGIN __db_h_ffactor_proc/,/^\/\* END __db_h_ffactor_proc/c\ -/* BEGIN __db_h_ffactor_proc */\ -/*\ -\ * PUBLIC: void __db_h_ffactor_proc __P((long, u_int32_t,\ -\ * PUBLIC: __db_h_ffactor_reply *));\ -\ */\ -void\ -__db_h_ffactor_proc(dbpcl_id, ffactor, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t ffactor;\ -\ __db_h_ffactor_reply *replyp;\ -/* END __db_h_ffactor_proc */ -/^\/\* BEGIN __db_h_nelem_proc/,/^\/\* END __db_h_nelem_proc/c\ -/* BEGIN __db_h_nelem_proc */\ -/*\ -\ * PUBLIC: void __db_h_nelem_proc __P((long, u_int32_t,\ -\ * PUBLIC: __db_h_nelem_reply *));\ -\ */\ -void\ -__db_h_nelem_proc(dbpcl_id, nelem, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t nelem;\ -\ __db_h_nelem_reply *replyp;\ -/* END __db_h_nelem_proc */ -/^\/\* BEGIN __db_key_range_proc/,/^\/\* END __db_key_range_proc/c\ -/* BEGIN __db_key_range_proc */\ -/*\ -\ * PUBLIC: void __db_key_range_proc __P((long, long, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __db_key_range_reply *));\ -\ */\ -void\ -__db_key_range_proc(dbpcl_id, txnpcl_id, keydlen,\ -\ \ keydoff, keyulen, keyflags, keydata,\ -\ \ keysize, flags, replyp)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ u_int32_t keydlen;\ -\ u_int32_t keydoff;\ -\ u_int32_t keyulen;\ -\ u_int32_t keyflags;\ -\ void *keydata;\ -\ u_int32_t keysize;\ -\ u_int32_t flags;\ -\ __db_key_range_reply *replyp;\ -/* END __db_key_range_proc */ -/^\/\* BEGIN __db_lorder_proc/,/^\/\* END __db_lorder_proc/c\ -/* BEGIN __db_lorder_proc */\ -/*\ -\ * PUBLIC: void __db_lorder_proc __P((long, u_int32_t, __db_lorder_reply *));\ -\ */\ -void\ -__db_lorder_proc(dbpcl_id, lorder, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t lorder;\ -\ __db_lorder_reply *replyp;\ -/* END __db_lorder_proc */ -/^\/\* BEGIN __db_open_proc/,/^\/\* END __db_open_proc/c\ -/* BEGIN __db_open_proc */\ -/*\ -\ * PUBLIC: void __db_open_proc __P((long, long, char *, char *, u_int32_t,\ -\ * PUBLIC: u_int32_t, u_int32_t, __db_open_reply *));\ -\ */\ -void\ -__db_open_proc(dbpcl_id, txnpcl_id, name,\ -\ \ subdb, type, flags, mode, replyp)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ char *name;\ -\ char *subdb;\ -\ u_int32_t type;\ -\ u_int32_t flags;\ -\ u_int32_t mode;\ -\ __db_open_reply *replyp;\ -/* END __db_open_proc */ -/^\/\* BEGIN __db_pagesize_proc/,/^\/\* END __db_pagesize_proc/c\ -/* BEGIN __db_pagesize_proc */\ -/*\ -\ * PUBLIC: void __db_pagesize_proc __P((long, u_int32_t,\ -\ * PUBLIC: __db_pagesize_reply *));\ -\ */\ -void\ -__db_pagesize_proc(dbpcl_id, pagesize, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t pagesize;\ -\ __db_pagesize_reply *replyp;\ -/* END __db_pagesize_proc */ -/^\/\* BEGIN __db_pget_proc/,/^\/\* END __db_pget_proc/c\ -/* BEGIN __db_pget_proc */\ -/*\ -\ * PUBLIC: void __db_pget_proc __P((long, long, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *,\ -\ * PUBLIC: u_int32_t, u_int32_t, __db_pget_reply *, int *));\ -\ */\ -void\ -__db_pget_proc(dbpcl_id, txnpcl_id, skeydlen,\ -\ \ skeydoff, skeyulen, skeyflags, skeydata,\ -\ \ skeysize, pkeydlen, pkeydoff, pkeyulen,\ -\ \ pkeyflags, pkeydata, pkeysize, datadlen,\ -\ \ datadoff, dataulen, dataflags, datadata,\ -\ \ datasize, flags, replyp, freep)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ u_int32_t skeydlen;\ -\ u_int32_t skeydoff;\ -\ u_int32_t skeyulen;\ -\ u_int32_t skeyflags;\ -\ void *skeydata;\ -\ u_int32_t skeysize;\ -\ u_int32_t pkeydlen;\ -\ u_int32_t pkeydoff;\ -\ u_int32_t pkeyulen;\ -\ u_int32_t pkeyflags;\ -\ void *pkeydata;\ -\ u_int32_t pkeysize;\ -\ u_int32_t datadlen;\ -\ u_int32_t datadoff;\ -\ u_int32_t dataulen;\ -\ u_int32_t dataflags;\ -\ void *datadata;\ -\ u_int32_t datasize;\ -\ u_int32_t flags;\ -\ __db_pget_reply *replyp;\ -\ int * freep;\ -/* END __db_pget_proc */ -/^\/\* BEGIN __db_put_proc/,/^\/\* END __db_put_proc/c\ -/* BEGIN __db_put_proc */\ -/*\ -\ * PUBLIC: void __db_put_proc __P((long, long, u_int32_t, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *,\ -\ * PUBLIC: u_int32_t, u_int32_t, __db_put_reply *, int *));\ -\ */\ -void\ -__db_put_proc(dbpcl_id, txnpcl_id, keydlen,\ -\ \ keydoff, keyulen, keyflags, keydata,\ -\ \ keysize, datadlen, datadoff, dataulen,\ -\ \ dataflags, datadata, datasize, flags, replyp, freep)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ u_int32_t keydlen;\ -\ u_int32_t keydoff;\ -\ u_int32_t keyulen;\ -\ u_int32_t keyflags;\ -\ void *keydata;\ -\ u_int32_t keysize;\ -\ u_int32_t datadlen;\ -\ u_int32_t datadoff;\ -\ u_int32_t dataulen;\ -\ u_int32_t dataflags;\ -\ void *datadata;\ -\ u_int32_t datasize;\ -\ u_int32_t flags;\ -\ __db_put_reply *replyp;\ -\ int * freep;\ -/* END __db_put_proc */ -/^\/\* BEGIN __db_re_delim_proc/,/^\/\* END __db_re_delim_proc/c\ -/* BEGIN __db_re_delim_proc */\ -/*\ -\ * PUBLIC: void __db_re_delim_proc __P((long, u_int32_t,\ -\ * PUBLIC: __db_re_delim_reply *));\ -\ */\ -void\ -__db_re_delim_proc(dbpcl_id, delim, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t delim;\ -\ __db_re_delim_reply *replyp;\ -/* END __db_re_delim_proc */ -/^\/\* BEGIN __db_re_len_proc/,/^\/\* END __db_re_len_proc/c\ -/* BEGIN __db_re_len_proc */\ -/*\ -\ * PUBLIC: void __db_re_len_proc __P((long, u_int32_t, __db_re_len_reply *));\ -\ */\ -void\ -__db_re_len_proc(dbpcl_id, len, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t len;\ -\ __db_re_len_reply *replyp;\ -/* END __db_re_len_proc */ -/^\/\* BEGIN __db_re_pad_proc/,/^\/\* END __db_re_pad_proc/c\ -/* BEGIN __db_re_pad_proc */\ -/*\ -\ * PUBLIC: void __db_re_pad_proc __P((long, u_int32_t, __db_re_pad_reply *));\ -\ */\ -void\ -__db_re_pad_proc(dbpcl_id, pad, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t pad;\ -\ __db_re_pad_reply *replyp;\ -/* END __db_re_pad_proc */ -/^\/\* BEGIN __db_remove_proc/,/^\/\* END __db_remove_proc/c\ -/* BEGIN __db_remove_proc */\ -/*\ -\ * PUBLIC: void __db_remove_proc __P((long, char *, char *, u_int32_t,\ -\ * PUBLIC: __db_remove_reply *));\ -\ */\ -void\ -__db_remove_proc(dbpcl_id, name, subdb,\ -\ \ flags, replyp)\ -\ long dbpcl_id;\ -\ char *name;\ -\ char *subdb;\ -\ u_int32_t flags;\ -\ __db_remove_reply *replyp;\ -/* END __db_remove_proc */ -/^\/\* BEGIN __db_rename_proc/,/^\/\* END __db_rename_proc/c\ -/* BEGIN __db_rename_proc */\ -/*\ -\ * PUBLIC: void __db_rename_proc __P((long, char *, char *, char *, u_int32_t,\ -\ * PUBLIC: __db_rename_reply *));\ -\ */\ -void\ -__db_rename_proc(dbpcl_id, name, subdb,\ -\ \ newname, flags, replyp)\ -\ long dbpcl_id;\ -\ char *name;\ -\ char *subdb;\ -\ char *newname;\ -\ u_int32_t flags;\ -\ __db_rename_reply *replyp;\ -/* END __db_rename_proc */ -/^\/\* BEGIN __db_stat_proc/,/^\/\* END __db_stat_proc/c\ -/* BEGIN __db_stat_proc */\ -/*\ -\ * PUBLIC: void __db_stat_proc __P((long, u_int32_t, __db_stat_reply *,\ -\ * PUBLIC: int *));\ -\ */\ -void\ -__db_stat_proc(dbpcl_id, flags, replyp, freep)\ -\ long dbpcl_id;\ -\ u_int32_t flags;\ -\ __db_stat_reply *replyp;\ -\ int * freep;\ -/* END __db_stat_proc */ -/^\/\* BEGIN __db_sync_proc/,/^\/\* END __db_sync_proc/c\ -/* BEGIN __db_sync_proc */\ -/*\ -\ * PUBLIC: void __db_sync_proc __P((long, u_int32_t, __db_sync_reply *));\ -\ */\ -void\ -__db_sync_proc(dbpcl_id, flags, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t flags;\ -\ __db_sync_reply *replyp;\ -/* END __db_sync_proc */ -/^\/\* BEGIN __db_truncate_proc/,/^\/\* END __db_truncate_proc/c\ -/* BEGIN __db_truncate_proc */\ -/*\ -\ * PUBLIC: void __db_truncate_proc __P((long, long, u_int32_t,\ -\ * PUBLIC: __db_truncate_reply *));\ -\ */\ -void\ -__db_truncate_proc(dbpcl_id, txnpcl_id,\ -\ \ flags, replyp)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ u_int32_t flags;\ -\ __db_truncate_reply *replyp;\ -/* END __db_truncate_proc */ -/^\/\* BEGIN __db_cursor_proc/,/^\/\* END __db_cursor_proc/c\ -/* BEGIN __db_cursor_proc */\ -/*\ -\ * PUBLIC: void __db_cursor_proc __P((long, long, u_int32_t,\ -\ * PUBLIC: __db_cursor_reply *));\ -\ */\ -void\ -__db_cursor_proc(dbpcl_id, txnpcl_id,\ -\ \ flags, replyp)\ -\ long dbpcl_id;\ -\ long txnpcl_id;\ -\ u_int32_t flags;\ -\ __db_cursor_reply *replyp;\ -/* END __db_cursor_proc */ -/^\/\* BEGIN __db_join_proc/,/^\/\* END __db_join_proc/c\ -/* BEGIN __db_join_proc */\ -/*\ -\ * PUBLIC: void __db_join_proc __P((long, u_int32_t *, u_int32_t, u_int32_t,\ -\ * PUBLIC: __db_join_reply *));\ -\ */\ -void\ -__db_join_proc(dbpcl_id, curs, curslen,\ -\ \ flags, replyp)\ -\ long dbpcl_id;\ -\ u_int32_t * curs;\ -\ u_int32_t curslen;\ -\ u_int32_t flags;\ -\ __db_join_reply *replyp;\ -/* END __db_join_proc */ -/^\/\* BEGIN __dbc_close_proc/,/^\/\* END __dbc_close_proc/c\ -/* BEGIN __dbc_close_proc */\ -/*\ -\ * PUBLIC: void __dbc_close_proc __P((long, __dbc_close_reply *));\ -\ */\ -void\ -__dbc_close_proc(dbccl_id, replyp)\ -\ long dbccl_id;\ -\ __dbc_close_reply *replyp;\ -/* END __dbc_close_proc */ -/^\/\* BEGIN __dbc_count_proc/,/^\/\* END __dbc_count_proc/c\ -/* BEGIN __dbc_count_proc */\ -/*\ -\ * PUBLIC: void __dbc_count_proc __P((long, u_int32_t, __dbc_count_reply *));\ -\ */\ -void\ -__dbc_count_proc(dbccl_id, flags, replyp)\ -\ long dbccl_id;\ -\ u_int32_t flags;\ -\ __dbc_count_reply *replyp;\ -/* END __dbc_count_proc */ -/^\/\* BEGIN __dbc_del_proc/,/^\/\* END __dbc_del_proc/c\ -/* BEGIN __dbc_del_proc */\ -/*\ -\ * PUBLIC: void __dbc_del_proc __P((long, u_int32_t, __dbc_del_reply *));\ -\ */\ -void\ -__dbc_del_proc(dbccl_id, flags, replyp)\ -\ long dbccl_id;\ -\ u_int32_t flags;\ -\ __dbc_del_reply *replyp;\ -/* END __dbc_del_proc */ -/^\/\* BEGIN __dbc_dup_proc/,/^\/\* END __dbc_dup_proc/c\ -/* BEGIN __dbc_dup_proc */\ -/*\ -\ * PUBLIC: void __dbc_dup_proc __P((long, u_int32_t, __dbc_dup_reply *));\ -\ */\ -void\ -__dbc_dup_proc(dbccl_id, flags, replyp)\ -\ long dbccl_id;\ -\ u_int32_t flags;\ -\ __dbc_dup_reply *replyp;\ -/* END __dbc_dup_proc */ -/^\/\* BEGIN __dbc_get_proc/,/^\/\* END __dbc_get_proc/c\ -/* BEGIN __dbc_get_proc */\ -/*\ -\ * PUBLIC: void __dbc_get_proc __P((long, u_int32_t, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *,\ -\ * PUBLIC: u_int32_t, u_int32_t, __dbc_get_reply *, int *));\ -\ */\ -void\ -__dbc_get_proc(dbccl_id, keydlen, keydoff,\ -\ \ keyulen, keyflags, keydata, keysize,\ -\ \ datadlen, datadoff, dataulen, dataflags,\ -\ \ datadata, datasize, flags, replyp, freep)\ -\ long dbccl_id;\ -\ u_int32_t keydlen;\ -\ u_int32_t keydoff;\ -\ u_int32_t keyulen;\ -\ u_int32_t keyflags;\ -\ void *keydata;\ -\ u_int32_t keysize;\ -\ u_int32_t datadlen;\ -\ u_int32_t datadoff;\ -\ u_int32_t dataulen;\ -\ u_int32_t dataflags;\ -\ void *datadata;\ -\ u_int32_t datasize;\ -\ u_int32_t flags;\ -\ __dbc_get_reply *replyp;\ -\ int * freep;\ -/* END __dbc_get_proc */ -/^\/\* BEGIN __dbc_pget_proc/,/^\/\* END __dbc_pget_proc/c\ -/* BEGIN __dbc_pget_proc */\ -/*\ -\ * PUBLIC: void __dbc_pget_proc __P((long, u_int32_t, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *,\ -\ * PUBLIC: u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t,\ -\ * PUBLIC: u_int32_t, __dbc_pget_reply *, int *));\ -\ */\ -void\ -__dbc_pget_proc(dbccl_id, skeydlen, skeydoff,\ -\ \ skeyulen, skeyflags, skeydata, skeysize,\ -\ \ pkeydlen, pkeydoff, pkeyulen, pkeyflags,\ -\ \ pkeydata, pkeysize, datadlen, datadoff,\ -\ \ dataulen, dataflags, datadata, datasize,\ -\ \ flags, replyp, freep)\ -\ long dbccl_id;\ -\ u_int32_t skeydlen;\ -\ u_int32_t skeydoff;\ -\ u_int32_t skeyulen;\ -\ u_int32_t skeyflags;\ -\ void *skeydata;\ -\ u_int32_t skeysize;\ -\ u_int32_t pkeydlen;\ -\ u_int32_t pkeydoff;\ -\ u_int32_t pkeyulen;\ -\ u_int32_t pkeyflags;\ -\ void *pkeydata;\ -\ u_int32_t pkeysize;\ -\ u_int32_t datadlen;\ -\ u_int32_t datadoff;\ -\ u_int32_t dataulen;\ -\ u_int32_t dataflags;\ -\ void *datadata;\ -\ u_int32_t datasize;\ -\ u_int32_t flags;\ -\ __dbc_pget_reply *replyp;\ -\ int * freep;\ -/* END __dbc_pget_proc */ -/^\/\* BEGIN __dbc_put_proc/,/^\/\* END __dbc_put_proc/c\ -/* BEGIN __dbc_put_proc */\ -/*\ -\ * PUBLIC: void __dbc_put_proc __P((long, u_int32_t, u_int32_t, u_int32_t,\ -\ * PUBLIC: u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *,\ -\ * PUBLIC: u_int32_t, u_int32_t, __dbc_put_reply *, int *));\ -\ */\ -void\ -__dbc_put_proc(dbccl_id, keydlen, keydoff,\ -\ \ keyulen, keyflags, keydata, keysize,\ -\ \ datadlen, datadoff, dataulen, dataflags,\ -\ \ datadata, datasize, flags, replyp, freep)\ -\ long dbccl_id;\ -\ u_int32_t keydlen;\ -\ u_int32_t keydoff;\ -\ u_int32_t keyulen;\ -\ u_int32_t keyflags;\ -\ void *keydata;\ -\ u_int32_t keysize;\ -\ u_int32_t datadlen;\ -\ u_int32_t datadoff;\ -\ u_int32_t dataulen;\ -\ u_int32_t dataflags;\ -\ void *datadata;\ -\ u_int32_t datasize;\ -\ u_int32_t flags;\ -\ __dbc_put_reply *replyp;\ -\ int * freep;\ -/* END __dbc_put_proc */ diff --git a/bdb/rpc_server/c/db_server_svc.c b/bdb/rpc_server/c/db_server_svc.c deleted file mode 100644 index 96dd959ec8c..00000000000 --- a/bdb/rpc_server/c/db_server_svc.c +++ /dev/null @@ -1,435 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include -#include -#include -#include /* getenv, exit */ -#include -#include -#include -#endif - -#include "db_int.h" -#include "dbinc_auto/db_server.h" -#include "dbinc/db_server_int.h" -#include "dbinc_auto/rpc_server_ext.h" - -#ifdef DEBUG -#define RPC_SVC_FG -#endif - -static void -db_rpc_serverprog_4001(rqstp, transp) - struct svc_req *rqstp; - register SVCXPRT *transp; -{ - union { - __env_cachesize_msg __db_env_cachesize_4001_arg; - __env_close_msg __db_env_close_4001_arg; - __env_create_msg __db_env_create_4001_arg; - __env_dbremove_msg __db_env_dbremove_4001_arg; - __env_dbrename_msg __db_env_dbrename_4001_arg; - __env_encrypt_msg __db_env_encrypt_4001_arg; - __env_flags_msg __db_env_flags_4001_arg; - __env_open_msg __db_env_open_4001_arg; - __env_remove_msg __db_env_remove_4001_arg; - __txn_abort_msg __db_txn_abort_4001_arg; - __txn_begin_msg __db_txn_begin_4001_arg; - __txn_commit_msg __db_txn_commit_4001_arg; - __txn_discard_msg __db_txn_discard_4001_arg; - __txn_prepare_msg __db_txn_prepare_4001_arg; - __txn_recover_msg __db_txn_recover_4001_arg; - __db_associate_msg __db_db_associate_4001_arg; - __db_bt_maxkey_msg __db_db_bt_maxkey_4001_arg; - __db_bt_minkey_msg __db_db_bt_minkey_4001_arg; - __db_close_msg __db_db_close_4001_arg; - __db_create_msg __db_db_create_4001_arg; - __db_del_msg __db_db_del_4001_arg; - __db_encrypt_msg __db_db_encrypt_4001_arg; - __db_extentsize_msg __db_db_extentsize_4001_arg; - __db_flags_msg __db_db_flags_4001_arg; - __db_get_msg __db_db_get_4001_arg; - __db_h_ffactor_msg __db_db_h_ffactor_4001_arg; - __db_h_nelem_msg __db_db_h_nelem_4001_arg; - __db_key_range_msg __db_db_key_range_4001_arg; - __db_lorder_msg __db_db_lorder_4001_arg; - __db_open_msg __db_db_open_4001_arg; - __db_pagesize_msg __db_db_pagesize_4001_arg; - __db_pget_msg __db_db_pget_4001_arg; - __db_put_msg __db_db_put_4001_arg; - __db_re_delim_msg __db_db_re_delim_4001_arg; - __db_re_len_msg __db_db_re_len_4001_arg; - __db_re_pad_msg __db_db_re_pad_4001_arg; - __db_remove_msg __db_db_remove_4001_arg; - __db_rename_msg __db_db_rename_4001_arg; - __db_stat_msg __db_db_stat_4001_arg; - __db_sync_msg __db_db_sync_4001_arg; - __db_truncate_msg __db_db_truncate_4001_arg; - __db_cursor_msg __db_db_cursor_4001_arg; - __db_join_msg __db_db_join_4001_arg; - __dbc_close_msg __db_dbc_close_4001_arg; - __dbc_count_msg __db_dbc_count_4001_arg; - __dbc_del_msg __db_dbc_del_4001_arg; - __dbc_dup_msg __db_dbc_dup_4001_arg; - __dbc_get_msg __db_dbc_get_4001_arg; - __dbc_pget_msg __db_dbc_pget_4001_arg; - __dbc_put_msg __db_dbc_put_4001_arg; - } argument; - char *result; - bool_t (*xdr_argument)(), (*xdr_result)(); - char *(*local)(); - - switch (rqstp->rq_proc) { - case NULLPROC: - (void) svc_sendreply(transp, (xdrproc_t)xdr_void, - (char *)NULL); - return; - - case __DB_env_cachesize: - xdr_argument = xdr___env_cachesize_msg; - xdr_result = xdr___env_cachesize_reply; - local = (char *(*)()) __db_env_cachesize_4001; - break; - - case __DB_env_close: - xdr_argument = xdr___env_close_msg; - xdr_result = xdr___env_close_reply; - local = (char *(*)()) __db_env_close_4001; - break; - - case __DB_env_create: - xdr_argument = xdr___env_create_msg; - xdr_result = xdr___env_create_reply; - local = (char *(*)()) __db_env_create_4001; - break; - - case __DB_env_dbremove: - xdr_argument = xdr___env_dbremove_msg; - xdr_result = xdr___env_dbremove_reply; - local = (char *(*)()) __db_env_dbremove_4001; - break; - - case __DB_env_dbrename: - xdr_argument = xdr___env_dbrename_msg; - xdr_result = xdr___env_dbrename_reply; - local = (char *(*)()) __db_env_dbrename_4001; - break; - - case __DB_env_encrypt: - xdr_argument = xdr___env_encrypt_msg; - xdr_result = xdr___env_encrypt_reply; - local = (char *(*)()) __db_env_encrypt_4001; - break; - - case __DB_env_flags: - xdr_argument = xdr___env_flags_msg; - xdr_result = xdr___env_flags_reply; - local = (char *(*)()) __db_env_flags_4001; - break; - - case __DB_env_open: - xdr_argument = xdr___env_open_msg; - xdr_result = xdr___env_open_reply; - local = (char *(*)()) __db_env_open_4001; - break; - - case __DB_env_remove: - xdr_argument = xdr___env_remove_msg; - xdr_result = xdr___env_remove_reply; - local = (char *(*)()) __db_env_remove_4001; - break; - - case __DB_txn_abort: - xdr_argument = xdr___txn_abort_msg; - xdr_result = xdr___txn_abort_reply; - local = (char *(*)()) __db_txn_abort_4001; - break; - - case __DB_txn_begin: - xdr_argument = xdr___txn_begin_msg; - xdr_result = xdr___txn_begin_reply; - local = (char *(*)()) __db_txn_begin_4001; - break; - - case __DB_txn_commit: - xdr_argument = xdr___txn_commit_msg; - xdr_result = xdr___txn_commit_reply; - local = (char *(*)()) __db_txn_commit_4001; - break; - - case __DB_txn_discard: - xdr_argument = xdr___txn_discard_msg; - xdr_result = xdr___txn_discard_reply; - local = (char *(*)()) __db_txn_discard_4001; - break; - - case __DB_txn_prepare: - xdr_argument = xdr___txn_prepare_msg; - xdr_result = xdr___txn_prepare_reply; - local = (char *(*)()) __db_txn_prepare_4001; - break; - - case __DB_txn_recover: - xdr_argument = xdr___txn_recover_msg; - xdr_result = xdr___txn_recover_reply; - local = (char *(*)()) __db_txn_recover_4001; - break; - - case __DB_db_associate: - xdr_argument = xdr___db_associate_msg; - xdr_result = xdr___db_associate_reply; - local = (char *(*)()) __db_db_associate_4001; - break; - - case __DB_db_bt_maxkey: - xdr_argument = xdr___db_bt_maxkey_msg; - xdr_result = xdr___db_bt_maxkey_reply; - local = (char *(*)()) __db_db_bt_maxkey_4001; - break; - - case __DB_db_bt_minkey: - xdr_argument = xdr___db_bt_minkey_msg; - xdr_result = xdr___db_bt_minkey_reply; - local = (char *(*)()) __db_db_bt_minkey_4001; - break; - - case __DB_db_close: - xdr_argument = xdr___db_close_msg; - xdr_result = xdr___db_close_reply; - local = (char *(*)()) __db_db_close_4001; - break; - - case __DB_db_create: - xdr_argument = xdr___db_create_msg; - xdr_result = xdr___db_create_reply; - local = (char *(*)()) __db_db_create_4001; - break; - - case __DB_db_del: - xdr_argument = xdr___db_del_msg; - xdr_result = xdr___db_del_reply; - local = (char *(*)()) __db_db_del_4001; - break; - - case __DB_db_encrypt: - xdr_argument = xdr___db_encrypt_msg; - xdr_result = xdr___db_encrypt_reply; - local = (char *(*)()) __db_db_encrypt_4001; - break; - - case __DB_db_extentsize: - xdr_argument = xdr___db_extentsize_msg; - xdr_result = xdr___db_extentsize_reply; - local = (char *(*)()) __db_db_extentsize_4001; - break; - - case __DB_db_flags: - xdr_argument = xdr___db_flags_msg; - xdr_result = xdr___db_flags_reply; - local = (char *(*)()) __db_db_flags_4001; - break; - - case __DB_db_get: - xdr_argument = xdr___db_get_msg; - xdr_result = xdr___db_get_reply; - local = (char *(*)()) __db_db_get_4001; - break; - - case __DB_db_h_ffactor: - xdr_argument = xdr___db_h_ffactor_msg; - xdr_result = xdr___db_h_ffactor_reply; - local = (char *(*)()) __db_db_h_ffactor_4001; - break; - - case __DB_db_h_nelem: - xdr_argument = xdr___db_h_nelem_msg; - xdr_result = xdr___db_h_nelem_reply; - local = (char *(*)()) __db_db_h_nelem_4001; - break; - - case __DB_db_key_range: - xdr_argument = xdr___db_key_range_msg; - xdr_result = xdr___db_key_range_reply; - local = (char *(*)()) __db_db_key_range_4001; - break; - - case __DB_db_lorder: - xdr_argument = xdr___db_lorder_msg; - xdr_result = xdr___db_lorder_reply; - local = (char *(*)()) __db_db_lorder_4001; - break; - - case __DB_db_open: - xdr_argument = xdr___db_open_msg; - xdr_result = xdr___db_open_reply; - local = (char *(*)()) __db_db_open_4001; - break; - - case __DB_db_pagesize: - xdr_argument = xdr___db_pagesize_msg; - xdr_result = xdr___db_pagesize_reply; - local = (char *(*)()) __db_db_pagesize_4001; - break; - - case __DB_db_pget: - xdr_argument = xdr___db_pget_msg; - xdr_result = xdr___db_pget_reply; - local = (char *(*)()) __db_db_pget_4001; - break; - - case __DB_db_put: - xdr_argument = xdr___db_put_msg; - xdr_result = xdr___db_put_reply; - local = (char *(*)()) __db_db_put_4001; - break; - - case __DB_db_re_delim: - xdr_argument = xdr___db_re_delim_msg; - xdr_result = xdr___db_re_delim_reply; - local = (char *(*)()) __db_db_re_delim_4001; - break; - - case __DB_db_re_len: - xdr_argument = xdr___db_re_len_msg; - xdr_result = xdr___db_re_len_reply; - local = (char *(*)()) __db_db_re_len_4001; - break; - - case __DB_db_re_pad: - xdr_argument = xdr___db_re_pad_msg; - xdr_result = xdr___db_re_pad_reply; - local = (char *(*)()) __db_db_re_pad_4001; - break; - - case __DB_db_remove: - xdr_argument = xdr___db_remove_msg; - xdr_result = xdr___db_remove_reply; - local = (char *(*)()) __db_db_remove_4001; - break; - - case __DB_db_rename: - xdr_argument = xdr___db_rename_msg; - xdr_result = xdr___db_rename_reply; - local = (char *(*)()) __db_db_rename_4001; - break; - - case __DB_db_stat: - xdr_argument = xdr___db_stat_msg; - xdr_result = xdr___db_stat_reply; - local = (char *(*)()) __db_db_stat_4001; - break; - - case __DB_db_sync: - xdr_argument = xdr___db_sync_msg; - xdr_result = xdr___db_sync_reply; - local = (char *(*)()) __db_db_sync_4001; - break; - - case __DB_db_truncate: - xdr_argument = xdr___db_truncate_msg; - xdr_result = xdr___db_truncate_reply; - local = (char *(*)()) __db_db_truncate_4001; - break; - - case __DB_db_cursor: - xdr_argument = xdr___db_cursor_msg; - xdr_result = xdr___db_cursor_reply; - local = (char *(*)()) __db_db_cursor_4001; - break; - - case __DB_db_join: - xdr_argument = xdr___db_join_msg; - xdr_result = xdr___db_join_reply; - local = (char *(*)()) __db_db_join_4001; - break; - - case __DB_dbc_close: - xdr_argument = xdr___dbc_close_msg; - xdr_result = xdr___dbc_close_reply; - local = (char *(*)()) __db_dbc_close_4001; - break; - - case __DB_dbc_count: - xdr_argument = xdr___dbc_count_msg; - xdr_result = xdr___dbc_count_reply; - local = (char *(*)()) __db_dbc_count_4001; - break; - - case __DB_dbc_del: - xdr_argument = xdr___dbc_del_msg; - xdr_result = xdr___dbc_del_reply; - local = (char *(*)()) __db_dbc_del_4001; - break; - - case __DB_dbc_dup: - xdr_argument = xdr___dbc_dup_msg; - xdr_result = xdr___dbc_dup_reply; - local = (char *(*)()) __db_dbc_dup_4001; - break; - - case __DB_dbc_get: - xdr_argument = xdr___dbc_get_msg; - xdr_result = xdr___dbc_get_reply; - local = (char *(*)()) __db_dbc_get_4001; - break; - - case __DB_dbc_pget: - xdr_argument = xdr___dbc_pget_msg; - xdr_result = xdr___dbc_pget_reply; - local = (char *(*)()) __db_dbc_pget_4001; - break; - - case __DB_dbc_put: - xdr_argument = xdr___dbc_put_msg; - xdr_result = xdr___dbc_put_reply; - local = (char *(*)()) __db_dbc_put_4001; - break; - - default: - svcerr_noproc(transp); - return; - } - (void) memset((char *)&argument, 0, sizeof (argument)); - if (!svc_getargs(transp, (xdrproc_t)xdr_argument, (char *)&argument)) { - svcerr_decode(transp); - return; - } - result = (*local)(&argument, rqstp); - if (result != NULL && !svc_sendreply(transp, (xdrproc_t)xdr_result, result)) { - svcerr_systemerr(transp); - } - if (!svc_freeargs(transp, (xdrproc_t)xdr_argument, (char *)&argument)) { - fprintf(stderr, "unable to free arguments"); - exit(1); - } - __dbsrv_timeout(0); - return; -} - -void __dbsrv_main() -{ - register SVCXPRT *transp; - - (void) pmap_unset(DB_RPC_SERVERPROG, DB_RPC_SERVERVERS); - - transp = svctcp_create(RPC_ANYSOCK, 0, 0); - if (transp == NULL) { - fprintf(stderr, "cannot create tcp service."); - exit(1); - } - if (!svc_register(transp, DB_RPC_SERVERPROG, DB_RPC_SERVERVERS, db_rpc_serverprog_4001, IPPROTO_TCP)) { - fprintf(stderr, "unable to register (DB_RPC_SERVERPROG, DB_RPC_SERVERVERS, tcp)."); - exit(1); - } - - svc_run(); - fprintf(stderr, "svc_run returned"); - exit(1); - /* NOTREACHED */ -} diff --git a/bdb/rpc_server/c/db_server_xdr.c b/bdb/rpc_server/c/db_server_xdr.c deleted file mode 100644 index bfe2b6c09c7..00000000000 --- a/bdb/rpc_server/c/db_server_xdr.c +++ /dev/null @@ -1,1512 +0,0 @@ -#include "db_config.h" - -#ifdef HAVE_RPC -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#endif - -#include "db_int.h" -#include "dbinc_auto/db_server.h" - -bool_t -xdr___env_cachesize_msg(xdrs, objp) - register XDR *xdrs; - __env_cachesize_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->gbytes)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->bytes)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->ncache)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_cachesize_reply(xdrs, objp) - register XDR *xdrs; - __env_cachesize_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_close_msg(xdrs, objp) - register XDR *xdrs; - __env_close_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_close_reply(xdrs, objp) - register XDR *xdrs; - __env_close_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_create_msg(xdrs, objp) - register XDR *xdrs; - __env_create_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->timeout)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_create_reply(xdrs, objp) - register XDR *xdrs; - __env_create_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->envcl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_dbremove_msg(xdrs, objp) - register XDR *xdrs; - __env_dbremove_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->name, ~0)) - return (FALSE); - if (!xdr_string(xdrs, &objp->subdb, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_dbremove_reply(xdrs, objp) - register XDR *xdrs; - __env_dbremove_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_dbrename_msg(xdrs, objp) - register XDR *xdrs; - __env_dbrename_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->name, ~0)) - return (FALSE); - if (!xdr_string(xdrs, &objp->subdb, ~0)) - return (FALSE); - if (!xdr_string(xdrs, &objp->newname, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_dbrename_reply(xdrs, objp) - register XDR *xdrs; - __env_dbrename_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_encrypt_msg(xdrs, objp) - register XDR *xdrs; - __env_encrypt_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->passwd, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_encrypt_reply(xdrs, objp) - register XDR *xdrs; - __env_encrypt_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_flags_msg(xdrs, objp) - register XDR *xdrs; - __env_flags_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->onoff)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_flags_reply(xdrs, objp) - register XDR *xdrs; - __env_flags_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_open_msg(xdrs, objp) - register XDR *xdrs; - __env_open_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->home, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->mode)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_open_reply(xdrs, objp) - register XDR *xdrs; - __env_open_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->envcl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_remove_msg(xdrs, objp) - register XDR *xdrs; - __env_remove_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->home, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___env_remove_reply(xdrs, objp) - register XDR *xdrs; - __env_remove_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_abort_msg(xdrs, objp) - register XDR *xdrs; - __txn_abort_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_abort_reply(xdrs, objp) - register XDR *xdrs; - __txn_abort_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_begin_msg(xdrs, objp) - register XDR *xdrs; - __txn_begin_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->parentcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_begin_reply(xdrs, objp) - register XDR *xdrs; - __txn_begin_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnidcl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_commit_msg(xdrs, objp) - register XDR *xdrs; - __txn_commit_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_commit_reply(xdrs, objp) - register XDR *xdrs; - __txn_commit_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_discard_msg(xdrs, objp) - register XDR *xdrs; - __txn_discard_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_discard_reply(xdrs, objp) - register XDR *xdrs; - __txn_discard_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_prepare_msg(xdrs, objp) - register XDR *xdrs; - __txn_prepare_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_opaque(xdrs, objp->gid, 128)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_prepare_reply(xdrs, objp) - register XDR *xdrs; - __txn_prepare_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_recover_msg(xdrs, objp) - register XDR *xdrs; - __txn_recover_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->count)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___txn_recover_reply(xdrs, objp) - register XDR *xdrs; - __txn_recover_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_array(xdrs, (char **)&objp->txn.txn_val, (u_int *) &objp->txn.txn_len, ~0, - sizeof (u_int), (xdrproc_t) xdr_u_int)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->gid.gid_val, (u_int *) &objp->gid.gid_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->retcount)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_associate_msg(xdrs, objp) - register XDR *xdrs; - __db_associate_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->sdbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_associate_reply(xdrs, objp) - register XDR *xdrs; - __db_associate_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_bt_maxkey_msg(xdrs, objp) - register XDR *xdrs; - __db_bt_maxkey_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->maxkey)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_bt_maxkey_reply(xdrs, objp) - register XDR *xdrs; - __db_bt_maxkey_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_bt_minkey_msg(xdrs, objp) - register XDR *xdrs; - __db_bt_minkey_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->minkey)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_bt_minkey_reply(xdrs, objp) - register XDR *xdrs; - __db_bt_minkey_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_close_msg(xdrs, objp) - register XDR *xdrs; - __db_close_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_close_reply(xdrs, objp) - register XDR *xdrs; - __db_close_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_create_msg(xdrs, objp) - register XDR *xdrs; - __db_create_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbenvcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_create_reply(xdrs, objp) - register XDR *xdrs; - __db_create_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dbcl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_del_msg(xdrs, objp) - register XDR *xdrs; - __db_del_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_del_reply(xdrs, objp) - register XDR *xdrs; - __db_del_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_encrypt_msg(xdrs, objp) - register XDR *xdrs; - __db_encrypt_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->passwd, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_encrypt_reply(xdrs, objp) - register XDR *xdrs; - __db_encrypt_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_extentsize_msg(xdrs, objp) - register XDR *xdrs; - __db_extentsize_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->extentsize)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_extentsize_reply(xdrs, objp) - register XDR *xdrs; - __db_extentsize_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_flags_msg(xdrs, objp) - register XDR *xdrs; - __db_flags_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_flags_reply(xdrs, objp) - register XDR *xdrs; - __db_flags_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_get_msg(xdrs, objp) - register XDR *xdrs; - __db_get_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_get_reply(xdrs, objp) - register XDR *xdrs; - __db_get_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_h_ffactor_msg(xdrs, objp) - register XDR *xdrs; - __db_h_ffactor_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->ffactor)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_h_ffactor_reply(xdrs, objp) - register XDR *xdrs; - __db_h_ffactor_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_h_nelem_msg(xdrs, objp) - register XDR *xdrs; - __db_h_nelem_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->nelem)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_h_nelem_reply(xdrs, objp) - register XDR *xdrs; - __db_h_nelem_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_key_range_msg(xdrs, objp) - register XDR *xdrs; - __db_key_range_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_key_range_reply(xdrs, objp) - register XDR *xdrs; - __db_key_range_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_double(xdrs, &objp->less)) - return (FALSE); - if (!xdr_double(xdrs, &objp->equal)) - return (FALSE); - if (!xdr_double(xdrs, &objp->greater)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_lorder_msg(xdrs, objp) - register XDR *xdrs; - __db_lorder_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->lorder)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_lorder_reply(xdrs, objp) - register XDR *xdrs; - __db_lorder_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_open_msg(xdrs, objp) - register XDR *xdrs; - __db_open_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->name, ~0)) - return (FALSE); - if (!xdr_string(xdrs, &objp->subdb, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->type)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->mode)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_open_reply(xdrs, objp) - register XDR *xdrs; - __db_open_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dbcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->type)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dbflags)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->lorder)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_pagesize_msg(xdrs, objp) - register XDR *xdrs; - __db_pagesize_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pagesize)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_pagesize_reply(xdrs, objp) - register XDR *xdrs; - __db_pagesize_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_pget_msg(xdrs, objp) - register XDR *xdrs; - __db_pget_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->skeydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->skeydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->skeyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->skeyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->skeydata.skeydata_val, (u_int *) &objp->skeydata.skeydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pkeydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pkeydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pkeyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pkeyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->pkeydata.pkeydata_val, (u_int *) &objp->pkeydata.pkeydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_pget_reply(xdrs, objp) - register XDR *xdrs; - __db_pget_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->skeydata.skeydata_val, (u_int *) &objp->skeydata.skeydata_len, ~0)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->pkeydata.pkeydata_val, (u_int *) &objp->pkeydata.pkeydata_len, ~0)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_put_msg(xdrs, objp) - register XDR *xdrs; - __db_put_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_put_reply(xdrs, objp) - register XDR *xdrs; - __db_put_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_re_delim_msg(xdrs, objp) - register XDR *xdrs; - __db_re_delim_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->delim)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_re_delim_reply(xdrs, objp) - register XDR *xdrs; - __db_re_delim_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_re_len_msg(xdrs, objp) - register XDR *xdrs; - __db_re_len_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->len)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_re_len_reply(xdrs, objp) - register XDR *xdrs; - __db_re_len_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_re_pad_msg(xdrs, objp) - register XDR *xdrs; - __db_re_pad_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pad)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_re_pad_reply(xdrs, objp) - register XDR *xdrs; - __db_re_pad_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_remove_msg(xdrs, objp) - register XDR *xdrs; - __db_remove_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->name, ~0)) - return (FALSE); - if (!xdr_string(xdrs, &objp->subdb, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_remove_reply(xdrs, objp) - register XDR *xdrs; - __db_remove_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_rename_msg(xdrs, objp) - register XDR *xdrs; - __db_rename_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_string(xdrs, &objp->name, ~0)) - return (FALSE); - if (!xdr_string(xdrs, &objp->subdb, ~0)) - return (FALSE); - if (!xdr_string(xdrs, &objp->newname, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_rename_reply(xdrs, objp) - register XDR *xdrs; - __db_rename_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_stat_msg(xdrs, objp) - register XDR *xdrs; - __db_stat_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_stat_reply(xdrs, objp) - register XDR *xdrs; - __db_stat_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_array(xdrs, (char **)&objp->stats.stats_val, (u_int *) &objp->stats.stats_len, ~0, - sizeof (u_int), (xdrproc_t) xdr_u_int)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_sync_msg(xdrs, objp) - register XDR *xdrs; - __db_sync_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_sync_reply(xdrs, objp) - register XDR *xdrs; - __db_sync_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_truncate_msg(xdrs, objp) - register XDR *xdrs; - __db_truncate_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_truncate_reply(xdrs, objp) - register XDR *xdrs; - __db_truncate_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->count)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_cursor_msg(xdrs, objp) - register XDR *xdrs; - __db_cursor_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->txnpcl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_cursor_reply(xdrs, objp) - register XDR *xdrs; - __db_cursor_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dbcidcl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_join_msg(xdrs, objp) - register XDR *xdrs; - __db_join_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbpcl_id)) - return (FALSE); - if (!xdr_array(xdrs, (char **)&objp->curs.curs_val, (u_int *) &objp->curs.curs_len, ~0, - sizeof (u_int), (xdrproc_t) xdr_u_int)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___db_join_reply(xdrs, objp) - register XDR *xdrs; - __db_join_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dbcidcl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_close_msg(xdrs, objp) - register XDR *xdrs; - __dbc_close_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbccl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_close_reply(xdrs, objp) - register XDR *xdrs; - __dbc_close_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_count_msg(xdrs, objp) - register XDR *xdrs; - __dbc_count_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbccl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_count_reply(xdrs, objp) - register XDR *xdrs; - __dbc_count_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dupcount)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_del_msg(xdrs, objp) - register XDR *xdrs; - __dbc_del_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbccl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_del_reply(xdrs, objp) - register XDR *xdrs; - __dbc_del_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_dup_msg(xdrs, objp) - register XDR *xdrs; - __dbc_dup_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbccl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_dup_reply(xdrs, objp) - register XDR *xdrs; - __dbc_dup_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dbcidcl_id)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_get_msg(xdrs, objp) - register XDR *xdrs; - __dbc_get_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbccl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_get_reply(xdrs, objp) - register XDR *xdrs; - __dbc_get_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_pget_msg(xdrs, objp) - register XDR *xdrs; - __dbc_pget_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbccl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->skeydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->skeydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->skeyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->skeyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->skeydata.skeydata_val, (u_int *) &objp->skeydata.skeydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pkeydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pkeydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pkeyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->pkeyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->pkeydata.pkeydata_val, (u_int *) &objp->pkeydata.pkeydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_pget_reply(xdrs, objp) - register XDR *xdrs; - __dbc_pget_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->skeydata.skeydata_val, (u_int *) &objp->skeydata.skeydata_len, ~0)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->pkeydata.pkeydata_val, (u_int *) &objp->pkeydata.pkeydata_len, ~0)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_put_msg(xdrs, objp) - register XDR *xdrs; - __dbc_put_msg *objp; -{ - - if (!xdr_u_int(xdrs, &objp->dbccl_id)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keydoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->keyflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadlen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->datadoff)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataulen)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->dataflags)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->datadata.datadata_val, (u_int *) &objp->datadata.datadata_len, ~0)) - return (FALSE); - if (!xdr_u_int(xdrs, &objp->flags)) - return (FALSE); - return (TRUE); -} - -bool_t -xdr___dbc_put_reply(xdrs, objp) - register XDR *xdrs; - __dbc_put_reply *objp; -{ - - if (!xdr_int(xdrs, &objp->status)) - return (FALSE); - if (!xdr_bytes(xdrs, (char **)&objp->keydata.keydata_val, (u_int *) &objp->keydata.keydata_len, ~0)) - return (FALSE); - return (TRUE); -} -#endif /* HAVE_RPC */ diff --git a/bdb/rpc_server/c/gen_db_server.c b/bdb/rpc_server/c/gen_db_server.c deleted file mode 100644 index 0181fb06dce..00000000000 --- a/bdb/rpc_server/c/gen_db_server.c +++ /dev/null @@ -1,1169 +0,0 @@ -/* Do not edit: automatically built by gen_rpc.awk. */ -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include - -#include -#endif - -#include "db_int.h" -#include "dbinc_auto/db_server.h" -#include "dbinc/db_server_int.h" -#include "dbinc_auto/rpc_server_ext.h" - -/* - * PUBLIC: __env_cachesize_reply *__db_env_cachesize_4001 - * PUBLIC: __P((__env_cachesize_msg *, struct svc_req *)); - */ -__env_cachesize_reply * -__db_env_cachesize_4001(msg, req) - __env_cachesize_msg *msg; - struct svc_req *req; -{ - static __env_cachesize_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_cachesize_proc(msg->dbenvcl_id, - msg->gbytes, - msg->bytes, - msg->ncache, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __env_close_reply *__db_env_close_4001 __P((__env_close_msg *, - * PUBLIC: struct svc_req *)); - */ -__env_close_reply * -__db_env_close_4001(msg, req) - __env_close_msg *msg; - struct svc_req *req; -{ - static __env_close_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_close_proc(msg->dbenvcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __env_create_reply *__db_env_create_4001 __P((__env_create_msg *, - * PUBLIC: struct svc_req *)); - */ -__env_create_reply * -__db_env_create_4001(msg, req) - __env_create_msg *msg; - struct svc_req *req; -{ - static __env_create_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_create_proc(msg->timeout, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __env_dbremove_reply *__db_env_dbremove_4001 - * PUBLIC: __P((__env_dbremove_msg *, struct svc_req *)); - */ -__env_dbremove_reply * -__db_env_dbremove_4001(msg, req) - __env_dbremove_msg *msg; - struct svc_req *req; -{ - static __env_dbremove_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_dbremove_proc(msg->dbenvcl_id, - msg->txnpcl_id, - (*msg->name == '\0') ? NULL : msg->name, - (*msg->subdb == '\0') ? NULL : msg->subdb, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __env_dbrename_reply *__db_env_dbrename_4001 - * PUBLIC: __P((__env_dbrename_msg *, struct svc_req *)); - */ -__env_dbrename_reply * -__db_env_dbrename_4001(msg, req) - __env_dbrename_msg *msg; - struct svc_req *req; -{ - static __env_dbrename_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_dbrename_proc(msg->dbenvcl_id, - msg->txnpcl_id, - (*msg->name == '\0') ? NULL : msg->name, - (*msg->subdb == '\0') ? NULL : msg->subdb, - (*msg->newname == '\0') ? NULL : msg->newname, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __env_encrypt_reply *__db_env_encrypt_4001 - * PUBLIC: __P((__env_encrypt_msg *, struct svc_req *)); - */ -__env_encrypt_reply * -__db_env_encrypt_4001(msg, req) - __env_encrypt_msg *msg; - struct svc_req *req; -{ - static __env_encrypt_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_encrypt_proc(msg->dbenvcl_id, - (*msg->passwd == '\0') ? NULL : msg->passwd, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __env_flags_reply *__db_env_flags_4001 __P((__env_flags_msg *, - * PUBLIC: struct svc_req *)); - */ -__env_flags_reply * -__db_env_flags_4001(msg, req) - __env_flags_msg *msg; - struct svc_req *req; -{ - static __env_flags_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_flags_proc(msg->dbenvcl_id, - msg->flags, - msg->onoff, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __env_open_reply *__db_env_open_4001 __P((__env_open_msg *, - * PUBLIC: struct svc_req *)); - */ -__env_open_reply * -__db_env_open_4001(msg, req) - __env_open_msg *msg; - struct svc_req *req; -{ - static __env_open_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_open_proc(msg->dbenvcl_id, - (*msg->home == '\0') ? NULL : msg->home, - msg->flags, - msg->mode, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __env_remove_reply *__db_env_remove_4001 __P((__env_remove_msg *, - * PUBLIC: struct svc_req *)); - */ -__env_remove_reply * -__db_env_remove_4001(msg, req) - __env_remove_msg *msg; - struct svc_req *req; -{ - static __env_remove_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __env_remove_proc(msg->dbenvcl_id, - (*msg->home == '\0') ? NULL : msg->home, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __txn_abort_reply *__db_txn_abort_4001 __P((__txn_abort_msg *, - * PUBLIC: struct svc_req *)); - */ -__txn_abort_reply * -__db_txn_abort_4001(msg, req) - __txn_abort_msg *msg; - struct svc_req *req; -{ - static __txn_abort_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __txn_abort_proc(msg->txnpcl_id, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __txn_begin_reply *__db_txn_begin_4001 __P((__txn_begin_msg *, - * PUBLIC: struct svc_req *)); - */ -__txn_begin_reply * -__db_txn_begin_4001(msg, req) - __txn_begin_msg *msg; - struct svc_req *req; -{ - static __txn_begin_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __txn_begin_proc(msg->dbenvcl_id, - msg->parentcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __txn_commit_reply *__db_txn_commit_4001 __P((__txn_commit_msg *, - * PUBLIC: struct svc_req *)); - */ -__txn_commit_reply * -__db_txn_commit_4001(msg, req) - __txn_commit_msg *msg; - struct svc_req *req; -{ - static __txn_commit_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __txn_commit_proc(msg->txnpcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __txn_discard_reply *__db_txn_discard_4001 - * PUBLIC: __P((__txn_discard_msg *, struct svc_req *)); - */ -__txn_discard_reply * -__db_txn_discard_4001(msg, req) - __txn_discard_msg *msg; - struct svc_req *req; -{ - static __txn_discard_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __txn_discard_proc(msg->txnpcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __txn_prepare_reply *__db_txn_prepare_4001 - * PUBLIC: __P((__txn_prepare_msg *, struct svc_req *)); - */ -__txn_prepare_reply * -__db_txn_prepare_4001(msg, req) - __txn_prepare_msg *msg; - struct svc_req *req; -{ - static __txn_prepare_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __txn_prepare_proc(msg->txnpcl_id, - msg->gid, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __txn_recover_reply *__db_txn_recover_4001 - * PUBLIC: __P((__txn_recover_msg *, struct svc_req *)); - */ -__txn_recover_reply * -__db_txn_recover_4001(msg, req) - __txn_recover_msg *msg; - struct svc_req *req; -{ - static __txn_recover_reply reply; /* must be static */ - static int __txn_recover_free = 0; /* must be static */ - - COMPQUIET(req, NULL); - if (__txn_recover_free) - xdr_free((xdrproc_t)xdr___txn_recover_reply, (void *)&reply); - __txn_recover_free = 0; - - /* Reinitialize allocated fields */ - reply.txn.txn_val = NULL; - reply.gid.gid_val = NULL; - - __txn_recover_proc(msg->dbenvcl_id, - msg->count, - msg->flags, - &reply, - &__txn_recover_free); - return (&reply); -} - -/* - * PUBLIC: __db_associate_reply *__db_db_associate_4001 - * PUBLIC: __P((__db_associate_msg *, struct svc_req *)); - */ -__db_associate_reply * -__db_db_associate_4001(msg, req) - __db_associate_msg *msg; - struct svc_req *req; -{ - static __db_associate_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_associate_proc(msg->dbpcl_id, - msg->txnpcl_id, - msg->sdbpcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_bt_maxkey_reply *__db_db_bt_maxkey_4001 - * PUBLIC: __P((__db_bt_maxkey_msg *, struct svc_req *)); - */ -__db_bt_maxkey_reply * -__db_db_bt_maxkey_4001(msg, req) - __db_bt_maxkey_msg *msg; - struct svc_req *req; -{ - static __db_bt_maxkey_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_bt_maxkey_proc(msg->dbpcl_id, - msg->maxkey, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_bt_minkey_reply *__db_db_bt_minkey_4001 - * PUBLIC: __P((__db_bt_minkey_msg *, struct svc_req *)); - */ -__db_bt_minkey_reply * -__db_db_bt_minkey_4001(msg, req) - __db_bt_minkey_msg *msg; - struct svc_req *req; -{ - static __db_bt_minkey_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_bt_minkey_proc(msg->dbpcl_id, - msg->minkey, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_close_reply *__db_db_close_4001 __P((__db_close_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_close_reply * -__db_db_close_4001(msg, req) - __db_close_msg *msg; - struct svc_req *req; -{ - static __db_close_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_close_proc(msg->dbpcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_create_reply *__db_db_create_4001 __P((__db_create_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_create_reply * -__db_db_create_4001(msg, req) - __db_create_msg *msg; - struct svc_req *req; -{ - static __db_create_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_create_proc(msg->dbenvcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_del_reply *__db_db_del_4001 __P((__db_del_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_del_reply * -__db_db_del_4001(msg, req) - __db_del_msg *msg; - struct svc_req *req; -{ - static __db_del_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_del_proc(msg->dbpcl_id, - msg->txnpcl_id, - msg->keydlen, - msg->keydoff, - msg->keyulen, - msg->keyflags, - msg->keydata.keydata_val, - msg->keydata.keydata_len, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_encrypt_reply *__db_db_encrypt_4001 __P((__db_encrypt_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_encrypt_reply * -__db_db_encrypt_4001(msg, req) - __db_encrypt_msg *msg; - struct svc_req *req; -{ - static __db_encrypt_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_encrypt_proc(msg->dbpcl_id, - (*msg->passwd == '\0') ? NULL : msg->passwd, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_extentsize_reply *__db_db_extentsize_4001 - * PUBLIC: __P((__db_extentsize_msg *, struct svc_req *)); - */ -__db_extentsize_reply * -__db_db_extentsize_4001(msg, req) - __db_extentsize_msg *msg; - struct svc_req *req; -{ - static __db_extentsize_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_extentsize_proc(msg->dbpcl_id, - msg->extentsize, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_flags_reply *__db_db_flags_4001 __P((__db_flags_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_flags_reply * -__db_db_flags_4001(msg, req) - __db_flags_msg *msg; - struct svc_req *req; -{ - static __db_flags_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_flags_proc(msg->dbpcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_get_reply *__db_db_get_4001 __P((__db_get_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_get_reply * -__db_db_get_4001(msg, req) - __db_get_msg *msg; - struct svc_req *req; -{ - static __db_get_reply reply; /* must be static */ - static int __db_get_free = 0; /* must be static */ - - COMPQUIET(req, NULL); - if (__db_get_free) - xdr_free((xdrproc_t)xdr___db_get_reply, (void *)&reply); - __db_get_free = 0; - - /* Reinitialize allocated fields */ - reply.keydata.keydata_val = NULL; - reply.datadata.datadata_val = NULL; - - __db_get_proc(msg->dbpcl_id, - msg->txnpcl_id, - msg->keydlen, - msg->keydoff, - msg->keyulen, - msg->keyflags, - msg->keydata.keydata_val, - msg->keydata.keydata_len, - msg->datadlen, - msg->datadoff, - msg->dataulen, - msg->dataflags, - msg->datadata.datadata_val, - msg->datadata.datadata_len, - msg->flags, - &reply, - &__db_get_free); - return (&reply); -} - -/* - * PUBLIC: __db_h_ffactor_reply *__db_db_h_ffactor_4001 - * PUBLIC: __P((__db_h_ffactor_msg *, struct svc_req *)); - */ -__db_h_ffactor_reply * -__db_db_h_ffactor_4001(msg, req) - __db_h_ffactor_msg *msg; - struct svc_req *req; -{ - static __db_h_ffactor_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_h_ffactor_proc(msg->dbpcl_id, - msg->ffactor, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_h_nelem_reply *__db_db_h_nelem_4001 __P((__db_h_nelem_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_h_nelem_reply * -__db_db_h_nelem_4001(msg, req) - __db_h_nelem_msg *msg; - struct svc_req *req; -{ - static __db_h_nelem_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_h_nelem_proc(msg->dbpcl_id, - msg->nelem, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_key_range_reply *__db_db_key_range_4001 - * PUBLIC: __P((__db_key_range_msg *, struct svc_req *)); - */ -__db_key_range_reply * -__db_db_key_range_4001(msg, req) - __db_key_range_msg *msg; - struct svc_req *req; -{ - static __db_key_range_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_key_range_proc(msg->dbpcl_id, - msg->txnpcl_id, - msg->keydlen, - msg->keydoff, - msg->keyulen, - msg->keyflags, - msg->keydata.keydata_val, - msg->keydata.keydata_len, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_lorder_reply *__db_db_lorder_4001 __P((__db_lorder_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_lorder_reply * -__db_db_lorder_4001(msg, req) - __db_lorder_msg *msg; - struct svc_req *req; -{ - static __db_lorder_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_lorder_proc(msg->dbpcl_id, - msg->lorder, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_open_reply *__db_db_open_4001 __P((__db_open_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_open_reply * -__db_db_open_4001(msg, req) - __db_open_msg *msg; - struct svc_req *req; -{ - static __db_open_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_open_proc(msg->dbpcl_id, - msg->txnpcl_id, - (*msg->name == '\0') ? NULL : msg->name, - (*msg->subdb == '\0') ? NULL : msg->subdb, - msg->type, - msg->flags, - msg->mode, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_pagesize_reply *__db_db_pagesize_4001 - * PUBLIC: __P((__db_pagesize_msg *, struct svc_req *)); - */ -__db_pagesize_reply * -__db_db_pagesize_4001(msg, req) - __db_pagesize_msg *msg; - struct svc_req *req; -{ - static __db_pagesize_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_pagesize_proc(msg->dbpcl_id, - msg->pagesize, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_pget_reply *__db_db_pget_4001 __P((__db_pget_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_pget_reply * -__db_db_pget_4001(msg, req) - __db_pget_msg *msg; - struct svc_req *req; -{ - static __db_pget_reply reply; /* must be static */ - static int __db_pget_free = 0; /* must be static */ - - COMPQUIET(req, NULL); - if (__db_pget_free) - xdr_free((xdrproc_t)xdr___db_pget_reply, (void *)&reply); - __db_pget_free = 0; - - /* Reinitialize allocated fields */ - reply.skeydata.skeydata_val = NULL; - reply.pkeydata.pkeydata_val = NULL; - reply.datadata.datadata_val = NULL; - - __db_pget_proc(msg->dbpcl_id, - msg->txnpcl_id, - msg->skeydlen, - msg->skeydoff, - msg->skeyulen, - msg->skeyflags, - msg->skeydata.skeydata_val, - msg->skeydata.skeydata_len, - msg->pkeydlen, - msg->pkeydoff, - msg->pkeyulen, - msg->pkeyflags, - msg->pkeydata.pkeydata_val, - msg->pkeydata.pkeydata_len, - msg->datadlen, - msg->datadoff, - msg->dataulen, - msg->dataflags, - msg->datadata.datadata_val, - msg->datadata.datadata_len, - msg->flags, - &reply, - &__db_pget_free); - return (&reply); -} - -/* - * PUBLIC: __db_put_reply *__db_db_put_4001 __P((__db_put_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_put_reply * -__db_db_put_4001(msg, req) - __db_put_msg *msg; - struct svc_req *req; -{ - static __db_put_reply reply; /* must be static */ - static int __db_put_free = 0; /* must be static */ - - COMPQUIET(req, NULL); - if (__db_put_free) - xdr_free((xdrproc_t)xdr___db_put_reply, (void *)&reply); - __db_put_free = 0; - - /* Reinitialize allocated fields */ - reply.keydata.keydata_val = NULL; - - __db_put_proc(msg->dbpcl_id, - msg->txnpcl_id, - msg->keydlen, - msg->keydoff, - msg->keyulen, - msg->keyflags, - msg->keydata.keydata_val, - msg->keydata.keydata_len, - msg->datadlen, - msg->datadoff, - msg->dataulen, - msg->dataflags, - msg->datadata.datadata_val, - msg->datadata.datadata_len, - msg->flags, - &reply, - &__db_put_free); - return (&reply); -} - -/* - * PUBLIC: __db_re_delim_reply *__db_db_re_delim_4001 - * PUBLIC: __P((__db_re_delim_msg *, struct svc_req *)); - */ -__db_re_delim_reply * -__db_db_re_delim_4001(msg, req) - __db_re_delim_msg *msg; - struct svc_req *req; -{ - static __db_re_delim_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_re_delim_proc(msg->dbpcl_id, - msg->delim, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_re_len_reply *__db_db_re_len_4001 __P((__db_re_len_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_re_len_reply * -__db_db_re_len_4001(msg, req) - __db_re_len_msg *msg; - struct svc_req *req; -{ - static __db_re_len_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_re_len_proc(msg->dbpcl_id, - msg->len, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_re_pad_reply *__db_db_re_pad_4001 __P((__db_re_pad_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_re_pad_reply * -__db_db_re_pad_4001(msg, req) - __db_re_pad_msg *msg; - struct svc_req *req; -{ - static __db_re_pad_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_re_pad_proc(msg->dbpcl_id, - msg->pad, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_remove_reply *__db_db_remove_4001 __P((__db_remove_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_remove_reply * -__db_db_remove_4001(msg, req) - __db_remove_msg *msg; - struct svc_req *req; -{ - static __db_remove_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_remove_proc(msg->dbpcl_id, - (*msg->name == '\0') ? NULL : msg->name, - (*msg->subdb == '\0') ? NULL : msg->subdb, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_rename_reply *__db_db_rename_4001 __P((__db_rename_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_rename_reply * -__db_db_rename_4001(msg, req) - __db_rename_msg *msg; - struct svc_req *req; -{ - static __db_rename_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_rename_proc(msg->dbpcl_id, - (*msg->name == '\0') ? NULL : msg->name, - (*msg->subdb == '\0') ? NULL : msg->subdb, - (*msg->newname == '\0') ? NULL : msg->newname, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_stat_reply *__db_db_stat_4001 __P((__db_stat_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_stat_reply * -__db_db_stat_4001(msg, req) - __db_stat_msg *msg; - struct svc_req *req; -{ - static __db_stat_reply reply; /* must be static */ - static int __db_stat_free = 0; /* must be static */ - - COMPQUIET(req, NULL); - if (__db_stat_free) - xdr_free((xdrproc_t)xdr___db_stat_reply, (void *)&reply); - __db_stat_free = 0; - - /* Reinitialize allocated fields */ - reply.stats.stats_val = NULL; - - __db_stat_proc(msg->dbpcl_id, - msg->flags, - &reply, - &__db_stat_free); - return (&reply); -} - -/* - * PUBLIC: __db_sync_reply *__db_db_sync_4001 __P((__db_sync_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_sync_reply * -__db_db_sync_4001(msg, req) - __db_sync_msg *msg; - struct svc_req *req; -{ - static __db_sync_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_sync_proc(msg->dbpcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_truncate_reply *__db_db_truncate_4001 - * PUBLIC: __P((__db_truncate_msg *, struct svc_req *)); - */ -__db_truncate_reply * -__db_db_truncate_4001(msg, req) - __db_truncate_msg *msg; - struct svc_req *req; -{ - static __db_truncate_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_truncate_proc(msg->dbpcl_id, - msg->txnpcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_cursor_reply *__db_db_cursor_4001 __P((__db_cursor_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_cursor_reply * -__db_db_cursor_4001(msg, req) - __db_cursor_msg *msg; - struct svc_req *req; -{ - static __db_cursor_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_cursor_proc(msg->dbpcl_id, - msg->txnpcl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __db_join_reply *__db_db_join_4001 __P((__db_join_msg *, - * PUBLIC: struct svc_req *)); - */ -__db_join_reply * -__db_db_join_4001(msg, req) - __db_join_msg *msg; - struct svc_req *req; -{ - static __db_join_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __db_join_proc(msg->dbpcl_id, - msg->curs.curs_val, - msg->curs.curs_len, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __dbc_close_reply *__db_dbc_close_4001 __P((__dbc_close_msg *, - * PUBLIC: struct svc_req *)); - */ -__dbc_close_reply * -__db_dbc_close_4001(msg, req) - __dbc_close_msg *msg; - struct svc_req *req; -{ - static __dbc_close_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __dbc_close_proc(msg->dbccl_id, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __dbc_count_reply *__db_dbc_count_4001 __P((__dbc_count_msg *, - * PUBLIC: struct svc_req *)); - */ -__dbc_count_reply * -__db_dbc_count_4001(msg, req) - __dbc_count_msg *msg; - struct svc_req *req; -{ - static __dbc_count_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __dbc_count_proc(msg->dbccl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __dbc_del_reply *__db_dbc_del_4001 __P((__dbc_del_msg *, - * PUBLIC: struct svc_req *)); - */ -__dbc_del_reply * -__db_dbc_del_4001(msg, req) - __dbc_del_msg *msg; - struct svc_req *req; -{ - static __dbc_del_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __dbc_del_proc(msg->dbccl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __dbc_dup_reply *__db_dbc_dup_4001 __P((__dbc_dup_msg *, - * PUBLIC: struct svc_req *)); - */ -__dbc_dup_reply * -__db_dbc_dup_4001(msg, req) - __dbc_dup_msg *msg; - struct svc_req *req; -{ - static __dbc_dup_reply reply; /* must be static */ - COMPQUIET(req, NULL); - - __dbc_dup_proc(msg->dbccl_id, - msg->flags, - &reply); - - return (&reply); -} - -/* - * PUBLIC: __dbc_get_reply *__db_dbc_get_4001 __P((__dbc_get_msg *, - * PUBLIC: struct svc_req *)); - */ -__dbc_get_reply * -__db_dbc_get_4001(msg, req) - __dbc_get_msg *msg; - struct svc_req *req; -{ - static __dbc_get_reply reply; /* must be static */ - static int __dbc_get_free = 0; /* must be static */ - - COMPQUIET(req, NULL); - if (__dbc_get_free) - xdr_free((xdrproc_t)xdr___dbc_get_reply, (void *)&reply); - __dbc_get_free = 0; - - /* Reinitialize allocated fields */ - reply.keydata.keydata_val = NULL; - reply.datadata.datadata_val = NULL; - - __dbc_get_proc(msg->dbccl_id, - msg->keydlen, - msg->keydoff, - msg->keyulen, - msg->keyflags, - msg->keydata.keydata_val, - msg->keydata.keydata_len, - msg->datadlen, - msg->datadoff, - msg->dataulen, - msg->dataflags, - msg->datadata.datadata_val, - msg->datadata.datadata_len, - msg->flags, - &reply, - &__dbc_get_free); - return (&reply); -} - -/* - * PUBLIC: __dbc_pget_reply *__db_dbc_pget_4001 __P((__dbc_pget_msg *, - * PUBLIC: struct svc_req *)); - */ -__dbc_pget_reply * -__db_dbc_pget_4001(msg, req) - __dbc_pget_msg *msg; - struct svc_req *req; -{ - static __dbc_pget_reply reply; /* must be static */ - static int __dbc_pget_free = 0; /* must be static */ - - COMPQUIET(req, NULL); - if (__dbc_pget_free) - xdr_free((xdrproc_t)xdr___dbc_pget_reply, (void *)&reply); - __dbc_pget_free = 0; - - /* Reinitialize allocated fields */ - reply.skeydata.skeydata_val = NULL; - reply.pkeydata.pkeydata_val = NULL; - reply.datadata.datadata_val = NULL; - - __dbc_pget_proc(msg->dbccl_id, - msg->skeydlen, - msg->skeydoff, - msg->skeyulen, - msg->skeyflags, - msg->skeydata.skeydata_val, - msg->skeydata.skeydata_len, - msg->pkeydlen, - msg->pkeydoff, - msg->pkeyulen, - msg->pkeyflags, - msg->pkeydata.pkeydata_val, - msg->pkeydata.pkeydata_len, - msg->datadlen, - msg->datadoff, - msg->dataulen, - msg->dataflags, - msg->datadata.datadata_val, - msg->datadata.datadata_len, - msg->flags, - &reply, - &__dbc_pget_free); - return (&reply); -} - -/* - * PUBLIC: __dbc_put_reply *__db_dbc_put_4001 __P((__dbc_put_msg *, - * PUBLIC: struct svc_req *)); - */ -__dbc_put_reply * -__db_dbc_put_4001(msg, req) - __dbc_put_msg *msg; - struct svc_req *req; -{ - static __dbc_put_reply reply; /* must be static */ - static int __dbc_put_free = 0; /* must be static */ - - COMPQUIET(req, NULL); - if (__dbc_put_free) - xdr_free((xdrproc_t)xdr___dbc_put_reply, (void *)&reply); - __dbc_put_free = 0; - - /* Reinitialize allocated fields */ - reply.keydata.keydata_val = NULL; - - __dbc_put_proc(msg->dbccl_id, - msg->keydlen, - msg->keydoff, - msg->keyulen, - msg->keyflags, - msg->keydata.keydata_val, - msg->keydata.keydata_len, - msg->datadlen, - msg->datadoff, - msg->dataulen, - msg->dataflags, - msg->datadata.datadata_val, - msg->datadata.datadata_len, - msg->flags, - &reply, - &__dbc_put_free); - return (&reply); -} - From 4832ebce861836db812dd2863ee134e53c44963b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 10:49:41 +0200 Subject: [PATCH 088/246] prevent using expernal fields in derived tables mysql-test/r/subselect.result: test of derived table external field bug mysql-test/t/subselect.test: test of derived table external field bug sql/sql_derived.cc: lex->current_select always should point on current SELECT_LEX_NODE during query execution --- mysql-test/r/subselect.result | 2 ++ mysql-test/t/subselect.test | 2 ++ sql/item.cc | 29 ++++++++++++++++++++--------- sql/sql_derived.cc | 6 +++++- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 4eaacfe66f7..0d3617b7512 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -240,4 +240,6 @@ SELECT numeropost,maxnumrep FROM forumconthardwarefr7 WHERE exists (SELECT 1 FRO numeropost maxnumrep 43506 2 40143 1 +SELECT (SELECT 1) as a FROM (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +Unknown column 'a' in 'having clause' drop table forumconthardwarefr7, searchconthardwarefr7; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 12df155bc7f..93ad115155e 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -137,5 +137,7 @@ CREATE TABLE `searchconthardwarefr7` ( INSERT INTO searchconthardwarefr7 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); SELECT numeropost,maxnumrep FROM forumconthardwarefr7 WHERE exists (SELECT 1 FROM searchconthardwarefr7 WHERE (mot='joce') AND date >= '2002-10-21' AND forumconthardwarefr7.numeropost = searchconthardwarefr7.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; +-- error 1054 +SELECT (SELECT 1) as a FROM (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); drop table forumconthardwarefr7, searchconthardwarefr7; \ No newline at end of file diff --git a/sql/item.cc b/sql/item.cc index 9c70dad045c..ea797679957 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -444,13 +444,16 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) cause error ER_NON_UNIQ_ERROR in find_field_in_tables. */ SELECT_LEX *last= 0; - for (SELECT_LEX *sl= thd->lex.current_select->outer_select(); - sl; - sl= sl->outer_select()) - if ((tmp= find_field_in_tables(thd, this, - (last= sl)->get_table_list(), - 0)) != not_found_field) - break; + + // Prevent using outer fields in subselects, that is not supported now + if (thd->lex.current_select->linkage != DERIVED_TABLE_TYPE) + for (SELECT_LEX *sl= thd->lex.current_select->outer_select(); + sl; + sl= sl->outer_select()) + if ((tmp= find_field_in_tables(thd, this, + (last= sl)->get_table_list(), + 0)) != not_found_field) + break; if (!tmp) return -1; else if (tmp == not_found_field) @@ -812,10 +815,18 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) if (!ref) { SELECT_LEX *sl= thd->lex.current_select->outer_select(); + /* + Finding only in current select will be performed for selects that have + not outer one and for derived tables (which not support using outer + fields for now) + */ if ((ref= find_item_in_list(this, *(thd->lex.current_select->get_item_list()), - (sl ? REPORT_EXCEPT_NOT_FOUND : - REPORT_ALL_ERRORS))) == + ((sl && + thd->lex.current_select->linkage != + DERIVED_TABLE_TYPE) ? + REPORT_EXCEPT_NOT_FOUND : + REPORT_ALL_ERRORS))) == (Item **)not_found_item) { /* diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 93627409d27..5dbbf39e7d4 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -94,13 +94,17 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) unit->select_limit_cnt= HA_POS_ERROR; if (unit->select_limit_cnt == HA_POS_ERROR) sl->options&= ~OPTION_FOUND_ROWS; - + + SELECT_LEX_NODE *save_current_select= lex->current_select; + lex->current_select= sl; res= mysql_select(thd, tables, sl->item_list, sl->where, (ORDER *) sl->order_list.first, (ORDER*) sl->group_list.first, sl->having, (ORDER*) NULL, sl->options | thd->options | SELECT_NO_UNLOCK, derived_result, unit, sl, 0); + lex->current_select= save_current_select; + if (!res) { // Here we entirely fix both TABLE_LIST and list of SELECT's as there were no derived tables From f4ba3d90584ba8debfbd00c651499f027726b30c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 13:10:39 +0400 Subject: [PATCH 089/246] For coding convenuence cs->mbmaxlen is now 1 for 8bit charsets --- mysys/charset.c | 1 + mysys/test_charset.c | 2 +- sql/item_strfunc.cc | 6 ++--- sql/sql_show.cc | 2 +- strings/ctype-bin.c | 2 +- strings/ctype-czech.c | 2 +- strings/ctype-latin1_de.c | 2 +- strings/ctype-tis620.c | 2 +- strings/ctype-win1250ch.c | 2 +- strings/ctype.c | 46 +++++++++++++++++++-------------------- 10 files changed, 34 insertions(+), 33 deletions(-) diff --git a/mysys/charset.c b/mysys/charset.c index 3ad4b4e8faa..2f22c616325 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -389,6 +389,7 @@ static CHARSET_INFO *add_charset(CHARSET_INFO *cs, myf flags) cs->hash_caseup = my_hash_caseup_simple; cs->hash_sort = my_hash_sort_simple; cs->snprintf = my_snprintf_8bit; + cs->mbmaxlen = 1; set_max_sort_char(cs); create_fromuni(cs); diff --git a/mysys/test_charset.c b/mysys/test_charset.c index 47ed9062c05..d031007a1da 100644 --- a/mysys/test_charset.c +++ b/mysys/test_charset.c @@ -46,7 +46,7 @@ static void _print_csinfo(CHARSET_INFO *cs) cs->strnxfrm, cs->like_range); printf("multi-byte: %3s (%d, %p, %p, %p)\n", - cs->mbmaxlen ? "yes" : "no", + cs->mbmaxlen > 1 ? "yes" : "no", cs->mbmaxlen, cs->ismbchar, cs->ismbhead, diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 6f121ecdc06..83b94ea145b 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1928,7 +1928,7 @@ String *Item_func_conv_charset::val_str(String *str) s=(const uchar*)arg->ptr(); se=s+arg->length(); - dmaxlen=arg->length()*(to->mbmaxlen?to->mbmaxlen:1)+1; + dmaxlen=arg->length()*to->mbmaxlen+1; str->alloc(dmaxlen); d0=d=(unsigned char*)str->ptr(); de=d+dmaxlen; @@ -1970,7 +1970,7 @@ outp: void Item_func_conv_charset::fix_length_and_dec() { - max_length = args[0]->max_length*(conv_charset->mbmaxlen?conv_charset->mbmaxlen:1); + max_length = args[0]->max_length*conv_charset->mbmaxlen; set_charset(conv_charset); } @@ -2002,7 +2002,7 @@ String *Item_func_conv_charset3::val_str(String *str) s=(const uchar*)arg->ptr(); se=s+arg->length(); - dmaxlen=arg->length()*(to_charset->mbmaxlen?to_charset->mbmaxlen:1)+1; + dmaxlen=arg->length()*to_charset->mbmaxlen+1; str->alloc(dmaxlen); d0=d=(unsigned char*)str->ptr(); de=d+dmaxlen; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index d6fe2f3772a..bd8abda5e87 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1424,7 +1424,7 @@ int mysqld_show_charsets(THD *thd, const char *wild) net_store_data(&packet2,convert,cs[0]->name); net_store_data(&packet2,(uint32) cs[0]->number); net_store_data(&packet2,(uint32) cs[0]->strxfrm_multiply); - net_store_data(&packet2,(uint32) (cs[0]->mbmaxlen ? cs[0]->mbmaxlen : 1)); + net_store_data(&packet2,(uint32) (cs[0]->mbmaxlen)); if (my_net_write(&thd->net, (char*) packet2.ptr(),packet2.length())) goto err; diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index e479053071b..9a22b3f36bf 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -162,7 +162,7 @@ static CHARSET_INFO my_charset_bin_st = my_strnncoll_binary, /* strnncoll */ NULL, /* strxnfrm */ NULL, /* like_rabge */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 6ce2bf13fce..3ec4491001d 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -610,7 +610,7 @@ CHARSET_INFO my_charset_czech = my_strnncoll_czech, my_strnxfrm_czech, my_like_range_czech, - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index 574fbf41da3..d829296fd78 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -428,7 +428,7 @@ CHARSET_INFO my_charset_latin1_de = my_strnncoll_latin1_de, my_strnxfrm_latin1_de, my_like_range_latin1_de, - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index de1a0e170fb..44d0dde65f5 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -702,7 +702,7 @@ CHARSET_INFO my_charset_tis620 = my_strnncoll_tis620, my_strnxfrm_tis620, my_like_range_tis620, - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index 64697ce08f3..9c418e2e6f5 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -636,7 +636,7 @@ CHARSET_INFO my_charset_win1250ch = my_strnncoll_win1250ch, my_strnxfrm_win1250ch, my_like_range_win1250ch, - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ diff --git a/strings/ctype.c b/strings/ctype.c index 8fc189f4b7f..96003f8baab 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -2823,7 +2823,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -2860,7 +2860,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -2896,7 +2896,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -2932,7 +2932,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -2969,7 +2969,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3005,7 +3005,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3041,7 +3041,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3077,7 +3077,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3114,7 +3114,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3150,7 +3150,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3186,7 +3186,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3222,7 +3222,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3258,7 +3258,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3294,7 +3294,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3330,7 +3330,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3367,7 +3367,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3403,7 +3403,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3440,7 +3440,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3477,7 +3477,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3513,7 +3513,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3549,7 +3549,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3585,7 +3585,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ @@ -3621,7 +3621,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 0, /* mbmaxlen */ + 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ From 10ba987c5ef223aa0af384822082c3d233f6d970 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 13:34:47 +0400 Subject: [PATCH 090/246] fix for HEAP rb-tree indexes and BIG_TABLES problem (serg: thanks for discovery) --- include/my_tree.h | 2 +- mysys/tree.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/my_tree.h b/include/my_tree.h index 05e93df8593..99194907ef9 100644 --- a/include/my_tree.h +++ b/include/my_tree.h @@ -91,7 +91,7 @@ void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, int child_offs); void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, int r_offs); -uint tree_record_pos(TREE *tree, const void *key, +ha_rows tree_record_pos(TREE *tree, const void *key, enum ha_rkey_function search_flag, void *custom_arg); #ifdef __cplusplus } diff --git a/mysys/tree.c b/mysys/tree.c index f72a4961312..3e20820ebd9 100644 --- a/mysys/tree.c +++ b/mysys/tree.c @@ -439,14 +439,14 @@ void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, Expected that tree is fully balanced (each path from root to leaf has the same length) */ -uint tree_record_pos(TREE *tree, const void *key, +ha_rows tree_record_pos(TREE *tree, const void *key, enum ha_rkey_function flag, void *custom_arg) { int cmp; TREE_ELEMENT *element= tree->root; double left= 1; double right= tree->elements_in_tree; - uint last_equal_pos= HA_POS_ERROR; + ha_rows last_equal_pos= HA_POS_ERROR; while (element != &tree->null_element) { From d3ab8393156da44dfe37418c46ba51987ccf6fad Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 11:49:25 +0100 Subject: [PATCH 091/246] innodb.result: - fixed test results after error messages had been modified mysql-test/r/innodb.result: - fixed test results after error messages had been modified --- mysql-test/r/innodb.result | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 62f5734a217..67c78f34392 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -165,7 +165,7 @@ level id parent_id 1 1007 101 optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The handler for the table doesn't support check/repair +test.t1 optimize error The handler for the table doesn't support optimize show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 id A 87 NULL NULL BTREE @@ -189,7 +189,7 @@ create table t1 (a int) type=innodb; insert into t1 values (1), (2); optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The handler for the table doesn't support check/repair +test.t1 optimize error The handler for the table doesn't support optimize delete from t1 where a = 1; select * from t1; a @@ -208,7 +208,7 @@ create index skr on t1 (a); insert into t1 values (3,""), (4,"testing"); analyze table t1; Table Op Msg_type Msg_text -test.t1 analyze error The handler for the table doesn't support check/repair +test.t1 analyze error The handler for the table doesn't support analyze show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 skr 1 a A 3 NULL NULL YES BTREE @@ -724,7 +724,7 @@ world 2 hello 1 optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The handler for the table doesn't support check/repair +test.t1 optimize error The handler for the table doesn't support optimize show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 a A 2 NULL NULL BTREE From 5c556c053bbb8275b9c4795a07434e4589328585 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 12:13:20 +0100 Subject: [PATCH 092/246] bdb.result: - fixed yet another wrong result after error messages had been changed mysql-test/r/bdb.result: - fixed yet another wrong result after error messages had been changed --- mysql-test/r/bdb.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index e52878b9759..a815f2f8fab 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -203,7 +203,7 @@ a 2 check table t1; Table Op Msg_type Msg_text -test.t1 check error The handler for the table doesn't support check/repair +test.t1 check error The handler for the table doesn't support check drop table t1; create table t1 (a int,b varchar(20)) type=bdb; insert into t1 values (1,""), (2,"testing"); From 20ea534d0c63f2e7fb230ed05d5469284335330e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 14:04:50 +0200 Subject: [PATCH 093/246] small bug fix --- sql/sql_derived.cc | 1 + sql/sql_parse.cc | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 93627409d27..a439131c61d 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -111,6 +111,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) t->real_name=table->real_name; t->table=table; table->derived_select_number= sl->select_number; + table->tmp_table=TMP_TABLE; if (!lex->describe) sl->exclude(); t->db= (tables && tables->db && tables->db[0]) ? t->db : thd->db; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 4288773b00b..e30773984fb 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1332,13 +1332,18 @@ mysql_execute_command(THD *thd) TODO: make derived tables processing 'inside' SELECT processing. TODO: solve problem with depended derived tables in subselects */ -if (lex->derived_tables) + if ((lex->select_lex.next_select_in_list() && + lex->unit.create_total_list(thd, lex, &tables)) || + (table_rules_on && tables && thd->slave_thread && + !tables_ok(thd,tables))) + DBUG_VOID_RETURN; + if (lex->derived_tables) { for (TABLE_LIST *cursor= tables; cursor; cursor= cursor->next) if (cursor->derived && (res=mysql_derived(thd, lex, - (SELECT_LEX_UNIT *)cursor->derived, + (SELECT_LEX_UNIT *)cursor->derived, cursor))) { if (res < 0) @@ -1346,11 +1351,6 @@ if (lex->derived_tables) DBUG_VOID_RETURN; } } - if ((lex->select_lex.next_select_in_list() && - lex->unit.create_total_list(thd, lex, &tables)) || - (table_rules_on && tables && thd->slave_thread && - !tables_ok(thd,tables))) - DBUG_VOID_RETURN; thread_safe_increment(com_stat[lex->sql_command],&LOCK_status); switch (lex->sql_command) { @@ -2717,6 +2717,8 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables, TABLE_LIST *org_tables=tables; for (; tables ; tables=tables->next) { + if (tables->derived) + continue; if ((thd->master_access & want_access) == (want_access & ~EXTRA_ACL) && thd->db) tables->grant.privilege= want_access; From 50b32edc76d476a812a14727ccdfece3f85c7c72 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 16:46:11 +0400 Subject: [PATCH 094/246] thread charset related improvements --- sql/sql_string.cc | 83 ++++++++++++++++++++++++++++++++++++++++++----- sql/sql_string.h | 1 + 2 files changed, 76 insertions(+), 8 deletions(-) diff --git a/sql/sql_string.cc b/sql/sql_string.cc index f0f31004544..403e8d3b1f7 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -93,18 +93,36 @@ bool String::realloc(uint32 alloc_length) bool String::set(longlong num, CHARSET_INFO *cs) { - if (alloc(21)) + uint l=20*cs->mbmaxlen+1; + + if (alloc(l)) return TRUE; - str_length=(uint32) (longlong10_to_str(num,Ptr,-10)-Ptr); + if (cs->snprintf == my_snprintf_8bit) + { + str_length=(uint32) (longlong10_to_str(num,Ptr,-10)-Ptr); + } + else + { + str_length=cs->snprintf(cs,Ptr,l,"%d",num); + } str_charset=cs; return FALSE; } bool String::set(ulonglong num, CHARSET_INFO *cs) { - if (alloc(21)) + uint l=20*cs->mbmaxlen+1; + + if (alloc(l)) return TRUE; - str_length=(uint32) (longlong10_to_str(num,Ptr,10)-Ptr); + if (cs->snprintf == my_snprintf_8bit) + { + str_length=(uint32) (longlong10_to_str(num,Ptr,10)-Ptr); + } + else + { + str_length=cs->snprintf(cs,Ptr,l,"%d",num); + } str_charset=cs; return FALSE; } @@ -117,14 +135,14 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs) if (decimals >= NOT_FIXED_DEC) { sprintf(buff,"%.14g",num); // Enough for a DATETIME - return copy(buff, (uint32) strlen(buff), my_charset_latin1); + return copy(buff, (uint32) strlen(buff), my_charset_latin1, cs); } #ifdef HAVE_FCONVERT int decpt,sign; char *pos,*to; VOID(fconvert(num,(int) decimals,&decpt,&sign,buff+1)); - if (!my_isdigit(system_charset_info, buff[1])) + if (!my_isdigit(my_charset_latin1, buff[1])) { // Nan or Inf pos=buff+1; if (sign) @@ -132,7 +150,7 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs) buff[0]='-'; pos=buff; } - return copy(pos,(uint32) strlen(pos)); + return copy(pos,(uint32) strlen(pos), my_charset_latin1, cs); } if (alloc((uint32) ((uint32) decpt+3+decimals))) return TRUE; @@ -182,7 +200,7 @@ end: #else sprintf(buff,"%.*f",(int) decimals,num); #endif - return copy(buff,(uint32) strlen(buff), my_charset_latin1); + return copy(buff,(uint32) strlen(buff), my_charset_latin1, cs); #endif } @@ -219,6 +237,55 @@ bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *cs) return FALSE; } +/* Copy with charset convertion */ +bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *from, CHARSET_INFO *to) +{ + uint32 new_length=to->mbmaxlen*arg_length; + int cnvres; + my_wc_t wc; + const uchar *s=(const uchar *)str; + const uchar *se=s+arg_length; + uchar *d, *de; + + if (alloc(new_length)) + return TRUE; + + d=(uchar *)Ptr; + de=d+new_length; + + for (str_length=new_length ; s < se && d < de ; ) + { + if ((cnvres=from->mb_wc(from,&wc,s,se)) > 0 ) + { + s+=cnvres; + } + else if (cnvres==MY_CS_ILSEQ) + { + s++; + wc='?'; + } + else + break; + +outp: + if((cnvres=to->wc_mb(to,wc,d,de)) >0 ) + { + d+=cnvres; + } + else if (cnvres==MY_CS_ILUNI && wc!='?') + { + wc='?'; + goto outp; + } + else + break; + } + Ptr[new_length]=0; + length((uint32) (d-(uchar *)Ptr)); + str_charset=to; + return FALSE; +} + /* This is used by mysql.cc */ bool String::fill(uint32 max_length,char fill_char) diff --git a/sql/sql_string.h b/sql/sql_string.h index 4ac4308f113..d9dce95e0a2 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -179,6 +179,7 @@ public: bool copy(); // Alloc string if not alloced bool copy(const String &s); // Allocate new string bool copy(const char *s,uint32 arg_length, CHARSET_INFO *cs); // Allocate new string + bool copy(const char*s,uint32 arg_length, CHARSET_INFO *csfrom, CHARSET_INFO *csto); bool append(const String &s); bool append(const char *s,uint32 arg_length=0); bool append(IO_CACHE* file, uint32 arg_length); From e8390bfa88aecc25acfef7fe2cf0d7829fbbce3f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 14:25:30 +0100 Subject: [PATCH 095/246] - "head/tail -" is obsolete according to POSIX.1-2001 - use "head/tail -n " instead --- Build-tools/Do-compile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 8381dd7c1ee..8d647ef0d82 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -536,7 +536,7 @@ sub abort print TMP "To: $email\n"; print TMP "Subject: $ver$opt_version_suffix compilation failed\n\n"; close TMP; - system("tail -40 $log > $log.mail"); + system("tail -n 40 $log > $log.mail"); system("cat $mail_header_file $log.mail | $sendmail -t -f $email"); unlink($mail_header_file); unlink("$log.mail"); @@ -612,7 +612,7 @@ sub which my(@progs)=@_; foreach $prog (@progs) { - chomp($found=`which $prog | head -1`); + chomp($found=`which $prog | head -n 1`); if ($? == 0 && $found ne "" && index($found," ") == -1) { $found =~ s|/+|/|g; # Make nicer output From 3165440cdec9d1270a2101973cb75e67e334dc5c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 15:57:35 +0200 Subject: [PATCH 096/246] Fixed that NULL and 0 returns 0 instead of NULL This is coded to not cause a speed impact on top level AND expressions where we don't care if an AND expression returns 0 or NULL mysql-test/r/bdb.result: Fix results after serges last patch mysql-test/r/innodb.result: Fix results after serges last patch mysql-test/r/null.result: Update for new AND handling of NULL scripts/mysqld_safe.sh: Fix 'isroot' test to work even if user is not root sql/item.h: Fixed that NULL and 0 returns 0 instead of NULL sql/item_cmpfunc.cc: Fixed that NULL and 0 returns 0 instead of NULL sql/item_cmpfunc.h: Fixed that NULL and 0 returns 0 instead of NULL sql/sql_base.cc: Fixed that NULL and 0 returns 0 instead of NULL sql/sql_parse.cc: Fixed that NULL and 0 returns 0 instead of NULL sql/sql_select.cc: Fixed that NULL and 0 returns 0 instead of NULL sql/sql_yacc.yy: Fixed that NULL and 0 returns 0 instead of NULL --- mysql-test/r/bdb.result | 2 +- mysql-test/r/bool.result | 48 ++++++++++++++++++++++++++++++++++++++ mysql-test/r/innodb.result | 8 +++---- mysql-test/r/null.result | 2 +- mysql-test/t/bool.test | 28 ++++++++++++++++++++++ scripts/mysqld_safe.sh | 2 +- sql/item.h | 1 + sql/item_cmpfunc.cc | 44 +++++++++++++++++++++++----------- sql/item_cmpfunc.h | 9 ++++--- sql/sql_base.cc | 1 + sql/sql_parse.cc | 14 +++++++---- sql/sql_select.cc | 5 ++++ sql/sql_yacc.yy | 16 ++++++++++--- 13 files changed, 148 insertions(+), 32 deletions(-) create mode 100644 mysql-test/r/bool.result create mode 100644 mysql-test/t/bool.test diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index e52878b9759..a815f2f8fab 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -203,7 +203,7 @@ a 2 check table t1; Table Op Msg_type Msg_text -test.t1 check error The handler for the table doesn't support check/repair +test.t1 check error The handler for the table doesn't support check drop table t1; create table t1 (a int,b varchar(20)) type=bdb; insert into t1 values (1,""), (2,"testing"); diff --git a/mysql-test/r/bool.result b/mysql-test/r/bool.result new file mode 100644 index 00000000000..dc170ee5150 --- /dev/null +++ b/mysql-test/r/bool.result @@ -0,0 +1,48 @@ +DROP TABLE IF EXISTS t1; +SELECT IF(NULL AND 1, 1, 2), IF(1 AND NULL, 1, 2); +IF(NULL AND 1, 1, 2) IF(1 AND NULL, 1, 2) +2 2 +SELECT NULL AND 1, 1 AND NULL, 0 AND NULL, NULL and 0; +NULL AND 1 1 AND NULL 0 AND NULL NULL and 0 +NULL NULL 0 0 +create table t1 (a int); +insert into t1 values (0),(1),(NULL); +SELECT * FROM t1 WHERE IF(a AND 1, 0, 1); +a +0 +NULL +SELECT * FROM t1 WHERE IF(1 AND a, 0, 1); +a +0 +NULL +SELECT * FROM t1 where NOT(a AND 1); +a +0 +SELECT * FROM t1 where NOT(1 AND a); +a +0 +SELECT * FROM t1 where (a AND 1)=0; +a +0 +SELECT * FROM t1 where (1 AND a)=0; +a +0 +SELECT * FROM t1 where (1 AND a)=1; +a +1 +SELECT * FROM t1 where (1 AND a) IS NULL; +a +NULL +SET @a=0, @b=0; +SELECT * FROM t1 WHERE NULL AND (@a:=@a+1); +a +SELECT * FROM t1 WHERE NOT(a>=0 AND NULL AND (@b:=@b+1)); +a +SELECT * FROM t1 WHERE a=2 OR (NULL AND (@a:=@a+1)); +a +SELECT * FROM t1 WHERE NOT(a=2 OR (NULL AND (@b:=@b+1))); +a +SELECT @a, @b; +@a @b +0 6 +DROP TABLE t1; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 62f5734a217..67c78f34392 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -165,7 +165,7 @@ level id parent_id 1 1007 101 optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The handler for the table doesn't support check/repair +test.t1 optimize error The handler for the table doesn't support optimize show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 id A 87 NULL NULL BTREE @@ -189,7 +189,7 @@ create table t1 (a int) type=innodb; insert into t1 values (1), (2); optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The handler for the table doesn't support check/repair +test.t1 optimize error The handler for the table doesn't support optimize delete from t1 where a = 1; select * from t1; a @@ -208,7 +208,7 @@ create index skr on t1 (a); insert into t1 values (3,""), (4,"testing"); analyze table t1; Table Op Msg_type Msg_text -test.t1 analyze error The handler for the table doesn't support check/repair +test.t1 analyze error The handler for the table doesn't support analyze show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 skr 1 a A 3 NULL NULL YES BTREE @@ -724,7 +724,7 @@ world 2 hello 1 optimize table t1; Table Op Msg_type Msg_text -test.t1 optimize error The handler for the table doesn't support check/repair +test.t1 optimize error The handler for the table doesn't support optimize show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 a A 2 NULL NULL BTREE diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index e6e3b7155a3..07724a56025 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -30,7 +30,7 @@ SELECT (NULL OR NULL) IS NULL; 1 select NULL AND 0, 0 and NULL; NULL AND 0 0 and NULL -NULL 0 +0 0 select inet_ntoa(null),inet_aton(null),inet_aton("122.256"),inet_aton("122.226."),inet_aton(""); inet_ntoa(null) inet_aton(null) inet_aton("122.256") inet_aton("122.226.") inet_aton("") NULL NULL NULL NULL NULL diff --git a/mysql-test/t/bool.test b/mysql-test/t/bool.test new file mode 100644 index 00000000000..5754acf4bcd --- /dev/null +++ b/mysql-test/t/bool.test @@ -0,0 +1,28 @@ +# +# Test of boolean operations with NULL +# + +DROP TABLE IF EXISTS t1; + +SELECT IF(NULL AND 1, 1, 2), IF(1 AND NULL, 1, 2); +SELECT NULL AND 1, 1 AND NULL, 0 AND NULL, NULL and 0; + +create table t1 (a int); +insert into t1 values (0),(1),(NULL); +SELECT * FROM t1 WHERE IF(a AND 1, 0, 1); +SELECT * FROM t1 WHERE IF(1 AND a, 0, 1); +SELECT * FROM t1 where NOT(a AND 1); +SELECT * FROM t1 where NOT(1 AND a); +SELECT * FROM t1 where (a AND 1)=0; +SELECT * FROM t1 where (1 AND a)=0; +SELECT * FROM t1 where (1 AND a)=1; +SELECT * FROM t1 where (1 AND a) IS NULL; + +# Verify that NULL optimisation works in AND clause: +SET @a=0, @b=0; +SELECT * FROM t1 WHERE NULL AND (@a:=@a+1); +SELECT * FROM t1 WHERE NOT(a>=0 AND NULL AND (@b:=@b+1)); +SELECT * FROM t1 WHERE a=2 OR (NULL AND (@a:=@a+1)); +SELECT * FROM t1 WHERE NOT(a=2 OR (NULL AND (@b:=@b+1))); +SELECT @a, @b; +DROP TABLE t1; diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 2cc11bb0979..96d3437f96d 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -204,7 +204,7 @@ else fi USER_OPTION="" -if test "x$USER" = "xroot" +if test -w / -o "$USER" = "root" then if test "$user" != "root" -o $SET_USER = 1 then diff --git a/sql/item.h b/sql/item.h index 246e1fbcbd6..563db2291fb 100644 --- a/sql/item.h +++ b/sql/item.h @@ -85,6 +85,7 @@ public: virtual bool get_time(TIME *ltime); virtual bool is_null() { return 0; } virtual unsigned int size_of()= 0; + virtual void top_level_item() {} }; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 3cd55934950..93e24525d06 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -26,8 +26,8 @@ /* Test functions - These returns 0LL if false and 1LL if true and null if some arg is null - 'AND' and 'OR' never return null + Most of these returns 0LL if false and 1LL if true and + NULL if some arg is NULL. */ longlong Item_func_not::val_int() @@ -533,6 +533,7 @@ Item_func_if::fix_length_and_dec() else cached_result_type=arg1_type; // Should be INT_RESULT } + args[0]->top_level_item(); } @@ -1128,6 +1129,8 @@ Item_cond::fix_fields(THD *thd,TABLE_LIST *tables) const_item_cache&=item->const_item(); if (item->maybe_null) maybe_null=1; + if (abort_on_null) + item->top_level_item(); } if (thd) thd->cond_count+=list.elements; @@ -1196,28 +1199,41 @@ void Item_cond::print(String *str) str->append(')'); } +/* + Evalution of AND(expr, expr, expr ...) + + NOTES: + abort_if_null is set for AND expressions for which we don't care if the + result is NULL or 0. This is set for: + - WHERE clause + - HAVING clause + - IF(expression) + + RETURN VALUES + 1 If all expressions are true + 0 If all expressions are false or if we find a NULL expression and + 'abort_on_null' is set. + NULL if all expression are either 1 or NULL +*/ + longlong Item_cond_and::val_int() { List_iterator_fast li(list); Item *item; + null_value= 0; while ((item=li++)) { if (item->val_int() == 0) { - /* - TODO: In case of NULL, ANSI would require us to continue evaluation - until we get a FALSE value or run out of values; This would - require a lot of unnecessary evaluation, which we skip for now - */ - null_value=item->null_value; - return 0; + if (abort_on_null || !(null_value= item->null_value)) + return 0; // return FALSE } } - null_value=0; - return 1; + return null_value ? 0 : 1; } + longlong Item_cond_or::val_int() { List_iterator_fast li(list); @@ -1260,15 +1276,15 @@ longlong Item_cond_or::val_int() Item *and_expressions(Item *a, Item *b, Item **org_item) { if (!a) - return (*org_item= (Item*) b); + return (*org_item= b); if (a == *org_item) { Item_cond *res; - if ((res= new Item_cond_and(a, (Item*) b))) + if ((res= new Item_cond_and(a, b))) res->used_tables_cache= a->used_tables() | b->used_tables(); return res; } - if (((Item_cond_and*) a)->add((Item*) b)) + if (((Item_cond_and*) a)->add(b)) return 0; ((Item_cond_and*) a)->used_tables_cache|= b->used_tables(); return a; diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 83035720df6..f2c0ee403d2 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -560,10 +560,12 @@ class Item_cond :public Item_bool_func { protected: List list; + bool abort_on_null; public: - Item_cond() : Item_bool_func() { const_item_cache=0; } - Item_cond(Item *i1,Item *i2) :Item_bool_func() - { list.push_back(i1); list.push_back(i2); } + /* Item_cond() is only used to create top level items */ + Item_cond() : Item_bool_func(), abort_on_null(1) { const_item_cache=0; } + Item_cond(Item *i1,Item *i2) :Item_bool_func(), abort_on_null(0) + { list.push_back(i1); list.push_back(i2); } ~Item_cond() { list.delete_elements(); } bool add(Item *item) { return list.push_back(item); } bool fix_fields(THD *,struct st_table_list *); @@ -576,6 +578,7 @@ public: void split_sum_func(List &fields); friend int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds); unsigned int size_of() { return sizeof(*this);} + void top_level_item() { abort_on_null=1; } }; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index cf41d851137..42d35c05f23 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1976,6 +1976,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds) Item_cond_and *cond_and=new Item_cond_and(); if (!cond_and) // If not out of memory DBUG_RETURN(1); + cond_and->top_level_item(); uint i,j; for (i=0 ; i < t1->fields ; i++) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 086a0a561a0..eb2d2ace467 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3324,12 +3324,16 @@ static bool create_total_list(THD *thd, LEX *lex, TABLE_LIST **result) void add_join_on(TABLE_LIST *b,Item *expr) { - if (!b->on_expr) - b->on_expr=expr; - else + if (expr) { - // This only happens if you have both a right and left join - b->on_expr=new Item_cond_and(b->on_expr,expr); + if (!b->on_expr) + b->on_expr=expr; + else + { + // This only happens if you have both a right and left join + b->on_expr=new Item_cond_and(b->on_expr,expr); + } + b->on_expr->top_level_item(); } } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 25587f0ada7..561549ee843 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -360,6 +360,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List &fields,COND *conds, { conds->fix_fields(thd,tables); conds->change_ref_to_fields(thd,tables); + conds->top_level_item(); having=0; } } @@ -869,6 +870,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List &fields,COND *conds, sort_table_cond))) goto err; table->select_cond=table->select->cond; + table->select_cond->top_level_item(); DBUG_EXECUTE("where",print_where(table->select->cond, "select and having");); having=make_cond_for_table(having,~ (table_map) 0,~used_tables); @@ -5490,6 +5492,7 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) { if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC) { + /* Create new top level AND item */ Item_cond_and *new_cond=new Item_cond_and; if (!new_cond) DBUG_RETURN((COND*) 0); // OOM /* purecov: inspected */ @@ -5527,6 +5530,7 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) new_cond->argument_list()->push_back(fix); } new_cond->used_tables_cache=((Item_cond_or*) cond)->used_tables_cache; + new_cond->top_level_item(); DBUG_RETURN(new_cond); } } @@ -5886,6 +5890,7 @@ static bool fix_having(JOIN *join, Item **having) sort_table_cond))) DBUG_RETURN(1); table->select_cond=table->select->cond; + table->select_cond->top_level_item(); DBUG_EXECUTE("where",print_where(table->select_cond, "select and having");); *having=make_cond_for_table(*having,~ (table_map) 0,~used_tables); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 911fc12d9c4..93532d013b5 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2178,15 +2178,25 @@ opt_table_alias: where_clause: /* empty */ { Select->where= 0; } - | WHERE expr { Select->where= $2; }; + | WHERE expr + { + Select->where= $2; + if ($2) + $2->top_level_item(); + } + ; having_clause: /* empty */ | HAVING { Select->create_refs=1; } expr { SELECT_LEX *sel=Select; - sel->having= $3; sel->create_refs=0; - }; + sel->having= $3; + sel->create_refs=0; + if ($3) + $3->top_level_item(); + } + ; opt_escape: ESCAPE_SYM TEXT_STRING { $$= $2.str; } From 84b95682cf6dd1444ebcf6de6521dd78877d5b18 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 18:43:33 +0400 Subject: [PATCH 097/246] USER(), DATABASE() and CHARSET() functions are now UCS2 compatible Bug fix in ctype-utf8.c sql/item_strfunc.cc: USER(), DATABASE() and CHARSET() functions are now UCS2 compatible sql/item_strfunc.h: USER(), DATABASE() and CHARSET() functions are now UCS2 compatible sql/procedure.h: USER(), DATABASE() and CHARSET() functions are now UCS2 compatible strings/ctype-utf8.c: Bug fix --- sql/item_strfunc.cc | 22 +++++++++++++++------- sql/item_strfunc.h | 15 ++++++++++++--- sql/procedure.h | 10 +++++----- strings/ctype-utf8.c | 2 +- 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 83b94ea145b..1a561c9eb34 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1366,17 +1366,25 @@ String *Item_func_database::val_str(String *str) if (!current_thd->db) str->length(0); else - str->set((const char*) current_thd->db,(uint) strlen(current_thd->db), default_charset_info); + str->copy((const char*) current_thd->db,(uint) strlen(current_thd->db), system_charset_info, thd_charset()); return str; } String *Item_func_user::val_str(String *str) { - THD *thd=current_thd; - if (str->copy((const char*) thd->user,(uint) strlen(thd->user), system_charset_info) || - str->append('@') || - str->append(thd->host ? thd->host : thd->ip ? thd->ip : "")) - return &empty_string; + THD *thd=current_thd; + CHARSET_INFO *cs=thd_charset(); + const char *host=thd->host ? thd->host : thd->ip ? thd->ip : ""; + uint32 res_length=(strlen(thd->user)+strlen(host)+10) * cs->mbmaxlen; + + if (str->alloc(res_length)) + { + null_value=1; + return 0; + } + res_length=cs->snprintf(cs, (char*)str->ptr(), res_length, "%s@%s",thd->user,host); + str->length(res_length); + str->set_charset(cs); return str; } @@ -2120,7 +2128,7 @@ String *Item_func_charset::val_str(String *str) if ((null_value=(args[0]->null_value || !res->charset()))) return 0; - str->copy(res->charset()->name,strlen(res->charset()->name),default_charset_info); + str->copy(res->charset()->name,strlen(res->charset()->name),my_charset_latin1,thd_charset()); return str; } diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 14dadc96891..1a3193318b6 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -310,7 +310,11 @@ class Item_func_database :public Item_str_func public: Item_func_database() {} String *val_str(String *); - void fix_length_and_dec() { max_length= MAX_FIELD_NAME; } + void fix_length_and_dec() + { + max_length= MAX_FIELD_NAME * thd_charset()->mbmaxlen; + set_charset(thd_charset()); + } const char *func_name() const { return "database"; } }; @@ -319,7 +323,11 @@ class Item_func_user :public Item_str_func public: Item_func_user() {} String *val_str(String *); - void fix_length_and_dec() { max_length= USERNAME_LENGTH+HOSTNAME_LENGTH+1; } + void fix_length_and_dec() + { + max_length= (USERNAME_LENGTH+HOSTNAME_LENGTH+1)*thd_charset()->mbmaxlen; + set_charset(thd_charset()); + } const char *func_name() const { return "user"; } }; @@ -567,7 +575,8 @@ public: const char *func_name() const { return "charset"; } void fix_length_and_dec() { - max_length=20; // should be enough + max_length=40; // should be enough + set_charset(thd_charset()); }; }; diff --git a/sql/procedure.h b/sql/procedure.h index 3434079a8fb..c3280b951d3 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -62,7 +62,7 @@ public: { value=atof(str); } double val() { return value; } longlong val_int() { return (longlong) value; } - String *val_str(String *s) { s->set(value,decimals,my_thd_charset); return s; } + String *val_str(String *s) { s->set(value,decimals,thd_charset()); return s; } unsigned int size_of() { return sizeof(*this);} }; @@ -80,7 +80,7 @@ public: { value=strtoll(str,NULL,10); } double val() { return (double) value; } longlong val_int() { return value; } - String *val_str(String *s) { s->set(value, my_thd_charset); return s; } + String *val_str(String *s) { s->set(value, thd_charset()); return s; } unsigned int size_of() { return sizeof(*this);} }; @@ -92,9 +92,9 @@ public: { this->max_length=length; } enum Item_result result_type () const { return STRING_RESULT; } enum_field_types field_type() const { return FIELD_TYPE_STRING; } - void set(double nr) { str_value.set(nr, 2, my_thd_charset); } - void set(longlong nr) { str_value.set(nr, my_thd_charset); } - void set(const char *str, uint length) { str_value.copy(str,length, my_thd_charset); } + void set(double nr) { str_value.set(nr, 2, thd_charset()); } + void set(longlong nr) { str_value.set(nr, thd_charset()); } + void set(const char *str, uint length) { str_value.copy(str,length, thd_charset()); } double val() { return atof(str_value.ptr()); } longlong val_int() { return strtoll(str_value.ptr(),NULL,10); } String *val_str(String*) diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 87a91f18e5f..e4afa4a0cee 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -2383,7 +2383,7 @@ static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap) if (left_len <= plen*2) plen = left_len/2 - 1; - for ( ; plen ; plen--, dst++, par++) + for ( ; plen ; plen--, dst+=2, par++) { dst[0]='\0'; dst[1]=par[0]; From b7d3c9ca6bbbf184fc0478ac44e26a87f904d60f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 17:28:58 +0200 Subject: [PATCH 098/246] fixed select_lex & max_join_size parameters with BIG_TABLES sql/set_var.h: new constaructor --- sql/mysqld.cc | 6 +++--- sql/set_var.cc | 10 +++++----- sql/set_var.h | 4 ++++ sql/sql_class.h | 4 ++-- sql/sql_parse.cc | 13 +++++++------ 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c57e0fc38d1..10766db57c1 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3892,10 +3892,10 @@ static void set_options(void) /* Set default values for some variables */ global_system_variables.table_type=DB_TYPE_MYISAM; global_system_variables.tx_isolation=ISO_READ_COMMITTED; - global_system_variables.select_limit= (ulong) HA_POS_ERROR; + global_system_variables.select_limit= (ulonglong) HA_POS_ERROR; max_system_variables.select_limit= (ulong) HA_POS_ERROR; - global_system_variables.max_join_size= (ulong) HA_POS_ERROR; - max_system_variables.max_join_size= (ulong) HA_POS_ERROR; + global_system_variables.max_join_size= (ulonglong) HA_POS_ERROR; + max_system_variables.max_join_size= (ulonglong) HA_POS_ERROR; #ifdef __WIN__ /* Allow Win32 users to move MySQL anywhere */ diff --git a/sql/set_var.cc b/sql/set_var.cc index 72579664a3e..937bc600d81 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -154,11 +154,11 @@ sys_var_thd_ulong sys_max_error_count("max_error_count", &SV::max_error_count); sys_var_thd_ulong sys_max_heap_table_size("max_heap_table_size", &SV::max_heap_table_size); -sys_var_thd_ulong sys_max_join_size("max_join_size", +sys_var_thd_ulonglong sys_max_join_size("max_join_size", &SV::max_join_size, fix_max_join_size); #ifndef TO_BE_DELETED /* Alias for max_join_size */ -sys_var_thd_ulong sys_sql_max_join_size("sql_max_join_size", +sys_var_thd_ulonglong sys_sql_max_join_size("sql_max_join_size", &SV::max_join_size, fix_max_join_size); #endif @@ -282,7 +282,7 @@ static sys_var_thd_bit sys_unique_checks("unique_checks", /* Local state variables */ -static sys_var_thd_ulong sys_select_limit("sql_select_limit", +static sys_var_thd_ulonglong sys_select_limit("sql_select_limit", &SV::select_limit); static sys_var_timestamp sys_timestamp("timestamp"); static sys_var_last_insert_id sys_last_insert_id("last_insert_id"); @@ -594,7 +594,7 @@ static void fix_max_join_size(THD *thd, enum_var_type type) { if (type != OPT_GLOBAL) { - if (thd->variables.max_join_size == (ulong) HA_POS_ERROR) + if (thd->variables.max_join_size == (ulonglong) HA_POS_ERROR) thd->options|= OPTION_BIG_SELECTS; else thd->options&= ~OPTION_BIG_SELECTS; @@ -769,7 +769,7 @@ bool sys_var_thd_ulonglong::update(THD *thd, set_var *var) void sys_var_thd_ulonglong::set_default(THD *thd, enum_var_type type) { if (type == OPT_GLOBAL) - global_system_variables.*offset= (ulong) option_limits->def_value; + global_system_variables.*offset= (ulonglong) option_limits->def_value; else thd->variables.*offset= global_system_variables.*offset; } diff --git a/sql/set_var.h b/sql/set_var.h index 31154d1e1d7..62fa977eb06 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -203,6 +203,10 @@ public: sys_var_thd_ulonglong(const char *name_arg, ulonglong SV::*offset_arg) :sys_var_thd(name_arg), offset(offset_arg) {} + sys_var_thd_ulonglong(const char *name_arg, ulonglong SV::*offset_arg, + sys_after_update_func func) + :sys_var_thd(name_arg,func), offset(offset_arg) + {} bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); SHOW_TYPE type() { return SHOW_LONGLONG; } diff --git a/sql/sql_class.h b/sql/sql_class.h index 71f1625309f..08066e83ee7 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -341,13 +341,14 @@ struct system_variables { ulonglong myisam_max_extra_sort_file_size; ulonglong myisam_max_sort_file_size; + ulonglong select_limit; + ulonglong max_join_size; ulong bulk_insert_buff_size; ulong join_buff_size; ulong long_query_time; ulong max_allowed_packet; ulong max_error_count; ulong max_heap_table_size; - ulong max_join_size; ulong max_prep_stmt_count; ulong max_sort_length; ulong max_tmp_tables; @@ -361,7 +362,6 @@ struct system_variables ulong query_cache_type; ulong read_buff_size; ulong read_rnd_buff_size; - ulong select_limit; ulong sortbuff_size; ulong table_type; ulong tmp_table_size; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 4288773b00b..4069fa83b01 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -660,7 +660,7 @@ pthread_handler_decl(handle_one_connection,arg) goto end_thread; } - if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR) + if ((ulong) thd->variables.max_join_size == (ulonglong) HA_POS_ERROR) thd->options |= OPTION_BIG_SELECTS; if (thd->client_capabilities & CLIENT_COMPRESS) net->compress=1; // Use compression @@ -736,7 +736,7 @@ pthread_handler_decl(handle_bootstrap,arg) #endif - if ((ulong) thd->variables.max_join_size == (ulong) HA_POS_ERROR) + if ((ulong) thd->variables.max_join_size == (ulonglong) HA_POS_ERROR) thd->options |= OPTION_BIG_SELECTS; thd->proc_info=0; @@ -1373,10 +1373,11 @@ if (lex->derived_tables) break; // Error message is given } - unit->offset_limit_cnt= unit->global_parameters->offset_limit; - unit->select_limit_cnt= unit->global_parameters->select_limit+ - unit->global_parameters->offset_limit; - if (unit->select_limit_cnt < unit->global_parameters->select_limit) + unit->offset_limit_cnt= (ha_rows) unit->global_parameters->offset_limit; + unit->select_limit_cnt= (ha_rows) (unit->global_parameters->select_limit+ + unit->global_parameters->offset_limit); + if (unit->select_limit_cnt < + (ha_rows) unit->global_parameters->select_limit) unit->select_limit_cnt= HA_POS_ERROR; // no limit if (unit->select_limit_cnt == HA_POS_ERROR) select_lex->options&= ~OPTION_FOUND_ROWS; From 736e3c3c17a251af2732ca63cd9688398f99e414 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 17:45:23 +0200 Subject: [PATCH 099/246] some bug fixes related to derived tables --- mysql-test/r/derived.result | 13 +++++++++++++ mysql-test/t/derived.test | 10 ++++++++++ sql/sql_base.cc | 4 +++- sql/sql_parse.cc | 10 +++++----- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index d3fbd557156..b99664835a2 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -17,6 +17,19 @@ select t1.a,t4.y from t1,(select t2.a as y from t2,(select t3.b from t3 where t3 a y 3 3 3 3 +SELECT a FROM (SELECT 1 FROM (SELECT 1) HAVING a=1); +Unknown column 'a' in 'having clause' +SELECT a,b as a FROM (SELECT '1' as a,'2' as b) HAVING a=1; +Column: 'a' in having clause is ambiguous +SELECT a,2 as a FROM (SELECT '1' as a) HAVING a=2; +a a +1 2 +SELECT a,2 as a FROM (SELECT '1' as a) HAVING a=1; +a a +SELECT 1 FROM (SELECT 1) WHERE a=2; +Unknown column 'a' in 'where clause' +SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1); +Unknown column 'a' in 'having clause' drop table if exists t1.t2,t3; select * from (select 1); 1 diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index 87910c29706..6f32cfa0390 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -8,6 +8,16 @@ select t1.a,t3.a from t1,(select * from t2 where b='c') as t3 where t1.a = t3. CREATE TABLE t3 (a int not null, b char (10) not null); insert into t3 values (3,'f'),(4,'y'),(5,'z'),(6,'c'); select t1.a,t4.y from t1,(select t2.a as y from t2,(select t3.b from t3 where t3.a>3) as t5 where t2.b=t5.b) as t4 where t1.a = t4.y; +--error 1054 +SELECT a FROM (SELECT 1 FROM (SELECT 1) HAVING a=1); +--error 1052 +SELECT a,b as a FROM (SELECT '1' as a,'2' as b) HAVING a=1; +SELECT a,2 as a FROM (SELECT '1' as a) HAVING a=2; +SELECT a,2 as a FROM (SELECT '1' as a) HAVING a=1; +--error 1054 +SELECT 1 FROM (SELECT 1) WHERE a=2; +--error 1054 +SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1); drop table if exists t1.t2,t3; select * from (select 1); select a from (select 1 as a); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 77253d49ed0..fd6c2c48020 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1748,7 +1748,9 @@ Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length, } else { - Field **ptr=table->field; + Field **ptr; + if (!(ptr=table->field)) + return (Field *)0; while ((field = *ptr++)) { if (!my_strcasecmp(system_charset_info, field->field_name, name)) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index e30773984fb..758c2c405e6 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1332,11 +1332,6 @@ mysql_execute_command(THD *thd) TODO: make derived tables processing 'inside' SELECT processing. TODO: solve problem with depended derived tables in subselects */ - if ((lex->select_lex.next_select_in_list() && - lex->unit.create_total_list(thd, lex, &tables)) || - (table_rules_on && tables && thd->slave_thread && - !tables_ok(thd,tables))) - DBUG_VOID_RETURN; if (lex->derived_tables) { for (TABLE_LIST *cursor= tables; @@ -1351,6 +1346,11 @@ mysql_execute_command(THD *thd) DBUG_VOID_RETURN; } } + if ((lex->select_lex.next_select_in_list() && + lex->unit.create_total_list(thd, lex, &tables)) || + (table_rules_on && tables && thd->slave_thread && + !tables_ok(thd,tables))) + DBUG_VOID_RETURN; thread_safe_increment(com_stat[lex->sql_command],&LOCK_status); switch (lex->sql_command) { From dbbcc4223bf1388631fa9dea555c5e39b0fd81ed Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 17:17:28 +0100 Subject: [PATCH 100/246] removed auto-generated files, some fixups BitKeeper/deleted/.del-rpc_server_ext.h~7c955499fca6dc77: Delete: bdb/dbinc_auto/rpc_server_ext.h BitKeeper/deleted/.del-btree_ext.h~35de1585d63d72ff: Delete: bdb/dbinc_auto/btree_ext.h BitKeeper/deleted/.del-clib_ext.h~f279b5b64b6b5ade: Delete: bdb/dbinc_auto/clib_ext.h BitKeeper/deleted/.del-common_ext.h~d8ab025e1be030ae: Delete: bdb/dbinc_auto/common_ext.h BitKeeper/deleted/.del-db_ext.h~a62714b06359a95e: Delete: bdb/dbinc_auto/db_ext.h BitKeeper/deleted/.del-dbreg_ext.h~4d2ca3859b11d8c2: Delete: bdb/dbinc_auto/dbreg_ext.h BitKeeper/deleted/.del-env_ext.h~6f604f4533cc5427: Delete: bdb/dbinc_auto/env_ext.h BitKeeper/deleted/.del-ext_185_def.in~a6545f6dd455a6bd: Delete: bdb/dbinc_auto/ext_185_def.in BitKeeper/deleted/.del-ext_185_prot.in~51f8b1efdc79204c: Delete: bdb/dbinc_auto/ext_185_prot.in BitKeeper/deleted/.del-ext_def.in~eb85579468346302: Delete: bdb/dbinc_auto/ext_def.in BitKeeper/deleted/.del-ext_prot.in~1123bab8d321561d: Delete: bdb/dbinc_auto/ext_prot.in BitKeeper/deleted/.del-fileops_ext.h~cb8ee1d24c011cac: Delete: bdb/dbinc_auto/fileops_ext.h BitKeeper/deleted/.del-hash_ext.h~9cc6cefb2d5cdee: Delete: bdb/dbinc_auto/hash_ext.h BitKeeper/deleted/.del-hmac_ext.h~da1552dc3f7b9f46: Delete: bdb/dbinc_auto/hmac_ext.h BitKeeper/deleted/.del-lock_ext.h~f9ce9b184d784d74: Delete: bdb/dbinc_auto/lock_ext.h BitKeeper/deleted/.del-log_ext.h~f1309f8f47b5e812: Delete: bdb/dbinc_auto/log_ext.h BitKeeper/deleted/.del-mp_ext.h~863c07eb97ff21fb: Delete: bdb/dbinc_auto/mp_ext.h BitKeeper/deleted/.del-mutex_ext.h~f0c6b65f493723e6: Delete: bdb/dbinc_auto/mutex_ext.h BitKeeper/deleted/.del-os_ext.h~6f51a66237a20ca3: Delete: bdb/dbinc_auto/os_ext.h BitKeeper/deleted/.del-qam_ext.h~a0e8f87ead2e3846: Delete: bdb/dbinc_auto/qam_ext.h BitKeeper/deleted/.del-rep_ext.h~94f25917d5d2623: Delete: bdb/dbinc_auto/rep_ext.h BitKeeper/deleted/.del-rpc_client_ext.h~8fb31274cb4dc50: Delete: bdb/dbinc_auto/rpc_client_ext.h BitKeeper/deleted/.del-tcl_ext.h~6004cb009c5424ee: Delete: bdb/dbinc_auto/tcl_ext.h BitKeeper/deleted/.del-txn_ext.h~c30807d88c7b11ea: Delete: bdb/dbinc_auto/txn_ext.h BitKeeper/deleted/.del-xa_ext.h~3f131d16d9cc5e: Delete: bdb/dbinc_auto/xa_ext.h bdb/java/src/com/sleepycat/db/Db.java.in: Rename: bdb/java/src/com/sleepycat/db/Db.java -> bdb/java/src/com/sleepycat/db/Db.java.in bdb/dist/s_java: avoid in-place editing bdb/dist/s_rpc: be consistent --- bdb/dbinc_auto/btree_ext.h | 132 ----------- bdb/dbinc_auto/clib_ext.h | 49 ---- bdb/dbinc_auto/common_ext.h | 44 ---- bdb/dbinc_auto/db_ext.h | 224 ------------------ bdb/dbinc_auto/dbreg_ext.h | 43 ---- bdb/dbinc_auto/env_ext.h | 39 --- bdb/dbinc_auto/ext_185_def.in | 12 - bdb/dbinc_auto/ext_185_prot.in | 19 -- bdb/dbinc_auto/ext_def.in | 61 ----- bdb/dbinc_auto/ext_prot.in | 70 ------ bdb/dbinc_auto/fileops_ext.h | 52 ---- bdb/dbinc_auto/hash_ext.h | 125 ---------- bdb/dbinc_auto/hmac_ext.h | 20 -- bdb/dbinc_auto/lock_ext.h | 41 ---- bdb/dbinc_auto/log_ext.h | 32 --- bdb/dbinc_auto/mp_ext.h | 44 ---- bdb/dbinc_auto/mutex_ext.h | 35 --- bdb/dbinc_auto/os_ext.h | 74 ------ bdb/dbinc_auto/qam_ext.h | 70 ------ bdb/dbinc_auto/rep_ext.h | 30 --- bdb/dbinc_auto/rpc_client_ext.h | 167 ------------- bdb/dbinc_auto/rpc_server_ext.h | 126 ---------- bdb/dbinc_auto/tcl_ext.h | 82 ------- bdb/dbinc_auto/txn_ext.h | 70 ------ bdb/dbinc_auto/xa_ext.h | 20 -- bdb/dist/s_java | 2 +- bdb/dist/s_rpc | 1 + .../com/sleepycat/db/{Db.java => Db.java.in} | 0 28 files changed, 2 insertions(+), 1682 deletions(-) delete mode 100644 bdb/dbinc_auto/btree_ext.h delete mode 100644 bdb/dbinc_auto/clib_ext.h delete mode 100644 bdb/dbinc_auto/common_ext.h delete mode 100644 bdb/dbinc_auto/db_ext.h delete mode 100644 bdb/dbinc_auto/dbreg_ext.h delete mode 100644 bdb/dbinc_auto/env_ext.h delete mode 100644 bdb/dbinc_auto/ext_185_def.in delete mode 100644 bdb/dbinc_auto/ext_185_prot.in delete mode 100644 bdb/dbinc_auto/ext_def.in delete mode 100644 bdb/dbinc_auto/ext_prot.in delete mode 100644 bdb/dbinc_auto/fileops_ext.h delete mode 100644 bdb/dbinc_auto/hash_ext.h delete mode 100644 bdb/dbinc_auto/hmac_ext.h delete mode 100644 bdb/dbinc_auto/lock_ext.h delete mode 100644 bdb/dbinc_auto/log_ext.h delete mode 100644 bdb/dbinc_auto/mp_ext.h delete mode 100644 bdb/dbinc_auto/mutex_ext.h delete mode 100644 bdb/dbinc_auto/os_ext.h delete mode 100644 bdb/dbinc_auto/qam_ext.h delete mode 100644 bdb/dbinc_auto/rep_ext.h delete mode 100644 bdb/dbinc_auto/rpc_client_ext.h delete mode 100644 bdb/dbinc_auto/rpc_server_ext.h delete mode 100644 bdb/dbinc_auto/tcl_ext.h delete mode 100644 bdb/dbinc_auto/txn_ext.h delete mode 100644 bdb/dbinc_auto/xa_ext.h rename bdb/java/src/com/sleepycat/db/{Db.java => Db.java.in} (100%) diff --git a/bdb/dbinc_auto/btree_ext.h b/bdb/dbinc_auto/btree_ext.h deleted file mode 100644 index ec5468acf1c..00000000000 --- a/bdb/dbinc_auto/btree_ext.h +++ /dev/null @@ -1,132 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _btree_ext_h_ -#define _btree_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __bam_cmp __P((DB *, const DBT *, PAGE *, u_int32_t, int (*)(DB *, const DBT *, const DBT *), int *)); -int __bam_defcmp __P((DB *, const DBT *, const DBT *)); -size_t __bam_defpfx __P((DB *, const DBT *, const DBT *)); -int __bam_pgin __P((DB_ENV *, DB *, db_pgno_t, void *, DBT *)); -int __bam_pgout __P((DB_ENV *, DB *, db_pgno_t, void *, DBT *)); -int __bam_mswap __P((PAGE *)); -void __bam_cprint __P((DBC *)); -int __bam_ca_delete __P((DB *, db_pgno_t, u_int32_t, int)); -int __ram_ca_delete __P((DB *, db_pgno_t)); -int __bam_ca_di __P((DBC *, db_pgno_t, u_int32_t, int)); -int __bam_ca_dup __P((DBC *, u_int32_t, db_pgno_t, u_int32_t, db_pgno_t, u_int32_t)); -int __bam_ca_undodup __P((DB *, u_int32_t, db_pgno_t, u_int32_t, u_int32_t)); -int __bam_ca_rsplit __P((DBC *, db_pgno_t, db_pgno_t)); -int __bam_ca_split __P((DBC *, db_pgno_t, db_pgno_t, db_pgno_t, u_int32_t, int)); -void __bam_ca_undosplit __P((DB *, db_pgno_t, db_pgno_t, db_pgno_t, u_int32_t)); -int __bam_c_init __P((DBC *, DBTYPE)); -int __bam_c_refresh __P((DBC *)); -int __bam_c_count __P((DBC *, db_recno_t *)); -int __bam_c_dup __P((DBC *, DBC *)); -int __bam_bulk_overflow __P((DBC *, u_int32_t, db_pgno_t, u_int8_t *)); -int __bam_bulk_duplicates __P((DBC *, db_pgno_t, u_int8_t *, int32_t *, int32_t **, u_int8_t **, u_int32_t *, int)); -int __bam_c_rget __P((DBC *, DBT *)); -int __bam_ditem __P((DBC *, PAGE *, u_int32_t)); -int __bam_adjindx __P((DBC *, PAGE *, u_int32_t, u_int32_t, int)); -int __bam_dpages __P((DBC *, EPG *)); -int __bam_db_create __P((DB *)); -int __bam_db_close __P((DB *)); -int __bam_set_flags __P((DB *, u_int32_t *flagsp)); -int __ram_set_flags __P((DB *, u_int32_t *flagsp)); -int __bam_open __P((DB *, DB_TXN *, const char *, db_pgno_t, u_int32_t)); -int __bam_metachk __P((DB *, const char *, BTMETA *)); -int __bam_read_root __P((DB *, DB_TXN *, db_pgno_t, u_int32_t)); -int __bam_new_file __P((DB *, DB_TXN *, DB_FH *, const char *)); -int __bam_new_subdb __P((DB *, DB *, DB_TXN *)); -int __bam_iitem __P((DBC *, DBT *, DBT *, u_int32_t, u_int32_t)); -int __bam_ritem __P((DBC *, PAGE *, u_int32_t, DBT *)); -int __bam_split_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_rsplit_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_adj_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_cadjust_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_cdel_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_repl_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_root_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_curadj_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_rcuradj_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_reclaim __P((DB *, DB_TXN *)); -int __bam_truncate __P((DB *, DB_TXN *, u_int32_t *)); -int __ram_open __P((DB *, DB_TXN *, const char *, db_pgno_t, u_int32_t)); -int __ram_append __P((DBC *, DBT *, DBT *)); -int __ram_c_del __P((DBC *)); -int __ram_c_get __P((DBC *, DBT *, DBT *, u_int32_t, db_pgno_t *)); -int __ram_c_put __P((DBC *, DBT *, DBT *, u_int32_t, db_pgno_t *)); -int __ram_ca __P((DBC *, ca_recno_arg)); -int __ram_getno __P((DBC *, const DBT *, db_recno_t *, int)); -int __ram_writeback __P((DB *)); -int __bam_rsearch __P((DBC *, db_recno_t *, u_int32_t, int, int *)); -int __bam_adjust __P((DBC *, int32_t)); -int __bam_nrecs __P((DBC *, db_recno_t *)); -db_recno_t __bam_total __P((DB *, PAGE *)); -int __bam_search __P((DBC *, db_pgno_t, const DBT *, u_int32_t, int, db_recno_t *, int *)); -int __bam_stkrel __P((DBC *, u_int32_t)); -int __bam_stkgrow __P((DB_ENV *, BTREE_CURSOR *)); -int __bam_split __P((DBC *, void *, db_pgno_t *)); -int __bam_copy __P((DB *, PAGE *, PAGE *, u_int32_t, u_int32_t)); -int __bam_stat __P((DB *, void *, u_int32_t)); -int __bam_traverse __P((DBC *, db_lockmode_t, db_pgno_t, int (*)(DB *, PAGE *, void *, int *), void *)); -int __bam_stat_callback __P((DB *, PAGE *, void *, int *)); -int __bam_key_range __P((DB *, DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t)); -int __bam_30_btreemeta __P((DB *, char *, u_int8_t *)); -int __bam_31_btreemeta __P((DB *, char *, u_int32_t, DB_FH *, PAGE *, int *)); -int __bam_31_lbtree __P((DB *, char *, u_int32_t, DB_FH *, PAGE *, int *)); -int __bam_vrfy_meta __P((DB *, VRFY_DBINFO *, BTMETA *, db_pgno_t, u_int32_t)); -int __ram_vrfy_leaf __P((DB *, VRFY_DBINFO *, PAGE *, db_pgno_t, u_int32_t)); -int __bam_vrfy __P((DB *, VRFY_DBINFO *, PAGE *, db_pgno_t, u_int32_t)); -int __bam_vrfy_itemorder __P((DB *, VRFY_DBINFO *, PAGE *, db_pgno_t, u_int32_t, int, int, u_int32_t)); -int __bam_vrfy_structure __P((DB *, VRFY_DBINFO *, db_pgno_t, u_int32_t)); -int __bam_vrfy_subtree __P((DB *, VRFY_DBINFO *, db_pgno_t, void *, void *, u_int32_t, u_int32_t *, u_int32_t *, u_int32_t *)); -int __bam_salvage __P((DB *, VRFY_DBINFO *, db_pgno_t, u_int32_t, PAGE *, void *, int (*)(void *, const void *), DBT *, u_int32_t)); -int __bam_salvage_walkdupint __P((DB *, VRFY_DBINFO *, PAGE *, DBT *, void *, int (*)(void *, const void *), u_int32_t)); -int __bam_meta2pgset __P((DB *, VRFY_DBINFO *, BTMETA *, u_int32_t, DB *)); -int __bam_split_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *, db_pgno_t, const DBT *, u_int32_t)); -int __bam_split_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_split_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_split_read __P((DB_ENV *, void *, __bam_split_args **)); -int __bam_rsplit_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, const DBT *, db_pgno_t, db_pgno_t, const DBT *, DB_LSN *)); -int __bam_rsplit_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_rsplit_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_rsplit_read __P((DB_ENV *, void *, __bam_rsplit_args **)); -int __bam_adj_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *, u_int32_t, u_int32_t, u_int32_t)); -int __bam_adj_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_adj_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_adj_read __P((DB_ENV *, void *, __bam_adj_args **)); -int __bam_cadjust_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *, u_int32_t, int32_t, u_int32_t)); -int __bam_cadjust_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_cadjust_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_cadjust_read __P((DB_ENV *, void *, __bam_cadjust_args **)); -int __bam_cdel_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *, u_int32_t)); -int __bam_cdel_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_cdel_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_cdel_read __P((DB_ENV *, void *, __bam_cdel_args **)); -int __bam_repl_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *, u_int32_t, u_int32_t, const DBT *, const DBT *, u_int32_t, u_int32_t)); -int __bam_repl_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_repl_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_repl_read __P((DB_ENV *, void *, __bam_repl_args **)); -int __bam_root_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, db_pgno_t, DB_LSN *)); -int __bam_root_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_root_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_root_read __P((DB_ENV *, void *, __bam_root_args **)); -int __bam_curadj_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_ca_mode, db_pgno_t, db_pgno_t, db_pgno_t, u_int32_t, u_int32_t, u_int32_t)); -int __bam_curadj_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_curadj_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_curadj_read __P((DB_ENV *, void *, __bam_curadj_args **)); -int __bam_rcuradj_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, ca_recno_arg, db_pgno_t, db_recno_t, u_int32_t)); -int __bam_rcuradj_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_rcuradj_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __bam_rcuradj_read __P((DB_ENV *, void *, __bam_rcuradj_args **)); -int __bam_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __bam_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __bam_init_recover __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_btree_ext_h_ */ diff --git a/bdb/dbinc_auto/clib_ext.h b/bdb/dbinc_auto/clib_ext.h deleted file mode 100644 index 7e2817d620e..00000000000 --- a/bdb/dbinc_auto/clib_ext.h +++ /dev/null @@ -1,49 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _clib_ext_h_ -#define _clib_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifndef HAVE_GETCWD -char *getcwd __P((char *, size_t)); -#endif -#ifndef HAVE_GETOPT -int getopt __P((int, char * const *, const char *)); -#endif -#ifndef HAVE_MEMCMP -int memcmp __P((const void *, const void *, size_t)); -#endif -#ifndef HAVE_MEMCPY -void *memcpy __P((void *, const void *, size_t)); -#endif -#ifndef HAVE_MEMMOVE -void *memmove __P((void *, const void *, size_t)); -#endif -#ifndef HAVE_RAISE -int raise __P((int)); -#endif -#ifndef HAVE_SNPRINTF -int snprintf __P((char *, size_t, const char *, ...)); -#endif -#ifndef HAVE_STRCASECMP -int strcasecmp __P((const char *, const char *)); -#endif -#ifndef HAVE_STRCASECMP -int strncasecmp __P((const char *, const char *, size_t)); -#endif -#ifndef HAVE_STRDUP -char *strdup __P((const char *)); -#endif -#ifndef HAVE_STRERROR -char *strerror __P((int)); -#endif -#ifndef HAVE_VSNPRINTF -int vsnprintf __P((char *, size_t, const char *, va_list)); -#endif - -#if defined(__cplusplus) -} -#endif -#endif /* !_clib_ext_h_ */ diff --git a/bdb/dbinc_auto/common_ext.h b/bdb/dbinc_auto/common_ext.h deleted file mode 100644 index 7744982fe41..00000000000 --- a/bdb/dbinc_auto/common_ext.h +++ /dev/null @@ -1,44 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _common_ext_h_ -#define _common_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __db_isbigendian __P((void)); -int __db_byteorder __P((DB_ENV *, int)); -int __db_fchk __P((DB_ENV *, const char *, u_int32_t, u_int32_t)); -int __db_fcchk __P((DB_ENV *, const char *, u_int32_t, u_int32_t, u_int32_t)); -int __db_ferr __P((const DB_ENV *, const char *, int)); -void __db_pgerr __P((DB *, db_pgno_t, int)); -int __db_pgfmt __P((DB_ENV *, db_pgno_t)); -int __db_eopnotsup __P((const DB_ENV *)); -#ifdef DIAGNOSTIC -void __db_assert __P((const char *, const char *, int)); -#endif -int __db_panic_msg __P((DB_ENV *)); -int __db_panic __P((DB_ENV *, int)); -void __db_err __P((const DB_ENV *, const char *, ...)); -void __db_errcall __P((const DB_ENV *, int, int, const char *, va_list)); -void __db_errfile __P((const DB_ENV *, int, int, const char *, va_list)); -void __db_logmsg __P((const DB_ENV *, DB_TXN *, const char *, u_int32_t, const char *, ...)); -int __db_unknown_flag __P((DB_ENV *, char *, u_int32_t)); -int __db_unknown_type __P((DB_ENV *, char *, DBTYPE)); -int __db_check_txn __P((DB *, DB_TXN *, u_int32_t, int)); -int __db_not_txn_env __P((DB_ENV *)); -int __db_getlong __P((DB *, const char *, char *, long, long, long *)); -int __db_getulong __P((DB *, const char *, char *, u_long, u_long, u_long *)); -void __db_idspace __P((u_int32_t *, int, u_int32_t *, u_int32_t *)); -u_int32_t __db_log2 __P((u_int32_t)); -int __db_util_arg __P((char *, char *, int *, char ***)); -int __db_util_cache __P((DB_ENV *, DB *, u_int32_t *, int *)); -int __db_util_logset __P((const char *, char *)); -void __db_util_siginit __P((void)); -int __db_util_interrupted __P((void)); -void __db_util_sigresend __P((void)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_common_ext_h_ */ diff --git a/bdb/dbinc_auto/db_ext.h b/bdb/dbinc_auto/db_ext.h deleted file mode 100644 index 24a13975c89..00000000000 --- a/bdb/dbinc_auto/db_ext.h +++ /dev/null @@ -1,224 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _db_ext_h_ -#define _db_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __crdel_metasub_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, const DBT *, DB_LSN *)); -int __crdel_metasub_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __crdel_metasub_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __crdel_metasub_read __P((DB_ENV *, void *, __crdel_metasub_args **)); -int __crdel_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __crdel_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __crdel_init_recover __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __crdel_metasub_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_master_open __P((DB *, DB_TXN *, const char *, u_int32_t, int, DB **)); -int __db_master_update __P((DB *, DB *, DB_TXN *, const char *, DBTYPE, mu_action, const char *, u_int32_t)); -int __db_dbenv_setup __P((DB *, DB_TXN *, const char *, u_int32_t, u_int32_t)); -int __db_close __P((DB *, u_int32_t)); -int __db_close_i __P((DB *, DB_TXN *, u_int32_t)); -int __db_refresh __P((DB *, DB_TXN *, u_int32_t)); -int __db_log_page __P((DB *, DB_TXN *, DB_LSN *, db_pgno_t, PAGE *)); -int __db_backup_name __P((DB_ENV *, const char *, DB_TXN *, char **)); -DB *__dblist_get __P((DB_ENV *, u_int32_t)); -#if CONFIG_TEST -int __db_testcopy __P((DB_ENV *, DB *, const char *)); -#endif -int __db_cursor __P((DB *, DB_TXN *, DBC **, u_int32_t)); -int __db_icursor __P((DB *, DB_TXN *, DBTYPE, db_pgno_t, int, u_int32_t, DBC **)); -int __db_cprint __P((DB *)); -int __db_fd __P((DB *, int *)); -int __db_get __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); -int __db_put __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); -int __db_delete __P((DB *, DB_TXN *, DBT *, u_int32_t)); -int __db_sync __P((DB *, u_int32_t)); -int __db_associate __P((DB *, DB_TXN *, DB *, int (*)(DB *, const DBT *, const DBT *, DBT *), u_int32_t)); -int __db_pget __P((DB *, DB_TXN *, DBT *, DBT *, DBT *, u_int32_t)); -int __db_addrem_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_pgno_t, u_int32_t, u_int32_t, const DBT *, const DBT *, DB_LSN *)); -int __db_addrem_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_addrem_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_addrem_read __P((DB_ENV *, void *, __db_addrem_args **)); -int __db_big_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_pgno_t, db_pgno_t, db_pgno_t, const DBT *, DB_LSN *, DB_LSN *, DB_LSN *)); -int __db_big_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_big_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_big_read __P((DB_ENV *, void *, __db_big_args **)); -int __db_ovref_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, int32_t, DB_LSN *)); -int __db_ovref_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_ovref_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_ovref_read __P((DB_ENV *, void *, __db_ovref_args **)); -int __db_relink_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *)); -int __db_relink_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_relink_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_relink_read __P((DB_ENV *, void *, __db_relink_args **)); -int __db_debug_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, const DBT *, int32_t, const DBT *, const DBT *, u_int32_t)); -int __db_debug_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_debug_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_debug_read __P((DB_ENV *, void *, __db_debug_args **)); -int __db_noop_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *)); -int __db_noop_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_noop_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_noop_read __P((DB_ENV *, void *, __db_noop_args **)); -int __db_pg_alloc_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, DB_LSN *, db_pgno_t, DB_LSN *, db_pgno_t, u_int32_t, db_pgno_t)); -int __db_pg_alloc_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_pg_alloc_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_pg_alloc_read __P((DB_ENV *, void *, __db_pg_alloc_args **)); -int __db_pg_free_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *, db_pgno_t, const DBT *, db_pgno_t)); -int __db_pg_free_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_pg_free_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_pg_free_read __P((DB_ENV *, void *, __db_pg_free_args **)); -int __db_cksum_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t)); -int __db_cksum_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_cksum_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_cksum_read __P((DB_ENV *, void *, __db_cksum_args **)); -int __db_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __db_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __db_init_recover __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __db_c_close __P((DBC *)); -int __db_c_destroy __P((DBC *)); -int __db_c_count __P((DBC *, db_recno_t *, u_int32_t)); -int __db_c_del __P((DBC *, u_int32_t)); -int __db_c_dup __P((DBC *, DBC **, u_int32_t)); -int __db_c_idup __P((DBC *, DBC **, u_int32_t)); -int __db_c_newopd __P((DBC *, db_pgno_t, DBC *, DBC **)); -int __db_c_get __P((DBC *, DBT *, DBT *, u_int32_t)); -int __db_c_put __P((DBC *, DBT *, DBT *, u_int32_t)); -int __db_duperr __P((DB *, u_int32_t)); -int __db_c_secondary_get __P((DBC *, DBT *, DBT *, u_int32_t)); -int __db_c_pget __P((DBC *, DBT *, DBT *, DBT *, u_int32_t)); -int __db_c_del_primary __P((DBC *)); -DB *__db_s_first __P((DB *)); -int __db_s_next __P((DB **)); -int __db_s_done __P((DB *)); -u_int32_t __db_partsize __P((u_int32_t, DBT *)); -int __db_pgin __P((DB_ENV *, db_pgno_t, void *, DBT *)); -int __db_pgout __P((DB_ENV *, db_pgno_t, void *, DBT *)); -void __db_metaswap __P((PAGE *)); -int __db_byteswap __P((DB_ENV *, DB *, db_pgno_t, PAGE *, size_t, int)); -int __db_dispatch __P((DB_ENV *, int (**)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)), size_t, DBT *, DB_LSN *, db_recops, void *)); -int __db_add_recovery __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *, int (*)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), u_int32_t)); -int __db_txnlist_init __P((DB_ENV *, u_int32_t, u_int32_t, DB_LSN *, void *)); -int __db_txnlist_add __P((DB_ENV *, void *, u_int32_t, int32_t, DB_LSN *)); -int __db_txnlist_remove __P((DB_ENV *, void *, u_int32_t)); -void __db_txnlist_ckp __P((DB_ENV *, void *, DB_LSN *)); -void __db_txnlist_end __P((DB_ENV *, void *)); -int __db_txnlist_find __P((DB_ENV *, void *, u_int32_t)); -int __db_txnlist_update __P((DB_ENV *, void *, u_int32_t, u_int32_t, DB_LSN *)); -int __db_txnlist_gen __P((DB_ENV *, void *, int, u_int32_t, u_int32_t)); -int __db_txnlist_lsnadd __P((DB_ENV *, void *, DB_LSN *, u_int32_t)); -int __db_txnlist_lsninit __P((DB_ENV *, DB_TXNHEAD *, DB_LSN *)); -int __db_add_limbo __P((DB_ENV *, void *, int32_t, db_pgno_t, int32_t)); -int __db_do_the_limbo __P((DB_ENV *, DB_TXN *, DB_TXN *, DB_TXNHEAD *)); -void __db_txnlist_print __P((void *)); -int __db_ditem __P((DBC *, PAGE *, u_int32_t, u_int32_t)); -int __db_pitem __P((DBC *, PAGE *, u_int32_t, u_int32_t, DBT *, DBT *)); -int __db_relink __P((DBC *, u_int32_t, PAGE *, PAGE **, int)); -int __db_cursorchk __P((const DB *, u_int32_t)); -int __db_ccountchk __P((const DB *, u_int32_t, int)); -int __db_cdelchk __P((const DB *, u_int32_t, int)); -int __db_cgetchk __P((const DB *, DBT *, DBT *, u_int32_t, int)); -int __db_cputchk __P((const DB *, const DBT *, DBT *, u_int32_t, int)); -int __db_pgetchk __P((const DB *, const DBT *, DBT *, DBT *, u_int32_t)); -int __db_cpgetchk __P((const DB *, DBT *, DBT *, DBT *, u_int32_t, int)); -int __db_delchk __P((const DB *, DBT *, u_int32_t)); -int __db_getchk __P((const DB *, const DBT *, DBT *, u_int32_t)); -int __db_joinchk __P((const DB *, DBC * const *, u_int32_t)); -int __db_joingetchk __P((const DB *, DBT *, u_int32_t)); -int __db_putchk __P((const DB *, DBT *, const DBT *, u_int32_t, int)); -int __db_statchk __P((const DB *, u_int32_t)); -int __db_syncchk __P((const DB *, u_int32_t)); -int __db_secondary_corrupt __P((DB *)); -int __db_associatechk __P((DB *, DB *, int (*)(DB *, const DBT *, const DBT *, DBT *), u_int32_t)); -int __db_txn_auto __P((DB *, DB_TXN **)); -int __db_join __P((DB *, DBC **, DBC **, u_int32_t)); -int __db_new __P((DBC *, u_int32_t, PAGE **)); -int __db_free __P((DBC *, PAGE *)); -int __db_lprint __P((DBC *)); -int __db_lget __P((DBC *, int, db_pgno_t, db_lockmode_t, u_int32_t, DB_LOCK *)); -int __db_lput __P((DBC *, DB_LOCK *)); -int __dbh_am_chk __P((DB *, u_int32_t)); -int __db_set_lorder __P((DB *, int)); -int __db_open __P((DB *, DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int)); -int __db_dbopen __P((DB *, DB_TXN *, const char *, const char *, u_int32_t, int, db_pgno_t)); -int __db_new_file __P((DB *, DB_TXN *, DB_FH *, const char *)); -int __db_init_subdb __P((DB *, DB *, const char *, DB_TXN *)); -int __db_chk_meta __P((DB_ENV *, DB *, DBMETA *, int)); -int __db_meta_setup __P((DB_ENV *, DB *, const char *, DBMETA *, u_int32_t, int)); -int __db_goff __P((DB *, DBT *, u_int32_t, db_pgno_t, void **, u_int32_t *)); -int __db_poff __P((DBC *, const DBT *, db_pgno_t *)); -int __db_ovref __P((DBC *, db_pgno_t, int32_t)); -int __db_doff __P((DBC *, db_pgno_t)); -int __db_moff __P((DB *, const DBT *, db_pgno_t, u_int32_t, int (*)(DB *, const DBT *, const DBT *), int *)); -int __db_vrfy_overflow __P((DB *, VRFY_DBINFO *, PAGE *, db_pgno_t, u_int32_t)); -int __db_vrfy_ovfl_structure __P((DB *, VRFY_DBINFO *, db_pgno_t, u_int32_t, u_int32_t)); -int __db_safe_goff __P((DB *, VRFY_DBINFO *, db_pgno_t, DBT *, void **, u_int32_t)); -void __db_loadme __P((void)); -int __db_dump __P((DB *, char *, char *)); -void __db_inmemdbflags __P((u_int32_t, void *, void (*)(u_int32_t, const FN *, void *))); -int __db_prnpage __P((DB *, db_pgno_t, FILE *)); -int __db_prpage __P((DB *, PAGE *, FILE *, u_int32_t)); -void __db_pr __P((u_int8_t *, u_int32_t, FILE *)); -int __db_prdbt __P((DBT *, int, const char *, void *, int (*)(void *, const void *), int, VRFY_DBINFO *)); -void __db_prflags __P((u_int32_t, const FN *, void *)); -const char * __db_dbtype_to_string __P((DBTYPE)); -int __db_prheader __P((DB *, char *, int, int, void *, int (*)(void *, const void *), VRFY_DBINFO *, db_pgno_t)); -int __db_prfooter __P((void *, int (*)(void *, const void *))); -int __db_addrem_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_big_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_ovref_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_relink_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_debug_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_noop_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_pg_alloc_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_pg_free_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_cksum_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __db_traverse_big __P((DB *, db_pgno_t, int (*)(DB *, PAGE *, void *, int *), void *)); -int __db_reclaim_callback __P((DB *, PAGE *, void *, int *)); -int __db_truncate_callback __P((DB *, PAGE *, void *, int *)); -int __dbenv_dbremove __P((DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)); -int __db_remove __P((DB *, const char *, const char *, u_int32_t)); -int __db_remove_i __P((DB *, DB_TXN *, const char *, const char *)); -int __dbenv_dbrename __P((DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)); -int __db_rename __P((DB *, const char *, const char *, const char *, u_int32_t)); -int __db_rename_i __P((DB *, DB_TXN *, const char *, const char *, const char *)); -int __db_ret __P((DB *, PAGE *, u_int32_t, DBT *, void **, u_int32_t *)); -int __db_retcopy __P((DB_ENV *, DBT *, void *, u_int32_t, void **, u_int32_t *)); -int __db_truncate __P((DB *, DB_TXN *, u_int32_t *, u_int32_t)); -int __db_upgrade __P((DB *, const char *, u_int32_t)); -int __db_lastpgno __P((DB *, char *, DB_FH *, db_pgno_t *)); -int __db_31_offdup __P((DB *, char *, DB_FH *, int, db_pgno_t *)); -int __db_verify __P((DB *, const char *, const char *, FILE *, u_int32_t)); -int __db_verify_callback __P((void *, const void *)); -int __db_verify_internal __P((DB *, const char *, const char *, void *, int (*)(void *, const void *), u_int32_t)); -int __db_vrfy_datapage __P((DB *, VRFY_DBINFO *, PAGE *, db_pgno_t, u_int32_t)); -int __db_vrfy_meta __P((DB *, VRFY_DBINFO *, DBMETA *, db_pgno_t, u_int32_t)); -void __db_vrfy_struct_feedback __P((DB *, VRFY_DBINFO *)); -int __db_vrfy_inpitem __P((DB *, PAGE *, db_pgno_t, u_int32_t, int, u_int32_t, u_int32_t *, u_int32_t *)); -int __db_vrfy_duptype __P((DB *, VRFY_DBINFO *, db_pgno_t, u_int32_t)); -int __db_salvage_duptree __P((DB *, VRFY_DBINFO *, db_pgno_t, DBT *, void *, int (*)(void *, const void *), u_int32_t)); -int __db_vrfy_dbinfo_create __P((DB_ENV *, u_int32_t, VRFY_DBINFO **)); -int __db_vrfy_dbinfo_destroy __P((DB_ENV *, VRFY_DBINFO *)); -int __db_vrfy_getpageinfo __P((VRFY_DBINFO *, db_pgno_t, VRFY_PAGEINFO **)); -int __db_vrfy_putpageinfo __P((DB_ENV *, VRFY_DBINFO *, VRFY_PAGEINFO *)); -int __db_vrfy_pgset __P((DB_ENV *, u_int32_t, DB **)); -int __db_vrfy_pgset_get __P((DB *, db_pgno_t, int *)); -int __db_vrfy_pgset_inc __P((DB *, db_pgno_t)); -int __db_vrfy_pgset_dec __P((DB *, db_pgno_t)); -int __db_vrfy_pgset_next __P((DBC *, db_pgno_t *)); -int __db_vrfy_childcursor __P((VRFY_DBINFO *, DBC **)); -int __db_vrfy_childput __P((VRFY_DBINFO *, db_pgno_t, VRFY_CHILDINFO *)); -int __db_vrfy_ccset __P((DBC *, db_pgno_t, VRFY_CHILDINFO **)); -int __db_vrfy_ccnext __P((DBC *, VRFY_CHILDINFO **)); -int __db_vrfy_ccclose __P((DBC *)); -int __db_salvage_init __P((VRFY_DBINFO *)); -void __db_salvage_destroy __P((VRFY_DBINFO *)); -int __db_salvage_getnext __P((VRFY_DBINFO *, db_pgno_t *, u_int32_t *)); -int __db_salvage_isdone __P((VRFY_DBINFO *, db_pgno_t)); -int __db_salvage_markdone __P((VRFY_DBINFO *, db_pgno_t)); -int __db_salvage_markneeded __P((VRFY_DBINFO *, db_pgno_t, u_int32_t)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_db_ext_h_ */ diff --git a/bdb/dbinc_auto/dbreg_ext.h b/bdb/dbinc_auto/dbreg_ext.h deleted file mode 100644 index eda26206d86..00000000000 --- a/bdb/dbinc_auto/dbreg_ext.h +++ /dev/null @@ -1,43 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _dbreg_ext_h_ -#define _dbreg_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __dbreg_setup __P((DB *, const char *, u_int32_t)); -int __dbreg_teardown __P((DB *)); -int __dbreg_new_id __P((DB *, DB_TXN *)); -int __dbreg_assign_id __P((DB *, int32_t)); -int __dbreg_revoke_id __P((DB *, int)); -int __dbreg_close_id __P((DB *, DB_TXN *)); -int __dbreg_register_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, const DBT *, const DBT *, int32_t, DBTYPE, db_pgno_t, u_int32_t)); -int __dbreg_register_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __dbreg_register_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __dbreg_register_read __P((DB_ENV *, void *, __dbreg_register_args **)); -int __dbreg_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __dbreg_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __dbreg_init_recover __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __dbreg_register_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __dbreg_add_dbentry __P((DB_ENV *, DB_LOG *, DB *, int32_t)); -void __dbreg_rem_dbentry __P((DB_LOG *, int32_t)); -int __dbreg_open_files __P((DB_ENV *)); -int __dbreg_close_files __P((DB_ENV *)); -int __dbreg_nofiles __P((DB_ENV *)); -int __dbreg_id_to_db __P((DB_ENV *, DB_TXN *, DB **, int32_t, int)); -int __dbreg_id_to_db_int __P((DB_ENV *, DB_TXN *, DB **, int32_t, int, int)); -int __dbreg_id_to_fname __P((DB_LOG *, int32_t, int, FNAME **)); -int __dbreg_fid_to_fname __P((DB_LOG *, u_int8_t *, int, FNAME **)); -int __dbreg_get_name __P((DB_ENV *, u_int8_t *, char **)); -int __dbreg_do_open __P((DB_ENV *, DB_TXN *, DB_LOG *, u_int8_t *, char *, DBTYPE, int32_t, db_pgno_t, void *, u_int32_t)); -int __dbreg_lazy_id __P((DB *)); -int __dbreg_push_id __P((DB_ENV *, int32_t)); -int __dbreg_pop_id __P((DB_ENV *, int32_t *)); -int __dbreg_pluck_id __P((DB_ENV *, int32_t)); -void __dbreg_print_dblist __P((DB_ENV *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_dbreg_ext_h_ */ diff --git a/bdb/dbinc_auto/env_ext.h b/bdb/dbinc_auto/env_ext.h deleted file mode 100644 index 4bd0eee4a83..00000000000 --- a/bdb/dbinc_auto/env_ext.h +++ /dev/null @@ -1,39 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _env_ext_h_ -#define _env_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -void __db_shalloc_init __P((void *, size_t)); -int __db_shalloc_size __P((size_t, size_t)); -int __db_shalloc __P((void *, size_t, size_t, void *)); -void __db_shalloc_free __P((void *, void *)); -size_t __db_shsizeof __P((void *)); -void __db_shalloc_dump __P((void *, FILE *)); -int __db_tablesize __P((u_int32_t)); -void __db_hashinit __P((void *, u_int32_t)); -int __db_fileinit __P((DB_ENV *, DB_FH *, size_t, int)); -int __db_overwrite __P((DB_ENV *, const char *)); -int __db_mi_env __P((DB_ENV *, const char *)); -int __db_mi_open __P((DB_ENV *, const char *, int)); -int __db_env_config __P((DB_ENV *, char *, u_int32_t)); -int __dbenv_open __P((DB_ENV *, const char *, u_int32_t, int)); -int __dbenv_remove __P((DB_ENV *, const char *, u_int32_t)); -int __dbenv_close __P((DB_ENV *, u_int32_t)); -int __db_appname __P((DB_ENV *, APPNAME, const char *, u_int32_t, DB_FH *, char **)); -int __db_home __P((DB_ENV *, const char *, u_int32_t)); -int __db_apprec __P((DB_ENV *, DB_LSN *, u_int32_t)); -int __env_openfiles __P((DB_ENV *, DB_LOGC *, void *, DBT *, DB_LSN *, DB_LSN *, double, int)); -int __db_e_attach __P((DB_ENV *, u_int32_t *)); -int __db_e_detach __P((DB_ENV *, int)); -int __db_e_remove __P((DB_ENV *, u_int32_t)); -int __db_e_stat __P((DB_ENV *, REGENV *, REGION *, int *, u_int32_t)); -int __db_r_attach __P((DB_ENV *, REGINFO *, size_t)); -int __db_r_detach __P((DB_ENV *, REGINFO *, int)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_env_ext_h_ */ diff --git a/bdb/dbinc_auto/ext_185_def.in b/bdb/dbinc_auto/ext_185_def.in deleted file mode 100644 index 8da68a8df9d..00000000000 --- a/bdb/dbinc_auto/ext_185_def.in +++ /dev/null @@ -1,12 +0,0 @@ - -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _DB_EXT_185_DEF_IN_ -#define _DB_EXT_185_DEF_IN_ - -#ifdef _DB185_INT_H_ -#define __db185_open __db185_open@DB_VERSION_UNIQUE_NAME@ -#else -#define __db185_open __db185_open@DB_VERSION_UNIQUE_NAME@ -#endif - -#endif /* !_DB_EXT_185_DEF_IN_ */ diff --git a/bdb/dbinc_auto/ext_185_prot.in b/bdb/dbinc_auto/ext_185_prot.in deleted file mode 100644 index dfd8d3d476e..00000000000 --- a/bdb/dbinc_auto/ext_185_prot.in +++ /dev/null @@ -1,19 +0,0 @@ - -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _DB_EXT_185_PROT_IN_ -#define _DB_EXT_185_PROT_IN_ - -#if defined(__cplusplus) -extern "C" { -#endif - -#ifdef _DB185_INT_H_ -DB185 *__db185_open __P((const char *, int, int, DBTYPE, const void *)); -#else -DB *__db185_open __P((const char *, int, int, DBTYPE, const void *)); -#endif - -#if defined(__cplusplus) -} -#endif -#endif /* !_DB_EXT_185_PROT_IN_ */ diff --git a/bdb/dbinc_auto/ext_def.in b/bdb/dbinc_auto/ext_def.in deleted file mode 100644 index 7bef2465645..00000000000 --- a/bdb/dbinc_auto/ext_def.in +++ /dev/null @@ -1,61 +0,0 @@ - -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _DB_EXT_DEF_IN_ -#define _DB_EXT_DEF_IN_ - -#define db_create db_create@DB_VERSION_UNIQUE_NAME@ -#define db_strerror db_strerror@DB_VERSION_UNIQUE_NAME@ -#define db_env_create db_env_create@DB_VERSION_UNIQUE_NAME@ -#define db_version db_version@DB_VERSION_UNIQUE_NAME@ -#define log_compare log_compare@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_close db_env_set_func_close@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_dirfree db_env_set_func_dirfree@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_dirlist db_env_set_func_dirlist@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_exists db_env_set_func_exists@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_free db_env_set_func_free@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_fsync db_env_set_func_fsync@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_ioinfo db_env_set_func_ioinfo@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_malloc db_env_set_func_malloc@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_map db_env_set_func_map@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_open db_env_set_func_open@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_read db_env_set_func_read@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_realloc db_env_set_func_realloc@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_rename db_env_set_func_rename@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_seek db_env_set_func_seek@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_sleep db_env_set_func_sleep@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_unlink db_env_set_func_unlink@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_unmap db_env_set_func_unmap@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_write db_env_set_func_write@DB_VERSION_UNIQUE_NAME@ -#define db_env_set_func_yield db_env_set_func_yield@DB_VERSION_UNIQUE_NAME@ -#if DB_DBM_HSEARCH != 0 -#define __db_ndbm_clearerr __db_ndbm_clearerr@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_close __db_ndbm_close@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_delete __db_ndbm_delete@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_dirfno __db_ndbm_dirfno@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_error __db_ndbm_error@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_fetch __db_ndbm_fetch@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_firstkey __db_ndbm_firstkey@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_nextkey __db_ndbm_nextkey@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_open __db_ndbm_open@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_pagfno __db_ndbm_pagfno@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_rdonly __db_ndbm_rdonly@DB_VERSION_UNIQUE_NAME@ -#define __db_ndbm_store __db_ndbm_store@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_close __db_dbm_close@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_dbrdonly __db_dbm_dbrdonly@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_delete __db_dbm_delete@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_dirf __db_dbm_dirf@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_fetch __db_dbm_fetch@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_firstkey __db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_init __db_dbm_init@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_nextkey __db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_pagf __db_dbm_pagf@DB_VERSION_UNIQUE_NAME@ -#define __db_dbm_store __db_dbm_store@DB_VERSION_UNIQUE_NAME@ -#endif -#if DB_DBM_HSEARCH != 0 -#define __db_hcreate __db_hcreate@DB_VERSION_UNIQUE_NAME@ -#define __db_hsearch __db_hsearch@DB_VERSION_UNIQUE_NAME@ -#define __db_hdestroy __db_hdestroy@DB_VERSION_UNIQUE_NAME@ -#endif -#define db_xa_switch db_xa_switch@DB_VERSION_UNIQUE_NAME@ - -#endif /* !_DB_EXT_DEF_IN_ */ diff --git a/bdb/dbinc_auto/ext_prot.in b/bdb/dbinc_auto/ext_prot.in deleted file mode 100644 index 42c77a1f763..00000000000 --- a/bdb/dbinc_auto/ext_prot.in +++ /dev/null @@ -1,70 +0,0 @@ - -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _DB_EXT_PROT_IN_ -#define _DB_EXT_PROT_IN_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int db_create __P((DB **, DB_ENV *, u_int32_t)); -char *db_strerror __P((int)); -int db_env_create __P((DB_ENV **, u_int32_t)); -char *db_version __P((int *, int *, int *)); -int log_compare __P((const DB_LSN *, const DB_LSN *)); -int db_env_set_func_close __P((int (*)(int))); -int db_env_set_func_dirfree __P((void (*)(char **, int))); -int db_env_set_func_dirlist __P((int (*)(const char *, char ***, int *))); -int db_env_set_func_exists __P((int (*)(const char *, int *))); -int db_env_set_func_free __P((void (*)(void *))); -int db_env_set_func_fsync __P((int (*)(int))); -int db_env_set_func_ioinfo __P((int (*)(const char *, int, u_int32_t *, u_int32_t *, u_int32_t *))); -int db_env_set_func_malloc __P((void *(*)(size_t))); -int db_env_set_func_map __P((int (*)(char *, size_t, int, int, void **))); -int db_env_set_func_open __P((int (*)(const char *, int, ...))); -int db_env_set_func_read __P((ssize_t (*)(int, void *, size_t))); -int db_env_set_func_realloc __P((void *(*)(void *, size_t))); -int db_env_set_func_rename __P((int (*)(const char *, const char *))); -int db_env_set_func_seek __P((int (*)(int, size_t, db_pgno_t, u_int32_t, int, int))); -int db_env_set_func_sleep __P((int (*)(u_long, u_long))); -int db_env_set_func_unlink __P((int (*)(const char *))); -int db_env_set_func_unmap __P((int (*)(void *, size_t))); -int db_env_set_func_write __P((ssize_t (*)(int, const void *, size_t))); -int db_env_set_func_yield __P((int (*)(void))); -int txn_abort __P((DB_TXN *)); -int txn_begin __P((DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)); -int txn_commit __P((DB_TXN *, u_int32_t)); -#if DB_DBM_HSEARCH != 0 -int __db_ndbm_clearerr __P((DBM *)); -void __db_ndbm_close __P((DBM *)); -int __db_ndbm_delete __P((DBM *, datum)); -int __db_ndbm_dirfno __P((DBM *)); -int __db_ndbm_error __P((DBM *)); -datum __db_ndbm_fetch __P((DBM *, datum)); -datum __db_ndbm_firstkey __P((DBM *)); -datum __db_ndbm_nextkey __P((DBM *)); -DBM *__db_ndbm_open __P((const char *, int, int)); -int __db_ndbm_pagfno __P((DBM *)); -int __db_ndbm_rdonly __P((DBM *)); -int __db_ndbm_store __P((DBM *, datum, datum, int)); -int __db_dbm_close __P((void)); -int __db_dbm_dbrdonly __P((void)); -int __db_dbm_delete __P((datum)); -int __db_dbm_dirf __P((void)); -datum __db_dbm_fetch __P((datum)); -datum __db_dbm_firstkey __P((void)); -int __db_dbm_init __P((char *)); -datum __db_dbm_nextkey __P((datum)); -int __db_dbm_pagf __P((void)); -int __db_dbm_store __P((datum, datum)); -#endif -#if DB_DBM_HSEARCH != 0 -int __db_hcreate __P((size_t)); -ENTRY *__db_hsearch __P((ENTRY, ACTION)); -void __db_hdestroy __P((void)); -#endif - -#if defined(__cplusplus) -} -#endif -#endif /* !_DB_EXT_PROT_IN_ */ diff --git a/bdb/dbinc_auto/fileops_ext.h b/bdb/dbinc_auto/fileops_ext.h deleted file mode 100644 index 66d80e60ad9..00000000000 --- a/bdb/dbinc_auto/fileops_ext.h +++ /dev/null @@ -1,52 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _fileops_ext_h_ -#define _fileops_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __fop_create_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, const DBT *, u_int32_t, u_int32_t)); -int __fop_create_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_create_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_create_read __P((DB_ENV *, void *, __fop_create_args **)); -int __fop_remove_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, const DBT *, const DBT *, u_int32_t)); -int __fop_remove_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_remove_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_remove_read __P((DB_ENV *, void *, __fop_remove_args **)); -int __fop_write_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, const DBT *, u_int32_t, u_int32_t, const DBT *, u_int32_t)); -int __fop_write_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_write_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_write_read __P((DB_ENV *, void *, __fop_write_args **)); -int __fop_rename_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, const DBT *, const DBT *, const DBT *, u_int32_t)); -int __fop_rename_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_rename_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_rename_read __P((DB_ENV *, void *, __fop_rename_args **)); -int __fop_file_remove_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, const DBT *, const DBT *, const DBT *, u_int32_t, u_int32_t)); -int __fop_file_remove_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_file_remove_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_file_remove_read __P((DB_ENV *, void *, __fop_file_remove_args **)); -int __fop_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __fop_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __fop_init_recover __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __fop_create __P((DB_ENV *, DB_TXN *, DB_FH *, const char *, APPNAME, int)); -int __fop_remove __P((DB_ENV *, DB_TXN *, u_int8_t *, const char *, APPNAME)); -int __fop_write __P((DB_ENV *, DB_TXN *, const char *, APPNAME, DB_FH *, u_int32_t, u_int8_t *, u_int32_t, u_int32_t)); -int __fop_rename __P((DB_ENV *, DB_TXN *, const char *, const char *, u_int8_t *, APPNAME)); -int __fop_create_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_remove_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_write_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_rename_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_file_remove_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __fop_lock_handle __P((DB_ENV *, DB *, u_int32_t, db_lockmode_t, DB_LOCK *, u_int32_t)); -int __fop_file_setup __P((DB *, DB_TXN *, const char *, int, u_int32_t, u_int32_t *)); -int __fop_subdb_setup __P((DB *, DB_TXN *, const char *, const char *, int, u_int32_t)); -int __fop_remove_setup __P((DB *, DB_TXN *, const char *, u_int32_t)); -int __fop_read_meta __P((DB_ENV *, const char *, u_int8_t *, size_t, DB_FH *, int, u_int32_t)); -int __fop_dummy __P((DB *, DB_TXN *, const char *, const char *, u_int32_t)); -int __fop_dbrename __P((DB *, const char *, const char *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_fileops_ext_h_ */ diff --git a/bdb/dbinc_auto/hash_ext.h b/bdb/dbinc_auto/hash_ext.h deleted file mode 100644 index 1ee2398706f..00000000000 --- a/bdb/dbinc_auto/hash_ext.h +++ /dev/null @@ -1,125 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _hash_ext_h_ -#define _hash_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __ham_quick_delete __P((DBC *)); -int __ham_c_init __P((DBC *)); -int __ham_c_count __P((DBC *, db_recno_t *)); -int __ham_c_dup __P((DBC *, DBC *)); -u_int32_t __ham_call_hash __P((DBC *, u_int8_t *, int32_t)); -int __ham_init_dbt __P((DB_ENV *, DBT *, u_int32_t, void **, u_int32_t *)); -int __ham_c_update __P((DBC *, u_int32_t, int, int)); -int __ham_get_clist __P((DB *, db_pgno_t, u_int32_t, DBC ***)); -int __ham_insdel_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_pgno_t, u_int32_t, DB_LSN *, const DBT *, const DBT *)); -int __ham_insdel_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_insdel_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_insdel_read __P((DB_ENV *, void *, __ham_insdel_args **)); -int __ham_newpage_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *)); -int __ham_newpage_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_newpage_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_newpage_read __P((DB_ENV *, void *, __ham_newpage_args **)); -int __ham_splitdata_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_pgno_t, const DBT *, DB_LSN *)); -int __ham_splitdata_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_splitdata_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_splitdata_read __P((DB_ENV *, void *, __ham_splitdata_args **)); -int __ham_replace_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, u_int32_t, DB_LSN *, int32_t, const DBT *, const DBT *, u_int32_t)); -int __ham_replace_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_replace_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_replace_read __P((DB_ENV *, void *, __ham_replace_args **)); -int __ham_copypage_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *, const DBT *)); -int __ham_copypage_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_copypage_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_copypage_read __P((DB_ENV *, void *, __ham_copypage_args **)); -int __ham_metagroup_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *, db_pgno_t, DB_LSN *, u_int32_t)); -int __ham_metagroup_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_metagroup_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_metagroup_read __P((DB_ENV *, void *, __ham_metagroup_args **)); -int __ham_groupalloc_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, DB_LSN *, db_pgno_t, u_int32_t, db_pgno_t)); -int __ham_groupalloc_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_groupalloc_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_groupalloc_read __P((DB_ENV *, void *, __ham_groupalloc_args **)); -int __ham_curadj_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_pgno_t, u_int32_t, u_int32_t, u_int32_t, int, int, u_int32_t)); -int __ham_curadj_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_curadj_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_curadj_read __P((DB_ENV *, void *, __ham_curadj_args **)); -int __ham_chgpg_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_ham_mode, db_pgno_t, db_pgno_t, u_int32_t, u_int32_t)); -int __ham_chgpg_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_chgpg_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_chgpg_read __P((DB_ENV *, void *, __ham_chgpg_args **)); -int __ham_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __ham_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __ham_init_recover __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __ham_pgin __P((DB_ENV *, DB *, db_pgno_t, void *, DBT *)); -int __ham_pgout __P((DB_ENV *, DB *, db_pgno_t, void *, DBT *)); -int __ham_mswap __P((void *)); -int __ham_add_dup __P((DBC *, DBT *, u_int32_t, db_pgno_t *)); -int __ham_dup_convert __P((DBC *)); -int __ham_make_dup __P((DB_ENV *, const DBT *, DBT *d, void **, u_int32_t *)); -void __ham_dsearch __P((DBC *, DBT *, u_int32_t *, int *, u_int32_t)); -void __ham_cprint __P((DBC *)); -u_int32_t __ham_func2 __P((DB *, const void *, u_int32_t)); -u_int32_t __ham_func3 __P((DB *, const void *, u_int32_t)); -u_int32_t __ham_func4 __P((DB *, const void *, u_int32_t)); -u_int32_t __ham_func5 __P((DB *, const void *, u_int32_t)); -u_int32_t __ham_test __P((DB *, const void *, u_int32_t)); -int __ham_get_meta __P((DBC *)); -int __ham_release_meta __P((DBC *)); -int __ham_dirty_meta __P((DBC *)); -int __ham_db_create __P((DB *)); -int __ham_db_close __P((DB *)); -int __ham_open __P((DB *, DB_TXN *, const char * name, db_pgno_t, u_int32_t)); -int __ham_metachk __P((DB *, const char *, HMETA *)); -int __ham_new_file __P((DB *, DB_TXN *, DB_FH *, const char *)); -int __ham_new_subdb __P((DB *, DB *, DB_TXN *)); -int __ham_item __P((DBC *, db_lockmode_t, db_pgno_t *)); -int __ham_item_reset __P((DBC *)); -void __ham_item_init __P((DBC *)); -int __ham_item_last __P((DBC *, db_lockmode_t, db_pgno_t *)); -int __ham_item_first __P((DBC *, db_lockmode_t, db_pgno_t *)); -int __ham_item_prev __P((DBC *, db_lockmode_t, db_pgno_t *)); -int __ham_item_next __P((DBC *, db_lockmode_t, db_pgno_t *)); -void __ham_putitem __P((DB *, PAGE *p, const DBT *, int)); -void __ham_reputpair __P((DB *, PAGE *, u_int32_t, const DBT *, const DBT *)); -int __ham_del_pair __P((DBC *, int)); -int __ham_replpair __P((DBC *, DBT *, u_int32_t)); -void __ham_onpage_replace __P((DB *, PAGE *, u_int32_t, int32_t, int32_t, DBT *)); -int __ham_split_page __P((DBC *, u_int32_t, u_int32_t)); -int __ham_add_el __P((DBC *, const DBT *, const DBT *, int)); -void __ham_copy_item __P((DB *, PAGE *, u_int32_t, PAGE *)); -int __ham_add_ovflpage __P((DBC *, PAGE *, int, PAGE **)); -int __ham_get_cpage __P((DBC *, db_lockmode_t)); -int __ham_next_cpage __P((DBC *, db_pgno_t, int)); -int __ham_lock_bucket __P((DBC *, db_lockmode_t)); -void __ham_dpair __P((DB *, PAGE *, u_int32_t)); -int __ham_insdel_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_newpage_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_replace_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_splitdata_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_copypage_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_metagroup_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_groupalloc_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_curadj_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_chgpg_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __ham_reclaim __P((DB *, DB_TXN *txn)); -int __ham_truncate __P((DB *, DB_TXN *txn, u_int32_t *)); -int __ham_stat __P((DB *, void *, u_int32_t)); -int __ham_traverse __P((DBC *, db_lockmode_t, int (*)(DB *, PAGE *, void *, int *), void *, int)); -int __ham_30_hashmeta __P((DB *, char *, u_int8_t *)); -int __ham_30_sizefix __P((DB *, DB_FH *, char *, u_int8_t *)); -int __ham_31_hashmeta __P((DB *, char *, u_int32_t, DB_FH *, PAGE *, int *)); -int __ham_31_hash __P((DB *, char *, u_int32_t, DB_FH *, PAGE *, int *)); -int __ham_vrfy_meta __P((DB *, VRFY_DBINFO *, HMETA *, db_pgno_t, u_int32_t)); -int __ham_vrfy __P((DB *, VRFY_DBINFO *, PAGE *, db_pgno_t, u_int32_t)); -int __ham_vrfy_structure __P((DB *, VRFY_DBINFO *, db_pgno_t, u_int32_t)); -int __ham_vrfy_hashing __P((DB *, u_int32_t, HMETA *, u_int32_t, db_pgno_t, u_int32_t, u_int32_t (*) __P((DB *, const void *, u_int32_t)))); -int __ham_salvage __P((DB *, VRFY_DBINFO *, db_pgno_t, PAGE *, void *, int (*)(void *, const void *), u_int32_t)); -int __ham_meta2pgset __P((DB *, VRFY_DBINFO *, HMETA *, u_int32_t, DB *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_hash_ext_h_ */ diff --git a/bdb/dbinc_auto/hmac_ext.h b/bdb/dbinc_auto/hmac_ext.h deleted file mode 100644 index d161a7291f4..00000000000 --- a/bdb/dbinc_auto/hmac_ext.h +++ /dev/null @@ -1,20 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _hmac_ext_h_ -#define _hmac_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -void __db_chksum __P((u_int8_t *, size_t, u_int8_t *, u_int8_t *)); -void __db_derive_mac __P((u_int8_t *, size_t, u_int8_t *)); -int __db_check_chksum __P((DB_ENV *, DB_CIPHER *, u_int8_t *, void *, size_t, int)); -void __db_SHA1Transform __P((u_int32_t *, unsigned char *)); -void __db_SHA1Init __P((SHA1_CTX *)); -void __db_SHA1Update __P((SHA1_CTX *, unsigned char *, size_t)); -void __db_SHA1Final __P((unsigned char *, SHA1_CTX *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_hmac_ext_h_ */ diff --git a/bdb/dbinc_auto/lock_ext.h b/bdb/dbinc_auto/lock_ext.h deleted file mode 100644 index be6b1d06d1e..00000000000 --- a/bdb/dbinc_auto/lock_ext.h +++ /dev/null @@ -1,41 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _lock_ext_h_ -#define _lock_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __lock_id __P((DB_ENV *, u_int32_t *)); -int __lock_id_free __P((DB_ENV *, u_int32_t)); -int __lock_vec __P((DB_ENV *, u_int32_t, u_int32_t, DB_LOCKREQ *, int, DB_LOCKREQ **)); -int __lock_get __P((DB_ENV *, u_int32_t, u_int32_t, const DBT *, db_lockmode_t, DB_LOCK *)); -int __lock_put __P((DB_ENV *, DB_LOCK *)); -int __lock_downgrade __P((DB_ENV *, DB_LOCK *, db_lockmode_t, u_int32_t)); -int __lock_addfamilylocker __P((DB_ENV *, u_int32_t, u_int32_t)); -int __lock_freefamilylocker __P((DB_LOCKTAB *, u_int32_t)); -int __lock_set_timeout __P(( DB_ENV *, u_int32_t, db_timeout_t, u_int32_t)); -int __lock_inherit_timeout __P(( DB_ENV *, u_int32_t, u_int32_t)); -int __lock_getlocker __P((DB_LOCKTAB *, u_int32_t, u_int32_t, int, DB_LOCKER **)); -int __lock_promote __P((DB_LOCKTAB *, DB_LOCKOBJ *, u_int32_t)); -int __lock_expired __P((DB_ENV *, db_timeval_t *, db_timeval_t *)); -int __lock_detect __P((DB_ENV *, u_int32_t, u_int32_t, int *)); -void __lock_dbenv_create __P((DB_ENV *)); -void __lock_dbenv_close __P((DB_ENV *)); -int __lock_open __P((DB_ENV *)); -int __lock_dbenv_refresh __P((DB_ENV *)); -void __lock_region_destroy __P((DB_ENV *, REGINFO *)); -int __lock_id_set __P((DB_ENV *, u_int32_t, u_int32_t)); -int __lock_stat __P((DB_ENV *, DB_LOCK_STAT **, u_int32_t)); -int __lock_dump_region __P((DB_ENV *, char *, FILE *)); -void __lock_printlock __P((DB_LOCKTAB *, struct __db_lock *, int)); -int __lock_cmp __P((const DBT *, DB_LOCKOBJ *)); -int __lock_locker_cmp __P((u_int32_t, DB_LOCKER *)); -u_int32_t __lock_ohash __P((const DBT *)); -u_int32_t __lock_lhash __P((DB_LOCKOBJ *)); -u_int32_t __lock_locker_hash __P((u_int32_t)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_lock_ext_h_ */ diff --git a/bdb/dbinc_auto/log_ext.h b/bdb/dbinc_auto/log_ext.h deleted file mode 100644 index 6fc69afd2b4..00000000000 --- a/bdb/dbinc_auto/log_ext.h +++ /dev/null @@ -1,32 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _log_ext_h_ -#define _log_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __log_open __P((DB_ENV *)); -int __log_find __P((DB_LOG *, int, u_int32_t *, logfile_validity *)); -int __log_valid __P((DB_LOG *, u_int32_t, int, logfile_validity *)); -int __log_dbenv_refresh __P((DB_ENV *)); -int __log_stat __P((DB_ENV *, DB_LOG_STAT **, u_int32_t)); -void __log_get_cached_ckp_lsn __P((DB_ENV *, DB_LSN *)); -void __log_region_destroy __P((DB_ENV *, REGINFO *)); -int __log_vtruncate __P((DB_ENV *, DB_LSN *, DB_LSN *)); -int __log_is_outdated __P((DB_ENV *dbenv, u_int32_t fnum, int *outdatedp)); -int __log_archive __P((DB_ENV *, char **[], u_int32_t)); -int __log_cursor __P((DB_ENV *, DB_LOGC **, u_int32_t)); -void __log_dbenv_create __P((DB_ENV *)); -int __log_put __P((DB_ENV *, DB_LSN *, const DBT *, u_int32_t)); -void __log_txn_lsn __P((DB_ENV *, DB_LSN *, u_int32_t *, u_int32_t *)); -int __log_newfile __P((DB_LOG *, DB_LSN *)); -int __log_flush __P((DB_ENV *, const DB_LSN *)); -int __log_file __P((DB_ENV *, const DB_LSN *, char *, size_t)); -int __log_name __P((DB_LOG *, u_int32_t, char **, DB_FH *, u_int32_t)); -int __log_rep_put __P((DB_ENV *, DB_LSN *, const DBT *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_log_ext_h_ */ diff --git a/bdb/dbinc_auto/mp_ext.h b/bdb/dbinc_auto/mp_ext.h deleted file mode 100644 index ceadb3d9adc..00000000000 --- a/bdb/dbinc_auto/mp_ext.h +++ /dev/null @@ -1,44 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _mp_ext_h_ -#define _mp_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __memp_alloc __P((DB_MPOOL *, REGINFO *, MPOOLFILE *, size_t, roff_t *, void *)); -#ifdef DIAGNOSTIC -void __memp_check_order __P((DB_MPOOL_HASH *)); -#endif -int __memp_bhwrite __P((DB_MPOOL *, DB_MPOOL_HASH *, MPOOLFILE *, BH *, int)); -int __memp_pgread __P((DB_MPOOLFILE *, DB_MUTEX *, BH *, int)); -int __memp_pg __P((DB_MPOOLFILE *, BH *, int)); -void __memp_bhfree __P((DB_MPOOL *, DB_MPOOL_HASH *, BH *, int)); -int __memp_fget __P((DB_MPOOLFILE *, db_pgno_t *, u_int32_t, void *)); -int __memp_fcreate __P((DB_ENV *, DB_MPOOLFILE **, u_int32_t)); -int __memp_fopen_int __P((DB_MPOOLFILE *, MPOOLFILE *, const char *, u_int32_t, int, size_t)); -int __memp_fclose_int __P((DB_MPOOLFILE *, u_int32_t)); -int __memp_mf_discard __P((DB_MPOOL *, MPOOLFILE *)); -char * __memp_fn __P((DB_MPOOLFILE *)); -char * __memp_fns __P((DB_MPOOL *, MPOOLFILE *)); -int __memp_fput __P((DB_MPOOLFILE *, void *, u_int32_t)); -int __memp_fset __P((DB_MPOOLFILE *, void *, u_int32_t)); -void __memp_dbenv_create __P((DB_ENV *)); -int __memp_open __P((DB_ENV *)); -int __memp_dbenv_refresh __P((DB_ENV *)); -void __mpool_region_destroy __P((DB_ENV *, REGINFO *)); -int __memp_nameop __P((DB_ENV *, u_int8_t *, const char *, const char *, const char *)); -int __memp_register __P((DB_ENV *, int, int (*)(DB_ENV *, db_pgno_t, void *, DBT *), int (*)(DB_ENV *, db_pgno_t, void *, DBT *))); -int __memp_stat __P((DB_ENV *, DB_MPOOL_STAT **, DB_MPOOL_FSTAT ***, u_int32_t)); -int __memp_dump_region __P((DB_ENV *, char *, FILE *)); -void __memp_stat_hash __P((REGINFO *, MPOOL *, u_int32_t *)); -int __memp_sync __P((DB_ENV *, DB_LSN *)); -int __memp_fsync __P((DB_MPOOLFILE *)); -int __mp_xxx_fh __P((DB_MPOOLFILE *, DB_FH **)); -int __memp_sync_int __P((DB_ENV *, DB_MPOOLFILE *, int, db_sync_op, int *)); -int __memp_trickle __P((DB_ENV *, int, int *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_mp_ext_h_ */ diff --git a/bdb/dbinc_auto/mutex_ext.h b/bdb/dbinc_auto/mutex_ext.h deleted file mode 100644 index a40f04d5578..00000000000 --- a/bdb/dbinc_auto/mutex_ext.h +++ /dev/null @@ -1,35 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _mutex_ext_h_ -#define _mutex_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __db_fcntl_mutex_init __P((DB_ENV *, DB_MUTEX *, u_int32_t)); -int __db_fcntl_mutex_lock __P((DB_ENV *, DB_MUTEX *)); -int __db_fcntl_mutex_unlock __P((DB_ENV *, DB_MUTEX *)); -int __db_fcntl_mutex_destroy __P((DB_MUTEX *)); -int __db_pthread_mutex_init __P((DB_ENV *, DB_MUTEX *, u_int32_t)); -int __db_pthread_mutex_lock __P((DB_ENV *, DB_MUTEX *)); -int __db_pthread_mutex_unlock __P((DB_ENV *, DB_MUTEX *)); -int __db_pthread_mutex_destroy __P((DB_MUTEX *)); -int __db_tas_mutex_init __P((DB_ENV *, DB_MUTEX *, u_int32_t)); -int __db_tas_mutex_lock __P((DB_ENV *, DB_MUTEX *)); -int __db_tas_mutex_unlock __P((DB_ENV *, DB_MUTEX *)); -int __db_tas_mutex_destroy __P((DB_MUTEX *)); -int __db_win32_mutex_init __P((DB_ENV *, DB_MUTEX *, u_int32_t)); -int __db_win32_mutex_lock __P((DB_ENV *, DB_MUTEX *)); -int __db_win32_mutex_unlock __P((DB_ENV *, DB_MUTEX *)); -int __db_win32_mutex_destroy __P((DB_MUTEX *)); -int __db_mutex_setup __P((DB_ENV *, REGINFO *, void *, u_int32_t)); -void __db_mutex_free __P((DB_ENV *, REGINFO *, DB_MUTEX *)); -void __db_shreg_locks_clear __P((DB_MUTEX *, REGINFO *, REGMAINT *)); -void __db_shreg_locks_destroy __P((REGINFO *, REGMAINT *)); -int __db_shreg_mutex_init __P((DB_ENV *, DB_MUTEX *, u_int32_t, u_int32_t, REGINFO *, REGMAINT *)); -void __db_shreg_maintinit __P((REGINFO *, void *addr, size_t)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_mutex_ext_h_ */ diff --git a/bdb/dbinc_auto/os_ext.h b/bdb/dbinc_auto/os_ext.h deleted file mode 100644 index 0a2e5ab2054..00000000000 --- a/bdb/dbinc_auto/os_ext.h +++ /dev/null @@ -1,74 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _os_ext_h_ -#define _os_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __os_abspath __P((const char *)); -int __os_umalloc __P((DB_ENV *, size_t, void *)); -int __os_urealloc __P((DB_ENV *, size_t, void *)); -int __os_ufree __P((DB_ENV *, void *)); -int __os_strdup __P((DB_ENV *, const char *, void *)); -int __os_calloc __P((DB_ENV *, size_t, size_t, void *)); -int __os_malloc __P((DB_ENV *, size_t, void *)); -int __os_realloc __P((DB_ENV *, size_t, void *)); -void __os_free __P((DB_ENV *, void *)); -void *__ua_memcpy __P((void *, const void *, size_t)); -int __os_clock __P((DB_ENV *, u_int32_t *, u_int32_t *)); -int __os_fs_notzero __P((void)); -int __os_dirlist __P((DB_ENV *, const char *, char ***, int *)); -void __os_dirfree __P((DB_ENV *, char **, int)); -int __os_get_errno_ret_zero __P((void)); -int __os_get_errno __P((void)); -void __os_set_errno __P((int)); -int __os_fileid __P((DB_ENV *, const char *, int, u_int8_t *)); -int __os_fsync __P((DB_ENV *, DB_FH *)); -int __os_openhandle __P((DB_ENV *, const char *, int, int, DB_FH *)); -int __os_closehandle __P((DB_ENV *, DB_FH *)); -void __os_id __P((u_int32_t *)); -int __os_r_sysattach __P((DB_ENV *, REGINFO *, REGION *)); -int __os_r_sysdetach __P((DB_ENV *, REGINFO *, int)); -int __os_mapfile __P((DB_ENV *, char *, DB_FH *, size_t, int, void **)); -int __os_unmapfile __P((DB_ENV *, void *, size_t)); -u_int32_t __db_oflags __P((int)); -int __db_omode __P((const char *)); -int __os_open __P((DB_ENV *, const char *, u_int32_t, int, DB_FH *)); -#ifdef HAVE_QNX -int __os_shmname __P((DB_ENV *, const char *, char **)); -#endif -int __os_r_attach __P((DB_ENV *, REGINFO *, REGION *)); -int __os_r_detach __P((DB_ENV *, REGINFO *, int)); -int __os_rename __P((DB_ENV *, const char *, const char *, u_int32_t)); -int __os_isroot __P((void)); -char *__db_rpath __P((const char *)); -int __os_io __P((DB_ENV *, DB_IO *, int, size_t *)); -int __os_read __P((DB_ENV *, DB_FH *, void *, size_t, size_t *)); -int __os_write __P((DB_ENV *, DB_FH *, void *, size_t, size_t *)); -int __os_seek __P((DB_ENV *, DB_FH *, size_t, db_pgno_t, u_int32_t, int, DB_OS_SEEK)); -int __os_sleep __P((DB_ENV *, u_long, u_long)); -int __os_spin __P((DB_ENV *)); -void __os_yield __P((DB_ENV*, u_long)); -int __os_exists __P((const char *, int *)); -int __os_ioinfo __P((DB_ENV *, const char *, DB_FH *, u_int32_t *, u_int32_t *, u_int32_t *)); -int __os_tmpdir __P((DB_ENV *, u_int32_t)); -int __os_region_unlink __P((DB_ENV *, const char *)); -int __os_unlink __P((DB_ENV *, const char *)); -#if defined(DB_WIN32) -int __os_win32_errno __P((void)); -#endif -int __os_fsync __P((DB_ENV *, DB_FH *)); -int __os_openhandle __P((DB_ENV *, const char *, int, int, DB_FH *)); -int __os_closehandle __P((DB_ENV *, DB_FH *)); -int __os_io __P((DB_ENV *, DB_IO *, int, size_t *)); -int __os_read __P((DB_ENV *, DB_FH *, void *, size_t, size_t *)); -int __os_write __P((DB_ENV *, DB_FH *, void *, size_t, size_t *)); -int __os_exists __P((const char *, int *)); -int __os_ioinfo __P((DB_ENV *, const char *, DB_FH *, u_int32_t *, u_int32_t *, u_int32_t *)); -int __os_is_winnt __P((void)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_os_ext_h_ */ diff --git a/bdb/dbinc_auto/qam_ext.h b/bdb/dbinc_auto/qam_ext.h deleted file mode 100644 index 16dbea79e4c..00000000000 --- a/bdb/dbinc_auto/qam_ext.h +++ /dev/null @@ -1,70 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _qam_ext_h_ -#define _qam_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __qam_position __P((DBC *, db_recno_t *, qam_position_mode, int *)); -int __qam_pitem __P((DBC *, QPAGE *, u_int32_t, db_recno_t, DBT *)); -int __qam_append __P((DBC *, DBT *, DBT *)); -int __qam_c_dup __P((DBC *, DBC *)); -int __qam_c_init __P((DBC *)); -int __qam_truncate __P((DB *, DB_TXN *, u_int32_t *)); -int __qam_incfirst_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, db_recno_t, db_pgno_t)); -int __qam_incfirst_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_incfirst_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_incfirst_read __P((DB_ENV *, void *, __qam_incfirst_args **)); -int __qam_mvptr_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_recno_t, db_recno_t, db_recno_t, db_recno_t, DB_LSN *, db_pgno_t)); -int __qam_mvptr_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_mvptr_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_mvptr_read __P((DB_ENV *, void *, __qam_mvptr_args **)); -int __qam_del_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, DB_LSN *, db_pgno_t, u_int32_t, db_recno_t)); -int __qam_del_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_del_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_del_read __P((DB_ENV *, void *, __qam_del_args **)); -int __qam_add_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, DB_LSN *, db_pgno_t, u_int32_t, db_recno_t, const DBT *, u_int32_t, const DBT *)); -int __qam_add_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_add_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_add_read __P((DB_ENV *, void *, __qam_add_args **)); -int __qam_delext_log __P((DB *, DB_TXN *, DB_LSN *, u_int32_t, DB_LSN *, db_pgno_t, u_int32_t, db_recno_t, const DBT *)); -int __qam_delext_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_delext_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_delext_read __P((DB_ENV *, void *, __qam_delext_args **)); -int __qam_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __qam_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __qam_init_recover __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __qam_mswap __P((PAGE *)); -int __qam_pgin_out __P((DB_ENV *, db_pgno_t, void *, DBT *)); -int __qam_fprobe __P((DB *, db_pgno_t, void *, qam_probe_mode, u_int32_t)); -int __qam_fclose __P((DB *, db_pgno_t)); -int __qam_fremove __P((DB *, db_pgno_t)); -int __qam_sync __P((DB *, u_int32_t)); -int __qam_gen_filelist __P(( DB *, QUEUE_FILELIST **)); -int __qam_extent_names __P((DB_ENV *, char *, char ***)); -void __qam_exid __P((DB *, u_int8_t *, u_int32_t)); -int __qam_db_create __P((DB *)); -int __qam_db_close __P((DB *)); -int __db_prqueue __P((DB *, FILE *, u_int32_t)); -int __qam_remove __P((DB *, DB_TXN *, const char *, const char *, DB_LSN *)); -int __qam_rename __P((DB *, DB_TXN *, const char *, const char *, const char *)); -int __qam_open __P((DB *, DB_TXN *, const char *, db_pgno_t, int, u_int32_t)); -int __qam_metachk __P((DB *, const char *, QMETA *)); -int __qam_new_file __P((DB *, DB_TXN *, DB_FH *, const char *)); -int __qam_incfirst_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_mvptr_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_del_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_delext_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_add_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __qam_stat __P((DB *, void *, u_int32_t)); -int __qam_31_qammeta __P((DB *, char *, u_int8_t *)); -int __qam_32_qammeta __P((DB *, char *, u_int8_t *)); -int __qam_vrfy_meta __P((DB *, VRFY_DBINFO *, QMETA *, db_pgno_t, u_int32_t)); -int __qam_vrfy_data __P((DB *, VRFY_DBINFO *, QPAGE *, db_pgno_t, u_int32_t)); -int __qam_vrfy_structure __P((DB *, VRFY_DBINFO *, u_int32_t)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_qam_ext_h_ */ diff --git a/bdb/dbinc_auto/rep_ext.h b/bdb/dbinc_auto/rep_ext.h deleted file mode 100644 index 22e2d254fe8..00000000000 --- a/bdb/dbinc_auto/rep_ext.h +++ /dev/null @@ -1,30 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _rep_ext_h_ -#define _rep_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __rep_dbenv_create __P((DB_ENV *)); -int __rep_process_message __P((DB_ENV *, DBT *, DBT *, int *)); -int __rep_process_txn __P((DB_ENV *, DBT *)); -int __rep_region_init __P((DB_ENV *)); -int __rep_region_destroy __P((DB_ENV *)); -int __rep_dbenv_close __P((DB_ENV *)); -int __rep_preclose __P((DB_ENV *, int)); -int __rep_check_alloc __P((DB_ENV *, TXN_RECS *, int)); -int __rep_send_message __P((DB_ENV *, int, u_int32_t, DB_LSN *, const DBT *, u_int32_t)); -int __rep_new_master __P((DB_ENV *, REP_CONTROL *, int)); -int __rep_lockpgno_init __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __rep_unlockpages __P((DB_ENV *, u_int32_t)); -int __rep_lockpages __P((DB_ENV *, int (**)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t, DB_LSN *, DB_LSN *, TXN_RECS *, u_int32_t)); -int __rep_is_client __P((DB_ENV *)); -int __rep_send_vote __P((DB_ENV *, DB_LSN *, int, int, int)); -int __rep_grow_sites __P((DB_ENV *dbenv, int nsites)); -void __rep_print_message __P((DB_ENV *, int, REP_CONTROL *, char *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_rep_ext_h_ */ diff --git a/bdb/dbinc_auto/rpc_client_ext.h b/bdb/dbinc_auto/rpc_client_ext.h deleted file mode 100644 index 9634b34abef..00000000000 --- a/bdb/dbinc_auto/rpc_client_ext.h +++ /dev/null @@ -1,167 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _rpc_client_ext_h_ -#define _rpc_client_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __dbcl_envrpcserver __P((DB_ENV *, void *, const char *, long, long, u_int32_t)); -int __dbcl_env_open_wrap __P((DB_ENV *, const char *, u_int32_t, int)); -int __dbcl_db_open_wrap __P((DB *, DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int)); -int __dbcl_refresh __P((DB_ENV *)); -int __dbcl_retcopy __P((DB_ENV *, DBT *, void *, u_int32_t, void **, u_int32_t *)); -void __dbcl_txn_end __P((DB_TXN *)); -void __dbcl_txn_setup __P((DB_ENV *, DB_TXN *, DB_TXN *, u_int32_t)); -void __dbcl_c_refresh __P((DBC *)); -int __dbcl_c_setup __P((long, DB *, DBC **)); -int __dbcl_dbclose_common __P((DB *)); -int __dbcl_env_alloc __P((DB_ENV *, void *(*)(size_t), void *(*)(void *, size_t), void (*)(void *))); -int __dbcl_set_app_dispatch __P((DB_ENV *, int (*)(DB_ENV *, DBT *, DB_LSN *, db_recops))); -int __dbcl_env_cachesize __P((DB_ENV *, u_int32_t, u_int32_t, int)); -int __dbcl_env_close __P((DB_ENV *, u_int32_t)); -int __dbcl_env_create __P((DB_ENV *, long)); -int __dbcl_set_data_dir __P((DB_ENV *, const char *)); -int __dbcl_env_dbremove __P((DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)); -int __dbcl_env_dbrename __P((DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)); -int __dbcl_env_encrypt __P((DB_ENV *, const char *, u_int32_t)); -int __dbcl_env_set_feedback __P((DB_ENV *, void (*)(DB_ENV *, int, int))); -int __dbcl_env_flags __P((DB_ENV *, u_int32_t, int)); -int __dbcl_set_lg_bsize __P((DB_ENV *, u_int32_t)); -int __dbcl_set_lg_dir __P((DB_ENV *, const char *)); -int __dbcl_set_lg_max __P((DB_ENV *, u_int32_t)); -int __dbcl_set_lg_regionmax __P((DB_ENV *, u_int32_t)); -int __dbcl_set_lk_conflict __P((DB_ENV *, u_int8_t *, int)); -int __dbcl_set_lk_detect __P((DB_ENV *, u_int32_t)); -int __dbcl_set_lk_max __P((DB_ENV *, u_int32_t)); -int __dbcl_set_lk_max_locks __P((DB_ENV *, u_int32_t)); -int __dbcl_set_lk_max_lockers __P((DB_ENV *, u_int32_t)); -int __dbcl_set_lk_max_objects __P((DB_ENV *, u_int32_t)); -int __dbcl_set_mp_mmapsize __P((DB_ENV *, size_t)); -int __dbcl_env_open __P((DB_ENV *, const char *, u_int32_t, int)); -int __dbcl_env_paniccall __P((DB_ENV *, void (*)(DB_ENV *, int))); -int __dbcl_env_remove __P((DB_ENV *, const char *, u_int32_t)); -int __dbcl_set_shm_key __P((DB_ENV *, long)); -int __dbcl_set_tas_spins __P((DB_ENV *, u_int32_t)); -int __dbcl_set_timeout __P((DB_ENV *, u_int32_t, u_int32_t)); -int __dbcl_set_tmp_dir __P((DB_ENV *, const char *)); -int __dbcl_set_tx_max __P((DB_ENV *, u_int32_t)); -int __dbcl_set_tx_timestamp __P((DB_ENV *, time_t *)); -int __dbcl_set_verbose __P((DB_ENV *, u_int32_t, int)); -int __dbcl_txn_abort __P((DB_TXN *)); -int __dbcl_txn_begin __P((DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)); -int __dbcl_txn_checkpoint __P((DB_ENV *, u_int32_t, u_int32_t, u_int32_t)); -int __dbcl_txn_commit __P((DB_TXN *, u_int32_t)); -int __dbcl_txn_discard __P((DB_TXN *, u_int32_t)); -int __dbcl_txn_prepare __P((DB_TXN *, u_int8_t *)); -int __dbcl_txn_recover __P((DB_ENV *, DB_PREPLIST *, long, long *, u_int32_t)); -int __dbcl_txn_stat __P((DB_ENV *, DB_TXN_STAT **, u_int32_t)); -int __dbcl_txn_timeout __P((DB_TXN *, u_int32_t, u_int32_t)); -int __dbcl_rep_elect __P((DB_ENV *, int, int, u_int32_t, int *)); -int __dbcl_rep_flush __P((DB_ENV *)); -int __dbcl_rep_process_message __P((DB_ENV *, DBT *, DBT *, int *)); -int __dbcl_rep_set_limit __P((DB_ENV *, u_int32_t, u_int32_t)); -int __dbcl_rep_set_request __P((DB_ENV *, u_int32_t, u_int32_t)); -int __dbcl_rep_set_rep_transport __P((DB_ENV *, int, int (*)(DB_ENV *, const DBT *, const DBT *, int, u_int32_t))); -int __dbcl_rep_start __P((DB_ENV *, DBT *, u_int32_t)); -int __dbcl_rep_stat __P((DB_ENV *, DB_REP_STAT **, u_int32_t)); -int __dbcl_db_alloc __P((DB *, void *(*)(size_t), void *(*)(void *, size_t), void (*)(void *))); -int __dbcl_db_associate __P((DB *, DB_TXN *, DB *, int (*)(DB *, const DBT *, const DBT *, DBT *), u_int32_t)); -int __dbcl_db_bt_compare __P((DB *, int (*)(DB *, const DBT *, const DBT *))); -int __dbcl_db_bt_maxkey __P((DB *, u_int32_t)); -int __dbcl_db_bt_minkey __P((DB *, u_int32_t)); -int __dbcl_db_bt_prefix __P((DB *, size_t(*)(DB *, const DBT *, const DBT *))); -int __dbcl_db_set_append_recno __P((DB *, int (*)(DB *, DBT *, db_recno_t))); -int __dbcl_db_cache_priority __P((DB *, DB_CACHE_PRIORITY)); -int __dbcl_db_cachesize __P((DB *, u_int32_t, u_int32_t, int)); -int __dbcl_db_close __P((DB *, u_int32_t)); -int __dbcl_db_create __P((DB *, DB_ENV *, u_int32_t)); -int __dbcl_db_del __P((DB *, DB_TXN *, DBT *, u_int32_t)); -int __dbcl_db_dup_compare __P((DB *, int (*)(DB *, const DBT *, const DBT *))); -int __dbcl_db_encrypt __P((DB *, const char *, u_int32_t)); -int __dbcl_db_extentsize __P((DB *, u_int32_t)); -int __dbcl_db_fd __P((DB *, int *)); -int __dbcl_db_feedback __P((DB *, void (*)(DB *, int, int))); -int __dbcl_db_flags __P((DB *, u_int32_t)); -int __dbcl_db_get __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); -int __dbcl_db_h_ffactor __P((DB *, u_int32_t)); -int __dbcl_db_h_hash __P((DB *, u_int32_t(*)(DB *, const void *, u_int32_t))); -int __dbcl_db_h_nelem __P((DB *, u_int32_t)); -int __dbcl_db_key_range __P((DB *, DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t)); -int __dbcl_db_lorder __P((DB *, int)); -int __dbcl_db_open __P((DB *, DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int)); -int __dbcl_db_pagesize __P((DB *, u_int32_t)); -int __dbcl_db_panic __P((DB *, void (*)(DB_ENV *, int))); -int __dbcl_db_pget __P((DB *, DB_TXN *, DBT *, DBT *, DBT *, u_int32_t)); -int __dbcl_db_put __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t)); -int __dbcl_db_re_delim __P((DB *, int)); -int __dbcl_db_re_len __P((DB *, u_int32_t)); -int __dbcl_db_re_pad __P((DB *, int)); -int __dbcl_db_re_source __P((DB *, const char *)); -int __dbcl_db_remove __P((DB *, const char *, const char *, u_int32_t)); -int __dbcl_db_rename __P((DB *, const char *, const char *, const char *, u_int32_t)); -int __dbcl_db_stat __P((DB *, void *, u_int32_t)); -int __dbcl_db_sync __P((DB *, u_int32_t)); -int __dbcl_db_truncate __P((DB *, DB_TXN *, u_int32_t *, u_int32_t)); -int __dbcl_db_upgrade __P((DB *, const char *, u_int32_t)); -int __dbcl_db_verify __P((DB *, const char *, const char *, FILE *, u_int32_t)); -int __dbcl_db_cursor __P((DB *, DB_TXN *, DBC **, u_int32_t)); -int __dbcl_db_join __P((DB *, DBC **, DBC **, u_int32_t)); -int __dbcl_dbc_close __P((DBC *)); -int __dbcl_dbc_count __P((DBC *, db_recno_t *, u_int32_t)); -int __dbcl_dbc_del __P((DBC *, u_int32_t)); -int __dbcl_dbc_dup __P((DBC *, DBC **, u_int32_t)); -int __dbcl_dbc_get __P((DBC *, DBT *, DBT *, u_int32_t)); -int __dbcl_dbc_pget __P((DBC *, DBT *, DBT *, DBT *, u_int32_t)); -int __dbcl_dbc_put __P((DBC *, DBT *, DBT *, u_int32_t)); -int __dbcl_lock_detect __P((DB_ENV *, u_int32_t, u_int32_t, int *)); -int __dbcl_lock_get __P((DB_ENV *, u_int32_t, u_int32_t, const DBT *, db_lockmode_t, DB_LOCK *)); -int __dbcl_lock_id __P((DB_ENV *, u_int32_t *)); -int __dbcl_lock_id_free __P((DB_ENV *, u_int32_t)); -int __dbcl_lock_put __P((DB_ENV *, DB_LOCK *)); -int __dbcl_lock_stat __P((DB_ENV *, DB_LOCK_STAT **, u_int32_t)); -int __dbcl_lock_vec __P((DB_ENV *, u_int32_t, u_int32_t, DB_LOCKREQ *, int, DB_LOCKREQ **)); -int __dbcl_log_archive __P((DB_ENV *, char ***, u_int32_t)); -int __dbcl_log_cursor __P((DB_ENV *, DB_LOGC **, u_int32_t)); -int __dbcl_log_file __P((DB_ENV *, const DB_LSN *, char *, size_t)); -int __dbcl_log_flush __P((DB_ENV *, const DB_LSN *)); -int __dbcl_log_put __P((DB_ENV *, DB_LSN *, const DBT *, u_int32_t)); -int __dbcl_log_stat __P((DB_ENV *, DB_LOG_STAT **, u_int32_t)); -int __dbcl_memp_fcreate __P((DB_ENV *, DB_MPOOLFILE **, u_int32_t)); -int __dbcl_memp_register __P((DB_ENV *, int, int (*)(DB_ENV *, db_pgno_t, void *, DBT *), int (*)(DB_ENV *, db_pgno_t, void *, DBT *))); -int __dbcl_memp_stat __P((DB_ENV *, DB_MPOOL_STAT **, DB_MPOOL_FSTAT ***, u_int32_t)); -int __dbcl_memp_sync __P((DB_ENV *, DB_LSN *)); -int __dbcl_memp_trickle __P((DB_ENV *, int, int *)); -int __dbcl_env_close_ret __P((DB_ENV *, u_int32_t, __env_close_reply *)); -int __dbcl_env_create_ret __P((DB_ENV *, long, __env_create_reply *)); -int __dbcl_env_open_ret __P((DB_ENV *, const char *, u_int32_t, int, __env_open_reply *)); -int __dbcl_env_remove_ret __P((DB_ENV *, const char *, u_int32_t, __env_remove_reply *)); -int __dbcl_txn_abort_ret __P((DB_TXN *, __txn_abort_reply *)); -int __dbcl_txn_begin_ret __P((DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t, __txn_begin_reply *)); -int __dbcl_txn_commit_ret __P((DB_TXN *, u_int32_t, __txn_commit_reply *)); -int __dbcl_txn_discard_ret __P((DB_TXN *, u_int32_t, __txn_discard_reply *)); -int __dbcl_txn_recover_ret __P((DB_ENV *, DB_PREPLIST *, long, long *, u_int32_t, __txn_recover_reply *)); -int __dbcl_db_close_ret __P((DB *, u_int32_t, __db_close_reply *)); -int __dbcl_db_create_ret __P((DB *, DB_ENV *, u_int32_t, __db_create_reply *)); -int __dbcl_db_get_ret __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t, __db_get_reply *)); -int __dbcl_db_key_range_ret __P((DB *, DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t, __db_key_range_reply *)); -int __dbcl_db_open_ret __P((DB *, DB_TXN *, const char *, const char *, DBTYPE, u_int32_t, int, __db_open_reply *)); -int __dbcl_db_pget_ret __P((DB *, DB_TXN *, DBT *, DBT *, DBT *, u_int32_t, __db_pget_reply *)); -int __dbcl_db_put_ret __P((DB *, DB_TXN *, DBT *, DBT *, u_int32_t, __db_put_reply *)); -int __dbcl_db_remove_ret __P((DB *, const char *, const char *, u_int32_t, __db_remove_reply *)); -int __dbcl_db_rename_ret __P((DB *, const char *, const char *, const char *, u_int32_t, __db_rename_reply *)); -int __dbcl_db_stat_ret __P((DB *, void *, u_int32_t, __db_stat_reply *)); -int __dbcl_db_truncate_ret __P((DB *, DB_TXN *, u_int32_t *, u_int32_t, __db_truncate_reply *)); -int __dbcl_db_cursor_ret __P((DB *, DB_TXN *, DBC **, u_int32_t, __db_cursor_reply *)); -int __dbcl_db_join_ret __P((DB *, DBC **, DBC **, u_int32_t, __db_join_reply *)); -int __dbcl_dbc_close_ret __P((DBC *, __dbc_close_reply *)); -int __dbcl_dbc_count_ret __P((DBC *, db_recno_t *, u_int32_t, __dbc_count_reply *)); -int __dbcl_dbc_dup_ret __P((DBC *, DBC **, u_int32_t, __dbc_dup_reply *)); -int __dbcl_dbc_get_ret __P((DBC *, DBT *, DBT *, u_int32_t, __dbc_get_reply *)); -int __dbcl_dbc_pget_ret __P((DBC *, DBT *, DBT *, DBT *, u_int32_t, __dbc_pget_reply *)); -int __dbcl_dbc_put_ret __P((DBC *, DBT *, DBT *, u_int32_t, __dbc_put_reply *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_rpc_client_ext_h_ */ diff --git a/bdb/dbinc_auto/rpc_server_ext.h b/bdb/dbinc_auto/rpc_server_ext.h deleted file mode 100644 index c0c706881c7..00000000000 --- a/bdb/dbinc_auto/rpc_server_ext.h +++ /dev/null @@ -1,126 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _rpc_server_ext_h_ -#define _rpc_server_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -void __env_cachesize_proc __P((long, u_int32_t, u_int32_t, u_int32_t, __env_cachesize_reply *)); -void __env_close_proc __P((long, u_int32_t, __env_close_reply *)); -void __env_create_proc __P((u_int32_t, __env_create_reply *)); -void __env_dbremove_proc __P((long, long, char *, char *, u_int32_t, __env_dbremove_reply *)); -void __env_dbrename_proc __P((long, long, char *, char *, char *, u_int32_t, __env_dbrename_reply *)); -void __env_encrypt_proc __P((long, char *, u_int32_t, __env_encrypt_reply *)); -void __env_flags_proc __P((long, u_int32_t, u_int32_t, __env_flags_reply *)); -void __env_open_proc __P((long, char *, u_int32_t, u_int32_t, __env_open_reply *)); -void __env_remove_proc __P((long, char *, u_int32_t, __env_remove_reply *)); -void __txn_abort_proc __P((long, __txn_abort_reply *)); -void __txn_begin_proc __P((long, long, u_int32_t, __txn_begin_reply *)); -void __txn_commit_proc __P((long, u_int32_t, __txn_commit_reply *)); -void __txn_discard_proc __P((long, u_int32_t, __txn_discard_reply *)); -void __txn_prepare_proc __P((long, u_int8_t *, __txn_prepare_reply *)); -void __txn_recover_proc __P((long, u_int32_t, u_int32_t, __txn_recover_reply *, int *)); -void __db_bt_maxkey_proc __P((long, u_int32_t, __db_bt_maxkey_reply *)); -void __db_associate_proc __P((long, long, long, u_int32_t, __db_associate_reply *)); -void __db_bt_minkey_proc __P((long, u_int32_t, __db_bt_minkey_reply *)); -void __db_close_proc __P((long, u_int32_t, __db_close_reply *)); -void __db_create_proc __P((long, u_int32_t, __db_create_reply *)); -void __db_del_proc __P((long, long, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __db_del_reply *)); -void __db_encrypt_proc __P((long, char *, u_int32_t, __db_encrypt_reply *)); -void __db_extentsize_proc __P((long, u_int32_t, __db_extentsize_reply *)); -void __db_flags_proc __P((long, u_int32_t, __db_flags_reply *)); -void __db_get_proc __P((long, long, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __db_get_reply *, int *)); -void __db_h_ffactor_proc __P((long, u_int32_t, __db_h_ffactor_reply *)); -void __db_h_nelem_proc __P((long, u_int32_t, __db_h_nelem_reply *)); -void __db_key_range_proc __P((long, long, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __db_key_range_reply *)); -void __db_lorder_proc __P((long, u_int32_t, __db_lorder_reply *)); -void __db_open_proc __P((long, long, char *, char *, u_int32_t, u_int32_t, u_int32_t, __db_open_reply *)); -void __db_pagesize_proc __P((long, u_int32_t, __db_pagesize_reply *)); -void __db_pget_proc __P((long, long, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __db_pget_reply *, int *)); -void __db_put_proc __P((long, long, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __db_put_reply *, int *)); -void __db_re_delim_proc __P((long, u_int32_t, __db_re_delim_reply *)); -void __db_re_len_proc __P((long, u_int32_t, __db_re_len_reply *)); -void __db_re_pad_proc __P((long, u_int32_t, __db_re_pad_reply *)); -void __db_remove_proc __P((long, char *, char *, u_int32_t, __db_remove_reply *)); -void __db_rename_proc __P((long, char *, char *, char *, u_int32_t, __db_rename_reply *)); -void __db_stat_proc __P((long, u_int32_t, __db_stat_reply *, int *)); -void __db_sync_proc __P((long, u_int32_t, __db_sync_reply *)); -void __db_truncate_proc __P((long, long, u_int32_t, __db_truncate_reply *)); -void __db_cursor_proc __P((long, long, u_int32_t, __db_cursor_reply *)); -void __db_join_proc __P((long, u_int32_t *, u_int32_t, u_int32_t, __db_join_reply *)); -void __dbc_close_proc __P((long, __dbc_close_reply *)); -void __dbc_count_proc __P((long, u_int32_t, __dbc_count_reply *)); -void __dbc_del_proc __P((long, u_int32_t, __dbc_del_reply *)); -void __dbc_dup_proc __P((long, u_int32_t, __dbc_dup_reply *)); -void __dbc_get_proc __P((long, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __dbc_get_reply *, int *)); -void __dbc_pget_proc __P((long, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __dbc_pget_reply *, int *)); -void __dbc_put_proc __P((long, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *, u_int32_t, u_int32_t, __dbc_put_reply *, int *)); -void __dbsrv_settimeout __P((ct_entry *, u_int32_t)); -void __dbsrv_timeout __P((int)); -void __dbclear_ctp __P((ct_entry *)); -void __dbdel_ctp __P((ct_entry *)); -ct_entry *new_ct_ent __P((int *)); -ct_entry *get_tableent __P((long)); -ct_entry *__dbsrv_sharedb __P((ct_entry *, const char *, const char *, DBTYPE, u_int32_t)); -ct_entry *__dbsrv_shareenv __P((ct_entry *, home_entry *, u_int32_t)); -void __dbsrv_active __P((ct_entry *)); -int __db_close_int __P((long, u_int32_t)); -int __dbc_close_int __P((ct_entry *)); -int __dbenv_close_int __P((long, u_int32_t, int)); -home_entry *get_home __P((char *)); -__env_cachesize_reply *__db_env_cachesize_4001 __P((__env_cachesize_msg *, struct svc_req *)); -__env_close_reply *__db_env_close_4001 __P((__env_close_msg *, struct svc_req *)); -__env_create_reply *__db_env_create_4001 __P((__env_create_msg *, struct svc_req *)); -__env_dbremove_reply *__db_env_dbremove_4001 __P((__env_dbremove_msg *, struct svc_req *)); -__env_dbrename_reply *__db_env_dbrename_4001 __P((__env_dbrename_msg *, struct svc_req *)); -__env_encrypt_reply *__db_env_encrypt_4001 __P((__env_encrypt_msg *, struct svc_req *)); -__env_flags_reply *__db_env_flags_4001 __P((__env_flags_msg *, struct svc_req *)); -__env_open_reply *__db_env_open_4001 __P((__env_open_msg *, struct svc_req *)); -__env_remove_reply *__db_env_remove_4001 __P((__env_remove_msg *, struct svc_req *)); -__txn_abort_reply *__db_txn_abort_4001 __P((__txn_abort_msg *, struct svc_req *)); -__txn_begin_reply *__db_txn_begin_4001 __P((__txn_begin_msg *, struct svc_req *)); -__txn_commit_reply *__db_txn_commit_4001 __P((__txn_commit_msg *, struct svc_req *)); -__txn_discard_reply *__db_txn_discard_4001 __P((__txn_discard_msg *, struct svc_req *)); -__txn_prepare_reply *__db_txn_prepare_4001 __P((__txn_prepare_msg *, struct svc_req *)); -__txn_recover_reply *__db_txn_recover_4001 __P((__txn_recover_msg *, struct svc_req *)); -__db_associate_reply *__db_db_associate_4001 __P((__db_associate_msg *, struct svc_req *)); -__db_bt_maxkey_reply *__db_db_bt_maxkey_4001 __P((__db_bt_maxkey_msg *, struct svc_req *)); -__db_bt_minkey_reply *__db_db_bt_minkey_4001 __P((__db_bt_minkey_msg *, struct svc_req *)); -__db_close_reply *__db_db_close_4001 __P((__db_close_msg *, struct svc_req *)); -__db_create_reply *__db_db_create_4001 __P((__db_create_msg *, struct svc_req *)); -__db_del_reply *__db_db_del_4001 __P((__db_del_msg *, struct svc_req *)); -__db_encrypt_reply *__db_db_encrypt_4001 __P((__db_encrypt_msg *, struct svc_req *)); -__db_extentsize_reply *__db_db_extentsize_4001 __P((__db_extentsize_msg *, struct svc_req *)); -__db_flags_reply *__db_db_flags_4001 __P((__db_flags_msg *, struct svc_req *)); -__db_get_reply *__db_db_get_4001 __P((__db_get_msg *, struct svc_req *)); -__db_h_ffactor_reply *__db_db_h_ffactor_4001 __P((__db_h_ffactor_msg *, struct svc_req *)); -__db_h_nelem_reply *__db_db_h_nelem_4001 __P((__db_h_nelem_msg *, struct svc_req *)); -__db_key_range_reply *__db_db_key_range_4001 __P((__db_key_range_msg *, struct svc_req *)); -__db_lorder_reply *__db_db_lorder_4001 __P((__db_lorder_msg *, struct svc_req *)); -__db_open_reply *__db_db_open_4001 __P((__db_open_msg *, struct svc_req *)); -__db_pagesize_reply *__db_db_pagesize_4001 __P((__db_pagesize_msg *, struct svc_req *)); -__db_pget_reply *__db_db_pget_4001 __P((__db_pget_msg *, struct svc_req *)); -__db_put_reply *__db_db_put_4001 __P((__db_put_msg *, struct svc_req *)); -__db_re_delim_reply *__db_db_re_delim_4001 __P((__db_re_delim_msg *, struct svc_req *)); -__db_re_len_reply *__db_db_re_len_4001 __P((__db_re_len_msg *, struct svc_req *)); -__db_re_pad_reply *__db_db_re_pad_4001 __P((__db_re_pad_msg *, struct svc_req *)); -__db_remove_reply *__db_db_remove_4001 __P((__db_remove_msg *, struct svc_req *)); -__db_rename_reply *__db_db_rename_4001 __P((__db_rename_msg *, struct svc_req *)); -__db_stat_reply *__db_db_stat_4001 __P((__db_stat_msg *, struct svc_req *)); -__db_sync_reply *__db_db_sync_4001 __P((__db_sync_msg *, struct svc_req *)); -__db_truncate_reply *__db_db_truncate_4001 __P((__db_truncate_msg *, struct svc_req *)); -__db_cursor_reply *__db_db_cursor_4001 __P((__db_cursor_msg *, struct svc_req *)); -__db_join_reply *__db_db_join_4001 __P((__db_join_msg *, struct svc_req *)); -__dbc_close_reply *__db_dbc_close_4001 __P((__dbc_close_msg *, struct svc_req *)); -__dbc_count_reply *__db_dbc_count_4001 __P((__dbc_count_msg *, struct svc_req *)); -__dbc_del_reply *__db_dbc_del_4001 __P((__dbc_del_msg *, struct svc_req *)); -__dbc_dup_reply *__db_dbc_dup_4001 __P((__dbc_dup_msg *, struct svc_req *)); -__dbc_get_reply *__db_dbc_get_4001 __P((__dbc_get_msg *, struct svc_req *)); -__dbc_pget_reply *__db_dbc_pget_4001 __P((__dbc_pget_msg *, struct svc_req *)); -__dbc_put_reply *__db_dbc_put_4001 __P((__dbc_put_msg *, struct svc_req *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_rpc_server_ext_h_ */ diff --git a/bdb/dbinc_auto/tcl_ext.h b/bdb/dbinc_auto/tcl_ext.h deleted file mode 100644 index 619ea4a9dfc..00000000000 --- a/bdb/dbinc_auto/tcl_ext.h +++ /dev/null @@ -1,82 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _tcl_ext_h_ -#define _tcl_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int bdb_HCommand __P((Tcl_Interp *, int, Tcl_Obj * CONST*)); -#if DB_DBM_HSEARCH != 0 -int bdb_NdbmOpen __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DBM **)); -#endif -#if DB_DBM_HSEARCH != 0 -int bdb_DbmCommand __P((Tcl_Interp *, int, Tcl_Obj * CONST*, int, DBM *)); -#endif -int ndbm_Cmd __P((ClientData, Tcl_Interp *, int, Tcl_Obj * CONST*)); -void _DbInfoDelete __P((Tcl_Interp *, DBTCL_INFO *)); -int db_Cmd __P((ClientData, Tcl_Interp *, int, Tcl_Obj * CONST*)); -int dbc_Cmd __P((ClientData, Tcl_Interp *, int, Tcl_Obj * CONST*)); -int env_Cmd __P((ClientData, Tcl_Interp *, int, Tcl_Obj * CONST*)); -int tcl_EnvRemove __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *, DBTCL_INFO *)); -int tcl_EnvVerbose __P((Tcl_Interp *, DB_ENV *, Tcl_Obj *, Tcl_Obj *)); -int tcl_EnvAttr __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_EnvTest __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -DBTCL_INFO *_NewInfo __P((Tcl_Interp *, void *, char *, enum INFOTYPE)); -void *_NameToPtr __P((CONST char *)); -DBTCL_INFO *_PtrToInfo __P((CONST void *)); -DBTCL_INFO *_NameToInfo __P((CONST char *)); -void _SetInfoData __P((DBTCL_INFO *, void *)); -void _DeleteInfo __P((DBTCL_INFO *)); -int _SetListElem __P((Tcl_Interp *, Tcl_Obj *, void *, int, void *, int)); -int _SetListElemInt __P((Tcl_Interp *, Tcl_Obj *, void *, int)); -int _SetListRecnoElem __P((Tcl_Interp *, Tcl_Obj *, db_recno_t, u_char *, int)); -int _Set3DBTList __P((Tcl_Interp *, Tcl_Obj *, DBT *, int, DBT *, int, DBT *)); -int _SetMultiList __P((Tcl_Interp *, Tcl_Obj *, DBT *, DBT*, int, int)); -int _GetGlobPrefix __P((char *, char **)); -int _ReturnSetup __P((Tcl_Interp *, int, int, char *)); -int _ErrorSetup __P((Tcl_Interp *, int, char *)); -void _ErrorFunc __P((CONST char *, char *)); -int _GetLsn __P((Tcl_Interp *, Tcl_Obj *, DB_LSN *)); -int _GetUInt32 __P((Tcl_Interp *, Tcl_Obj *, u_int32_t *)); -Tcl_Obj *_GetFlagsList __P((Tcl_Interp *, u_int32_t, void (*)(u_int32_t, void *, void (*)(u_int32_t, const FN *, void *)))); -void _debug_check __P((void)); -int _CopyObjBytes __P((Tcl_Interp *, Tcl_Obj *obj, void **, u_int32_t *, int *)); -int tcl_LockDetect __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LockGet __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LockStat __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LockTimeout __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LockVec __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LogArchive __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LogCompare __P((Tcl_Interp *, int, Tcl_Obj * CONST*)); -int tcl_LogFile __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LogFlush __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LogGet __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LogPut __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_LogStat __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int logc_Cmd __P((ClientData, Tcl_Interp *, int, Tcl_Obj * CONST*)); -void _MpInfoDelete __P((Tcl_Interp *, DBTCL_INFO *)); -int tcl_MpSync __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_MpTrickle __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_Mp __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *, DBTCL_INFO *)); -int tcl_MpStat __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_RepElect __P((Tcl_Interp *, int, Tcl_Obj * CONST *, DB_ENV *)); -int tcl_RepFlush __P((Tcl_Interp *, int, Tcl_Obj * CONST *, DB_ENV *)); -int tcl_RepLimit __P((Tcl_Interp *, int, Tcl_Obj * CONST *, DB_ENV *)); -int tcl_RepRequest __P((Tcl_Interp *, int, Tcl_Obj * CONST *, DB_ENV *)); -int tcl_RepStart __P((Tcl_Interp *, int, Tcl_Obj * CONST *, DB_ENV *)); -int tcl_RepProcessMessage __P((Tcl_Interp *, int, Tcl_Obj * CONST *, DB_ENV *)); -int tcl_RepStat __P((Tcl_Interp *, int, Tcl_Obj * CONST *, DB_ENV *)); -void _TxnInfoDelete __P((Tcl_Interp *, DBTCL_INFO *)); -int tcl_TxnCheckpoint __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_Txn __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *, DBTCL_INFO *)); -int tcl_TxnStat __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_TxnTimeout __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *)); -int tcl_TxnRecover __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *, DBTCL_INFO *)); -int bdb_RandCommand __P((Tcl_Interp *, int, Tcl_Obj * CONST*)); -int tcl_Mutex __P((Tcl_Interp *, int, Tcl_Obj * CONST*, DB_ENV *, DBTCL_INFO *)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_tcl_ext_h_ */ diff --git a/bdb/dbinc_auto/txn_ext.h b/bdb/dbinc_auto/txn_ext.h deleted file mode 100644 index 5a4381ed890..00000000000 --- a/bdb/dbinc_auto/txn_ext.h +++ /dev/null @@ -1,70 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _txn_ext_h_ -#define _txn_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __txn_begin __P((DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)); -int __txn_xa_begin __P((DB_ENV *, DB_TXN *)); -int __txn_compensate_begin __P((DB_ENV *, DB_TXN **txnp)); -int __txn_commit __P((DB_TXN *, u_int32_t)); -int __txn_abort __P((DB_TXN *)); -int __txn_discard __P((DB_TXN *, u_int32_t flags)); -int __txn_prepare __P((DB_TXN *, u_int8_t *)); -u_int32_t __txn_id __P((DB_TXN *)); -int __txn_checkpoint __P((DB_ENV *, u_int32_t, u_int32_t, u_int32_t)); -int __txn_getckp __P((DB_ENV *, DB_LSN *)); -int __txn_activekids __P((DB_ENV *, u_int32_t, DB_TXN *)); -int __txn_force_abort __P((DB_ENV *, u_int8_t *)); -int __txn_preclose __P((DB_ENV *)); -int __txn_reset __P((DB_ENV *)); -int __txn_regop_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, int32_t)); -int __txn_regop_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_regop_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_regop_read __P((DB_ENV *, void *, __txn_regop_args **)); -int __txn_ckp_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, DB_LSN *, DB_LSN *, int32_t)); -int __txn_ckp_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_ckp_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_ckp_read __P((DB_ENV *, void *, __txn_ckp_args **)); -int __txn_child_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, DB_LSN *)); -int __txn_child_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_child_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_child_read __P((DB_ENV *, void *, __txn_child_args **)); -int __txn_xa_regop_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, const DBT *, int32_t, u_int32_t, u_int32_t, DB_LSN *)); -int __txn_xa_regop_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_xa_regop_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_xa_regop_read __P((DB_ENV *, void *, __txn_xa_regop_args **)); -int __txn_recycle_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, u_int32_t)); -int __txn_recycle_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_recycle_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_recycle_read __P((DB_ENV *, void *, __txn_recycle_args **)); -int __txn_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __txn_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -int __txn_init_recover __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); -void __txn_dbenv_create __P((DB_ENV *)); -int __txn_regop_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_xa_regop_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_ckp_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_child_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -int __txn_restore_txn __P((DB_ENV *, DB_LSN *, __txn_xa_regop_args *)); -int __txn_recycle_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); -void __txn_continue __P((DB_ENV *, DB_TXN *, TXN_DETAIL *, size_t)); -int __txn_map_gid __P((DB_ENV *, u_int8_t *, TXN_DETAIL **, size_t *)); -int __txn_recover __P((DB_ENV *, DB_PREPLIST *, long, long *, u_int32_t)); -int __txn_get_prepared __P((DB_ENV *, XID *, DB_PREPLIST *, long, long *, u_int32_t)); -int __txn_open __P((DB_ENV *)); -int __txn_dbenv_refresh __P((DB_ENV *)); -void __txn_region_destroy __P((DB_ENV *, REGINFO *)); -int __txn_id_set __P((DB_ENV *, u_int32_t, u_int32_t)); -int __txn_stat __P((DB_ENV *, DB_TXN_STAT **, u_int32_t)); -int __txn_remevent __P((DB_ENV *, DB_TXN *, const char *, u_int8_t*)); -int __txn_lockevent __P((DB_ENV *, DB_TXN *, DB *, DB_LOCK *, u_int32_t)); -void __txn_remlock __P((DB_ENV *, DB_TXN *, DB_LOCK *, u_int32_t)); -int __txn_doevents __P((DB_ENV *, DB_TXN *, int, int)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_txn_ext_h_ */ diff --git a/bdb/dbinc_auto/xa_ext.h b/bdb/dbinc_auto/xa_ext.h deleted file mode 100644 index e4fc9895e18..00000000000 --- a/bdb/dbinc_auto/xa_ext.h +++ /dev/null @@ -1,20 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_include. */ -#ifndef _xa_ext_h_ -#define _xa_ext_h_ - -#if defined(__cplusplus) -extern "C" { -#endif - -int __db_xa_create __P((DB *)); -int __db_rmid_to_env __P((int rmid, DB_ENV **envp)); -int __db_xid_to_txn __P((DB_ENV *, XID *, size_t *)); -int __db_map_rmid __P((int, DB_ENV *)); -int __db_unmap_rmid __P((int)); -int __db_map_xid __P((DB_ENV *, XID *, size_t)); -void __db_unmap_xid __P((DB_ENV *, XID *, size_t)); - -#if defined(__cplusplus) -} -#endif -#endif /* !_xa_ext_h_ */ diff --git a/bdb/dist/s_java b/bdb/dist/s_java index 2a65da60a73..f3c856d0532 100755 --- a/bdb/dist/s_java +++ b/bdb/dist/s_java @@ -38,7 +38,7 @@ cmp $t $f > /dev/null 2>&1 || (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) # Build Db.java. -f=../java/src/com/sleepycat/db/Db.java +f=../java/src/com/sleepycat/db/Db.java.in sed '/BEGIN-JAVA-SPECIAL-CONSTANTS/q' < $f > $t (echo " $msgjava" && for i in `egrep '^DB_.*C$' pubdef.in | awk '{print $1}'`; do \ diff --git a/bdb/dist/s_rpc b/bdb/dist/s_rpc index 7c478c2b5e1..cdafa669d85 100644 --- a/bdb/dist/s_rpc +++ b/bdb/dist/s_rpc @@ -30,6 +30,7 @@ rm -f $client_file \ $header_file \ $rpcclnt_file \ $rpcsvc_file \ + $proc_file \ $rpcxdr_file \ $sed_file \ $server_file \ diff --git a/bdb/java/src/com/sleepycat/db/Db.java b/bdb/java/src/com/sleepycat/db/Db.java.in similarity index 100% rename from bdb/java/src/com/sleepycat/db/Db.java rename to bdb/java/src/com/sleepycat/db/Db.java.in From ca3dbc7104220e35fc084432f2d4481b19a9bf8a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 20:03:40 +0100 Subject: [PATCH 101/246] remove all the auto-generated files but NOT vxworks/* ones. The reason is that vxworks files are most often, one file per directory, and when such a file is removed directory is gone as well. Though files are auto-generated, directories aren't. BitKeeper/deleted/.del-btree_auto.h~94f1be726dad9aff: Delete: bdb/dbinc_auto/btree_auto.h BitKeeper/deleted/.del-crdel_auto.h~e6710e96650dd20f: Delete: bdb/dbinc_auto/crdel_auto.h BitKeeper/deleted/.del-db_auto.h~f994b15bd824ae9b: Delete: bdb/dbinc_auto/db_auto.h BitKeeper/deleted/.del-db_config.h~60184629d0966584: Delete: bdb/build_win32/db_config.h BitKeeper/deleted/.del-db_cxx.h~5ae7eca120f9e810: Delete: bdb/build_win32/db_cxx.h BitKeeper/deleted/.del-db_perf.dsp~5984ea76dd378285: Delete: bdb/build_win32/db_perf.dsp BitKeeper/deleted/.del-db_test.dsp~eb1dbc135441c71c: Delete: bdb/build_win32/db_test.dsp BitKeeper/deleted/.del-dbreg_auto.c~c2549ec52200654b: Delete: bdb/dbreg/dbreg_auto.c BitKeeper/deleted/.del-dbreg_auto.h~c074dd54cca3b504: Delete: bdb/dbinc_auto/dbreg_auto.h BitKeeper/deleted/.del-fileops_auto.h~10df93de4b325f28: Delete: bdb/dbinc_auto/fileops_auto.h BitKeeper/deleted/.del-hash_auto.h~a29a3d2157d8c2ed: Delete: bdb/dbinc_auto/hash_auto.h BitKeeper/deleted/.del-libdb.def~301ea9487fa24bb1: Delete: bdb/build_win32/libdb.def BitKeeper/deleted/.del-qam_auto.h~727bb6f1bc903af6: Delete: bdb/dbinc_auto/qam_auto.h BitKeeper/deleted/.del-rec_dbreg~e359d26bb94bb1c3: Delete: bdb/dist/template/rec_dbreg BitKeeper/deleted/.del-rec_fileops~ef167bd1b983a01: Delete: bdb/dist/template/rec_fileops BitKeeper/deleted/.del-txn_auto.h~5c0ec531297454cf: Delete: bdb/dbinc_auto/txn_auto.h BitKeeper/deleted/.del-DbBtreeStat.java~ae44f148e56d691e: Delete: bdb/java/src/com/sleepycat/db/DbBtreeStat.java BitKeeper/deleted/.del-DbHashStat.java~712355915769120f: Delete: bdb/java/src/com/sleepycat/db/DbHashStat.java BitKeeper/deleted/.del-DbLockStat.java~78219b0a1bd2f053: Delete: bdb/java/src/com/sleepycat/db/DbLockStat.java BitKeeper/deleted/.del-DbLogStat.java~b9922e5d7f3a04aa: Delete: bdb/java/src/com/sleepycat/db/DbLogStat.java BitKeeper/deleted/.del-DbMpoolFStat.java~1e69777aa623d5b4: Delete: bdb/java/src/com/sleepycat/db/DbMpoolFStat.java BitKeeper/deleted/.del-DbQueueStat.java~e1632bb696810690: Delete: bdb/java/src/com/sleepycat/db/DbQueueStat.java BitKeeper/deleted/.del-DbRepStat.java~5dc6f9d61f4ad890: Delete: bdb/java/src/com/sleepycat/db/DbRepStat.java BitKeeper/deleted/.del-DbTxnStat.java~d4408e0452a8ef16: Delete: bdb/java/src/com/sleepycat/db/DbTxnStat.java BitKeeper/deleted/.del-fileops_auto.c~f1dd08f372e83d35: Delete: bdb/fileops/fileops_auto.c BitKeeper/deleted/.del-java_stat_auto.c~2199d8ff9d208c23: Delete: bdb/libdb_java/java_stat_auto.c BitKeeper/deleted/.del-java_stat_auto.h~c2e9f743368f29fb: Delete: bdb/libdb_java/java_stat_auto.h BitKeeper/etc/ignore: Added bdb/build_win32/db_config.h bdb/build_win32/db_cxx.h bdb/build_win32/db_perf.dsp bdb/build_win32/db_test.dsp bdb/build_win32/libdb.def bdb/dbinc_auto/btree_auto.h bdb/dbinc_auto/btree_ext.h bdb/dbinc_auto/clib_ext.h bdb/dbinc_auto/common_ext.h bdb/dbinc_auto/crdel_auto.h bdb/dbinc_auto/crypto_ext.h bdb/dbinc_auto/db_auto.h bdb/dbinc_auto/db_ext.h bdb/dbinc_auto/db_server.h bdb/dbinc_auto/dbreg_auto.h bdb/dbinc_auto/dbreg_ext.h bdb/dbinc_auto/env_ext.h bdb/dbinc_auto/ext_185_def.in bdb/dbinc_auto/ext_185_prot.in bdb/dbinc_auto/ext_def.in bdb/dbinc_auto/ext_prot.in bdb/dbinc_auto/fileops_auto.h bdb/dbinc_auto/fileops_ext.h bdb/dbinc_auto/hash_auto.h bdb/dbinc_auto/hash_ext.h bdb/dbinc_auto/hmac_ext.h bdb/dbinc_auto/int_def.in bdb/dbinc_auto/lock_ext.h bdb/dbinc_auto/log_ext.h bdb/dbinc_auto/mp_ext.h bdb/dbinc_auto/mutex_ext.h bdb/dbinc_auto/os_ext.h bdb/dbinc_auto/qam_auto.h bdb/dbinc_auto/qam_ext.h bdb/dbinc_auto/rep_ext.h bdb/dbinc_auto/rpc_client_ext.h bdb/dbinc_auto/rpc_defs.in bdb/dbinc_auto/rpc --- .bzrignore | 134 ++ bdb/build_win32/db_config.h | 440 ------ bdb/build_win32/db_cxx.h | 796 ---------- bdb/build_win32/db_perf.dsp | 216 --- bdb/build_win32/db_test.dsp | 100 -- bdb/build_win32/libdb.def | 128 -- bdb/dbinc_auto/btree_auto.h | 128 -- bdb/dbinc_auto/crdel_auto.h | 16 - bdb/dbinc_auto/db_auto.h | 118 -- bdb/dbinc_auto/dbreg_auto.h | 19 - bdb/dbinc_auto/fileops_auto.h | 60 - bdb/dbinc_auto/hash_auto.h | 132 -- bdb/dbinc_auto/qam_auto.h | 70 - bdb/dbinc_auto/txn_auto.h | 55 - bdb/dbreg/dbreg_auto.c | 358 ----- bdb/dist/template/rec_dbreg | 75 - bdb/dist/template/rec_fileops | 323 ---- bdb/fileops/fileops_auto.c | 1371 ----------------- .../src/com/sleepycat/db/DbBtreeStat.java | 28 - bdb/java/src/com/sleepycat/db/DbHashStat.java | 24 - bdb/java/src/com/sleepycat/db/DbLockStat.java | 32 - bdb/java/src/com/sleepycat/db/DbLogStat.java | 29 - .../src/com/sleepycat/db/DbMpoolFStat.java | 16 - .../src/com/sleepycat/db/DbQueueStat.java | 21 - bdb/java/src/com/sleepycat/db/DbRepStat.java | 43 - bdb/java/src/com/sleepycat/db/DbTxnStat.java | 27 - bdb/libdb_java/java_stat_auto.c | 207 --- bdb/libdb_java/java_stat_auto.h | 9 - 28 files changed, 134 insertions(+), 4841 deletions(-) delete mode 100644 bdb/build_win32/db_config.h delete mode 100644 bdb/build_win32/db_cxx.h delete mode 100644 bdb/build_win32/db_perf.dsp delete mode 100644 bdb/build_win32/db_test.dsp delete mode 100644 bdb/build_win32/libdb.def delete mode 100644 bdb/dbinc_auto/btree_auto.h delete mode 100644 bdb/dbinc_auto/crdel_auto.h delete mode 100644 bdb/dbinc_auto/db_auto.h delete mode 100644 bdb/dbinc_auto/dbreg_auto.h delete mode 100644 bdb/dbinc_auto/fileops_auto.h delete mode 100644 bdb/dbinc_auto/hash_auto.h delete mode 100644 bdb/dbinc_auto/qam_auto.h delete mode 100644 bdb/dbinc_auto/txn_auto.h delete mode 100644 bdb/dbreg/dbreg_auto.c delete mode 100644 bdb/dist/template/rec_dbreg delete mode 100644 bdb/dist/template/rec_fileops delete mode 100644 bdb/fileops/fileops_auto.c delete mode 100644 bdb/java/src/com/sleepycat/db/DbBtreeStat.java delete mode 100644 bdb/java/src/com/sleepycat/db/DbHashStat.java delete mode 100644 bdb/java/src/com/sleepycat/db/DbLockStat.java delete mode 100644 bdb/java/src/com/sleepycat/db/DbLogStat.java delete mode 100644 bdb/java/src/com/sleepycat/db/DbMpoolFStat.java delete mode 100644 bdb/java/src/com/sleepycat/db/DbQueueStat.java delete mode 100644 bdb/java/src/com/sleepycat/db/DbRepStat.java delete mode 100644 bdb/java/src/com/sleepycat/db/DbTxnStat.java delete mode 100644 bdb/libdb_java/java_stat_auto.c delete mode 100644 bdb/libdb_java/java_stat_auto.h diff --git a/.bzrignore b/.bzrignore index f26e041f3ba..3a67e988f2c 100644 --- a/.bzrignore +++ b/.bzrignore @@ -516,3 +516,137 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +bdb/build_win32/db_config.h +bdb/build_win32/db_cxx.h +bdb/build_win32/db_perf.dsp +bdb/build_win32/db_test.dsp +bdb/build_win32/libdb.def +bdb/dbinc_auto/btree_auto.h +bdb/dbinc_auto/btree_ext.h +bdb/dbinc_auto/clib_ext.h +bdb/dbinc_auto/common_ext.h +bdb/dbinc_auto/crdel_auto.h +bdb/dbinc_auto/crypto_ext.h +bdb/dbinc_auto/db_auto.h +bdb/dbinc_auto/db_ext.h +bdb/dbinc_auto/db_server.h +bdb/dbinc_auto/dbreg_auto.h +bdb/dbinc_auto/dbreg_ext.h +bdb/dbinc_auto/env_ext.h +bdb/dbinc_auto/ext_185_def.in +bdb/dbinc_auto/ext_185_prot.in +bdb/dbinc_auto/ext_def.in +bdb/dbinc_auto/ext_prot.in +bdb/dbinc_auto/fileops_auto.h +bdb/dbinc_auto/fileops_ext.h +bdb/dbinc_auto/hash_auto.h +bdb/dbinc_auto/hash_ext.h +bdb/dbinc_auto/hmac_ext.h +bdb/dbinc_auto/int_def.in +bdb/dbinc_auto/lock_ext.h +bdb/dbinc_auto/log_ext.h +bdb/dbinc_auto/mp_ext.h +bdb/dbinc_auto/mutex_ext.h +bdb/dbinc_auto/os_ext.h +bdb/dbinc_auto/qam_auto.h +bdb/dbinc_auto/qam_ext.h +bdb/dbinc_auto/rep_ext.h +bdb/dbinc_auto/rpc_client_ext.h +bdb/dbinc_auto/rpc_defs.in +bdb/dbinc_auto/rpc_server_ext.h +bdb/dbinc_auto/tcl_ext.h +bdb/dbinc_auto/txn_auto.h +bdb/dbinc_auto/txn_ext.h +bdb/dbinc_auto/xa_ext.h +bdb/dbreg/dbreg_auto.c +bdb/dist/bbb +bdb/dist/template/rec_dbreg +bdb/dist/template/rec_fileops +bdb/examples_c/ex_apprec/ex_apprec_auto.c +bdb/examples_c/ex_apprec/ex_apprec_auto.h +bdb/examples_c/ex_apprec/ex_apprec_template +bdb/fileops/fileops_auto.c +bdb/java/src/com/sleepycat/db/Db.java +bdb/java/src/com/sleepycat/db/DbBtreeStat.java +bdb/java/src/com/sleepycat/db/DbHashStat.java +bdb/java/src/com/sleepycat/db/DbLockStat.java +bdb/java/src/com/sleepycat/db/DbLogStat.java +bdb/java/src/com/sleepycat/db/DbMpoolFStat.java +bdb/java/src/com/sleepycat/db/DbQueueStat.java +bdb/java/src/com/sleepycat/db/DbRepStat.java +bdb/java/src/com/sleepycat/db/DbTxnStat.java +bdb/libdb_java/java_stat_auto.c +bdb/libdb_java/java_stat_auto.h +bdb/rpc_server/c/db_server_proc.c +bdb/rpc_server/c/db_server_proc.sed +bdb/rpc_server/c/db_server_svc.c +bdb/rpc_server/c/db_server_xdr.c +bdb/rpc_server/c/gen_db_server.c +bdb/test/TESTS +bdb/build_win32/db_config.h +bdb/build_win32/db_cxx.h +bdb/build_win32/db_perf.dsp +bdb/build_win32/db_test.dsp +bdb/build_win32/libdb.def +bdb/dbinc_auto/btree_auto.h +bdb/dbinc_auto/btree_ext.h +bdb/dbinc_auto/clib_ext.h +bdb/dbinc_auto/common_ext.h +bdb/dbinc_auto/crdel_auto.h +bdb/dbinc_auto/crypto_ext.h +bdb/dbinc_auto/db_auto.h +bdb/dbinc_auto/db_ext.h +bdb/dbinc_auto/db_server.h +bdb/dbinc_auto/dbreg_auto.h +bdb/dbinc_auto/dbreg_ext.h +bdb/dbinc_auto/env_ext.h +bdb/dbinc_auto/ext_185_def.in +bdb/dbinc_auto/ext_185_prot.in +bdb/dbinc_auto/ext_def.in +bdb/dbinc_auto/ext_prot.in +bdb/dbinc_auto/fileops_auto.h +bdb/dbinc_auto/fileops_ext.h +bdb/dbinc_auto/hash_auto.h +bdb/dbinc_auto/hash_ext.h +bdb/dbinc_auto/hmac_ext.h +bdb/dbinc_auto/int_def.in +bdb/dbinc_auto/lock_ext.h +bdb/dbinc_auto/log_ext.h +bdb/dbinc_auto/mp_ext.h +bdb/dbinc_auto/mutex_ext.h +bdb/dbinc_auto/os_ext.h +bdb/dbinc_auto/qam_auto.h +bdb/dbinc_auto/qam_ext.h +bdb/dbinc_auto/rep_ext.h +bdb/dbinc_auto/rpc_client_ext.h +bdb/dbinc_auto/rpc_defs.in +bdb/dbinc_auto/rpc_server_ext.h +bdb/dbinc_auto/tcl_ext.h +bdb/dbinc_auto/txn_auto.h +bdb/dbinc_auto/txn_ext.h +bdb/dbinc_auto/xa_ext.h +bdb/dbreg/dbreg_auto.c +bdb/dist/bbb +bdb/dist/template/rec_dbreg +bdb/dist/template/rec_fileops +bdb/examples_c/ex_apprec/ex_apprec_auto.c +bdb/examples_c/ex_apprec/ex_apprec_auto.h +bdb/examples_c/ex_apprec/ex_apprec_template +bdb/fileops/fileops_auto.c +bdb/java/src/com/sleepycat/db/Db.java +bdb/java/src/com/sleepycat/db/DbBtreeStat.java +bdb/java/src/com/sleepycat/db/DbHashStat.java +bdb/java/src/com/sleepycat/db/DbLockStat.java +bdb/java/src/com/sleepycat/db/DbLogStat.java +bdb/java/src/com/sleepycat/db/DbMpoolFStat.java +bdb/java/src/com/sleepycat/db/DbQueueStat.java +bdb/java/src/com/sleepycat/db/DbRepStat.java +bdb/java/src/com/sleepycat/db/DbTxnStat.java +bdb/libdb_java/java_stat_auto.c +bdb/libdb_java/java_stat_auto.h +bdb/rpc_server/c/db_server_proc.c +bdb/rpc_server/c/db_server_proc.sed +bdb/rpc_server/c/db_server_svc.c +bdb/rpc_server/c/db_server_xdr.c +bdb/rpc_server/c/gen_db_server.c +bdb/test/TESTS diff --git a/bdb/build_win32/db_config.h b/bdb/build_win32/db_config.h deleted file mode 100644 index 76ce0b5095f..00000000000 --- a/bdb/build_win32/db_config.h +++ /dev/null @@ -1,440 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_win32. */ -/* Define to 1 if you want to build a version for running the test suite. */ -/* #undef CONFIG_TEST */ - -/* Define to 1 if you want a debugging version. */ -/* #undef DEBUG */ -#if defined(_DEBUG) -#if !defined(DEBUG) -#define DEBUG 1 -#endif -#endif - -/* Define to 1 if you want a version that logs read operations. */ -/* #undef DEBUG_ROP */ - -/* Define to 1 if you want a version that logs write operations. */ -/* #undef DEBUG_WOP */ - -/* Define to 1 if you want a version with run-time diagnostic checking. */ -/* #undef DIAGNOSTIC */ - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define to 1 if Berkeley DB release includes strong cryptography. */ -/* #undef HAVE_CRYPTO */ - -/* Define to 1 if you have the `directio' function. */ -/* #undef HAVE_DIRECTIO */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_DIRENT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */ -#define HAVE_EXIT_SUCCESS 1 - -/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */ -/* #undef HAVE_FCNTL_F_SETFD */ - -/* Define to 1 if allocated filesystem blocks are not zeroed. */ -#define HAVE_FILESYSTEM_NOTZERO 1 - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getopt' function. */ -/* #undef HAVE_GETOPT */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define to 1 if you have the `memcmp' function. */ -#define HAVE_MEMCMP 1 - -/* Define to 1 if you have the `memcpy' function. */ -#define HAVE_MEMCPY 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mlock' function. */ -/* #undef HAVE_MLOCK */ - -/* Define to 1 if you have the `mmap' function. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `munlock' function. */ -/* #undef HAVE_MUNLOCK */ - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */ -/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */ - -/* Define to 1 to use the AIX _check_lock mutexes. */ -/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */ - -/* Define to 1 to use the GCC compiler and Alpha assembly language mutexes. */ -/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */ -/* #undef HAVE_MUTEX_ARM_GCC_ASSEMBLY */ - -/* Define to 1 to use the UNIX fcntl system call mutexes. */ -/* #undef HAVE_MUTEX_FCNTL */ - -/* Define to 1 to use the GCC compiler and PaRisc assembly language mutexes. - */ -/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */ - -/* Define to 1 to use the msem_XXX mutexes on HP-UX. */ -/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */ - -/* Define to 1 to use the GCC compiler and IA64 assembly language mutexes. */ -/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */ - -/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */ -/* #undef HAVE_MUTEX_MSEM_INIT */ - -/* Define to 1 to use the GCC compiler and Apple PowerPC assembly language. */ -/* #undef HAVE_MUTEX_PPC_APPLE_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and generic PowerPC assembly language. - */ -/* #undef HAVE_MUTEX_PPC_GENERIC_GCC_ASSEMBLY */ - -/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */ -/* #undef HAVE_MUTEX_PTHREADS */ - -/* Define to 1 to use Reliant UNIX initspin mutexes. */ -/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */ - -/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */ -/* #undef HAVE_MUTEX_S390_GCC_ASSEMBLY */ - -/* Define to 1 to use the SCO compiler and x86 assembly language mutexes. */ -/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */ - -/* Define to 1 to use the obsolete POSIX 1003.1 sema_XXX mutexes. */ -/* #undef HAVE_MUTEX_SEMA_INIT */ - -/* Define to 1 to use the SGI XXX_lock mutexes. */ -/* #undef HAVE_MUTEX_SGI_INIT_LOCK */ - -/* Define to 1 to use the Solaris _lock_XXX mutexes. */ -/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */ - -/* Define to 1 to use the Solaris lwp threads mutexes. */ -/* #undef HAVE_MUTEX_SOLARIS_LWP */ - -/* Define to 1 to use the GCC compiler and Sparc assembly language mutexes. */ -/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */ - -/* Define to 1 if mutexes hold system resources. */ -/* #undef HAVE_MUTEX_SYSTEM_RESOURCES */ - -/* Define to 1 if fast mutexes are available. */ -#define HAVE_MUTEX_THREADS 1 - -/* Define to 1 to configure mutexes intra-process only. */ -/* #undef HAVE_MUTEX_THREAD_ONLY */ - -/* Define to 1 to use the UNIX International mutexes. */ -/* #undef HAVE_MUTEX_UI_THREADS */ - -/* Define to 1 to use the UTS compiler and assembly language mutexes. */ -/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */ - -/* Define to 1 to use VMS mutexes. */ -/* #undef HAVE_MUTEX_VMS */ - -/* Define to 1 to use VxWorks mutexes. */ -/* #undef HAVE_MUTEX_VXWORKS */ - -/* Define to 1 to use Windows mutexes. */ -#define HAVE_MUTEX_WIN32 1 - -/* Define to 1 to use the GCC compiler and x86 assembly language mutexes. */ -/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the O_DIRECT flag. */ -/* #undef HAVE_O_DIRECT */ - -/* Define to 1 if you have the `pread' function. */ -/* #undef HAVE_PREAD */ - -/* Define to 1 if you have the `pstat_getdynamic' function. */ -/* #undef HAVE_PSTAT_GETDYNAMIC */ - -/* Define to 1 if you have the `pwrite' function. */ -/* #undef HAVE_PWRITE */ - -/* Define to 1 if building on QNX. */ -/* #undef HAVE_QNX */ - -/* Define to 1 if you have the `qsort' function. */ -#define HAVE_QSORT 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if building RPC client/server. */ -/* #undef HAVE_RPC */ - -/* Define to 1 if you have the `sched_yield' function. */ -/* #undef HAVE_SCHED_YIELD */ - -/* Define to 1 if you have the `select' function. */ -/* #undef HAVE_SELECT */ - -/* Define to 1 if you have the `shmget' function. */ -/* #undef HAVE_SHMGET */ - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `st_blksize' is member of `struct stat'. */ -/* #undef HAVE_STRUCT_STAT_ST_BLKSIZE */ - -/* Define to 1 if you have the `sysconf' function. */ -/* #undef HAVE_SYSCONF */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if unlink of file with open file descriptors will fail. */ -/* #undef HAVE_UNLINK_WITH_OPEN_FAILURE */ - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if building VxWorks. */ -/* #undef HAVE_VXWORKS */ - -/* Define to 1 if you have the `yield' function. */ -/* #undef HAVE_YIELD */ - -/* Define to 1 if you have the `_fstati64' function. */ -#define HAVE__FSTATI64 1 - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "support@sleepycat.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Berkeley DB" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Berkeley DB 4.1.24" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "db-4.1.24" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "4.1.24" - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -/* #undef TIME_WITH_SYS_TIME */ - -/* Define to 1 to mask harmless unitialized memory read/writes. */ -/* #undef UMRW */ - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* - * Exit success/failure macros. - */ -#ifndef HAVE_EXIT_SUCCESS -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 -#endif - -/* - * Don't step on the namespace. Other libraries may have their own - * implementations of these functions, we don't want to use their - * implementations or force them to use ours based on the load order. - */ -#ifndef HAVE_GETCWD -#define getcwd __db_Cgetcwd -#endif -#ifndef HAVE_MEMCMP -#define memcmp __db_Cmemcmp -#endif -#ifndef HAVE_MEMCPY -#define memcpy __db_Cmemcpy -#endif -#ifndef HAVE_MEMMOVE -#define memmove __db_Cmemmove -#endif -#ifndef HAVE_RAISE -#define raise __db_Craise -#endif -#ifndef HAVE_SNPRINTF -#define snprintf __db_Csnprintf -#endif -#ifndef HAVE_STRCASECMP -#define strcasecmp __db_Cstrcasecmp -#define strncasecmp __db_Cstrncasecmp -#endif -#ifndef HAVE_STRERROR -#define strerror __db_Cstrerror -#endif -#ifndef HAVE_VSNPRINTF -#define vsnprintf __db_Cvsnprintf -#endif - -/* - * XXX - * The following is not part of the automatic configuration setup, but - * provides the information necessary to build Berkeley DB on Windows. - */ -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * To build Tcl interface libraries, the include path must be configured to - * use the directory containing , usually the include directory in - * the Tcl distribution. - */ -#ifdef DB_TCL_SUPPORT -#include -#endif - -#define WIN32_LEAN_AND_MEAN -#include - -/* - * All of the necessary includes have been included, ignore the #includes - * in the Berkeley DB source files. - */ -#define NO_SYSTEM_INCLUDES - -/* - * Win32 has getcwd, snprintf and vsnprintf, but under different names. - */ -#define getcwd(buf, size) _getcwd(buf, size) -#define snprintf _snprintf -#define vsnprintf _vsnprintf - -/* - * Win32 does not define getopt and friends in any header file, so we must. - */ -#if defined(__cplusplus) -extern "C" { -#endif -extern int optind; -extern char *optarg; -extern int getopt(int, char * const *, const char *); -#if defined(__cplusplus) -} -#endif - -/* - * We use DB_WIN32 much as one would use _WIN32, to determine that we're - * using an operating system environment that supports Win32 calls - * and semantics. We don't use _WIN32 because cygwin/gcc also defines - * that, even though it closely emulates the Unix environment. - */ -#define DB_WIN32 1 - -/* - * This is a grievous hack -- once we've included windows.h, we have no choice - * but to use ANSI-style varargs (because it pulls in stdarg.h for us). DB's - * code decides which type of varargs to use based on the state of __STDC__. - * Sensible. Unfortunately, Microsoft's compiler _doesn't_ define __STDC__ - * unless you invoke it with arguments turning OFF all vendor extensions. Even - * more unfortunately, if we do that, it fails to parse windows.h!!!!! So, we - * define __STDC__ here, after windows.h comes in. Note: the compiler knows - * we've defined it, and starts enforcing strict ANSI compilance from this point - * on. - */ -#define __STDC__ 1 diff --git a/bdb/build_win32/db_cxx.h b/bdb/build_win32/db_cxx.h deleted file mode 100644 index 1b72f310f82..00000000000 --- a/bdb/build_win32/db_cxx.h +++ /dev/null @@ -1,796 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_win32. */ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1997-2002 - * Sleepycat Software. All rights reserved. - * - * $Id: db_cxx.in,v 11.113 2002/08/23 13:02:27 mjc Exp $ - */ - -#ifndef _DB_CXX_H_ -#define _DB_CXX_H_ -// -// C++ assumptions: -// -// To ensure portability to many platforms, both new and old, we make -// few assumptions about the C++ compiler and library. For example, -// we do not expect STL, templates or namespaces to be available. The -// "newest" C++ feature used is exceptions, which are used liberally -// to transmit error information. Even the use of exceptions can be -// disabled at runtime, to do so, use the DB_CXX_NO_EXCEPTIONS flags -// with the DbEnv or Db constructor. -// -// C++ naming conventions: -// -// - All top level class names start with Db. -// - All class members start with lower case letter. -// - All private data members are suffixed with underscore. -// - Use underscores to divide names into multiple words. -// - Simple data accessors are named with get_ or set_ prefix. -// - All method names are taken from names of functions in the C -// layer of db (usually by dropping a prefix like "db_"). -// These methods have the same argument types and order, -// other than dropping the explicit arg that acts as "this". -// -// As a rule, each DbFoo object has exactly one underlying DB_FOO struct -// (defined in db.h) associated with it. In some cases, we inherit directly -// from the DB_FOO structure to make this relationship explicit. Often, -// the underlying C layer allocates and deallocates these structures, so -// there is no easy way to add any data to the DbFoo class. When you see -// a comment about whether data is permitted to be added, this is what -// is going on. Of course, if we need to add data to such C++ classes -// in the future, we will arrange to have an indirect pointer to the -// DB_FOO struct (as some of the classes already have). -// - -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -// -// Forward declarations -// - -#include - -#define HAVE_CXX_STDHEADERS 1 -#ifdef HAVE_CXX_STDHEADERS -#include -#define __DB_OSTREAMCLASS std::ostream -#else -#include -#define __DB_OSTREAMCLASS ostream -#endif - -#include "db.h" -#include "cxx_common.h" -#include "cxx_except.h" - -class Db; // forward -class Dbc; // forward -class DbEnv; // forward -class DbInfo; // forward -class DbLock; // forward -class DbLogc; // forward -class DbLsn; // forward -class DbMpoolFile; // forward -class DbPreplist; // forward -class Dbt; // forward -class DbTxn; // forward - -// These classes are not defined here and should be invisible -// to the user, but some compilers require forward references. -// There is one for each use of the DEFINE_DB_CLASS macro. - -class DbImp; -class DbEnvImp; -class DbMpoolFileImp; -class DbTxnImp; - -// DEFINE_DB_CLASS defines an imp_ data member and imp() accessor. -// The underlying type is a pointer to an opaque *Imp class, that -// gets converted to the correct implementation class by the implementation. -// -// Since these defines use "private/public" labels, and leave the access -// being "private", we always use these by convention before any data -// members in the private section of a class. Keeping them in the -// private section also emphasizes that they are off limits to user code. -// -#define DEFINE_DB_CLASS(name) \ - public: class name##Imp* imp() { return (imp_); } \ - public: const class name##Imp* constimp() const { return (imp_); } \ - private: class name##Imp* imp_ - -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -// -// Turn off inappropriate compiler warnings -// - -#ifdef _MSC_VER - -// These are level 4 warnings that are explicitly disabled. -// With Visual C++, by default you do not see above level 3 unless -// you use /W4. But we like to compile with the highest level -// warnings to catch other errors. -// -// 4201: nameless struct/union -// triggered by standard include file -// -// 4514: unreferenced inline function has been removed -// certain include files in MSVC define methods that are not called -// -#pragma warning(disable: 4201 4514) - -#endif - -// Some interfaces can be customized by allowing users to define -// callback functions. For performance and logistical reasons, some -// callback functions must be declared in extern "C" blocks. For others, -// we allow you to declare the callbacks in C++ or C (or an extern "C" -// block) as you wish. See the set methods for the callbacks for -// the choices. -// -extern "C" { - typedef void * (*db_malloc_fcn_type) - (size_t); - typedef void * (*db_realloc_fcn_type) - (void *, size_t); - typedef void (*db_free_fcn_type) - (void *); - typedef int (*bt_compare_fcn_type) /*C++ version available*/ - (DB *, const DBT *, const DBT *); - typedef size_t (*bt_prefix_fcn_type) /*C++ version available*/ - (DB *, const DBT *, const DBT *); - typedef int (*dup_compare_fcn_type) /*C++ version available*/ - (DB *, const DBT *, const DBT *); - typedef u_int32_t (*h_hash_fcn_type) /*C++ version available*/ - (DB *, const void *, u_int32_t); - typedef int (*pgin_fcn_type) - (DB_ENV *dbenv, db_pgno_t pgno, void *pgaddr, DBT *pgcookie); - typedef int (*pgout_fcn_type) - (DB_ENV *dbenv, db_pgno_t pgno, void *pgaddr, DBT *pgcookie); -}; - -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -// -// Lock classes -// - -class _exported DbLock -{ - friend class DbEnv; - -public: - DbLock(); - DbLock(const DbLock &); - DbLock &operator = (const DbLock &); - -protected: - // We can add data to this class if needed - // since its contained class is not allocated by db. - // (see comment at top) - - DbLock(DB_LOCK); - DB_LOCK lock_; -}; - -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -// -// Log classes -// - -class _exported DbLsn : protected DB_LSN -{ - friend class DbEnv; // friendship needed to cast to base class - friend class DbLogc; // friendship needed to cast to base class -}; - -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -// -// Memory pool classes -// - -class _exported DbMpoolFile -{ - friend class DbEnv; - -private: - // Put this first to allow inlining with some C++ compilers (g++-2.95) - DEFINE_DB_CLASS(DbMpoolFile); - -public: - int close(u_int32_t flags); - int get(db_pgno_t *pgnoaddr, u_int32_t flags, void *pagep); - void last_pgno(db_pgno_t *pgnoaddr); - int open(const char *file, u_int32_t flags, int mode, size_t pagesize); - int put(void *pgaddr, u_int32_t flags); - void refcnt(db_pgno_t *pgnoaddr); - int set(void *pgaddr, u_int32_t flags); - int set_clear_len(u_int32_t len); - int set_fileid(u_int8_t *fileid); - int set_ftype(int ftype); - int set_lsn_offset(int32_t offset); - int set_pgcookie(DBT *dbt); - void set_unlink(int); - int sync(); - - virtual DB_MPOOLFILE *get_DB_MPOOLFILE() - { - return (DB_MPOOLFILE *)imp(); - } - - virtual const DB_MPOOLFILE *get_const_DB_MPOOLFILE() const - { - return (const DB_MPOOLFILE *)constimp(); - } - -private: - // We can add data to this class if needed - // since it is implemented via a pointer. - // (see comment at top) - - // Note: use DbEnv::memp_fcreate() to get pointers to a DbMpoolFile, - // and call DbMpoolFile::close() rather than delete to release them. - // - DbMpoolFile(); - - // Shut g++ up. -protected: - virtual ~DbMpoolFile(); - -private: - // no copying - DbMpoolFile(const DbMpoolFile &); - void operator = (const DbMpoolFile &); -}; - -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -// -// This is filled in and returned by the DbEnv::txn_recover() method. -// - -class _exported DbPreplist -{ -public: - DbTxn *txn; - u_int8_t gid[DB_XIDDATASIZE]; -}; - -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -// -// Transaction classes -// - -class _exported DbTxn -{ - friend class DbEnv; - -private: - // Put this first to allow inlining with some C++ compilers (g++-2.95) - DEFINE_DB_CLASS(DbTxn); - -public: - int abort(); - int commit(u_int32_t flags); - int discard(u_int32_t flags); - u_int32_t id(); - int prepare(u_int8_t *gid); - int set_timeout(db_timeout_t timeout, u_int32_t flags); - - virtual DB_TXN *get_DB_TXN() - { - return (DB_TXN *)imp(); - } - - virtual const DB_TXN *get_const_DB_TXN() const - { - return (const DB_TXN *)constimp(); - } - - static DbTxn* get_DbTxn(DB_TXN *txn) - { - return (DbTxn *)txn->api_internal; - } - - static const DbTxn* get_const_DbTxn(const DB_TXN *txn) - { - return (const DbTxn *)txn->api_internal; - } - - // For internal use only. - static DbTxn* wrap_DB_TXN(DB_TXN *txn); - -private: - // We can add data to this class if needed - // since it is implemented via a pointer. - // (see comment at top) - - // Note: use DbEnv::txn_begin() to get pointers to a DbTxn, - // and call DbTxn::abort() or DbTxn::commit rather than - // delete to release them. - // - DbTxn(); - // For internal use only. - DbTxn(DB_TXN *txn); - virtual ~DbTxn(); - - // no copying - DbTxn(const DbTxn &); - void operator = (const DbTxn &); -}; - -// -// Berkeley DB environment class. Provides functions for opening databases. -// User of this library can use this class as a starting point for -// developing a DB application - derive their application class from -// this one, add application control logic. -// -// Note that if you use the default constructor, you must explicitly -// call appinit() before any other db activity (e.g. opening files) -// -class _exported DbEnv -{ - friend class Db; - friend class DbLock; - friend class DbMpoolFile; - -private: - // Put this first to allow inlining with some C++ compilers (g++-2.95) - DEFINE_DB_CLASS(DbEnv); - -public: - // After using this constructor, you can set any needed - // parameters for the environment using the set_* methods. - // Then call open() to finish initializing the environment - // and attaching it to underlying files. - // - DbEnv(u_int32_t flags); - - virtual ~DbEnv(); - - // These methods match those in the C interface. - // - virtual int close(u_int32_t); - virtual int dbremove(DbTxn *txn, const char *name, const char *subdb, - u_int32_t flags); - virtual int dbrename(DbTxn *txn, const char *name, const char *subdb, - const char *newname, u_int32_t flags); - virtual void err(int, const char *, ...); - virtual void errx(const char *, ...); - virtual void *get_app_private() const; - virtual int open(const char *, u_int32_t, int); - virtual int remove(const char *, u_int32_t); - virtual int set_alloc(db_malloc_fcn_type, db_realloc_fcn_type, - db_free_fcn_type); - virtual void set_app_private(void *); - virtual int set_cachesize(u_int32_t, u_int32_t, int); - virtual int set_data_dir(const char *); - virtual int set_encrypt(const char *, int); - virtual void set_errcall(void (*)(const char *, char *)); - virtual void set_errfile(FILE *); - virtual void set_errpfx(const char *); - virtual int set_flags(u_int32_t, int); - virtual int set_feedback(void (*)(DbEnv *, int, int)); - virtual int set_lg_bsize(u_int32_t); - virtual int set_lg_dir(const char *); - virtual int set_lg_max(u_int32_t); - virtual int set_lg_regionmax(u_int32_t); - virtual int set_lk_conflicts(u_int8_t *, int); - virtual int set_lk_detect(u_int32_t); - virtual int set_lk_max(u_int32_t); - virtual int set_lk_max_lockers(u_int32_t); - virtual int set_lk_max_locks(u_int32_t); - virtual int set_lk_max_objects(u_int32_t); - virtual int set_mp_mmapsize(size_t); - virtual int set_paniccall(void (*)(DbEnv *, int)); - virtual int set_rpc_server(void *, char *, long, long, u_int32_t); - virtual int set_shm_key(long); - virtual int set_timeout(db_timeout_t timeout, u_int32_t flags); - virtual int set_tmp_dir(const char *); - virtual int set_tas_spins(u_int32_t); - virtual int set_tx_max(u_int32_t); - virtual int set_app_dispatch(int (*)(DbEnv *, - Dbt *, DbLsn *, db_recops)); - virtual int set_tx_timestamp(time_t *); - virtual int set_verbose(u_int32_t which, int onoff); - - // Version information. A static method so it can be obtained anytime. - // - static char *version(int *major, int *minor, int *patch); - - // Convert DB errors to strings - static char *strerror(int); - - // If an error is detected and the error call function - // or stream is set, a message is dispatched or printed. - // If a prefix is set, each message is prefixed. - // - // You can use set_errcall() or set_errfile() above to control - // error functionality. Alternatively, you can call - // set_error_stream() to force all errors to a C++ stream. - // It is unwise to mix these approaches. - // - virtual void set_error_stream(__DB_OSTREAMCLASS *); - - // used internally - static void runtime_error(const char *caller, int err, - int error_policy); - static void runtime_error_dbt(const char *caller, Dbt *dbt, - int error_policy); - static void runtime_error_lock_get(const char *caller, int err, - db_lockop_t op, db_lockmode_t mode, - const Dbt *obj, DbLock lock, int index, - int error_policy); - - // Lock functions - // - virtual int lock_detect(u_int32_t flags, u_int32_t atype, int *aborted); - virtual int lock_get(u_int32_t locker, u_int32_t flags, const Dbt *obj, - db_lockmode_t lock_mode, DbLock *lock); - virtual int lock_id(u_int32_t *idp); - virtual int lock_id_free(u_int32_t id); - virtual int lock_put(DbLock *lock); - virtual int lock_stat(DB_LOCK_STAT **statp, u_int32_t flags); - virtual int lock_vec(u_int32_t locker, u_int32_t flags, DB_LOCKREQ list[], - int nlist, DB_LOCKREQ **elistp); - - // Log functions - // - virtual int log_archive(char **list[], u_int32_t flags); - static int log_compare(const DbLsn *lsn0, const DbLsn *lsn1); - virtual int log_cursor(DbLogc **cursorp, u_int32_t flags); - virtual int log_file(DbLsn *lsn, char *namep, size_t len); - virtual int log_flush(const DbLsn *lsn); - virtual int log_put(DbLsn *lsn, const Dbt *data, u_int32_t flags); - - virtual int log_stat(DB_LOG_STAT **spp, u_int32_t flags); - - // Mpool functions - // - virtual int memp_fcreate(DbMpoolFile **dbmfp, u_int32_t flags); - virtual int memp_register(int ftype, - pgin_fcn_type pgin_fcn, - pgout_fcn_type pgout_fcn); - virtual int memp_stat(DB_MPOOL_STAT - **gsp, DB_MPOOL_FSTAT ***fsp, u_int32_t flags); - virtual int memp_sync(DbLsn *lsn); - virtual int memp_trickle(int pct, int *nwrotep); - - // Transaction functions - // - virtual int txn_begin(DbTxn *pid, DbTxn **tid, u_int32_t flags); - virtual int txn_checkpoint(u_int32_t kbyte, u_int32_t min, u_int32_t flags); - virtual int txn_recover(DbPreplist *preplist, long count, - long *retp, u_int32_t flags); - virtual int txn_stat(DB_TXN_STAT **statp, u_int32_t flags); - - // Replication functions - // - virtual int rep_elect(int, int, u_int32_t, int *); - virtual int rep_process_message(Dbt *, Dbt *, int *); - virtual int rep_start(Dbt *, u_int32_t); - virtual int rep_stat(DB_REP_STAT **statp, u_int32_t flags); - virtual int set_rep_limit(u_int32_t, u_int32_t); - virtual int set_rep_transport(u_int32_t, - int (*)(DbEnv *, const Dbt *, const Dbt *, int, u_int32_t)); - - // Conversion functions - // - virtual DB_ENV *get_DB_ENV() - { - return (DB_ENV *)imp(); - } - - virtual const DB_ENV *get_const_DB_ENV() const - { - return (const DB_ENV *)constimp(); - } - - static DbEnv* get_DbEnv(DB_ENV *dbenv) - { - return (DbEnv *)dbenv->api1_internal; - } - - static const DbEnv* get_const_DbEnv(const DB_ENV *dbenv) - { - return (const DbEnv *)dbenv->api1_internal; - } - - // For internal use only. - static DbEnv* wrap_DB_ENV(DB_ENV *dbenv); - - // These are public only because they need to be called - // via C functions. They should never be called by users - // of this class. - // - static void _stream_error_function(const char *, char *); - static int _app_dispatch_intercept(DB_ENV *env, DBT *dbt, DB_LSN *lsn, - db_recops op); - static void _paniccall_intercept(DB_ENV *env, int errval); - static void _feedback_intercept(DB_ENV *env, int opcode, int pct); - static int _rep_send_intercept(DB_ENV *env, - const DBT *cntrl, const DBT *data, - int id, u_int32_t flags); - -private: - void cleanup(); - int initialize(DB_ENV *env); - int error_policy(); - - // For internal use only. - DbEnv(DB_ENV *, u_int32_t flags); - - // no copying - DbEnv(const DbEnv &); - void operator = (const DbEnv &); - - // instance data - int construct_error_; - u_int32_t construct_flags_; - int (*app_dispatch_callback_)(DbEnv *, Dbt *, DbLsn *, db_recops); - void (*feedback_callback_)(DbEnv *, int, int); - void (*paniccall_callback_)(DbEnv *, int); - int (*pgin_callback_)(DbEnv *dbenv, db_pgno_t pgno, - void *pgaddr, Dbt *pgcookie); - int (*pgout_callback_)(DbEnv *dbenv, db_pgno_t pgno, - void *pgaddr, Dbt *pgcookie); - int (*rep_send_callback_)(DbEnv *, - const Dbt *, const Dbt *, int, u_int32_t); - - // class data - static __DB_OSTREAMCLASS *error_stream_; -}; - -//////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////// -// -// Table access classes -// - -// -// Represents a database table = a set of keys with associated values. -// -class _exported Db -{ - friend class DbEnv; - -private: - // Put this first to allow inlining with some C++ compilers (g++-2.95) - DEFINE_DB_CLASS(Db); - -public: - Db(DbEnv*, u_int32_t); // create a Db object, then call open() - virtual ~Db(); // does *not* call close. - - // These methods exactly match those in the C interface. - // - virtual int associate(DbTxn *txn, Db *secondary, - int (*callback)(Db *, const Dbt *, const Dbt *, Dbt *), - u_int32_t flags); - virtual int close(u_int32_t flags); - virtual int cursor(DbTxn *txnid, Dbc **cursorp, u_int32_t flags); - virtual int del(DbTxn *txnid, Dbt *key, u_int32_t flags); - virtual void err(int, const char *, ...); - virtual void errx(const char *, ...); - virtual int fd(int *fdp); - virtual int get(DbTxn *txnid, Dbt *key, Dbt *data, u_int32_t flags); - virtual void *get_app_private() const; - virtual int get_byteswapped(int *); - virtual int get_type(DBTYPE *); - virtual int join(Dbc **curslist, Dbc **dbcp, u_int32_t flags); - virtual int key_range(DbTxn *, Dbt *, DB_KEY_RANGE *, u_int32_t); - virtual int open(DbTxn *txnid, - const char *, const char *subname, DBTYPE, u_int32_t, int); - virtual int pget(DbTxn *txnid, Dbt *key, Dbt *pkey, Dbt *data, - u_int32_t flags); - virtual int put(DbTxn *, Dbt *, Dbt *, u_int32_t); - virtual int remove(const char *, const char *, u_int32_t); - virtual int rename(const char *, const char *, const char *, u_int32_t); - virtual int set_alloc(db_malloc_fcn_type, db_realloc_fcn_type, - db_free_fcn_type); - virtual void set_app_private(void *); - virtual int set_append_recno(int (*)(Db *, Dbt *, db_recno_t)); - virtual int set_bt_compare(bt_compare_fcn_type); /*deprecated*/ - virtual int set_bt_compare(int (*)(Db *, const Dbt *, const Dbt *)); - virtual int set_bt_maxkey(u_int32_t); - virtual int set_bt_minkey(u_int32_t); - virtual int set_bt_prefix(bt_prefix_fcn_type); /*deprecated*/ - virtual int set_bt_prefix(size_t (*)(Db *, const Dbt *, const Dbt *)); - virtual int set_cachesize(u_int32_t, u_int32_t, int); - virtual int set_cache_priority(DB_CACHE_PRIORITY); - virtual int set_dup_compare(dup_compare_fcn_type); /*deprecated*/ - virtual int set_dup_compare(int (*)(Db *, const Dbt *, const Dbt *)); - virtual int set_encrypt(const char *, int); - virtual void set_errcall(void (*)(const char *, char *)); - virtual void set_errfile(FILE *); - virtual void set_errpfx(const char *); - virtual int set_feedback(void (*)(Db *, int, int)); - virtual int set_flags(u_int32_t); - virtual int set_h_ffactor(u_int32_t); - virtual int set_h_hash(h_hash_fcn_type); /*deprecated*/ - virtual int set_h_hash(u_int32_t (*)(Db *, const void *, u_int32_t)); - virtual int set_h_nelem(u_int32_t); - virtual int set_lorder(int); - virtual int set_pagesize(u_int32_t); - virtual int set_paniccall(void (*)(DbEnv *, int)); - virtual int set_re_delim(int); - virtual int set_re_len(u_int32_t); - virtual int set_re_pad(int); - virtual int set_re_source(char *); - virtual int set_q_extentsize(u_int32_t); - virtual int stat(void *sp, u_int32_t flags); - virtual int sync(u_int32_t flags); - virtual int truncate(DbTxn *, u_int32_t *, u_int32_t); - virtual int upgrade(const char *name, u_int32_t flags); - virtual int verify(const char *, const char *, __DB_OSTREAMCLASS *, u_int32_t); - - // These additional methods are not in the C interface, and - // are only available for C++. - // - virtual void set_error_stream(__DB_OSTREAMCLASS *); - - virtual DB *get_DB() - { - return (DB *)imp(); - } - - virtual const DB *get_const_DB() const - { - return (const DB *)constimp(); - } - - static Db* get_Db(DB *db) - { - return (Db *)db->api_internal; - } - - static const Db* get_const_Db(const DB *db) - { - return (const Db *)db->api_internal; - } - -private: - // no copying - Db(const Db &); - Db &operator = (const Db &); - - void cleanup(); - int initialize(); - int error_policy(); - - // instance data - DbEnv *env_; - int construct_error_; - u_int32_t flags_; - u_int32_t construct_flags_; - -public: - // These are public only because they need to be called - // via C callback functions. They should never be used by - // external users of this class. - // - int (*append_recno_callback_)(Db *, Dbt *, db_recno_t); - int (*associate_callback_)(Db *, const Dbt *, const Dbt *, Dbt *); - int (*bt_compare_callback_)(Db *, const Dbt *, const Dbt *); - size_t (*bt_prefix_callback_)(Db *, const Dbt *, const Dbt *); - int (*dup_compare_callback_)(Db *, const Dbt *, const Dbt *); - void (*feedback_callback_)(Db *, int, int); - u_int32_t (*h_hash_callback_)(Db *, const void *, u_int32_t); -}; - -// -// A chunk of data, maybe a key or value. -// -class _exported Dbt : private DBT -{ - friend class Dbc; - friend class Db; - friend class DbEnv; - friend class DbLogc; - -public: - - // key/data - void *get_data() const { return data; } - void set_data(void *value) { data = value; } - - // key/data length - u_int32_t get_size() const { return size; } - void set_size(u_int32_t value) { size = value; } - - // RO: length of user buffer. - u_int32_t get_ulen() const { return ulen; } - void set_ulen(u_int32_t value) { ulen = value; } - - // RO: get/put record length. - u_int32_t get_dlen() const { return dlen; } - void set_dlen(u_int32_t value) { dlen = value; } - - // RO: get/put record offset. - u_int32_t get_doff() const { return doff; } - void set_doff(u_int32_t value) { doff = value; } - - // flags - u_int32_t get_flags() const { return flags; } - void set_flags(u_int32_t value) { flags = value; } - - // Conversion functions - DBT *get_DBT() { return (DBT *)this; } - const DBT *get_const_DBT() const { return (const DBT *)this; } - - static Dbt* get_Dbt(DBT *dbt) { return (Dbt *)dbt; } - static const Dbt* get_const_Dbt(const DBT *dbt) - { return (const Dbt *)dbt; } - - Dbt(void *data, u_int32_t size); - Dbt(); - ~Dbt(); - Dbt(const Dbt &); - Dbt &operator = (const Dbt &); - -private: - // Note: no extra data appears in this class (other than - // inherited from DBT) since we need DBT and Dbt objects - // to have interchangable pointers. - // - // When subclassing this class, remember that callback - // methods like bt_compare, bt_prefix, dup_compare may - // internally manufacture DBT objects (which later are - // cast to Dbt), so such callbacks might receive objects - // not of your subclassed type. -}; - -class _exported Dbc : protected DBC -{ - friend class Db; - -public: - int close(); - int count(db_recno_t *countp, u_int32_t flags); - int del(u_int32_t flags); - int dup(Dbc** cursorp, u_int32_t flags); - int get(Dbt* key, Dbt *data, u_int32_t flags); - int pget(Dbt* key, Dbt* pkey, Dbt *data, u_int32_t flags); - int put(Dbt* key, Dbt *data, u_int32_t flags); - -private: - // No data is permitted in this class (see comment at top) - - // Note: use Db::cursor() to get pointers to a Dbc, - // and call Dbc::close() rather than delete to release them. - // - Dbc(); - ~Dbc(); - - // no copying - Dbc(const Dbc &); - Dbc &operator = (const Dbc &); -}; - -class _exported DbLogc : protected DB_LOGC -{ - friend class DbEnv; - -public: - int close(u_int32_t _flags); - int get(DbLsn *lsn, Dbt *data, u_int32_t _flags); - -private: - // No data is permitted in this class (see comment at top) - - // Note: use Db::cursor() to get pointers to a Dbc, - // and call Dbc::close() rather than delete to release them. - // - DbLogc(); - ~DbLogc(); - - // no copying - DbLogc(const Dbc &); - DbLogc &operator = (const Dbc &); -}; -#endif /* !_DB_CXX_H_ */ diff --git a/bdb/build_win32/db_perf.dsp b/bdb/build_win32/db_perf.dsp deleted file mode 100644 index 21b79ed9e19..00000000000 --- a/bdb/build_win32/db_perf.dsp +++ /dev/null @@ -1,216 +0,0 @@ -# Microsoft Developer Studio Project File - Name="db_perf" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=db_perf - Win32 Debug Static -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "db_perf.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "db_perf.mak" CFG="db_perf - Win32 Debug Static" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "db_perf - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "db_perf - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "db_perf - Win32 Release Static" (based on "Win32 (x86) Console Application") -!MESSAGE "db_perf - Win32 Debug Static" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "db_perf - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "../dbinc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release/libdb41.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt" - -!ELSEIF "$(CFG)" == "db_perf - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I ".." /I "../dbinc" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 Debug/libdb41d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no - -!ELSEIF "$(CFG)" == "db_perf - Win32 Release Static" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release_static" -# PROP Intermediate_Dir "Release_static" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "../dbinc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I ".." /I "../dbinc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 Release_static/libdb41.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release_static/libdb41s.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "db_perf - Win32 Debug Static" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug_static" -# PROP Intermediate_Dir "Debug_static" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I ".." /I "../dbinc" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I ".." /I "../dbinc" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 Debug_static/libdb41d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no -# ADD LINK32 Debug_static/libdb41sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no - -!ENDIF - -# Begin Target - -# Name "db_perf - Win32 Release" -# Name "db_perf - Win32 Debug" -# Name "db_perf - Win32 Release Static" -# Name "db_perf - Win32 Debug Static" -# Begin Source File - -SOURCE=..\test_perf\db_perf.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_cache_check.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_checkpoint.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_config.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_dbs.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_debug.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_file.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_key.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_log.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_misc.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_op.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_parse.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_rand.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_spawn.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_thread.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_trickle.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_txn.c -# End Source File -# Begin Source File - -SOURCE=..\test_perf\perf_util.c -# End Source File -# Begin Source File - -SOURCE=..\clib\getopt.c -# End Source File -# End Target -# End Project diff --git a/bdb/build_win32/db_test.dsp b/bdb/build_win32/db_test.dsp deleted file mode 100644 index f014aa95bcf..00000000000 --- a/bdb/build_win32/db_test.dsp +++ /dev/null @@ -1,100 +0,0 @@ -# Microsoft Developer Studio Project File - Name="db_test" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=db_test - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "db_test.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "db_test.mak" CFG="db_test - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "db_test - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "db_test - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "db_test - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "../dbinc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 Release/libdb41.lib /nologo /subsystem:console /machine:I386 -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy built executable files. -PostBuild_Cmds=copy Release\*.exe . -# End Special Build Tool - -!ELSEIF "$(CFG)" == "db_test - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I ".." /I "../dbinc" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 Debug/libdb41d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"Debug/dbkill.exe" /fixed:no -# Begin Special Build Tool -SOURCE="$(InputPath)" -PostBuild_Desc=Copy built executable files. -PostBuild_Cmds=copy Debug\*.exe . -# End Special Build Tool - -!ENDIF - -# Begin Target - -# Name "db_test - Win32 Release" -# Name "db_test - Win32 Debug" -# Begin Source File - -SOURCE=.\dbkill.cpp -# End Source File -# End Target -# End Project diff --git a/bdb/build_win32/libdb.def b/bdb/build_win32/libdb.def deleted file mode 100644 index afcb092382e..00000000000 --- a/bdb/build_win32/libdb.def +++ /dev/null @@ -1,128 +0,0 @@ -; DO NOT EDIT: automatically built by dist/s_win32. - -DESCRIPTION 'Berkeley DB 4.1 Library' - -EXPORTS - db_create @1 - db_env_create @2 - db_strerror @3 - db_version @4 - db_xa_switch @5 - log_compare @6 - txn_abort @7 - txn_begin @8 - txn_commit @9 - db_env_set_func_close @10 - db_env_set_func_dirfree @11 - db_env_set_func_dirlist @12 - db_env_set_func_exists @13 - db_env_set_func_free @14 - db_env_set_func_fsync @15 - db_env_set_func_ioinfo @16 - db_env_set_func_malloc @17 - db_env_set_func_map @18 - db_env_set_func_open @19 - db_env_set_func_read @20 - db_env_set_func_realloc @21 - db_env_set_func_rename @22 - db_env_set_func_seek @23 - db_env_set_func_sleep @24 - db_env_set_func_unlink @25 - db_env_set_func_unmap @26 - db_env_set_func_write @27 - db_env_set_func_yield @28 - __db_add_recovery @29 - __db_dbm_close @30 - __db_dbm_delete @31 - __db_dbm_fetch @32 - __db_dbm_firstkey @33 - __db_dbm_init @34 - __db_dbm_nextkey @35 - __db_dbm_store @36 - __db_hcreate @37 - __db_hdestroy @38 - __db_hsearch @39 - __db_loadme @40 - __db_ndbm_clearerr @41 - __db_ndbm_close @42 - __db_ndbm_delete @43 - __db_ndbm_dirfno @44 - __db_ndbm_error @45 - __db_ndbm_fetch @46 - __db_ndbm_firstkey @47 - __db_ndbm_nextkey @48 - __db_ndbm_open @49 - __db_ndbm_pagfno @50 - __db_ndbm_rdonly @51 - __db_ndbm_store @52 - __db_panic @53 - __db_r_attach @54 - __db_r_detach @55 - __db_win32_mutex_init @56 - __db_win32_mutex_lock @57 - __db_win32_mutex_unlock @58 - __ham_func2 @59 - __ham_func3 @60 - __ham_func4 @61 - __ham_func5 @62 - __ham_test @63 - __lock_dump_region @64 - __memp_dump_region @65 - __os_calloc @66 - __os_closehandle @67 - __os_free @68 - __os_ioinfo @69 - __os_malloc @70 - __os_open @71 - __os_openhandle @72 - __os_read @73 - __os_realloc @74 - __os_strdup @75 - __os_umalloc @76 - __os_write @77 - __bam_init_print @78 - __bam_pgin @79 - __bam_pgout @80 - __crdel_init_print @81 - __db_dispatch @82 - __db_dump @83 - __db_e_stat @84 - __db_err @85 - __db_getlong @86 - __db_getulong @87 - __db_global_values @88 - __db_init_print @89 - __db_inmemdbflags @90 - __db_isbigendian @91 - __db_omode @92 - __db_overwrite @93 - __db_pgin @94 - __db_pgout @95 - __db_prdbt @96 - __db_prfooter @97 - __db_prheader @98 - __db_rpath @99 - __db_util_cache @100 - __db_util_interrupted @101 - __db_util_logset @102 - __db_util_siginit @103 - __db_util_sigresend @104 - __db_verify_callback @105 - __db_verify_internal @106 - __dbreg_init_print @107 - __fop_init_print @108 - __ham_get_meta @109 - __ham_init_print @110 - __ham_pgin @111 - __ham_pgout @112 - __ham_release_meta @113 - __os_clock @114 - __os_get_errno @115 - __os_id @116 - __os_set_errno @117 - __os_sleep @118 - __os_ufree @119 - __os_yield @120 - __qam_init_print @121 - __qam_pgin_out @122 - __txn_init_print @123 diff --git a/bdb/dbinc_auto/btree_auto.h b/bdb/dbinc_auto/btree_auto.h deleted file mode 100644 index 4feb07ad94c..00000000000 --- a/bdb/dbinc_auto/btree_auto.h +++ /dev/null @@ -1,128 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef __bam_AUTO_H -#define __bam_AUTO_H -#define DB___bam_split 62 -typedef struct ___bam_split_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t left; - DB_LSN llsn; - db_pgno_t right; - DB_LSN rlsn; - u_int32_t indx; - db_pgno_t npgno; - DB_LSN nlsn; - db_pgno_t root_pgno; - DBT pg; - u_int32_t opflags; -} __bam_split_args; - -#define DB___bam_rsplit 63 -typedef struct ___bam_rsplit_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DBT pgdbt; - db_pgno_t root_pgno; - db_pgno_t nrec; - DBT rootent; - DB_LSN rootlsn; -} __bam_rsplit_args; - -#define DB___bam_adj 55 -typedef struct ___bam_adj_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DB_LSN lsn; - u_int32_t indx; - u_int32_t indx_copy; - u_int32_t is_insert; -} __bam_adj_args; - -#define DB___bam_cadjust 56 -typedef struct ___bam_cadjust_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DB_LSN lsn; - u_int32_t indx; - int32_t adjust; - u_int32_t opflags; -} __bam_cadjust_args; - -#define DB___bam_cdel 57 -typedef struct ___bam_cdel_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DB_LSN lsn; - u_int32_t indx; -} __bam_cdel_args; - -#define DB___bam_repl 58 -typedef struct ___bam_repl_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DB_LSN lsn; - u_int32_t indx; - u_int32_t isdeleted; - DBT orig; - DBT repl; - u_int32_t prefix; - u_int32_t suffix; -} __bam_repl_args; - -#define DB___bam_root 59 -typedef struct ___bam_root_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t meta_pgno; - db_pgno_t root_pgno; - DB_LSN meta_lsn; -} __bam_root_args; - -#define DB___bam_curadj 64 -typedef struct ___bam_curadj_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_ca_mode mode; - db_pgno_t from_pgno; - db_pgno_t to_pgno; - db_pgno_t left_pgno; - u_int32_t first_indx; - u_int32_t from_indx; - u_int32_t to_indx; -} __bam_curadj_args; - -#define DB___bam_rcuradj 65 -typedef struct ___bam_rcuradj_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - ca_recno_arg mode; - db_pgno_t root; - db_recno_t recno; - u_int32_t order; -} __bam_rcuradj_args; - -#endif diff --git a/bdb/dbinc_auto/crdel_auto.h b/bdb/dbinc_auto/crdel_auto.h deleted file mode 100644 index bdae193fac8..00000000000 --- a/bdb/dbinc_auto/crdel_auto.h +++ /dev/null @@ -1,16 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef __crdel_AUTO_H -#define __crdel_AUTO_H -#define DB___crdel_metasub 142 -typedef struct ___crdel_metasub_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DBT page; - DB_LSN lsn; -} __crdel_metasub_args; - -#endif diff --git a/bdb/dbinc_auto/db_auto.h b/bdb/dbinc_auto/db_auto.h deleted file mode 100644 index e56f38b384b..00000000000 --- a/bdb/dbinc_auto/db_auto.h +++ /dev/null @@ -1,118 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef __db_AUTO_H -#define __db_AUTO_H -#define DB___db_addrem 41 -typedef struct ___db_addrem_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - int32_t fileid; - db_pgno_t pgno; - u_int32_t indx; - u_int32_t nbytes; - DBT hdr; - DBT dbt; - DB_LSN pagelsn; -} __db_addrem_args; - -#define DB___db_big 43 -typedef struct ___db_big_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - int32_t fileid; - db_pgno_t pgno; - db_pgno_t prev_pgno; - db_pgno_t next_pgno; - DBT dbt; - DB_LSN pagelsn; - DB_LSN prevlsn; - DB_LSN nextlsn; -} __db_big_args; - -#define DB___db_ovref 44 -typedef struct ___db_ovref_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - int32_t adjust; - DB_LSN lsn; -} __db_ovref_args; - -#define DB___db_relink 45 -typedef struct ___db_relink_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - int32_t fileid; - db_pgno_t pgno; - DB_LSN lsn; - db_pgno_t prev; - DB_LSN lsn_prev; - db_pgno_t next; - DB_LSN lsn_next; -} __db_relink_args; - -#define DB___db_debug 47 -typedef struct ___db_debug_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - DBT op; - int32_t fileid; - DBT key; - DBT data; - u_int32_t arg_flags; -} __db_debug_args; - -#define DB___db_noop 48 -typedef struct ___db_noop_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DB_LSN prevlsn; -} __db_noop_args; - -#define DB___db_pg_alloc 49 -typedef struct ___db_pg_alloc_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - DB_LSN meta_lsn; - db_pgno_t meta_pgno; - DB_LSN page_lsn; - db_pgno_t pgno; - u_int32_t ptype; - db_pgno_t next; -} __db_pg_alloc_args; - -#define DB___db_pg_free 50 -typedef struct ___db_pg_free_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DB_LSN meta_lsn; - db_pgno_t meta_pgno; - DBT header; - db_pgno_t next; -} __db_pg_free_args; - -#define DB___db_cksum 51 -typedef struct ___db_cksum_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; -} __db_cksum_args; - -#endif diff --git a/bdb/dbinc_auto/dbreg_auto.h b/bdb/dbinc_auto/dbreg_auto.h deleted file mode 100644 index 4d7d4a91b45..00000000000 --- a/bdb/dbinc_auto/dbreg_auto.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef __dbreg_AUTO_H -#define __dbreg_AUTO_H -#define DB___dbreg_register 2 -typedef struct ___dbreg_register_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - DBT name; - DBT uid; - int32_t fileid; - DBTYPE ftype; - db_pgno_t meta_pgno; - u_int32_t id; -} __dbreg_register_args; - -#endif diff --git a/bdb/dbinc_auto/fileops_auto.h b/bdb/dbinc_auto/fileops_auto.h deleted file mode 100644 index ee1f58616ce..00000000000 --- a/bdb/dbinc_auto/fileops_auto.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef __fop_AUTO_H -#define __fop_AUTO_H -#define DB___fop_create 143 -typedef struct ___fop_create_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - DBT name; - u_int32_t appname; - u_int32_t mode; -} __fop_create_args; - -#define DB___fop_remove 144 -typedef struct ___fop_remove_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - DBT name; - DBT fid; - u_int32_t appname; -} __fop_remove_args; - -#define DB___fop_write 145 -typedef struct ___fop_write_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - DBT name; - u_int32_t appname; - u_int32_t offset; - DBT page; - u_int32_t flag; -} __fop_write_args; - -#define DB___fop_rename 146 -typedef struct ___fop_rename_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - DBT oldname; - DBT newname; - DBT fileid; - u_int32_t appname; -} __fop_rename_args; - -#define DB___fop_file_remove 141 -typedef struct ___fop_file_remove_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - DBT real_fid; - DBT tmp_fid; - DBT name; - u_int32_t appname; - u_int32_t child; -} __fop_file_remove_args; - -#endif diff --git a/bdb/dbinc_auto/hash_auto.h b/bdb/dbinc_auto/hash_auto.h deleted file mode 100644 index 7ec3fb7ef08..00000000000 --- a/bdb/dbinc_auto/hash_auto.h +++ /dev/null @@ -1,132 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef __ham_AUTO_H -#define __ham_AUTO_H -#define DB___ham_insdel 21 -typedef struct ___ham_insdel_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - int32_t fileid; - db_pgno_t pgno; - u_int32_t ndx; - DB_LSN pagelsn; - DBT key; - DBT data; -} __ham_insdel_args; - -#define DB___ham_newpage 22 -typedef struct ___ham_newpage_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - int32_t fileid; - db_pgno_t prev_pgno; - DB_LSN prevlsn; - db_pgno_t new_pgno; - DB_LSN pagelsn; - db_pgno_t next_pgno; - DB_LSN nextlsn; -} __ham_newpage_args; - -#define DB___ham_splitdata 24 -typedef struct ___ham_splitdata_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - u_int32_t opcode; - db_pgno_t pgno; - DBT pageimage; - DB_LSN pagelsn; -} __ham_splitdata_args; - -#define DB___ham_replace 25 -typedef struct ___ham_replace_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - u_int32_t ndx; - DB_LSN pagelsn; - int32_t off; - DBT olditem; - DBT newitem; - u_int32_t makedup; -} __ham_replace_args; - -#define DB___ham_copypage 28 -typedef struct ___ham_copypage_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - DB_LSN pagelsn; - db_pgno_t next_pgno; - DB_LSN nextlsn; - db_pgno_t nnext_pgno; - DB_LSN nnextlsn; - DBT page; -} __ham_copypage_args; - -#define DB___ham_metagroup 29 -typedef struct ___ham_metagroup_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - u_int32_t bucket; - db_pgno_t mmpgno; - DB_LSN mmetalsn; - db_pgno_t mpgno; - DB_LSN metalsn; - db_pgno_t pgno; - DB_LSN pagelsn; - u_int32_t newalloc; -} __ham_metagroup_args; - -#define DB___ham_groupalloc 32 -typedef struct ___ham_groupalloc_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - DB_LSN meta_lsn; - db_pgno_t start_pgno; - u_int32_t num; - db_pgno_t free; -} __ham_groupalloc_args; - -#define DB___ham_curadj 33 -typedef struct ___ham_curadj_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_pgno_t pgno; - u_int32_t indx; - u_int32_t len; - u_int32_t dup_off; - int add; - int is_dup; - u_int32_t order; -} __ham_curadj_args; - -#define DB___ham_chgpg 34 -typedef struct ___ham_chgpg_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_ham_mode mode; - db_pgno_t old_pgno; - db_pgno_t new_pgno; - u_int32_t old_indx; - u_int32_t new_indx; -} __ham_chgpg_args; - -#endif diff --git a/bdb/dbinc_auto/qam_auto.h b/bdb/dbinc_auto/qam_auto.h deleted file mode 100644 index 655c6d0280f..00000000000 --- a/bdb/dbinc_auto/qam_auto.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef __qam_AUTO_H -#define __qam_AUTO_H -#define DB___qam_incfirst 84 -typedef struct ___qam_incfirst_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - db_recno_t recno; - db_pgno_t meta_pgno; -} __qam_incfirst_args; - -#define DB___qam_mvptr 85 -typedef struct ___qam_mvptr_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - int32_t fileid; - db_recno_t old_first; - db_recno_t new_first; - db_recno_t old_cur; - db_recno_t new_cur; - DB_LSN metalsn; - db_pgno_t meta_pgno; -} __qam_mvptr_args; - -#define DB___qam_del 79 -typedef struct ___qam_del_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - DB_LSN lsn; - db_pgno_t pgno; - u_int32_t indx; - db_recno_t recno; -} __qam_del_args; - -#define DB___qam_add 80 -typedef struct ___qam_add_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - DB_LSN lsn; - db_pgno_t pgno; - u_int32_t indx; - db_recno_t recno; - DBT data; - u_int32_t vflag; - DBT olddata; -} __qam_add_args; - -#define DB___qam_delext 83 -typedef struct ___qam_delext_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - int32_t fileid; - DB_LSN lsn; - db_pgno_t pgno; - u_int32_t indx; - db_recno_t recno; - DBT data; -} __qam_delext_args; - -#endif diff --git a/bdb/dbinc_auto/txn_auto.h b/bdb/dbinc_auto/txn_auto.h deleted file mode 100644 index ac841ba5bc3..00000000000 --- a/bdb/dbinc_auto/txn_auto.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ - -#ifndef __txn_AUTO_H -#define __txn_AUTO_H -#define DB___txn_regop 10 -typedef struct ___txn_regop_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - int32_t timestamp; -} __txn_regop_args; - -#define DB___txn_ckp 11 -typedef struct ___txn_ckp_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - DB_LSN ckp_lsn; - DB_LSN last_ckp; - int32_t timestamp; -} __txn_ckp_args; - -#define DB___txn_child 12 -typedef struct ___txn_child_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t child; - DB_LSN c_lsn; -} __txn_child_args; - -#define DB___txn_xa_regop 13 -typedef struct ___txn_xa_regop_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t opcode; - DBT xid; - int32_t formatID; - u_int32_t gtrid; - u_int32_t bqual; - DB_LSN begin_lsn; -} __txn_xa_regop_args; - -#define DB___txn_recycle 14 -typedef struct ___txn_recycle_args { - u_int32_t type; - DB_TXN *txnid; - DB_LSN prev_lsn; - u_int32_t min; - u_int32_t max; -} __txn_recycle_args; - -#endif diff --git a/bdb/dbreg/dbreg_auto.c b/bdb/dbreg/dbreg_auto.c deleted file mode 100644 index 91eace3f4bf..00000000000 --- a/bdb/dbreg/dbreg_auto.c +++ /dev/null @@ -1,358 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include -#endif - -#include "db_int.h" -#include "dbinc/crypto.h" -#include "dbinc/db_page.h" -#include "dbinc/db_dispatch.h" -#include "dbinc/db_am.h" -#include "dbinc/log.h" -#include "dbinc/rep.h" -#include "dbinc/txn.h" - -/* - * PUBLIC: int __dbreg_register_log __P((DB_ENV *, DB_TXN *, - * PUBLIC: DB_LSN *, u_int32_t, u_int32_t, const DBT *, const DBT *, - * PUBLIC: int32_t, DBTYPE, db_pgno_t, u_int32_t)); - */ -int -__dbreg_register_log(dbenv, txnid, ret_lsnp, flags, - opcode, name, uid, fileid, ftype, meta_pgno, - id) - DB_ENV *dbenv; - DB_TXN *txnid; - DB_LSN *ret_lsnp; - u_int32_t flags; - u_int32_t opcode; - const DBT *name; - const DBT *uid; - int32_t fileid; - DBTYPE ftype; - db_pgno_t meta_pgno; - u_int32_t id; -{ - DBT logrec; - DB_LSN *lsnp, null_lsn; - u_int32_t zero; - u_int32_t uinttmp; - u_int32_t npad, rectype, txn_num; - int ret; - u_int8_t *bp; - - rectype = DB___dbreg_register; - npad = 0; - - if (txnid == NULL) { - txn_num = 0; - null_lsn.file = 0; - null_lsn.offset = 0; - lsnp = &null_lsn; - } else { - if (TAILQ_FIRST(&txnid->kids) != NULL && - (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) - return (ret); - txn_num = txnid->txnid; - lsnp = &txnid->last_lsn; - } - - logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) - + sizeof(u_int32_t) - + sizeof(u_int32_t) + (name == NULL ? 0 : name->size) - + sizeof(u_int32_t) + (uid == NULL ? 0 : uid->size) - + sizeof(u_int32_t) - + sizeof(u_int32_t) - + sizeof(u_int32_t) - + sizeof(u_int32_t); - if (CRYPTO_ON(dbenv)) { - npad = - ((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size); - logrec.size += npad; - } - - if ((ret = __os_malloc(dbenv, - logrec.size, &logrec.data)) != 0) - return (ret); - - if (npad > 0) - memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad); - - bp = logrec.data; - - memcpy(bp, &rectype, sizeof(rectype)); - bp += sizeof(rectype); - - memcpy(bp, &txn_num, sizeof(txn_num)); - bp += sizeof(txn_num); - - memcpy(bp, lsnp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - uinttmp = (u_int32_t)opcode; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - if (name == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &name->size, sizeof(name->size)); - bp += sizeof(name->size); - memcpy(bp, name->data, name->size); - bp += name->size; - } - - if (uid == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &uid->size, sizeof(uid->size)); - bp += sizeof(uid->size); - memcpy(bp, uid->data, uid->size); - bp += uid->size; - } - - uinttmp = (u_int32_t)fileid; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - uinttmp = (u_int32_t)ftype; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - uinttmp = (u_int32_t)meta_pgno; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - uinttmp = (u_int32_t)id; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size); - ret = dbenv->log_put(dbenv, - ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY); - if (txnid != NULL && ret == 0) - txnid->last_lsn = *ret_lsnp; -#ifdef LOG_DIAGNOSTIC - if (ret != 0) - (void)__dbreg_register_print(dbenv, - (DBT *)&logrec, ret_lsnp, NULL, NULL); -#endif - __os_free(dbenv, logrec.data); - return (ret); -} - -/* - * PUBLIC: int __dbreg_register_getpgnos __P((DB_ENV *, DBT *, - * PUBLIC: DB_LSN *, db_recops, void *)); - */ -int -__dbreg_register_getpgnos(dbenv, rec, lsnp, notused1, summary) - DB_ENV *dbenv; - DBT *rec; - DB_LSN *lsnp; - db_recops notused1; - void *summary; -{ - TXN_RECS *t; - int ret; - COMPQUIET(rec, NULL); - COMPQUIET(notused1, DB_TXN_ABORT); - - t = (TXN_RECS *)summary; - - if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) - return (ret); - - t->array[t->npages].flags = LSN_PAGE_NOLOCK; - t->array[t->npages].lsn = *lsnp; - t->array[t->npages].fid = DB_LOGFILEID_INVALID; - memset(&t->array[t->npages].pgdesc, 0, - sizeof(t->array[t->npages].pgdesc)); - - t->npages++; - - return (0); -} - -/* - * PUBLIC: int __dbreg_register_print __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__dbreg_register_print(dbenv, dbtp, lsnp, notused2, notused3) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops notused2; - void *notused3; -{ - __dbreg_register_args *argp; - u_int32_t i; - int ch; - int ret; - - notused2 = DB_TXN_ABORT; - notused3 = NULL; - - if ((ret = __dbreg_register_read(dbenv, dbtp->data, &argp)) != 0) - return (ret); - (void)printf( - "[%lu][%lu]__dbreg_register: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", - (u_long)lsnp->file, - (u_long)lsnp->offset, - (u_long)argp->type, - (u_long)argp->txnid->txnid, - (u_long)argp->prev_lsn.file, - (u_long)argp->prev_lsn.offset); - (void)printf("\topcode: %lu\n", (u_long)argp->opcode); - (void)printf("\tname: "); - for (i = 0; i < argp->name.size; i++) { - ch = ((u_int8_t *)argp->name.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tuid: "); - for (i = 0; i < argp->uid.size; i++) { - ch = ((u_int8_t *)argp->uid.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tfileid: %ld\n", (long)argp->fileid); - (void)printf("\tftype: 0x%lx\n", (u_long)argp->ftype); - (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno); - (void)printf("\tid: 0x%lx\n", (u_long)argp->id); - (void)printf("\n"); - __os_free(dbenv, argp); - return (0); -} - -/* - * PUBLIC: int __dbreg_register_read __P((DB_ENV *, void *, - * PUBLIC: __dbreg_register_args **)); - */ -int -__dbreg_register_read(dbenv, recbuf, argpp) - DB_ENV *dbenv; - void *recbuf; - __dbreg_register_args **argpp; -{ - __dbreg_register_args *argp; - u_int32_t uinttmp; - u_int8_t *bp; - int ret; - - if ((ret = __os_malloc(dbenv, - sizeof(__dbreg_register_args) + sizeof(DB_TXN), &argp)) != 0) - return (ret); - - argp->txnid = (DB_TXN *)&argp[1]; - - bp = recbuf; - memcpy(&argp->type, bp, sizeof(argp->type)); - bp += sizeof(argp->type); - - memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); - bp += sizeof(argp->txnid->txnid); - - memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->opcode = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - memset(&argp->name, 0, sizeof(argp->name)); - memcpy(&argp->name.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->name.data = bp; - bp += argp->name.size; - - memset(&argp->uid, 0, sizeof(argp->uid)); - memcpy(&argp->uid.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->uid.data = bp; - bp += argp->uid.size; - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->fileid = (int32_t)uinttmp; - bp += sizeof(uinttmp); - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->ftype = (DBTYPE)uinttmp; - bp += sizeof(uinttmp); - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->meta_pgno = (db_pgno_t)uinttmp; - bp += sizeof(uinttmp); - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->id = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - *argpp = argp; - return (0); -} - -/* - * PUBLIC: int __dbreg_init_print __P((DB_ENV *, int (***)(DB_ENV *, - * PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *)); - */ -int -__dbreg_init_print(dbenv, dtabp, dtabsizep) - DB_ENV *dbenv; - int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t *dtabsizep; -{ - int ret; - - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __dbreg_register_print, DB___dbreg_register)) != 0) - return (ret); - return (0); -} - -/* - * PUBLIC: int __dbreg_init_getpgnos __P((DB_ENV *, - * PUBLIC: int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), - * PUBLIC: size_t *)); - */ -int -__dbreg_init_getpgnos(dbenv, dtabp, dtabsizep) - DB_ENV *dbenv; - int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t *dtabsizep; -{ - int ret; - - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __dbreg_register_getpgnos, DB___dbreg_register)) != 0) - return (ret); - return (0); -} - -/* - * PUBLIC: int __dbreg_init_recover __P((DB_ENV *, int (***)(DB_ENV *, - * PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *)); - */ -int -__dbreg_init_recover(dbenv, dtabp, dtabsizep) - DB_ENV *dbenv; - int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t *dtabsizep; -{ - int ret; - - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __dbreg_register_recover, DB___dbreg_register)) != 0) - return (ret); - return (0); -} diff --git a/bdb/dist/template/rec_dbreg b/bdb/dist/template/rec_dbreg deleted file mode 100644 index bbdf19d5ffc..00000000000 --- a/bdb/dist/template/rec_dbreg +++ /dev/null @@ -1,75 +0,0 @@ -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/__dbreg.h" -#include "dbinc/log.h" - -/* - * __dbreg_register_recover -- - * Recovery function for register. - * - * PUBLIC: int __dbreg_register_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__dbreg_register_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __dbreg_register_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__dbreg_register_print); - REC_INTRO(__dbreg_register_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - diff --git a/bdb/dist/template/rec_fileops b/bdb/dist/template/rec_fileops deleted file mode 100644 index c1487835ea9..00000000000 --- a/bdb/dist/template/rec_fileops +++ /dev/null @@ -1,323 +0,0 @@ -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/__fop.h" -#include "dbinc/log.h" - -/* - * __fop_create_recover -- - * Recovery function for create. - * - * PUBLIC: int __fop_create_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_create_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_create_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_create_print); - REC_INTRO(__fop_create_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - -/* - * __fop_remove_recover -- - * Recovery function for remove. - * - * PUBLIC: int __fop_remove_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_remove_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_remove_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_remove_print); - REC_INTRO(__fop_remove_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - -/* - * __fop_write_recover -- - * Recovery function for write. - * - * PUBLIC: int __fop_write_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_write_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_write_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_write_print); - REC_INTRO(__fop_write_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - -/* - * __fop_rename_recover -- - * Recovery function for rename. - * - * PUBLIC: int __fop_rename_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_rename_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_rename_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_rename_print); - REC_INTRO(__fop_rename_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - -/* - * __fop_file_remove_recover -- - * Recovery function for file_remove. - * - * PUBLIC: int __fop_file_remove_recover - * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - */ -int -__fop_file_remove_recover(dbenv, dbtp, lsnp, op, info) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops op; - void *info; -{ - __fop_file_remove_args *argp; - DB *file_dbp; - DBC *dbc; - DB_MPOOLFILE *mpf; - PAGE *pagep; - int cmp_n, cmp_p, modified, ret; - - REC_PRINT(__fop_file_remove_print); - REC_INTRO(__fop_file_remove_read, 1); - - if ((ret = mpf->get(mpf, &argp->pgno, 0, &pagep)) != 0) - if (DB_REDO(op)) { - if ((ret = mpf->get(mpf, - &argp->pgno, DB_MPOOL_CREATE, &pagep)) != 0) - goto out; - } else { - *lsnp = argp->prev_lsn; - ret = 0; - goto out; - } - - modified = 0; - cmp_n = log_compare(lsnp, &LSN(pagep)); - - /* - * Use this when there is something like "pagelsn" in the argp - * structure. Sometimes, you might need to compare meta-data - * lsn's instead. - * - * cmp_p = log_compare(&LSN(pagep), argp->pagelsn); - */ - if (cmp_p == 0 && DB_REDO(op)) { - /* Need to redo update described. */ - modified = 1; - } else if (cmp_n == 0 && !DB_REDO(op)) { - /* Need to undo update described. */ - modified = 1; - } - if (ret = mpf->put(mpf, pagep, modified ? DB_MPOOL_DIRTY : 0)) - goto out; - - *lsnp = argp->prev_lsn; - ret = 0; - -out: REC_CLOSE; -} - diff --git a/bdb/fileops/fileops_auto.c b/bdb/fileops/fileops_auto.c deleted file mode 100644 index f38640b7480..00000000000 --- a/bdb/fileops/fileops_auto.c +++ /dev/null @@ -1,1371 +0,0 @@ -/* Do not edit: automatically built by gen_rec.awk. */ -#include "db_config.h" - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include -#endif - -#include "db_int.h" -#include "dbinc/crypto.h" -#include "dbinc/db_page.h" -#include "dbinc/db_dispatch.h" -#include "dbinc/db_am.h" -#include "dbinc/log.h" -#include "dbinc/rep.h" -#include "dbinc/txn.h" -#include "dbinc/fop.h" - -/* - * PUBLIC: int __fop_create_log __P((DB_ENV *, DB_TXN *, DB_LSN *, - * PUBLIC: u_int32_t, const DBT *, u_int32_t, u_int32_t)); - */ -int -__fop_create_log(dbenv, txnid, ret_lsnp, flags, - name, appname, mode) - DB_ENV *dbenv; - DB_TXN *txnid; - DB_LSN *ret_lsnp; - u_int32_t flags; - const DBT *name; - u_int32_t appname; - u_int32_t mode; -{ - DBT logrec; - DB_LSN *lsnp, null_lsn; - u_int32_t zero; - u_int32_t uinttmp; - u_int32_t npad, rectype, txn_num; - int ret; - u_int8_t *bp; - - rectype = DB___fop_create; - npad = 0; - - if (txnid == NULL) { - txn_num = 0; - null_lsn.file = 0; - null_lsn.offset = 0; - lsnp = &null_lsn; - } else { - if (TAILQ_FIRST(&txnid->kids) != NULL && - (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) - return (ret); - txn_num = txnid->txnid; - lsnp = &txnid->last_lsn; - } - - logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) - + sizeof(u_int32_t) + (name == NULL ? 0 : name->size) - + sizeof(u_int32_t) - + sizeof(u_int32_t); - if (CRYPTO_ON(dbenv)) { - npad = - ((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size); - logrec.size += npad; - } - - if ((ret = __os_malloc(dbenv, - logrec.size, &logrec.data)) != 0) - return (ret); - - if (npad > 0) - memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad); - - bp = logrec.data; - - memcpy(bp, &rectype, sizeof(rectype)); - bp += sizeof(rectype); - - memcpy(bp, &txn_num, sizeof(txn_num)); - bp += sizeof(txn_num); - - memcpy(bp, lsnp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - if (name == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &name->size, sizeof(name->size)); - bp += sizeof(name->size); - memcpy(bp, name->data, name->size); - bp += name->size; - } - - uinttmp = (u_int32_t)appname; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - uinttmp = (u_int32_t)mode; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size); - ret = dbenv->log_put(dbenv, - ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY); - if (txnid != NULL && ret == 0) - txnid->last_lsn = *ret_lsnp; -#ifdef LOG_DIAGNOSTIC - if (ret != 0) - (void)__fop_create_print(dbenv, - (DBT *)&logrec, ret_lsnp, NULL, NULL); -#endif - __os_free(dbenv, logrec.data); - return (ret); -} - -/* - * PUBLIC: int __fop_create_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__fop_create_getpgnos(dbenv, rec, lsnp, notused1, summary) - DB_ENV *dbenv; - DBT *rec; - DB_LSN *lsnp; - db_recops notused1; - void *summary; -{ - TXN_RECS *t; - int ret; - COMPQUIET(rec, NULL); - COMPQUIET(notused1, DB_TXN_ABORT); - - t = (TXN_RECS *)summary; - - if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) - return (ret); - - t->array[t->npages].flags = LSN_PAGE_NOLOCK; - t->array[t->npages].lsn = *lsnp; - t->array[t->npages].fid = DB_LOGFILEID_INVALID; - memset(&t->array[t->npages].pgdesc, 0, - sizeof(t->array[t->npages].pgdesc)); - - t->npages++; - - return (0); -} - -/* - * PUBLIC: int __fop_create_print __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__fop_create_print(dbenv, dbtp, lsnp, notused2, notused3) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops notused2; - void *notused3; -{ - __fop_create_args *argp; - u_int32_t i; - int ch; - int ret; - - notused2 = DB_TXN_ABORT; - notused3 = NULL; - - if ((ret = __fop_create_read(dbenv, dbtp->data, &argp)) != 0) - return (ret); - (void)printf( - "[%lu][%lu]__fop_create: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", - (u_long)lsnp->file, - (u_long)lsnp->offset, - (u_long)argp->type, - (u_long)argp->txnid->txnid, - (u_long)argp->prev_lsn.file, - (u_long)argp->prev_lsn.offset); - (void)printf("\tname: "); - for (i = 0; i < argp->name.size; i++) { - ch = ((u_int8_t *)argp->name.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tappname: %lu\n", (u_long)argp->appname); - (void)printf("\tmode: %o\n", argp->mode); - (void)printf("\n"); - __os_free(dbenv, argp); - return (0); -} - -/* - * PUBLIC: int __fop_create_read __P((DB_ENV *, void *, __fop_create_args **)); - */ -int -__fop_create_read(dbenv, recbuf, argpp) - DB_ENV *dbenv; - void *recbuf; - __fop_create_args **argpp; -{ - __fop_create_args *argp; - u_int32_t uinttmp; - u_int8_t *bp; - int ret; - - if ((ret = __os_malloc(dbenv, - sizeof(__fop_create_args) + sizeof(DB_TXN), &argp)) != 0) - return (ret); - - argp->txnid = (DB_TXN *)&argp[1]; - - bp = recbuf; - memcpy(&argp->type, bp, sizeof(argp->type)); - bp += sizeof(argp->type); - - memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); - bp += sizeof(argp->txnid->txnid); - - memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - memset(&argp->name, 0, sizeof(argp->name)); - memcpy(&argp->name.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->name.data = bp; - bp += argp->name.size; - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->appname = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->mode = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - *argpp = argp; - return (0); -} - -/* - * PUBLIC: int __fop_remove_log __P((DB_ENV *, DB_TXN *, DB_LSN *, - * PUBLIC: u_int32_t, const DBT *, const DBT *, u_int32_t)); - */ -int -__fop_remove_log(dbenv, txnid, ret_lsnp, flags, - name, fid, appname) - DB_ENV *dbenv; - DB_TXN *txnid; - DB_LSN *ret_lsnp; - u_int32_t flags; - const DBT *name; - const DBT *fid; - u_int32_t appname; -{ - DBT logrec; - DB_LSN *lsnp, null_lsn; - u_int32_t zero; - u_int32_t uinttmp; - u_int32_t npad, rectype, txn_num; - int ret; - u_int8_t *bp; - - rectype = DB___fop_remove; - npad = 0; - - if (txnid == NULL) { - txn_num = 0; - null_lsn.file = 0; - null_lsn.offset = 0; - lsnp = &null_lsn; - } else { - if (TAILQ_FIRST(&txnid->kids) != NULL && - (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) - return (ret); - txn_num = txnid->txnid; - lsnp = &txnid->last_lsn; - } - - logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) - + sizeof(u_int32_t) + (name == NULL ? 0 : name->size) - + sizeof(u_int32_t) + (fid == NULL ? 0 : fid->size) - + sizeof(u_int32_t); - if (CRYPTO_ON(dbenv)) { - npad = - ((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size); - logrec.size += npad; - } - - if ((ret = __os_malloc(dbenv, - logrec.size, &logrec.data)) != 0) - return (ret); - - if (npad > 0) - memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad); - - bp = logrec.data; - - memcpy(bp, &rectype, sizeof(rectype)); - bp += sizeof(rectype); - - memcpy(bp, &txn_num, sizeof(txn_num)); - bp += sizeof(txn_num); - - memcpy(bp, lsnp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - if (name == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &name->size, sizeof(name->size)); - bp += sizeof(name->size); - memcpy(bp, name->data, name->size); - bp += name->size; - } - - if (fid == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &fid->size, sizeof(fid->size)); - bp += sizeof(fid->size); - memcpy(bp, fid->data, fid->size); - bp += fid->size; - } - - uinttmp = (u_int32_t)appname; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size); - ret = dbenv->log_put(dbenv, - ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY); - if (txnid != NULL && ret == 0) - txnid->last_lsn = *ret_lsnp; -#ifdef LOG_DIAGNOSTIC - if (ret != 0) - (void)__fop_remove_print(dbenv, - (DBT *)&logrec, ret_lsnp, NULL, NULL); -#endif - __os_free(dbenv, logrec.data); - return (ret); -} - -/* - * PUBLIC: int __fop_remove_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__fop_remove_getpgnos(dbenv, rec, lsnp, notused1, summary) - DB_ENV *dbenv; - DBT *rec; - DB_LSN *lsnp; - db_recops notused1; - void *summary; -{ - TXN_RECS *t; - int ret; - COMPQUIET(rec, NULL); - COMPQUIET(notused1, DB_TXN_ABORT); - - t = (TXN_RECS *)summary; - - if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) - return (ret); - - t->array[t->npages].flags = LSN_PAGE_NOLOCK; - t->array[t->npages].lsn = *lsnp; - t->array[t->npages].fid = DB_LOGFILEID_INVALID; - memset(&t->array[t->npages].pgdesc, 0, - sizeof(t->array[t->npages].pgdesc)); - - t->npages++; - - return (0); -} - -/* - * PUBLIC: int __fop_remove_print __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__fop_remove_print(dbenv, dbtp, lsnp, notused2, notused3) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops notused2; - void *notused3; -{ - __fop_remove_args *argp; - u_int32_t i; - int ch; - int ret; - - notused2 = DB_TXN_ABORT; - notused3 = NULL; - - if ((ret = __fop_remove_read(dbenv, dbtp->data, &argp)) != 0) - return (ret); - (void)printf( - "[%lu][%lu]__fop_remove: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", - (u_long)lsnp->file, - (u_long)lsnp->offset, - (u_long)argp->type, - (u_long)argp->txnid->txnid, - (u_long)argp->prev_lsn.file, - (u_long)argp->prev_lsn.offset); - (void)printf("\tname: "); - for (i = 0; i < argp->name.size; i++) { - ch = ((u_int8_t *)argp->name.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tfid: "); - for (i = 0; i < argp->fid.size; i++) { - ch = ((u_int8_t *)argp->fid.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tappname: %lu\n", (u_long)argp->appname); - (void)printf("\n"); - __os_free(dbenv, argp); - return (0); -} - -/* - * PUBLIC: int __fop_remove_read __P((DB_ENV *, void *, __fop_remove_args **)); - */ -int -__fop_remove_read(dbenv, recbuf, argpp) - DB_ENV *dbenv; - void *recbuf; - __fop_remove_args **argpp; -{ - __fop_remove_args *argp; - u_int32_t uinttmp; - u_int8_t *bp; - int ret; - - if ((ret = __os_malloc(dbenv, - sizeof(__fop_remove_args) + sizeof(DB_TXN), &argp)) != 0) - return (ret); - - argp->txnid = (DB_TXN *)&argp[1]; - - bp = recbuf; - memcpy(&argp->type, bp, sizeof(argp->type)); - bp += sizeof(argp->type); - - memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); - bp += sizeof(argp->txnid->txnid); - - memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - memset(&argp->name, 0, sizeof(argp->name)); - memcpy(&argp->name.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->name.data = bp; - bp += argp->name.size; - - memset(&argp->fid, 0, sizeof(argp->fid)); - memcpy(&argp->fid.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->fid.data = bp; - bp += argp->fid.size; - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->appname = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - *argpp = argp; - return (0); -} - -/* - * PUBLIC: int __fop_write_log __P((DB_ENV *, DB_TXN *, DB_LSN *, - * PUBLIC: u_int32_t, const DBT *, u_int32_t, u_int32_t, const DBT *, - * PUBLIC: u_int32_t)); - */ -int -__fop_write_log(dbenv, txnid, ret_lsnp, flags, - name, appname, offset, page, flag) - DB_ENV *dbenv; - DB_TXN *txnid; - DB_LSN *ret_lsnp; - u_int32_t flags; - const DBT *name; - u_int32_t appname; - u_int32_t offset; - const DBT *page; - u_int32_t flag; -{ - DBT logrec; - DB_LSN *lsnp, null_lsn; - u_int32_t zero; - u_int32_t uinttmp; - u_int32_t npad, rectype, txn_num; - int ret; - u_int8_t *bp; - - rectype = DB___fop_write; - npad = 0; - - if (txnid == NULL) { - txn_num = 0; - null_lsn.file = 0; - null_lsn.offset = 0; - lsnp = &null_lsn; - } else { - if (TAILQ_FIRST(&txnid->kids) != NULL && - (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) - return (ret); - txn_num = txnid->txnid; - lsnp = &txnid->last_lsn; - } - - logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) - + sizeof(u_int32_t) + (name == NULL ? 0 : name->size) - + sizeof(u_int32_t) - + sizeof(u_int32_t) - + sizeof(u_int32_t) + (page == NULL ? 0 : page->size) - + sizeof(u_int32_t); - if (CRYPTO_ON(dbenv)) { - npad = - ((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size); - logrec.size += npad; - } - - if ((ret = __os_malloc(dbenv, - logrec.size, &logrec.data)) != 0) - return (ret); - - if (npad > 0) - memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad); - - bp = logrec.data; - - memcpy(bp, &rectype, sizeof(rectype)); - bp += sizeof(rectype); - - memcpy(bp, &txn_num, sizeof(txn_num)); - bp += sizeof(txn_num); - - memcpy(bp, lsnp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - if (name == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &name->size, sizeof(name->size)); - bp += sizeof(name->size); - memcpy(bp, name->data, name->size); - bp += name->size; - } - - uinttmp = (u_int32_t)appname; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - uinttmp = (u_int32_t)offset; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - if (page == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &page->size, sizeof(page->size)); - bp += sizeof(page->size); - memcpy(bp, page->data, page->size); - bp += page->size; - } - - uinttmp = (u_int32_t)flag; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size); - ret = dbenv->log_put(dbenv, - ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY); - if (txnid != NULL && ret == 0) - txnid->last_lsn = *ret_lsnp; -#ifdef LOG_DIAGNOSTIC - if (ret != 0) - (void)__fop_write_print(dbenv, - (DBT *)&logrec, ret_lsnp, NULL, NULL); -#endif - __os_free(dbenv, logrec.data); - return (ret); -} - -/* - * PUBLIC: int __fop_write_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__fop_write_getpgnos(dbenv, rec, lsnp, notused1, summary) - DB_ENV *dbenv; - DBT *rec; - DB_LSN *lsnp; - db_recops notused1; - void *summary; -{ - TXN_RECS *t; - int ret; - COMPQUIET(rec, NULL); - COMPQUIET(notused1, DB_TXN_ABORT); - - t = (TXN_RECS *)summary; - - if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) - return (ret); - - t->array[t->npages].flags = LSN_PAGE_NOLOCK; - t->array[t->npages].lsn = *lsnp; - t->array[t->npages].fid = DB_LOGFILEID_INVALID; - memset(&t->array[t->npages].pgdesc, 0, - sizeof(t->array[t->npages].pgdesc)); - - t->npages++; - - return (0); -} - -/* - * PUBLIC: int __fop_write_print __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__fop_write_print(dbenv, dbtp, lsnp, notused2, notused3) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops notused2; - void *notused3; -{ - __fop_write_args *argp; - u_int32_t i; - int ch; - int ret; - - notused2 = DB_TXN_ABORT; - notused3 = NULL; - - if ((ret = __fop_write_read(dbenv, dbtp->data, &argp)) != 0) - return (ret); - (void)printf( - "[%lu][%lu]__fop_write: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", - (u_long)lsnp->file, - (u_long)lsnp->offset, - (u_long)argp->type, - (u_long)argp->txnid->txnid, - (u_long)argp->prev_lsn.file, - (u_long)argp->prev_lsn.offset); - (void)printf("\tname: "); - for (i = 0; i < argp->name.size; i++) { - ch = ((u_int8_t *)argp->name.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tappname: %lu\n", (u_long)argp->appname); - (void)printf("\toffset: %lu\n", (u_long)argp->offset); - (void)printf("\tpage: "); - for (i = 0; i < argp->page.size; i++) { - ch = ((u_int8_t *)argp->page.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tflag: %lu\n", (u_long)argp->flag); - (void)printf("\n"); - __os_free(dbenv, argp); - return (0); -} - -/* - * PUBLIC: int __fop_write_read __P((DB_ENV *, void *, __fop_write_args **)); - */ -int -__fop_write_read(dbenv, recbuf, argpp) - DB_ENV *dbenv; - void *recbuf; - __fop_write_args **argpp; -{ - __fop_write_args *argp; - u_int32_t uinttmp; - u_int8_t *bp; - int ret; - - if ((ret = __os_malloc(dbenv, - sizeof(__fop_write_args) + sizeof(DB_TXN), &argp)) != 0) - return (ret); - - argp->txnid = (DB_TXN *)&argp[1]; - - bp = recbuf; - memcpy(&argp->type, bp, sizeof(argp->type)); - bp += sizeof(argp->type); - - memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); - bp += sizeof(argp->txnid->txnid); - - memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - memset(&argp->name, 0, sizeof(argp->name)); - memcpy(&argp->name.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->name.data = bp; - bp += argp->name.size; - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->appname = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->offset = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - memset(&argp->page, 0, sizeof(argp->page)); - memcpy(&argp->page.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->page.data = bp; - bp += argp->page.size; - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->flag = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - *argpp = argp; - return (0); -} - -/* - * PUBLIC: int __fop_rename_log __P((DB_ENV *, DB_TXN *, DB_LSN *, - * PUBLIC: u_int32_t, const DBT *, const DBT *, const DBT *, u_int32_t)); - */ -int -__fop_rename_log(dbenv, txnid, ret_lsnp, flags, - oldname, newname, fileid, appname) - DB_ENV *dbenv; - DB_TXN *txnid; - DB_LSN *ret_lsnp; - u_int32_t flags; - const DBT *oldname; - const DBT *newname; - const DBT *fileid; - u_int32_t appname; -{ - DBT logrec; - DB_LSN *lsnp, null_lsn; - u_int32_t zero; - u_int32_t uinttmp; - u_int32_t npad, rectype, txn_num; - int ret; - u_int8_t *bp; - - rectype = DB___fop_rename; - npad = 0; - - if (txnid == NULL) { - txn_num = 0; - null_lsn.file = 0; - null_lsn.offset = 0; - lsnp = &null_lsn; - } else { - if (TAILQ_FIRST(&txnid->kids) != NULL && - (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) - return (ret); - txn_num = txnid->txnid; - lsnp = &txnid->last_lsn; - } - - logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) - + sizeof(u_int32_t) + (oldname == NULL ? 0 : oldname->size) - + sizeof(u_int32_t) + (newname == NULL ? 0 : newname->size) - + sizeof(u_int32_t) + (fileid == NULL ? 0 : fileid->size) - + sizeof(u_int32_t); - if (CRYPTO_ON(dbenv)) { - npad = - ((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size); - logrec.size += npad; - } - - if ((ret = __os_malloc(dbenv, - logrec.size, &logrec.data)) != 0) - return (ret); - - if (npad > 0) - memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad); - - bp = logrec.data; - - memcpy(bp, &rectype, sizeof(rectype)); - bp += sizeof(rectype); - - memcpy(bp, &txn_num, sizeof(txn_num)); - bp += sizeof(txn_num); - - memcpy(bp, lsnp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - if (oldname == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &oldname->size, sizeof(oldname->size)); - bp += sizeof(oldname->size); - memcpy(bp, oldname->data, oldname->size); - bp += oldname->size; - } - - if (newname == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &newname->size, sizeof(newname->size)); - bp += sizeof(newname->size); - memcpy(bp, newname->data, newname->size); - bp += newname->size; - } - - if (fileid == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &fileid->size, sizeof(fileid->size)); - bp += sizeof(fileid->size); - memcpy(bp, fileid->data, fileid->size); - bp += fileid->size; - } - - uinttmp = (u_int32_t)appname; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size); - ret = dbenv->log_put(dbenv, - ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY); - if (txnid != NULL && ret == 0) - txnid->last_lsn = *ret_lsnp; -#ifdef LOG_DIAGNOSTIC - if (ret != 0) - (void)__fop_rename_print(dbenv, - (DBT *)&logrec, ret_lsnp, NULL, NULL); -#endif - __os_free(dbenv, logrec.data); - return (ret); -} - -/* - * PUBLIC: int __fop_rename_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__fop_rename_getpgnos(dbenv, rec, lsnp, notused1, summary) - DB_ENV *dbenv; - DBT *rec; - DB_LSN *lsnp; - db_recops notused1; - void *summary; -{ - TXN_RECS *t; - int ret; - COMPQUIET(rec, NULL); - COMPQUIET(notused1, DB_TXN_ABORT); - - t = (TXN_RECS *)summary; - - if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) - return (ret); - - t->array[t->npages].flags = LSN_PAGE_NOLOCK; - t->array[t->npages].lsn = *lsnp; - t->array[t->npages].fid = DB_LOGFILEID_INVALID; - memset(&t->array[t->npages].pgdesc, 0, - sizeof(t->array[t->npages].pgdesc)); - - t->npages++; - - return (0); -} - -/* - * PUBLIC: int __fop_rename_print __P((DB_ENV *, DBT *, DB_LSN *, - * PUBLIC: db_recops, void *)); - */ -int -__fop_rename_print(dbenv, dbtp, lsnp, notused2, notused3) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops notused2; - void *notused3; -{ - __fop_rename_args *argp; - u_int32_t i; - int ch; - int ret; - - notused2 = DB_TXN_ABORT; - notused3 = NULL; - - if ((ret = __fop_rename_read(dbenv, dbtp->data, &argp)) != 0) - return (ret); - (void)printf( - "[%lu][%lu]__fop_rename: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", - (u_long)lsnp->file, - (u_long)lsnp->offset, - (u_long)argp->type, - (u_long)argp->txnid->txnid, - (u_long)argp->prev_lsn.file, - (u_long)argp->prev_lsn.offset); - (void)printf("\toldname: "); - for (i = 0; i < argp->oldname.size; i++) { - ch = ((u_int8_t *)argp->oldname.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tnewname: "); - for (i = 0; i < argp->newname.size; i++) { - ch = ((u_int8_t *)argp->newname.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tfileid: "); - for (i = 0; i < argp->fileid.size; i++) { - ch = ((u_int8_t *)argp->fileid.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tappname: %lu\n", (u_long)argp->appname); - (void)printf("\n"); - __os_free(dbenv, argp); - return (0); -} - -/* - * PUBLIC: int __fop_rename_read __P((DB_ENV *, void *, __fop_rename_args **)); - */ -int -__fop_rename_read(dbenv, recbuf, argpp) - DB_ENV *dbenv; - void *recbuf; - __fop_rename_args **argpp; -{ - __fop_rename_args *argp; - u_int32_t uinttmp; - u_int8_t *bp; - int ret; - - if ((ret = __os_malloc(dbenv, - sizeof(__fop_rename_args) + sizeof(DB_TXN), &argp)) != 0) - return (ret); - - argp->txnid = (DB_TXN *)&argp[1]; - - bp = recbuf; - memcpy(&argp->type, bp, sizeof(argp->type)); - bp += sizeof(argp->type); - - memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); - bp += sizeof(argp->txnid->txnid); - - memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - memset(&argp->oldname, 0, sizeof(argp->oldname)); - memcpy(&argp->oldname.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->oldname.data = bp; - bp += argp->oldname.size; - - memset(&argp->newname, 0, sizeof(argp->newname)); - memcpy(&argp->newname.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->newname.data = bp; - bp += argp->newname.size; - - memset(&argp->fileid, 0, sizeof(argp->fileid)); - memcpy(&argp->fileid.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->fileid.data = bp; - bp += argp->fileid.size; - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->appname = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - *argpp = argp; - return (0); -} - -/* - * PUBLIC: int __fop_file_remove_log __P((DB_ENV *, DB_TXN *, - * PUBLIC: DB_LSN *, u_int32_t, const DBT *, const DBT *, const DBT *, - * PUBLIC: u_int32_t, u_int32_t)); - */ -int -__fop_file_remove_log(dbenv, txnid, ret_lsnp, flags, - real_fid, tmp_fid, name, appname, child) - DB_ENV *dbenv; - DB_TXN *txnid; - DB_LSN *ret_lsnp; - u_int32_t flags; - const DBT *real_fid; - const DBT *tmp_fid; - const DBT *name; - u_int32_t appname; - u_int32_t child; -{ - DBT logrec; - DB_LSN *lsnp, null_lsn; - u_int32_t zero; - u_int32_t uinttmp; - u_int32_t npad, rectype, txn_num; - int ret; - u_int8_t *bp; - - rectype = DB___fop_file_remove; - npad = 0; - - if (txnid == NULL) { - txn_num = 0; - null_lsn.file = 0; - null_lsn.offset = 0; - lsnp = &null_lsn; - } else { - if (TAILQ_FIRST(&txnid->kids) != NULL && - (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) - return (ret); - txn_num = txnid->txnid; - lsnp = &txnid->last_lsn; - } - - logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) - + sizeof(u_int32_t) + (real_fid == NULL ? 0 : real_fid->size) - + sizeof(u_int32_t) + (tmp_fid == NULL ? 0 : tmp_fid->size) - + sizeof(u_int32_t) + (name == NULL ? 0 : name->size) - + sizeof(u_int32_t) - + sizeof(u_int32_t); - if (CRYPTO_ON(dbenv)) { - npad = - ((DB_CIPHER *)dbenv->crypto_handle)->adj_size(logrec.size); - logrec.size += npad; - } - - if ((ret = __os_malloc(dbenv, - logrec.size, &logrec.data)) != 0) - return (ret); - - if (npad > 0) - memset((u_int8_t *)logrec.data + logrec.size - npad, 0, npad); - - bp = logrec.data; - - memcpy(bp, &rectype, sizeof(rectype)); - bp += sizeof(rectype); - - memcpy(bp, &txn_num, sizeof(txn_num)); - bp += sizeof(txn_num); - - memcpy(bp, lsnp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - if (real_fid == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &real_fid->size, sizeof(real_fid->size)); - bp += sizeof(real_fid->size); - memcpy(bp, real_fid->data, real_fid->size); - bp += real_fid->size; - } - - if (tmp_fid == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &tmp_fid->size, sizeof(tmp_fid->size)); - bp += sizeof(tmp_fid->size); - memcpy(bp, tmp_fid->data, tmp_fid->size); - bp += tmp_fid->size; - } - - if (name == NULL) { - zero = 0; - memcpy(bp, &zero, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - } else { - memcpy(bp, &name->size, sizeof(name->size)); - bp += sizeof(name->size); - memcpy(bp, name->data, name->size); - bp += name->size; - } - - uinttmp = (u_int32_t)appname; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - uinttmp = (u_int32_t)child; - memcpy(bp, &uinttmp, sizeof(uinttmp)); - bp += sizeof(uinttmp); - - DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) <= logrec.size); - ret = dbenv->log_put(dbenv, - ret_lsnp, (DBT *)&logrec, flags | DB_NOCOPY); - if (txnid != NULL && ret == 0) - txnid->last_lsn = *ret_lsnp; -#ifdef LOG_DIAGNOSTIC - if (ret != 0) - (void)__fop_file_remove_print(dbenv, - (DBT *)&logrec, ret_lsnp, NULL, NULL); -#endif - __os_free(dbenv, logrec.data); - return (ret); -} - -/* - * PUBLIC: int __fop_file_remove_getpgnos __P((DB_ENV *, DBT *, - * PUBLIC: DB_LSN *, db_recops, void *)); - */ -int -__fop_file_remove_getpgnos(dbenv, rec, lsnp, notused1, summary) - DB_ENV *dbenv; - DBT *rec; - DB_LSN *lsnp; - db_recops notused1; - void *summary; -{ - TXN_RECS *t; - int ret; - COMPQUIET(rec, NULL); - COMPQUIET(notused1, DB_TXN_ABORT); - - t = (TXN_RECS *)summary; - - if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) - return (ret); - - t->array[t->npages].flags = LSN_PAGE_NOLOCK; - t->array[t->npages].lsn = *lsnp; - t->array[t->npages].fid = DB_LOGFILEID_INVALID; - memset(&t->array[t->npages].pgdesc, 0, - sizeof(t->array[t->npages].pgdesc)); - - t->npages++; - - return (0); -} - -/* - * PUBLIC: int __fop_file_remove_print __P((DB_ENV *, DBT *, - * PUBLIC: DB_LSN *, db_recops, void *)); - */ -int -__fop_file_remove_print(dbenv, dbtp, lsnp, notused2, notused3) - DB_ENV *dbenv; - DBT *dbtp; - DB_LSN *lsnp; - db_recops notused2; - void *notused3; -{ - __fop_file_remove_args *argp; - u_int32_t i; - int ch; - int ret; - - notused2 = DB_TXN_ABORT; - notused3 = NULL; - - if ((ret = __fop_file_remove_read(dbenv, dbtp->data, &argp)) != 0) - return (ret); - (void)printf( - "[%lu][%lu]__fop_file_remove: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", - (u_long)lsnp->file, - (u_long)lsnp->offset, - (u_long)argp->type, - (u_long)argp->txnid->txnid, - (u_long)argp->prev_lsn.file, - (u_long)argp->prev_lsn.offset); - (void)printf("\treal_fid: "); - for (i = 0; i < argp->real_fid.size; i++) { - ch = ((u_int8_t *)argp->real_fid.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\ttmp_fid: "); - for (i = 0; i < argp->tmp_fid.size; i++) { - ch = ((u_int8_t *)argp->tmp_fid.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tname: "); - for (i = 0; i < argp->name.size; i++) { - ch = ((u_int8_t *)argp->name.data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - (void)printf("\n"); - (void)printf("\tappname: %lu\n", (u_long)argp->appname); - (void)printf("\tchild: 0x%lx\n", (u_long)argp->child); - (void)printf("\n"); - __os_free(dbenv, argp); - return (0); -} - -/* - * PUBLIC: int __fop_file_remove_read __P((DB_ENV *, void *, - * PUBLIC: __fop_file_remove_args **)); - */ -int -__fop_file_remove_read(dbenv, recbuf, argpp) - DB_ENV *dbenv; - void *recbuf; - __fop_file_remove_args **argpp; -{ - __fop_file_remove_args *argp; - u_int32_t uinttmp; - u_int8_t *bp; - int ret; - - if ((ret = __os_malloc(dbenv, - sizeof(__fop_file_remove_args) + sizeof(DB_TXN), &argp)) != 0) - return (ret); - - argp->txnid = (DB_TXN *)&argp[1]; - - bp = recbuf; - memcpy(&argp->type, bp, sizeof(argp->type)); - bp += sizeof(argp->type); - - memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); - bp += sizeof(argp->txnid->txnid); - - memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); - bp += sizeof(DB_LSN); - - memset(&argp->real_fid, 0, sizeof(argp->real_fid)); - memcpy(&argp->real_fid.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->real_fid.data = bp; - bp += argp->real_fid.size; - - memset(&argp->tmp_fid, 0, sizeof(argp->tmp_fid)); - memcpy(&argp->tmp_fid.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->tmp_fid.data = bp; - bp += argp->tmp_fid.size; - - memset(&argp->name, 0, sizeof(argp->name)); - memcpy(&argp->name.size, bp, sizeof(u_int32_t)); - bp += sizeof(u_int32_t); - argp->name.data = bp; - bp += argp->name.size; - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->appname = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - memcpy(&uinttmp, bp, sizeof(uinttmp)); - argp->child = (u_int32_t)uinttmp; - bp += sizeof(uinttmp); - - *argpp = argp; - return (0); -} - -/* - * PUBLIC: int __fop_init_print __P((DB_ENV *, int (***)(DB_ENV *, - * PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *)); - */ -int -__fop_init_print(dbenv, dtabp, dtabsizep) - DB_ENV *dbenv; - int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t *dtabsizep; -{ - int ret; - - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_create_print, DB___fop_create)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_remove_print, DB___fop_remove)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_write_print, DB___fop_write)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_rename_print, DB___fop_rename)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_file_remove_print, DB___fop_file_remove)) != 0) - return (ret); - return (0); -} - -/* - * PUBLIC: int __fop_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, - * PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *)); - */ -int -__fop_init_getpgnos(dbenv, dtabp, dtabsizep) - DB_ENV *dbenv; - int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t *dtabsizep; -{ - int ret; - - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_create_getpgnos, DB___fop_create)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_remove_getpgnos, DB___fop_remove)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_write_getpgnos, DB___fop_write)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_rename_getpgnos, DB___fop_rename)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_file_remove_getpgnos, DB___fop_file_remove)) != 0) - return (ret); - return (0); -} - -/* - * PUBLIC: int __fop_init_recover __P((DB_ENV *, int (***)(DB_ENV *, - * PUBLIC: DBT *, DB_LSN *, db_recops, void *), size_t *)); - */ -int -__fop_init_recover(dbenv, dtabp, dtabsizep) - DB_ENV *dbenv; - int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t *dtabsizep; -{ - int ret; - - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_create_recover, DB___fop_create)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_remove_recover, DB___fop_remove)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_write_recover, DB___fop_write)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_rename_recover, DB___fop_rename)) != 0) - return (ret); - if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, - __fop_file_remove_recover, DB___fop_file_remove)) != 0) - return (ret); - return (0); -} diff --git a/bdb/java/src/com/sleepycat/db/DbBtreeStat.java b/bdb/java/src/com/sleepycat/db/DbBtreeStat.java deleted file mode 100644 index 669afcffc88..00000000000 --- a/bdb/java/src/com/sleepycat/db/DbBtreeStat.java +++ /dev/null @@ -1,28 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ - -package com.sleepycat.db; - -public class DbBtreeStat -{ - public int bt_magic; - public int bt_version; - public int bt_metaflags; - public int bt_nkeys; - public int bt_ndata; - public int bt_pagesize; - public int bt_maxkey; - public int bt_minkey; - public int bt_re_len; - public int bt_re_pad; - public int bt_levels; - public int bt_int_pg; - public int bt_leaf_pg; - public int bt_dup_pg; - public int bt_over_pg; - public int bt_free; - public int bt_int_pgfree; - public int bt_leaf_pgfree; - public int bt_dup_pgfree; - public int bt_over_pgfree; -} -// end of DbBtreeStat.java diff --git a/bdb/java/src/com/sleepycat/db/DbHashStat.java b/bdb/java/src/com/sleepycat/db/DbHashStat.java deleted file mode 100644 index 97de6127af6..00000000000 --- a/bdb/java/src/com/sleepycat/db/DbHashStat.java +++ /dev/null @@ -1,24 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ - -package com.sleepycat.db; - -public class DbHashStat -{ - public int hash_magic; - public int hash_version; - public int hash_metaflags; - public int hash_nkeys; - public int hash_ndata; - public int hash_pagesize; - public int hash_ffactor; - public int hash_buckets; - public int hash_free; - public int hash_bfree; - public int hash_bigpages; - public int hash_big_bfree; - public int hash_overflows; - public int hash_ovfl_free; - public int hash_dup; - public int hash_dup_free; -} -// end of DbHashStat.java diff --git a/bdb/java/src/com/sleepycat/db/DbLockStat.java b/bdb/java/src/com/sleepycat/db/DbLockStat.java deleted file mode 100644 index f0903f061d2..00000000000 --- a/bdb/java/src/com/sleepycat/db/DbLockStat.java +++ /dev/null @@ -1,32 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ - -package com.sleepycat.db; - -public class DbLockStat -{ - public int st_id; - public int st_cur_maxid; - public int st_maxlocks; - public int st_maxlockers; - public int st_maxobjects; - public int st_nmodes; - public int st_nlocks; - public int st_maxnlocks; - public int st_nlockers; - public int st_maxnlockers; - public int st_nobjects; - public int st_maxnobjects; - public int st_nconflicts; - public int st_nrequests; - public int st_nreleases; - public int st_nnowaits; - public int st_ndeadlocks; - public int st_locktimeout; - public int st_nlocktimeouts; - public int st_txntimeout; - public int st_ntxntimeouts; - public int st_region_wait; - public int st_region_nowait; - public int st_regsize; -} -// end of DbLockStat.java diff --git a/bdb/java/src/com/sleepycat/db/DbLogStat.java b/bdb/java/src/com/sleepycat/db/DbLogStat.java deleted file mode 100644 index 19e5be25ce3..00000000000 --- a/bdb/java/src/com/sleepycat/db/DbLogStat.java +++ /dev/null @@ -1,29 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ - -package com.sleepycat.db; - -public class DbLogStat -{ - public int st_magic; - public int st_version; - public int st_mode; - public int st_lg_bsize; - public int st_lg_size; - public int st_w_bytes; - public int st_w_mbytes; - public int st_wc_bytes; - public int st_wc_mbytes; - public int st_wcount; - public int st_wcount_fill; - public int st_scount; - public int st_region_wait; - public int st_region_nowait; - public int st_cur_file; - public int st_cur_offset; - public int st_disk_file; - public int st_disk_offset; - public int st_regsize; - public int st_maxcommitperflush; - public int st_mincommitperflush; -} -// end of DbLogStat.java diff --git a/bdb/java/src/com/sleepycat/db/DbMpoolFStat.java b/bdb/java/src/com/sleepycat/db/DbMpoolFStat.java deleted file mode 100644 index cc03b568fc3..00000000000 --- a/bdb/java/src/com/sleepycat/db/DbMpoolFStat.java +++ /dev/null @@ -1,16 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ - -package com.sleepycat.db; - -public class DbMpoolFStat -{ - public String file_name; - public int st_pagesize; - public int st_map; - public int st_cache_hit; - public int st_cache_miss; - public int st_page_create; - public int st_page_in; - public int st_page_out; -} -// end of DbMpoolFStat.java diff --git a/bdb/java/src/com/sleepycat/db/DbQueueStat.java b/bdb/java/src/com/sleepycat/db/DbQueueStat.java deleted file mode 100644 index 67d229ab840..00000000000 --- a/bdb/java/src/com/sleepycat/db/DbQueueStat.java +++ /dev/null @@ -1,21 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ - -package com.sleepycat.db; - -public class DbQueueStat -{ - public int qs_magic; - public int qs_version; - public int qs_metaflags; - public int qs_nkeys; - public int qs_ndata; - public int qs_pagesize; - public int qs_extentsize; - public int qs_pages; - public int qs_re_len; - public int qs_re_pad; - public int qs_pgfree; - public int qs_first_recno; - public int qs_cur_recno; -} -// end of DbQueueStat.java diff --git a/bdb/java/src/com/sleepycat/db/DbRepStat.java b/bdb/java/src/com/sleepycat/db/DbRepStat.java deleted file mode 100644 index 953d10eddd1..00000000000 --- a/bdb/java/src/com/sleepycat/db/DbRepStat.java +++ /dev/null @@ -1,43 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ - -package com.sleepycat.db; - -public class DbRepStat -{ - public int st_status; - public DbLsn st_next_lsn; - public DbLsn st_waiting_lsn; - public int st_dupmasters; - public int st_env_id; - public int st_env_priority; - public int st_gen; - public int st_log_duplicated; - public int st_log_queued; - public int st_log_queued_max; - public int st_log_queued_total; - public int st_log_records; - public int st_log_requested; - public int st_master; - public int st_master_changes; - public int st_msgs_badgen; - public int st_msgs_processed; - public int st_msgs_recover; - public int st_msgs_send_failures; - public int st_msgs_sent; - public int st_newsites; - public int st_nsites; - public int st_nthrottles; - public int st_outdated; - public int st_txns_applied; - public int st_elections; - public int st_elections_won; - public int st_election_cur_winner; - public int st_election_gen; - public DbLsn st_election_lsn; - public int st_election_nsites; - public int st_election_priority; - public int st_election_status; - public int st_election_tiebreaker; - public int st_election_votes; -} -// end of DbRepStat.java diff --git a/bdb/java/src/com/sleepycat/db/DbTxnStat.java b/bdb/java/src/com/sleepycat/db/DbTxnStat.java deleted file mode 100644 index 78794aea504..00000000000 --- a/bdb/java/src/com/sleepycat/db/DbTxnStat.java +++ /dev/null @@ -1,27 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ - -package com.sleepycat.db; - -public class DbTxnStat -{ - public static class Active { - public int txnid; - public int parentid; - public DbLsn lsn; - }; - public DbLsn st_last_ckp; - public long st_time_ckp; - public int st_last_txnid; - public int st_maxtxns; - public int st_naborts; - public int st_nbegins; - public int st_ncommits; - public int st_nactive; - public int st_nrestores; - public int st_maxnactive; - public Active st_txnarray[]; - public int st_region_wait; - public int st_region_nowait; - public int st_regsize; -} -// end of DbTxnStat.java diff --git a/bdb/libdb_java/java_stat_auto.c b/bdb/libdb_java/java_stat_auto.c deleted file mode 100644 index c1412232e85..00000000000 --- a/bdb/libdb_java/java_stat_auto.c +++ /dev/null @@ -1,207 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ -#include "java_util.h" -int __jv_fill_bt_stat(JNIEnv *jnienv, jclass cl, - jobject jobj, struct __db_bt_stat *statp) { - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_magic); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_version); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_metaflags); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_nkeys); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_ndata); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_pagesize); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_maxkey); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_minkey); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_re_len); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_re_pad); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_levels); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_int_pg); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_leaf_pg); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_dup_pg); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_over_pg); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_free); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_int_pgfree); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_leaf_pgfree); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_dup_pgfree); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, bt_over_pgfree); - return (0); -} -int __jv_fill_h_stat(JNIEnv *jnienv, jclass cl, - jobject jobj, struct __db_h_stat *statp) { - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_magic); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_version); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_metaflags); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_nkeys); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_ndata); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_pagesize); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_ffactor); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_buckets); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_free); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_bfree); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_bigpages); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_big_bfree); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_overflows); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_ovfl_free); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_dup); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, hash_dup_free); - return (0); -} -int __jv_fill_lock_stat(JNIEnv *jnienv, jclass cl, - jobject jobj, struct __db_lock_stat *statp) { - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_id); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cur_maxid); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxlocks); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxlockers); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxobjects); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nmodes); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nlocks); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxnlocks); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nlockers); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxnlockers); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nobjects); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxnobjects); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nconflicts); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nrequests); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nreleases); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nnowaits); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ndeadlocks); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_locktimeout); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nlocktimeouts); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_txntimeout); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ntxntimeouts); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_wait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_nowait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_regsize); - return (0); -} -int __jv_fill_log_stat(JNIEnv *jnienv, jclass cl, - jobject jobj, struct __db_log_stat *statp) { - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_magic); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_version); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_mode); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_lg_bsize); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_lg_size); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_w_bytes); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_w_mbytes); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_wc_bytes); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_wc_mbytes); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_wcount); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_wcount_fill); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_scount); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_wait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_nowait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cur_file); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cur_offset); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_disk_file); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_disk_offset); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_regsize); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxcommitperflush); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_mincommitperflush); - return (0); -} -int __jv_fill_mpool_stat(JNIEnv *jnienv, jclass cl, - jobject jobj, struct __db_mpool_stat *statp) { - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_gbytes); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_bytes); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ncache); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_regsize); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_map); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cache_hit); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_cache_miss); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_create); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_in); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_out); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ro_evict); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_rw_evict); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_trickle); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_pages); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_clean); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_page_dirty); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_buckets); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_searches); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_longest); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_examined); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_nowait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_wait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_hash_max_wait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_nowait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_wait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc_buckets); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc_max_buckets); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc_pages); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_alloc_max_pages); - return (0); -} -int __jv_fill_qam_stat(JNIEnv *jnienv, jclass cl, - jobject jobj, struct __db_qam_stat *statp) { - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_magic); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_version); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_metaflags); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_nkeys); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_ndata); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_pagesize); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_extentsize); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_pages); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_re_len); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_re_pad); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_pgfree); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_first_recno); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, qs_cur_recno); - return (0); -} -int __jv_fill_rep_stat(JNIEnv *jnienv, jclass cl, - jobject jobj, struct __db_rep_stat *statp) { - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_status); - JAVADB_STAT_LSN(jnienv, cl, jobj, statp, st_next_lsn); - JAVADB_STAT_LSN(jnienv, cl, jobj, statp, st_waiting_lsn); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_dupmasters); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_env_id); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_env_priority); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_gen); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_duplicated); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_queued); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_queued_max); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_queued_total); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_records); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_log_requested); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_master); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_master_changes); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_badgen); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_processed); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_recover); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_send_failures); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_msgs_sent); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_newsites); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nsites); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nthrottles); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_outdated); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_txns_applied); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_elections); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_elections_won); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_cur_winner); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_gen); - JAVADB_STAT_LSN(jnienv, cl, jobj, statp, st_election_lsn); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_nsites); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_priority); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_status); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_tiebreaker); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_election_votes); - return (0); -} -int __jv_fill_txn_stat(JNIEnv *jnienv, jclass cl, - jobject jobj, struct __db_txn_stat *statp) { - JAVADB_STAT_LSN(jnienv, cl, jobj, statp, st_last_ckp); - JAVADB_STAT_LONG(jnienv, cl, jobj, statp, st_time_ckp); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_last_txnid); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxtxns); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_naborts); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nbegins); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_ncommits); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nactive); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_nrestores); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_maxnactive); - JAVADB_STAT_ACTIVE(jnienv, cl, jobj, statp, st_txnarray); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_wait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_region_nowait); - JAVADB_STAT_INT(jnienv, cl, jobj, statp, st_regsize); - return (0); -} diff --git a/bdb/libdb_java/java_stat_auto.h b/bdb/libdb_java/java_stat_auto.h deleted file mode 100644 index 20eecf1e212..00000000000 --- a/bdb/libdb_java/java_stat_auto.h +++ /dev/null @@ -1,9 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_java. */ -extern int __jv_fill_bt_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_bt_stat *statp); -extern int __jv_fill_h_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_h_stat *statp); -extern int __jv_fill_lock_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_lock_stat *statp); -extern int __jv_fill_log_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_log_stat *statp); -extern int __jv_fill_mpool_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_mpool_stat *statp); -extern int __jv_fill_qam_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_qam_stat *statp); -extern int __jv_fill_rep_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_rep_stat *statp); -extern int __jv_fill_txn_stat(JNIEnv *jnienv, jclass cl, jobject jobj, struct __db_txn_stat *statp); From fd91015a78fb9dbf0414b2ee32347e7454f0ffbc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 20:16:45 +0100 Subject: [PATCH 102/246] removed double-ignored files (bk citool bug ?) bdb/dist/RELEASE: comment added --- .bzrignore | 111 +---------------------------------------------- bdb/dist/RELEASE | 8 ++++ 2 files changed, 9 insertions(+), 110 deletions(-) diff --git a/.bzrignore b/.bzrignore index 3a67e988f2c..1f70a9c42c0 100644 --- a/.bzrignore +++ b/.bzrignore @@ -31,11 +31,8 @@ BitKeeper/etc/gone BitKeeper/etc/level BitKeeper/etc/pushed BitKeeper/tmp/* -BitKeeper/tmp/bkr3sAHD -BitKeeper/tmp/gone COPYING COPYING.LIB -Docs/#manual.texi# Docs/INSTALL-BINARY Docs/include.texi Docs/internals.info @@ -395,11 +392,9 @@ mysql.kdevprj mysql.proj mysqld.S mysqld.sym -mysys/#mf_iocache.c# mysys/charset2html mysys/getopt.c mysys/getopt1.c -mysys/ste5KbMa mysys/test_charset mysys/test_dir mysys/test_io_cache @@ -521,112 +516,8 @@ bdb/build_win32/db_cxx.h bdb/build_win32/db_perf.dsp bdb/build_win32/db_test.dsp bdb/build_win32/libdb.def -bdb/dbinc_auto/btree_auto.h -bdb/dbinc_auto/btree_ext.h -bdb/dbinc_auto/clib_ext.h -bdb/dbinc_auto/common_ext.h -bdb/dbinc_auto/crdel_auto.h -bdb/dbinc_auto/crypto_ext.h -bdb/dbinc_auto/db_auto.h -bdb/dbinc_auto/db_ext.h -bdb/dbinc_auto/db_server.h -bdb/dbinc_auto/dbreg_auto.h -bdb/dbinc_auto/dbreg_ext.h -bdb/dbinc_auto/env_ext.h -bdb/dbinc_auto/ext_185_def.in -bdb/dbinc_auto/ext_185_prot.in -bdb/dbinc_auto/ext_def.in -bdb/dbinc_auto/ext_prot.in -bdb/dbinc_auto/fileops_auto.h -bdb/dbinc_auto/fileops_ext.h -bdb/dbinc_auto/hash_auto.h -bdb/dbinc_auto/hash_ext.h -bdb/dbinc_auto/hmac_ext.h -bdb/dbinc_auto/int_def.in -bdb/dbinc_auto/lock_ext.h -bdb/dbinc_auto/log_ext.h -bdb/dbinc_auto/mp_ext.h -bdb/dbinc_auto/mutex_ext.h -bdb/dbinc_auto/os_ext.h -bdb/dbinc_auto/qam_auto.h -bdb/dbinc_auto/qam_ext.h -bdb/dbinc_auto/rep_ext.h -bdb/dbinc_auto/rpc_client_ext.h -bdb/dbinc_auto/rpc_defs.in -bdb/dbinc_auto/rpc_server_ext.h -bdb/dbinc_auto/tcl_ext.h -bdb/dbinc_auto/txn_auto.h -bdb/dbinc_auto/txn_ext.h -bdb/dbinc_auto/xa_ext.h +bdb/dbinc_auto/*.* bdb/dbreg/dbreg_auto.c -bdb/dist/bbb -bdb/dist/template/rec_dbreg -bdb/dist/template/rec_fileops -bdb/examples_c/ex_apprec/ex_apprec_auto.c -bdb/examples_c/ex_apprec/ex_apprec_auto.h -bdb/examples_c/ex_apprec/ex_apprec_template -bdb/fileops/fileops_auto.c -bdb/java/src/com/sleepycat/db/Db.java -bdb/java/src/com/sleepycat/db/DbBtreeStat.java -bdb/java/src/com/sleepycat/db/DbHashStat.java -bdb/java/src/com/sleepycat/db/DbLockStat.java -bdb/java/src/com/sleepycat/db/DbLogStat.java -bdb/java/src/com/sleepycat/db/DbMpoolFStat.java -bdb/java/src/com/sleepycat/db/DbQueueStat.java -bdb/java/src/com/sleepycat/db/DbRepStat.java -bdb/java/src/com/sleepycat/db/DbTxnStat.java -bdb/libdb_java/java_stat_auto.c -bdb/libdb_java/java_stat_auto.h -bdb/rpc_server/c/db_server_proc.c -bdb/rpc_server/c/db_server_proc.sed -bdb/rpc_server/c/db_server_svc.c -bdb/rpc_server/c/db_server_xdr.c -bdb/rpc_server/c/gen_db_server.c -bdb/test/TESTS -bdb/build_win32/db_config.h -bdb/build_win32/db_cxx.h -bdb/build_win32/db_perf.dsp -bdb/build_win32/db_test.dsp -bdb/build_win32/libdb.def -bdb/dbinc_auto/btree_auto.h -bdb/dbinc_auto/btree_ext.h -bdb/dbinc_auto/clib_ext.h -bdb/dbinc_auto/common_ext.h -bdb/dbinc_auto/crdel_auto.h -bdb/dbinc_auto/crypto_ext.h -bdb/dbinc_auto/db_auto.h -bdb/dbinc_auto/db_ext.h -bdb/dbinc_auto/db_server.h -bdb/dbinc_auto/dbreg_auto.h -bdb/dbinc_auto/dbreg_ext.h -bdb/dbinc_auto/env_ext.h -bdb/dbinc_auto/ext_185_def.in -bdb/dbinc_auto/ext_185_prot.in -bdb/dbinc_auto/ext_def.in -bdb/dbinc_auto/ext_prot.in -bdb/dbinc_auto/fileops_auto.h -bdb/dbinc_auto/fileops_ext.h -bdb/dbinc_auto/hash_auto.h -bdb/dbinc_auto/hash_ext.h -bdb/dbinc_auto/hmac_ext.h -bdb/dbinc_auto/int_def.in -bdb/dbinc_auto/lock_ext.h -bdb/dbinc_auto/log_ext.h -bdb/dbinc_auto/mp_ext.h -bdb/dbinc_auto/mutex_ext.h -bdb/dbinc_auto/os_ext.h -bdb/dbinc_auto/qam_auto.h -bdb/dbinc_auto/qam_ext.h -bdb/dbinc_auto/rep_ext.h -bdb/dbinc_auto/rpc_client_ext.h -bdb/dbinc_auto/rpc_defs.in -bdb/dbinc_auto/rpc_server_ext.h -bdb/dbinc_auto/tcl_ext.h -bdb/dbinc_auto/txn_auto.h -bdb/dbinc_auto/txn_ext.h -bdb/dbinc_auto/xa_ext.h -bdb/dbreg/dbreg_auto.c -bdb/dist/bbb bdb/dist/template/rec_dbreg bdb/dist/template/rec_fileops bdb/examples_c/ex_apprec/ex_apprec_auto.c diff --git a/bdb/dist/RELEASE b/bdb/dist/RELEASE index 9054f122cb4..20b648efa04 100644 --- a/bdb/dist/RELEASE +++ b/bdb/dist/RELEASE @@ -18,3 +18,11 @@ chmod() { #echo "chmod $1 $2" } + +# useful trick to find auto-generated files +#cmp() +#{ +# echo "==>> CMP $1 $2" >/dev/tty +# /usr/bin/cmp "$1" "$2" +#} + From c5960eb579ffbfec701f752e4cebc04c14136e9b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2002 22:43:07 +0100 Subject: [PATCH 103/246] removed DBUG_ENTER/RETURN tags --- sql/ha_myisam.cc | 245 ++++++----------- sql/ha_myisammrg.cc | 103 ++----- sql/handler.cc | 131 +++------ sql/opt_range.cc | 350 ++++++++---------------- sql/sql_select.cc | 633 ++++++++++++++++---------------------------- 5 files changed, 489 insertions(+), 973 deletions(-) diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index c3c74d593d3..a92c4f64668 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -48,8 +48,6 @@ TYPELIB myisam_recover_typelib= {array_elements(myisam_recover_names)-1,"", static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, const char *fmt, va_list args) { - DBUG_ENTER("mi_check_print_msg"); - THD* thd = (THD*)param->thd; String* packet = &thd->packet; uint length; @@ -66,12 +64,12 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, if (thd->net.vio == 0) { sql_print_error(msgbuf); - DBUG_VOID_RETURN; + return; } if (param->testflag & (T_CREATE_MISSING_KEYS | T_SAFE_REPAIR | T_AUTO_REPAIR)) { my_message(ER_NOT_KEYFILE,msgbuf,MYF(MY_WME)); - DBUG_VOID_RETURN; + return; } length=(uint) (strxmov(name, param->db_name,".",param->table_name,NullS) - name); @@ -83,46 +81,37 @@ static void mi_check_print_msg(MI_CHECK *param, const char* msg_type, if (my_net_write(&thd->net, (char*)thd->packet.ptr(), thd->packet.length())) sql_print_error("Failed on my_net_write, writing to stderr instead: %s\n", msgbuf); - DBUG_VOID_RETURN; + return; } extern "C" { void mi_check_print_error(MI_CHECK *param, const char *fmt,...) { - DBUG_ENTER("mi_check_print_error"); - param->error_printed|=1; param->out_flag|= O_DATA_LOST; va_list args; va_start(args, fmt); mi_check_print_msg(param, "error", fmt, args); va_end(args); - DBUG_VOID_RETURN; } void mi_check_print_info(MI_CHECK *param, const char *fmt,...) { va_list args; - DBUG_ENTER("mi_check_print_info"); - va_start(args, fmt); mi_check_print_msg(param, "info", fmt, args); va_end(args); - DBUG_VOID_RETURN; } void mi_check_print_warning(MI_CHECK *param, const char *fmt,...) { - DBUG_ENTER("mi_check_print_warning"); - param->warning_printed=1; param->out_flag|= O_DATA_LOST; va_list args; va_start(args, fmt); mi_check_print_msg(param, "warning", fmt, args); va_end(args); - DBUG_VOID_RETURN; } } @@ -133,18 +122,15 @@ const char **ha_myisam::bas_ext() const const char *ha_myisam::index_type(uint key_number) { - DBUG_ENTER("*ha_myisam::index_type"); - - DBUG_RETURN(((table->key_info[key_number].flags & HA_FULLTEXT) ? + return ((table->key_info[key_number].flags & HA_FULLTEXT) ? "FULLTEXT" : - "BTREE")); + "BTREE"); } int ha_myisam::net_read_dump(NET* net) { int data_fd = file->dfile; int error = 0; - DBUG_ENTER("ha_myisam::net_read_dump"); my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)); for (;;) @@ -167,14 +153,12 @@ int ha_myisam::net_read_dump(NET* net) } err: - DBUG_RETURN(error); + return error; } int ha_myisam::dump(THD* thd, int fd) { - DBUG_ENTER("ha_myisam::dump"); - MYISAM_SHARE* share = file->s; NET* net = &thd->net; uint blocksize = share->blocksize; @@ -182,7 +166,7 @@ int ha_myisam::dump(THD* thd, int fd) int data_fd = file->dfile; byte * buf = (byte*) my_malloc(blocksize, MYF(MY_WME)); if (!buf) - DBUG_RETURN(ENOMEM); + return ENOMEM; int error = 0; my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME)); @@ -222,17 +206,15 @@ int ha_myisam::dump(THD* thd, int fd) err: my_free((gptr) buf, MYF(0)); - DBUG_RETURN(error); + return error; } /* Name is here without an extension */ int ha_myisam::open(const char *name, int mode, uint test_if_locked) { - DBUG_ENTER("ha_myisam::open"); - if (!(file=mi_open(name, mode, test_if_locked))) - DBUG_RETURN((my_errno ? my_errno : -1)); + return (my_errno ? my_errno : -1); if (test_if_locked & (HA_OPEN_IGNORE_IF_LOCKED | HA_OPEN_TMP_TABLE)) VOID(mi_extra(file, HA_EXTRA_NO_WAIT_LOCK, 0)); @@ -241,22 +223,18 @@ int ha_myisam::open(const char *name, int mode, uint test_if_locked) VOID(mi_extra(file, HA_EXTRA_WAIT_LOCK, 0)); if (!table->db_record_offset) int_table_flags|=HA_REC_NOT_IN_SEQ; - DBUG_RETURN((0)); + return (0); } int ha_myisam::close(void) { MI_INFO *tmp=file; - DBUG_ENTER("ha_myisam::close"); - file=0; - DBUG_RETURN(mi_close(tmp)); + return mi_close(tmp); } int ha_myisam::write_row(byte * buf) { - DBUG_ENTER("ha_myisam::write_row"); - statistic_increment(ha_write_count,&LOCK_status); /* If we have a timestamp column, update it to the current time */ @@ -270,14 +248,12 @@ int ha_myisam::write_row(byte * buf) */ if (table->next_number_field && buf == table->record[0]) update_auto_increment(); - DBUG_RETURN(mi_write(file,buf)); + return mi_write(file,buf); } int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) { - DBUG_ENTER("ha_myisam::check"); - - if (!file) DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR); + if (!file) return HA_ADMIN_INTERNAL_ERROR; int error; MI_CHECK param; MYISAM_SHARE* share = file->s; @@ -302,7 +278,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) share->state.open_count == 0) || ((param.testflag & T_FAST) && (share->state.open_count == (uint) (share->global_changed ? 1 : 0))))) - DBUG_RETURN(HA_ADMIN_ALREADY_DONE); + return HA_ADMIN_ALREADY_DONE; error = chk_status(¶m, file); // Not fatal error = chk_size(¶m, file); @@ -355,7 +331,7 @@ int ha_myisam::check(THD* thd, HA_CHECK_OPT* check_opt) } thd->proc_info=old_proc_info; - DBUG_RETURN(error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK); + return error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK; } @@ -369,8 +345,6 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) { int error=0; MI_CHECK param; - DBUG_ENTER("ha_myisam::analyze"); - MYISAM_SHARE* share = file->s; myisamchk_init(¶m); @@ -383,7 +357,7 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) param.using_global_keycache = 1; if (!(share->state.changed & STATE_NOT_ANALYZED)) - DBUG_RETURN(HA_ADMIN_ALREADY_DONE); + return HA_ADMIN_ALREADY_DONE; error = chk_key(¶m, file); if (!error) @@ -394,7 +368,7 @@ int ha_myisam::analyze(THD *thd, HA_CHECK_OPT* check_opt) } else if (!mi_is_crashed(file)) mi_mark_crashed(file); - DBUG_RETURN(error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK); + return error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK; } @@ -406,7 +380,7 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt) char* table_name = table->real_name; int error; const char* errmsg; - DBUG_ENTER("ha_myisam::restore"); + DBUG_ENTER("restore"); if (fn_format_relative_to_data_home(src_path, table_name, backup_dir, MI_NAME_DEXT)) @@ -425,15 +399,17 @@ int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt) DBUG_RETURN(repair(thd, &tmp_check_opt)); err: - MI_CHECK param; - myisamchk_init(¶m); - param.thd = thd; - param.op_name = (char*)"restore"; - param.db_name = table->table_cache_key; - param.table_name = table->table_name; - param.testflag = 0; - mi_check_print_error(¶m,errmsg, my_errno); - DBUG_RETURN(error); + { + MI_CHECK param; + myisamchk_init(¶m); + param.thd = thd; + param.op_name = (char*)"restore"; + param.db_name = table->table_cache_key; + param.table_name = table->table_name; + param.testflag = 0; + mi_check_print_error(¶m,errmsg, my_errno); + DBUG_RETURN(error); + } } @@ -484,15 +460,17 @@ int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt) DBUG_RETURN(HA_ADMIN_OK); err: - MI_CHECK param; - myisamchk_init(¶m); - param.thd = thd; - param.op_name = (char*)"backup"; - param.db_name = table->table_cache_key; - param.table_name = table->table_name; - param.testflag = 0; - mi_check_print_error(¶m,errmsg, my_errno); - DBUG_RETURN(error); + { + MI_CHECK param; + myisamchk_init(¶m); + param.thd = thd; + param.op_name = (char*)"backup"; + param.db_name = table->table_cache_key; + param.table_name = table->table_name; + param.testflag = 0; + mi_check_print_error(¶m,errmsg, my_errno); + DBUG_RETURN(error); + } } @@ -501,9 +479,8 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt) int error; MI_CHECK param; ha_rows start_records; - DBUG_ENTER("ha_myisam::repair"); - if (!file) DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR); + if (!file) return HA_ADMIN_INTERNAL_ERROR; myisamchk_init(¶m); param.thd = thd; @@ -543,14 +520,12 @@ int ha_myisam::repair(THD* thd, HA_CHECK_OPT *check_opt) llstr(start_records, llbuff2), table->path); } - DBUG_RETURN(error); + return error; } int ha_myisam::optimize(THD* thd, HA_CHECK_OPT *check_opt) { - DBUG_ENTER("ha_myisam::optimize"); - - if (!file) DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR); + if (!file) return HA_ADMIN_INTERNAL_ERROR; MI_CHECK param; myisamchk_init(¶m); @@ -559,7 +534,7 @@ int ha_myisam::optimize(THD* thd, HA_CHECK_OPT *check_opt) param.testflag = (check_opt->flags | T_SILENT | T_FORCE_CREATE | T_REP_BY_SORT | T_STATISTICS | T_SORT_INDEX); param.sort_buffer_length= check_opt->sort_buffer_size; - DBUG_RETURN(repair(thd,param,1)); + return repair(thd,param,1); } @@ -694,8 +669,6 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) void ha_myisam::deactivate_non_unique_index(ha_rows rows) { - DBUG_ENTER("ha_myisam::deactivate_non_unique_index"); - MYISAM_SHARE* share = file->s; if (share->state.key_map == ((ulonglong) 1L << share->base.keys)-1) { @@ -717,7 +690,6 @@ void ha_myisam::deactivate_non_unique_index(ha_rows rows) } else enable_activate_all_index=0; - DBUG_VOID_RETURN; } @@ -726,7 +698,7 @@ bool ha_myisam::activate_all_index(THD *thd) int error=0; MI_CHECK param; MYISAM_SHARE* share = file->s; - DBUG_ENTER("ha_myisam::activate_all_index"); + DBUG_ENTER("activate_all_index"); mi_extra(file, HA_EXTRA_BULK_INSERT_END, 0); table->bulk_insert= 0; @@ -780,165 +752,131 @@ bool ha_myisam::check_and_repair(THD *thd) bool ha_myisam::is_crashed() const { - DBUG_ENTER("ha_myisam::is_crashed"); - - DBUG_RETURN((file->s->state.changed & STATE_CRASHED || - (my_disable_locking && file->s->state.open_count))); + return (file->s->state.changed & STATE_CRASHED || + (my_disable_locking && file->s->state.open_count)); } int ha_myisam::update_row(const byte * old_data, byte * new_data) { - DBUG_ENTER("ha_myisam::update_row"); - statistic_increment(ha_update_count,&LOCK_status); if (table->time_stamp) update_timestamp(new_data+table->time_stamp-1); - DBUG_RETURN(mi_update(file,old_data,new_data)); + return mi_update(file,old_data,new_data); } int ha_myisam::delete_row(const byte * buf) { - DBUG_ENTER("ha_myisam::delete_row"); - statistic_increment(ha_delete_count,&LOCK_status); - DBUG_RETURN(mi_delete(file,buf)); + return mi_delete(file,buf); } int ha_myisam::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - DBUG_ENTER("ha_myisam::index_read"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=mi_rkey(file,buf,active_index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - DBUG_ENTER("ha_myisam::index_read_idx"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=mi_rkey(file,buf,index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::index_read_last(byte * buf, const byte * key, uint key_len) { - DBUG_ENTER("ha_myisam::index_read_last"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=mi_rkey(file,buf,active_index, key, key_len, HA_READ_PREFIX_LAST); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::index_next(byte * buf) { - DBUG_ENTER("ha_myisam::index_next"); - statistic_increment(ha_read_next_count,&LOCK_status); int error=mi_rnext(file,buf,active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::index_prev(byte * buf) { - DBUG_ENTER("ha_myisam::index_prev"); - statistic_increment(ha_read_prev_count,&LOCK_status); int error=mi_rprev(file,buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::index_first(byte * buf) { - DBUG_ENTER("ha_myisam::index_first"); - statistic_increment(ha_read_first_count,&LOCK_status); int error=mi_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::index_last(byte * buf) { - DBUG_ENTER("ha_myisam::index_last"); - statistic_increment(ha_read_last_count,&LOCK_status); int error=mi_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::index_next_same(byte * buf, const byte *key __attribute__((unused)), uint length __attribute__((unused))) { - DBUG_ENTER("ha_myisam::index_next_same"); - statistic_increment(ha_read_next_count,&LOCK_status); int error=mi_rnext_same(file,buf); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::rnd_init(bool scan) { - DBUG_ENTER("ha_myisam::rnd_init"); - if (scan) - DBUG_RETURN(mi_scan_init(file)); - DBUG_RETURN(mi_extra(file, HA_EXTRA_RESET, 0)); + return mi_scan_init(file); + return mi_extra(file, HA_EXTRA_RESET, 0); } int ha_myisam::rnd_next(byte *buf) { - DBUG_ENTER("ha_myisam::rnd_next"); - statistic_increment(ha_read_rnd_next_count,&LOCK_status); int error=mi_scan(file, buf); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisam::restart_rnd_next(byte *buf, byte *pos) { - DBUG_ENTER("ha_myisam::restart_rnd_next"); - - DBUG_RETURN(rnd_pos(buf,pos)); + return rnd_pos(buf,pos); } int ha_myisam::rnd_pos(byte * buf, byte *pos) { - DBUG_ENTER("ha_myisam::rnd_pos"); - statistic_increment(ha_read_rnd_count,&LOCK_status); int error=mi_rrnd(file, buf, ha_get_ptr(pos,ref_length)); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } void ha_myisam::position(const byte* record) { my_off_t position=mi_position(file); - DBUG_ENTER("ha_myisam::position"); - ha_store_ptr(ref, ref_length, position); - DBUG_VOID_RETURN; } void ha_myisam::info(uint flag) { MI_ISAMINFO info; char name_buff[FN_REFLEN]; - DBUG_ENTER("ha_myisam::info"); (void) mi_status(file,&info,flag); if (flag & HA_STATUS_VARIABLE) @@ -992,17 +930,14 @@ void ha_myisam::info(uint flag) update_time = info.update_time; if (flag & HA_STATUS_AUTO) auto_increment_value= info.auto_increment; - DBUG_VOID_RETURN; } int ha_myisam::extra(enum ha_extra_function operation) { - DBUG_ENTER("ha_myisam::extra"); - if ((specialflag & SPECIAL_SAFE_MODE) && operation == HA_EXTRA_KEYREAD) - DBUG_RETURN(0); - DBUG_RETURN(mi_extra(file, operation, 0)); + return 0; + return mi_extra(file, operation, 0); } @@ -1010,44 +945,34 @@ int ha_myisam::extra(enum ha_extra_function operation) int ha_myisam::extra_opt(enum ha_extra_function operation, ulong cache_size) { - DBUG_ENTER("ha_myisam::extra_opt"); - if ((specialflag & SPECIAL_SAFE_MODE) & (operation == HA_EXTRA_WRITE_CACHE || operation == HA_EXTRA_BULK_INSERT_BEGIN)) - DBUG_RETURN(0); - DBUG_RETURN(mi_extra(file, operation, (void*) &cache_size)); + return 0; + return mi_extra(file, operation, (void*) &cache_size); } int ha_myisam::reset(void) { - DBUG_ENTER("ha_myisam::reset"); - - DBUG_RETURN(mi_extra(file, HA_EXTRA_RESET, 0)); + return mi_extra(file, HA_EXTRA_RESET, 0); } int ha_myisam::delete_all_rows() { - DBUG_ENTER("ha_myisam::delete_all_rows"); - - DBUG_RETURN(mi_delete_all_rows(file)); + return mi_delete_all_rows(file); } int ha_myisam::delete_table(const char *name) { - DBUG_ENTER("ha_myisam::delete_table"); - - DBUG_RETURN(mi_delete_table(name)); + return mi_delete_table(name); } int ha_myisam::external_lock(THD *thd, int lock_type) { - DBUG_ENTER("ha_myisam::external_lock"); - if (!table->tmp_table) - DBUG_RETURN(mi_lock_database(file,lock_type)); - DBUG_RETURN(0); + return mi_lock_database(file,lock_type); + return 0; } @@ -1055,18 +980,14 @@ THR_LOCK_DATA **ha_myisam::store_lock(THD *thd, THR_LOCK_DATA **to, enum thr_lock_type lock_type) { - DBUG_ENTER("**ha_myisam::store_lock"); - if (lock_type != TL_IGNORE && file->lock.type == TL_UNLOCK) file->lock.type=lock_type; *to++= &file->lock; - DBUG_RETURN(to); + return to; } void ha_myisam::update_create_info(HA_CREATE_INFO *create_info) { - DBUG_ENTER("ha_myisam::update_create_info"); - table->file->info(HA_STATUS_AUTO | HA_STATUS_CONST); if (!(create_info->used_fields & HA_CREATE_USED_AUTO)) { @@ -1080,7 +1001,6 @@ void ha_myisam::update_create_info(HA_CREATE_INFO *create_info) } create_info->data_file_name=data_file_name; create_info->index_file_name=index_file_name; - DBUG_VOID_RETURN; } @@ -1276,20 +1196,16 @@ int ha_myisam::create(const char *name, register TABLE *table_arg, int ha_myisam::rename_table(const char * from, const char * to) { - DBUG_ENTER("ha_myisam::rename_table"); - - DBUG_RETURN(mi_rename(from,to)); + return mi_rename(from,to); } longlong ha_myisam::get_auto_increment() { - DBUG_ENTER("ha_myisam::get_auto_increment"); - if (!table->next_number_key_offset) { // Autoincrement at key-start ha_myisam::info(HA_STATUS_AUTO); - DBUG_RETURN(auto_increment_value); + return auto_increment_value; } if (table->bulk_insert) @@ -1310,7 +1226,7 @@ longlong ha_myisam::get_auto_increment() nr=(longlong) table->next_number_field->val_int_offset(table->rec_buff_length)+1; extra(HA_EXTRA_NO_KEYREAD); - DBUG_RETURN(nr); + return nr; } @@ -1320,28 +1236,25 @@ ha_rows ha_myisam::records_in_range(int inx, const byte *end_key,uint end_key_len, enum ha_rkey_function end_search_flag) { - DBUG_ENTER("ha_myisam::records_in_range"); - - DBUG_RETURN((ha_rows) mi_records_in_range(file, + return (ha_rows) mi_records_in_range(file, inx, start_key,start_key_len, start_search_flag, end_key,end_key_len, - end_search_flag)); + end_search_flag); } int ha_myisam::ft_read(byte * buf) { int error; - DBUG_ENTER("ha_myisam::ft_read"); if (!ft_handler) - DBUG_RETURN(-1); + return -1; thread_safe_increment(ha_read_next_count,&LOCK_status); // why ? error=ft_handler->please->read_next(ft_handler,(char*) buf); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index c9e017eb747..2342561b7f8 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -38,14 +38,12 @@ const char **ha_myisammrg::bas_ext() const int ha_myisammrg::open(const char *name, int mode, uint test_if_locked) { char name_buff[FN_REFLEN]; - DBUG_ENTER("ha_myisammrg::open"); - DBUG_PRINT("info", ("ha_myisammrg::open")); if (!(file=myrg_open(fn_format(name_buff,name,"","",2 | 4), mode, test_if_locked))) { DBUG_PRINT("info", ("ha_myisammrg::open exit %d", my_errno)); - DBUG_RETURN((my_errno ? my_errno : -1)); + return (my_errno ? my_errno : -1); } DBUG_PRINT("info", ("ha_myisammrg::open myrg_extrafunc...")) myrg_extrafunc(file, query_cache_invalidate_by_MyISAM_filename_ref); @@ -67,165 +65,132 @@ int ha_myisammrg::open(const char *name, int mode, uint test_if_locked) if (table->crashed) goto err; #endif - DBUG_RETURN((0)); + return (0); err: myrg_close(file); file=0; - DBUG_RETURN((my_errno= HA_ERR_WRONG_TABLE_DEF)); + return (my_errno= HA_ERR_WRONG_TABLE_DEF); } int ha_myisammrg::close(void) { - DBUG_ENTER("ha_myisammrg::close"); - - DBUG_RETURN(myrg_close(file)); + return myrg_close(file); } int ha_myisammrg::write_row(byte * buf) { - DBUG_ENTER("ha_myisammrg::write_row"); - statistic_increment(ha_write_count,&LOCK_status); if (table->time_stamp) update_timestamp(buf+table->time_stamp-1); if (table->next_number_field && buf == table->record[0]) update_auto_increment(); - DBUG_RETURN(myrg_write(file,buf)); + return myrg_write(file,buf); } int ha_myisammrg::update_row(const byte * old_data, byte * new_data) { - DBUG_ENTER("ha_myisammrg::update_row"); - statistic_increment(ha_update_count,&LOCK_status); if (table->time_stamp) update_timestamp(new_data+table->time_stamp-1); - DBUG_RETURN(myrg_update(file,old_data,new_data)); + return myrg_update(file,old_data,new_data); } int ha_myisammrg::delete_row(const byte * buf) { - DBUG_ENTER("ha_myisammrg::delete_row"); - statistic_increment(ha_delete_count,&LOCK_status); - DBUG_RETURN(myrg_delete(file,buf)); + return myrg_delete(file,buf); } int ha_myisammrg::index_read(byte * buf, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - DBUG_ENTER("ha_myisammrg::index_read"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,active_index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_read_idx(byte * buf, uint index, const byte * key, uint key_len, enum ha_rkey_function find_flag) { - DBUG_ENTER("ha_myisammrg::index_read_idx"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,index, key, key_len, find_flag); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_read_last(byte * buf, const byte * key, uint key_len) { - DBUG_ENTER("ha_myisammrg::index_read_last"); - statistic_increment(ha_read_key_count,&LOCK_status); int error=myrg_rkey(file,buf,active_index, key, key_len, HA_READ_PREFIX_LAST); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_next(byte * buf) { - DBUG_ENTER("ha_myisammrg::index_next"); - statistic_increment(ha_read_next_count,&LOCK_status); int error=myrg_rnext(file,buf,active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_prev(byte * buf) { - DBUG_ENTER("ha_myisammrg::index_prev"); - statistic_increment(ha_read_prev_count,&LOCK_status); int error=myrg_rprev(file,buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_first(byte * buf) { - DBUG_ENTER("ha_myisammrg::index_first"); - statistic_increment(ha_read_first_count,&LOCK_status); int error=myrg_rfirst(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::index_last(byte * buf) { - DBUG_ENTER("ha_myisammrg::index_last"); - statistic_increment(ha_read_last_count,&LOCK_status); int error=myrg_rlast(file, buf, active_index); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::rnd_init(bool scan) { - DBUG_ENTER("ha_myisammrg::rnd_init"); - - DBUG_RETURN(myrg_extra(file,HA_EXTRA_RESET,0)); + return myrg_extra(file,HA_EXTRA_RESET,0); } int ha_myisammrg::rnd_next(byte *buf) { - DBUG_ENTER("ha_myisammrg::rnd_next"); - statistic_increment(ha_read_rnd_next_count,&LOCK_status); int error=myrg_rrnd(file, buf, HA_OFFSET_ERROR); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } int ha_myisammrg::rnd_pos(byte * buf, byte *pos) { - DBUG_ENTER("ha_myisammrg::rnd_pos"); - statistic_increment(ha_read_rnd_count,&LOCK_status); int error=myrg_rrnd(file, buf, ha_get_ptr(pos,ref_length)); table->status=error ? STATUS_NOT_FOUND: 0; - DBUG_RETURN(error); + return error; } void ha_myisammrg::position(const byte *record) { ulonglong position= myrg_position(file); - DBUG_ENTER("ha_myisammrg::position"); - ha_store_ptr(ref, ref_length, (my_off_t) position); - DBUG_VOID_RETURN; } void ha_myisammrg::info(uint flag) { MYMERGE_INFO info; - DBUG_ENTER("ha_myisammrg::info"); - (void) myrg_status(file,&info,flag); /* The following fails if one has not compiled MySQL with -DBIG_TABLES @@ -251,20 +216,17 @@ void ha_myisammrg::info(uint flag) #else ref_length=4; // Can't be > than my_off_t #endif - DBUG_VOID_RETURN; } int ha_myisammrg::extra(enum ha_extra_function operation) { - DBUG_ENTER("ha_myisammrg::extra"); - /* As this is just a mapping, we don't have to force the underlying tables to be closed */ if (operation == HA_EXTRA_FORCE_REOPEN || operation == HA_EXTRA_PREPARE_FOR_DELETE) - DBUG_RETURN(0); - DBUG_RETURN(myrg_extra(file,operation,0)); + return 0; + return myrg_extra(file,operation,0); } @@ -272,35 +234,27 @@ int ha_myisammrg::extra(enum ha_extra_function operation) int ha_myisammrg::extra_opt(enum ha_extra_function operation, ulong cache_size) { - DBUG_ENTER("ha_myisammrg::extra_opt"); - if ((specialflag & SPECIAL_SAFE_MODE) & (operation == HA_EXTRA_WRITE_CACHE || operation == HA_EXTRA_BULK_INSERT_BEGIN)) - DBUG_RETURN(0); - DBUG_RETURN(myrg_extra(file, operation, (void*) &cache_size)); + return 0; + return myrg_extra(file, operation, (void*) &cache_size); } int ha_myisammrg::reset(void) { - DBUG_ENTER("ha_myisammrg::reset"); - - DBUG_RETURN(myrg_extra(file,HA_EXTRA_RESET,0)); + return myrg_extra(file,HA_EXTRA_RESET,0); } int ha_myisammrg::external_lock(THD *thd, int lock_type) { - DBUG_ENTER("ha_myisammrg::external_lock"); - - DBUG_RETURN(myrg_lock_database(file,lock_type)); + return myrg_lock_database(file,lock_type); } uint ha_myisammrg::lock_count(void) const { - DBUG_ENTER("ha_myisammrg::lock_count"); - - DBUG_RETURN(file->tables); + return file->tables; } @@ -309,7 +263,6 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd, enum thr_lock_type lock_type) { MYRG_TABLE *open_table; - DBUG_ENTER("**ha_myisammrg::store_lock"); for (open_table=file->open_tables ; open_table != file->end_table ; @@ -319,14 +272,13 @@ THR_LOCK_DATA **ha_myisammrg::store_lock(THD *thd, if (lock_type != TL_IGNORE && open_table->table->lock.type == TL_UNLOCK) open_table->table->lock.type=lock_type; } - DBUG_RETURN(to); + return to; } void ha_myisammrg::update_create_info(HA_CREATE_INFO *create_info) { - DBUG_ENTER("ha_myisammrg::update_create_info"); - // [phi] auto_increment stuff is missing (but currently not needed) + DBUG_ENTER("ha_myisammrg::update_create_info"); if (!(create_info->used_fields & HA_CREATE_USED_UNION)) { MYRG_TABLE *open_table; @@ -407,8 +359,6 @@ int ha_myisammrg::create(const char *name, register TABLE *form, void ha_myisammrg::append_create_info(String *packet) { char buff[FN_REFLEN]; - DBUG_ENTER("ha_myisammrg::append_create_info"); - if (file->merge_insert_method != MERGE_INSERT_DISABLED) { packet->append(" INSERT_METHOD=",15); @@ -428,5 +378,4 @@ void ha_myisammrg::append_create_info(String *packet) packet->append(buff,(uint) strlen(buff)); } packet->append(')'); - DBUG_VOID_RETURN; } diff --git a/sql/handler.cc b/sql/handler.cc index f2e3e531854..f07e90d2eb9 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -72,16 +72,14 @@ TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"", enum db_type ha_checktype(enum db_type database_type) { - DBUG_ENTER("ha_checktype"); - switch (database_type) { #ifdef HAVE_BERKELEY_DB case DB_TYPE_BERKELEY_DB: - DBUG_RETURN((berkeley_skip ? DB_TYPE_MYISAM : database_type)); + return(berkeley_skip ? DB_TYPE_MYISAM : database_type); #endif #ifdef HAVE_INNOBASE_DB case DB_TYPE_INNODB: - DBUG_RETURN((innodb_skip ? DB_TYPE_MYISAM : database_type)); + return(innodb_skip ? DB_TYPE_MYISAM : database_type); #endif #ifndef NO_HASH case DB_TYPE_HASH: @@ -93,57 +91,52 @@ enum db_type ha_checktype(enum db_type database_type) case DB_TYPE_HEAP: case DB_TYPE_MYISAM: case DB_TYPE_MRG_MYISAM: - DBUG_RETURN((database_type)); /* Database exists on system */ + return (database_type); /* Database exists on system */ default: break; } - DBUG_RETURN((DB_TYPE_MYISAM)); /* Use this as default */ + return(DB_TYPE_MYISAM); /* Use this as default */ } /* ha_checktype */ handler *get_new_handler(TABLE *table, enum db_type db_type) { - DBUG_ENTER("*get_new_handler"); - switch (db_type) { #ifndef NO_HASH - DBUG_RETURN(new ha_hash(table)); + return new ha_hash(table); #endif #ifdef HAVE_ISAM case DB_TYPE_MRG_ISAM: - DBUG_RETURN(new ha_isammrg(table)); + return new ha_isammrg(table); case DB_TYPE_ISAM: - DBUG_RETURN(new ha_isam(table)); + return new ha_isam(table); #endif #ifdef HAVE_BERKELEY_DB case DB_TYPE_BERKELEY_DB: - DBUG_RETURN(new ha_berkeley(table)); + return new ha_berkeley(table); #endif #ifdef HAVE_INNOBASE_DB case DB_TYPE_INNODB: - DBUG_RETURN(new ha_innobase(table)); + return new ha_innobase(table); #endif case DB_TYPE_HEAP: - DBUG_RETURN(new ha_heap(table)); + return new ha_heap(table); case DB_TYPE_MYISAM: default: // should never happen - DBUG_RETURN(new ha_myisam(table)); + return new ha_myisam(table); case DB_TYPE_MRG_MYISAM: - DBUG_RETURN(new ha_myisammrg(table)); + return new ha_myisammrg(table); } - DBUG_RETURN(NULL); // impossible } int ha_init() { - DBUG_ENTER("ha_init"); - #ifdef HAVE_BERKELEY_DB if (!berkeley_skip) { int error; if ((error=berkeley_init())) - DBUG_RETURN(error); + return error; if (!berkeley_skip) // If we couldn't use handler opt_using_transactions=1; else @@ -154,14 +147,14 @@ int ha_init() if (!innodb_skip) { if (innobase_init()) - DBUG_RETURN(-1); + return -1; if (!innodb_skip) // If we couldn't use handler opt_using_transactions=1; else have_innodb=SHOW_OPTION_DISABLED; } #endif - DBUG_RETURN(0); + return 0; } /* close, flush or restart databases */ @@ -170,8 +163,6 @@ int ha_init() int ha_panic(enum ha_panic_function flag) { int error=0; - DBUG_ENTER("ha_panic"); - #ifndef NO_HASH error|=h_panic(flag); /* fix hash */ #endif @@ -190,29 +181,23 @@ int ha_panic(enum ha_panic_function flag) if (!innodb_skip) error|=innobase_end(); #endif - DBUG_RETURN(error); + return error; } /* ha_panic */ void ha_drop_database(char* path) { - DBUG_ENTER("ha_drop_database"); - #ifdef HAVE_INNOBASE_DB if (!innodb_skip) innobase_drop_database(path); #endif - DBUG_VOID_RETURN; } void ha_close_connection(THD* thd) { - DBUG_ENTER("ha_close_connection"); - #ifdef HAVE_INNOBASE_DB if (!innodb_skip) innobase_close_connection(thd); #endif - DBUG_VOID_RETURN; } /* @@ -262,8 +247,6 @@ int ha_report_binlog_offset_and_commit(THD *thd, my_off_t end_offset) { int error= 0; - DBUG_ENTER("ha_report_binlog_offset_and_commit"); - #ifdef HAVE_INNOBASE_DB THD_TRANS *trans; trans = &thd->transaction.all; @@ -280,7 +263,7 @@ int ha_report_binlog_offset_and_commit(THD *thd, trans->innodb_active_trans=0; } #endif - DBUG_RETURN(error); + return error; } int ha_commit_trans(THD *thd, THD_TRANS* trans) @@ -398,8 +381,6 @@ int ha_rollback_trans(THD *thd, THD_TRANS *trans) bool ha_flush_logs() { bool result=0; - DBUG_ENTER("ha_flush_logs"); - #ifdef HAVE_BERKELEY_DB if (!berkeley_skip && berkeley_flush_logs()) result=1; @@ -408,7 +389,7 @@ bool ha_flush_logs() if (!innodb_skip && innobase_flush_logs()) result=1; #endif - DBUG_RETURN(result); + return result; } /* @@ -419,19 +400,15 @@ bool ha_flush_logs() int ha_delete_table(enum db_type table_type, const char *path) { handler *file=get_new_handler((TABLE*) 0, table_type); - DBUG_ENTER("ha_delete_table"); - if (!file) - DBUG_RETURN(ENOENT); + return ENOENT; int error=file->delete_table(path); delete file; - DBUG_RETURN(error); + return error; } void ha_store_ptr(byte *buff, uint pack_length, my_off_t pos) { - DBUG_ENTER("ha_store_ptr"); - switch (pack_length) { #if SIZEOF_OFF_T > 4 case 8: mi_int8store(buff,pos); break; @@ -444,14 +421,12 @@ void ha_store_ptr(byte *buff, uint pack_length, my_off_t pos) case 2: mi_int2store(buff,(uint) pos); break; case 1: buff[0]= (uchar) pos; break; } - DBUG_VOID_RETURN; + return; } my_off_t ha_get_ptr(byte *ptr, uint pack_length) { my_off_t pos; - DBUG_ENTER("ha_get_ptr"); - switch (pack_length) { #if SIZEOF_OFF_T > 4 case 8: @@ -483,7 +458,7 @@ my_off_t ha_get_ptr(byte *ptr, uint pack_length) pos=0; // Impossible break; } - DBUG_RETURN(pos); + return pos; } /**************************************************************************** @@ -537,44 +512,32 @@ int handler::ha_open(const char *name, int mode, int test_if_locked) int handler::check(THD* thd, HA_CHECK_OPT* check_opt) { - DBUG_ENTER("handler::check"); - - DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); + return HA_ADMIN_NOT_IMPLEMENTED; } int handler::backup(THD* thd, HA_CHECK_OPT* check_opt) { - DBUG_ENTER("handler::backup"); - - DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); + return HA_ADMIN_NOT_IMPLEMENTED; } int handler::restore(THD* thd, HA_CHECK_OPT* check_opt) { - DBUG_ENTER("handler::restore"); - - DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); + return HA_ADMIN_NOT_IMPLEMENTED; } int handler::repair(THD* thd, HA_CHECK_OPT* check_opt) { - DBUG_ENTER("handler::repair"); - - DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); + return HA_ADMIN_NOT_IMPLEMENTED; } int handler::optimize(THD* thd, HA_CHECK_OPT* check_opt) { - DBUG_ENTER("handler::optimize"); - - DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); + return HA_ADMIN_NOT_IMPLEMENTED; } int handler::analyze(THD* thd, HA_CHECK_OPT* check_opt) { - DBUG_ENTER("handler::analyze"); - - DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); + return HA_ADMIN_NOT_IMPLEMENTED; } /* @@ -619,9 +582,7 @@ int handler::read_first_row(byte * buf, uint primary_key) int handler::restart_rnd_next(byte *buf, byte *pos) { - DBUG_ENTER("handler::restart_rnd_next"); - - DBUG_RETURN(HA_ERR_WRONG_COMMAND); + return HA_ERR_WRONG_COMMAND; } @@ -630,8 +591,6 @@ int handler::restart_rnd_next(byte *buf, byte *pos) void handler::update_timestamp(byte *record) { long skr= (long) current_thd->query_start(); - DBUG_ENTER("handler::update_timestamp"); - #ifdef WORDS_BIGENDIAN if (table->db_low_byte_first) { @@ -640,7 +599,7 @@ void handler::update_timestamp(byte *record) else #endif longstore(record,skr); - DBUG_VOID_RETURN; + return; } /* @@ -674,7 +633,6 @@ longlong handler::get_auto_increment() { longlong nr; int error; - DBUG_ENTER("handler::get_auto_increment"); (void) extra(HA_EXTRA_KEYREAD); index_init(table->next_number_index); @@ -698,7 +656,7 @@ longlong handler::get_auto_increment() val_int_offset(table->rec_buff_length)+1; index_end(); (void) extra(HA_EXTRA_NO_KEYREAD); - DBUG_RETURN(nr); + return nr; } /* Print error that we got from handler function */ @@ -820,8 +778,6 @@ uint handler::get_dup_key(int error) int handler::delete_table(const char *name) { int error=0; - DBUG_ENTER("handler::delete_table"); - for (const char **ext=bas_ext(); *ext ; ext++) { if (delete_file(name,*ext,2)) @@ -830,7 +786,7 @@ int handler::delete_table(const char *name) break; } } - DBUG_RETURN(error); + return error; } @@ -851,16 +807,14 @@ int handler::rename_table(const char * from, const char * to) int ha_recovery_logging(THD *thd, bool on) { int error=0; - DBUG_ENTER("ha_recovery_logging"); + DBUG_ENTER("ha_recovery_logging"); DBUG_RETURN(error); } int handler::index_next_same(byte *buf, const byte *key, uint keylen) { int error; - DBUG_ENTER("handler::index_next_same"); - if (!(error=index_next(buf))) { if (key_cmp(table, key, active_index, keylen)) @@ -869,7 +823,7 @@ int handler::index_next_same(byte *buf, const byte *key, uint keylen) error=HA_ERR_END_OF_FILE; } } - DBUG_RETURN(error); + return error; } @@ -882,9 +836,7 @@ int handler::index_next_same(byte *buf, const byte *key, uint keylen) int handler::delete_all_rows() { - DBUG_ENTER("handler::delete_all_rows"); - - DBUG_RETURN((my_errno=HA_ERR_WRONG_COMMAND)); + return (my_errno=HA_ERR_WRONG_COMMAND); } /**************************************************************************** @@ -930,37 +882,26 @@ int ha_create_table(const char *name, HA_CREATE_INFO *create_info, void ha_key_cache(void) { - DBUG_ENTER("ha_key_cache"); - if (keybuff_size) (void) init_key_cache(keybuff_size); - DBUG_VOID_RETURN; } void ha_resize_key_cache(void) { - DBUG_ENTER("ha_resize_key_cache"); - (void) resize_key_cache(keybuff_size); - DBUG_VOID_RETURN; } static int NEAR_F delete_file(const char *name,const char *ext,int extflag) { char buff[FN_REFLEN]; - DBUG_ENTER("delete_file"); - VOID(fn_format(buff,name,"",ext,extflag | 4)); - DBUG_RETURN((my_delete_with_symlink(buff,MYF(MY_WME)))); + return(my_delete_with_symlink(buff,MYF(MY_WME))); } void st_ha_check_opt::init() { - DBUG_ENTER("st_ha_check_opt::init"); - flags= sql_flags= 0; sort_buffer_size = current_thd->variables.myisam_sort_buff_size; - DBUG_VOID_RETURN; } diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 4398dc4adda..f33a2d312b4 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -100,8 +100,6 @@ public: { // Get overlapping range char *new_min,*new_max; uint8 flag_min,flag_max; - DBUG_ENTER("*clone_and"); - if (cmp_min_to_min(arg) >= 0) { new_min=min_value; flag_min=min_flag; @@ -118,83 +116,64 @@ public: { new_max=arg->max_value; flag_max=arg->max_flag; } - DBUG_RETURN(new SEL_ARG(field, part, new_min, new_max, flag_min, flag_max, - test(maybe_flag && arg->maybe_flag))); + return new SEL_ARG(field, part, new_min, new_max, flag_min, flag_max, + test(maybe_flag && arg->maybe_flag)); } SEL_ARG *clone_first(SEL_ARG *arg) { // min <= X < arg->min - DBUG_ENTER("*clone_first"); - - DBUG_RETURN(new SEL_ARG(field,part, min_value, arg->min_value, + return new SEL_ARG(field,part, min_value, arg->min_value, min_flag, arg->min_flag & NEAR_MIN ? 0 : NEAR_MAX, - maybe_flag | arg->maybe_flag)); + maybe_flag | arg->maybe_flag); } SEL_ARG *clone_last(SEL_ARG *arg) { // min <= X <= key_max - DBUG_ENTER("*clone_last"); - - DBUG_RETURN(new SEL_ARG(field, part, min_value, arg->max_value, - min_flag, arg->max_flag, maybe_flag | arg->maybe_flag)); + return new SEL_ARG(field, part, min_value, arg->max_value, + min_flag, arg->max_flag, maybe_flag | arg->maybe_flag); } SEL_ARG *clone(SEL_ARG *new_parent,SEL_ARG **next); bool copy_min(SEL_ARG* arg) { // Get overlapping range - DBUG_ENTER("copy_min"); - if (cmp_min_to_min(arg) > 0) { min_value=arg->min_value; min_flag=arg->min_flag; if ((max_flag & (NO_MAX_RANGE | NO_MIN_RANGE)) == (NO_MAX_RANGE | NO_MIN_RANGE)) - DBUG_RETURN(1); // Full range + return 1; // Full range } maybe_flag|=arg->maybe_flag; - DBUG_RETURN(0); + return 0; } bool copy_max(SEL_ARG* arg) { // Get overlapping range - DBUG_ENTER("copy_max"); - if (cmp_max_to_max(arg) <= 0) { max_value=arg->max_value; max_flag=arg->max_flag; if ((max_flag & (NO_MAX_RANGE | NO_MIN_RANGE)) == (NO_MAX_RANGE | NO_MIN_RANGE)) - DBUG_RETURN(1); // Full range + return 1; // Full range } maybe_flag|=arg->maybe_flag; - DBUG_RETURN(0); + return 0; } void copy_min_to_min(SEL_ARG *arg) { - DBUG_ENTER("copy_min_to_min"); - min_value=arg->min_value; min_flag=arg->min_flag; - DBUG_VOID_RETURN; } void copy_min_to_max(SEL_ARG *arg) { - DBUG_ENTER("copy_min_to_max"); - max_value=arg->min_value; max_flag=arg->min_flag & NEAR_MIN ? 0 : NEAR_MAX; - DBUG_VOID_RETURN; } void copy_max_to_min(SEL_ARG *arg) { - DBUG_ENTER("copy_max_to_min"); - min_value=arg->max_value; min_flag=arg->max_flag & NEAR_MAX ? 0 : NEAR_MIN; - DBUG_VOID_RETURN; } void store(uint length,char **min_key,uint min_key_flag, char **max_key, uint max_key_flag) { - DBUG_ENTER("store"); - if (!(min_flag & NO_MIN_RANGE) && !(min_key_flag & (NO_MIN_RANGE | NEAR_MIN))) { @@ -219,14 +198,11 @@ public: memcpy(*max_key,max_value,length+(int) maybe_null); (*max_key)+= length+(int) maybe_null; } - DBUG_VOID_RETURN; } void store_min_key(KEY_PART *key,char **range_key, uint *range_key_flag) { SEL_ARG *key_tree= first(); - DBUG_ENTER("store_min_key"); - key_tree->store(key[key_tree->part].part_length, range_key,*range_key_flag,range_key,NO_MAX_RANGE); *range_key_flag|= key_tree->min_flag; @@ -235,14 +211,11 @@ public: !(*range_key_flag & (NO_MIN_RANGE | NEAR_MIN)) && key_tree->next_key_part->type == SEL_ARG::KEY_RANGE) key_tree->next_key_part->store_min_key(key,range_key, range_key_flag); - DBUG_VOID_RETURN; } void store_max_key(KEY_PART *key,char **range_key, uint *range_key_flag) { SEL_ARG *key_tree= last(); - DBUG_ENTER("store_max_key"); - key_tree->store(key[key_tree->part].part_length, range_key, NO_MIN_RANGE, range_key,*range_key_flag); (*range_key_flag)|= key_tree->max_flag; @@ -251,7 +224,6 @@ public: !(*range_key_flag & (NO_MAX_RANGE | NEAR_MAX)) && key_tree->next_key_part->type == SEL_ARG::KEY_RANGE) key_tree->next_key_part->store_max_key(key,range_key, range_key_flag); - DBUG_VOID_RETURN; } SEL_ARG *insert(SEL_ARG *key); @@ -272,8 +244,6 @@ public: } void increment_use_count(long count) { - DBUG_ENTER("increment_use_count"); - if (next_key_part) { next_key_part->use_count+=count; @@ -282,19 +252,15 @@ public: if (pos->next_key_part) pos->increment_use_count(count); } - DBUG_VOID_RETURN; } void free_tree() { - DBUG_ENTER("free_tree"); - for (SEL_ARG *pos=first(); pos ; pos=pos->next) if (pos->next_key_part) { pos->next_key_part->use_count--; pos->next_key_part->free_tree(); } - DBUG_VOID_RETURN; } inline SEL_ARG **parent_ptr() @@ -403,23 +369,17 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables, SQL_SELECT::SQL_SELECT() :quick(0),cond(0),free_cond(0) { - DBUG_ENTER("SQL_SELECT::SQL_SELECT"); - quick_keys=0; needed_reg=0; my_b_clear(&file); - DBUG_VOID_RETURN; } SQL_SELECT::~SQL_SELECT() { delete quick; - DBUG_ENTER("SQL_SELECT::~SQL_SELECT"); - if (free_cond) delete cond; close_cached_file(&file); - DBUG_VOID_RETURN; } #undef index // Fix for Unixware 7 @@ -428,8 +388,6 @@ QUICK_SELECT::QUICK_SELECT(TABLE *table,uint key_nr,bool no_alloc) :dont_free(0),error(0),index(key_nr),max_used_key_length(0),head(table), it(ranges),range(0) { - DBUG_ENTER("QUICK_SELECT::QUICK_SELECT"); - if (!no_alloc) { init_sql_alloc(&alloc,1024,0); // Allocates everything here @@ -440,19 +398,15 @@ QUICK_SELECT::QUICK_SELECT(TABLE *table,uint key_nr,bool no_alloc) file=head->file; record=head->record[0]; init(); - DBUG_VOID_RETURN; } QUICK_SELECT::~QUICK_SELECT() { - DBUG_ENTER("QUICK_SELECT::~QUICK_SELECT"); - if (!dont_free) { file->index_end(); free_root(&alloc,MYF(0)); } - DBUG_VOID_RETURN; } QUICK_RANGE::QUICK_RANGE() @@ -462,8 +416,6 @@ QUICK_RANGE::QUICK_RANGE() SEL_ARG::SEL_ARG(SEL_ARG &arg) :Sql_alloc() { - DBUG_ENTER("SEL_ARG::SEL_ARG"); - type=arg.type; min_flag=arg.min_flag; max_flag=arg.max_flag; @@ -475,7 +427,6 @@ SEL_ARG::SEL_ARG(SEL_ARG &arg) :Sql_alloc() max_value=arg.max_value; next_key_part=arg.next_key_part; use_count=1; elements=1; - DBUG_VOID_RETURN; } @@ -493,10 +444,7 @@ SEL_ARG::SEL_ARG(Field *f,const char *min_value_arg,const char *max_value_arg) max_value((char*) max_value_arg), next(0),prev(0), next_key_part(0),color(BLACK),type(KEY_RANGE) { - DBUG_ENTER("SEL_ARG::SEL_ARG"); - left=right= &null_element; - DBUG_VOID_RETURN; } SEL_ARG::SEL_ARG(Field *field_,uint8 part_,char *min_value_,char *max_value_, @@ -506,17 +454,12 @@ SEL_ARG::SEL_ARG(Field *field_,uint8 part_,char *min_value_,char *max_value_, field(field_), min_value(min_value_), max_value(max_value_), next(0),prev(0),next_key_part(0),color(BLACK),type(KEY_RANGE) { - DBUG_ENTER("SEL_ARG::SEL_ARG"); - left=right= &null_element; - DBUG_VOID_RETURN; } SEL_ARG *SEL_ARG::clone(SEL_ARG *new_parent,SEL_ARG **next_arg) { SEL_ARG *tmp; - DBUG_ENTER("*SEL_ARG::clone"); - if (type != KEY_RANGE) { tmp=new SEL_ARG(type); @@ -541,31 +484,27 @@ SEL_ARG *SEL_ARG::clone(SEL_ARG *new_parent,SEL_ARG **next_arg) tmp->right=right->clone(tmp,next_arg); } increment_use_count(1); - DBUG_RETURN(tmp); + return tmp; } SEL_ARG *SEL_ARG::first() { SEL_ARG *next_arg=this; - DBUG_ENTER("*SEL_ARG::first"); - if (!next_arg->left) - DBUG_RETURN(0); // MAYBE_KEY + return 0; // MAYBE_KEY while (next_arg->left != &null_element) next_arg=next_arg->left; - DBUG_RETURN(next_arg); + return next_arg; } SEL_ARG *SEL_ARG::last() { SEL_ARG *next_arg=this; - DBUG_ENTER("*SEL_ARG::last"); - if (!next_arg->right) - DBUG_RETURN(0); // MAYBE_KEY + return 0; // MAYBE_KEY while (next_arg->right != &null_element) next_arg=next_arg->right; - DBUG_RETURN(next_arg); + return next_arg; } /* @@ -576,59 +515,55 @@ SEL_ARG *SEL_ARG::last() static int sel_cmp(Field *field, char *a,char *b,uint8 a_flag,uint8 b_flag) { int cmp; - DBUG_ENTER("sel_cmp"); - /* First check if there was a compare to a min or max element */ if (a_flag & (NO_MIN_RANGE | NO_MAX_RANGE)) { if ((a_flag & (NO_MIN_RANGE | NO_MAX_RANGE)) == (b_flag & (NO_MIN_RANGE | NO_MAX_RANGE))) - DBUG_RETURN(0); - DBUG_RETURN((a_flag & NO_MIN_RANGE) ? -1 : 1); + return 0; + return (a_flag & NO_MIN_RANGE) ? -1 : 1; } if (b_flag & (NO_MIN_RANGE | NO_MAX_RANGE)) - DBUG_RETURN((b_flag & NO_MIN_RANGE) ? 1 : -1); + return (b_flag & NO_MIN_RANGE) ? 1 : -1; if (field->real_maybe_null()) // If null is part of key { if (*a != *b) { - DBUG_RETURN(*a ? -1 : 1); + return *a ? -1 : 1; } if (*a) goto end; // NULL where equal a++; b++; // Skip NULL marker } cmp=field->key_cmp((byte*) a,(byte*) b); - if (cmp) DBUG_RETURN(cmp < 0 ? -1 : 1); // The values differed + if (cmp) return cmp < 0 ? -1 : 1; // The values differed // Check if the compared equal arguments was defined with open/closed range end: if (a_flag & (NEAR_MIN | NEAR_MAX)) { if ((a_flag & (NEAR_MIN | NEAR_MAX)) == (b_flag & (NEAR_MIN | NEAR_MAX))) - DBUG_RETURN(0); + return 0; if (!(b_flag & (NEAR_MIN | NEAR_MAX))) - DBUG_RETURN((a_flag & NEAR_MIN) ? 2 : -2); - DBUG_RETURN((a_flag & NEAR_MIN) ? 1 : -1); + return (a_flag & NEAR_MIN) ? 2 : -2; + return (a_flag & NEAR_MIN) ? 1 : -1; } if (b_flag & (NEAR_MIN | NEAR_MAX)) - DBUG_RETURN((b_flag & NEAR_MIN) ? -2 : 2); - DBUG_RETURN(0); // The elements where equal + return (b_flag & NEAR_MIN) ? -2 : 2; + return 0; // The elements where equal } SEL_ARG *SEL_ARG::clone_tree() { SEL_ARG tmp_link,*next_arg,*root; - DBUG_ENTER("*SEL_ARG::clone_tree"); - next_arg= &tmp_link; root=clone((SEL_ARG *) 0, &next_arg); next_arg->next=0; // Fix last link tmp_link.next->prev=0; // Fix first link root->use_count=0; - DBUG_RETURN(root); + return root; } /***************************************************************************** @@ -1167,7 +1102,6 @@ static bool like_range(const char *ptr,uint ptr_length,char escape, const char *end=ptr+ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; - DBUG_ENTER("like_range"); for (; ptr != end && min_str != min_end ; ptr++) { @@ -1191,7 +1125,7 @@ static bool like_range(const char *ptr,uint ptr_length,char escape, *min_str++ = ' '; // Because if key compression *max_str++ = max_sort_chr; } while (min_str != min_end); - DBUG_RETURN(0); + return 0; } *min_str++= *max_str++ = *ptr; } @@ -1203,7 +1137,7 @@ static bool like_range(const char *ptr,uint ptr_length,char escape, while (min_str != min_end) *min_str++ = *max_str++ = ' '; // Because if key compression - DBUG_RETURN(0); + return 0; } @@ -1228,12 +1162,11 @@ static SEL_ARG * sel_add(SEL_ARG *key1,SEL_ARG *key2) { SEL_ARG *root,**key_link; - DBUG_ENTER("sel_add"); if (!key1) - DBUG_RETURN(key2); + return key2; if (!key2) - DBUG_RETURN(key1); + return key1; key_link= &root; while (key1 && key2) @@ -1252,7 +1185,7 @@ sel_add(SEL_ARG *key1,SEL_ARG *key2) } } *key_link=key1 ? key1 : key2; - DBUG_RETURN(root); + return root; } #define CLONE_KEY1_MAYBE 1 @@ -1353,7 +1286,6 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) { SEL_ARG *next; ulong use_count=key1->use_count; - DBUG_ENTER("and_all_keys"); if (key1->elements != 1) { @@ -1383,9 +1315,9 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) next->next_key_part=key2; } if (!key1) - DBUG_RETURN(&null_element); // Impossible ranges + return &null_element; // Impossible ranges key1->use_count++; - DBUG_RETURN(key1); + return key1; } @@ -1393,12 +1325,10 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) static SEL_ARG * key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) { - DBUG_ENTER("key_and"); - if (!key1) - DBUG_RETURN(key2); + return key2; if (!key2) - DBUG_RETURN(key1); + return key1; if (key1->part != key2->part) { if (key1->part > key2->part) @@ -1410,7 +1340,7 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) key1->use_count--; if (key1->use_count > 0) key1=key1->clone_tree(); - DBUG_RETURN(and_all_keys(key1,key2,clone_flag)); + return and_all_keys(key1,key2,clone_flag); } if (((clone_flag & CLONE_KEY2_MAYBE) && @@ -1436,16 +1366,16 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) clone_flag); if (key1->next_key_part && key1->next_key_part->type == SEL_ARG::IMPOSSIBLE) - DBUG_RETURN(key1); + return key1; } else { key1->maybe_smaller(); if (key2->next_key_part) - DBUG_RETURN(and_all_keys(key1,key2,clone_flag)); + return and_all_keys(key1,key2,clone_flag); key2->use_count--; // Key2 doesn't have a tree } - DBUG_RETURN(key1); + return key1; } key1->use_count--; @@ -1484,36 +1414,32 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) key1->free_tree(); key2->free_tree(); if (!new_tree) - DBUG_RETURN(&null_element); // Impossible range - DBUG_RETURN(new_tree); + return &null_element; // Impossible range + return new_tree; } static bool get_range(SEL_ARG **e1,SEL_ARG **e2,SEL_ARG *root1) { - DBUG_ENTER("get_range"); - (*e1)=root1->find_range(*e2); // first e1->min < e2->min if ((*e1)->cmp_max_to_min(*e2) < 0) { if (!((*e1)=(*e1)->next)) - DBUG_RETURN(1); + return 1; if ((*e1)->cmp_min_to_max(*e2) > 0) { (*e2)=(*e2)->next; - DBUG_RETURN(1); + return 1; } } - DBUG_RETURN(0); + return 0; } static SEL_ARG * key_or(SEL_ARG *key1,SEL_ARG *key2) { - DBUG_ENTER("key_or"); - if (!key1) { if (key2) @@ -1521,13 +1447,13 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) key2->use_count--; key2->free_tree(); } - DBUG_RETURN(0); + return 0; } else if (!key2) { key1->use_count--; key1->free_tree(); - DBUG_RETURN(0); + return 0; } key1->use_count--; key2->use_count--; @@ -1536,7 +1462,7 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) { key1->free_tree(); key2->free_tree(); - DBUG_RETURN(0); // Can't optimize this + return 0; // Can't optimize this } // If one of the key is MAYBE_KEY then the found region may be bigger @@ -1544,13 +1470,13 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) { key2->free_tree(); key1->use_count++; - DBUG_RETURN(key1); + return key1; } if (key2->type == SEL_ARG::MAYBE_KEY) { key1->free_tree(); key2->use_count++; - DBUG_RETURN(key2); + return key2; } if (key1->use_count > 0) @@ -1615,8 +1541,8 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) tmp->max_flag & NO_MAX_RANGE) { if (key1->maybe_flag) - DBUG_RETURN(new SEL_ARG(SEL_ARG::MAYBE_KEY)); - DBUG_RETURN(0); + return new SEL_ARG(SEL_ARG::MAYBE_KEY); + return 0; } key2->increment_use_count(-1); // Free not used tree key2=key2->next; @@ -1662,8 +1588,8 @@ key_or(SEL_ARG *key1,SEL_ARG *key2) for (; key2 ; key2=key2->next) key2->increment_use_count(-1); // Free not used tree if (key1->maybe_flag) - DBUG_RETURN(new SEL_ARG(SEL_ARG::MAYBE_KEY)); - DBUG_RETURN(0); + return new SEL_ARG(SEL_ARG::MAYBE_KEY); + return 0; } } key2=key2->next; @@ -1737,7 +1663,7 @@ end: key2=next; } key1->use_count++; - DBUG_RETURN(key1); + return key1; } @@ -1745,33 +1671,31 @@ end: static bool eq_tree(SEL_ARG* a,SEL_ARG *b) { - DBUG_ENTER("eq_tree"); - if (a == b) - DBUG_RETURN(1); + return 1; if (!a || !b || !a->is_same(b)) - DBUG_RETURN(0); + return 0; if (a->left != &null_element && b->left != &null_element) { if (!eq_tree(a->left,b->left)) - DBUG_RETURN(0); + return 0; } else if (a->left != &null_element || b->left != &null_element) - DBUG_RETURN(0); + return 0; if (a->right != &null_element && b->right != &null_element) { if (!eq_tree(a->right,b->right)) - DBUG_RETURN(0); + return 0; } else if (a->right != &null_element || b->right != &null_element) - DBUG_RETURN(0); + return 0; if (a->next_key_part != b->next_key_part) { // Sub range if (!a->next_key_part != !b->next_key_part || !eq_tree(a->next_key_part, b->next_key_part)) - DBUG_RETURN(0); + return 0; } - DBUG_RETURN(1); + return 1; } @@ -1779,7 +1703,6 @@ SEL_ARG * SEL_ARG::insert(SEL_ARG *key) { SEL_ARG *element,**par,*last_element; - DBUG_ENTER("SEL_ARG::insert"); LINT_INIT(par); LINT_INIT(last_element); for (element= this; element != &null_element ; ) @@ -1816,7 +1739,7 @@ SEL_ARG::insert(SEL_ARG *key) root->use_count=this->use_count; // copy root info root->elements= this->elements+1; root->maybe_flag=this->maybe_flag; - DBUG_RETURN(root); + return root; } @@ -1829,15 +1752,14 @@ SEL_ARG * SEL_ARG::find_range(SEL_ARG *key) { SEL_ARG *element=this,*found=0; - DBUG_ENTER("SEL_ARG::find_range"); for (;;) { if (element == &null_element) - DBUG_RETURN(found); + return found; int cmp=element->cmp_min_to_min(key); if (cmp == 0) - DBUG_RETURN(element); + return element; if (cmp < 0) { found=element; @@ -1846,7 +1768,6 @@ SEL_ARG::find_range(SEL_ARG *key) else element=element->left; } - DBUG_RETURN(NULL); // impossible } @@ -1860,8 +1781,6 @@ SEL_ARG::tree_delete(SEL_ARG *key) { enum leaf_color remove_color; SEL_ARG *root,*nod,**par,*fix_par; - DBUG_ENTER("SEL_ARG::tree_delete"); - root=this; this->parent= 0; /* Unlink from list */ @@ -1909,7 +1828,7 @@ SEL_ARG::tree_delete(SEL_ARG *key) } if (root == &null_element) - DBUG_RETURN(0); // Maybe root later + return 0; // Maybe root later if (remove_color == BLACK) root=rb_delete_fixup(root,nod,fix_par); test_rb_tree(root,root->parent); @@ -1917,7 +1836,7 @@ SEL_ARG::tree_delete(SEL_ARG *key) root->use_count=this->use_count; // Fix root counters root->elements=this->elements-1; root->maybe_flag=this->maybe_flag; - DBUG_RETURN(root); + return root; } @@ -1926,8 +1845,6 @@ SEL_ARG::tree_delete(SEL_ARG *key) static void left_rotate(SEL_ARG **root,SEL_ARG *leaf) { SEL_ARG *y=leaf->right; - DBUG_ENTER("left_rotate"); - leaf->right=y->left; if (y->left != &null_element) y->left->parent=leaf; @@ -1937,14 +1854,11 @@ static void left_rotate(SEL_ARG **root,SEL_ARG *leaf) *leaf->parent_ptr()=y; y->left=leaf; leaf->parent=y; - DBUG_VOID_RETURN; } static void right_rotate(SEL_ARG **root,SEL_ARG *leaf) { SEL_ARG *y=leaf->left; - DBUG_ENTER("right_rotate"); - leaf->left=y->right; if (y->right != &null_element) y->right->parent=leaf; @@ -1954,7 +1868,6 @@ static void right_rotate(SEL_ARG **root,SEL_ARG *leaf) *leaf->parent_ptr()=y; y->right=leaf; leaf->parent=y; - DBUG_VOID_RETURN; } @@ -1962,8 +1875,6 @@ SEL_ARG * SEL_ARG::rb_insert(SEL_ARG *leaf) { SEL_ARG *y,*par,*par2,*root; - DBUG_ENTER("SEL_ARG::rb_insert"); - root= this; root->parent= 0; leaf->color=RED; @@ -2018,15 +1929,13 @@ SEL_ARG::rb_insert(SEL_ARG *leaf) } root->color=BLACK; test_rb_tree(root,root->parent); - DBUG_RETURN(root); + return root; } SEL_ARG *rb_delete_fixup(SEL_ARG *root,SEL_ARG *key,SEL_ARG *par) { SEL_ARG *x,*w; - DBUG_ENTER("*rb_delete_fixup"); - root->parent=0; x= key; @@ -2099,7 +2008,7 @@ SEL_ARG *rb_delete_fixup(SEL_ARG *root,SEL_ARG *key,SEL_ARG *par) par=x->parent; } x->color=SEL_ARG::BLACK; - DBUG_RETURN(root); + return root; } @@ -2109,44 +2018,41 @@ SEL_ARG *rb_delete_fixup(SEL_ARG *root,SEL_ARG *key,SEL_ARG *par) int test_rb_tree(SEL_ARG *element,SEL_ARG *parent) { int count_l,count_r; - DBUG_ENTER("test_rb_tree"); if (element == &null_element) - DBUG_RETURN(0); // Found end of tree + return 0; // Found end of tree if (element->parent != parent) { sql_print_error("Wrong tree: Parent doesn't point at parent"); - DBUG_RETURN(-1); + return -1; } if (element->color == SEL_ARG::RED && (element->left->color == SEL_ARG::RED || element->right->color == SEL_ARG::RED)) { sql_print_error("Wrong tree: Found two red in a row"); - DBUG_RETURN(-1); + return -1; } if (element->left == element->right && element->left != &null_element) { // Dummy test sql_print_error("Wrong tree: Found right == left"); - DBUG_RETURN(-1); + return -1; } count_l=test_rb_tree(element->left,element); count_r=test_rb_tree(element->right,element); if (count_l >= 0 && count_r >= 0) { if (count_l == count_r) - DBUG_RETURN(count_l+(element->color == SEL_ARG::BLACK)); + return count_l+(element->color == SEL_ARG::BLACK); sql_print_error("Wrong tree: Incorrect black-count: %d - %d", count_l,count_r); } - DBUG_RETURN(-1); // Error, no more warnings + return -1; // Error, no more warnings } static ulong count_key_part_usage(SEL_ARG *root, SEL_ARG *key) { ulong count= 0; - DBUG_ENTER("count_key_part_usage"); - for (root=root->first(); root ; root=root->next) { if (root->next_key_part) @@ -2157,21 +2063,19 @@ static ulong count_key_part_usage(SEL_ARG *root, SEL_ARG *key) count+=count_key_part_usage(root->next_key_part,key); } } - DBUG_RETURN(count); + return count; } void SEL_ARG::test_use_count(SEL_ARG *root) { - DBUG_ENTER("SEL_ARG::test_use_count"); - if (this == root && use_count != 1) { sql_print_error("Use_count: Wrong count %lu for root",use_count); - DBUG_VOID_RETURN; + return; } if (this->type != SEL_ARG::KEY_RANGE) - DBUG_VOID_RETURN; + return; uint e_count=0; for (SEL_ARG *pos=first(); pos ; pos=pos->next) { @@ -2183,7 +2087,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root) { sql_print_error("Use_count: Wrong count for key at %lx, %lu should be %lu", pos,pos->next_key_part->use_count,count); - DBUG_VOID_RETURN; + return; } pos->next_key_part->test_use_count(root); } @@ -2191,7 +2095,6 @@ void SEL_ARG::test_use_count(SEL_ARG *root) if (e_count != elements) sql_print_error("Wrong use count: %u for tree at %lx", e_count, (gptr) this); - DBUG_VOID_RETURN; } #endif @@ -2233,7 +2136,6 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree, uint max_key_flag) { ha_rows records=0,tmp; - DBUG_ENTER("check_quick_keys"); param->max_key_part=max(param->max_key_part,key_tree->part); if (key_tree->left != &null_element) @@ -2241,7 +2143,7 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree, records=check_quick_keys(param,idx,key_tree->left,min_key,min_key_flag, max_key,max_key_flag); if (records == HA_POS_ERROR) // Impossible - DBUG_RETURN(records); + return records; } uint tmp_min_flag,tmp_max_flag,keynr; @@ -2304,17 +2206,17 @@ check_quick_keys(PARAM *param,uint idx,SEL_ARG *key_tree, HA_READ_BEFORE_KEY : HA_READ_AFTER_KEY)); end: if (tmp == HA_POS_ERROR) // Impossible range - DBUG_RETURN(tmp); + return tmp; records+=tmp; if (key_tree->right != &null_element) { tmp=check_quick_keys(param,idx,key_tree->right,min_key,min_key_flag, max_key,max_key_flag); if (tmp == HA_POS_ERROR) - DBUG_RETURN(tmp); + return tmp; records+=tmp; } - DBUG_RETURN(records); + return records; } @@ -2360,13 +2262,12 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key, { QUICK_RANGE *range; uint flag; - DBUG_ENTER("get_quick_keys"); if (key_tree->left != &null_element) { if (get_quick_keys(param,quick,key,key_tree->left, min_key,min_key_flag, max_key, max_key_flag)) - DBUG_RETURN(1); + return 1; } char *tmp_min_key=min_key,*tmp_max_key=max_key; key_tree->store(key[key_tree->part].part_length, @@ -2383,7 +2284,7 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key, if (get_quick_keys(param,quick,key,key_tree->next_key_part, tmp_min_key, min_key_flag | key_tree->min_flag, tmp_max_key, max_key_flag | key_tree->max_flag)) - DBUG_RETURN(1); + return 1; goto end; // Ugly, but efficient } { @@ -2441,15 +2342,15 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key, set_if_bigger(quick->max_used_key_length,range->min_length); set_if_bigger(quick->max_used_key_length,range->max_length); if (!range) // Not enough memory - DBUG_RETURN(1); + return 1; quick->ranges.push_back(range); end: if (key_tree->right != &null_element) - DBUG_RETURN(get_quick_keys(param,quick,key,key_tree->right, + return get_quick_keys(param,quick,key,key_tree->right, min_key,min_key_flag, - max_key,max_key_flag)); - DBUG_RETURN(0); + max_key,max_key_flag); + return 0; } /* @@ -2458,19 +2359,17 @@ get_quick_keys(PARAM *param,QUICK_SELECT *quick,KEY_PART *key, bool QUICK_SELECT::unique_key_range() { - DBUG_ENTER("QUICK_SELECT::unique_key_range"); - if (ranges.elements == 1) { QUICK_RANGE *tmp; if (((tmp=ranges.head())->flag & (EQ_RANGE | NULL_RANGE)) == EQ_RANGE) { KEY *key=head->key_info+index; - DBUG_RETURN(((key->flags & HA_NOSAME) && - key->key_length == tmp->min_length)); + return ((key->flags & HA_NOSAME) && + key->key_length == tmp->min_length); } } - DBUG_RETURN(0); + return 0; } @@ -2478,8 +2377,6 @@ bool QUICK_SELECT::unique_key_range() static bool null_part_in_key(KEY_PART *key_part, const char *key, uint length) { - DBUG_ENTER("null_part_in_key"); - for (const char *end=key+length ; key < end; key+= key_part++->part_length) @@ -2487,10 +2384,10 @@ static bool null_part_in_key(KEY_PART *key_part, const char *key, uint length) if (key_part->null_bit) { if (*key++) - DBUG_RETURN(1); + return 1; } } - DBUG_RETURN(0); + return 0; } /**************************************************************************** @@ -2499,8 +2396,6 @@ static bool null_part_in_key(KEY_PART *key_part, const char *key, uint length) QUICK_SELECT *get_quick_select_for_ref(TABLE *table, TABLE_REF *ref) { - DBUG_ENTER("*get_quick_select_for_ref"); - table->file->index_end(); // Remove old cursor QUICK_SELECT *quick=new QUICK_SELECT(table, ref->key, 1); KEY *key_info = &table->key_info[ref->key]; @@ -2508,7 +2403,7 @@ QUICK_SELECT *get_quick_select_for_ref(TABLE *table, TABLE_REF *ref) uint part; if (!quick) - DBUG_RETURN(0); + return 0; QUICK_RANGE *range= new QUICK_RANGE(); if (!range || cp_buffer_from_ref(ref)) goto err; @@ -2531,11 +2426,11 @@ QUICK_SELECT *get_quick_select_for_ref(TABLE *table, TABLE_REF *ref) key_part->null_bit= key_info->key_part[part].null_bit; } if (!quick->ranges.push_back(range)) - DBUG_RETURN(quick); + return quick; err: delete quick; - DBUG_RETURN(0); + return 0; } /* get next possible record using quick-struct */ @@ -2596,7 +2491,6 @@ int QUICK_SELECT::get_next() } range=0; // To next range } - DBUG_RETURN(0); // impossible } /* compare if found key is over max-value */ @@ -2604,10 +2498,8 @@ int QUICK_SELECT::get_next() int QUICK_SELECT::cmp_next(QUICK_RANGE *range_arg) { - DBUG_ENTER("QUICK_SELECT::cmp_next"); - if (range_arg->flag & NO_MAX_RANGE) - DBUG_RETURN(0); /* key can't be to large */ + return 0; /* key can't be to large */ KEY_PART *key_part=key_parts; for (char *key=range_arg->max_key, *end=key+range_arg->max_length; @@ -2620,18 +2512,18 @@ int QUICK_SELECT::cmp_next(QUICK_RANGE *range_arg) if (*key++) { if (!key_part->field->is_null()) - DBUG_RETURN(1); + return 1; continue; } else if (key_part->field->is_null()) - DBUG_RETURN(0); + return 0; } if ((cmp=key_part->field->key_cmp((byte*) key, key_part->part_length)) < 0) - DBUG_RETURN(0); + return 0; if (cmp > 0) - DBUG_RETURN(1); + return 1; } - DBUG_RETURN((range_arg->flag & NEAR_MAX) ? 1 : 0); // Exact match + return (range_arg->flag & NEAR_MAX) ? 1 : 0; // Exact match } @@ -2650,7 +2542,6 @@ QUICK_SELECT_DESC::QUICK_SELECT_DESC(QUICK_SELECT *q, uint used_key_parts) { bool not_read_after_key = file->table_flags() & HA_NOT_READ_AFTER_KEY; QUICK_RANGE *r; - DBUG_ENTER("QUICK_SELECT_DESC::QUICK_SELECT_DESC"); it.rewind(); for (r = it++; r; r = it++) @@ -2662,7 +2553,7 @@ QUICK_SELECT_DESC::QUICK_SELECT_DESC(QUICK_SELECT *q, uint used_key_parts) it.rewind(); // Reset range error = HA_ERR_UNSUPPORTED; dont_free=1; // Don't free memory from 'q' - DBUG_VOID_RETURN; + return; } } /* Remove EQ_RANGE flag for keys that are not using the full key */ @@ -2675,7 +2566,6 @@ QUICK_SELECT_DESC::QUICK_SELECT_DESC(QUICK_SELECT *q, uint used_key_parts) rev_it.rewind(); q->dont_free=1; // Don't free shared mem delete q; - DBUG_VOID_RETURN; } @@ -2763,7 +2653,6 @@ int QUICK_SELECT_DESC::get_next() } range = 0; // To next range } - DBUG_RETURN(0); // impossible } @@ -2773,10 +2662,8 @@ int QUICK_SELECT_DESC::get_next() int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range_arg) { - DBUG_ENTER("QUICK_SELECT_DESC::cmp_prev"); - if (range_arg->flag & NO_MIN_RANGE) - DBUG_RETURN(0); /* key can't be to small */ + return 0; /* key can't be to small */ KEY_PART *key_part = key_parts; for (char *key = range_arg->min_key, *end = key + range_arg->min_length; @@ -2791,19 +2678,19 @@ int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range_arg) { // the range is expecting a null value if (!key_part->field->is_null()) - DBUG_RETURN(0); // not null -- still inside the range + return 0; // not null -- still inside the range continue; // null -- exact match, go to next key part } else if (key_part->field->is_null()) - DBUG_RETURN(1); // null -- outside the range + return 1; // null -- outside the range } if ((cmp = key_part->field->key_cmp((byte*) key, key_part->part_length)) > 0) - DBUG_RETURN(0); + return 0; if (cmp < 0) - DBUG_RETURN(1); + return 1; } - DBUG_RETURN((range_arg->flag & NEAR_MIN) ? 1 : 0); // Exact match + return (range_arg->flag & NEAR_MIN) ? 1 : 0; // Exact match } @@ -2814,11 +2701,9 @@ int QUICK_SELECT_DESC::cmp_prev(QUICK_RANGE *range_arg) bool QUICK_SELECT_DESC::range_reads_after_key(QUICK_RANGE *range_arg) { - DBUG_ENTER("QUICK_SELECT_DESC::range_reads_after_key"); - - DBUG_RETURN(((range_arg->flag & (NO_MAX_RANGE | NEAR_MAX)) || + return ((range_arg->flag & (NO_MAX_RANGE | NEAR_MAX)) || !(range_arg->flag & EQ_RANGE) || - head->key_info[index].key_length != range_arg->max_length) ? 1 : 0); + head->key_info[index].key_length != range_arg->max_length) ? 1 : 0; } @@ -2830,7 +2715,6 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range_arg, uint offset,end; KEY_PART *key_part = key_parts, *key_part_end= key_part+used_key_parts; - DBUG_ENTER("QUICK_SELECT_DESC::test_if_null_range"); for (offset= 0, end = min(range_arg->min_length, range_arg->max_length) ; offset < end && key_part != key_part_end ; @@ -2845,7 +2729,7 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range_arg, continue; } if (null_length && range_arg->min_key[offset]) - DBUG_RETURN(1); // min_key is null and max_key isn't + return 1; // min_key is null and max_key isn't // Range doesn't cover NULL. This is ok if there is no more null parts break; } @@ -2858,7 +2742,7 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range_arg, if (key_part != key_part_end && key_part->null_bit) { if (offset >= range_arg->min_length || range_arg->min_key[offset]) - DBUG_RETURN(1); // Could be null + return 1; // Could be null key_part++; } /* @@ -2867,8 +2751,8 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range_arg, */ for (; key_part != key_part_end ; key_part++) if (key_part->null_bit) - DBUG_RETURN(1); // Covers null part - DBUG_RETURN(0); + return 1; // Covers null part + return 0; } @@ -2886,7 +2770,6 @@ print_key(KEY_PART *key_part,const char *key,uint used_length) { char buff[1024]; String tmp(buff,sizeof(buff)); - DBUG_ENTER("print_key"); for (uint length=0; length < used_length ; @@ -2910,7 +2793,6 @@ print_key(KEY_PART *key_part,const char *key,uint used_length) field->val_str(&tmp,&tmp); fwrite(tmp.ptr(),sizeof(char),tmp.length(),DBUG_FILE); } - DBUG_VOID_RETURN; } static void print_quick(QUICK_SELECT *quick,key_map needed_reg) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 25587f0ada7..cb2e73c0c26 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -156,7 +156,6 @@ int handle_select(THD *thd, LEX *lex, select_result *result) { int res; register SELECT_LEX *select_lex = &lex->select_lex; - DBUG_ENTER("handle_select"); #ifdef DISABLED_UNTIL_REWRITTEN_IN_4_1 if (lex->olap) @@ -169,7 +168,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result) if (sl->olap != UNSPECIFIED_OLAP_TYPE) { if ((error=handle_olaps(lex,sl))) - DBUG_RETURN(error); + return error; lex->last_selects->next=sl_next; } } @@ -191,7 +190,7 @@ int handle_select(THD *thd, LEX *lex, select_result *result) if (res && result) result->abort(); delete result; - DBUG_RETURN(res); + return res; } @@ -1267,12 +1266,10 @@ static KEY_FIELD * merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end, uint and_level) { - DBUG_ENTER("merge_key_fields"); - if (start == new_fields) - DBUG_RETURN(start); // Impossible or + return start; // Impossible or if (new_fields == end) - DBUG_RETURN(start); // No new fields, skip all + return start; // No new fields, skip all KEY_FIELD *first_free=new_fields; @@ -1319,7 +1316,7 @@ merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end, } old++; } - DBUG_RETURN(first_free); + return first_free; } @@ -1329,14 +1326,12 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, table_map usable_tables) { bool exists_optimize=0; - DBUG_ENTER("add_key_field"); - if (!(field->flags & PART_KEY_FLAG)) { // Don't remove column IS NULL on a LEFT JOIN table if (!eq_func || !value || value->type() != Item::NULL_ITEM || !field->table->maybe_null || field->null_ptr) - DBUG_VOID_RETURN; // Not a key. Skip it + return; // Not a key. Skip it exists_optimize=1; } else @@ -1344,12 +1339,12 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, table_map used_tables=0; if (value && (used_tables=value->used_tables()) & (field->table->map | RAND_TABLE_BIT)) - DBUG_VOID_RETURN; + return; if (!(usable_tables & field->table->map)) { if (!eq_func || !value || value->type() != Item::NULL_ITEM || !field->table->maybe_null || field->null_ptr) - DBUG_VOID_RETURN; // Can't use left join optimize + return; // Can't use left join optimize exists_optimize=1; } else @@ -1362,7 +1357,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, if (!value) { // Probably BETWEEN or IN stat[0].const_keys |= possible_keys; - DBUG_VOID_RETURN; // Can't be used as eq key + return; // Can't be used as eq key } /* Save the following cases: @@ -1383,7 +1378,7 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, field->result_type() == STRING_RESULT && value->result_type() != STRING_RESULT && field->cmp_type() != value->result_type()) - DBUG_VOID_RETURN; + return; } } /* Store possible eq field */ @@ -1393,7 +1388,6 @@ add_key_field(KEY_FIELD **key_fields,uint and_level, (*key_fields)->level=(*key_fields)->const_level=and_level; (*key_fields)->exists_optimize=exists_optimize; (*key_fields)++; - DBUG_VOID_RETURN; } @@ -1401,8 +1395,6 @@ static void add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level, COND *cond, table_map usable_tables) { - DBUG_ENTER("add_key_fields"); - if (cond->type() == Item_func::COND_ITEM) { List_iterator_fast li(*((Item_cond*) cond)->argument_list()); @@ -1435,12 +1427,12 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level, *key_fields,++(*and_level)); } } - DBUG_VOID_RETURN; + return; } /* If item is of type 'field op field/constant' add it to key_fields */ if (cond->type() != Item::FUNC_ITEM) - DBUG_VOID_RETURN; + return; Item_func *cond_func= (Item_func*) cond; switch (cond_func->select_optimize()) { case Item_func::OPTIMIZE_NONE: @@ -1484,7 +1476,7 @@ add_key_fields(JOIN_TAB *stat,KEY_FIELD **key_fields,uint *and_level, } break; } - DBUG_VOID_RETURN; + return; } /* @@ -1496,10 +1488,8 @@ static uint max_part_bit(key_map bits) { uint found; - DBUG_ENTER("max_part_bit"); - for (found=0; bits & 1 ; found++,bits>>=1) ; - DBUG_RETURN(found); + return found; } @@ -1509,7 +1499,6 @@ add_key_part(DYNAMIC_ARRAY *keyuse_array,KEY_FIELD *key_field) Field *field=key_field->field; TABLE *form= field->table; KEYUSE keyuse; - DBUG_ENTER("add_key_part"); if (key_field->eq_func && !key_field->exists_optimize) { @@ -1539,7 +1528,6 @@ add_key_part(DYNAMIC_ARRAY *keyuse_array,KEY_FIELD *key_field) if (key_field->val->type() == Item::NULL_ITEM && !key_field->field->real_maybe_null()) key_field->field->table->reginfo.not_exists_optimize=1; - DBUG_VOID_RETURN; } static void @@ -1547,10 +1535,9 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, JOIN_TAB *stat,COND *cond,table_map usable_tables) { Item_func_match *cond_func=NULL; - DBUG_ENTER("add_ft_keys"); if (!cond) - DBUG_VOID_RETURN; + return; if (cond->type() == Item::FUNC_ITEM) { @@ -1602,7 +1589,7 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, } if (!cond_func || cond_func->key == NO_SUCH_KEY) - DBUG_VOID_RETURN; + return; KEYUSE keyuse; @@ -1613,21 +1600,18 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array, keyuse.keypart=FT_KEYPART; keyuse.used_tables=cond_func->key_item()->used_tables(); VOID(insert_dynamic(keyuse_array,(gptr) &keyuse)); - DBUG_VOID_RETURN; } static int sort_keyuse(KEYUSE *a,KEYUSE *b) { - DBUG_ENTER("sort_keyuse"); - if (a->table->tablenr != b->table->tablenr) - DBUG_RETURN((int) (a->table->tablenr - b->table->tablenr)); + return (int) (a->table->tablenr - b->table->tablenr); if (a->key != b->key) - DBUG_RETURN((int) (a->key - b->key)); + return (int) (a->key - b->key); if (a->keypart != b->keypart) - DBUG_RETURN((int) (a->keypart - b->keypart)); - DBUG_RETURN(test(a->used_tables) - test(b->used_tables)); // Place const first + return (int) (a->keypart - b->keypart); + return test(a->used_tables) - test(b->used_tables); // Place const first } @@ -1642,14 +1626,13 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, uint tables, COND *cond, table_map normal_tables) { uint and_level,i,found_eq_constant; - DBUG_ENTER("update_ref_and_keys"); { KEY_FIELD *key_fields,*end; if (!(key_fields=(KEY_FIELD*) thd->alloc(sizeof(key_fields[0])*(thd->cond_count+1)*2))) - DBUG_RETURN(TRUE); /* purecov: inspected */ + return TRUE; /* purecov: inspected */ and_level=0; end=key_fields; if (cond) add_key_fields(join_tab,&end,&and_level,cond,normal_tables); @@ -1662,7 +1645,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, } } if (my_init_dynamic_array(keyuse,sizeof(KEYUSE),20,64)) - DBUG_RETURN(TRUE); + return TRUE; /* fill keyuse with found key parts */ for (KEY_FIELD *field=key_fields ; field != end ; field++) add_key_part(keyuse,field); @@ -1721,7 +1704,7 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, VOID(set_dynamic(keyuse,(gptr) &end,i)); keyuse->elements=i; } - DBUG_RETURN(FALSE); + return FALSE; } @@ -1735,8 +1718,6 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, static void set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key) { - DBUG_ENTER("set_position"); - join->positions[idx].table= table; join->positions[idx].key=key; join->positions[idx].records_read=1.0; /* This is a const table */ @@ -1751,7 +1732,6 @@ set_position(JOIN *join,uint idx,JOIN_TAB *table,KEYUSE *key) next=tmp; } join->best_ref[idx]=table; - DBUG_VOID_RETURN; } @@ -1772,7 +1752,6 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, ulong rec; double tmp; THD *thd= current_thd; - DBUG_ENTER("find_best"); if (!rest_tables) { @@ -1789,10 +1768,10 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, sizeof(POSITION)*idx); join->best_read=read_time; } - DBUG_VOID_RETURN; + return; } if (read_time+record_count/(double) TIME_FOR_COMPARE >= join->best_read) - DBUG_VOID_RETURN; /* Found better before */ + return; /* Found better before */ JOIN_TAB *s; double best_record_count=DBL_MAX,best_read_time=DBL_MAX; @@ -2089,7 +2068,6 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, break; // Don't test all combinations } } - DBUG_VOID_RETURN; } @@ -2100,8 +2078,6 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, static void calc_used_field_length(THD *thd, JOIN_TAB *join_tab) { uint null_fields,blobs,fields,rec_length; - DBUG_ENTER("calc_used_field_length"); - null_fields=blobs=fields=rec_length=0; Field **f_ptr,*field; @@ -2131,7 +2107,6 @@ static void calc_used_field_length(THD *thd, JOIN_TAB *join_tab) join_tab->used_fields=fields; join_tab->used_fieldlength=rec_length; join_tab->used_blobs=blobs; - DBUG_VOID_RETURN; } @@ -2141,7 +2116,6 @@ cache_record_length(JOIN *join,uint idx) uint length=0; JOIN_TAB **pos,**end; THD *thd=join->thd; - DBUG_ENTER("cache_record_length"); for (pos=join->best_ref+join->const_tables,end=join->best_ref+idx ; pos != end ; @@ -2152,7 +2126,7 @@ cache_record_length(JOIN *join,uint idx) calc_used_field_length(thd, join_tab); length+=join_tab->used_fieldlength; } - DBUG_RETURN(length); + return length; } @@ -2160,7 +2134,6 @@ static double prev_record_reads(JOIN *join,table_map found_ref) { double found=1.0; - DBUG_ENTER("prev_record_reads"); for (POSITION *pos=join->positions ; found_ref ; pos++) { @@ -2170,7 +2143,7 @@ prev_record_reads(JOIN *join,table_map found_ref) found*=pos->records_read; } } - DBUG_RETURN(found); + return found; } @@ -2187,12 +2160,11 @@ get_best_combination(JOIN *join) KEYUSE *keyuse; uint table_count; THD *thd=join->thd; - DBUG_ENTER("get_best_combination"); table_count=join->tables; if (!(join->join_tab=join_tab= (JOIN_TAB*) thd->alloc(sizeof(JOIN_TAB)*table_count))) - DBUG_RETURN(TRUE); + return TRUE; join->full_join=0; @@ -2221,13 +2193,13 @@ get_best_combination(JOIN *join) join->full_join=1; } else if (create_ref_for_key(join, j, keyuse, used_tables)) - DBUG_RETURN(TRUE); // Something went wrong + return TRUE; // Something went wrong } for (i=0 ; i < table_count ; i++) join->map2table[join->join_tab[i].table->tablenr]=join->join_tab+i; update_depend_map(join); - DBUG_RETURN(0); + return 0; } @@ -2240,7 +2212,6 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, uint keyparts,length,key; TABLE *table; KEY *keyinfo; - DBUG_ENTER("create_ref_for_key"); /* Use best key from find_best @@ -2284,7 +2255,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, (keyparts+1)))) || !(j->ref.items= (Item**) thd->alloc(sizeof(Item*)*keyparts))) { - DBUG_RETURN(TRUE); + return TRUE; } j->ref.key_buff2=j->ref.key_buff+ALIGN_SIZE(length); j->ref.key_err=1; @@ -2296,7 +2267,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, { j->ref.items[0]=((Item_func*)(keyuse->val))->key_item(); if (keyuse->used_tables) - DBUG_RETURN(TRUE); // not supported yet. SerG + return TRUE; // not supported yet. SerG j->type=JT_FT; } @@ -2324,7 +2295,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, keyuse->val); if (thd->fatal_error) { - DBUG_RETURN(TRUE); + return TRUE; } tmp->copy(); } @@ -2357,7 +2328,7 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse, } else j->type=JT_EQ_REF; - DBUG_RETURN(0); + return 0; } @@ -2366,31 +2337,29 @@ static store_key * get_store_key(THD *thd, KEYUSE *keyuse, table_map used_tables, KEY_PART_INFO *key_part, char *key_buff, uint maybe_null) { - DBUG_ENTER("get_store_key"); - if (!((~used_tables) & keyuse->used_tables)) // if const item { - DBUG_RETURN(new store_key_const_item(thd, + return new store_key_const_item(thd, key_part->field, key_buff + maybe_null, maybe_null ? key_buff : 0, key_part->length, - keyuse->val)); + keyuse->val); } else if (keyuse->val->type() == Item::FIELD_ITEM) - DBUG_RETURN(new store_key_field(thd, + return new store_key_field(thd, key_part->field, key_buff + maybe_null, maybe_null ? key_buff : 0, key_part->length, ((Item_field*) keyuse->val)->field, - keyuse->val->full_name())); - DBUG_RETURN(new store_key_item(thd, + keyuse->val->full_name()); + return new store_key_item(thd, key_part->field, key_buff + maybe_null, maybe_null ? key_buff : 0, key_part->length, - keyuse->val)); + keyuse->val); } /* @@ -2403,12 +2372,10 @@ store_val_in_field(Field *field,Item *item) { THD *thd=current_thd; ulong cuted_fields=thd->cuted_fields; - DBUG_ENTER("store_val_in_field"); - thd->count_cuted_fields=1; item->save_in_field(field); thd->count_cuted_fields=0; - DBUG_RETURN(cuted_fields != thd->cuted_fields); + return cuted_fields != thd->cuted_fields; } @@ -2417,11 +2384,10 @@ make_simple_join(JOIN *join,TABLE *tmp_table) { TABLE **tableptr; JOIN_TAB *join_tab; - DBUG_ENTER("make_simple_join"); if (!(tableptr=(TABLE**) join->thd->alloc(sizeof(TABLE*))) || !(join_tab=(JOIN_TAB*) join->thd->alloc(sizeof(JOIN_TAB)))) - DBUG_RETURN(TRUE); + return TRUE; join->join_tab=join_tab; join->table=tableptr; tableptr[0]=tmp_table; join->tables=1; @@ -2453,7 +2419,7 @@ make_simple_join(JOIN *join,TABLE *tmp_table) bzero((char*) &join_tab->read_record,sizeof(join_tab->read_record)); tmp_table->status=0; tmp_table->null_row=0; - DBUG_RETURN(FALSE); + return FALSE; } @@ -2825,15 +2791,13 @@ join_free(JOIN *join) static bool eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab) { - DBUG_ENTER("eq_ref_table"); - if (tab->cached_eq_ref_table) // If cached - DBUG_RETURN(tab->eq_ref_table); + return tab->eq_ref_table; tab->cached_eq_ref_table=1; if (tab->type == JT_CONST) // We can skip const tables - DBUG_RETURN((tab->eq_ref_table=1)); /* purecov: inspected */ + return (tab->eq_ref_table=1); /* purecov: inspected */ if (tab->type != JT_EQ_REF) - DBUG_RETURN((tab->eq_ref_table=0)); // We must use this + return (tab->eq_ref_table=0); // We must use this Item **ref_item=tab->ref.items; Item **end=ref_item+tab->ref.key_parts; uint found=0; @@ -2857,7 +2821,7 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab) continue; // Used in ORDER BY } if (!only_eq_ref_tables(join,start_order, (*ref_item)->used_tables())) - DBUG_RETURN((tab->eq_ref_table=0)); + return (tab->eq_ref_table=0); } } /* Check that there was no reference to table before sort order */ @@ -2869,25 +2833,23 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab) continue; } if (start_order->depend_map & map) - DBUG_RETURN((tab->eq_ref_table=0)); + return (tab->eq_ref_table=0); } - DBUG_RETURN(tab->eq_ref_table=1); + return tab->eq_ref_table=1; } static bool only_eq_ref_tables(JOIN *join,ORDER *order,table_map tables) { - DBUG_ENTER("only_eq_ref_tables"); - if (specialflag & SPECIAL_SAFE_MODE) - DBUG_RETURN(0); // skip this optimize /* purecov: inspected */ + return 0; // skip this optimize /* purecov: inspected */ for (JOIN_TAB **tab=join->map2table ; tables ; tab++, tables>>=1) { if (tables & 1 && !eq_ref_table(join, order, *tab)) - DBUG_RETURN(0); + return 0; } - DBUG_RETURN(1); + return 1; } @@ -2896,7 +2858,6 @@ only_eq_ref_tables(JOIN *join,ORDER *order,table_map tables) static void update_depend_map(JOIN *join) { JOIN_TAB *join_tab=join->join_tab, *end=join_tab+join->tables; - DBUG_ENTER("update_depend_map"); for (; join_tab != end ; join_tab++) { @@ -2915,7 +2876,6 @@ static void update_depend_map(JOIN *join) ref->depend_map|=(*tab)->ref.depend_map; } } - DBUG_VOID_RETURN; } @@ -2923,8 +2883,6 @@ static void update_depend_map(JOIN *join) static void update_depend_map(JOIN *join, ORDER *order) { - DBUG_ENTER("update_depend_map"); - for (; order ; order=order->next) { table_map depend_map; @@ -2941,7 +2899,6 @@ static void update_depend_map(JOIN *join, ORDER *order) } } } - DBUG_VOID_RETURN; } @@ -2953,10 +2910,9 @@ static void update_depend_map(JOIN *join, ORDER *order) static ORDER * remove_const(JOIN *join,ORDER *first_order, COND *cond, bool *simple_order) { - DBUG_ENTER("remove_const"); - if (join->tables == join->const_tables) - DBUG_RETURN(0); // No need to sort + return 0; // No need to sort + DBUG_ENTER("remove_const"); ORDER *order,**prev_ptr; table_map first_table= join->join_tab[join->const_tables].table->map; table_map not_const_tables= ~join->const_table_map; @@ -3053,11 +3009,8 @@ return_zero_rows(JOIN *join, select_result *result,TABLE_LIST *tables, static void clear_tables(JOIN *join) { - DBUG_ENTER("clear_tables"); - for (uint i=0 ; i < join->tables ; i++) mark_as_null_row(join->table[i]); // All fields are NULL - DBUG_VOID_RETURN; } /***************************************************************************** @@ -3096,8 +3049,6 @@ static void change_cond_ref_to_const(I_List *save_list,Item *and_father, Item *cond, Item *field, Item *value) { - DBUG_ENTER("change_cond_ref_to_const"); - if (cond->type() == Item::COND_ITEM) { bool and_level= ((Item_cond*) cond)->functype() == @@ -3107,10 +3058,10 @@ change_cond_ref_to_const(I_List *save_list,Item *and_father, while ((item=li++)) change_cond_ref_to_const(save_list,and_level ? cond : item, item, field, value); - DBUG_VOID_RETURN; + return; } if (cond->eq_cmp_result() == Item::COND_OK) - DBUG_VOID_RETURN; // Not a boolean function + return; // Not a boolean function Item_bool_func2 *func= (Item_bool_func2*) cond; Item *left_item= func->arguments()[0]; @@ -3157,7 +3108,6 @@ change_cond_ref_to_const(I_List *save_list,Item *and_father, func->arguments()[1]->result_type())); } } - DBUG_VOID_RETURN; } @@ -3165,8 +3115,6 @@ static void propagate_cond_constants(I_List *save_list,COND *and_level, COND *cond) { - DBUG_ENTER("propagate_cond_constants"); - if (cond->type() == Item::COND_ITEM) { bool and_level= ((Item_cond*) cond)->functype() == @@ -3224,19 +3172,16 @@ propagate_cond_constants(I_List *save_list,COND *and_level, } } } - DBUG_VOID_RETURN; } static COND * optimize_cond(COND *conds,Item::cond_result *cond_value) { - DBUG_ENTER("optimize_cond"); - if (!conds) { *cond_value= Item::COND_TRUE; - DBUG_RETURN(conds); + return conds; } /* change field = field to field = const for each found field = const */ DBUG_EXECUTE("where",print_where(conds,"original");); @@ -3248,7 +3193,7 @@ optimize_cond(COND *conds,Item::cond_result *cond_value) DBUG_EXECUTE("where",print_where(conds,"after const change");); conds=remove_eq_conds(conds,cond_value) ; DBUG_EXECUTE("info",print_where(conds,"after remove");); - DBUG_RETURN(conds); + return conds; } @@ -3263,8 +3208,6 @@ optimize_cond(COND *conds,Item::cond_result *cond_value) static COND * remove_eq_conds(COND *cond,Item::cond_result *cond_value) { - DBUG_ENTER("remove_eq_conds"); - if (cond->type() == Item::COND_ITEM) { bool and_level= ((Item_cond*) cond)->functype() @@ -3302,14 +3245,14 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) if (and_level) { *cond_value=tmp_cond_value; - DBUG_RETURN((COND*) 0); // Always false + return (COND*) 0; // Always false } break; case Item::COND_TRUE: if (!and_level) { *cond_value= tmp_cond_value; - DBUG_RETURN((COND*) 0); // Always true + return (COND*) 0; // Always true } break; case Item::COND_UNDEF: // Impossible @@ -3318,12 +3261,12 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) } if (!((Item_cond*) cond)->argument_list()->elements || *cond_value != Item::COND_OK) - DBUG_RETURN((COND*) 0); + return (COND*) 0; if (((Item_cond*) cond)->argument_list()->elements == 1) { // Remove list item= ((Item_cond*) cond)->argument_list()->head(); ((Item_cond*) cond)->argument_list()->empty(); - DBUG_RETURN(item); + return item; } } else if (cond->type() == Item::FUNC_ITEM && @@ -3379,7 +3322,7 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) else if (cond->const_item()) { *cond_value= eval_const_cond(cond) ? Item::COND_TRUE : Item::COND_FALSE; - DBUG_RETURN((COND*) 0); + return (COND*) 0; } else if ((*cond_value= cond->eq_cmp_result()) != Item::COND_OK) { // boolan compare function @@ -3389,11 +3332,11 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) { if (!left_item->maybe_null || ((Item_func*) cond)->functype() == Item_func::EQUAL_FUNC) - DBUG_RETURN((COND*) 0); // Compare of identical items + return (COND*) 0; // Compare of identical items } } *cond_value=Item::COND_OK; - DBUG_RETURN(cond); // Point at next and level + return cond; // Point at next and level } /* @@ -3403,8 +3346,6 @@ remove_eq_conds(COND *cond,Item::cond_result *cond_value) static bool const_expression_in_where(COND *cond, Item *comp_item, Item **const_item) { - DBUG_ENTER("const_expression_in_where"); - if (cond->type() == Item::COND_ITEM) { bool and_level= (((Item_cond*) cond)->functype() @@ -3417,19 +3358,19 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item) if (res) // Is a const value { if (and_level) - DBUG_RETURN(1); + return 1; } else if (!and_level) - DBUG_RETURN(0); + return 0; } - DBUG_RETURN(and_level ? 0 : 1); + return and_level ? 0 : 1; } else if (cond->eq_cmp_result() != Item::COND_OK) { // boolan compare function Item_func* func= (Item_func*) cond; if (func->functype() != Item_func::EQUAL_FUNC && func->functype() != Item_func::EQ_FUNC) - DBUG_RETURN(0); + return 0; Item *left_item= ((Item_func*) cond)->arguments()[0]; Item *right_item= ((Item_func*) cond)->arguments()[1]; if (left_item->eq(comp_item,1)) @@ -3437,9 +3378,9 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item) if (right_item->const_item()) { if (*const_item) - DBUG_RETURN(right_item->eq(*const_item, 1)); + return right_item->eq(*const_item, 1); *const_item=right_item; - DBUG_RETURN(1); + return 1; } } else if (right_item->eq(comp_item,1)) @@ -3447,13 +3388,13 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item) if (left_item->const_item()) { if (*const_item) - DBUG_RETURN(left_item->eq(*const_item, 1)); + return left_item->eq(*const_item, 1); *const_item=left_item; - DBUG_RETURN(1); + return 1; } } } - DBUG_RETURN(0); + return 0; } @@ -3468,8 +3409,6 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, Item_result_field ***copy_func, Field **from_field, bool group, bool modify_item) { - DBUG_ENTER("*create_tmp_field"); - switch (type) { case Item::SUM_FUNC_ITEM: { @@ -3478,46 +3417,38 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, switch (item_sum->sum_func()) { case Item_sum::AVG_FUNC: /* Place for sum & count */ if (group) - { - DBUG_RETURN(new Field_string(sizeof(double)+sizeof(longlong), - maybe_null, item->name,table,1)); - } + return new Field_string(sizeof(double)+sizeof(longlong), + maybe_null, item->name,table,1); else - { - DBUG_RETURN(new Field_double(item_sum->max_length,maybe_null, - item->name, table, item_sum->decimals)); - } + return new Field_double(item_sum->max_length,maybe_null, + item->name, table, item_sum->decimals); case Item_sum::STD_FUNC: /* Place for sum & count */ if (group) - { - DBUG_RETURN(new Field_string(sizeof(double)*2+sizeof(longlong), - maybe_null, item->name,table,1)); - } + return new Field_string(sizeof(double)*2+sizeof(longlong), + maybe_null, item->name,table,1); else - { - DBUG_RETURN(new Field_double(item_sum->max_length, maybe_null, - item->name,table,item_sum->decimals)); - } + return new Field_double(item_sum->max_length, maybe_null, + item->name,table,item_sum->decimals); case Item_sum::UNIQUE_USERS_FUNC: - DBUG_RETURN(new Field_long(9,maybe_null,item->name,table,1)); + return new Field_long(9,maybe_null,item->name,table,1); default: switch (item_sum->result_type()) { case REAL_RESULT: - DBUG_RETURN(new Field_double(item_sum->max_length,maybe_null, - item->name,table,item_sum->decimals)); + return new Field_double(item_sum->max_length,maybe_null, + item->name,table,item_sum->decimals); case INT_RESULT: - DBUG_RETURN(new Field_longlong(item_sum->max_length,maybe_null, - item->name,table,item->unsigned_flag)); + return new Field_longlong(item_sum->max_length,maybe_null, + item->name,table,item->unsigned_flag); case STRING_RESULT: if (item_sum->max_length > 255) - DBUG_RETURN(new Field_blob(item_sum->max_length,maybe_null, - item->name,table,item->binary)); - DBUG_RETURN(new Field_string(item_sum->max_length,maybe_null, - item->name,table,item->binary)); + return new Field_blob(item_sum->max_length,maybe_null, + item->name,table,item->binary); + return new Field_string(item_sum->max_length,maybe_null, + item->name,table,item->binary); } } thd->fatal_error=1; - DBUG_RETURN(0); // Error + return 0; // Error } case Item::FIELD_ITEM: { @@ -3534,7 +3465,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, if (org_field->maybe_null()) new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join } - DBUG_RETURN(new_field); + return new_field; } case Item::PROC_ITEM: case Item::FUNC_ITEM: @@ -3574,12 +3505,11 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, *((*copy_func)++) = (Item_result_field*) item; // Save for copy_funcs if (modify_item) ((Item_result_field*) item)->result_field=new_field; - DBUG_RETURN(new_field); + return new_field; } default: // Dosen't have to be stored - DBUG_RETURN(0); + return 0; } - DBUG_RETURN(0); // impossible } @@ -3604,8 +3534,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, Item_result_field **copy_func; MI_COLUMNDEF *recinfo; uint temp_pool_slot=MY_BIT_NONE; - DBUG_ENTER("create_tmp_table"); + DBUG_ENTER("create_tmp_table"); DBUG_PRINT("enter",("distinct: %d save_sum_fields: %d allow_distinct_limit: %d group: %d", (int) distinct, (int) save_sum_fields, (int) allow_distinct_limit,test(group))); @@ -4053,17 +3983,15 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, static bool open_tmp_table(TABLE *table) { int error; - DBUG_ENTER("open_tmp_table"); - if ((error=table->file->ha_open(table->real_name,O_RDWR,HA_OPEN_TMP_TABLE))) { table->file->print_error(error,MYF(0)); /* purecov: inspected */ table->db_stat=0; - DBUG_RETURN((1)); + return(1); } /* VOID(ha_lock(table,F_WRLCK)); */ /* Single thread table */ (void) table->file->extra(HA_EXTRA_QUICK); /* Faster */ - DBUG_RETURN((0)); + return(0); } @@ -4074,8 +4002,8 @@ static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param, MI_KEYDEF keydef; MI_UNIQUEDEF uniquedef; KEY *keyinfo=param->keyinfo; - DBUG_ENTER("create_myisam_tmp_table"); + DBUG_ENTER("create_myisam_tmp_table"); if (table->keys) { // Get keys for ni_create bool using_unique_constraint=0; @@ -4412,39 +4340,37 @@ static int sub_select_cache(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) { int error; - DBUG_ENTER("sub_select_cache"); if (end_of_records) { if ((error=flush_cached_records(join,join_tab,FALSE)) < 0) - DBUG_RETURN(error); /* purecov: inspected */ - DBUG_RETURN(sub_select(join,join_tab,end_of_records)); + return error; /* purecov: inspected */ + return sub_select(join,join_tab,end_of_records); } if (join->thd->killed) // If aborted by user { my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */ - DBUG_RETURN(-2); /* purecov: inspected */ + return -2; /* purecov: inspected */ } if (join_tab->use_quick != 2 || test_if_quick_select(join_tab) <= 0) { if (!store_record_in_cache(&join_tab->cache)) - DBUG_RETURN(0); // There is more room in cache - DBUG_RETURN(flush_cached_records(join,join_tab,FALSE)); + return 0; // There is more room in cache + return flush_cached_records(join,join_tab,FALSE); } if ((error=flush_cached_records(join,join_tab,TRUE)) < 0) - DBUG_RETURN(error); /* purecov: inspected */ - DBUG_RETURN(sub_select(join,join_tab,end_of_records)); /* Use ordinary select */ + return error; /* purecov: inspected */ + return sub_select(join,join_tab,end_of_records); /* Use ordinary select */ } static int sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) { - DBUG_ENTER("sub_select"); join_tab->table->null_row=0; if (end_of_records) - DBUG_RETURN((*join_tab->next_select)(join,join_tab+1,end_of_records)); + return (*join_tab->next_select)(join,join_tab+1,end_of_records); /* Cache variables for faster loop */ int error; @@ -4463,7 +4389,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) if (join->thd->killed) // Aborted by user { my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */ - DBUG_RETURN(-2); /* purecov: inspected */ + return -2; /* purecov: inspected */ } join->examined_rows++; if (!on_expr || on_expr->val_int()) @@ -4474,9 +4400,9 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) if (!select_cond || select_cond->val_int()) { if ((error=(*join_tab->next_select)(join,join_tab+1,0)) < 0) - DBUG_RETURN(error); + return error; if (not_used_in_distinct && found_records != join->found_records) - DBUG_RETURN(0); + return 0; } else info->file->unlock_row(); @@ -4484,7 +4410,7 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) } while (!(error=info->read_record(info))); } if (error > 0) // Fatal error - DBUG_RETURN(-1); + return -1; if (!found && on_expr) { // OUTER JOIN @@ -4493,10 +4419,10 @@ sub_select(JOIN *join,JOIN_TAB *join_tab,bool end_of_records) if (!select_cond || select_cond->val_int()) { if ((error=(*join_tab->next_select)(join,join_tab+1,0)) < 0) - DBUG_RETURN(error); /* purecov: inspected */ + return error; /* purecov: inspected */ } } - DBUG_RETURN(0); + return 0; } @@ -4505,10 +4431,9 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) { int error; READ_RECORD *info; - DBUG_ENTER("flush_cached_records"); if (!join_tab->cache.records) - DBUG_RETURN(0); /* Nothing to do */ + return 0; /* Nothing to do */ if (skipp_last) (void) store_record_in_cache(&join_tab->cache); // Must save this for later if (join_tab->use_quick == 2) @@ -4524,7 +4449,7 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) { reset_cache(&join_tab->cache); join_tab->cache.records=0; join_tab->cache.ptr_record= (uint) ~0; - DBUG_RETURN(-error); /* No records or error */ + return -error; /* No records or error */ } for (JOIN_TAB *tmp=join->join_tab; tmp != join_tab ; tmp++) @@ -4539,7 +4464,7 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) if (join->thd->killed) { my_error(ER_SERVER_SHUTDOWN,MYF(0)); /* purecov: inspected */ - DBUG_RETURN(-2); // Aborted by user /* purecov: inspected */ + return -2; // Aborted by user /* purecov: inspected */ } SQL_SELECT *select=join_tab->select; if (!error && (!join_tab->cache.select || @@ -4552,7 +4477,7 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) read_cached_record(join_tab); if (!select || !select->skipp_record()) if ((error=(join_tab->next_select)(join,join_tab+1,0)) < 0) - DBUG_RETURN(error); /* purecov: inspected */ + return error; /* purecov: inspected */ } } } while (!(error=info->read_record(info))); @@ -4562,10 +4487,10 @@ flush_cached_records(JOIN *join,JOIN_TAB *join_tab,bool skipp_last) reset_cache(&join_tab->cache); join_tab->cache.records=0; join_tab->cache.ptr_record= (uint) ~0; if (error > 0) // Fatal error - DBUG_RETURN(-1); /* purecov: inspected */ + return -1; /* purecov: inspected */ for (JOIN_TAB *tmp2=join->join_tab; tmp2 != join_tab ; tmp2++) tmp2->table->status=tmp2->status; - DBUG_RETURN(0); + return 0; } @@ -4621,8 +4546,6 @@ join_read_system(JOIN_TAB *tab) { TABLE *table= tab->table; int error; - DBUG_ENTER("join_read_system"); - if (table->status & STATUS_GARBAGE) // If first read { if ((error=table->file->read_first_row(table->record[0], @@ -4631,18 +4554,18 @@ join_read_system(JOIN_TAB *tab) if (error != HA_ERR_END_OF_FILE) { table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } table->null_row=1; // This is ok. empty_record(table); // Make empty record - DBUG_RETURN(-1); + return -1; } store_record(table,1); } else if (!table->status) // Only happens with left join restore_record(table,1); // restore old record table->null_row=0; - DBUG_RETURN(table->status ? -1 : 0); + return table->status ? -1 : 0; } @@ -4651,8 +4574,6 @@ join_read_const(JOIN_TAB *tab) { int error; TABLE *table= tab->table; - DBUG_ENTER("join_read_const"); - if (table->status & STATUS_GARBAGE) // If first read { if (cp_buffer_from_ref(&tab->ref)) @@ -4672,9 +4593,9 @@ join_read_const(JOIN_TAB *tab) sql_print_error("read_const: Got error %d when reading table %s", error, table->path); table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); + return -1; } store_record(table,1); } @@ -4684,7 +4605,7 @@ join_read_const(JOIN_TAB *tab) restore_record(table,1); // restore old record } table->null_row=0; - DBUG_RETURN(table->status ? -1 : 0); + return table->status ? -1 : 0; } @@ -4693,7 +4614,6 @@ join_read_key(JOIN_TAB *tab) { int error; TABLE *table= tab->table; - DBUG_ENTER("join_read_key"); if (cmp_buffer_with_ref(tab) || (table->status & (STATUS_GARBAGE | STATUS_NO_PARENT | STATUS_NULL_ROW))) @@ -4701,7 +4621,7 @@ join_read_key(JOIN_TAB *tab) if (tab->ref.key_err) { table->status=STATUS_NOT_FOUND; - DBUG_RETURN(-1); + return -1; } error=table->file->index_read(table->record[0], tab->ref.key_buff, @@ -4711,11 +4631,11 @@ join_read_key(JOIN_TAB *tab) sql_print_error("read_key: Got error %d when reading table '%s'",error, table->path); table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } } table->null_row=0; - DBUG_RETURN(table->status ? -1 : 0); + return table->status ? -1 : 0; } @@ -4724,10 +4644,9 @@ join_read_always_key(JOIN_TAB *tab) { int error; TABLE *table= tab->table; - DBUG_ENTER("join_read_always_key"); if (cp_buffer_from_ref(&tab->ref)) - DBUG_RETURN(-1); + return -1; if ((error=table->file->index_read(table->record[0], tab->ref.key_buff, tab->ref.key_length,HA_READ_KEY_EXACT))) @@ -4737,11 +4656,11 @@ join_read_always_key(JOIN_TAB *tab) sql_print_error("read_const: Got error %d when reading table %s",error, table->path); table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); /* purecov: inspected */ + return -1; /* purecov: inspected */ } - DBUG_RETURN(0); + return 0; } /* @@ -4754,10 +4673,9 @@ join_read_last_key(JOIN_TAB *tab) { int error; TABLE *table= tab->table; - DBUG_ENTER("join_read_last_key"); if (cp_buffer_from_ref(&tab->ref)) - DBUG_RETURN(-1); + return -1; if ((error=table->file->index_read_last(table->record[0], tab->ref.key_buff, tab->ref.key_length))) @@ -4767,11 +4685,11 @@ join_read_last_key(JOIN_TAB *tab) sql_print_error("read_const: Got error %d when reading table %s",error, table->path); table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); /* purecov: inspected */ + return -1; /* purecov: inspected */ } - DBUG_RETURN(0); + return 0; } @@ -4779,8 +4697,7 @@ join_read_last_key(JOIN_TAB *tab) static int join_no_more_records(READ_RECORD *info __attribute__((unused))) { - DBUG_ENTER("join_no_more_records"); - DBUG_RETURN(-1); + return -1; } @@ -4790,7 +4707,6 @@ join_read_next_same(READ_RECORD *info) int error; TABLE *table= info->table; JOIN_TAB *tab=table->reginfo.join_tab; - DBUG_ENTER("join_read_next_same"); if ((error=table->file->index_next_same(table->record[0], tab->ref.key_buff, @@ -4801,12 +4717,12 @@ join_read_next_same(READ_RECORD *info) sql_print_error("read_next: Got error %d when reading table %s",error, table->path); table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } table->status= STATUS_GARBAGE; - DBUG_RETURN(-1); + return -1; } - DBUG_RETURN(0); + return 0; } static int @@ -4815,7 +4731,6 @@ join_read_prev_same(READ_RECORD *info) int error; TABLE *table= info->table; JOIN_TAB *tab=table->reginfo.join_tab; - DBUG_ENTER("join_read_prev_same"); if ((error=table->file->index_prev(table->record[0]))) { @@ -4838,18 +4753,16 @@ join_read_prev_same(READ_RECORD *info) table->status=STATUS_NOT_FOUND; error= -1; } - DBUG_RETURN(error); + return error; } static int join_init_quick_read_record(JOIN_TAB *tab) { - DBUG_ENTER("join_init_quick_read_record"); - if (test_if_quick_select(tab) == -1) - DBUG_RETURN(-1); /* No possible records */ - DBUG_RETURN(join_init_read_record(tab)); + return -1; /* No possible records */ + return join_init_read_record(tab); } @@ -4857,23 +4770,19 @@ static int test_if_quick_select(JOIN_TAB *tab) { delete tab->select->quick; - DBUG_ENTER("test_if_quick_select"); - tab->select->quick=0; - DBUG_RETURN(tab->select->test_quick_select(tab->keys,(table_map) 0,HA_POS_ERROR)); + return tab->select->test_quick_select(tab->keys,(table_map) 0,HA_POS_ERROR); } static int join_init_read_record(JOIN_TAB *tab) { - DBUG_ENTER("join_init_read_record"); - if (tab->select && tab->select->quick) tab->select->quick->reset(); init_read_record(&tab->read_record, tab->join->thd, tab->table, tab->select,1,1); - DBUG_RETURN((*tab->read_record.read_record)(&tab->read_record)); + return (*tab->read_record.read_record)(&tab->read_record); } static int @@ -4881,8 +4790,6 @@ join_read_first(JOIN_TAB *tab) { int error; TABLE *table=tab->table; - DBUG_ENTER("join_read_first"); - if (!table->key_read && (table->used_keys & ((key_map) 1 << tab->index)) && !table->no_keyread) { @@ -4903,11 +4810,11 @@ join_read_first(JOIN_TAB *tab) sql_print_error("read_first_with_key: Got error %d when reading table", error); table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); + return -1; } - DBUG_RETURN(0); + return 0; } @@ -4915,8 +4822,6 @@ static int join_read_next(READ_RECORD *info) { int error=info->file->index_next(info->record); - DBUG_ENTER("join_read_next"); - if (error) { if (error != HA_ERR_END_OF_FILE) @@ -4924,11 +4829,11 @@ join_read_next(READ_RECORD *info) sql_print_error("read_next_with_key: Got error %d when reading table %s", error, info->table->path); info->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); + return -1; } - DBUG_RETURN(0); + return 0; } static int @@ -4936,8 +4841,6 @@ join_read_last(JOIN_TAB *tab) { TABLE *table=tab->table; int error; - DBUG_ENTER("join_read_last"); - if (!table->key_read && (table->used_keys & ((key_map) 1 << tab->index)) && !table->no_keyread) { @@ -4958,11 +4861,11 @@ join_read_last(JOIN_TAB *tab) sql_print_error("read_last_with_key: Got error %d when reading table", error, table->path); table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); + return -1; } - DBUG_RETURN(0); + return 0; } @@ -4970,8 +4873,6 @@ static int join_read_prev(READ_RECORD *info) { int error=info->file->index_prev(info->record); - DBUG_ENTER("join_read_prev"); - if (error) { if (error != HA_ERR_END_OF_FILE) @@ -4979,11 +4880,11 @@ join_read_prev(READ_RECORD *info) sql_print_error("read_prev_with_key: Got error %d when reading table: %s", error,info->table->path); info->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); + return -1; } - DBUG_RETURN(0); + return 0; } @@ -4992,11 +4893,10 @@ join_ft_read_first(JOIN_TAB *tab) { int error; TABLE *table= tab->table; - DBUG_ENTER("join_ft_read_first"); #if NOT_USED_YET if (cp_buffer_from_ref(&tab->ref)) // as ft-key doesn't use store_key's - DBUG_RETURN(-1); // see also FT_SELECT::init() + return -1; // see also FT_SELECT::init() #endif table->file->ft_init(); @@ -5008,19 +4908,17 @@ join_ft_read_first(JOIN_TAB *tab) sql_print_error("ft_read_first: Got error %d when reading table %s", error, table->path); table->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); + return -1; } - DBUG_RETURN(0); + return 0; } static int join_ft_read_next(READ_RECORD *info) { int error=info->file->ft_read(info->table->record[0]); - DBUG_ENTER("join_ft_read_next"); - if (error) { if (error != HA_ERR_END_OF_FILE) @@ -5028,11 +4926,11 @@ join_ft_read_next(READ_RECORD *info) sql_print_error("ft_read_next: Got error %d when reading table %s", error, info->table->path); info->file->print_error(error,MYF(0)); - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(-1); + return -1; } - DBUG_RETURN(0); + return 0; } @@ -5451,8 +5349,6 @@ end_write_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), static bool test_if_ref(Item_field *left_item,Item *right_item) { Field *field=left_item->field; - DBUG_ENTER("test_if_ref"); - // No need to change const test. We also have to keep tests on LEFT JOIN if (!field->table->const_table && !field->table->maybe_null) { @@ -5460,7 +5356,7 @@ static bool test_if_ref(Item_field *left_item,Item *right_item) if (ref_item && ref_item->eq(right_item,1)) { if (right_item->type() == Item::FIELD_ITEM) - DBUG_RETURN((field->eq_def(((Item_field *) right_item)->field))); + return (field->eq_def(((Item_field *) right_item)->field)); if (right_item->const_item() && !(right_item->is_null())) { /* @@ -5470,29 +5366,27 @@ static bool test_if_ref(Item_field *left_item,Item *right_item) if (field->binary() && (field->type() != FIELD_TYPE_FLOAT || field->decimals() == 0)) { - DBUG_RETURN(!store_val_in_field(field,right_item)); + return !store_val_in_field(field,right_item); } } } } - DBUG_RETURN(0); // keep test + return 0; // keep test } static COND * make_cond_for_table(COND *cond,table_map tables,table_map used_table) { - DBUG_ENTER("make_cond_for_table"); - if (used_table && !(cond->used_tables() & used_table)) - DBUG_RETURN((COND*) 0); // Already checked + return (COND*) 0; // Already checked if (cond->type() == Item::COND_ITEM) { if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC) { Item_cond_and *new_cond=new Item_cond_and; if (!new_cond) - DBUG_RETURN((COND*) 0); // OOM /* purecov: inspected */ + return (COND*) 0; // OOM /* purecov: inspected */ List_iterator li(*((Item_cond*) cond)->argument_list()); Item *item; while ((item=li++)) @@ -5503,31 +5397,31 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) } switch (new_cond->argument_list()->elements) { case 0: - DBUG_RETURN((COND*) 0); // Always true + return (COND*) 0; // Always true case 1: - DBUG_RETURN(new_cond->argument_list()->head()); + return new_cond->argument_list()->head(); default: new_cond->used_tables_cache=((Item_cond*) cond)->used_tables_cache & tables; - DBUG_RETURN(new_cond); + return new_cond; } } else { // Or list Item_cond_or *new_cond=new Item_cond_or; if (!new_cond) - DBUG_RETURN((COND*) 0); // OOM /* purecov: inspected */ + return (COND*) 0; // OOM /* purecov: inspected */ List_iterator li(*((Item_cond*) cond)->argument_list()); Item *item; while ((item=li++)) { Item *fix=make_cond_for_table(item,tables,0L); if (!fix) - DBUG_RETURN((COND*) 0); // Always true + return (COND*) 0; // Always true new_cond->argument_list()->push_back(fix); } new_cond->used_tables_cache=((Item_cond_or*) cond)->used_tables_cache; - DBUG_RETURN(new_cond); + return new_cond; } } @@ -5538,9 +5432,9 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) */ if (cond->marker == 3 || (cond->used_tables() & ~tables)) - DBUG_RETURN((COND*) 0); // Can't check this yet + return (COND*) 0; // Can't check this yet if (cond->marker == 2 || cond->eq_cmp_result() == Item::COND_OK) - DBUG_RETURN(cond); // Not boolean op + return cond; // Not boolean op if (((Item_func*) cond)->functype() == Item_func::EQ_FUNC) { @@ -5550,25 +5444,23 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) test_if_ref((Item_field*) left_item,right_item)) { cond->marker=3; // Checked when read - DBUG_RETURN((COND*) 0); + return (COND*) 0; } if (right_item->type() == Item::FIELD_ITEM && test_if_ref((Item_field*) right_item,left_item)) { cond->marker=3; // Checked when read - DBUG_RETURN((COND*) 0); + return (COND*) 0; } } cond->marker=2; - DBUG_RETURN(cond); + return cond; } static Item * part_of_refkey(TABLE *table,Field *field) { uint ref_parts=table->reginfo.join_tab->ref.key_parts; - DBUG_ENTER("part_of_refkey"); - if (ref_parts) { KEY_PART_INFO *key_part= @@ -5577,9 +5469,9 @@ part_of_refkey(TABLE *table,Field *field) for (uint part=0 ; part < ref_parts ; part++,key_part++) if (field->eq(key_part->field) && !(key_part->key_part_flag & HA_PART_KEY)) - DBUG_RETURN(table->reginfo.join_tab->ref.items[part]); + return table->reginfo.join_tab->ref.items[part]; } - DBUG_RETURN((Item*) 0); + return (Item*) 0; } @@ -5595,8 +5487,6 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, uint *used_key_parts) { KEY_PART_INFO *key_part,*key_part_end; - DBUG_ENTER("test_if_order_by_key"); - key_part=table->key_info[idx].key_part; key_part_end=key_part+table->key_info[idx].key_parts; key_part_map const_key_parts=table->const_key_parts[idx]; @@ -5616,26 +5506,24 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx, key_part++; const_key_parts>>=1; } if (key_part == key_part_end || key_part->field != field) - DBUG_RETURN(0); + return 0; /* set flag to 1 if we can use read-next on key, else to -1 */ flag=(order->asc == !(key_part->key_part_flag & HA_REVERSE_SORT)) ? 1 : -1; if (reverse && flag != reverse) - DBUG_RETURN(0); + return 0; reverse=flag; // Remember if reverse key_part++; } *used_key_parts= (uint) (key_part - table->key_info[idx].key_part); - DBUG_RETURN(reverse); + return reverse; } static uint find_shortest_key(TABLE *table, key_map usable_keys) { uint min_length= (uint) ~0; uint best= MAX_KEY; - DBUG_ENTER("find_shortest_key"); - for (uint nr=0; usable_keys ; usable_keys>>=1, nr++) { if (usable_keys & 1) @@ -5647,7 +5535,7 @@ static uint find_shortest_key(TABLE *table, key_map usable_keys) } } } - DBUG_RETURN(best); + return best; } @@ -5866,8 +5754,6 @@ err: #ifdef NOT_YET static bool fix_having(JOIN *join, Item **having) { - DBUG_ENTER("fix_having"); - (*having)->update_used_tables(); // Some tables may have been const JOIN_TAB *table=&join->join_tab[join->const_tables]; table_map used_tables= join->const_table_map | table->table->map; @@ -5878,20 +5764,20 @@ static bool fix_having(JOIN *join, Item **having) { if (!table->select) if (!(table->select=new SQL_SELECT)) - DBUG_RETURN(1); + return 1; if (!table->select->cond) table->select->cond=sort_table_cond; else // This should never happen if (!(table->select->cond=new Item_cond_and(table->select->cond, sort_table_cond))) - DBUG_RETURN(1); + return 1; table->select_cond=table->select->cond; DBUG_EXECUTE("where",print_where(table->select_cond, "select and having");); *having=make_cond_for_table(*having,~ (table_map) 0,~used_tables); DBUG_EXECUTE("where",print_where(*having,"having after make_cond");); } - DBUG_RETURN(0); + return 0; } #endif @@ -5906,39 +5792,32 @@ static bool fix_having(JOIN *join, Item **having) static bool compare_record(TABLE *table, Field **ptr) { - DBUG_ENTER("compare_record"); - for (; *ptr ; ptr++) { if ((*ptr)->cmp_offset(table->rec_buff_length)) - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(0); + return 0; } static bool copy_blobs(Field **ptr) { - DBUG_ENTER("copy_blobs"); - for (; *ptr ; ptr++) { if ((*ptr)->flags & BLOB_FLAG) if (((Field_blob *) (*ptr))->copy()) - DBUG_RETURN(1); // Error + return 1; // Error } - DBUG_RETURN(0); + return 0; } static void free_blobs(Field **ptr) { - DBUG_ENTER("free_blobs"); - for (; *ptr ; ptr++) { if ((*ptr)->flags & BLOB_FLAG) ((Field_blob *) (*ptr))->free(); } - DBUG_VOID_RETURN; } @@ -6185,7 +6064,7 @@ SORT_FIELD *make_unireg_sortorder(ORDER *order, uint *length) count++; pos=sort=(SORT_FIELD*) sql_alloc(sizeof(SORT_FIELD)*(count+1)); if (!pos) - DBUG_RETURN(0); + return 0; for (;order;order=order->next,pos++) { @@ -6311,15 +6190,13 @@ static ulong used_blob_length(CACHE_FIELD **ptr) { uint length,blob_length; - DBUG_ENTER("used_blob_length"); - for (length=0 ; *ptr ; ptr++) { (*ptr)->blob_length=blob_length=(*ptr)->blob_field->get_length(); length+=blob_length; (*ptr)->blob_field->get_ptr(&(*ptr)->str); } - DBUG_RETURN(length); + return length; } @@ -6330,7 +6207,6 @@ store_record_in_cache(JOIN_CACHE *cache) uchar *pos; CACHE_FIELD *copy,*end_field; bool last_record; - DBUG_ENTER("store_record_in_cache"); pos=cache->pos; end_field=cache->field+cache->fields; @@ -6382,18 +6258,15 @@ store_record_in_cache(JOIN_CACHE *cache) } } cache->pos=pos; - DBUG_RETURN(last_record || (uint) (cache->end -pos) < cache->length); + return last_record || (uint) (cache->end -pos) < cache->length; } static void reset_cache(JOIN_CACHE *cache) { - DBUG_ENTER("reset_cache"); - cache->record_nr=0; cache->pos=cache->buff; - DBUG_VOID_RETURN; } @@ -6404,7 +6277,6 @@ read_cached_record(JOIN_TAB *tab) uint length; bool last_record; CACHE_FIELD *copy,*end_field; - DBUG_ENTER("read_cached_record"); last_record=tab->cache.record_nr++ == tab->cache.ptr_record; pos=tab->cache.pos; @@ -6442,7 +6314,7 @@ read_cached_record(JOIN_TAB *tab) } } tab->cache.pos=pos; - DBUG_VOID_RETURN; + return; } @@ -6450,28 +6322,24 @@ static bool cmp_buffer_with_ref(JOIN_TAB *tab) { bool diff; - DBUG_ENTER("cmp_buffer_with_ref"); - if (!(diff=tab->ref.key_err)) { memcpy(tab->ref.key_buff2, tab->ref.key_buff, tab->ref.key_length); } if ((tab->ref.key_err=cp_buffer_from_ref(&tab->ref)) || diff) - DBUG_RETURN(1); - DBUG_RETURN(memcmp(tab->ref.key_buff2, tab->ref.key_buff, tab->ref.key_length) - != 0); + return 1; + return memcmp(tab->ref.key_buff2, tab->ref.key_buff, tab->ref.key_length) + != 0; } bool cp_buffer_from_ref(TABLE_REF *ref) { - DBUG_ENTER("cp_buffer_from_ref"); - for (store_key **copy=ref->key_copy ; *copy ; copy++) if ((*copy)->copy()) - DBUG_RETURN(1); // Something went wrong - DBUG_RETURN(0); + return 1; // Something went wrong + return 0; } @@ -6489,8 +6357,6 @@ static int find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, List &all_fields) { - DBUG_ENTER("find_order_in_list"); - if ((*order->item)->type() == Item::INT_ITEM) { /* Order by position */ Item *item=0; @@ -6503,11 +6369,11 @@ find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, my_printf_error(ER_BAD_FIELD_ERROR,ER(ER_BAD_FIELD_ERROR), MYF(0),(*order->item)->full_name(), thd->where); - DBUG_RETURN(1); + return 1; } order->item=li.ref(); order->in_field_list=1; - DBUG_RETURN(0); + return 0; } const char *save_where=thd->where; thd->where=0; // No error if not found @@ -6517,14 +6383,14 @@ find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, { order->item=item; // use it order->in_field_list=1; - DBUG_RETURN(0); + return 0; } order->in_field_list=0; if ((*order->item)->fix_fields(thd,tables) || thd->fatal_error) - DBUG_RETURN(1); // Wrong field + return 1; // Wrong field all_fields.push_front(*order->item); // Add new field to field list order->item=(Item**) all_fields.head_ref(); - DBUG_RETURN(0); + return 0; } @@ -6536,15 +6402,13 @@ find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, int setup_order(THD *thd,TABLE_LIST *tables,List &fields, List &all_fields, ORDER *order) { - DBUG_ENTER("setup_order"); - thd->where="order clause"; for (; order; order=order->next) { if (find_order_in_list(thd,tables,order,fields,all_fields)) - DBUG_RETURN(1); + return 1; } - DBUG_RETURN(0); + return 0; } @@ -6552,11 +6416,9 @@ static int setup_group(THD *thd,TABLE_LIST *tables,List &fields, List &all_fields, ORDER *order, bool *hidden_group_fields) { - DBUG_ENTER("setup_group"); - *hidden_group_fields=0; if (!order) - DBUG_RETURN(0); /* Everything is ok */ + return 0; /* Everything is ok */ if (thd->sql_mode & MODE_ONLY_FULL_GROUP_BY) { @@ -6571,13 +6433,13 @@ setup_group(THD *thd,TABLE_LIST *tables,List &fields, for (; order; order=order->next) { if (find_order_in_list(thd,tables,order,fields,all_fields)) - DBUG_RETURN(1); + return 1; (*order->item)->marker=1; /* Mark found */ if ((*order->item)->with_sum_func) { my_printf_error(ER_WRONG_GROUP_FIELD, ER(ER_WRONG_GROUP_FIELD),MYF(0), (*order->item)->full_name()); - DBUG_RETURN(1); + return 1; } } if (thd->sql_mode & MODE_ONLY_FULL_GROUP_BY) @@ -6593,13 +6455,13 @@ setup_group(THD *thd,TABLE_LIST *tables,List &fields, my_printf_error(ER_WRONG_FIELD_WITH_GROUP, ER(ER_WRONG_FIELD_WITH_GROUP), MYF(0),item->full_name()); - DBUG_RETURN(1); + return 1; } } } if (org_fields != all_fields.elements) *hidden_group_fields=1; // group fields is not used - DBUG_RETURN(0); + return 0; } /* @@ -6644,7 +6506,6 @@ create_distinct_group(ORDER *order_list,List &fields) List_iterator li(fields); Item *item; ORDER *order,*group,**prev; - DBUG_ENTER("create_distinct_group"); while ((item=li++)) item->marker=0; /* Marker that field is not used */ @@ -6656,7 +6517,7 @@ create_distinct_group(ORDER *order_list,List &fields) { ORDER *ord=(ORDER*) sql_memdup(order,sizeof(ORDER)); if (!ord) - DBUG_RETURN(0); + return 0; *prev=ord; prev= &ord->next; (*ord->item)->marker=1; @@ -6672,7 +6533,7 @@ create_distinct_group(ORDER *order_list,List &fields) { ORDER *ord=(ORDER*) sql_calloc(sizeof(ORDER)); if (!ord) - DBUG_RETURN(0); + return 0; ord->item=li.ref(); ord->asc=1; *prev=ord; @@ -6680,7 +6541,7 @@ create_distinct_group(ORDER *order_list,List &fields) } } *prev=0; - DBUG_RETURN(group); + return group; } @@ -6694,7 +6555,6 @@ count_field_types(TMP_TABLE_PARAM *param, List &fields, { List_iterator li(fields); Item *field; - DBUG_ENTER("count_field_types"); param->field_count=param->sum_func_count=param->func_count= param->hidden_field_count=0; @@ -6729,7 +6589,6 @@ count_field_types(TMP_TABLE_PARAM *param, List &fields, field->with_sum_func=0; } } - DBUG_VOID_RETURN; } @@ -6742,16 +6601,14 @@ count_field_types(TMP_TABLE_PARAM *param, List &fields, static bool test_if_subpart(ORDER *a,ORDER *b) { - DBUG_ENTER("test_if_subpart"); - for (; a && b; a=a->next,b=b->next) { if ((*a->item)->eq(*b->item,1)) a->asc=b->asc; else - DBUG_RETURN(0); + return 0; } - DBUG_RETURN(test(!b)); + return test(!b); } /* @@ -6794,7 +6651,6 @@ static void calc_group_buffer(JOIN *join,ORDER *group) { uint key_length=0, parts=0, null_parts=0; - DBUG_ENTER("calc_group_buffer"); if (group) join->group= 1; @@ -6821,7 +6677,6 @@ calc_group_buffer(JOIN *join,ORDER *group) join->tmp_table_param.group_length=key_length+null_parts; join->tmp_table_param.group_parts=parts; join->tmp_table_param.group_null_parts=null_parts; - DBUG_VOID_RETURN; } @@ -6833,19 +6688,17 @@ calc_group_buffer(JOIN *join,ORDER *group) static bool alloc_group_fields(JOIN *join,ORDER *group) { - DBUG_ENTER("alloc_group_fields"); - if (group) { for (; group ; group=group->next) { Item_buff *tmp=new_Item_buff(*group->item); if (!tmp || join->group_fields.push_front(tmp)) - DBUG_RETURN(TRUE); + return TRUE; } } join->sort_and_group=1; /* Mark for do_select */ - DBUG_RETURN(FALSE); + return FALSE; } @@ -6855,14 +6708,13 @@ test_if_group_changed(List &list) List_iterator li(list); int idx= -1,i; Item_buff *buff; - DBUG_ENTER("test_if_group_changed"); for (i=(int) list.elements-1 ; (buff=li++) ; i--) { if (buff->cmp()) idx=i; } - DBUG_RETURN(idx); + return idx; } @@ -6948,7 +6800,6 @@ copy_fields(TMP_TABLE_PARAM *param) { Copy_field *ptr=param->copy_field; Copy_field *end=param->copy_field_end; - DBUG_ENTER("copy_fields"); for (; ptr != end; ptr++) (*ptr->do_copy)(ptr); @@ -6958,7 +6809,6 @@ copy_fields(TMP_TABLE_PARAM *param) Item_copy_string *item; while ((item = (Item_copy_string*) it++)) item->copy(); - DBUG_VOID_RETURN; } @@ -7003,7 +6853,6 @@ change_to_use_tmp_fields(List &items) { List_iterator it(items); Item *item_field,*item; - DBUG_ENTER("change_to_use_tmp_fields"); while ((item=it++)) { @@ -7022,7 +6871,7 @@ change_to_use_tmp_fields(List &items) else item_field=(Item*) new Item_field(field); if (!item_field) - DBUG_RETURN(TRUE); // Fatal error + return TRUE; // Fatal error item_field->name=item->name; /*lint -e613 */ #ifndef DBUG_OFF if (_db_on_ && !item_field->name) @@ -7041,7 +6890,7 @@ change_to_use_tmp_fields(List &items) #endif } } - DBUG_RETURN(FALSE); + return FALSE; } @@ -7055,7 +6904,6 @@ change_refs_to_tmp_fields(THD *thd,List &items) { List_iterator it(items); Item *item; - DBUG_ENTER("change_refs_to_tmp_fields"); while ((item= it++)) { @@ -7098,7 +6946,7 @@ change_refs_to_tmp_fields(THD *thd,List &items) ((Item_field*)item)->field=((Item_field*) item)->result_field; } } - DBUG_RETURN(thd->fatal_error); + return thd->fatal_error; } @@ -7111,11 +6959,8 @@ static void init_tmptable_sum_functions(Item_sum **func_ptr) { Item_sum *func; - DBUG_ENTER("init_tmptable_sum_functions"); - while ((func= *(func_ptr++))) func->reset_field(); - DBUG_VOID_RETURN; } @@ -7126,11 +6971,8 @@ update_tmptable_sum_func(Item_sum **func_ptr, TABLE *tmp_table __attribute__((unused))) { Item_sum *func; - DBUG_ENTER("update_tmptable_sum_func"); - while ((func= *(func_ptr++))) func->update_field(0); - DBUG_VOID_RETURN; } @@ -7140,11 +6982,9 @@ static void copy_sum_funcs(Item_sum **func_ptr) { Item_sum *func; - DBUG_ENTER("copy_sum_funcs"); - for (; (func = *func_ptr) ; func_ptr++) (void) func->save_in_field(func->result_field); - DBUG_VOID_RETURN; + return; } @@ -7152,11 +6992,8 @@ static void init_sum_functions(Item_sum **func_ptr) { Item_sum *func; - DBUG_ENTER("init_sum_functions"); - for (; (func= (Item_sum*) *func_ptr) ; func_ptr++) func->reset(); - DBUG_VOID_RETURN; } @@ -7164,12 +7001,10 @@ static bool update_sum_func(Item_sum **func_ptr) { Item_sum *func; - DBUG_ENTER("update_sum_func"); - for (; (func= (Item_sum*) *func_ptr) ; func_ptr++) if (func->add()) - DBUG_RETURN(1); - DBUG_RETURN(0); + return 1; + return 0; } /* Copy result of functions to record in tmp_table */ @@ -7178,11 +7013,9 @@ void copy_funcs(Item_result_field **func_ptr) { Item_result_field *func; - DBUG_ENTER("copy_funcs"); - for (; (func = *func_ptr) ; func_ptr++) (void) func->save_in_field(func->result_field); - DBUG_VOID_RETURN; + return; } @@ -7265,7 +7098,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, field_list.push_back(new Item_real("rows",0.0,0,10)); field_list.push_back(new Item_empty_string("Extra",255)); if (result->send_fields(field_list,1)) - DBUG_VOID_RETURN; + return; } if (message) @@ -7408,12 +7241,11 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, static void describe_info(JOIN *join, const char *info) { THD *thd= join->thd; - DBUG_ENTER("describe_info"); if (thd->lex.select_lex.next) /* If in UNION */ { select_describe(join,FALSE,FALSE,FALSE,info); - DBUG_VOID_RETURN; + return; } List field_list; String *packet= &thd->packet; @@ -7423,10 +7255,9 @@ static void describe_info(JOIN *join, const char *info) QUERY_NO_GOOD_INDEX_USED); field_list.push_back(new Item_empty_string("Comment",80)); if (send_fields(thd,field_list,1)) - DBUG_VOID_RETURN; /* purecov: inspected */ + return; /* purecov: inspected */ packet->length(0); net_store_data(packet,info); if (!my_net_write(&thd->net,(char*) packet->ptr(),packet->length())) send_eof(&thd->net); - DBUG_VOID_RETURN; } From 3559b2f158541ed88ad630dcb0b242f5a32f4a3d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 11:39:52 +0200 Subject: [PATCH 104/246] Fixed a problem with reading some innodb options that may contain semicolin. --- scripts/mysqld_multi.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index b868006ee40..3165a01362c 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -4,7 +4,7 @@ use Getopt::Long; use POSIX qw(strftime); $|=1; -$VER="2.4"; +$VER="2.5"; $opt_config_file = undef(); $opt_example = 0; @@ -212,6 +212,7 @@ sub start_mysqlds() } else { + $options[$j]=~ s/;/\\;/g; $tmp.= " $options[$j]"; } } From e1c1abd0e189e4581b9a22aed923df37e535e89b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 12:42:42 +0200 Subject: [PATCH 105/246] Extended WEEK() to be able to handle ISO weeks. unlink socket file if mysqld dies on startup Some optimization of AND expressions mysql-test/r/func_time.result: Update for new week() handling mysql-test/t/func_time.test: Update for new week() handling sql/item_cmpfunc.cc: Optimization of IF( and-expression,,) sql/item_cmpfunc.h: Optimization of AND expressions sql/item_timefunc.cc: Extended WEEK() to be able to handle ISO weeks. sql/mysqld.cc: unlink socket file if mysqld dies on startup sql/sql_base.cc: Fixed problem with SIGHUP and INSERT DELAYED tests/Makefile.am: Added missing myisam-big-rows.tst file to source distribution --- mysql-test/r/func_time.result | 6 ++++++ mysql-test/t/func_time.test | 3 +++ sql/item_cmpfunc.cc | 5 ++--- sql/item_cmpfunc.h | 5 +++++ sql/item_timefunc.cc | 19 ++++++++++++++++--- sql/mysqld.cc | 8 +++++++- sql/sql_base.cc | 4 ++-- tests/Makefile.am | 2 +- 8 files changed, 42 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index e4fd25a34f0..4a1012f73bf 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -84,6 +84,12 @@ select yearweek("2000-01-01",1) as '2000', yearweek("2001-01-01",1) as '2001', y select yearweek("2000-01-06",1) as '2000', yearweek("2001-01-06",1) as '2001', yearweek("2002-01-06",1) as '2002',yearweek("2003-01-06",1) as '2003', yearweek("2004-01-06",1) as '2004', yearweek("2005-01-06",1) as '2005', yearweek("2006-01-06",1) as '2006'; 2000 2001 2002 2003 2004 2005 2006 200001 200101 200201 200302 200402 200501 200601 +select week(19981231,2), week(19981231,3), week(20000101,2), week(20000101,3); +week(19981231,2) week(19981231,3) week(20000101,2) week(20000101,3) +52 53 52 52 +select week(20001231,2),week(20001231,3); +week(20001231,2) week(20001231,3) +1 52 select date_format('1998-12-31','%x-%v'),date_format('1999-01-01','%x-%v'); date_format('1998-12-31','%x-%v') date_format('1999-01-01','%x-%v') 1998-53 1998-53 diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 7d5ab73fa4c..2ff57959965 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -34,6 +34,9 @@ select yearweek("2000-01-01",0) as '2000', yearweek("2001-01-01",0) as '2001', y select yearweek("2000-01-06",0) as '2000', yearweek("2001-01-06",0) as '2001', yearweek("2002-01-06",0) as '2002',yearweek("2003-01-06",0) as '2003', yearweek("2004-01-06",0) as '2004', yearweek("2005-01-06",0) as '2005', yearweek("2006-01-06",0) as '2006'; select yearweek("2000-01-01",1) as '2000', yearweek("2001-01-01",1) as '2001', yearweek("2002-01-01",1) as '2002',yearweek("2003-01-01",1) as '2003', yearweek("2004-01-01",1) as '2004', yearweek("2005-01-01",1) as '2005', yearweek("2006-01-01",1) as '2006'; select yearweek("2000-01-06",1) as '2000', yearweek("2001-01-06",1) as '2001', yearweek("2002-01-06",1) as '2002',yearweek("2003-01-06",1) as '2003', yearweek("2004-01-06",1) as '2004', yearweek("2005-01-06",1) as '2005', yearweek("2006-01-06",1) as '2006'; +select week(19981231,2), week(19981231,3), week(20000101,2), week(20000101,3); +select week(20001231,2),week(20001231,3); + select date_format('1998-12-31','%x-%v'),date_format('1999-01-01','%x-%v'); select date_format('1999-12-31','%x-%v'),date_format('2000-01-01','%x-%v'); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 93e24525d06..ee587289168 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -533,7 +533,6 @@ Item_func_if::fix_length_and_dec() else cached_result_type=arg1_type; // Should be INT_RESULT } - args[0]->top_level_item(); } @@ -1122,6 +1121,8 @@ Item_cond::fix_fields(THD *thd,TABLE_LIST *tables) #endif item= *li.ref(); // new current item } + if (abort_on_null) + item->top_level_item(); if (item->fix_fields(thd,tables)) return 1; /* purecov: inspected */ used_tables_cache|=item->used_tables(); @@ -1129,8 +1130,6 @@ Item_cond::fix_fields(THD *thd,TABLE_LIST *tables) const_item_cache&=item->const_item(); if (item->maybe_null) maybe_null=1; - if (abort_on_null) - item->top_level_item(); } if (thd) thd->cond_count+=list.elements; diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index f2c0ee403d2..e163bc40a6e 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -216,6 +216,11 @@ public: longlong val_int(); String *val_str(String *str); enum Item_result result_type () const { return cached_result_type; } + bool fix_fields(THD *thd,struct st_table_list *tlist) + { + args[0]->top_level_item(); + return Item_func::fix_fields(thd,tlist); + } void fix_length_and_dec(); const char *func_name() const { return "if"; } unsigned int size_of() { return sizeof(*this);} diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 1e222fddcfc..558dd807d80 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -175,15 +175,28 @@ longlong Item_func_second::val_int() } -// Returns the week of year in the range of 0 - 53 +/* + Returns the week of year. + + The bits in week_format has the following meaning: + 0 If not set: USA format: Sunday is first day of week + If set: ISO format: Monday is first day of week + 1 If not set: Week is in range 0-53 + If set Week is in range 1-53. +*/ longlong Item_func_week::val_int() { uint year; + uint week_format; TIME ltime; if (get_arg0_date(<ime,0)) return 0; - return (longlong) calc_week(<ime, 0, args[1]->val_int() == 0, &year); + week_format= args[1]->val_int(); + return (longlong) calc_week(<ime, + (week_format & 2) != 0, + (week_format & 1) == 0, + &year); } @@ -193,7 +206,7 @@ longlong Item_func_yearweek::val_int() TIME ltime; if (get_arg0_date(<ime,0)) return 0; - week=calc_week(<ime, 1, args[1]->val_int() == 0, &year); + week=calc_week(<ime, 1, (args[1]->val_int() & 1) == 0, &year); return week+year*100; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 48c7cbe3ba3..62f8ed62877 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2003,6 +2003,8 @@ int main(int argc, char **argv) if (ha_init()) { sql_print_error("Can't init databases"); + if (unix_sock != INVALID_SOCKET) + unlink(mysql_unix_port); exit(1); } ha_key_cache(); @@ -2038,6 +2040,8 @@ int main(int argc, char **argv) pthread_key_create(&THR_MALLOC,NULL)) { sql_print_error("Can't create thread-keys"); + if (unix_sock != INVALID_SOCKET) + unlink(mysql_unix_port); exit(1); } start_signal_handler(); // Creates pidfile @@ -2050,6 +2054,8 @@ int main(int argc, char **argv) if (!opt_bootstrap) (void) my_delete(pidfile_name,MYF(MY_WME)); // Not needed anymore #endif + if (unix_sock != INVALID_SOCKET) + unlink(mysql_unix_port); exit(1); } if (!opt_noacl) @@ -4467,8 +4473,8 @@ fn_format_relative_to_data_home(my_string to, const char *name, static void fix_paths(void) { char buff[FN_REFLEN]; - (void) fn_format(mysql_home,mysql_home,"","",16); // Remove symlinks convert_dirname(mysql_home,mysql_home,NullS); + my_realpath(mysql_home,mysql_home,MYF(0)); convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS); convert_dirname(language,language,NullS); (void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 42d35c05f23..23ba04bd6ed 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -376,14 +376,14 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh, if (!found) if_wait_for_refresh=0; // Nothing to wait for } + if (!tables) + kill_delayed_threads(); if (if_wait_for_refresh) { /* If there is any table that has a lower refresh_version, wait until this is closed (or this thread is killed) before returning */ - if (!tables) - kill_delayed_threads(); thd->mysys_var->current_mutex= &LOCK_open; thd->mysys_var->current_cond= &COND_refresh; thd->proc_info="Flushing tables"; diff --git a/tests/Makefile.am b/tests/Makefile.am index cdb623fa2a0..356da61ed57 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,7 +24,7 @@ EXTRA_DIST = auto_increment.res auto_increment.tst \ insert_and_repair.pl \ grant.pl grant.res test_delayed_insert.pl \ pmail.pl mail_to_db.pl table_types.pl \ - udf_test udf_test.res + udf_test udf_test.res myisam-big-rows.tst # Don't update the files from bitkeeper %::SCCS/s.% From f6f23ce8d0c698d241b1ca88c5df0168d750399a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 14:58:59 +0400 Subject: [PATCH 106/246] MONTHNAME() & DAYNAME() are now UCS2 compatible --- sql/item_timefunc.cc | 12 +++++++++--- sql/item_timefunc.h | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 8a1bd0be291..b208713eea0 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -153,14 +153,17 @@ longlong Item_func_month::val_int() String* Item_func_monthname::val_str(String* str) { - uint month=(uint) Item_func_month::val_int(); + uint month=(uint) Item_func_month::val_int(); if (!month) // This is also true for NULL { null_value=1; return (String*) 0; } null_value=0; - return &month_names[month-1]; + + String *m=&month_names[month-1]; + str->copy(m->ptr(), m->length(), m->charset(), thd_charset()); + return str; } // Returns the quarter of the year @@ -234,7 +237,10 @@ String* Item_func_dayname::val_str(String* str) uint weekday=(uint) val_int(); // Always Item_func_daynr() if (null_value) return (String*) 0; - return &day_names[weekday]; + + String *d=&day_names[weekday]; + str->copy(d->ptr(), d->length(), d->charset(), thd_charset()); + return str; } diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index de2860d24ef..c3dc9bfb6d4 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -85,7 +85,12 @@ public: const char *func_name() const { return "monthname"; } String *val_str(String *str); enum Item_result result_type () const { return STRING_RESULT; } - void fix_length_and_dec() { decimals=0; max_length=10; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=10*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -192,7 +197,12 @@ class Item_func_dayname :public Item_func_weekday const char *func_name() const { return "dayname"; } String *val_str(String *str); enum Item_result result_type () const { return STRING_RESULT; } - void fix_length_and_dec() { decimals=0; max_length=9; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=9*thd_charset()->mbmaxlen; + maybe_null=1; + } }; From e61e1c8f34c70fb90f0a06df0af240401ea27486 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 14:09:18 +0200 Subject: [PATCH 107/246] Fix after last merge --- sql/sql_select.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 69dcab61ad7..4969097b2c3 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5425,7 +5425,7 @@ make_cond_for_table(COND *cond,table_map tables,table_map used_table) } new_cond->used_tables_cache=((Item_cond_or*) cond)->used_tables_cache; new_cond->top_level_item(); - DBUG_RETURN(new_cond); + return new_cond; } } From dd91b0a261dbf3ddf3da7655733108a1119de870 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 13:21:44 +0100 Subject: [PATCH 108/246] include/myisampack.h - fixed Typo: BIG_TABLE -> BIG_TABLES include/myisampack.h: - fixed Typo: BIG_TABLE -> BIG_TABLES --- include/myisampack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/myisampack.h b/include/myisampack.h index 31666bb184c..432de06592b 100644 --- a/include/myisampack.h +++ b/include/myisampack.h @@ -212,7 +212,7 @@ /* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */ -#ifdef BIG_TABLE +#ifdef BIG_TABLES #define mi_rowstore(T,A) mi_int8store(T,A) #define mi_rowkorr(T,A) mi_uint8korr(T) #else From 42d5a9b8b61da3087c0e37986fe134b47176bbfd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 13:28:26 +0100 Subject: [PATCH 109/246] include/mysisampack.h - fixed typo: mi_rowkorr(T,A) -> mi_rowkorr(T) include/myisampack.h: - fixed typo: mi_rowkorr(T,A) -> mi_rowkorr(T) --- include/myisampack.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/myisampack.h b/include/myisampack.h index 432de06592b..6004177cfb0 100644 --- a/include/myisampack.h +++ b/include/myisampack.h @@ -214,7 +214,7 @@ #ifdef BIG_TABLES #define mi_rowstore(T,A) mi_int8store(T,A) -#define mi_rowkorr(T,A) mi_uint8korr(T) +#define mi_rowkorr(T) mi_uint8korr(T) #else #define mi_rowstore(T,A) { mi_int4store(T,0); mi_int4store(((T)+4),A); } #define mi_rowkorr(T) mi_uint4korr((T)+4) From a70a9ab6377df20d03107661c658ea5a48822969 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 14:40:32 +0200 Subject: [PATCH 110/246] some code cleanup as per CTO's instructions plus a small bug fix with a corresponding test case.... --- mysql-test/r/derived.result | 3 +++ mysql-test/t/derived.test | 1 + sql/sql_derived.cc | 2 +- sql/sql_parse.cc | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index b99664835a2..0290d0755d5 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -37,3 +37,6 @@ select * from (select 1); select a from (select 1 as a); a 1 +select 1 from (select 1); +1 +1 diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index 6f32cfa0390..501d4db26fa 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -21,3 +21,4 @@ SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1); drop table if exists t1.t2,t3; select * from (select 1); select a from (select 1 as a); +select 1 from (select 1); diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index b4de767189e..7cbc1ea6db3 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -118,7 +118,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) table->tmp_table=TMP_TABLE; if (!lex->describe) sl->exclude(); - t->db= (tables && tables->db && tables->db[0]) ? t->db : thd->db; + t->db=""; t->derived=(SELECT_LEX *)0; // just in case ... } } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 758c2c405e6..f16bc63636f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2717,7 +2717,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables, TABLE_LIST *org_tables=tables; for (; tables ; tables=tables->next) { - if (tables->derived) + if (tables->derived || (tables->table && (int)tables->table->tmp_table)) continue; if ((thd->master_access & want_access) == (want_access & ~EXTRA_ACL) && thd->db) @@ -2735,7 +2735,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables, found=1; } } - else if (tables->db && check_access(thd,want_access,tables->db,&tables->grant.privilege, + else if (check_access(thd,want_access,tables->db,&tables->grant.privilege, 0, no_errors)) return TRUE; } From 9cc8df0637b1fa63dd89c0d5be3df5e98dcbfc4c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 14:23:55 +0100 Subject: [PATCH 111/246] memory leak closed --- myisam/myisamchk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index d39b1e75c15..281cb90d9bf 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -134,6 +134,7 @@ int main(int argc, char **argv) llstr(check_param.total_deleted,buff2)); } free_defaults(default_argv); + free_tmpdir(&myisamchk_tmpdir); ft_free_stopwords(); my_end(check_param.testflag & T_INFO ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR); exit(error); From f779dba31c434b42afeef16a1ad5829227fded56 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 15:25:09 +0200 Subject: [PATCH 112/246] fixed 2 typo in BUG_TABLES using remuved 'unstable' variable from test include/myisampack.h: fixed 2 typo mysql-test/r/variables.result: remuved 'unstable' variable mysql-test/t/variables.test: remuved 'unstable' variable --- include/myisampack.h | 4 ++-- mysql-test/r/variables.result | 5 +---- mysql-test/t/variables.test | 3 ++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/myisampack.h b/include/myisampack.h index 31666bb184c..51c9876c246 100644 --- a/include/myisampack.h +++ b/include/myisampack.h @@ -212,9 +212,9 @@ /* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */ -#ifdef BIG_TABLE +#ifdef BIG_TABLES #define mi_rowstore(T,A) mi_int8store(T,A) -#define mi_rowkorr(T,A) mi_uint8korr(T) +#define mi_rowkorr(T) mi_uint8korr(T) #else #define mi_rowstore(T,A) { mi_int4store(T,0); mi_int4store(((T)+4),A); } #define mi_rowkorr(T) mi_uint4korr((T)+4) diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index f708ddd2ee7..03454f101d4 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -48,9 +48,6 @@ set max_join_size=100; show variables like 'max_join_size'; Variable_name Value max_join_size 100 -show global variables like 'max_join_size'; -Variable_name Value -max_join_size 4294967295 set GLOBAL max_join_size=2000; show global variables like 'max_join_size'; Variable_name Value @@ -62,7 +59,7 @@ max_join_size 2000 set GLOBAL max_join_size=DEFAULT; show global variables like 'max_join_size'; Variable_name Value -max_join_size 4294967295 +max_join_size 18446744073709551615 set @@max_join_size=1000, @@global.max_join_size=2000; select @@local.max_join_size, @@global.max_join_size; @@session.max_join_size @@global.max_join_size diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 7a1d01c2cb5..564a6b864e8 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -34,7 +34,8 @@ drop table t1; set max_join_size=100; show variables like 'max_join_size'; -show global variables like 'max_join_size'; +# Removed, because it has different value with/without BIG_TABLES +#show global variables like 'max_join_size'; set GLOBAL max_join_size=2000; show global variables like 'max_join_size'; set max_join_size=DEFAULT; From e6eaecbfb7173ec6e5b767a8e5e5f4cd6b4002e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 17:32:36 +0400 Subject: [PATCH 113/246] These functions are now UCS2 compatible: CURDATE() FROM_DAYS() CURTIME() NOW() SEC_TO_TIME() FROM_UNIXTIME() DATE_ADD_INTERVAL() --- sql/item_timefunc.cc | 82 ++++++++++++++++------- sql/item_timefunc.h | 151 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 181 insertions(+), 52 deletions(-) diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index b208713eea0..cec83428e24 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -402,16 +402,16 @@ String *Item_date::val_str(String *str) return (String*) 0; if (!value) // zero daynr { - str->copy("0000-00-00",10,my_charset_latin1); + str->copy("0000-00-00",10,my_charset_latin1,thd_charset()); return str; } - if (str->alloc(11)) - return &empty_string; /* purecov: inspected */ - sprintf((char*) str->ptr(),"%04d-%02d-%02d", + + char tmpbuff[11]; + sprintf(tmpbuff,"%04d-%02d-%02d", (int) (value/10000L) % 10000, (int) (value/100)%100, (int) (value%100)); - str->length(10); + str->copy(tmpbuff,10,my_charset_latin1,thd_charset()); return str; } @@ -448,7 +448,10 @@ void Item_func_curdate::fix_length_and_dec() { struct tm tm_tmp,*start; time_t query_start=current_thd->query_start(); - decimals=0; max_length=10; + + set_charset(thd_charset()); + decimals=0; + max_length=10*thd_charset()->mbmaxlen; localtime_r(&query_start,&tm_tmp); start=&tm_tmp; value=(longlong) ((ulong) ((uint) start->tm_year+1900)*10000L+ @@ -473,27 +476,48 @@ bool Item_func_curdate::get_date(TIME *res, return 0; } +String *Item_func_curtime::val_str(String *str) +{ + str_value.set(buff,buff_length,thd_charset()); + return &str_value; +} + void Item_func_curtime::fix_length_and_dec() { struct tm tm_tmp,*start; time_t query_start=current_thd->query_start(); - decimals=0; max_length=8; + CHARSET_INFO *cs=thd_charset(); + + decimals=0; + max_length=8*cs->mbmaxlen; localtime_r(&query_start,&tm_tmp); start=&tm_tmp; + set_charset(cs); value=(longlong) ((ulong) ((uint) start->tm_hour)*10000L+ (ulong) (((uint) start->tm_min)*100L+ (uint) start->tm_sec)); - buff_length= my_sprintf(buff, (buff,"%02d:%02d:%02d", + + buff_length=cs->snprintf(cs,buff,sizeof(buff),"%02d:%02d:%02d", (int) start->tm_hour, (int) start->tm_min, - (int) start->tm_sec)); + (int) start->tm_sec); +} + +String *Item_func_now::val_str(String *str) +{ + str_value.set(buff,buff_length,thd_charset()); + return &str_value; } void Item_func_now::fix_length_and_dec() { struct tm tm_tmp,*start; time_t query_start=current_thd->query_start(); - decimals=0; max_length=19; + CHARSET_INFO *cs=thd_charset(); + + decimals=0; + max_length=19*cs->mbmaxlen; + set_charset(cs); localtime_r(&query_start,&tm_tmp); start=&tm_tmp; value=((longlong) ((ulong) ((uint) start->tm_year+1900)*10000L+ @@ -502,13 +526,14 @@ void Item_func_now::fix_length_and_dec() (longlong) ((ulong) ((uint) start->tm_hour)*10000L+ (ulong) (((uint) start->tm_min)*100L+ (uint) start->tm_sec))); - buff_length= (uint) my_sprintf(buff, (buff,"%04d-%02d-%02d %02d:%02d:%02d", + + buff_length= (uint) cs->snprintf(cs,buff, sizeof(buff),"%04d-%02d-%02d %02d:%02d:%02d", ((int) (start->tm_year+1900)) % 10000, (int) start->tm_mon+1, (int) start->tm_mday, (int) start->tm_hour, (int) start->tm_min, - (int) start->tm_sec)); + (int) start->tm_sec); /* For getdate */ ltime.year= start->tm_year+1900; ltime.month= start->tm_mon+1; @@ -539,7 +564,7 @@ int Item_func_now::save_in_field(Field *to) String *Item_func_sec_to_time::val_str(String *str) { - char buff[23]; + char buff[23*2]; const char *sign=""; longlong seconds=(longlong) args[0]->val_int(); ulong length; @@ -553,7 +578,7 @@ String *Item_func_sec_to_time::val_str(String *str) uint sec= (uint) ((ulonglong) seconds % 3600); length= my_sprintf(buff,(buff,"%s%02lu:%02u:%02u",sign,(long) (seconds/3600), sec/60, sec % 60)); - str->copy(buff, length, my_charset_latin1); + str->copy(buff, length, my_charset_latin1, thd_charset()); return str; } @@ -897,20 +922,26 @@ String *Item_func_from_unixtime::val_str(String *str) { struct tm tm_tmp,*start; time_t tmp=(time_t) args[0]->val_int(); + uint32 l; + CHARSET_INFO *cs=thd_charset(); + if ((null_value=args[0]->null_value)) return 0; localtime_r(&tmp,&tm_tmp); start=&tm_tmp; - if (str->alloc(20)) + + l=20*cs->mbmaxlen+32; + if (str->alloc(l)) return str; /* purecov: inspected */ - sprintf((char*) str->ptr(),"%04d-%02d-%02d %02d:%02d:%02d", + l=cs->snprintf(cs,(char*) str->ptr(),l,"%04d-%02d-%02d %02d:%02d:%02d", (int) start->tm_year+1900, (int) start->tm_mon+1, (int) start->tm_mday, (int) start->tm_hour, (int) start->tm_min, (int) start->tm_sec); - str->length(19); + str->length(l); + str->set_charset(cs); return str; } @@ -1041,26 +1072,31 @@ bool Item_date_add_interval::get_date(TIME *ltime, bool fuzzy_date) String *Item_date_add_interval::val_str(String *str) { TIME ltime; + CHARSET_INFO *cs=thd_charset(); + uint32 l; if (Item_date_add_interval::get_date(<ime,0)) return 0; if (ltime.time_type == TIMESTAMP_DATE) { - if (str->alloc(11)) + l=11*cs->mbmaxlen+32; + if (str->alloc(l)) goto null_date; - sprintf((char*) str->ptr(),"%04d-%02d-%02d", + l=cs->snprintf(cs,(char*) str->ptr(),l,"%04d-%02d-%02d", ltime.year,ltime.month,ltime.day); - str->length(10); + str->length(l); } else { - if (str->alloc(20)) + l=20*cs->mbmaxlen+32; + if (str->alloc(l)) goto null_date; - sprintf((char*) str->ptr(),"%04d-%02d-%02d %02d:%02d:%02d", + l=cs->snprintf(cs,(char*) str->ptr(),l,"%04d-%02d-%02d %02d:%02d:%02d", ltime.year,ltime.month,ltime.day, ltime.hour,ltime.minute,ltime.second); - str->length(19); + str->length(l); } + str->set_charset(cs); return str; null_date: diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index c3dc9bfb6d4..07cdfde115b 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -27,7 +27,10 @@ public: Item_func_period_add(Item *a,Item *b) :Item_int_func(a,b) {} longlong val_int(); const char *func_name() const { return "period_add"; } - void fix_length_and_dec() { max_length=6; } + void fix_length_and_dec() + { + max_length=6*thd_charset()->mbmaxlen; + } }; @@ -37,7 +40,11 @@ public: Item_func_period_diff(Item *a,Item *b) :Item_int_func(a,b) {} longlong val_int(); const char *func_name() const { return "period_diff"; } - void fix_length_and_dec() { decimals=0; max_length=6; } + void fix_length_and_dec() + { + decimals=0; + max_length=6*thd_charset()->mbmaxlen; + } }; @@ -47,7 +54,12 @@ public: Item_func_to_days(Item *a) :Item_int_func(a) {} longlong val_int(); const char *func_name() const { return "to_days"; } - void fix_length_and_dec() { decimals=0; max_length=6; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=6*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -57,7 +69,12 @@ public: Item_func_dayofmonth(Item *a) :Item_int_func(a) {} longlong val_int(); const char *func_name() const { return "dayofmonth"; } - void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=2*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -74,7 +91,13 @@ public: } const char *func_name() const { return "month"; } enum Item_result result_type () const { return INT_RESULT; } - void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; } + void fix_length_and_dec() + { + set_charset(thd_charset()); + decimals=0; + max_length=2*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -86,8 +109,9 @@ public: String *val_str(String *str); enum Item_result result_type () const { return STRING_RESULT; } void fix_length_and_dec() - { - decimals=0; + { + set_charset(thd_charset()); + decimals=0; max_length=10*thd_charset()->mbmaxlen; maybe_null=1; } @@ -100,7 +124,12 @@ public: Item_func_dayofyear(Item *a) :Item_int_func(a) {} longlong val_int(); const char *func_name() const { return "dayofyear"; } - void fix_length_and_dec() { decimals=0; max_length=3; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=3*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -110,7 +139,12 @@ public: Item_func_hour(Item *a) :Item_int_func(a) {} longlong val_int(); const char *func_name() const { return "hour"; } - void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=2*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -120,7 +154,12 @@ public: Item_func_minute(Item *a) :Item_int_func(a) {} longlong val_int(); const char *func_name() const { return "minute"; } - void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=2*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -130,7 +169,12 @@ public: Item_func_quarter(Item *a) :Item_int_func(a) {} longlong val_int(); const char *func_name() const { return "quarter"; } - void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=1*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -140,7 +184,12 @@ public: Item_func_second(Item *a) :Item_int_func(a) {} longlong val_int(); const char *func_name() const { return "second"; } - void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=2*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -150,7 +199,12 @@ public: Item_func_week(Item *a,Item *b) :Item_int_func(a,b) {} longlong val_int(); const char *func_name() const { return "week"; } - void fix_length_and_dec() { decimals=0; max_length=2; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=2*thd_charset()->mbmaxlen; + maybe_null=1; + } }; class Item_func_yearweek :public Item_int_func @@ -159,7 +213,12 @@ public: Item_func_yearweek(Item *a,Item *b) :Item_int_func(a,b) {} longlong val_int(); const char *func_name() const { return "yearweek"; } - void fix_length_and_dec() { decimals=0; max_length=6; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=6*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -169,7 +228,12 @@ public: Item_func_year(Item *a) :Item_int_func(a) {} longlong val_int(); const char *func_name() const { return "year"; } - void fix_length_and_dec() { decimals=0; max_length=4; maybe_null=1; } + void fix_length_and_dec() + { + decimals=0; + max_length=4*thd_charset()->mbmaxlen; + maybe_null=1; + } }; @@ -181,13 +245,20 @@ public: :Item_func(a), odbc_type(type_arg) {} longlong val_int(); double val() { return (double) val_int(); } - String *val_str(String *str) { + String *val_str(String *str) + { str->set(val_int(), thd_charset()); return null_value ? 0 : str; } const char *func_name() const { return "weekday"; } enum Item_result result_type () const { return INT_RESULT; } - void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=1; } + void fix_length_and_dec() + { + set_charset(thd_charset()); + decimals=0; + max_length=1*thd_charset()->mbmaxlen; + maybe_null=1; + } }; class Item_func_dayname :public Item_func_weekday @@ -199,6 +270,7 @@ class Item_func_dayname :public Item_func_weekday enum Item_result result_type () const { return STRING_RESULT; } void fix_length_and_dec() { + set_charset(thd_charset()); decimals=0; max_length=9*thd_charset()->mbmaxlen; maybe_null=1; @@ -216,7 +288,8 @@ public: const char *func_name() const { return "timestamp"; } void fix_length_and_dec() { - decimals=0; max_length=10; + decimals=0; + max_length=10*thd_charset()->mbmaxlen; } }; @@ -229,7 +302,8 @@ public: const char *func_name() const { return "time_to_sec"; } void fix_length_and_dec() { - decimals=0; max_length=10; + decimals=0; + max_length=10*thd_charset()->mbmaxlen; } }; @@ -245,7 +319,12 @@ public: String *val_str(String *str); double val() { return (double) val_int(); } const char *func_name() const { return "date"; } - void fix_length_and_dec() { decimals=0; max_length=10; } + void fix_length_and_dec() + { + set_charset(thd_charset()); + decimals=0; + max_length=10*thd_charset()->mbmaxlen; + } int save_in_field(Field *to); void make_field(Send_field *tmp_field) { @@ -279,7 +358,7 @@ public: class Item_func_curtime :public Item_func { longlong value; - char buff[9]; + char buff[9*2+32]; uint buff_length; public: Item_func_curtime() :Item_func() {} @@ -287,8 +366,7 @@ public: enum Item_result result_type () const { return STRING_RESULT; } double val() { return (double) value; } longlong val_int() { return value; } - String *val_str(String *str) - { str_value.set(buff,buff_length,default_charset_info); return &str_value; } + String *val_str(String *str); const char *func_name() const { return "curtime"; } void fix_length_and_dec(); void make_field(Send_field *tmp_field) @@ -319,7 +397,7 @@ public: class Item_func_now :public Item_date_func { longlong value; - char buff[20]; + char buff[20*2+32]; // +32 to make my_snprintf_{8bit|ucs2} happy uint buff_length; TIME ltime; public: @@ -329,8 +407,7 @@ public: double val() { return (double) value; } longlong val_int() { return value; } int save_in_field(Field *to); - String *val_str(String *str) - { str_value.set(buff,buff_length,default_charset_info); return &str_value; } + String *val_str(String *str); const char *func_name() const { return "now"; } void fix_length_and_dec(); bool get_date(TIME *res,bool fuzzy_date); @@ -369,7 +446,12 @@ class Item_func_from_unixtime :public Item_date_func longlong val_int(); String *val_str(String *str); const char *func_name() const { return "from_unixtime"; } - void fix_length_and_dec() { decimals=0; max_length=19; } + void fix_length_and_dec() + { + set_charset(thd_charset()); + decimals=0; + max_length=19*thd_charset()->mbmaxlen; + } // enum Item_result result_type () const { return STRING_RESULT; } bool get_date(TIME *res,bool fuzzy_date); }; @@ -382,7 +464,12 @@ public: double val() { return (double) Item_func_sec_to_time::val_int(); } longlong val_int(); String *val_str(String *); - void fix_length_and_dec() { maybe_null=1; max_length=13; } + void fix_length_and_dec() + { + set_charset(thd_charset()); + maybe_null=1; + max_length=13*thd_charset()->mbmaxlen; + } const char *func_name() const { return "sec_to_time"; } void make_field(Send_field *tmp_field) { @@ -414,7 +501,13 @@ public: :Item_date_func(a,b),int_type(type_arg), date_sub_interval(neg_arg) {} String *val_str(String *); const char *func_name() const { return "date_add_interval"; } - void fix_length_and_dec() { maybe_null=1; max_length=19; value.alloc(32);} + void fix_length_and_dec() + { + set_charset(thd_charset()); + maybe_null=1; + max_length=19*thd_charset()->mbmaxlen; + value.alloc(32); + } double val() { return (double) val_int(); } longlong val_int(); bool get_date(TIME *res,bool fuzzy_date); From 6580fbaf6f7d7b894a3e5feb1fdef3934bb82462 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 16:09:33 +0200 Subject: [PATCH 114/246] Fixed mysqlcheck so it can process table names with dashes. Quote all table names with backticks. --- client/mysqlcheck.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 7c556a1cee6..f06e06c8a83 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -406,21 +406,25 @@ static int process_selected_tables(char *db, char **table_names, int tables) return 1; if (opt_all_in_1) { + /* + We need table list in form `a`, `b`, `c` + that's why we need 4 more chars added to to each table name + space is for more readable output in logs and in case of error + */ char *table_names_comma_sep, *end; int i, tot_length = 0; for (i = 0; i < tables; i++) - tot_length += strlen(*(table_names + i)) + 1; + tot_length += strlen(*(table_names + i)) + 4; if (!(table_names_comma_sep = (char *) - my_malloc((sizeof(char) * tot_length) + 1, MYF(MY_WME)))) + my_malloc((sizeof(char) * tot_length) + 4, MYF(MY_WME)))) return 1; for (end = table_names_comma_sep + 1; tables > 0; tables--, table_names++) { - end = strmov(end, *table_names); - *end++= ','; + end = strxmov(end, " `", *table_names, "`,", NullS); } *--end = 0; handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1); @@ -447,22 +451,27 @@ static int process_all_tables_in_db(char *database) if (opt_all_in_1) { + /* + We need table list in form `a`, `b`, `c` + that's why we need 4 more chars added to to each table name + space is for more readable output in logs and in case of error + */ + char *tables, *end; uint tot_length = 0; while ((row = mysql_fetch_row(res))) - tot_length += strlen(row[0]) + 1; + tot_length += strlen(row[0]) + 4; mysql_data_seek(res, 0); - if (!(tables=(char *) my_malloc(sizeof(char)*tot_length+1, MYF(MY_WME)))) + if (!(tables=(char *) my_malloc(sizeof(char)*tot_length+4, MYF(MY_WME)))) { mysql_free_result(res); return 1; } for (end = tables + 1; (row = mysql_fetch_row(res)) ;) { - end = strmov(end, row[0]); - *end++= ','; + end = strxmov(end, " `", row[0], "`,", NullS); } *--end = 0; if (tot_length) @@ -521,10 +530,14 @@ static int handle_request_for_tables(char *tables, uint length) if (!(query =(char *) my_malloc((sizeof(char)*(length+110)), MYF(MY_WME)))) return 1; - sprintf(query, "%s TABLE %s %s", op, tables, options); + if (opt_all_in_1) + /* No backticks here as we added them before */ + sprintf(query, "%s TABLE %s %s", op, tables, options); + else + sprintf(query, "%s TABLE `%s` %s", op, tables, options); if (mysql_query(sock, query)) { - sprintf(message, "when executing '%s TABLE ... %s", op, options); + sprintf(message, "when executing '%s TABLE ... %s'", op, options); DBerror(sock, message); return 1; } From e2d1ab84d14bace07578899b1b64e4a55111f8a5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 16:22:26 +0200 Subject: [PATCH 115/246] IGNORE_INDEX fix for 4.0 --- mysql-test/r/select.result | 4 ++-- sql/sql_base.cc | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 1a40c5b11c3..fdcc7f9cdea 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -1331,10 +1331,10 @@ table type possible_keys key key_len ref rows Extra t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 index NULL fld3 30 NULL 1199 Using where; Using index +t2 ALL NULL NULL NULL NULL 1199 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra -t2 index NULL fld3 30 NULL 1199 Using where; Using index +t2 ALL NULL NULL NULL NULL 1199 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; table type possible_keys key key_len ref rows Extra t2 ref fld3 fld3 30 const 1 Using where; Using index diff --git a/sql/sql_base.cc b/sql/sql_base.cc index ec2e22d2a5d..458611d1504 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1850,6 +1850,7 @@ bool setup_tables(TABLE_LIST *tables) for (Field **ptr=table->field ; *ptr ; ptr++) (*ptr)->query_id=0; } + table->used_keys&= table->keys_in_use_for_query; } if (tablenr > MAX_TABLES) { From ccf7226c2759bf6549c2cdd615ef55e95318520b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 19:21:11 +0400 Subject: [PATCH 116/246] bdb-deadlock test: added reap commands --- mysql-test/r/bdb-deadlock.result | 8 ++++---- mysql-test/t/bdb-deadlock.test | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/bdb-deadlock.result b/mysql-test/r/bdb-deadlock.result index 74798a34a53..55b3d3ea2a5 100644 --- a/mysql-test/r/bdb-deadlock.result +++ b/mysql-test/r/bdb-deadlock.result @@ -9,23 +9,23 @@ set autocommit=0; update t2 set x = 1 where id = 0; select x from t1 where id = 0; select x from t2 where id = 0; -commit; Deadlock found when trying to get lock; Try restarting transaction commit; x 1 +commit; select * from t1; +id x +0 1 select * from t2; id x 0 1 commit; +select * from t1; id x 0 1 -select * from t1; select * from t2; id x 0 1 commit; -id x -0 1 drop table t1,t2; diff --git a/mysql-test/t/bdb-deadlock.test b/mysql-test/t/bdb-deadlock.test index 27fcb5c6149..5ecfe592ce4 100644 --- a/mysql-test/t/bdb-deadlock.test +++ b/mysql-test/t/bdb-deadlock.test @@ -35,9 +35,11 @@ select x from t2 where id = 0; connection con2; --error 1213 +reap; commit; connection con1; +reap; commit; connection con2; From 751b3be1924fe0d05a163cb05211538846b6649d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 17:41:31 +0200 Subject: [PATCH 117/246] small fix sql/sql_parse.cc: fix for a RANME to empty string --- sql/sql_parse.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index eb2d2ace467..6424b97b422 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1629,7 +1629,7 @@ mysql_execute_command(void) #else { ulong priv=0; - if (lex->name && strlen(lex->name) > NAME_LEN) + if (lex->name && (!lex->name[0] || strlen(lex->name) > NAME_LEN)) { net_printf(&thd->net,ER_WRONG_TABLE_NAME,lex->name); res=0; From e087434c10c9be878d4a9e99e257d59c966d928a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 23:26:10 +0200 Subject: [PATCH 118/246] Ensure that mysql_home ends in FN_LIBCHAR after realpath() --- sql/mysqld.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 62f8ed62877..f2a536ada9b 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4472,9 +4472,17 @@ fn_format_relative_to_data_home(my_string to, const char *name, static void fix_paths(void) { - char buff[FN_REFLEN]; + char buff[FN_REFLEN],*pos; convert_dirname(mysql_home,mysql_home,NullS); + /* Resolve symlinks to allow 'mysql_home' to be a relative symlink */ my_realpath(mysql_home,mysql_home,MYF(0)); + /* Ensure that mysql_home ends in FN_LIBCHAR */ + pos=strend(mysql_home); + if (pos[-1] != FN_LIBCHAR) + { + pos[0]= FN_LIBCHAR; + pos[1]= 0; + } convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS); convert_dirname(language,language,NullS); (void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir From 2707f00cdba45e7112f03acb264ad3e7460df0ed Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 01:14:39 +0200 Subject: [PATCH 119/246] fixed error handling fixed subselects in ORDER bug mysql-test/r/subselect.result: test of subselects in ORDER clause test of error handling bug mysql-test/t/subselect.test: test of subselects in ORDER clause test of error handling bug sql/item_subselect.cc: fixed subselects in ORDER bug sql/item_subselect.h: fixed subselects in ORDER bug sql/sql_select.cc: fixed error handling --- mysql-test/r/subselect.result | 14 ++++++++++++++ mysql-test/t/subselect.test | 16 ++++++++++++++-- sql/item_subselect.cc | 2 +- sql/item_subselect.h | 3 ++- sql/sql_select.cc | 2 +- 5 files changed, 32 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 0d3617b7512..77499625bcd 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -236,6 +236,9 @@ CREATE TABLE `searchconthardwarefr7` ( PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`) ) TYPE=MyISAM ROW_FORMAT=DYNAMIC; INSERT INTO searchconthardwarefr7 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); +select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +a +40143 SELECT numeropost,maxnumrep FROM forumconthardwarefr7 WHERE exists (SELECT 1 FROM searchconthardwarefr7 WHERE (mot='joce') AND date >= '2002-10-21' AND forumconthardwarefr7.numeropost = searchconthardwarefr7.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; numeropost maxnumrep 43506 2 @@ -243,3 +246,14 @@ numeropost maxnumrep SELECT (SELECT 1) as a FROM (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); Unknown column 'a' in 'having clause' drop table forumconthardwarefr7, searchconthardwarefr7; +drop table if exists forumconthardwarefr7; +CREATE TABLE `forumconthardwarefr7` ( +`numeropost` mediumint(8) unsigned NOT NULL auto_increment, +`maxnumrep` int(10) unsigned NOT NULL default '0', +PRIMARY KEY (`numeropost`), +UNIQUE KEY `maxnumrep` (`maxnumrep`) +) TYPE=MyISAM ROW_FORMAT=FIXED; +INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (1,0),(2,1); +select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +Subselect returns more than 1 record +drop table if exists forumconthardwarefr7; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 93ad115155e..1ee9881c404 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -135,9 +135,21 @@ CREATE TABLE `searchconthardwarefr7` ( ) TYPE=MyISAM ROW_FORMAT=DYNAMIC; INSERT INTO searchconthardwarefr7 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); - +select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); SELECT numeropost,maxnumrep FROM forumconthardwarefr7 WHERE exists (SELECT 1 FROM searchconthardwarefr7 WHERE (mot='joce') AND date >= '2002-10-21' AND forumconthardwarefr7.numeropost = searchconthardwarefr7.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; -- error 1054 SELECT (SELECT 1) as a FROM (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +drop table forumconthardwarefr7, searchconthardwarefr7; -drop table forumconthardwarefr7, searchconthardwarefr7; \ No newline at end of file +drop table if exists forumconthardwarefr7; +CREATE TABLE `forumconthardwarefr7` ( + `numeropost` mediumint(8) unsigned NOT NULL auto_increment, + `maxnumrep` int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`numeropost`), + UNIQUE KEY `maxnumrep` (`maxnumrep`) +) TYPE=MyISAM ROW_FORMAT=FIXED; + +INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (1,0),(2,1); +-- error 1240 +select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +drop table if exists forumconthardwarefr7; \ No newline at end of file diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 703173b191c..37c85501b06 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -33,7 +33,7 @@ SUBSELECT TODO: #include "sql_select.h" Item_subselect::Item_subselect(): - Item(), engine_owner(1), value_assigned(0) + Item_result_field(), engine_owner(1), value_assigned(0) { assign_null(); /* diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 33f82982708..58726f16ba9 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -28,7 +28,7 @@ class subselect_engine; /* base class for subselects */ -class Item_subselect :public Item +class Item_subselect :public Item_result_field { my_bool engine_owner; /* Is this item owner of engine */ my_bool value_assigned; /* value already assigned to subselect */ @@ -116,6 +116,7 @@ public: Item *new_item() { return new Item_singleval_subselect(this); } enum Item_result result_type() const { return res_type; } void fix_length_and_dec(); + friend class select_singleval_subselect; }; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index ecf06f0971a..1d1c4656508 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4528,7 +4528,7 @@ do_select(JOIN *join,List *fields,TABLE *table,Procedure *procedure) if (error == -1) table->file->print_error(my_errno,MYF(0)); } - DBUG_RETURN(error); + DBUG_RETURN(error || join->thd->net.report_error); } From 62e8b90130529dd6ac4d55cc79c2915e8ce8a6e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Nov 2002 22:11:59 -0200 Subject: [PATCH 120/246] Typo fix (duplicate functions body) sql/nt_servc.cc: Typo fix (duplicate fuctions body) --- sql/nt_servc.cc | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/sql/nt_servc.cc b/sql/nt_servc.cc index 2d0eae125d6..b917c91ce15 100644 --- a/sql/nt_servc.cc +++ b/sql/nt_servc.cc @@ -568,31 +568,3 @@ BOOL NTService::is_super_user() FreeSid(psidAdministrators); return ret_value; } -/* ------------------------------------------------------------------------ - -------------------------------------------------------------------------- */ -BOOL NTService::IsService(LPCSTR ServiceName) -{ - BOOL ret_value=FALSE; - SC_HANDLE service, scm; - - if (scm = OpenSCManager(0, 0,SC_MANAGER_ENUMERATE_SERVICE)) - { - if ((service = OpenService(scm,ServiceName, SERVICE_ALL_ACCESS ))) - { - ret_value=TRUE; - CloseServiceHandle(service); - } - CloseServiceHandle(scm); - } - return ret_value; -} -/* ------------------------------------------------------------------------ - -------------------------------------------------------------------------- */ -BOOL NTService::got_service_option(char **argv, char *service_option) -{ - char *option; - for (option= argv[1]; *option; option++) - if (!strcmp(option, service_option)) - return TRUE; - return FALSE; -} From d0516d75aefe06bdec7d434fdf7b24ea805e19c1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 06:11:56 +0200 Subject: [PATCH 121/246] dict0load.c: Fix wrong sprintf argument row0sel.c: Fix uninitialized variable error found by Miguel innobase/row/row0sel.c: Fix uninitialized variable error found by Miguel innobase/dict/dict0load.c: Fix wrong sprintf argument --- innobase/dict/dict0load.c | 2 +- innobase/row/row0sel.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c index e9caa37fecc..d8d426d2036 100644 --- a/innobase/dict/dict0load.c +++ b/innobase/dict/dict0load.c @@ -335,7 +335,7 @@ dict_load_fields( ut_a(btr_pcur_is_on_user_rec(&pcur, &mtr)); if (rec_get_deleted_flag(rec)) { fprintf(stderr, -"InnoDB: Error: data dictionary entry for table %s is corrupt!\n", +"InnoDB: Error: data dictionary entry for table %s is corrupt!\n" "InnoDB: An index field is delete marked.\n", table->name); } diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index ff23b4e5bca..2306b1af747 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -2228,6 +2228,7 @@ row_sel_get_clust_rec_for_mysql( rec_sprintf(err_buf, 900, clust_rec); fprintf(stderr, "InnoDB: clust index record %s\n", err_buf); + trx = thr_get_trx(thr); trx_print(err_buf, trx); fprintf(stderr, From 6ed18d1c9fa444eec6cbb5c5662a13ce7f759e4d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 11:59:03 +0200 Subject: [PATCH 122/246] fixed bug of derived table in subselect fixed bug in error handling mysql-test/r/subselect.result: test of error handling test of derived tables inside subselect mysql-test/t/subselect.test: test of error handling test of derived tables inside subselect sql/sql_class.cc: fixed error handling error sql/sql_lex.h: fifex layout sql/sql_parse.cc: fixed processing of derived tables sql/sql_select.cc: more quick abort on error --- mysql-test/r/subselect.result | 8 ++++++++ mysql-test/t/subselect.test | 11 ++++++++++- sql/sql_class.cc | 1 - sql/sql_lex.h | 2 +- sql/sql_parse.cc | 25 ++++++++++++++----------- sql/sql_select.cc | 5 +++-- 6 files changed, 36 insertions(+), 16 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 77499625bcd..5820c3259be 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -256,4 +256,12 @@ UNIQUE KEY `maxnumrep` (`maxnumrep`) INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (1,0),(2,1); select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); Subselect returns more than 1 record +select numeropost as a FROM forumconthardwarefr7 ORDER BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +Subselect returns more than 1 record drop table if exists forumconthardwarefr7; +drop table if exists iftest; +CREATE TABLE iftest (field char(1) NOT NULL DEFAULT 'b'); +INSERT INTO iftest VALUES (); +SELECT field FROM iftest WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) HAVING field='b'); +Subselect returns more than 1 record +drop table iftest; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 1ee9881c404..cfd22bc48c9 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -152,4 +152,13 @@ CREATE TABLE `forumconthardwarefr7` ( INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (1,0),(2,1); -- error 1240 select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); -drop table if exists forumconthardwarefr7; \ No newline at end of file +-- error 1240 +select numeropost as a FROM forumconthardwarefr7 ORDER BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +drop table if exists forumconthardwarefr7; + +drop table if exists iftest; +CREATE TABLE iftest (field char(1) NOT NULL DEFAULT 'b'); +INSERT INTO iftest VALUES (); +-- error 1240 +SELECT field FROM iftest WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) HAVING field='b'); +drop table iftest; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 887ee262777..f33d0f2ca28 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -873,7 +873,6 @@ bool select_singleval_subselect::send_data(List &items) DBUG_ENTER("select_singleval_subselect::send_data"); Item_singleval_subselect *it= (Item_singleval_subselect *)item; if (it->assigned()){ - thd->fatal_error= 1; my_message(ER_SUBSELECT_NO_1_ROW, ER(ER_SUBSELECT_NO_1_ROW), MYF(0)); DBUG_RETURN(1); } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index ea944ef34c8..6bafef8a469 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -336,7 +336,7 @@ public: } st_select_lex* outer_select(); st_select_lex* next_select() { return (st_select_lex*) next; } - st_select_lex* next_select_in_list() + st_select_lex* next_select_in_list() { return (st_select_lex*) link_next; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 52a6c67dda9..60b9cb47946 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1334,17 +1334,20 @@ mysql_execute_command(THD *thd) */ if (lex->derived_tables) { - for (TABLE_LIST *cursor= tables; - cursor; - cursor= cursor->next) - if (cursor->derived && (res=mysql_derived(thd, lex, - (SELECT_LEX_UNIT *)cursor->derived, - cursor))) - { - if (res < 0) - send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0); - DBUG_VOID_RETURN; - } + for (SELECT_LEX *sl= &lex->select_lex; sl; sl= sl->next_select_in_list()) + if (sl->linkage != DERIVED_TABLE_TYPE) + for (TABLE_LIST *cursor= sl->get_table_list(); + cursor; + cursor= cursor->next) + if (cursor->derived && (res=mysql_derived(thd, lex, + (SELECT_LEX_UNIT *) + cursor->derived, + cursor))) + { + if (res < 0) + send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0); + DBUG_VOID_RETURN; + } } if ((lex->select_lex.next_select_in_list() && lex->unit.create_total_list(thd, lex, &tables)) || diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 1d1c4656508..5f4bfc5462a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -994,7 +994,8 @@ JOIN::exec() } having=having_list; // Actually a parameter thd->proc_info="Sending data"; - error=do_select(this, &fields_list, NULL, procedure); + error= thd->net.report_error || + do_select(this, &fields_list, NULL, procedure); DBUG_VOID_RETURN; } @@ -1078,7 +1079,7 @@ mysql_select(THD *thd, TABLE_LIST *tables, List &fields, COND *conds, goto err; } - if (free_join && join->global_optimize()) + if (thd->net.report_error || (free_join && join->global_optimize())) goto err; join->exec(); From a464676f64a4a6e61f17b75c6ec1693ac948b303 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 15:00:25 +0400 Subject: [PATCH 123/246] my_snprintf() doesn't support things like %04X so use vsprintf() instead --- strings/ctype-simple.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 9fef27cad10..3393ed09ee0 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -123,6 +123,7 @@ int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, } +#ifdef NOT_USED static int my_vsnprintf_8bit(char *to, size_t n, const char* fmt, va_list ap) { char *start=to, *end=to+n-1; @@ -173,14 +174,22 @@ static int my_vsnprintf_8bit(char *to, size_t n, const char* fmt, va_list ap) *to='\0'; /* End of errmessage */ return (uint) (to - start); } - +#endif int my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), - char* to, uint n, const char* fmt, ...) + char* to, uint n __attribute__((unused)), + const char* fmt, ...) { va_list args; va_start(args,fmt); +#ifdef NOT_USED return my_vsnprintf_8bit(to, n, fmt, args); +#endif + /* + FIXME: generally not safe, but it is OK for now + FIXME: as far as it's not called unsafely in the current code + */ + return vsprintf(to,fmt,args); /* FIXME */ } From 0fb5b32422b5dbf624660dec70aa617364cd884c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 13:07:58 +0200 Subject: [PATCH 124/246] fixed possible bug --- sql/sql_parse.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 60b9cb47946..6a2c8e17185 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1297,7 +1297,7 @@ mysql_execute_command(THD *thd) that is not a SHOW command or a select that only access local variables, but for now this is probably good enough. */ - if (tables) + if (tables || lex->select_lex.next_select_in_list()) mysql_reset_errors(thd); /* Save old warning count to be able to send to client how many warnings we From 81d428bd5a61708b711d18814becde5c16502c74 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 17:13:29 +0400 Subject: [PATCH 125/246] Preparing to embed string to number conversion functions into charset structure --- include/m_ctype.h | 13 ++++ mysys/charset.c | 4 ++ strings/ctype-big5.c | 7 ++- strings/ctype-czech.c | 7 ++- strings/ctype-euc_kr.c | 7 ++- strings/ctype-gb2312.c | 7 ++- strings/ctype-gbk.c | 7 ++- strings/ctype-latin1_de.c | 7 ++- strings/ctype-simple.c | 30 ++++++++++ strings/ctype-sjis.c | 7 ++- strings/ctype-tis620.c | 7 ++- strings/ctype-ujis.c | 7 ++- strings/ctype-utf8.c | 44 +++++++++++++- strings/ctype-win1250ch.c | 7 ++- strings/ctype.c | 122 +++++++++++++++++++++++++++++++++++++- 15 files changed, 270 insertions(+), 13 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index 6a964bf3b97..fd10d7325c2 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -118,6 +118,12 @@ typedef struct charset_info_st /* Charset dependant snprintf() */ int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt, ...); + long (*strtol)(struct charset_info_st *, const char *s, char **e, int base); + ulong (*strtoul)(struct charset_info_st *, const char *s, char **e, int base); + longlong (*strtoll)(struct charset_info_st *, const char *s, char **e, int base); + ulonglong (*strtoull)(struct charset_info_st *, const char *s, char **e, int base); + double (*strtod)(struct charset_info_st *, const char *s, char **e); + } CHARSET_INFO; @@ -156,6 +162,13 @@ int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); int my_snprintf_8bit(struct charset_info_st *, char *to, uint n, const char *fmt, ...); +long my_strtol_8bit(CHARSET_INFO *, const char *s, char **e, int base); +ulong my_strtoul_8bit(CHARSET_INFO *, const char *s, char **e, int base); +longlong my_strtoll_8bit(CHARSET_INFO *, const char *s, char **e, int base); +ulonglong my_strtoull_8bit(CHARSET_INFO *, const char *s, char **e, int base); +double my_strtod_8bit(CHARSET_INFO *, const char *s, char **e); + + #ifdef USE_MB /* Functions for multibyte charsets */ diff --git a/mysys/charset.c b/mysys/charset.c index 2f22c616325..6242b6a3866 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -389,6 +389,10 @@ static CHARSET_INFO *add_charset(CHARSET_INFO *cs, myf flags) cs->hash_caseup = my_hash_caseup_simple; cs->hash_sort = my_hash_sort_simple; cs->snprintf = my_snprintf_8bit; + cs->strtol = my_strtol_8bit; + cs->strtoul = my_strtoul_8bit; + cs->strtoll = my_strtoll_8bit; + cs->strtoull = my_strtoull_8bit; cs->mbmaxlen = 1; set_max_sort_char(cs); diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 8dff0d860a0..0efa36d4a19 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -6248,7 +6248,12 @@ CHARSET_INFO my_charset_big5 = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 3ec4491001d..46ba1af13b2 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -626,7 +626,12 @@ CHARSET_INFO my_charset_czech = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; #endif diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 154fada271e..4e5a0e3b525 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8665,7 +8665,12 @@ CHARSET_INFO my_charset_euc_kr = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; #endif diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index ecd15830b3f..c7a34f73f46 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -5715,7 +5715,12 @@ CHARSET_INFO my_charset_gb2312 = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; #endif diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index bdfdfb9b256..81a95eea026 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -9903,7 +9903,12 @@ CHARSET_INFO my_charset_gbk = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index d829296fd78..65c66f8cca8 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -444,7 +444,12 @@ CHARSET_INFO my_charset_latin1_de = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; #endif diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 3393ed09ee0..73978ffeeb5 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -244,3 +244,33 @@ void my_hash_sort_simple(CHARSET_INFO *cs, nr2[0]+=3; } } + +long my_strtol_8bit(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e, int base) +{ + return strtol(s,e,base); +} + +ulong my_strtoul_8bit(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e, int base) +{ + return strtoul(s,e,base); +} + +longlong my_strtoll_8bit(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e, int base) +{ + return strtoll(s,e,base); +} + +ulonglong my_strtoull_8bit(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e, int base) +{ + return strtoul(s,e,base); +} + +double my_strtod_8bit(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e) +{ + return strtod(s,e); +} diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index d657405137e..5d5beed0d44 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -4490,7 +4490,12 @@ CHARSET_INFO my_charset_sjis = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; #endif diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 44d0dde65f5..04bf7107647 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -718,7 +718,12 @@ CHARSET_INFO my_charset_tis620 = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 85b51b0469c..0eb82cc91dc 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8459,7 +8459,12 @@ CHARSET_INFO my_charset_ujis = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index e4afa4a0cee..898cc72b65c 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1984,7 +1984,12 @@ CHARSET_INFO my_charset_utf8 = my_hash_caseup_utf8,/* hash_caseup */ my_hash_sort_utf8, /* hash_sort */ 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; @@ -2433,6 +2438,36 @@ static int my_snprintf_ucs2(CHARSET_INFO *cs __attribute__((unused)) } +static long my_strtol_ucs2(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e, int base) +{ + return strtol(s,e,base); +} + +static ulong my_strtoul_ucs2(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e, int base) +{ + return strtoul(s,e,base); +} + +static longlong my_strtoll_ucs2(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e, int base) +{ + return strtoll(s,e,base); +} + +static ulonglong my_strtoull_ucs2(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e, int base) +{ + return strtoul(s,e,base); +} + +double my_strtod_ucs2(CHARSET_INFO *cs __attribute__((unused)), + const char *s, char **e) +{ + return strtod(s,e); +} + CHARSET_INFO my_charset_ucs2 = { @@ -2466,7 +2501,12 @@ CHARSET_INFO my_charset_ucs2 = my_hash_caseup_ucs2,/* hash_caseup */ my_hash_sort_ucs2, /* hash_sort */ 0, - my_snprintf_ucs2 + my_snprintf_ucs2, + my_strtol_ucs2, + my_strtoul_ucs2, + my_strtoll_ucs2, + my_strtoull_ucs2, + my_strtod_ucs2 }; diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index 9c418e2e6f5..3ef5b426bb4 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -652,7 +652,12 @@ CHARSET_INFO my_charset_win1250ch = my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }; diff --git a/strings/ctype.c b/strings/ctype.c index 96003f8baab..4c16c47ae07 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -2839,7 +2839,12 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_caseup_simple, my_hash_sort_simple, 0, - my_snprintf_8bit + my_snprintf_8bit, + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -2877,6 +2882,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -2913,6 +2923,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -2949,6 +2964,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -2986,6 +3006,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3022,6 +3047,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3058,6 +3088,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3094,6 +3129,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3131,6 +3171,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3167,6 +3212,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3203,6 +3253,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3239,6 +3294,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3275,6 +3335,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3311,6 +3376,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3347,6 +3417,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3384,6 +3459,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3420,6 +3500,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3457,6 +3542,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3494,6 +3584,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3530,6 +3625,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3566,6 +3666,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3602,6 +3707,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3638,6 +3748,11 @@ static CHARSET_INFO compiled_charsets[] = { my_hash_sort_simple, 0, my_snprintf_8bit + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit }, #endif @@ -3674,6 +3789,11 @@ static CHARSET_INFO compiled_charsets[] = { NULL, /* hash_caseup */ NULL, /* hash_sort */ 0, + NULL, + NULL, + NULL, + NULL, + NULL, NULL } }; From 5907ab4e045767d5fed29cb181f8577a5066e754 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 15:45:05 +0200 Subject: [PATCH 126/246] row0sel.c: Fix bug: if a unique search from a primary key matched to a delete-marked row, it could return the NEXT row innobase/row/row0sel.c: Fix bug: if a unique search from a primary key matched to a delete-marked row, it could return the NEXT row --- innobase/row/row0sel.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index 2306b1af747..ce6ed091a48 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -2972,15 +2972,12 @@ rec_loop: /*-------------------------------------------------------------*/ - if (unique_search_from_clust_index && btr_pcur_get_up_match(pcur) - == dtuple_get_n_fields(search_tuple)) { - /* The record matches enough */ + /* Note that we cannot trust the up_match value in the cursor at this + place because we can arrive here after moving the cursor! Thus + we have to recompare rec and search_tuple to determine if they + match enough. */ - ut_ad(mode == PAGE_CUR_GE); -#ifdef UNIV_SEARCH_DEBUG - ut_a(0 == cmp_dtuple_rec(search_tuple, rec)); -#endif - } else if (match_mode == ROW_SEL_EXACT) { + if (match_mode == ROW_SEL_EXACT) { /* Test if the index record matches completely to search_tuple in prebuilt: if not, then we return with DB_RECORD_NOT_FOUND */ From 7721c7582a5d0b03435e4c0a7001fd3b4bf424de Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 17:58:07 +0400 Subject: [PATCH 127/246] Some macros to make life easier --- include/m_ctype.h | 6 ++++++ sql/gstream.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index fd10d7325c2..bee6e51c483 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -233,6 +233,12 @@ extern int my_strncasecmp_mb(CHARSET_INFO * cs,const char *, const char *t, uint #define my_strcasecmp(s, a, b) ((s)->strcasecmp((s), (a), (b))) #define my_strncasecmp(s, a, b, l) ((s)->strncasecmp((s), (a), (b), (l))) +#define my_strtol(s, a, b, c) ((s)->strtol((s),(a),(b),(c))) +#define my_strtoul(s, a, b, c) ((s)->strtoul((s),(a),(b),(c))) +#define my_strtoll(s, a, b, c) ((s)->strtoll((s),(a),(b),(c))) +#define my_strtoull(s, a, b, c) ((s)->strtoull((s),(a),(b),(c))) +#define my_strtod(s, a, b) ((s)->strtod((s),(a),(b))) + /* XXX: still need to take care of this one */ #ifdef MY_CHARSET_TIS620 diff --git a/sql/gstream.cc b/sql/gstream.cc index 5a58fef6744..bd2345212c3 100644 --- a/sql/gstream.cc +++ b/sql/gstream.cc @@ -99,7 +99,7 @@ int GTextReadStream::get_next_number(double *d) char *endptr; - *d = strtod(cur, &endptr); + *d = my_strtod(my_charset_latin1, cur, &endptr); if(endptr) { From f8680cf00c56a249b51fcc2883b541adab388215 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 16:24:50 +0200 Subject: [PATCH 128/246] row0sel.c: Backport from 4.0 a bug fix: if unique search from a primary key matched a delete-marked record, InnoDB could return the NEXT record innobase/row/row0sel.c: Backport from 4.0 a bug fix: if unique search from a primary key matched a delete-marked record, InnoDB could return the NEXT record --- innobase/row/row0sel.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index d6b2413c911..5f260634149 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -2832,15 +2832,7 @@ rec_loop: ut_ad(page_rec_is_user_rec(rec)); - if (unique_search_from_clust_index && btr_pcur_get_up_match(pcur) - == dtuple_get_n_fields(search_tuple)) { - /* The record matches enough */ - - ut_ad(mode == PAGE_CUR_GE); -#ifdef UNIV_SEARCH_DEBUG - ut_a(0 == cmp_dtuple_rec(search_tuple, rec)); -#endif - } else if (match_mode == ROW_SEL_EXACT) { + if (match_mode == ROW_SEL_EXACT) { /* Test if the index record matches completely to search_tuple in prebuilt: if not, then we return with DB_RECORD_NOT_FOUND */ From ee23bc4d31862f2da510abe786aedac43477e721 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 15:57:29 +0100 Subject: [PATCH 129/246] removed redundant line --- sql/sql_base.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index a700fdc6a1b..23ba04bd6ed 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1851,7 +1851,6 @@ bool setup_tables(TABLE_LIST *tables) for (Field **ptr=table->field ; *ptr ; ptr++) (*ptr)->query_id=0; } - table->used_keys&= table->keys_in_use_for_query; } if (tablenr > MAX_TABLES) { From ffb4dee5a5297cdd7fa27aa87a8f505fbb88515b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 13 Nov 2002 22:55:32 +0100 Subject: [PATCH 130/246] optimize table corruption fixed, though more clean fix is desired. Fix for another optimize bug is undone, as the new one handles both cases. test added mysql-test/r/myisam.result: updated mysql-test/t/myisam.test: optimize table corruption test sql/ha_myisam.cc: optimize table corruption fixed, though more clean fix is desired. Fix for another optimize bug is undone, as the new one handles both cases. --- mysql-test/r/myisam.result | 4 ++++ mysql-test/t/myisam.test | 40 ++++++++++++++++++++++++++++++++++++++ sql/ha_myisam.cc | 12 ++++++++++-- 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index f57b99cf9fd..31478f14c93 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -38,3 +38,7 @@ table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 4 Table Op Msg_type Msg_text test.t1 optimize status OK +Table Op Msg_type Msg_text +test.t1 optimize status OK +Table Op Msg_type Msg_text +test.t1 check status OK diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 07fee2cf64f..92f22d35b81 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -75,6 +75,46 @@ INSERT INTO t1 VALUES (1), (2), (3); OPTIMIZE TABLE t1; DROP TABLE t1; +# +# Test of optimize, when only mi_sort_index (but not mi_repair*) is done +# in ha_myisam::repair, and index size is changed (decreased). +# + +drop table if exists t1; +create table t1 ( t1 char(255), key(t1(250))); +insert t1 values ('137513751375137513751375137513751375137569516951695169516951695169516951695169'); +insert t1 values ('178417841784178417841784178417841784178403420342034203420342034203420342034203'); +insert t1 values ('213872387238723872387238723872387238723867376737673767376737673767376737673767'); +insert t1 values ('242624262426242624262426242624262426242607890789078907890789078907890789078907'); +insert t1 values ('256025602560256025602560256025602560256011701170117011701170117011701170117011'); +insert t1 values ('276027602760276027602760276027602760276001610161016101610161016101610161016101'); +insert t1 values ('281528152815281528152815281528152815281564956495649564956495649564956495649564'); +insert t1 values ('292129212921292129212921292129212921292102100210021002100210021002100210021002'); +insert t1 values ('380638063806380638063806380638063806380634483448344834483448344834483448344834'); +insert t1 values ('411641164116411641164116411641164116411616301630163016301630163016301630163016'); +insert t1 values ('420842084208420842084208420842084208420899889988998899889988998899889988998899'); +insert t1 values ('438443844384438443844384438443844384438482448244824482448244824482448244824482'); +insert t1 values ('443244324432443244324432443244324432443239613961396139613961396139613961396139'); +insert t1 values ('485448544854485448544854485448544854485477847784778477847784778477847784778477'); +insert t1 values ('494549454945494549454945494549454945494555275527552755275527552755275527552755'); +insert t1 values ('538647864786478647864786478647864786478688918891889188918891889188918891889188'); +insert t1 values ('565556555655565556555655565556555655565554845484548454845484548454845484548454'); +insert t1 values ('607860786078607860786078607860786078607856665666566656665666566656665666566656'); +insert t1 values ('640164016401640164016401640164016401640141274127412741274127412741274127412741'); +insert t1 values ('719471947194719471947194719471947194719478717871787178717871787178717871787178'); +insert t1 values ('742574257425742574257425742574257425742549604960496049604960496049604960496049'); +insert t1 values ('887088708870887088708870887088708870887035963596359635963596359635963596359635'); +insert t1 values ('917791779177917791779177917791779177917773857385738573857385738573857385738573'); +insert t1 values ('933293329332933293329332933293329332933278987898789878987898789878987898789878'); +insert t1 values ('963896389638963896389638963896389638963877807780778077807780778077807780778077'); +delete from t1 where t1>'2'; +insert t1 values ('70'), ('84'), ('60'), ('20'), ('76'), ('89'), ('49'), ('50'), +('88'), ('61'), ('42'), ('98'), ('39'), ('30'), ('25'), ('66'), ('61'), ('48'), +('80'), ('84'), ('98'), ('19'), ('91'), ('42'), ('47'); +optimize table t1; +check table t1; +drop table t1; + # # test of myisam with huge number of packed fields # diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index c14ca7d034e..f96781f83b4 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -561,7 +561,6 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) } if (!optimize || - memcmp(file->state, & share->state.state, sizeof(MI_STATUS_INFO)) || ((file->state->del || share->state.split != file->state->records) && (!param.opt_rep_quick || !(share->state.changed & STATE_NOT_OPTIMIZED_KEYS)))) @@ -618,7 +617,16 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) STATE_CRASHED_ON_REPAIR); file->update|=HA_STATE_CHANGED | HA_STATE_ROW_CHANGED; } - file->save_state=file->s->state.state; + /* Here we need to make file->save_state and file->s->state.state + equal. Unfortunately, sometime table comes locked here (so + file->save_state represents actual table state), and sometime + unlocked (and actual is file->s->state.state instead). This all + is very confusing, and should be streamlined (TODO). + */ + if (file->state == & file->save_state) + file->s->state.state=file->save_state; + else + file->save_state=file->s->state.state; if (file->s->base.auto_key) update_auto_increment_key(¶m, file, 1); if (optimize_done) From 81a5afb925e9c41f7f43e58e8f36d93b5befd364 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 00:26:18 +0200 Subject: [PATCH 131/246] fixed cyclic reference bug mysql-test/r/subselect.result: test of cyclic reference mysql-test/t/subselect.test: test of cyclic reference sql/share/czech/errmsg.txt: new error message sql/share/danish/errmsg.txt: new error message sql/share/dutch/errmsg.txt: new error message sql/share/english/errmsg.txt: new error message sql/share/estonian/errmsg.txt: new error message sql/share/french/errmsg.txt: new error message sql/share/german/errmsg.txt: new error message sql/share/greek/errmsg.txt: new error message sql/share/hungarian/errmsg.txt: new error message sql/share/italian/errmsg.txt: new error message sql/share/japanese/errmsg.txt: new error message sql/share/korean/errmsg.txt: new error message sql/share/norwegian-ny/errmsg.txt: new error message sql/share/norwegian/errmsg.txt: new error message sql/share/polish/errmsg.txt: new error message sql/share/portuguese/errmsg.txt: new error message sql/share/romanian/errmsg.txt: new error message sql/share/russian/errmsg.txt: new error message sql/share/serbian/errmsg.txt: new error message sql/share/slovak/errmsg.txt: new error message sql/share/spanish/errmsg.txt: new error message sql/share/swedish/errmsg.txt: new error message sql/share/ukrainian/errmsg.txt: new error message --- include/mysqld_error.h | 3 ++- mysql-test/r/subselect.result | 4 +++- mysql-test/t/subselect.test | 4 +++- sql/item.cc | 27 ++++++++++++++++++++++++++ sql/item.h | 8 ++++++-- sql/item_cmpfunc.cc | 32 +++++++++++++++++++++++++++++++ sql/item_cmpfunc.h | 10 ++++++++++ sql/item_func.cc | 29 ++++++++++++++++++++++++++++ sql/item_func.h | 9 +++++++++ sql/item_strfunc.h | 21 ++++++++++++++++++++ sql/item_subselect.cc | 25 ++++++++++++++++++++++++ sql/item_subselect.h | 24 +++++++++++++---------- sql/share/czech/errmsg.txt | 3 ++- sql/share/danish/errmsg.txt | 3 ++- sql/share/dutch/errmsg.txt | 3 ++- sql/share/english/errmsg.txt | 3 ++- sql/share/estonian/errmsg.txt | 3 ++- sql/share/french/errmsg.txt | 3 ++- sql/share/german/errmsg.txt | 3 ++- sql/share/greek/errmsg.txt | 3 ++- sql/share/hungarian/errmsg.txt | 3 ++- sql/share/italian/errmsg.txt | 3 ++- sql/share/japanese/errmsg.txt | 3 ++- sql/share/korean/errmsg.txt | 3 ++- sql/share/norwegian-ny/errmsg.txt | 3 ++- sql/share/norwegian/errmsg.txt | 3 ++- sql/share/polish/errmsg.txt | 3 ++- sql/share/portuguese/errmsg.txt | 3 ++- sql/share/romanian/errmsg.txt | 3 ++- sql/share/russian/errmsg.txt | 3 ++- sql/share/serbian/errmsg.txt | 3 ++- sql/share/slovak/errmsg.txt | 3 ++- sql/share/spanish/errmsg.txt | 3 ++- sql/share/swedish/errmsg.txt | 3 ++- sql/share/ukrainian/errmsg.txt | 3 ++- sql/sql_class.h | 1 + sql/sql_parse.cc | 3 ++- sql/sql_select.cc | 18 +++++++++++++++++ sql/sql_select.h | 3 ++- 39 files changed, 250 insertions(+), 40 deletions(-) diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 125059af7fd..456d675a045 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -259,4 +259,5 @@ #define ER_SUBSELECT_NO_1_ROW 1240 #define ER_UNKNOWN_STMT_HANDLER 1241 #define ER_CORRUPT_HELP_DB 1242 -#define ER_ERROR_MESSAGES 243 +#define ER_CYCLIC_REFERENCE 1243 +#define ER_ERROR_MESSAGES 244 diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 5820c3259be..1b799a6cb63 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -8,6 +8,8 @@ SELECT (SELECT 1) UNION SELECT (SELECT 2); SELECT (SELECT (SELECT 0 UNION SELECT 0)); (SELECT (SELECT 0 UNION SELECT 0)) 0 +SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; +Cyclic reference on subqueries drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); @@ -46,7 +48,7 @@ a b 1 7 2 7 3 8 -select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1) +select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1) union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a); a b 1 7 diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index cfd22bc48c9..f690a823f85 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -1,6 +1,8 @@ select (select 2); SELECT (SELECT 1) UNION SELECT (SELECT 2); SELECT (SELECT (SELECT 0 UNION SELECT 0)); +-- error 1243 +SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); @@ -18,7 +20,7 @@ insert into t3 values (6),(7),(3); select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1); select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1) union (select * from t4 order by a limit 2) limit 3; -select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1) +select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1) union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a); explain select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1) union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a); diff --git a/sql/item.cc b/sql/item.cc index ea797679957..f317759553b 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -42,6 +42,20 @@ Item::Item() decimals=0; max_length=0; next=current_thd->free_list; // Put in free list current_thd->free_list=this; + loop_id= 0; +} + +bool Item::check_loop(uint id) +{ + DBUG_ENTER("Item::check_loop"); + DBUG_PRINT("info", ("id %u, name %s", id, name)); + if (loop_id == id) + { + DBUG_PRINT("info", ("id match")); + DBUG_RETURN(1); + } + loop_id= id; + DBUG_RETURN(0); } void Item::set_name(const char *str,uint length) @@ -862,6 +876,11 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) { depended_from= last; thd->lex.current_select->mark_as_dependent(last); + if (check_loop(thd->check_loops_counter++)) + { + my_message(ER_CYCLIC_REFERENCE, ER(ER_CYCLIC_REFERENCE), MYF(0)); + return 1; + } } } else if (!ref) @@ -873,6 +892,14 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) return 0; } +bool Item_ref::check_loop(uint id) +{ + DBUG_ENTER("Item_ref::check_loop"); + if (Item_ident::check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN((*ref)->check_loop(id)); +} + /* ** If item is a const function, calculate it and return a const item ** The original item is freed if not returned diff --git a/sql/item.h b/sql/item.h index fb6bed75d51..c67c16c50ad 100644 --- a/sql/item.h +++ b/sql/item.h @@ -20,10 +20,11 @@ #endif struct st_table_list; -void item_init(void); /* Init item functions */ +void item_init(void); /* Init item functions */ class Item { - Item(const Item &); /* Prevent use of these */ + uint loop_id; /* Used to find selfrefering loops */ + Item(const Item &); /* Prevent use of these */ void operator=(Item &); public: static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); } @@ -88,6 +89,8 @@ public: virtual CHARSET_INFO *charset() const { return str_value.charset(); }; virtual bool binary() const { return str_value.charset()->state & MY_CS_BINSORT ? 1 : 0 ; } virtual void set_charset(CHARSET_INFO *cs) { str_value.set_charset(cs); } + + virtual bool check_loop(uint id); }; @@ -434,6 +437,7 @@ public: void save_org_in_field(Field *field) { (*ref)->save_org_in_field(field); } enum Item_result result_type () const { return (*ref)->result_type(); } table_map used_tables() const { return (*ref)->used_tables(); } + bool check_loop(uint id); }; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index b6ea4beb339..744ed1bceca 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -344,6 +344,14 @@ void Item_func_interval::update_used_tables() const_item_cache&=item->const_item(); } +bool Item_func_interval::check_loop(uint id) +{ + DBUG_ENTER("Item_func_interval::check_loop"); + if (Item_func::check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(item->check_loop(id)); +} + void Item_func_between::fix_length_and_dec() { max_length=1; @@ -776,6 +784,16 @@ Item_func_case::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) return 0; } +bool Item_func_case::check_loop(uint id) +{ + DBUG_ENTER("Item_func_case::check_loop"); + if (Item_func::check_loop(id)) + DBUG_RETURN(1); + + DBUG_RETURN((first_expr && first_expr->check_loop(id)) || + (else_expr && else_expr->check_loop(id))); +} + void Item_func_case::update_used_tables() { Item_func::update_used_tables(); @@ -1137,6 +1155,20 @@ Item_cond::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) return 0; } +bool Item_cond::check_loop(uint id) +{ + DBUG_ENTER("Item_cond::check_loop"); + if (Item_func::check_loop(id)) + DBUG_RETURN(1); + List_iterator li(list); + Item *item; + while ((item= li++)) + { + if (item->check_loop(id)) + DBUG_RETURN(1); + } + DBUG_RETURN(0); +} void Item_cond::split_sum_func(List &fields) { diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index c0dcc2bba8f..489d54ae786 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -186,6 +186,7 @@ public: ~Item_func_interval() { delete item; } const char *func_name() const { return "interval"; } void update_used_tables(); + bool check_loop(uint id); }; @@ -262,6 +263,7 @@ public: void print(String *str); bool fix_fields(THD *thd, struct st_table_list *tlist, Item **ref); Item *find_item(String *str); + bool check_loop(uint id); }; @@ -424,6 +426,13 @@ class Item_func_in :public Item_int_func enum Functype functype() const { return IN_FUNC; } const char *func_name() const { return " IN "; } void update_used_tables(); + bool check_loop(uint id) + { + DBUG_ENTER("Item_func_in::check_loop"); + if (Item_func::check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(item->check_loop(id)); + } }; @@ -563,6 +572,7 @@ public: void print(String *str); void split_sum_func(List &fields); friend int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds); + bool check_loop(uint id); }; diff --git a/sql/item_func.cc b/sql/item_func.cc index 543a96107dc..aa39b3cc857 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -126,6 +126,22 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) return 0; } +bool Item_func::check_loop(uint id) +{ + DBUG_ENTER("Item_func::check_loop"); + if (Item_result_field::check_loop(id)) + DBUG_RETURN(1); + if (arg_count) + { + Item **arg,**arg_end; + for (arg= args, arg_end= args+arg_count; arg != arg_end; arg++) + { + if ((*arg)->check_loop(id)) + DBUG_RETURN(1); + } + } + DBUG_RETURN(0); +} void Item_func::split_sum_func(List &fields) { @@ -2264,6 +2280,19 @@ bool Item_func_match::fix_fields(THD *thd, TABLE_LIST *tlist, Item **ref) return 0; } +bool Item_func_match::check_loop(uint id) +{ + DBUG_ENTER("Item_func_match::check_loop"); + if (Item_real_func::check_loop(id)) + DBUG_RETURN(1); + + List_iterator li(fields); + Item *item; + while ((item= li++)) + if (item->check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(0); +} bool Item_func_match::fix_index() { diff --git a/sql/item_func.h b/sql/item_func.h index 1e1f2ba39fc..581809fc9cb 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -128,6 +128,7 @@ public: bool is_null() { (void) val_int(); return null_value; } friend class udf_handler; Field *tmp_table_field(TABLE *t_arg); + bool check_loop(uint id); }; @@ -606,6 +607,13 @@ public: const_item_cache&= item->const_item(); with_sum_func= with_sum_func || item->with_sum_func; } + bool check_loop(uint id) + { + DBUG_ENTER("Item_func_field::check_loop"); + if (Item_int_func::check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(item->check_loop(id)); + } }; @@ -971,6 +979,7 @@ public: bool fix_index(); void init_search(bool no_order); + bool check_loop(uint id); }; diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 1a3193318b6..2b308630b48 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -105,6 +105,13 @@ public: || Item_func::fix_fields(thd, tlist, ref)); } const char *func_name() const { return "concat_ws"; } + bool check_loop(uint id) + { + DBUG_ENTER("Item_func_concat_ws::check_loop"); + if (Item_str_func::check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(separator->check_loop(id)); + } }; class Item_func_reverse :public Item_str_func @@ -361,6 +368,13 @@ public: void fix_length_and_dec(); void update_used_tables(); const char *func_name() const { return "elt"; } + bool check_loop(uint id) + { + DBUG_ENTER("Item_func_elt::check_loop"); + if (Item_str_func::check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(item->check_loop(id)); + } }; @@ -381,6 +395,13 @@ public: void fix_length_and_dec(); void update_used_tables(); const char *func_name() const { return "make_set"; } + bool check_loop(uint id) + { + DBUG_ENTER("Item_func_make_set::check_loop"); + if (Item_str_func::check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(item->check_loop(id)); + } }; diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 37c85501b06..1f1944026ef 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -95,6 +95,15 @@ bool Item_subselect::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) return res; } +bool Item_subselect::check_loop(uint id) +{ + DBUG_ENTER("Item_subselect::check_loop"); + if (Item_result_field::check_loop(id)) + DBUG_RETURN(1); + + DBUG_RETURN(engine->check_loop(id)); +} + void Item_subselect::fix_length_and_dec() { engine->fix_length_and_dec(); @@ -228,6 +237,7 @@ subselect_single_select_engine::subselect_single_select_engine(THD *thd, thd->fatal_error= 1; my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); } + unit->item= item; this->select_lex= select_lex; } @@ -353,3 +363,18 @@ bool subselect_union_engine::depended() { return unit->dependent; } + +bool subselect_single_select_engine::check_loop(uint id) +{ + DBUG_ENTER("subselect_single_select_engine::check_loop"); + DBUG_RETURN(join->check_loop(id)); +} + +bool subselect_union_engine::check_loop(uint id) +{ + DBUG_ENTER("subselect_union_engine::check_loop"); + for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select()) + if (sl->join && sl->join->check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(0); +} diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 58726f16ba9..3ad6c68a6ba 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -70,6 +70,7 @@ public: bool fix_fields(THD *thd, TABLE_LIST *tables, Item **ref); virtual void fix_length_and_dec(); table_map used_tables() const; + bool check_loop(uint id); friend class select_subselect; }; @@ -176,6 +177,7 @@ public: virtual uint cols()= 0; /* return number of columnss in select */ virtual bool depended()= 0; /* depended from outer select */ enum Item_result type() { return res_type; } + virtual bool check_loop(uint id)= 0; }; class subselect_single_select_engine: public subselect_engine @@ -189,11 +191,12 @@ public: subselect_single_select_engine(THD *thd, st_select_lex *select, select_subselect *result, Item_subselect *item); - virtual int prepare(); - virtual void fix_length_and_dec(); - virtual int exec(); - virtual uint cols(); - virtual bool depended(); + int prepare(); + void fix_length_and_dec(); + int exec(); + uint cols(); + bool depended(); + bool check_loop(uint id); }; class subselect_union_engine: public subselect_engine @@ -204,9 +207,10 @@ public: st_select_lex_unit *u, select_subselect *result, Item_subselect *item); - virtual int prepare(); - virtual void fix_length_and_dec(); - virtual int exec(); - virtual uint cols(); - virtual bool depended(); + int prepare(); + void fix_length_and_dec(); + int exec(); + uint cols(); + bool depended(); + bool check_loop(uint id); }; diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index c8ac594f00b..d43a433da06 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -252,4 +252,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 5638260277e..3a947bcbe38 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -246,4 +246,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index acbda2829d0..1cb81849be1 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -254,4 +254,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 36d8831fd39..6e96fdb393e 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -243,4 +243,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 96bd758cc6a..394c40c5778 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -248,4 +248,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 932182a2c94..b18d3f8fb38 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -243,4 +243,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index febd723df89..49ea31dd05b 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -246,4 +246,5 @@ "Subselect return more than 1 field", "Subselect return more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index 9d9aa07af8d..b203c63949b 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -243,4 +243,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index d596c8f3433..07081e689ad 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -245,4 +245,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index d9ccf54d7ea..0a380e2b48f 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -243,4 +243,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 22a53801efd..2e0a083ca06 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -245,4 +245,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 27a8fdde027..19fcf98e3c7 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -243,4 +243,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 8e8b5aa7e61..810aaf38f74 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -245,4 +245,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 0f4650c186c..a74a0a910b8 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -245,4 +245,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 758e96e5ca3..efde31ff4c9 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -247,4 +247,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 21ebe5c39dc..e90d5844b9b 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -243,4 +243,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index c84049d6192..18f0bf7f79d 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -247,4 +247,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 0ee79ce5811..790d738031c 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -246,4 +246,5 @@ "ðÏÄÚÁÐÒÏÓ ×ÏÚ×ÒÁÝÁÅÔ ÂÏÌÅÅ ÏÄÎÏÇÏ ÐÏÌÑ", "ðÏÄÚÁÐÒÏÓ ×ÏÚ×ÒÁÝÁÅÔ ÂÏÌÅÅ ÏÄÎÏÊ ÚÁÐÉÓÉ", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"ãÉËÌÉÞÅÓËÁÑ ÓÓÙÌËÁ ÎÁ ÐÏÄÚÁÐÒÏÓ", diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index d120630b636..e8186d38a5b 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -239,4 +239,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index eb9e2a240a0..216d46fcd3a 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -251,4 +251,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 0b7de283481..5076b1b6679 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -244,4 +244,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index 052cd1506d3..a3bb40fb4f5 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -243,4 +243,5 @@ "Subselect returns more than 1 field", "Subselect returns more than 1 record", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"Cyclic reference on subqueries", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 5cfad494a32..426c2a14e3b 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -248,4 +248,5 @@ "ðiÄÚÁÐÉÔ ÐÏ×ÅÒÔÁ¤ ÂiÌØÛ ÎiÖ 1 ÓÔÏ×ÂÅÃØ", "ðiÄÚÁÐÉÔ ÐÏ×ÅÒÔÁ¤ ÂiÌØÛ ÎiÖ 1 ÚÁÐÉÓ", "Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", \ No newline at end of file +"Help database is corrupt or does not exist", +"ãÉËÌiÞÎÅ ÐÏÓÉÌÁÎÎÑ ÎÁ ÐiÄÚÁÐÉÔ", diff --git a/sql/sql_class.h b/sql/sql_class.h index 08066e83ee7..6f6547a358c 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -494,6 +494,7 @@ public: uint32 query_length; uint32 db_length; uint select_number; //number of select (used for EXPLAIN) + uint check_loops_counter; //last id used to check loops /* variables.transaction_isolation is reset to this after each commit */ enum_tx_isolation session_tx_isolation; char scramble[9]; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6a2c8e17185..1586469de42 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2867,7 +2867,8 @@ mysql_init_query(THD *thd) lex->select_lex.prev= &lex->unit.slave; lex->olap=lex->describe=0; lex->derived_tables= false; - thd->select_number= lex->select_lex.select_number= 1; + thd->check_loops_counter= thd->select_number= + lex->select_lex.select_number= 1; thd->free_list= 0; thd->total_warn_count=0; // Warnings for this query thd->last_insert_id_used= thd->query_start_used= thd->insert_id_used=0; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 5f4bfc5462a..dd84b2a46c8 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1035,6 +1035,24 @@ JOIN::cleanup(THD *thd) DBUG_RETURN(error); } +bool JOIN::check_loop(uint id) +{ + DBUG_ENTER("JOIN::check_loop"); + Item *item; + List_iterator it(all_fields); + DBUG_PRINT("info", ("all_fields:")); + while ((item= it++)) + if (item->check_loop(id)) + DBUG_RETURN(1); + DBUG_PRINT("info", ("where:")); + if (select_lex->where && select_lex->where->check_loop(id)) + DBUG_RETURN(1); + DBUG_PRINT("info", ("having:")); + if (select_lex->having && select_lex->having->check_loop(id)) + DBUG_RETURN(1); + DBUG_RETURN(0); +} + int mysql_select(THD *thd, TABLE_LIST *tables, List &fields, COND *conds, ORDER *order, ORDER *group,Item *having, ORDER *proc_param, diff --git a/sql/sql_select.h b/sql/sql_select.h index c5b5357be50..3b89c1ce0d3 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -244,7 +244,8 @@ class JOIN :public Sql_alloc int global_optimize(); int reinit(); void exec(); - int cleanup(THD *thd); + int cleanup(THD *thd); + bool check_loop(uint id); }; From 20243b65d70ef96c533c791f7e82e9206f50f2fc Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 00:27:14 +0100 Subject: [PATCH 132/246] results updated mysql-test/r/myisam.result: updated --- mysql-test/r/myisam.result | 220 +++++++++++++++++++++++++++++++++++-- 1 file changed, 212 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 739a47b41f1..4a0eb47efb7 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -75,6 +75,218 @@ explain select a,b,c from t1; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 4 drop table t1; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (3); +LOCK TABLES t1 WRITE; +INSERT INTO t1 VALUES (1), (2), (3); +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +DROP TABLE t1; +drop table if exists t1; +create table t1 ( t1 char(255), key(t1(250))); +insert t1 values ('137513751375137513751375137513751375137569516951695169516951695169516951695169'); +insert t1 values ('178417841784178417841784178417841784178403420342034203420342034203420342034203'); +insert t1 values ('213872387238723872387238723872387238723867376737673767376737673767376737673767'); +insert t1 values ('242624262426242624262426242624262426242607890789078907890789078907890789078907'); +insert t1 values ('256025602560256025602560256025602560256011701170117011701170117011701170117011'); +insert t1 values ('276027602760276027602760276027602760276001610161016101610161016101610161016101'); +insert t1 values ('281528152815281528152815281528152815281564956495649564956495649564956495649564'); +insert t1 values ('292129212921292129212921292129212921292102100210021002100210021002100210021002'); +insert t1 values ('380638063806380638063806380638063806380634483448344834483448344834483448344834'); +insert t1 values ('411641164116411641164116411641164116411616301630163016301630163016301630163016'); +insert t1 values ('420842084208420842084208420842084208420899889988998899889988998899889988998899'); +insert t1 values ('438443844384438443844384438443844384438482448244824482448244824482448244824482'); +insert t1 values ('443244324432443244324432443244324432443239613961396139613961396139613961396139'); +insert t1 values ('485448544854485448544854485448544854485477847784778477847784778477847784778477'); +insert t1 values ('494549454945494549454945494549454945494555275527552755275527552755275527552755'); +insert t1 values ('538647864786478647864786478647864786478688918891889188918891889188918891889188'); +insert t1 values ('565556555655565556555655565556555655565554845484548454845484548454845484548454'); +insert t1 values ('607860786078607860786078607860786078607856665666566656665666566656665666566656'); +insert t1 values ('640164016401640164016401640164016401640141274127412741274127412741274127412741'); +insert t1 values ('719471947194719471947194719471947194719478717871787178717871787178717871787178'); +insert t1 values ('742574257425742574257425742574257425742549604960496049604960496049604960496049'); +insert t1 values ('887088708870887088708870887088708870887035963596359635963596359635963596359635'); +insert t1 values ('917791779177917791779177917791779177917773857385738573857385738573857385738573'); +insert t1 values ('933293329332933293329332933293329332933278987898789878987898789878987898789878'); +insert t1 values ('963896389638963896389638963896389638963877807780778077807780778077807780778077'); +delete from t1 where t1>'2'; +insert t1 values ('70'), ('84'), ('60'), ('20'), ('76'), ('89'), ('49'), ('50'), +('88'), ('61'), ('42'), ('98'), ('39'), ('30'), ('25'), ('66'), ('61'), ('48'), +('80'), ('84'), ('98'), ('19'), ('91'), ('42'), ('47'); +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +drop table if exists t1; +create table t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 +int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 +int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, +i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 +int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, +i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 +int, i52 int, i53 int, i54 int, i55 int, i56 int, i57 int, i58 int, i59 int, +i60 int, i61 int, i62 int, i63 int, i64 int, i65 int, i66 int, i67 int, i68 +int, i69 int, i70 int, i71 int, i72 int, i73 int, i74 int, i75 int, i76 int, +i77 int, i78 int, i79 int, i80 int, i81 int, i82 int, i83 int, i84 int, i85 +int, i86 int, i87 int, i88 int, i89 int, i90 int, i91 int, i92 int, i93 int, +i94 int, i95 int, i96 int, i97 int, i98 int, i99 int, i100 int, i101 int, i102 +int, i103 int, i104 int, i105 int, i106 int, i107 int, i108 int, i109 int, i110 +int, i111 int, i112 int, i113 int, i114 int, i115 int, i116 int, i117 int, i118 +int, i119 int, i120 int, i121 int, i122 int, i123 int, i124 int, i125 int, i126 +int, i127 int, i128 int, i129 int, i130 int, i131 int, i132 int, i133 int, i134 +int, i135 int, i136 int, i137 int, i138 int, i139 int, i140 int, i141 int, i142 +int, i143 int, i144 int, i145 int, i146 int, i147 int, i148 int, i149 int, i150 +int, i151 int, i152 int, i153 int, i154 int, i155 int, i156 int, i157 int, i158 +int, i159 int, i160 int, i161 int, i162 int, i163 int, i164 int, i165 int, i166 +int, i167 int, i168 int, i169 int, i170 int, i171 int, i172 int, i173 int, i174 +int, i175 int, i176 int, i177 int, i178 int, i179 int, i180 int, i181 int, i182 +int, i183 int, i184 int, i185 int, i186 int, i187 int, i188 int, i189 int, i190 +int, i191 int, i192 int, i193 int, i194 int, i195 int, i196 int, i197 int, i198 +int, i199 int, i200 int, i201 int, i202 int, i203 int, i204 int, i205 int, i206 +int, i207 int, i208 int, i209 int, i210 int, i211 int, i212 int, i213 int, i214 +int, i215 int, i216 int, i217 int, i218 int, i219 int, i220 int, i221 int, i222 +int, i223 int, i224 int, i225 int, i226 int, i227 int, i228 int, i229 int, i230 +int, i231 int, i232 int, i233 int, i234 int, i235 int, i236 int, i237 int, i238 +int, i239 int, i240 int, i241 int, i242 int, i243 int, i244 int, i245 int, i246 +int, i247 int, i248 int, i249 int, i250 int, i251 int, i252 int, i253 int, i254 +int, i255 int, i256 int, i257 int, i258 int, i259 int, i260 int, i261 int, i262 +int, i263 int, i264 int, i265 int, i266 int, i267 int, i268 int, i269 int, i270 +int, i271 int, i272 int, i273 int, i274 int, i275 int, i276 int, i277 int, i278 +int, i279 int, i280 int, i281 int, i282 int, i283 int, i284 int, i285 int, i286 +int, i287 int, i288 int, i289 int, i290 int, i291 int, i292 int, i293 int, i294 +int, i295 int, i296 int, i297 int, i298 int, i299 int, i300 int, i301 int, i302 +int, i303 int, i304 int, i305 int, i306 int, i307 int, i308 int, i309 int, i310 +int, i311 int, i312 int, i313 int, i314 int, i315 int, i316 int, i317 int, i318 +int, i319 int, i320 int, i321 int, i322 int, i323 int, i324 int, i325 int, i326 +int, i327 int, i328 int, i329 int, i330 int, i331 int, i332 int, i333 int, i334 +int, i335 int, i336 int, i337 int, i338 int, i339 int, i340 int, i341 int, i342 +int, i343 int, i344 int, i345 int, i346 int, i347 int, i348 int, i349 int, i350 +int, i351 int, i352 int, i353 int, i354 int, i355 int, i356 int, i357 int, i358 +int, i359 int, i360 int, i361 int, i362 int, i363 int, i364 int, i365 int, i366 +int, i367 int, i368 int, i369 int, i370 int, i371 int, i372 int, i373 int, i374 +int, i375 int, i376 int, i377 int, i378 int, i379 int, i380 int, i381 int, i382 +int, i383 int, i384 int, i385 int, i386 int, i387 int, i388 int, i389 int, i390 +int, i391 int, i392 int, i393 int, i394 int, i395 int, i396 int, i397 int, i398 +int, i399 int, i400 int, i401 int, i402 int, i403 int, i404 int, i405 int, i406 +int, i407 int, i408 int, i409 int, i410 int, i411 int, i412 int, i413 int, i414 +int, i415 int, i416 int, i417 int, i418 int, i419 int, i420 int, i421 int, i422 +int, i423 int, i424 int, i425 int, i426 int, i427 int, i428 int, i429 int, i430 +int, i431 int, i432 int, i433 int, i434 int, i435 int, i436 int, i437 int, i438 +int, i439 int, i440 int, i441 int, i442 int, i443 int, i444 int, i445 int, i446 +int, i447 int, i448 int, i449 int, i450 int, i451 int, i452 int, i453 int, i454 +int, i455 int, i456 int, i457 int, i458 int, i459 int, i460 int, i461 int, i462 +int, i463 int, i464 int, i465 int, i466 int, i467 int, i468 int, i469 int, i470 +int, i471 int, i472 int, i473 int, i474 int, i475 int, i476 int, i477 int, i478 +int, i479 int, i480 int, i481 int, i482 int, i483 int, i484 int, i485 int, i486 +int, i487 int, i488 int, i489 int, i490 int, i491 int, i492 int, i493 int, i494 +int, i495 int, i496 int, i497 int, i498 int, i499 int, i500 int, i501 int, i502 +int, i503 int, i504 int, i505 int, i506 int, i507 int, i508 int, i509 int, i510 +int, i511 int, i512 int, i513 int, i514 int, i515 int, i516 int, i517 int, i518 +int, i519 int, i520 int, i521 int, i522 int, i523 int, i524 int, i525 int, i526 +int, i527 int, i528 int, i529 int, i530 int, i531 int, i532 int, i533 int, i534 +int, i535 int, i536 int, i537 int, i538 int, i539 int, i540 int, i541 int, i542 +int, i543 int, i544 int, i545 int, i546 int, i547 int, i548 int, i549 int, i550 +int, i551 int, i552 int, i553 int, i554 int, i555 int, i556 int, i557 int, i558 +int, i559 int, i560 int, i561 int, i562 int, i563 int, i564 int, i565 int, i566 +int, i567 int, i568 int, i569 int, i570 int, i571 int, i572 int, i573 int, i574 +int, i575 int, i576 int, i577 int, i578 int, i579 int, i580 int, i581 int, i582 +int, i583 int, i584 int, i585 int, i586 int, i587 int, i588 int, i589 int, i590 +int, i591 int, i592 int, i593 int, i594 int, i595 int, i596 int, i597 int, i598 +int, i599 int, i600 int, i601 int, i602 int, i603 int, i604 int, i605 int, i606 +int, i607 int, i608 int, i609 int, i610 int, i611 int, i612 int, i613 int, i614 +int, i615 int, i616 int, i617 int, i618 int, i619 int, i620 int, i621 int, i622 +int, i623 int, i624 int, i625 int, i626 int, i627 int, i628 int, i629 int, i630 +int, i631 int, i632 int, i633 int, i634 int, i635 int, i636 int, i637 int, i638 +int, i639 int, i640 int, i641 int, i642 int, i643 int, i644 int, i645 int, i646 +int, i647 int, i648 int, i649 int, i650 int, i651 int, i652 int, i653 int, i654 +int, i655 int, i656 int, i657 int, i658 int, i659 int, i660 int, i661 int, i662 +int, i663 int, i664 int, i665 int, i666 int, i667 int, i668 int, i669 int, i670 +int, i671 int, i672 int, i673 int, i674 int, i675 int, i676 int, i677 int, i678 +int, i679 int, i680 int, i681 int, i682 int, i683 int, i684 int, i685 int, i686 +int, i687 int, i688 int, i689 int, i690 int, i691 int, i692 int, i693 int, i694 +int, i695 int, i696 int, i697 int, i698 int, i699 int, i700 int, i701 int, i702 +int, i703 int, i704 int, i705 int, i706 int, i707 int, i708 int, i709 int, i710 +int, i711 int, i712 int, i713 int, i714 int, i715 int, i716 int, i717 int, i718 +int, i719 int, i720 int, i721 int, i722 int, i723 int, i724 int, i725 int, i726 +int, i727 int, i728 int, i729 int, i730 int, i731 int, i732 int, i733 int, i734 +int, i735 int, i736 int, i737 int, i738 int, i739 int, i740 int, i741 int, i742 +int, i743 int, i744 int, i745 int, i746 int, i747 int, i748 int, i749 int, i750 +int, i751 int, i752 int, i753 int, i754 int, i755 int, i756 int, i757 int, i758 +int, i759 int, i760 int, i761 int, i762 int, i763 int, i764 int, i765 int, i766 +int, i767 int, i768 int, i769 int, i770 int, i771 int, i772 int, i773 int, i774 +int, i775 int, i776 int, i777 int, i778 int, i779 int, i780 int, i781 int, i782 +int, i783 int, i784 int, i785 int, i786 int, i787 int, i788 int, i789 int, i790 +int, i791 int, i792 int, i793 int, i794 int, i795 int, i796 int, i797 int, i798 +int, i799 int, i800 int, i801 int, i802 int, i803 int, i804 int, i805 int, i806 +int, i807 int, i808 int, i809 int, i810 int, i811 int, i812 int, i813 int, i814 +int, i815 int, i816 int, i817 int, i818 int, i819 int, i820 int, i821 int, i822 +int, i823 int, i824 int, i825 int, i826 int, i827 int, i828 int, i829 int, i830 +int, i831 int, i832 int, i833 int, i834 int, i835 int, i836 int, i837 int, i838 +int, i839 int, i840 int, i841 int, i842 int, i843 int, i844 int, i845 int, i846 +int, i847 int, i848 int, i849 int, i850 int, i851 int, i852 int, i853 int, i854 +int, i855 int, i856 int, i857 int, i858 int, i859 int, i860 int, i861 int, i862 +int, i863 int, i864 int, i865 int, i866 int, i867 int, i868 int, i869 int, i870 +int, i871 int, i872 int, i873 int, i874 int, i875 int, i876 int, i877 int, i878 +int, i879 int, i880 int, i881 int, i882 int, i883 int, i884 int, i885 int, i886 +int, i887 int, i888 int, i889 int, i890 int, i891 int, i892 int, i893 int, i894 +int, i895 int, i896 int, i897 int, i898 int, i899 int, i900 int, i901 int, i902 +int, i903 int, i904 int, i905 int, i906 int, i907 int, i908 int, i909 int, i910 +int, i911 int, i912 int, i913 int, i914 int, i915 int, i916 int, i917 int, i918 +int, i919 int, i920 int, i921 int, i922 int, i923 int, i924 int, i925 int, i926 +int, i927 int, i928 int, i929 int, i930 int, i931 int, i932 int, i933 int, i934 +int, i935 int, i936 int, i937 int, i938 int, i939 int, i940 int, i941 int, i942 +int, i943 int, i944 int, i945 int, i946 int, i947 int, i948 int, i949 int, i950 +int, i951 int, i952 int, i953 int, i954 int, i955 int, i956 int, i957 int, i958 +int, i959 int, i960 int, i961 int, i962 int, i963 int, i964 int, i965 int, i966 +int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 +int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 +int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 +int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 +int, i999 int, i1000 int) row_format=dynamic; +insert into t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, +1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); +drop table if exists t1; CREATE TABLE `t1` ( `post_id` mediumint(8) unsigned NOT NULL auto_increment, `topic_id` mediumint(8) unsigned NOT NULL default '0', @@ -100,14 +312,6 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1), (2), (3); -LOCK TABLES t1 WRITE; -INSERT INTO t1 VALUES (1), (2), (3); -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -DROP TABLE t1; CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), KEY t1 (a, b, c)); Specified key was too long. Max key length is 500 CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255)); From 948a867123539742518d033c856eeb2caa94525d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 09:43:24 +0200 Subject: [PATCH 133/246] fixed bug in cyclic reference refinition mysql-test/r/subselect.result: test of cyclic reference mysql-test/t/subselect.test: test of cyclic reference sql/sql_parse.cc: fixed layout fixed bug in cyclic reference refinition --- mysql-test/r/subselect.result | 2 ++ mysql-test/t/subselect.test | 2 ++ sql/item.cc | 6 +----- sql/sql_class.cc | 9 +++++++++ sql/sql_class.h | 2 ++ sql/sql_parse.cc | 4 +++- sql/sql_select.cc | 17 +++++++++++++++++ 7 files changed, 36 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 1b799a6cb63..d1a3056d8e9 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -10,6 +10,8 @@ SELECT (SELECT (SELECT 0 UNION SELECT 0)); 0 SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; Cyclic reference on subqueries +SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b; +Cyclic reference on subqueries drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index f690a823f85..63f689d2608 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3,6 +3,8 @@ SELECT (SELECT 1) UNION SELECT (SELECT 2); SELECT (SELECT (SELECT 0 UNION SELECT 0)); -- error 1243 SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; +-- error 1243 +SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b; drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); diff --git a/sql/item.cc b/sql/item.cc index f317759553b..48ec11d02c2 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -876,11 +876,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) { depended_from= last; thd->lex.current_select->mark_as_dependent(last); - if (check_loop(thd->check_loops_counter++)) - { - my_message(ER_CYCLIC_REFERENCE, ER(ER_CYCLIC_REFERENCE), MYF(0)); - return 1; - } + thd->add_possible_loop(this); } } else if (!ref) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index f33d0f2ca28..e6acab6a244 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -434,6 +434,15 @@ void THD::close_active_vio() } #endif +void THD::add_possible_loop (Item *item) +{ + if (!possible_loops) + { + possible_loops= new List; + } + possible_loops->push_back(item); +} + /***************************************************************************** ** Functions to provide a interface to select results *****************************************************************************/ diff --git a/sql/sql_class.h b/sql/sql_class.h index 6f6547a358c..a619e8e3aff 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -482,6 +482,7 @@ public: USER_CONN *user_connect; CHARSET_INFO *db_charset; CHARSET_INFO *thd_charset; + List *possible_loops; // Items that may cause loops in subselects List warn_list; uint warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_END]; uint total_warn_count, old_total_warn_count; @@ -632,6 +633,7 @@ public: net.last_errno= 0; net.report_error= 0; } + void add_possible_loop(Item *); }; /* diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 1586469de42..8df74f332eb 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2862,7 +2862,8 @@ mysql_init_query(THD *thd) lex->select_lex.init_query(); lex->value_list.empty(); lex->param_list.empty(); - lex->unit.global_parameters= lex->unit.slave= lex->current_select= &lex->select_lex; + lex->unit.global_parameters= lex->unit.slave= lex->current_select= + &lex->select_lex; lex->select_lex.master= &lex->unit; lex->select_lex.prev= &lex->unit.slave; lex->olap=lex->describe=0; @@ -2875,6 +2876,7 @@ mysql_init_query(THD *thd) thd->sent_row_count= thd->examined_row_count= 0; thd->fatal_error= thd->rand_used=0; thd->safe_to_cache_query= 1; + thd->possible_loops= 0; DBUG_VOID_RETURN; } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index dd84b2a46c8..b3838628d35 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1087,6 +1087,23 @@ mysql_select(THD *thd, TABLE_LIST *tables, List &fields, COND *conds, { DBUG_RETURN(-1); } + if (thd->possible_loops) + { + Item *item; + while(thd->possible_loops->elements) + { + item= thd->possible_loops->pop(); + if (item->check_loop(thd->check_loops_counter++)) + { + delete thd->possible_loops; + thd->possible_loops= 0; + my_message(ER_CYCLIC_REFERENCE, ER(ER_CYCLIC_REFERENCE), MYF(0)); + return 1; + } + } + delete thd->possible_loops; + thd->possible_loops= 0; + } } switch (join->optimize()) From 3648eb7da856868e1e484ac5b592e3a26ee560fc Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 12:21:36 +0200 Subject: [PATCH 134/246] Portability fix when using -DBIG_TABLES BitKeeper/etc/config: Changed Sasha to sys client/mysqlbinlog.cc: Fixed that --position open works. sql/item_timefunc.cc: Portability fix sql/log_event.cc: Portability fix sql/set_var.cc: Portability fix --- BitKeeper/etc/config | 4 ++-- client/mysqlbinlog.cc | 1 - include/my_base.h | 2 ++ sql/filesort.cc | 2 +- sql/ha_berkeley.cc | 4 ++-- sql/ha_berkeley.h | 3 ++- sql/ha_heap.cc | 6 +++--- sql/ha_innodb.cc | 9 +++++---- sql/ha_isam.cc | 3 ++- sql/handler.h | 2 +- sql/item_timefunc.cc | 2 +- sql/log_event.cc | 4 ++-- sql/set_var.cc | 4 ++-- sql/sql_repl.cc | 2 +- sql/sql_select.cc | 12 ++++++------ sql/sql_show.cc | 6 +++--- 16 files changed, 35 insertions(+), 31 deletions(-) diff --git a/BitKeeper/etc/config b/BitKeeper/etc/config index 85b5a871301..9df006ac7d5 100644 --- a/BitKeeper/etc/config +++ b/BitKeeper/etc/config @@ -42,7 +42,7 @@ single_host: # discovers a problem which requires local intervention. Please make the # contact information accurate so we can support you. # -contact: Sasha Pachev +contact: sys@mysql.com # # It is very important that this email address is filled out and accurate. # If someone converts your repository to open logging (which you may not @@ -51,7 +51,7 @@ contact: Sasha Pachev # response from anyone else at your location after 90 days, then open logging # will be implicitly approved. # -email: sasha@mysql.com +email: sys@mysql.com # # Add your street address if you like, it is optional. # diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 14778876868..4cf86eb31c7 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -210,7 +210,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), print_version(); exit(0); case '?': - default: usage(); exit(0); } diff --git a/include/my_base.h b/include/my_base.h index 7d7e296ead3..2450ab33425 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -300,8 +300,10 @@ enum data_file_type { /* For number of records */ #ifdef BIG_TABLES +#define rows2double(A) ulonglong2double(A) typedef my_off_t ha_rows; #else +#define rows2double(A) (double) (A) typedef ulong ha_rows; #endif diff --git a/sql/filesort.cc b/sql/filesort.cc index e42baf333a5..ad16c16db3e 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -230,7 +230,7 @@ ha_rows filesort(TABLE *table, SORT_FIELD *sortorder, uint s_length, if (error) my_error(ER_FILSORT_ABORT,MYF(ME_ERROR+ME_WAITTANG)); else - statistic_add(filesort_rows, records, &LOCK_status); + statistic_add(filesort_rows, (ulong) records, &LOCK_status); *examined_rows= param.examined_rows; #ifdef SKIP_DBUG_IN_FILESORT DBUG_POP(); /* Ok to DBUG */ diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index e34bfdea2dd..06acf4fa2e3 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -1929,7 +1929,7 @@ int ha_berkeley::delete_table(const char *name) double ha_berkeley::scan_time() { - return records/3; + return rows2double(records/3); } ha_rows ha_berkeley::records_in_range(int keynr, @@ -2204,7 +2204,7 @@ static BDB_SHARE *get_share(const char *table_name, TABLE *table) if (!(share=(BDB_SHARE*) hash_search(&bdb_open_tables, (byte*) table_name, length))) { - ha_rows *rec_per_key; + ulong *rec_per_key; char *tmp_name; DB **key_file; u_int32_t *key_type; diff --git a/sql/ha_berkeley.h b/sql/ha_berkeley.h index 198664d0c06..f2a81d123f1 100644 --- a/sql/ha_berkeley.h +++ b/sql/ha_berkeley.h @@ -27,7 +27,8 @@ typedef struct st_berkeley_share { ulonglong auto_ident; - ha_rows rows, org_rows, *rec_per_key; + ha_rows rows, org_rows; + ulong *rec_per_key; THR_LOCK lock; pthread_mutex_t mutex; char *table_name; diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index e6d7871b016..2edc3b1478e 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -88,9 +88,9 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) file=heap_open(name,mode, table->keys,keydef, table->reclength, - ((table->max_rows < max_rows && table->max_rows) ? - table->max_rows : max_rows), - table->min_rows); + (ulong) ((table->max_rows < max_rows && table->max_rows) ? + table->max_rows : max_rows), + (ulong) table->min_rows); my_free((gptr) keydef,MYF(0)); if (file) info(HA_STATUS_NO_LOCK | HA_STATUS_CONST | HA_STATUS_VARIABLE); diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 62ba435b1d2..d4e5d0e43cf 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3421,7 +3421,7 @@ ha_innobase::info( row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; dict_table_t* ib_table; dict_index_t* index; - ulong rec_per_key; + ha_rows rec_per_key; ulong j; ulong i; @@ -3482,7 +3482,7 @@ ha_innobase::info( rec_per_key = records; } else { - rec_per_key = (ulong)(records / + rec_per_key = (ha_rows)(records / index->stat_n_diff_key_vals[j + 1]); } @@ -3497,8 +3497,9 @@ ha_innobase::info( rec_per_key = 1; } - table->key_info[i].rec_per_key[j] - = rec_per_key; + table->key_info[i].rec_per_key[j]= + rec_per_key >= ~(ulong) 0 ? ~(ulong) 0 : + rec_per_key; } index = dict_table_get_next_index_noninline(index); diff --git a/sql/ha_isam.cc b/sql/ha_isam.cc index 052e6a4b9ec..6fa54d18aac 100644 --- a/sql/ha_isam.cc +++ b/sql/ha_isam.cc @@ -380,7 +380,8 @@ int ha_isam::create(const char *name, register TABLE *form, } recinfo_pos->base.type= (int) FIELD_LAST; /* End of fieldinfo */ error=nisam_create(fn_format(buff,name,"","",2+4+16),form->keys,keydef, - recinfo,form->max_rows,form->min_rows,0,0,0L); + recinfo,(ulong) form->max_rows, (ulong) form->min_rows, + 0, 0, 0L); my_free((gptr) recinfo,MYF(0)); DBUG_RETURN(error); diff --git a/sql/handler.h b/sql/handler.h index 6b0f6d35136..a018af29806 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -228,7 +228,7 @@ public: void change_table_ptr(TABLE *table_arg) { table=table_arg; } virtual double scan_time() { return ulonglong2double(data_file_length) / IO_SIZE + 1; } - virtual double read_time(ha_rows rows) { return rows; } + virtual double read_time(ha_rows rows) { return rows2double(rows); } virtual bool fast_key_read() { return 0;} virtual key_map keys_to_use_for_scanning() { return 0; } virtual bool has_transactions(){ return 0;} diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 558dd807d80..ccbba3777c4 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -192,7 +192,7 @@ longlong Item_func_week::val_int() TIME ltime; if (get_arg0_date(<ime,0)) return 0; - week_format= args[1]->val_int(); + week_format= (uint) args[1]->val_int(); return (longlong) calc_week(<ime, (week_format & 2) != 0, (week_format & 1) == 0, diff --git a/sql/log_event.cc b/sql/log_event.cc index 16020b680e0..373e50b84f7 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1969,8 +1969,8 @@ int Intvar_log_event::exec_event(struct st_relay_log_info* rli) int Rand_log_event::exec_event(struct st_relay_log_info* rli) { - thd->rand.seed1 = seed1; - thd->rand.seed2 = seed2; + thd->rand.seed1 = (ulong) seed1; + thd->rand.seed2 = (ulong) seed2; rli->inc_pending(get_event_len()); return 0; } diff --git a/sql/set_var.cc b/sql/set_var.cc index ce85a81594c..8e12f98b09b 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1049,13 +1049,13 @@ bool sys_var_slave_skip_counter::update(THD *thd, set_var *var) bool sys_var_rand_seed1::update(THD *thd, set_var *var) { - thd->rand.seed1=var->value->val_int(); + thd->rand.seed1= (ulong) var->value->val_int(); return 0; } bool sys_var_rand_seed2::update(THD *thd, set_var *var) { - thd->rand.seed2=var->value->val_int(); + thd->rand.seed2= (ulong) var->value->val_int(); return 0; } diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 003bb290b41..ee16b84f87e 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -940,7 +940,7 @@ int show_binlog_events(THD* thd) if (mysql_bin_log.is_open()) { LEX_MASTER_INFO *lex_mi = &thd->lex.mi; - uint event_count, limit_start, limit_end; + ha_rows event_count, limit_start, limit_end; my_off_t pos = lex_mi->pos; char search_file_name[FN_REFLEN], *name; const char *log_file_name = lex_mi->log_file_name; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 4969097b2c3..4f3ebd61774 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1751,7 +1751,7 @@ static void find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, double read_time) { - ulong rec; + ha_rows rec; double tmp; THD *thd= current_thd; @@ -2013,7 +2013,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, { // Check full join if (s->on_expr) { - tmp=s->found_records; // Can't use read cache + tmp=rows2double(s->found_records); // Can't use read cache } else { @@ -2032,11 +2032,11 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, will ensure that this will be used */ best=tmp; - records=s->found_records; + records= rows2double(s->found_records); best_key=0; } } - join->positions[idx].records_read=(double) records; + join->positions[idx].records_read= records; join->positions[idx].key=best_key; join->positions[idx].table= s; if (!best_key && idx == join->const_tables && @@ -2373,7 +2373,7 @@ bool store_val_in_field(Field *field,Item *item) { THD *thd=current_thd; - ulong cuted_fields=thd->cuted_fields; + ha_rows cuted_fields=thd->cuted_fields; thd->count_cuted_fields=1; item->save_in_field(field); thd->count_cuted_fields=0; @@ -2461,7 +2461,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) use_quick_range=1; tab->use_quick=1; tab->ref.key_parts=0; // Don't use ref key. - join->best_positions[i].records_read=tab->quick->records; + join->best_positions[i].records_read= rows2double(tab->quick->records); } COND *tmp=make_cond_for_table(cond,used_tables,current_map); diff --git a/sql/sql_show.cc b/sql/sql_show.cc index ef8fce455b1..8dfe5e9e948 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -659,7 +659,7 @@ mysqld_show_keys(THD *thd, TABLE_LIST *table_list) field_list.push_back(new Item_empty_string("Column_name",NAME_LEN)); field_list.push_back(item=new Item_empty_string("Collation",1)); item->maybe_null=1; - field_list.push_back(item=new Item_int("Cardinality",0,11)); + field_list.push_back(item=new Item_int("Cardinality",0,21)); item->maybe_null=1; field_list.push_back(item=new Item_int("Sub_part",0,3)); item->maybe_null=1; @@ -700,8 +700,8 @@ mysqld_show_keys(THD *thd, TABLE_LIST *table_list) KEY *key=table->key_info+i; if (key->rec_per_key[j]) { - ulong records=(table->file->records / key->rec_per_key[j]); - end=int10_to_str((long) records, buff, 10); + ha_rows records=(table->file->records / key->rec_per_key[j]); + end=longlong10_to_str((longlong) records, buff, 10); net_store_data(packet,convert,buff,(uint) (end-buff)); } else From e7bbe3aa0b2f9dda5f6883a3e1998377a9071db5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 16:07:29 +0400 Subject: [PATCH 135/246] New wildcmp() function in CHARSET_INFO structure --- include/m_ctype.h | 22 ++++-- strings/ctype-big5.c | 1 + strings/ctype-bin.c | 105 +++++++++++++++++++++++++++-- strings/ctype-czech.c | 1 + strings/ctype-euc_kr.c | 3 +- strings/ctype-gb2312.c | 3 +- strings/ctype-gbk.c | 1 + strings/ctype-latin1_de.c | 15 +++-- strings/ctype-mb.c | 138 ++++++++++++++++++++++++++++++++++++++ strings/ctype-simple.c | 95 +++++++++++++++++++++++++- strings/ctype-sjis.c | 1 + strings/ctype-tis620.c | 15 +++-- strings/ctype-ujis.c | 5 +- strings/ctype-utf8.c | 24 ++++--- strings/ctype-win1250ch.c | 3 +- strings/ctype.c | 30 ++++++++- 16 files changed, 420 insertions(+), 42 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index bee6e51c483..414bd86a412 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -83,19 +83,23 @@ typedef struct charset_info_st my_bool (*like_range)(struct charset_info_st *, const char *, uint, pchar, uint, char *, char *, uint *, uint *); - + int (*wildcmp)(struct charset_info_st *, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape,int w_one, int w_many); + /* Multibyte routines */ uint mbmaxlen; int (*ismbchar)(struct charset_info_st *, const char *, const char *); my_bool (*ismbhead)(struct charset_info_st *, uint); int (*mbcharlen)(struct charset_info_st *, uint); - + /* Unicode convertion */ int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc, const unsigned char *s,const unsigned char *e); int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc, unsigned char *s,unsigned char *e); - + /* Functions for case and sort convertion */ void (*caseup_str)(struct charset_info_st *, char *); void (*casedn_str)(struct charset_info_st *, char *); @@ -107,7 +111,7 @@ typedef struct charset_info_st int (*strcasecmp)(struct charset_info_st *, const char *, const char *); int (*strncasecmp)(struct charset_info_st *, const char *, const char *, uint); - + /* Hash calculation */ uint (*hash_caseup)(struct charset_info_st *cs, const byte *key, uint len); void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len, @@ -169,6 +173,11 @@ ulonglong my_strtoull_8bit(CHARSET_INFO *, const char *s, char **e, int base); double my_strtod_8bit(CHARSET_INFO *, const char *s, char **e); +int my_wildcmp_8bit(CHARSET_INFO *, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape, int w_one, int w_many); + #ifdef USE_MB /* Functions for multibyte charsets */ @@ -178,6 +187,10 @@ extern void my_caseup_mb(CHARSET_INFO *, char *, uint); extern void my_casedn_mb(CHARSET_INFO *, char *, uint); extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *); extern int my_strncasecmp_mb(CHARSET_INFO * cs,const char *, const char *t, uint); +int my_wildcmp_mb(CHARSET_INFO *, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape, int w_one, int w_many); #endif @@ -219,6 +232,7 @@ extern int my_strncasecmp_mb(CHARSET_INFO * cs,const char *, const char *t, uint #define my_strnncoll(s, a, b, c, d) ((s)->strnncoll((s), (a), (b), (c), (d))) #define my_like_range(s, a, b, c, d, e, f, g, h) \ ((s)->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h))) +#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->wildcmp,(s),(se),(w),(we),(e),(o),(m)) #define use_mb(s) ((s)->ismbchar != NULL) #define my_ismbchar(s, a, b) ((s)->ismbchar((s), (a), (b))) diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 0efa36d4a19..aae8da72c13 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -6232,6 +6232,7 @@ CHARSET_INFO my_charset_big5 = my_strnncoll_big5, my_strnxfrm_big5, my_like_range_big5, + my_wildcmp_mb, 2, /* mbmaxlen */ ismbchar_big5, ismbhead_big5, diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 9a22b3f36bf..f9f6d60e373 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -145,11 +145,101 @@ void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)), } +static int my_wildcmp_bin(CHARSET_INFO *cs, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape, int w_one, int w_many) +{ + int result= -1; // Not found, using wildcards + + while (wildstr != wildend) + { + while (*wildstr != w_many && *wildstr != w_one) + { + if (*wildstr == escape && wildstr+1 != wildend) + wildstr++; + if (str == str_end || *wildstr++ != *str++) + { + return(1); + } + if (wildstr == wildend) + { + return(str != str_end); // Match if both are at end + } + result=1; // Found an anchor char + } + if (*wildstr == w_one) + { + do + { + if (str == str_end) // Skip one char if possible + return(result); + str++; + } while (*++wildstr == w_one && wildstr != wildend); + if (wildstr == wildend) + break; + } + if (*wildstr == w_many) + { // Found w_many + char cmp; + + wildstr++; + /* Remove any '%' and '_' from the wild search string */ + for (; wildstr != wildend ; wildstr++) + { + if (*wildstr == w_many) + continue; + if (*wildstr == w_one) + { + if (str == str_end) + { + return(-1); + } + str++; + continue; + } + break; // Not a wild character + } + if (wildstr == wildend) + { + return(0); // Ok if w_many is last + } + if (str == str_end) + { + return(-1); + } + + if ((cmp= *wildstr) == escape && wildstr+1 != wildend) + cmp= *++wildstr; + wildstr++; // This is compared trough cmp + do + { + while (str != str_end && *str != cmp) + str++; + if (str++ == str_end) + { + return(-1); + } + { + int tmp=my_wildcmp_bin(cs,str,str_end,wildstr,wildend,escape,w_one,w_many); + if (tmp <= 0) + { + return(tmp); + } + } + } while (str != str_end && wildstr[0] != w_many); + return(-1); + } + } + return(str != str_end ? 1 : 0); +} + + static CHARSET_INFO my_charset_bin_st = { - 63, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT,/* state */ + 63, /* number */ + MY_CS_COMPILED|MY_CS_BINSORT,/* state */ "binary", /* name */ "", /* comment */ NULL, /* ctype */ @@ -161,7 +251,8 @@ static CHARSET_INFO my_charset_bin_st = 0, /* strxfrm_multiply */ my_strnncoll_binary, /* strnncoll */ NULL, /* strxnfrm */ - NULL, /* like_rabge */ + NULL, /* like_range */ + my_wildcmp_bin, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -178,7 +269,13 @@ static CHARSET_INFO my_charset_bin_st = my_hash_caseup_bin, /* hash_caseup */ my_hash_sort_bin, /* hash_sort */ 255, /* max_sort_char */ - my_snprintf_8bit /* snprintf */ + my_snprintf_8bit, /* snprintf */ + my_strtol_8bit, + my_strtoul_8bit, + my_strtoll_8bit, + my_strtoull_8bit, + my_strtod_8bit + }; diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 46ba1af13b2..4d5479bba0f 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -610,6 +610,7 @@ CHARSET_INFO my_charset_czech = my_strnncoll_czech, my_strnxfrm_czech, my_like_range_czech, + my_wildcmp_8bit, 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 4e5a0e3b525..4142b2d3941 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8649,7 +8649,8 @@ CHARSET_INFO my_charset_euc_kr = my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 2, /* mbmaxlen */ + my_wildcmp_mb, /* wildcmp */ + 2, /* mbmaxlen */ ismbchar_euc_kr, ismbhead_euc_kr, mbcharlen_euc_kr, diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index c7a34f73f46..6a54757ab4c 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -5699,7 +5699,8 @@ CHARSET_INFO my_charset_gb2312 = my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ - 2, /* mbmaxlen */ + my_wildcmp_mb, /* wildcmp */ + 2, /* mbmaxlen */ ismbchar_gb2312, ismbhead_gb2312, mbcharlen_gb2312, diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index 81a95eea026..c7264078d13 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -9887,6 +9887,7 @@ CHARSET_INFO my_charset_gbk = my_strnncoll_gbk, my_strnxfrm_gbk, my_like_range_gbk, + my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_gbk, ismbhead_gbk, diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index 65c66f8cca8..1fc395638a6 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -414,10 +414,10 @@ static my_bool my_like_range_latin1_de(CHARSET_INFO *cs __attribute__((unused)), CHARSET_INFO my_charset_latin1_de = { - 31, /* number */ - MY_CS_COMPILED, /* state */ - "latin1_de", /* name */ - "", /* comment */ + 31, /* number */ + MY_CS_COMPILED, /* state */ + "latin1_de", /* name */ + "", /* comment */ ctype_latin1_de, to_lower_latin1_de, to_upper_latin1_de, @@ -428,17 +428,18 @@ CHARSET_INFO my_charset_latin1_de = my_strnncoll_latin1_de, my_strnxfrm_latin1_de, my_like_range_latin1_de, + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - my_mb_wc_8bit, /* mb_wc */ - my_wc_mb_8bit, /* wc_mb */ + my_mb_wc_8bit, /* mb_wc */ + my_wc_mb_8bit, /* wc_mb */ my_caseup_str_8bit, my_casedn_str_8bit, my_caseup_8bit, my_casedn_8bit, - NULL, /* tosort */ + NULL, /* tosort */ my_strcasecmp_8bit, my_strncasecmp_8bit, my_hash_caseup_simple, diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index aa475e281d0..092b7aa4f0f 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -138,4 +138,142 @@ int my_strncasecmp_mb(CHARSET_INFO * cs, return 0; } + +/* +** Compare string against string with wildcard +** 0 if matched +** -1 if not matched with wildcard +** 1 if matched with wildcard +*/ + +#define INC_PTR(cs,A,B) A+=((use_mb_flag && \ + my_ismbchar(cs,A,B)) ? my_ismbchar(cs,A,B) : 1) + +#ifdef LIKE_CMP_TOUPPER +#define likeconv(s,A) (uchar) my_toupper(s,A) +#else +#define likeconv(s,A) (uchar) (s)->sort_order[(uchar) (A)] +#endif + +int my_wildcmp_mb(CHARSET_INFO *cs, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape, int w_one, int w_many) +{ + int result= -1; // Not found, using wildcards + + bool use_mb_flag=use_mb(cs); + + while (wildstr != wildend) + { + while (*wildstr != w_many && *wildstr != w_one) + { + int l; + if (*wildstr == escape && wildstr+1 != wildend) + wildstr++; + if (use_mb_flag && + (l = my_ismbchar(cs, wildstr, wildend))) + { + if (str+l > str_end || memcmp(str, wildstr, l) != 0) + return 1; + str += l; + wildstr += l; + } + else + if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) + return(1); // No match + if (wildstr == wildend) + return (str != str_end); // Match if both are at end + result=1; // Found an anchor char + } + if (*wildstr == w_one) + { + do + { + if (str == str_end) // Skip one char if possible + return (result); + INC_PTR(cs,str,str_end); + } while (++wildstr < wildend && *wildstr == w_one); + if (wildstr == wildend) + break; + } + if (*wildstr == w_many) + { // Found w_many + uchar cmp; + const char* mb = wildstr; + int mblen; + + wildstr++; + /* Remove any '%' and '_' from the wild search string */ + for (; wildstr != wildend ; wildstr++) + { + if (*wildstr == w_many) + continue; + if (*wildstr == w_one) + { + if (str == str_end) + return (-1); + INC_PTR(cs,str,str_end); + continue; + } + break; // Not a wild character + } + if (wildstr == wildend) + return(0); // Ok if w_many is last + if (str == str_end) + return -1; + + if ((cmp= *wildstr) == escape && wildstr+1 != wildend) + cmp= *++wildstr; + + mb=wildstr; + LINT_INIT(mblen); + if (use_mb_flag) + mblen = my_ismbchar(cs, wildstr, wildend); + INC_PTR(cs,wildstr,wildend); // This is compared trough cmp + cmp=likeconv(cs,cmp); + do + { + if (use_mb_flag) + { + for (;;) + { + if (str >= str_end) + return -1; + if (mblen) + { + if (str+mblen <= str_end && memcmp(str, mb, mblen) == 0) + { + str += mblen; + break; + } + } + else if (!my_ismbchar(cs, str, str_end) && + likeconv(cs,*str) == cmp) + { + str++; + break; + } + INC_PTR(cs,str, str_end); + } + } + else + { + while (str != str_end && likeconv(cs,*str) != cmp) + str++; + if (str++ == str_end) return (-1); + } + { + int tmp=my_wildcmp_mb(cs,str,str_end,wildstr,wildend,escape,w_one,w_many); + if (tmp <= 0) + return (tmp); + } + } while (str != str_end && wildstr[0] != w_many); + return(-1); + } + } + return (str != str_end ? 1 : 0); +} + + #endif diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 73978ffeeb5..9f8cc4e1aa9 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -18,7 +18,6 @@ #include "my_sys.h" #include "m_ctype.h" #include "m_string.h" -#include "dbug.h" #include "stdarg.h" #include "assert.h" @@ -274,3 +273,97 @@ double my_strtod_8bit(CHARSET_INFO *cs __attribute__((unused)), { return strtod(s,e); } + + +/* +** Compare string against string with wildcard +** 0 if matched +** -1 if not matched with wildcard +** 1 if matched with wildcard +*/ + +#ifdef LIKE_CMP_TOUPPER +#define likeconv(s,A) (uchar) my_toupper(s,A) +#else +#define likeconv(s,A) (uchar) (s)->sort_order[(uchar) (A)] +#endif + +#define INC_PTR(cs,A,B) A++ + + +int my_wildcmp_8bit(CHARSET_INFO *cs, + const char *str,const char *str_end, + const char *wildstr,const char *wildend, + int escape, int w_one, int w_many) +{ + int result= -1; // Not found, using wildcards + + while (wildstr != wildend) + { + while (*wildstr != w_many && *wildstr != w_one) + { + if (*wildstr == escape && wildstr+1 != wildend) + wildstr++; + + if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) + return(1); // No match + if (wildstr == wildend) + return (str != str_end); // Match if both are at end + result=1; // Found an anchor char + } + if (*wildstr == w_one) + { + do + { + if (str == str_end) // Skip one char if possible + return (result); + INC_PTR(cs,str,str_end); + } while (++wildstr < wildend && *wildstr == w_one); + if (wildstr == wildend) + break; + } + if (*wildstr == w_many) + { // Found w_many + uchar cmp; + + wildstr++; + /* Remove any '%' and '_' from the wild search string */ + for (; wildstr != wildend ; wildstr++) + { + if (*wildstr == w_many) + continue; + if (*wildstr == w_one) + { + if (str == str_end) + return (-1); + INC_PTR(cs,str,str_end); + continue; + } + break; // Not a wild character + } + if (wildstr == wildend) + return(0); // Ok if w_many is last + if (str == str_end) + return -1; + + if ((cmp= *wildstr) == escape && wildstr+1 != wildend) + cmp= *++wildstr; + + INC_PTR(cs,wildstr,wildend); // This is compared trough cmp + cmp=likeconv(cs,cmp); + do + { + while (str != str_end && likeconv(cs,*str) != cmp) + str++; + if (str++ == str_end) return (-1); + { + int tmp=my_wildcmp_8bit(cs,str,str_end,wildstr,wildend,escape,w_one,w_many); + if (tmp <= 0) + return (tmp); + } + } while (str != str_end && wildstr[0] != w_many); + return(-1); + } + } + return (str != str_end ? 1 : 0); +} diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 5d5beed0d44..b670c0a5f5d 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -4474,6 +4474,7 @@ CHARSET_INFO my_charset_sjis = my_strnncoll_sjis, my_strnxfrm_sjis, my_like_range_sjis, + my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_sjis, ismbhead_sjis, diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 04bf7107647..70f746c1605 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -688,10 +688,10 @@ void ThNormalize(uchar* ptr, uint field_length, const uchar* from, uint length) CHARSET_INFO my_charset_tis620 = { - 18, /* number */ - MY_CS_COMPILED, /* state */ - "tis620", /* name */ - "", /* comment */ + 18, /* number */ + MY_CS_COMPILED, /* state */ + "tis620", /* name */ + "", /* comment */ ctype_tis620, to_lower_tis620, to_upper_tis620, @@ -702,17 +702,18 @@ CHARSET_INFO my_charset_tis620 = my_strnncoll_tis620, my_strnxfrm_tis620, my_like_range_tis620, + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ NULL, /* mbcharlen */ - my_mb_wc_8bit, /* mb_wc */ - my_wc_mb_8bit, /* wc_mb */ + my_mb_wc_8bit, /* mb_wc */ + my_wc_mb_8bit, /* wc_mb */ my_caseup_str_8bit, my_casedn_str_8bit, my_caseup_8bit, my_casedn_8bit, - NULL, /* tosort */ + NULL, /* tosort */ my_strcasecmp_8bit, my_strncasecmp_8bit, my_hash_caseup_simple, diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 0eb82cc91dc..439db91294a 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8430,9 +8430,9 @@ my_wc_mb_euc_jp(CHARSET_INFO *c,my_wc_t wc, unsigned char *s, unsigned char *e) CHARSET_INFO my_charset_ujis = { 12, /* number */ - MY_CS_COMPILED, /* state */ + MY_CS_COMPILED, /* state */ "ujis", /* name */ - "", /* comment */ + "", /* comment */ ctype_ujis, to_lower_ujis, to_upper_ujis, @@ -8443,6 +8443,7 @@ CHARSET_INFO my_charset_ujis = NULL, /* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_mb, /* wildcmp */ 3, /* mbmaxlen */ ismbchar_ujis, ismbhead_ujis, diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 898cc72b65c..d561702fc6f 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1955,9 +1955,9 @@ static int my_mbcharlen_utf8(CHARSET_INFO *cs __attribute__((unused)) , uint c) CHARSET_INFO my_charset_utf8 = { 33, /* number */ - MY_CS_COMPILED, /* state */ + MY_CS_COMPILED, /* state */ "utf8", /* name */ - "", /* comment */ + "", /* comment */ ctype_utf8, /* ctype */ to_lower_utf8, /* to_lower */ to_upper_utf8, /* to_upper */ @@ -1968,6 +1968,7 @@ CHARSET_INFO my_charset_utf8 = my_strnncoll_utf8, /* strnncoll */ my_strnxfrm_utf8, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_mb, /* wildcmp */ 3, /* mbmaxlen */ my_ismbchar_utf8, /* ismbchar */ my_ismbhead_utf8, /* ismbhead */ @@ -1978,11 +1979,11 @@ CHARSET_INFO my_charset_utf8 = my_casedn_str_utf8, my_caseup_utf8, my_casedn_utf8, - NULL, /* tosort */ + NULL, /* tosort */ my_strcasecmp_utf8, my_strncasecmp_utf8, - my_hash_caseup_utf8,/* hash_caseup */ - my_hash_sort_utf8, /* hash_sort */ + my_hash_caseup_utf8,/* hash_caseup */ + my_hash_sort_utf8, /* hash_sort */ 0, my_snprintf_8bit, my_strtol_8bit, @@ -2372,7 +2373,7 @@ static int my_vsnprintf_ucs2(char *dst, uint n, const char* fmt, va_list ap) fmt++; /* Skip if max size is used (to be compatible with printf) */ - while (my_isdigit(system_charset_info,*fmt) || *fmt == '.' || *fmt == '-') + while ( (*fmt>='0' && *fmt<='9') || *fmt == '.' || *fmt == '-') fmt++; if (*fmt == 'l') @@ -2472,9 +2473,9 @@ double my_strtod_ucs2(CHARSET_INFO *cs __attribute__((unused)), CHARSET_INFO my_charset_ucs2 = { 35, /* number */ - MY_CS_COMPILED, /* state */ + MY_CS_COMPILED, /* state */ "ucs2", /* name */ - "", /* comment */ + "", /* comment */ ctype_ucs2, /* ctype */ to_lower_ucs2, /* to_lower */ to_upper_ucs2, /* to_upper */ @@ -2485,6 +2486,7 @@ CHARSET_INFO my_charset_ucs2 = my_strnncoll_ucs2, /* strnncoll */ my_strnxfrm_ucs2, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ my_ismbchar_ucs2, /* ismbchar */ my_ismbhead_ucs2, /* ismbhead */ @@ -2495,11 +2497,11 @@ CHARSET_INFO my_charset_ucs2 = my_casedn_str_ucs2, my_caseup_ucs2, my_casedn_ucs2, - NULL, /* tosort */ + NULL, /* tosort */ my_strcasecmp_ucs2, my_strncasecmp_ucs2, - my_hash_caseup_ucs2,/* hash_caseup */ - my_hash_sort_ucs2, /* hash_sort */ + my_hash_caseup_ucs2,/* hash_caseup */ + my_hash_sort_ucs2, /* hash_sort */ 0, my_snprintf_ucs2, my_strtol_ucs2, diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index 3ef5b426bb4..dbb8d0e1a2f 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -636,6 +636,7 @@ CHARSET_INFO my_charset_win1250ch = my_strnncoll_win1250ch, my_strnxfrm_win1250ch, my_like_range_win1250ch, + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -646,7 +647,7 @@ CHARSET_INFO my_charset_win1250ch = my_casedn_str_8bit, my_caseup_8bit, my_casedn_8bit, - NULL, /* tosort */ + NULL, /* tosort */ my_strcasecmp_8bit, my_strncasecmp_8bit, my_hash_caseup_simple, diff --git a/strings/ctype.c b/strings/ctype.c index 4c16c47ae07..02774140c8d 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -2823,6 +2823,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -2865,6 +2866,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -2906,6 +2908,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -2947,6 +2950,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -2989,6 +2993,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3030,6 +3035,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3071,6 +3077,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3112,6 +3119,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3154,6 +3162,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3195,6 +3204,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3236,6 +3246,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3277,6 +3288,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3318,6 +3330,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3359,6 +3372,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3400,6 +3414,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3442,6 +3457,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3483,6 +3499,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3525,6 +3542,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3567,6 +3585,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3608,6 +3627,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3649,6 +3669,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3690,6 +3711,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3731,6 +3753,7 @@ static CHARSET_INFO compiled_charsets[] = { my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ NULL, /* like_range */ + my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ NULL, /* ismbhead */ @@ -3768,9 +3791,10 @@ static CHARSET_INFO compiled_charsets[] = { NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ 0, - NULL, - NULL, - NULL, + NULL, /* strnncoll */ + NULL, /* strnxfrm */ + NULL, /* like_range */ + NULL, /* wildcmp */ 0, NULL, NULL, From 5a8c6a33c22ed68acdccbde0649420cd8a80ad9d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 16:47:48 +0400 Subject: [PATCH 136/246] removed unused function some bug fixes include/m_ctype.h: Macros bug fix mysys/charset.c: wildcmp was not initialized sql/mysql_priv.h: removed unused functions sql/slave.cc: removed unused function sql/sql_string.cc: removed unused functions --- include/m_ctype.h | 2 +- mysys/charset.c | 1 + sql/mysql_priv.h | 4 - sql/slave.cc | 5 +- sql/sql_string.cc | 245 ++-------------------------------------------- 5 files changed, 11 insertions(+), 246 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index 414bd86a412..7aa19d05639 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -232,7 +232,7 @@ int my_wildcmp_mb(CHARSET_INFO *, #define my_strnncoll(s, a, b, c, d) ((s)->strnncoll((s), (a), (b), (c), (d))) #define my_like_range(s, a, b, c, d, e, f, g, h) \ ((s)->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h))) -#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->wildcmp,(s),(se),(w),(we),(e),(o),(m)) +#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m))) #define use_mb(s) ((s)->ismbchar != NULL) #define my_ismbchar(s, a, b) ((s)->ismbchar((s), (a), (b))) diff --git a/mysys/charset.c b/mysys/charset.c index 6242b6a3866..e11c319ca28 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -376,6 +376,7 @@ static CHARSET_INFO *add_charset(CHARSET_INFO *cs, myf flags) sizeof(tmp_sort_order)); memcpy((char*) cs->tab_to_uni, (char*) tmp_to_uni, sizeof(tmp_to_uni)); + cs->wildcmp = my_wildcmp_8bit; cs->strnncoll = my_strnncoll_simple; cs->caseup_str = my_caseup_str_8bit; cs->casedn_str = my_casedn_str_8bit; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index a6771c9754d..c9b95963c32 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -817,10 +817,6 @@ bool check_column_name(const char *name); bool check_table_name(const char *name, uint length); char *get_field(MEM_ROOT *mem,TABLE *table,uint fieldnr); int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *wildstr); -int wild_compare(const char *str,const char *str_end, - const char *wildstr,const char *wildend,char escape); -int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *str_end, - const char *wildstr,const char *wildend,char escape); /* from hostname.cc */ struct in_addr; diff --git a/sql/slave.cc b/sql/slave.cc index a07fd7ac7d1..a9c1b15a982 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -638,9 +638,10 @@ static TABLE_RULE_ENT* find_wild(DYNAMIC_ARRAY *a, const char* key, int len) { TABLE_RULE_ENT* e ; get_dynamic(a, (gptr)&e, i); - if (!wild_case_compare(system_charset_info, key, key_end, + if (!my_wildcmp(system_charset_info, key, key_end, (const char*)e->db, - (const char*)(e->db + e->key_len),'\\')) + (const char*)(e->db + e->key_len), + '\\',wild_one,wild_many)) return e; } diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 403e8d3b1f7..e43ff1b3215 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -671,151 +671,6 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length) return to; } -/* Make it easier to handle different charactersets */ - -#ifdef USE_MB -#define INC_PTR(cs,A,B) A+=((use_mb_flag && \ - my_ismbchar(cs,A,B)) ? my_ismbchar(cs,A,B) : 1) -#else -#define INC_PTR(cs,A,B) A++ -#endif - -/* -** Compare string against string with wildcard -** 0 if matched -** -1 if not matched with wildcard -** 1 if matched with wildcard -*/ - -#ifdef LIKE_CMP_TOUPPER -#define likeconv(s,A) (uchar) my_toupper(s,A) -#else -#define likeconv(s,A) (uchar) (s)->sort_order[(uchar) (A)] -#endif - -int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *str_end, - const char *wildstr,const char *wildend, - char escape) -{ - int result= -1; // Not found, using wildcards -#ifdef USE_MB - bool use_mb_flag=use_mb(cs); -#endif - while (wildstr != wildend) - { - while (*wildstr != wild_many && *wildstr != wild_one) - { - if (*wildstr == escape && wildstr+1 != wildend) - wildstr++; -#ifdef USE_MB - int l; - if (use_mb_flag && - (l = my_ismbchar(cs, wildstr, wildend))) - { - if (str+l > str_end || memcmp(str, wildstr, l) != 0) - return 1; - str += l; - wildstr += l; - } - else -#endif - if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) - return(1); // No match - if (wildstr == wildend) - return (str != str_end); // Match if both are at end - result=1; // Found an anchor char - } - if (*wildstr == wild_one) - { - do - { - if (str == str_end) // Skip one char if possible - return (result); - INC_PTR(cs,str,str_end); - } while (++wildstr < wildend && *wildstr == wild_one); - if (wildstr == wildend) - break; - } - if (*wildstr == wild_many) - { // Found wild_many - wildstr++; - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ; wildstr++) - { - if (*wildstr == wild_many) - continue; - if (*wildstr == wild_one) - { - if (str == str_end) - return (-1); - INC_PTR(cs,str,str_end); - continue; - } - break; // Not a wild character - } - if (wildstr == wildend) - return(0); // Ok if wild_many is last - if (str == str_end) - return -1; - - uchar cmp; - if ((cmp= *wildstr) == escape && wildstr+1 != wildend) - cmp= *++wildstr; -#ifdef USE_MB - const char* mb = wildstr; - int mblen; - LINT_INIT(mblen); - if (use_mb_flag) - mblen = my_ismbchar(cs, wildstr, wildend); -#endif - INC_PTR(cs,wildstr,wildend); // This is compared trough cmp - cmp=likeconv(cs,cmp); - do - { -#ifdef USE_MB - if (use_mb_flag) - { - for (;;) - { - if (str >= str_end) - return -1; - if (mblen) - { - if (str+mblen <= str_end && memcmp(str, mb, mblen) == 0) - { - str += mblen; - break; - } - } - else if (!my_ismbchar(cs, str, str_end) && - likeconv(cs,*str) == cmp) - { - str++; - break; - } - INC_PTR(cs,str, str_end); - } - } - else - { -#endif /* USE_MB */ - while (str != str_end && likeconv(cs,*str) != cmp) - str++; - if (str++ == str_end) return (-1); -#ifdef USE_MB - } -#endif - { - int tmp=wild_case_compare(cs,str,str_end,wildstr,wildend,escape); - if (tmp <= 0) - return (tmp); - } - } while (str != str_end && wildstr[0] != wild_many); - return(-1); - } - } - return (str != str_end ? 1 : 0); -} int wild_case_compare(String &match,String &wild, char escape) @@ -823,100 +678,11 @@ int wild_case_compare(String &match,String &wild, char escape) DBUG_ENTER("wild_case_compare"); DBUG_PRINT("enter",("match='%s', wild='%s', escape='%c'" ,match.ptr(),wild.ptr(),escape)); - DBUG_RETURN(wild_case_compare(match.str_charset,match.ptr(),match.ptr()+match.length(), - wild.ptr(), wild.ptr()+wild.length(),escape)); + DBUG_RETURN(my_wildcmp(match.str_charset,match.ptr(),match.ptr()+match.length(), + wild.ptr(), wild.ptr()+wild.length(), + escape,wild_one,wild_many)); } -/* -** The following is used when using LIKE on binary strings -*/ - -int wild_compare(const char *str,const char *str_end, - const char *wildstr,const char *wildend,char escape) -{ - DBUG_ENTER("wild_compare"); - DBUG_PRINT("enter",("str='%s', str_end='%s', wildstr='%s', wildend='%s', escape='%c'" - ,str,str_end,wildstr,wildend,escape)); - int result= -1; // Not found, using wildcards - while (wildstr != wildend) - { - while (*wildstr != wild_many && *wildstr != wild_one) - { - if (*wildstr == escape && wildstr+1 != wildend) - wildstr++; - if (str == str_end || *wildstr++ != *str++) - { - DBUG_RETURN(1); - } - if (wildstr == wildend) - { - DBUG_RETURN(str != str_end); // Match if both are at end - } - result=1; // Found an anchor char - } - if (*wildstr == wild_one) - { - do - { - if (str == str_end) // Skip one char if possible - DBUG_RETURN(result); - str++; - } while (*++wildstr == wild_one && wildstr != wildend); - if (wildstr == wildend) - break; - } - if (*wildstr == wild_many) - { // Found wild_many - wildstr++; - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ; wildstr++) - { - if (*wildstr == wild_many) - continue; - if (*wildstr == wild_one) - { - if (str == str_end) - { - DBUG_RETURN(-1); - } - str++; - continue; - } - break; // Not a wild character - } - if (wildstr == wildend) - { - DBUG_RETURN(0); // Ok if wild_many is last - } - if (str == str_end) - { - DBUG_RETURN(-1); - } - char cmp; - if ((cmp= *wildstr) == escape && wildstr+1 != wildend) - cmp= *++wildstr; - wildstr++; // This is compared trough cmp - do - { - while (str != str_end && *str != cmp) - str++; - if (str++ == str_end) - { - DBUG_RETURN(-1); - } - { - int tmp=wild_compare(str,str_end,wildstr,wildend,escape); - if (tmp <= 0) - { - DBUG_RETURN(tmp); - } - } - } while (str != str_end && wildstr[0] != wild_many); - DBUG_RETURN(-1); - } - } - DBUG_RETURN(str != str_end ? 1 : 0); -} int wild_compare(String &match,String &wild, char escape) @@ -924,8 +690,9 @@ int wild_compare(String &match,String &wild, char escape) DBUG_ENTER("wild_compare"); DBUG_PRINT("enter",("match='%s', wild='%s', escape='%c'" ,match.ptr(),wild.ptr(),escape)); - DBUG_RETURN(wild_compare(match.ptr(),match.ptr()+match.length(), - wild.ptr(), wild.ptr()+wild.length(),escape)); + DBUG_RETURN(my_wildcmp(my_charset_bin,match.ptr(),match.ptr()+match.length(), + wild.ptr(), wild.ptr()+wild.length(), + escape,wild_one,wild_many)); } From fd5b16374c34d7487419a85b5d02f4edb82c07dc Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 17:25:34 +0400 Subject: [PATCH 137/246] wild_case_compate(&String, &String, escape) doesn't exist anymor --- sql/item_cmpfunc.cc | 8 ++++---- sql/sql_string.cc | 23 ----------------------- sql/sql_string.h | 4 ---- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 744ed1bceca..74eb5734ecf 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1313,10 +1313,10 @@ longlong Item_func_like::val_int() set_charset(my_charset_bin); if (canDoTurboBM) return turboBM_matches(res->ptr(), res->length()) ? 1 : 0; - if (binary()) - return wild_compare(*res,*res2,escape) ? 0 : 1; - else - return wild_case_compare(*res,*res2,escape) ? 0 : 1; + return my_wildcmp(charset(), + res->ptr(),res->ptr()+res->length(), + res2->ptr(),res2->ptr()+res2->length(), + escape,wild_one,wild_many) ? 0 : 1; } diff --git a/sql/sql_string.cc b/sql/sql_string.cc index e43ff1b3215..5083fb13105 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -673,26 +673,3 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length) -int wild_case_compare(String &match,String &wild, char escape) -{ - DBUG_ENTER("wild_case_compare"); - DBUG_PRINT("enter",("match='%s', wild='%s', escape='%c'" - ,match.ptr(),wild.ptr(),escape)); - DBUG_RETURN(my_wildcmp(match.str_charset,match.ptr(),match.ptr()+match.length(), - wild.ptr(), wild.ptr()+wild.length(), - escape,wild_one,wild_many)); -} - - - -int wild_compare(String &match,String &wild, char escape) -{ - DBUG_ENTER("wild_compare"); - DBUG_PRINT("enter",("match='%s', wild='%s', escape='%c'" - ,match.ptr(),wild.ptr(),escape)); - DBUG_RETURN(my_wildcmp(my_charset_bin,match.ptr(),match.ptr()+match.length(), - wild.ptr(), wild.ptr()+wild.length(), - escape,wild_one,wild_many)); -} - - diff --git a/sql/sql_string.h b/sql/sql_string.h index d9dce95e0a2..42f9e446981 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -28,8 +28,6 @@ class String; int sortcmp(const String *a,const String *b); int stringcmp(const String *a,const String *b); String *copy_if_not_alloced(String *a,String *b,uint32 arg_length); -int wild_case_compare(String &match,String &wild,char escape); -int wild_compare(String &match,String &wild,char escape); class String { @@ -208,8 +206,6 @@ public: friend int sortcmp(const String *a,const String *b); friend int stringcmp(const String *a,const String *b); friend String *copy_if_not_alloced(String *a,String *b,uint32 arg_length); - friend int wild_case_compare(String &match,String &wild,char escape); - friend int wild_compare(String &match,String &wild,char escape); uint32 numchars(); int charpos(int i,uint32 offset=0); From 64dd949c419898111c673eed4efadf32acd3e435 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 00:16:30 +0500 Subject: [PATCH 138/246] Add shared memory protocol and option --protocol client/client_priv.h: Add OPT_MYSQL_PROTOCOL and OPT_SHARED_MEMORY_BASE_NAME include/config-win.h: Add shared memory protocol include/errmsg.h: Add error codes of shared memory protocol include/my_sys.h: Delete TYPELIB, moved to typelib.h include/mysql.h: Add shared memory protocol include/violite.h: Add shared memory protocol libmysql/errmsg.c: Add texts of errors of shared memory protocol sql/mysqld.cc: Add shared memory protocol and option --shared-memory, correct option --named-pipe sql/set_var.cc: Add shared memory protocol variables vio/vio.c: Add shared memory protocol vio/viosocket.c: Add shared memory protocol BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted --- BitKeeper/etc/logging_ok | 1 + client/client_priv.h | 3 +- client/mysql.cc | 32 +++- client/mysqladmin.c | 33 +++- client/mysqlcheck.c | 31 +++- client/mysqldump.c | 31 +++- client/mysqlimport.c | 32 +++- client/mysqlshow.c | 32 +++- include/config-win.h | 5 + include/errmsg.h | 12 ++ include/my_sys.h | 11 +- include/mysql.h | 31 ++-- include/typelib.h | 33 ++++ include/violite.h | 27 +++- libmysql/errmsg.c | 33 ++++ libmysql/libmysql.c | 334 ++++++++++++++++++++++++++++++++++----- sql/mysqld.cc | 266 ++++++++++++++++++++++++++++++- sql/set_var.cc | 4 + vio/vio.c | 78 ++++++++- vio/viosocket.c | 184 +++++++++++++++++---- 20 files changed, 1112 insertions(+), 101 deletions(-) create mode 100644 include/typelib.h diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index aec1275d516..8134a08ea5e 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -90,6 +90,7 @@ venu@myvenu.com venu@work.mysql.com vva@genie.(none) walrus@mysql.com +wax@mysql.com worm@altair.is.lan zak@balfor.local zak@linux.local diff --git a/client/client_priv.h b/client/client_priv.h index acf9455bf9c..1d17165f2b4 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -37,4 +37,5 @@ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, OPT_SELECT_LIMIT, OPT_MAX_JOIN_SIZE, OPT_SSL_SSL, OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE, - OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION }; + OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL, + OPT_SHARED_MEMORY_BASE_NAME }; diff --git a/client/mysql.cc b/client/mysql.cc index e4a481a5290..241f4cf7ecc 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -152,6 +152,11 @@ static FILE *PAGER, *OUTFILE; static MEM_ROOT hash_mem_root; static uint prompt_counter; +#ifdef HAVE_SMEM +static char *shared_memory_base_name=0; +#endif +static uint opt_protocol=0; + #include "sslopt-vars.h" #ifndef DBUG_OFF @@ -425,6 +430,9 @@ sig_handler mysql_end(int sig) my_free(full_username,MYF(MY_ALLOW_ZERO_PTR)); my_free(part_username,MYF(MY_ALLOW_ZERO_PTR)); my_free(default_prompt,MYF(MY_ALLOW_ZERO_PTR)); +#ifdef HAVE_SMEM + my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); +#endif my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR)); mysql_server_end(); free_defaults(defaults_argv); @@ -532,6 +540,8 @@ static struct my_option my_long_options[] = {"prompt", OPT_PROMPT, "Set the mysql prompt to this value.", (gptr*) ¤t_prompt, (gptr*) ¤t_prompt, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"quick", 'q', "Don't cache result, print it row by row. This may slow down the server if the output is suspended. Doesn't use history file. ", (gptr*) &quick, (gptr*) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -540,6 +550,11 @@ static struct my_option my_long_options[] = 0, 0, 0}, {"silent", 's', "Be more silent.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef HAVE_SMEM + {"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME, + "Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, + 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"socket", 'S', "Socket file to use for connection.", (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -644,6 +659,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case OPT_NOPAGER: printf("WARNING: option deprecated; use --disable-pager instead.\n"); opt_nopager= 1; + case OPT_MYSQL_PROTOCOL: + { + if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + { + fprintf(stderr, "Unknown option to protocol: %s\n", argument); + exit(1); + } + break; + } break; case 'A': rehash= 0; @@ -706,7 +730,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case 'W': #ifdef __WIN__ - opt_mysql_unix_port= my_strdup(MYSQL_NAMEDPIPE, MYF(0)); + opt_protocol = MYSQL_PROTOCOL_PIPE; #endif break; #include @@ -2349,6 +2373,12 @@ sql_real_connect(char *host,char *database,char *user,char *password, if (opt_use_ssl) mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); +#endif + if (opt_protocol) + mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); +#ifdef HAVE_SMEM + if (shared_memory_base_name) + mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); #endif if (safe_updates) { diff --git a/client/mysqladmin.c b/client/mysqladmin.c index 00af8c592ec..289204a6d33 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -23,6 +23,7 @@ #include /* because of signal() */ #endif #include +#include #define ADMIN_VERSION "8.38" #define MAX_MYSQL_VAR 128 @@ -42,6 +43,11 @@ static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations, static ulong opt_connect_timeout, opt_shutdown_timeout; static my_string unix_port=0; +#ifdef HAVE_SMEM +static char *shared_memory_base_name=0; +#endif +static uint opt_protocol=0; + /* When using extended-status relatively, ex_val_max_len is the estimated maximum length for any relative value printed by extended-status. The @@ -135,6 +141,8 @@ static struct my_option my_long_options[] = #endif {"port", 'P', "Port number to use for connection.", (gptr*) &tcp_port, (gptr*) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"relative", 'r', "Show difference between current and previous values when used with -i. Currently works only with extended-status.", (gptr*) &opt_relative, (gptr*) &opt_relative, 0, GET_BOOL, NO_ARG, 0, 0, 0, @@ -142,6 +150,11 @@ static struct my_option my_long_options[] = {"set-variable", 'O', "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef HAVE_SMEM + {"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME, + "Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, + 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"silent", 's', "Silently exit if one can't connect to server", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"socket", 'S', "Socket file to use for connection.", @@ -205,7 +218,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case 'W': #ifdef __WIN__ - unix_port=MYSQL_NAMEDPIPE; + opt_protocol = MYSQL_PROTOCOL_PIPE; #endif break; case '#': @@ -234,6 +247,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), charsets_dir = argument; #endif break; + case OPT_MYSQL_PROTOCOL: + { + if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + { + fprintf(stderr, "Unknown option to protocol: %s\n", argument); + exit(1); + } + break; + } } if (error) { @@ -284,6 +306,12 @@ int main(int argc,char *argv[]) mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); #endif + if (opt_protocol) + mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); +#ifdef HAVE_SMEM + if (shared_memory_base_name) + mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); +#endif if (sql_connect(&mysql, option_wait)) error = 1; else @@ -326,6 +354,9 @@ int main(int argc,char *argv[]) } my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); my_free(user,MYF(MY_ALLOW_ZERO_PTR)); +#ifdef HAVE_SMEM + my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); +#endif free_defaults(save_argv); my_end(0); exit(error ? 1 : 0); diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 24b67a60255..6b56603946a 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -41,6 +41,10 @@ static char *opt_password = 0, *current_user = 0, *default_charset = 0, *current_host = 0; static int first_error = 0; DYNAMIC_ARRAY tables4repair; +#ifdef HAVE_SMEM +static char *shared_memory_base_name=0; +#endif +static uint opt_protocol=0; enum operations {DO_CHECK, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE}; @@ -109,6 +113,8 @@ static struct my_option my_long_options[] = {"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0}, + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"quick", 'q', "If you are using this option with CHECK TABLE, it prevents the check from scanning the rows to check for wrong links. This is the fastest check. If you are using this option with REPAIR TABLE, it will try to repair only the index tree. This is the fastest repair method for a table.", (gptr*) &opt_quick, (gptr*) &opt_quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, @@ -116,6 +122,11 @@ static struct my_option my_long_options[] = {"repair", 'r', "Can fix almost anything except unique keys that aren't unique.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef HAVE_SMEM + {"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME, + "Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, + 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"silent", 's', "Print only error messages.", (gptr*) &opt_silent, (gptr*) &opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"socket", 'S', "Socket file to use for connection.", @@ -233,7 +244,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case 'W': #ifdef __WIN__ - opt_mysql_unix_port = MYSQL_NAMEDPIPE; + opt_protocol = MYSQL_PROTOCOL_PIPE; #endif break; case '#': @@ -247,6 +258,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), verbose++; break; case 'V': print_version(); exit(0); + case OPT_MYSQL_PROTOCOL: + { + if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + { + fprintf(stderr, "Unknown option to protocol: %s\n", argument); + exit(1); + } + break; + } } return 0; } @@ -533,6 +553,12 @@ static int dbConnect(char *host, char *user, char *passwd) if (opt_use_ssl) mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); +#endif + if (opt_protocol) + mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); +#ifdef HAVE_SMEM + if (shared_memory_base_name) + mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); #endif if (!(sock = mysql_real_connect(&mysql_connection, host, user, passwd, NULL, opt_mysql_port, opt_mysql_unix_port, 0))) @@ -621,6 +647,9 @@ int main(int argc, char **argv) if (opt_auto_repair) delete_dynamic(&tables4repair); my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR)); +#ifdef HAVE_SMEM + my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); +#endif my_end(0); return(first_error!=0); } /* main */ diff --git a/client/mysqldump.c b/client/mysqldump.c index c99f1429a8b..4333058fad7 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -90,6 +90,10 @@ extern ulong net_buffer_length; static DYNAMIC_STRING extended_row; #include FILE *md_result_file; +#ifdef HAVE_SMEM +static char *shared_memory_base_name=0; +#endif +static uint opt_protocol=0; static struct my_option my_long_options[] = { @@ -200,6 +204,8 @@ static struct my_option my_long_options[] = {"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0}, + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"quick", 'q', "Don't buffer query, dump directly to stdout.", (gptr*) &quick, (gptr*) &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"quote-names",'Q', "Quote table and column names with a `", @@ -208,6 +214,11 @@ static struct my_option my_long_options[] = {"result-file", 'r', "Direct output to a given file. This option should be used in MSDOS, because it prevents new line '\\n' from being converted to '\\r\\n' (carriage return + line feed).", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef HAVE_SMEM + {"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME, + "Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, + 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"socket", 'S', "Socket file to use for connection.", (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -338,7 +349,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case 'W': #ifdef __WIN__ - opt_mysql_unix_port=MYSQL_NAMEDPIPE; + opt_protocol = MYSQL_PROTOCOL_PIPE; #endif break; case 'T': @@ -365,6 +376,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case (int) OPT_TABLES: opt_databases=0; break; + case OPT_MYSQL_PROTOCOL: + { + if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + { + fprintf(stderr, "Unknown option to protocol: %s\n", argument); + exit(1); + } + break; + } } return 0; } @@ -473,6 +493,12 @@ static int dbConnect(char *host, char *user,char *passwd) if (opt_use_ssl) mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); +#endif + if (opt_protocol) + mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); +#ifdef HAVE_SMEM + if (shared_memory_base_name) + mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); #endif if (!(sock= mysql_real_connect(&mysql_connection,host,user,passwd, NULL,opt_mysql_port,opt_mysql_unix_port, @@ -1471,6 +1497,9 @@ int main(int argc, char **argv) MYF(0), mysql_error(sock)); } else if (opt_single_transaction) /* Just to make it beautiful enough */ +#ifdef HAVE_SMEM + my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); +#endif { /* In case we were locking all tables, we did not start transaction diff --git a/client/mysqlimport.c b/client/mysqlimport.c index a11b7383517..2de4a9b81b5 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -49,6 +49,11 @@ static my_string opt_mysql_unix_port=0; static my_string opt_ignore_lines=0; #include +#ifdef HAVE_SMEM +static char *shared_memory_base_name=0; +#endif +static uint opt_protocol=0; + static struct my_option my_long_options[] = { {"character-sets-dir", OPT_CHARSETS_DIR, @@ -112,8 +117,15 @@ static struct my_option my_long_options[] = {"port", 'P', "Port number to use for connection.", (gptr*) &opt_mysql_port, (gptr*) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0}, + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"replace", 'r', "If duplicate unique key was found, replace old row.", (gptr*) &replace, (gptr*) &replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef HAVE_SMEM + {"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME, + "Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, + 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"silent", 's', "Be more silent.", (gptr*) &silent, (gptr*) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"socket", 'S', "Socket file to use for connection.", @@ -181,10 +193,19 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; #ifdef __WIN__ case 'W': - opt_mysql_unix_port=MYSQL_NAMEDPIPE; + opt_protocol = MYSQL_PROTOCOL_PIPE; opt_local_file=1; break; #endif + case OPT_MYSQL_PROTOCOL: + { + if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + { + fprintf(stderr, "Unknown option to protocol: %s\n", argument); + exit(1); + } + break; + } case '#': DBUG_PUSH(argument ? argument : "d:t:o"); break; @@ -351,6 +372,12 @@ static MYSQL *db_connect(char *host, char *database, char *user, char *passwd) if (opt_use_ssl) mysql_ssl_set(&mysql_connection, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); +#endif + if (opt_protocol) + mysql_options(&mysql_connection,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); +#ifdef HAVE_SMEM + if (shared_memory_base_name) + mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); #endif if (!(sock= mysql_real_connect(&mysql_connection,host,user,passwd, database,opt_mysql_port,opt_mysql_unix_port, @@ -486,6 +513,9 @@ int main(int argc, char **argv) exitcode = error; db_disconnect(current_host, sock); my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); +#ifdef HAVE_SMEM + my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); +#endif free_defaults(argv_to_free); my_end(0); return(exitcode); diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 5475fc7b531..dc1d37b98f6 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -31,6 +31,11 @@ static my_string host=0,opt_password=0,user=0; static my_bool opt_show_keys=0,opt_compress=0,opt_status=0, tty_password=0; static uint opt_verbose=0; +#ifdef HAVE_SMEM +static char *shared_memory_base_name=0; +#endif +static uint opt_protocol=0; + static void get_options(int *argc,char ***argv); static uint opt_mysql_port=0; static int list_dbs(MYSQL *mysql,const char *wild); @@ -86,6 +91,12 @@ int main(int argc, char **argv) if (opt_use_ssl) mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); +#endif + if (opt_protocol) + mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); +#ifdef HAVE_SMEM + if (shared_memory_base_name) + mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); #endif if (!(mysql_real_connect(&mysql,host,user,opt_password, argv[0],opt_mysql_port,opt_mysql_unix_port, @@ -114,6 +125,9 @@ int main(int argc, char **argv) mysql_close(&mysql); /* Close & free connection */ if (opt_password) my_free(opt_password,MYF(0)); +#ifdef HAVE_SMEM + my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); +#endif my_end(0); exit(error ? 1 : 0); return 0; /* No compiler warnings */ @@ -147,6 +161,13 @@ static struct my_option my_long_options[] = #ifdef __WIN__ {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, +#endif + {"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory)", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef HAVE_SMEM + {"shared_memory_base_name", OPT_SHARED_MEMORY_BASE_NAME, + "Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, + 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #endif {"socket", 'S', "Socket file to use for connection.", (gptr*) &opt_mysql_unix_port, (gptr*) &opt_mysql_unix_port, 0, GET_STR, @@ -213,9 +234,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case 'W': #ifdef __WIN__ - opt_mysql_unix_port=MYSQL_NAMEDPIPE; + opt_protocol = MYSQL_PROTOCOL_PIPE; #endif break; + case OPT_MYSQL_PROTOCOL: + { + if ((opt_protocol = find_type(argument, &sql_protocol_typelib,0)) == ~(ulong) 0) + { + fprintf(stderr, "Unknown option to protocol: %s\n", argument); + exit(1); + } + break; + } case '#': DBUG_PUSH(argument ? argument : "d:t:o"); break; diff --git a/include/config-win.h b/include/config-win.h index 5bdede86a9e..9c1c1ae4830 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -23,6 +23,8 @@ #include #include +#define HAVE_SMEM 1 + #if defined(__NT__) #define SYSTEM_TYPE "NT" #elif defined(__WIN2000__) @@ -311,3 +313,6 @@ inline double ulonglong2double(ulonglong value) #define statistic_add(V,C,L) (V)+=(C) #endif #define statistic_increment(V,L) thread_safe_increment((V),(L)) + +#define shared_memory_buffer_length 16000 +#define default_shared_memory_base_name "MYSQL"; diff --git a/include/errmsg.h b/include/errmsg.h index d97522f0972..5ac5ef9a4a7 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -72,3 +72,15 @@ extern const char *client_errors[]; /* Error messages */ #define CR_INVALID_PARAMETER_NO 2032 #define CR_INVALID_BUFFER_USE 2033 #define CR_UNSUPPORTED_PARAM_TYPE 2034 + +#define CR_SHARED_MEMORY_CONNECTION 2035 +#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2036 +#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2037 +#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2038 +#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2039 +#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2040 +#define CR_SHARED_MEMORY_MAP_ERROR 2041 +#define CR_SHARED_MEMORY_EVENT_ERROR 2042 +#define CR_SHARED_MEMORY_CONNECT_ABANDODED_ERROR 2043 +#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046 +#define CR_CONN_UNKNOW_PROTOCOL 2048 diff --git a/include/my_sys.h b/include/my_sys.h index f1b4841adb3..ab5dedc0ba1 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -37,6 +37,7 @@ extern int NEAR my_errno; /* Last error in mysys */ #endif #include +#include #define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; } #define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;} @@ -247,12 +248,6 @@ typedef struct wild_file_pack /* Struct to hold info when selecting files */ my_string *wild; /* Pointer to wildcards */ } WF_PACK; -typedef struct st_typelib { /* Different types saved here */ - uint count; /* How many types */ - const char *name; /* Name of typelib */ - const char **type_names; -} TYPELIB; - enum cache_type { READ_CACHE,WRITE_CACHE, @@ -558,6 +553,7 @@ extern char *_my_strdup_with_length(const byte *from, uint length, const char *sFile, uint uLine, myf MyFlag); + #ifndef TERMINATE extern void TERMINATE(FILE *file); #endif @@ -706,9 +702,6 @@ extern void freeze_size(DYNAMIC_ARRAY *array); #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index)) #define push_dynamic(A,B) insert_dynamic(A,B) -extern int find_type(my_string x,TYPELIB *typelib,uint full_name); -extern void make_type(my_string to,uint nr,TYPELIB *typelib); -extern const char *get_type(TYPELIB *typelib,uint nr); extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str, uint init_alloc,uint alloc_increment); extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append); diff --git a/include/mysql.h b/include/mysql.h index 710f5006724..ad369988084 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -56,6 +56,7 @@ typedef int my_socket; #include "mysql_com.h" #include "mysql_version.h" +#include "typelib.h" extern unsigned int mysql_port; extern char *mysql_unix_port; @@ -137,24 +138,36 @@ struct st_mysql_options { a read that is replication-aware */ my_bool no_master_reads; + char *shared_memory_base_name; + unsigned int protocol; }; -enum mysql_option { MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, - MYSQL_OPT_NAMED_PIPE, MYSQL_INIT_COMMAND, - MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, - MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, - MYSQL_OPT_LOCAL_INFILE}; +enum mysql_option +{ + MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE, MYSQL_INIT_COMMAND, + MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, + MYSQL_OPT_LOCAL_INFILE, MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME +}; -enum mysql_status { MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT, - MYSQL_STATUS_USE_RESULT}; +enum mysql_status +{ + MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT +}; +enum mysql_protocol_type +{ + MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, MYSQL_PROTOCOL_PIPE, + MYSQL_PROTOCOL_MEMORY +}; /* There are three types of queries - the ones that have to go to the master, the ones that go to a slave, and the adminstrative type which must happen on the pivot connectioin */ -enum mysql_rpl_type { MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, - MYSQL_RPL_ADMIN }; +enum mysql_rpl_type +{ + MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN +}; typedef struct st_mysql diff --git a/include/typelib.h b/include/typelib.h new file mode 100644 index 00000000000..8de94aba553 --- /dev/null +++ b/include/typelib.h @@ -0,0 +1,33 @@ +/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#ifndef _typelib_h +#define _typelib_h + +typedef struct st_typelib { /* Different types saved here */ + uint count; /* How many types */ + const char *name; /* Name of typelib */ + const char **type_names; +} TYPELIB; + +extern int find_type(char *x,TYPELIB *typelib,uint full_name); +extern void make_type(char *to,uint nr,TYPELIB *typelib); +extern const char *get_type(TYPELIB *typelib,uint nr); + +extern TYPELIB sql_protocol_typelib; + +#endif /* _typelib_h */ diff --git a/include/violite.h b/include/violite.h index f4f40dcb64b..d73328b72be 100644 --- a/include/violite.h +++ b/include/violite.h @@ -32,7 +32,7 @@ extern "C" { #endif /* __cplusplus */ enum enum_vio_type { VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, - VIO_TYPE_NAMEDPIPE, VIO_TYPE_SSL}; + VIO_TYPE_NAMEDPIPE, VIO_TYPE_SSL,VIO_TYPE_SHARED_MEMORY}; #ifndef __WIN__ #define HANDLE void * @@ -41,6 +41,9 @@ enum enum_vio_type { VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, Vio* vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost); #ifdef __WIN__ Vio* vio_new_win32pipe(HANDLE hPipe); +Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map, HANDLE handle_map, + HANDLE event_server_wrote, HANDLE event_server_read, + HANDLE event_client_wrote, HANDLE event_client_read); #endif void vio_delete(Vio* vio); @@ -107,6 +110,17 @@ my_bool vio_poll_read(Vio *vio,uint timeout); } #endif +#ifdef HAVE_SMEM +int vio_read_shared_memory(Vio *vio, gptr buf, int size); +int vio_write_shared_memory(Vio *vio, const gptr buf, int size); +int vio_close_shared_memory(Vio * vio); +#endif +#ifdef __WIN__ +int vio_read_pipe(Vio *vio, gptr buf, int size); +int vio_write_pipe(Vio *vio, const gptr buf, int size); +int vio_close_pipe(Vio * vio); +#endif + #if defined(HAVE_VIO) && !defined(DONT_MAP_VIO) #define vio_delete(vio) (vio)->viodelete(vio) #define vio_errno(vio) (vio)->vioerrno(vio) @@ -233,6 +247,17 @@ struct st_vio SSL* ssl_; my_bool open_; #endif /* HAVE_OPENSSL */ +#ifdef HAVE_SMEM + HANDLE handle_file_map; + char *handle_map; + HANDLE event_server_wrote; + HANDLE event_server_read; + HANDLE event_client_wrote; + HANDLE event_client_read; + long shared_memory_remain; + char *shared_memory_pos; + NET *net; +#endif /* HAVE_SMEM */ #endif /* HAVE_VIO */ }; #endif /* EMBEDDED_LIBRARY */ diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c index 581bb184ff3..0945aed6772 100644 --- a/libmysql/errmsg.c +++ b/libmysql/errmsg.c @@ -59,6 +59,17 @@ const char *client_errors[]= "Invalid parameter number", "Can't send long data for non string or binary data types (parameter: %d)", "Using not supported parameter type: %d (parameter: %d)" + "Shared memory (%lu)", + "Can't open shared memory. Request event don't create (%lu)", + "Can't open shared memory. Answer event don't create (%lu)", + "Can't open shared memory. File mapping don't create (%lu)", + "Can't open shared memory. Map of memory don't create (%lu)", + "Can't open shared memory. File mapping don't create for client (%lu)", + "Can't open shared memory. Map of memory don't create for client (%lu)", + "Can't open shared memory. %s event don't create for client (%lu)", + "Can't open shared memory. Server abandoded and don't sent the answer event (%lu)", + "Can't open shared memory. Can't send the request event to server (%lu)" + "Wrong or unknow protocol" }; /* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */ @@ -101,6 +112,17 @@ const char *client_errors[]= "Invalid parameter number", "Can't send long data for non string or binary data types (parameter: %d)", "Using not supported parameter type: %d (parameter: %d)" + "Shared memory (%lu)", + "Can't open shared memory. Request event don't create (%lu)", + "Can't open shared memory. Answer event don't create (%lu)", + "Can't open shared memory. File mapping don't create (%lu)", + "Can't open shared memory. Map of memory don't create (%lu)", + "Can't open shared memory. File mapping don't create for client (%lu)", + "Can't open shared memory. Map of memory don't create for client (%lu)", + "Can't open shared memory. %s event don't create for client (%lu)", + "Can't open shared memory. Server abandoded and don't sent the answer event (%lu)", + "Can't open shared memory. Can't send the request event to server (%lu)" + "Wrong or unknow protocol" }; #else /* ENGLISH */ @@ -141,6 +163,17 @@ const char *client_errors[]= "Invalid parameter number", "Can't send long data for non string or binary data types (parameter: %d)", "Using not supported parameter type: %d (parameter: %d)" + "Shared memory (%lu)", + "Can't open shared memory. Request event don't create (%lu)", + "Can't open shared memory. Answer event don't create (%lu)", + "Can't open shared memory. File mapping don't create (%lu)", + "Can't open shared memory. Map of memory don't create (%lu)", + "Can't open shared memory. File mapping don't create for client (%lu)", + "Can't open shared memory. Map of memory don't create for client (%lu)", + "Can't open shared memory. %s event don't create for client (%lu)", + "Can't open shared memory. Server abandoded and don't sent the answer event (%lu)", + "Can't open shared memory. Can't send the request event to server (%lu)" + "Wrong or unknow protocol" }; #endif diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index f164582889e..0bb6b54bee5 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -84,6 +84,15 @@ ulong net_write_timeout= NET_WRITE_TIMEOUT; #define SOCKET_ERROR -1 #endif /* __WIN__ */ +#ifdef HAVE_SMEM +char *shared_memory_base_name=0; +const char *def_shared_memory_base_name=default_shared_memory_base_name; +#endif + +const char *sql_protocol_names_lib[] = +{ "TCP", "SOCKET", "PIPE", "MEMORY",NullS }; +TYPELIB sql_protocol_typelib = {array_elements(sql_protocol_names_lib)-1,"", + sql_protocol_names_lib}; /* If allowed through some configuration, then this needs to be changed @@ -336,6 +345,190 @@ HANDLE create_named_pipe(NET *net, uint connect_timeout, char **arg_host, } #endif +/* + Create new shared memory connection, return handler of connection + + SYNOPSIS + create_shared_memory() + mysql Pointer of mysql structure + net Pointer of net structure + connect_timeout Timeout of connection +*/ +#ifdef HAVE_SMEM +HANDLE create_shared_memory(MYSQL *mysql,NET *net, uint connect_timeout) +{ + ulong smem_buffer_length = shared_memory_buffer_length + 4; +/* + event_connect_request is event object for start connection actions + event_connect_answer is event object for confirm, that server put data + handle_connect_file_map is file-mapping object, use for create shared memory + handle_connect_map is pointer on shared memory + handle_map is pointer on shared memory for client + event_server_wrote, + event_server_read, + event_client_wrote, + event_client_read are events for transfer data between server and client + handle_file_map is file-mapping object, use for create shared memory +*/ + HANDLE event_connect_request = NULL; + HANDLE event_connect_answer = NULL; + HANDLE handle_connect_file_map = NULL; + char *handle_connect_map = NULL; + + char *handle_map = NULL; + HANDLE event_server_wrote = NULL; + HANDLE event_server_read = NULL; + HANDLE event_client_wrote = NULL; + HANDLE event_client_read = NULL; + HANDLE handle_file_map = NULL; + ulong connect_number; + char connect_number_char[22], *p; + char tmp[64]; + char *suffix_pos; + DWORD error_allow = 0; + DWORD error_code = 0; + char *shared_memory_base_name = mysql->options.shared_memory_base_name; + +/* + The name of event and file-mapping events create agree next rule: + shared_memory_base_name+unique_part + Where: + shared_memory_base_name is unique value for each server + unique_part is uniquel value for each object (events and file-mapping) +*/ + suffix_pos = strxmov(tmp,shared_memory_base_name,"_",NullS); + strmov(suffix_pos, "CONNECT_REQUEST"); + if ((event_connect_request = OpenEvent(EVENT_ALL_ACCESS,FALSE,tmp)) == NULL) + { + error_allow = CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR; + goto err; + } + strmov(suffix_pos, "CONNECT_ANSWER"); + if ((event_connect_answer = OpenEvent(EVENT_ALL_ACCESS,FALSE,tmp)) == NULL) + { + error_allow = CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR; + goto err; + } + strmov(suffix_pos, "CONNECT_DATA"); + if ((handle_connect_file_map = OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp)) == NULL) + { + error_allow = CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR; + goto err; + } + if ((handle_connect_map = MapViewOfFile(handle_connect_file_map,FILE_MAP_WRITE,0,0,sizeof(DWORD))) == NULL) + { + error_allow = CR_SHARED_MEMORY_CONNECT_MAP_ERROR; + goto err; + } +/* + Send to server request of connection +*/ + if (!SetEvent(event_connect_request)) + { + error_allow = CR_SHARED_MEMORY_CONNECT_SET_ERROR; + goto err; + } +/* + Wait of answer from server +*/ + if (WaitForSingleObject(event_connect_answer,connect_timeout*1000) != WAIT_OBJECT_0) + { + error_allow = CR_SHARED_MEMORY_CONNECT_ABANDODED_ERROR; + goto err; + } +/* + Get number of connection +*/ + connect_number = uint4korr(handle_connect_map);/*WAX2*/ + p = int2str(connect_number, connect_number_char, 10); + +/* + The name of event and file-mapping events create agree next rule: + shared_memory_base_name+unique_part+number_of_connection + Where: + shared_memory_base_name is uniquel value for each server + unique_part is uniquel value for each object (events and file-mapping) + number_of_connection is number of connection between server and client +*/ + suffix_pos = strxmov(tmp,shared_memory_base_name,"_",connect_number_char,"_",NullS); + strmov(suffix_pos, "DATA"); + if ((handle_file_map = OpenFileMapping(FILE_MAP_WRITE,FALSE,tmp)) == NULL) + { + error_allow = CR_SHARED_MEMORY_FILE_MAP_ERROR; + goto err2; + } + if ((handle_map = MapViewOfFile(handle_file_map,FILE_MAP_WRITE,0,0,smem_buffer_length)) == NULL) + { + error_allow = CR_SHARED_MEMORY_MAP_ERROR; + goto err2; + } + + strmov(suffix_pos, "SERVER_WROTE"); + if ((event_server_wrote = OpenEvent(EVENT_ALL_ACCESS,FALSE,tmp)) == NULL) + { + error_allow = CR_SHARED_MEMORY_EVENT_ERROR; + goto err2; + } + + strmov(suffix_pos, "SERVER_READ"); + if ((event_server_read = OpenEvent(EVENT_ALL_ACCESS,FALSE,tmp)) == NULL) + { + error_allow = CR_SHARED_MEMORY_EVENT_ERROR; + goto err2; + } + + strmov(suffix_pos, "CLIENT_WROTE"); + if ((event_client_wrote = OpenEvent(EVENT_ALL_ACCESS,FALSE,tmp)) == NULL) + { + error_allow = CR_SHARED_MEMORY_EVENT_ERROR; + goto err2; + } + + strmov(suffix_pos, "CLIENT_READ"); + if ((event_client_read = OpenEvent(EVENT_ALL_ACCESS,FALSE,tmp)) == NULL) + { + error_allow = CR_SHARED_MEMORY_EVENT_ERROR; + goto err2; + } +/* + Set event that server should send data +*/ + SetEvent(event_server_read); + +err2: + if (error_allow == 0) + { + net->vio = vio_new_win32shared_memory(net,handle_file_map,handle_map,event_server_wrote, + event_server_read,event_client_wrote,event_client_read); + } + else + { + error_code = GetLastError(); + if (event_server_read) CloseHandle(event_server_read); + if (event_server_wrote) CloseHandle(event_server_wrote); + if (event_client_read) CloseHandle(event_client_read); + if (event_client_wrote) CloseHandle(event_client_wrote); + if (handle_map) UnmapViewOfFile(handle_map); + if (handle_file_map) CloseHandle(handle_file_map); + } +err: + if (error_allow) error_code = GetLastError(); + if (event_connect_request) CloseHandle(event_connect_request); + if (event_connect_answer) CloseHandle(event_connect_answer); + if (handle_connect_map) UnmapViewOfFile(handle_connect_map); + if (handle_connect_file_map) CloseHandle(handle_connect_file_map); + if (error_allow) + { + net->last_errno=error_allow; + if (error_allow == CR_SHARED_MEMORY_EVENT_ERROR) + sprintf(net->last_error,ER(net->last_errno),suffix_pos,error_code); + else + sprintf(net->last_error,ER(net->last_errno),error_code); + return(INVALID_HANDLE_VALUE); + } + return(handle_map); +}; +#endif /***************************************************************************** read a packet from server. Give error message if socket was down @@ -734,7 +927,7 @@ static const char *default_options[]= "character-sets-dir", "default-character-set", "interactive-timeout", "connect-timeout", "local-infile", "disable-local-infile", "replication-probe", "enable-reads-from-master", "repl-parse-query", - "ssl-cipher", + "ssl-cipher","protocol", "shared_memory_base_name", NullS }; @@ -794,9 +987,8 @@ static void mysql_read_default_options(struct st_mysql_options *options, options->password=my_strdup(opt_arg,MYF(MY_WME)); } break; - case 5: /* pipe */ - options->named_pipe=1; /* Force named pipe */ - break; + case 5: + options->protocol = MYSQL_PROTOCOL_PIPE; case 20: /* connect_timeout */ case 6: /* timeout */ if (opt_arg) @@ -889,6 +1081,20 @@ static void mysql_read_default_options(struct st_mysql_options *options, case 25: /* repl-parse-query */ options->rpl_parse= 1; break; + case 27:/* protocol */ + if ((options->protocol = find_type(opt_arg, &sql_protocol_typelib,0)) == ~(ulong) 0) + { + fprintf(stderr, "Unknown option to protocol: %s\n", opt_arg); + exit(1); + } + break; + case 28: /*shared_memory_base_name*/ +#ifdef HAVE_SMEM + if (options->shared_memory_base_name != def_shared_memory_base_name) + my_free(options->shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); + options->shared_memory_base_name=my_strdup(opt_arg,MYF(MY_WME)); +#endif + break; default: DBUG_PRINT("warning",("unknown option: %s",option[0])); } @@ -1449,6 +1655,9 @@ mysql_init(MYSQL *mysql) #ifdef ENABLED_LOCAL_INFILE mysql->options.client_flag|= CLIENT_LOCAL_FILES; #endif +#ifdef HAVE_SMEM + mysql->options.shared_memory_base_name=(char*)def_shared_memory_base_name; +#endif return mysql; } @@ -1645,9 +1854,38 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, /* ** Grab a socket and connect it to the server */ - +#if defined(HAVE_SMEM) + if ((!mysql->options.protocol || mysql->options.protocol == MYSQL_PROTOCOL_MEMORY)&& + (!host || !strcmp(host,LOCAL_HOST))) + { + if ((create_shared_memory(mysql,net, mysql->options.connect_timeout)) == + INVALID_HANDLE_VALUE) + { + DBUG_PRINT("error", + ("host: '%s' socket: '%s' shared memory: %s have_tcpip: %d", + host ? host : "", + unix_socket ? unix_socket : "", + (int) mysql->options.shared_memory_base_name, + (int) have_tcpip)); + if (mysql->options.protocol == MYSQL_PROTOCOL_MEMORY) + goto error; +/* +Try also with PIPE or TCP/IP +*/ + } + else + { + mysql->options.protocol=MYSQL_PROTOCOL_MEMORY; + sock=0; + unix_socket = 0; + host=mysql->options.shared_memory_base_name; + host_info=(char*) ER(CR_SHARED_MEMORY_CONNECTION); + } + } else +#endif //HAVE_SMEM #if defined(HAVE_SYS_UN_H) - if ((!host || !strcmp(host,LOCAL_HOST)) && (unix_socket || mysql_unix_port)) + if ((!mysql->options.protocol || mysql->options.protocol == MYSQL_PROTOCOL_SOCKET)&& + (!host || !strcmp(host,LOCAL_HOST)) && (unix_socket || mysql_unix_port)) { host=LOCAL_HOST; if (!unix_socket) @@ -1672,46 +1910,42 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, sprintf(net->last_error,ER(net->last_errno),unix_socket,socket_errno); goto error; } + else + mysql->options.protocol=MYSQL_PROTOCOL_SOCKET; } else #elif defined(__WIN__) + if ((!mysql->options.protocol || mysql->options.protocol == MYSQL_PROTOCOL_PIPE)&& + ((unix_socket || !host && is_NT() || + host && !strcmp(host,LOCAL_HOST_NAMEDPIPE) ||!have_tcpip))&&(!net->vio)) { - if ((unix_socket || - !host && is_NT() || - host && !strcmp(host,LOCAL_HOST_NAMEDPIPE) || - mysql->options.named_pipe || !have_tcpip)) + sock=0; + if ((hPipe=create_named_pipe(net, mysql->options.connect_timeout, + (char**) &host, (char**) &unix_socket)) == + INVALID_HANDLE_VALUE) { - sock=0; - if ((hPipe=create_named_pipe(net, mysql->options.connect_timeout, - (char**) &host, (char**) &unix_socket)) == - INVALID_HANDLE_VALUE) - { - DBUG_PRINT("error", - ("host: '%s' socket: '%s' named_pipe: %d have_tcpip: %d", - host ? host : "", - unix_socket ? unix_socket : "", - (int) mysql->options.named_pipe, - (int) have_tcpip)); - if (mysql->options.named_pipe || - (host && !strcmp(host,LOCAL_HOST_NAMEDPIPE)) || - (unix_socket && !strcmp(unix_socket,MYSQL_NAMEDPIPE))) - { - net->last_errno= CR_SERVER_LOST; - strmov(net->last_error,ER(net->last_errno)); - goto error; /* User only requested named pipes */ - } - /* Try also with TCP/IP */ - } - else - { - net->vio=vio_new_win32pipe(hPipe); - sprintf(host_info=buff, ER(CR_NAMEDPIPE_CONNECTION), host, - unix_socket); - } + DBUG_PRINT("error", + ("host: '%s' socket: '%s' have_tcpip: %d", + host ? host : "", + unix_socket ? unix_socket : "", + (int) have_tcpip)); + if (mysql->options.protocol == MYSQL_PROTOCOL_PIPE || + (host && !strcmp(host,LOCAL_HOST_NAMEDPIPE)) || + (unix_socket && !strcmp(unix_socket,MYSQL_NAMEDPIPE))) + goto error; + /* + Try also with TCP/IP + */ + } + else + { + net->vio=vio_new_win32pipe(hPipe); + sprintf(host_info=buff, ER(CR_NAMEDPIPE_CONNECTION), host, + unix_socket); } } - if (hPipe == INVALID_HANDLE_VALUE) #endif + if ((!mysql->options.protocol || mysql->options.protocol == MYSQL_PROTOCOL_TCP)&&(!net->vio)) { unix_socket=0; /* This is not used */ if (!port) @@ -1766,6 +2000,14 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, goto error; } } + else + if (!net->vio) + { + DBUG_PRINT("error",("Unknow protocol %d ",mysql->options.protocol)); + net->last_errno= CR_CONN_UNKNOW_PROTOCOL; + sprintf(net->last_error ,ER(CR_CONN_UNKNOW_PROTOCOL)); + goto error; + }; if (!net->vio || my_net_init(net, net->vio)) { @@ -2169,6 +2411,10 @@ mysql_close(MYSQL *mysql) #ifdef HAVE_OPENSSL mysql_ssl_free(mysql); #endif /* HAVE_OPENSSL */ +#ifdef HAVE_SMEM + if (mysql->options.shared_memory_base_name != def_shared_memory_base_name) + my_free(mysql->options.shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); +#endif /* HAVE_SMEM */ /* Clear pointers for better safety */ mysql->host_info=mysql->user=mysql->passwd=mysql->db=0; bzero((char*) &mysql->options,sizeof(mysql->options)); @@ -2888,7 +3134,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) mysql->options.compress= 1; /* Remember for connect */ break; case MYSQL_OPT_NAMED_PIPE: - mysql->options.named_pipe=1; /* Force named pipe */ + mysql->options.protocol=MYSQL_PROTOCOL_PIPE; /* Force named pipe */ break; case MYSQL_OPT_LOCAL_INFILE: /* Allow LOAD DATA LOCAL ?*/ if (!arg || test(*(uint*) arg)) @@ -2916,6 +3162,16 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) my_free(mysql->options.charset_name,MYF(MY_ALLOW_ZERO_PTR)); mysql->options.charset_name=my_strdup(arg,MYF(MY_WME)); break; + case MYSQL_OPT_PROTOCOL: + mysql->options.protocol= *(uint*) arg; + break; + case MYSQL_SHARED_MEMORY_BASE_NAME: +#ifdef HAVE_SMEM + if (mysql->options.shared_memory_base_name != def_shared_memory_base_name) + my_free(mysql->options.shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); + mysql->options.shared_memory_base_name=my_strdup(arg,MYF(MY_WME)); +#endif + break; default: DBUG_RETURN(1); } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 10766db57c1..95132ed0afa 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -179,10 +179,13 @@ static char szPipeName [ 257 ]; static SECURITY_ATTRIBUTES saPipeSecurity; static SECURITY_DESCRIPTOR sdPipeDescriptor; static HANDLE hPipe = INVALID_HANDLE_VALUE; -static pthread_cond_t COND_handler_count; static uint handler_count; +static bool opt_enable_named_pipe = 0; #endif #ifdef __WIN__ +static bool opt_console=0,start_mode=0; +static pthread_cond_t COND_handler_count; +static uint handler_count; static bool opt_console=0, start_mode=0, use_opt_args; static int opt_argc; static char **opt_argv; @@ -335,6 +338,11 @@ ulong query_cache_limit=0; Query_cache query_cache; #endif +#ifdef HAVE_SMEM +static char *shared_memory_base_name=default_shared_memory_base_name; +static bool opt_enable_shared_memory = 0; +#endif + volatile ulong cached_thread_count=0; // replication parameters, if master_host is not NULL, we are a slave @@ -459,6 +467,9 @@ static bool read_init_file(char *file_name); #ifdef __NT__ static pthread_handler_decl(handle_connections_namedpipes,arg); #endif +#ifdef HAVE_SMEM +static pthread_handler_decl(handle_connections_shared_memory,arg); +#endif extern pthread_handler_decl(handle_slave,arg); #ifdef SET_RLIMIT_NOFILE static uint set_maximum_open_files(uint max_file_limit); @@ -2123,21 +2134,24 @@ The server will not act as a slave."); printf(ER(ER_READY),my_progname,server_version,""); fflush(stdout); - +#if defined(__NT__) || defined(HAVE_SMEM) #ifdef __NT__ if (hPipe == INVALID_HANDLE_VALUE && - (!have_tcpip || opt_disable_networking)) + (!have_tcpip || opt_disable_networking) && + !opt_enable_shared_memory) { - sql_print_error("TCP/IP or --enable-named-pipe should be configured on NT OS"); + sql_print_error("TCP/IP,--shared-memory or --named-pipe should be configured on NT OS"); unireg_abort(1); } else +#endif { pthread_mutex_lock(&LOCK_thread_count); (void) pthread_cond_init(&COND_handler_count,NULL); { pthread_t hThread; handler_count=0; +#ifdef __NT__ if (hPipe != INVALID_HANDLE_VALUE && opt_enable_named_pipe) { handler_count++; @@ -2148,18 +2162,33 @@ The server will not act as a slave."); handler_count--; } } +#endif +#ifdef HAVE_SMEM + if (opt_enable_shared_memory) + { + handler_count++; + if (pthread_create(&hThread,&connection_attrib, + handle_connections_shared_memory, 0)) + { + sql_print_error("Warning: Can't create thread to handle shared memory"); + handler_count--; + } + } +#endif if (have_tcpip && !opt_disable_networking) { handler_count++; if (pthread_create(&hThread,&connection_attrib, handle_connections_sockets, 0)) { - sql_print_error("Warning: Can't create thread to handle named pipes"); + sql_print_error("Warning: Can't create thread to handle tcp/ip"); handler_count--; } } while (handler_count > 0) + { pthread_cond_wait(&COND_handler_count,&LOCK_thread_count); + } } pthread_mutex_unlock(&LOCK_thread_count); } @@ -2777,6 +2806,219 @@ pthread_handler_decl(handle_connections_namedpipes,arg) } #endif /* __NT__ */ +/* + Thread of shared memory's service + + SYNOPSIS + pthread_handler_decl() + handle_connections_shared_memory Thread handle + arg Arguments of thread +*/ +#ifdef HAVE_SMEM +pthread_handler_decl(handle_connections_shared_memory,arg) +{ +/* + event_connect_request is event object for start connection actions + event_connect_answer is event object for confirm, that server put data + handle_connect_file_map is file-mapping object, use for create shared memory + handle_connect_map is pointer on shared memory + handle_map is pointer on shared memory for client + event_server_wrote, + event_server_read, + event_client_wrote, + event_client_read are events for transfer data between server and client + handle_file_map is file-mapping object, use for create shared memory +*/ + HANDLE handle_connect_file_map = NULL; + char *handle_connect_map = NULL; + HANDLE event_connect_request = NULL; + HANDLE event_connect_answer = NULL; + ulong smem_buffer_length = shared_memory_buffer_length + 4; + ulong connect_number = 1; + my_bool error_allow; + THD *thd; + char tmp[63]; + char *suffix_pos; + char connect_number_char[22], *p; + + my_thread_init(); + DBUG_ENTER("handle_connections_shared_memorys"); + DBUG_PRINT("general",("Waiting for allocated shared memory.")); + + +/* + The name of event and file-mapping events create agree next rule: + shared_memory_base_name+unique_part + Where: + shared_memory_base_name is unique value for each server + unique_part is unique value for each object (events and file-mapping) +*/ + suffix_pos = strxmov(tmp,shared_memory_base_name,"_",NullS); + strmov(suffix_pos, "CONNECT_REQUEST"); + if ((event_connect_request = CreateEvent(NULL,FALSE,FALSE,tmp)) == 0) + { + sql_perror("Can't create shared memory service ! The request event don't create."); + goto error; + } + strmov(suffix_pos, "CONNECT_ANSWER"); + if ((event_connect_answer = CreateEvent(NULL,FALSE,FALSE,tmp)) == 0) + { + sql_perror("Can't create shared memory service ! The answer event don't create."); + goto error; + } + strmov(suffix_pos, "CONNECT_DATA"); + if ((handle_connect_file_map = CreateFileMapping(INVALID_HANDLE_VALUE,NULL,PAGE_READWRITE, + 0,sizeof(connect_number),tmp)) == 0) + { + sql_perror("Can't create shared memory service ! File mapping don't create."); + goto error; + } + if ((handle_connect_map = (char *)MapViewOfFile(handle_connect_file_map,FILE_MAP_WRITE,0,0, + sizeof(DWORD))) == 0) + { + sql_perror("Can't create shared memory service ! Map of memory don't create."); + goto error; + } + + + while (!abort_loop) + { +/* + Wait a request from client +*/ + WaitForSingleObject(event_connect_request,INFINITE); + error_allow = FALSE; + + HANDLE handle_client_file_map = NULL; + char *handle_client_map = NULL; + HANDLE event_client_wrote = NULL; + HANDLE event_client_read = NULL; + HANDLE event_server_wrote = NULL; + HANDLE event_server_read = NULL; + + p = int2str(connect_number, connect_number_char, 10); +/* + The name of event and file-mapping events create agree next rule: + shared_memory_base_name+unique_part+number_of_connection + Where: + shared_memory_base_name is uniquel value for each server + unique_part is unique value for each object (events and file-mapping) + number_of_connection is number of connection between server and client +*/ + suffix_pos = strxmov(tmp,shared_memory_base_name,"_",connect_number_char,"_",NullS); + strmov(suffix_pos, "DATA"); + if ((handle_client_file_map = CreateFileMapping(INVALID_HANDLE_VALUE,NULL, + PAGE_READWRITE,0,smem_buffer_length,tmp)) == 0) + { + sql_perror("Can't create connection with client in shared memory service ! File mapping don't create."); + error_allow = TRUE; + goto errorconn; + } + if ((handle_client_map = (char*)MapViewOfFile(handle_client_file_map,FILE_MAP_WRITE,0,0,smem_buffer_length)) == 0) + { + sql_perror("Can't create connection with client in shared memory service ! Map of memory don't create."); + error_allow = TRUE; + goto errorconn; + } + + strmov(suffix_pos, "CLIENT_WROTE"); + if ((event_client_wrote = CreateEvent(NULL,FALSE,FALSE,tmp)) == 0) + { + sql_perror("Can't create connection with client in shared memory service ! CW event don't create."); + error_allow = TRUE; + goto errorconn; + } + + strmov(suffix_pos, "CLIENT_READ"); + if ((event_client_read = CreateEvent(NULL,FALSE,FALSE,tmp)) == 0) + { + sql_perror("Can't create connection with client in shared memory service ! CR event don't create."); + error_allow = TRUE; + goto errorconn; + } + + strmov(suffix_pos, "SERVER_READ"); + if ((event_server_read = CreateEvent(NULL,FALSE,FALSE,tmp)) == 0) + { + sql_perror("Can't create connection with client in shared memory service ! SR event don't create."); + error_allow = TRUE; + goto errorconn; + } + + strmov(suffix_pos, "SERVER_WROTE"); + if ((event_server_wrote = CreateEvent(NULL,FALSE,FALSE,tmp)) == 0) + { + sql_perror("Can't create connection with client in shared memory service ! SW event don't create."); + error_allow = TRUE; + goto errorconn; + } + + if (abort_loop) break; + if ( !(thd = new THD)) + { + error_allow = TRUE; + goto errorconn; + } + +/* +Send number of connection to client +*/ + int4store(handle_connect_map, connect_number); + +/* + Send number of connection to client +*/ + if (!SetEvent(event_connect_answer)) + { + sql_perror("Can't create connection with client in shared memory service ! Can't send answer event."); + error_allow = TRUE; + goto errorconn; + } + +/* + Set event that client should receive data +*/ + if (!SetEvent(event_client_read)) + { + sql_perror("Can't create connection with client in shared memory service ! Can't set client to read's mode."); + error_allow = TRUE; + goto errorconn; + } + if (!(thd->net.vio = vio_new_win32shared_memory(&thd->net,handle_client_file_map,handle_client_map,event_client_wrote, + event_client_read,event_server_wrote,event_server_read)) || + my_net_init(&thd->net, thd->net.vio)) + { + close_connection(&thd->net,ER_OUT_OF_RESOURCES); + delete thd; + error_allow = TRUE; + } + /* host name is unknown */ +errorconn: + if (error_allow) + { + if (!handle_client_map) UnmapViewOfFile(handle_client_map); + if (!handle_client_file_map) CloseHandle(handle_client_file_map); + if (!event_server_wrote) CloseHandle(event_server_wrote); + if (!event_server_read) CloseHandle(event_server_read); + if (!event_client_wrote) CloseHandle(event_client_wrote); + if (!event_client_read) CloseHandle(event_client_read); + continue; + } + thd->host = my_strdup(localhost,MYF(0)); /* Host is unknown */ + create_new_thread(thd); + uint4korr(connect_number++); + } +error: + if (!handle_connect_map) UnmapViewOfFile(handle_connect_map); + if (!handle_connect_file_map) CloseHandle(handle_connect_file_map); + if (!event_connect_answer) CloseHandle(event_connect_answer); + if (!event_connect_request) CloseHandle(event_connect_request); + pthread_mutex_lock(&LOCK_thread_count); + pthread_mutex_unlock(&LOCK_thread_count); + DBUG_RETURN(0); +} +#endif /* HAVE_SMEM */ + /****************************************************************************** ** handle start options @@ -2886,7 +3128,9 @@ enum options { OPT_INNODB_FORCE_RECOVERY, OPT_BDB_CACHE_SIZE, OPT_BDB_LOG_BUFFER_SIZE, - OPT_BDB_MAX_LOCK + OPT_BDB_MAX_LOCK, + OPT_ENABLE_SHARED_MEMORY, + OPT_SHARED_MEMORY_BASE_NAME }; @@ -2993,6 +3237,11 @@ struct my_option my_long_options[] = {"enable-pstack", OPT_DO_PSTACK, "Print a symbolic stack trace on failure", (gptr*) &opt_do_pstack, (gptr*) &opt_do_pstack, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef HAVE_SMEM + {"shared-memory", OPT_ENABLE_SHARED_MEMORY, + "Enable the shared memory.",(gptr*) &opt_enable_shared_memory, (gptr*) &opt_enable_shared_memory, + 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"exit-info", 'T', "Used for debugging; Use at your own risk!", 0, 0, 0, GET_LONG, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"flush", OPT_FLUSH, "Flush tables to disk between SQL commands", 0, 0, 0, @@ -3234,6 +3483,11 @@ struct my_option my_long_options[] = {"set-variable", 'O', "Change the value of a variable. Please note that this option is deprecated;you can set variables directly with --variable-name=value.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#ifdef HAVE_SMEM + {"shared_memory_base_name",OPT_SHARED_MEMORY_BASE_NAME, + "Base name of shared memory", (gptr*) &shared_memory_base_name, (gptr*) &shared_memory_base_name, + 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"show-slave-auth-info", OPT_SHOW_SLAVE_AUTH_INFO, "Show user and password in SHOW SLAVE STATUS", (gptr*) &opt_show_slave_auth_info, (gptr*) &opt_show_slave_auth_info, 0, diff --git a/sql/set_var.cc b/sql/set_var.cc index 937bc600d81..141320cc3f6 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -520,6 +520,10 @@ struct show_var_st init_vars[]= { {sys_query_cache_type.name, (char*) &sys_query_cache_type, SHOW_SYS}, #endif /* HAVE_QUERY_CACHE */ {sys_safe_show_db.name, (char*) &sys_safe_show_db, SHOW_SYS}, +#ifdef HAVE_SMEM + {"shared_memory", (char*) &opt_enable_shared_memory, SHOW_MY_BOOL}, + {"shared_memory_base_name", (char*) &shared_memory_base_name, SHOW_CHAR_PTR}, +#endif {sys_server_id.name, (char*) &sys_server_id, SHOW_SYS}, {sys_slave_net_timeout.name,(char*) &sys_slave_net_timeout, SHOW_SYS}, {"skip_external_locking", (char*) &my_disable_locking, SHOW_MY_BOOL}, diff --git a/vio/vio.c b/vio/vio.c index bed380c6cd9..b1eb86fc948 100644 --- a/vio/vio.c +++ b/vio/vio.c @@ -45,7 +45,43 @@ void vio_reset(Vio* vio, enum enum_vio_type type, vio->sd = sd; vio->hPipe = hPipe; vio->localhost= localhost; -#ifdef HAVE_VIO +#ifdef HAVE_VIO +#ifdef __WIN__ + if (type == VIO_TYPE_NAMEDPIPE) + { + vio->viodelete =vio_delete; + vio->vioerrno =vio_errno; + vio->read =vio_read_pipe; + vio->write =vio_write_pipe; + vio->fastsend =vio_fastsend; + vio->viokeepalive =vio_keepalive; + vio->should_retry =vio_should_retry; + vio->vioclose =vio_close_pipe; + vio->peer_addr =vio_peer_addr; + vio->in_addr =vio_in_addr; + vio->vioblocking =vio_blocking; + vio->is_blocking =vio_is_blocking; + } + else /* default is VIO_TYPE_TCPIP */ +#endif +#ifdef HAVE_SMEM + if (type == VIO_TYPE_SHARED_MEMORY) + { + vio->viodelete =vio_delete; + vio->vioerrno =vio_errno; + vio->read =vio_read_shared_memory; + vio->write =vio_write_shared_memory; + vio->fastsend =vio_fastsend; + vio->viokeepalive =vio_keepalive; + vio->should_retry =vio_should_retry; + vio->vioclose =vio_close_shared_memory; + vio->peer_addr =vio_peer_addr; + vio->in_addr =vio_in_addr; + vio->vioblocking =vio_blocking; + vio->is_blocking =vio_is_blocking; + } + else +#endif #ifdef HAVE_OPENSSL if (type == VIO_TYPE_SSL) { @@ -131,4 +167,44 @@ Vio *vio_new_win32pipe(HANDLE hPipe) DBUG_RETURN(vio); } +#ifdef HAVE_SMEM +Vio *vio_new_win32shared_memory(NET *net,HANDLE handle_file_map, HANDLE handle_map, + HANDLE event_server_wrote, HANDLE event_server_read, + HANDLE event_client_wrote, HANDLE event_client_read) +{ + Vio *vio; + DBUG_ENTER("vio_new_win32shared_memory"); + if ((vio = (Vio*) my_malloc(sizeof(Vio),MYF(MY_WME)))) + { + vio_reset(vio, VIO_TYPE_SHARED_MEMORY, 0, 0, TRUE); + vio->handle_file_map = handle_file_map; + vio->handle_map = handle_map; + vio->event_server_wrote = event_server_wrote; + vio->event_server_read = event_server_read; + vio->event_client_wrote = event_client_wrote; + vio->event_client_read = event_client_read; + vio->shared_memory_remain = 0; + vio->shared_memory_pos = handle_map; + vio->net = net; + strmov(vio->desc, "shared memory"); + } + DBUG_RETURN(vio); +} #endif +#endif + +void vio_delete(Vio* vio) +{ + /* It must be safe to delete null pointers. */ + /* This matches the semantics of C++'s delete operator. */ + if (vio) + { + if (vio->type != VIO_CLOSED) +#ifdef HAVE_VIO /*WAX*/ + vio->vioclose(vio); +#else + vio_close(vio); +#endif + my_free((gptr) vio,MYF(0)); + } +} diff --git a/vio/viosocket.c b/vio/viosocket.c index f69eebd413a..76056704ec2 100644 --- a/vio/viosocket.c +++ b/vio/viosocket.c @@ -35,18 +35,6 @@ #define HANDLE void * #endif -void vio_delete(Vio* vio) -{ - /* It must be safe to delete null pointers. */ - /* This matches the semantics of C++'s delete operator. */ - if (vio) - { - if (vio->type != VIO_CLOSED) - vio_close(vio); - my_free((gptr) vio,MYF(0)); - } -} - int vio_errno(Vio *vio __attribute__((unused))) { return socket_errno; /* On Win32 this mapped to WSAGetLastError() */ @@ -58,14 +46,8 @@ int vio_read(Vio * vio, gptr buf, int size) int r; DBUG_ENTER("vio_read"); DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size)); + #ifdef __WIN__ - if (vio->type == VIO_TYPE_NAMEDPIPE) - { - DWORD length; - if (!ReadFile(vio->hPipe, buf, size, &length, NULL)) - DBUG_RETURN(-1); - DBUG_RETURN(length); - } r = recv(vio->sd, buf, size,0); #else errno=0; /* For linux */ @@ -87,15 +69,8 @@ int vio_write(Vio * vio, const gptr buf, int size) int r; DBUG_ENTER("vio_write"); DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size)); -#if defined( __WIN__) - if ( vio->type == VIO_TYPE_NAMEDPIPE) - { - DWORD length; - if (!WriteFile(vio->hPipe, (char*) buf, size, &length, NULL)) - DBUG_RETURN(-1); - DBUG_RETURN(length); - } - r = send(vio->sd, buf, size, 0); +#ifdef __WIN__ + r = send(vio->sd, buf, size,0); #else r = write(vio->sd, buf, size); #endif /* __WIN__ */ @@ -109,7 +84,6 @@ int vio_write(Vio * vio, const gptr buf, int size) DBUG_RETURN(r); } - int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, my_bool *old_mode) { @@ -332,3 +306,155 @@ my_bool vio_poll_read(Vio *vio,uint timeout) DBUG_RETURN(fds.revents & POLLIN ? 0 : 1); #endif } + +#ifdef __WIN__ +int vio_read_pipe(Vio * vio, gptr buf, int size) +{ + DWORD length; + DBUG_ENTER("vio_read_pipe"); + DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size)); + + if (!ReadFile(vio->hPipe, buf, size, &length, NULL)) + DBUG_RETURN(-1); + + DBUG_PRINT("exit", ("%d", length)); + DBUG_RETURN(length); +} + + +int vio_write_pipe(Vio * vio, const gptr buf, int size) +{ + DWORD length; + DBUG_ENTER("vio_write_pipe"); + DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size)); + + if (!WriteFile(vio->hPipe, (char*) buf, size, &length, NULL)) + DBUG_RETURN(-1); + + DBUG_PRINT("exit", ("%d", length)); + DBUG_RETURN(length); +} + +int vio_close_pipe(Vio * vio) +{ + int r; + DBUG_ENTER("vio_close_pipe"); +#if defined(__NT__) && defined(MYSQL_SERVER) + CancelIo(vio->hPipe); + DisconnectNamedPipe(vio->hPipe); +#endif + r=CloseHandle(vio->hPipe); + if (r) + { + DBUG_PRINT("vio_error", ("close() failed, error: %d",GetLastError())); + /* FIXME: error handling (not critical for MySQL) */ + } + vio->type= VIO_CLOSED; + vio->sd= -1; + DBUG_RETURN(r); +} + +#ifdef HAVE_SMEM + +int vio_read_shared_memory(Vio * vio, gptr buf, int size) +{ + int length; + int remain_local; + char *current_postion; + + DBUG_ENTER("vio_read_shared_memory"); + DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size)); + + remain_local = size; + current_postion=buf; + do + { + if (vio->shared_memory_remain == 0) + { + if (WaitForSingleObject(vio->event_server_wrote,vio->net->read_timeout*1000) != WAIT_OBJECT_0) + { + DBUG_RETURN(-1); + }; + vio->shared_memory_pos = vio->handle_map; + vio->shared_memory_remain = uint4korr((ulong*)vio->shared_memory_pos); + vio->shared_memory_pos+=4; + } + + length = size; + + if (vio->shared_memory_remain < length) + length = vio->shared_memory_remain; + if (length > remain_local) + length = remain_local; + + memcpy(current_postion,vio->shared_memory_pos,length); + + vio->shared_memory_remain-=length; + vio->shared_memory_pos+=length; + current_postion+=length; + remain_local-=length; + + if (!vio->shared_memory_remain) + if (!SetEvent(vio->event_client_read)) DBUG_RETURN(-1); + } while (remain_local); + length = size; + + DBUG_PRINT("exit", ("%d", length)); + DBUG_RETURN(length); +} + + +int vio_write_shared_memory(Vio * vio, const gptr buf, int size) +{ + int length; + uint remain; + HANDLE pos; + int sz; + char *current_postion; + + DBUG_ENTER("vio_write_shared_memory"); + DBUG_PRINT("enter", ("sd=%d, buf=%p, size=%d", vio->sd, buf, size)); + + remain = size; + current_postion = buf; + while (remain != 0) + { + if (WaitForSingleObject(vio->event_server_read,vio->net->write_timeout*1000) != WAIT_OBJECT_0) + { + DBUG_RETURN(-1); + }; + + sz = remain > shared_memory_buffer_length ? shared_memory_buffer_length: remain; + + int4store(vio->handle_map,sz); + pos = vio->handle_map + 4; + memcpy(pos,current_postion,sz); + remain-=sz; + current_postion+=sz; + if (!SetEvent(vio->event_client_wrote)) DBUG_RETURN(-1); + } + length = size; + + DBUG_PRINT("exit", ("%d", length)); + DBUG_RETURN(length); +} + + +int vio_close_shared_memory(Vio * vio) +{ + int r; + DBUG_ENTER("vio_close_shared_memory"); + r=UnmapViewOfFile(vio->handle_map) || CloseHandle(vio->event_server_wrote) || + CloseHandle(vio->event_server_read) || CloseHandle(vio->event_client_wrote) || + CloseHandle(vio->event_client_read) || CloseHandle(vio->handle_file_map); + if (r) + { + DBUG_PRINT("vio_error", ("close() failed, error: %d",r)); + /* FIXME: error handling (not critical for MySQL) */ + } + vio->type= VIO_CLOSED; + vio->sd= -1; + DBUG_RETURN(r); +} +#endif +#endif From 59436a6db186d3e4a18d8d2d6ded9e2068b420e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 22:08:25 +0200 Subject: [PATCH 139/246] Actually, I do it in order to pull new stuff sql/sql_delete.cc: fix for safe_updates Actually, I do it in order to pull new stuff sql/sql_select.cc: fix for LIMIT 0 Actually, I do it in order to pull new stuff --- sql/sql_delete.cc | 12 +++++------- sql/sql_select.cc | 9 ++++++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 64945fa2d4d..c3e52f42dcd 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -35,13 +35,13 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, SQL_SELECT *select=0; READ_RECORD info; bool using_limit=limit != HA_POS_ERROR; - bool using_transactions; + bool using_transactions, safe_update; ha_rows deleted; DBUG_ENTER("mysql_delete"); if (!table_list->db) table_list->db=thd->db; - if ((thd->options & OPTION_SAFE_UPDATES) && !conds) + if (((safe_update=thd->options & OPTION_SAFE_UPDATES)) && !conds) { send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); DBUG_RETURN(1); @@ -58,7 +58,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, /* Test if the user wants to delete all rows */ if (!using_limit && (!conds || conds->const_item()) && - !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE))) + !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) && !safe_update) { deleted= table->file->records; if (!(error=table->file->delete_all_rows())) @@ -79,9 +79,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, select=make_select(table,0,0,conds,&error); if (error) DBUG_RETURN(-1); - if ((select && select->check_quick(test(thd->options & OPTION_SAFE_UPDATES), - limit)) || - !limit) + if ((select && select->check_quick(safe_update, limit)) || !limit) { delete select; send_ok(thd,0L); @@ -92,7 +90,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, if (!table->quick_keys) { thd->lex.select_lex.options|=QUERY_NO_INDEX_USED; - if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR) + if (safe_update && use_limit) { delete select; send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 5f4bfc5462a..b4bec7dd06f 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -378,7 +378,7 @@ JOIN::optimize() error = 0; DBUG_RETURN(1); } - if (cond_value == Item::COND_FALSE || !unit->select_limit_cnt) + if (cond_value == Item::COND_FALSE || (!unit->select_limit_cnt && !(select_options & OPTION_FOUND_ROWS))) { /* Impossible cond */ zero_result_cause= "Impossible WHERE"; DBUG_RETURN(0); @@ -669,10 +669,13 @@ JOIN::exec() result->send_fields(fields_list,1); if (!having || having->val_int()) { - if (do_send_rows && result->send_data(fields_list)) + if (do_send_rows && unit->select_limit_cnt && result->send_data(fields_list)) error= 1; else + { error= (int) result->send_eof(); + send_records=1; + } } else error=(int) result->send_eof(); @@ -5151,7 +5154,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), error=0; if (join->procedure) error=join->procedure->send_row(*join->fields); - else if (join->do_send_rows) + else if (join->do_send_rows && join->unit->select_limit_cnt) error=join->result->send_data(*join->fields); if (error) DBUG_RETURN(-1); /* purecov: inspected */ From 4ebb96c6b1973937e743a674ad4f28386f8abca7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Nov 2002 22:39:46 +0100 Subject: [PATCH 140/246] better fix for OPTIMIZE bug --- sql/ha_myisam.cc | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index f96781f83b4..31a8d3c7109 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -617,16 +617,12 @@ int ha_myisam::repair(THD *thd, MI_CHECK ¶m, bool optimize) STATE_CRASHED_ON_REPAIR); file->update|=HA_STATE_CHANGED | HA_STATE_ROW_CHANGED; } - /* Here we need to make file->save_state and file->s->state.state - equal. Unfortunately, sometime table comes locked here (so - file->save_state represents actual table state), and sometime - unlocked (and actual is file->s->state.state instead). This all - is very confusing, and should be streamlined (TODO). - */ - if (file->state == & file->save_state) - file->s->state.state=file->save_state; - else - file->save_state=file->s->state.state; + /* + the following 'if', thought conceptually wrong, + is a useful optimization nevertheless. + */ + if (file->state != &file->s->state.state); + file->s->state.state = *file->state; if (file->s->base.auto_key) update_auto_increment_key(¶m, file, 1); if (optimize_done) From fdabe22c3a27e91a4da6353b2e7acd5586508ace Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 01:57:56 +0100 Subject: [PATCH 141/246] - Fixed some minor bugs/typos scripts/mysqlhotcopy.sh: - added missing "--host" option sql-bench/test-create.sh: - fixed typo support-files/mysql.server.sh: - fixed typo --- scripts/mysqlhotcopy.sh | 1 + sql-bench/test-create.sh | 2 +- support-files/mysql.server.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index bc23c0e5d95..b8d4a0a9a38 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -90,6 +90,7 @@ my %opt = ( Getopt::Long::Configure(qw(no_ignore_case)); # disambuguate -p and -P GetOptions( \%opt, "help", + "host|h=s", "user|u=s", "password|p=s", "port|P=s", diff --git a/sql-bench/test-create.sh b/sql-bench/test-create.sh index 2853984e393..1e7d3841bb5 100644 --- a/sql-bench/test-create.sh +++ b/sql-bench/test-create.sh @@ -54,7 +54,7 @@ if ($opt_small_test) } -print "Testing the speed of creating and droping tables\n"; +print "Testing the speed of creating and dropping tables\n"; print "Testing with $max_tables tables and $opt_loop_count loop count\n\n"; #### diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 0d96cdc1bb1..ecc49106c91 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -5,7 +5,7 @@ # Mysql daemon start/stop script. # Usually this is put in /etc/init.d (at least on machines SYSV R4 based -# systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/S01mysql. +# systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql. # When this is done the mysql server will be started when the machine is # started and shut down when the systems goes down. From 5a264eb9a7acd2fd45022c914506a7af343e9c83 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 11:44:23 +0400 Subject: [PATCH 142/246] move like_range into CHARSET_INFO structure --- include/m_ctype.h | 20 ++++++--- mysys/charset.c | 1 + sql/opt_range.cc | 95 ++++----------------------------------- strings/ctype-big5.c | 9 ++-- strings/ctype-bin.c | 2 +- strings/ctype-czech.c | 9 ++-- strings/ctype-euc_kr.c | 2 +- strings/ctype-gb2312.c | 2 +- strings/ctype-gbk.c | 9 ++-- strings/ctype-latin1_de.c | 11 +++-- strings/ctype-simple.c | 69 ++++++++++++++++++++++++++++ strings/ctype-sjis.c | 9 ++-- strings/ctype-tis620.c | 9 ++-- strings/ctype-ujis.c | 2 +- strings/ctype-utf8.c | 4 +- strings/ctype-win1250ch.c | 9 ++-- strings/ctype.c | 46 +++++++++---------- 17 files changed, 151 insertions(+), 157 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index 7aa19d05639..b16db5cde97 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -81,8 +81,11 @@ typedef struct charset_info_st int (*strnxfrm)(struct charset_info_st *, uchar *, uint, const uchar *, uint); my_bool (*like_range)(struct charset_info_st *, - const char *, uint, pchar, uint, - char *, char *, uint *, uint *); + const char *s, uint s_length, + int w_prefix, int w_one, int w_many, + uint res_length, + char *min_str, char *max_str, + uint *min_len, uint *max_len); int (*wildcmp)(struct charset_info_st *, const char *str,const char *str_end, const char *wildstr,const char *wildend, @@ -171,7 +174,14 @@ ulong my_strtoul_8bit(CHARSET_INFO *, const char *s, char **e, int base); longlong my_strtoll_8bit(CHARSET_INFO *, const char *s, char **e, int base); ulonglong my_strtoull_8bit(CHARSET_INFO *, const char *s, char **e, int base); double my_strtod_8bit(CHARSET_INFO *, const char *s, char **e); - + +my_bool my_like_range_simple(CHARSET_INFO *cs, + const char *ptr, uint ptr_length, + int escape, int w_one, int w_many, + uint res_length, + char *min_str, char *max_str, + uint *min_length, uint *max_length); + int my_wildcmp_8bit(CHARSET_INFO *, const char *str,const char *str_end, @@ -230,8 +240,8 @@ int my_wildcmp_mb(CHARSET_INFO *, #define use_strnxfrm(s) ((s)->strnxfrm != NULL) #define my_strnxfrm(s, a, b, c, d) ((s)->strnxfrm((s), (a), (b), (c), (d))) #define my_strnncoll(s, a, b, c, d) ((s)->strnncoll((s), (a), (b), (c), (d))) -#define my_like_range(s, a, b, c, d, e, f, g, h) \ - ((s)->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h))) +#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \ + ((s)->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j))) #define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m))) #define use_mb(s) ((s)->ismbchar != NULL) diff --git a/mysys/charset.c b/mysys/charset.c index e11c319ca28..91bae04046b 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -376,6 +376,7 @@ static CHARSET_INFO *add_charset(CHARSET_INFO *cs, myf flags) sizeof(tmp_sort_order)); memcpy((char*) cs->tab_to_uni, (char*) tmp_to_uni, sizeof(tmp_to_uni)); + cs->like_range = my_like_range_simple; cs->wildcmp = my_wildcmp_8bit; cs->strnncoll = my_strnncoll_simple; cs->caseup_str = my_caseup_str_8bit; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 9a644553f26..13c2f6333b1 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -299,9 +299,6 @@ static SEL_TREE * get_mm_parts(PARAM *param,Field *field, Item_result cmp_type); static SEL_ARG *get_mm_leaf(PARAM *param,Field *field,KEY_PART *key_part, Item_func::Functype type,Item *value); -static bool like_range(const char *ptr,uint length,char wild_prefix, - uint field_length, char *min_str,char *max_str, - char max_sort_char,uint *min_length,uint *max_length); static SEL_TREE *get_mm_tree(PARAM *param,COND *cond); static ha_rows check_quick_select(PARAM *param,uint index,SEL_ARG *key_tree); static ha_rows check_quick_keys(PARAM *param,uint index,SEL_ARG *key_tree, @@ -970,27 +967,14 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, max_str=min_str+length; if (maybe_null) max_str[0]= min_str[0]=0; - if (field->binary()) - like_error=like_range(res->ptr(),res->length(),wild_prefix,field_length, - min_str+offset,max_str+offset,(char) 255, - &min_length,&max_length); - else - { - CHARSET_INFO *charset=field->charset(); -#ifdef USE_STRCOLL - if (use_strnxfrm(charset)) - like_error= my_like_range(charset, - res->ptr(),res->length(),wild_prefix, - field_length, min_str+maybe_null, - max_str+maybe_null,&min_length,&max_length); - else -#endif - like_error=like_range(res->ptr(),res->length(),wild_prefix, - field_length, - min_str+offset,max_str+offset, - charset->max_sort_char, - &min_length,&max_length); - } + + like_error= my_like_range(field->charset(), + res->ptr(),res->length(), + wild_prefix,wild_one,wild_many, + field_length, + min_str+offset, max_str+offset, + &min_length,&max_length); + if (like_error) // Can't optimize with LIKE DBUG_RETURN(0); if (offset != maybe_null) // Blob @@ -1119,69 +1103,6 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, } -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -static bool like_range(const char *ptr,uint ptr_length,char escape, - uint res_length, char *min_str,char *max_str, - char max_sort_chr, uint *min_length, uint *max_length) -{ - const char *end=ptr+ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - - for (; ptr != end && min_str != min_end ; ptr++) - { - if (*ptr == escape && ptr+1 != end) - { - ptr++; // Skip escape - *min_str++= *max_str++ = *ptr; - continue; - } - if (*ptr == wild_one) // '_' in SQL - { - *min_str++='\0'; // This should be min char - *max_str++=max_sort_chr; - continue; - } - if (*ptr == wild_many) // '%' in SQL - { - *min_length= (uint) (min_str - min_org); - *max_length=res_length; - do { - *min_str++ = ' '; // Because if key compression - *max_str++ = max_sort_chr; - } while (min_str != min_end); - return 0; - } - *min_str++= *max_str++ = *ptr; - } - *min_length= *max_length = (uint) (min_str - min_org); - - /* Temporary fix for handling wild_one at end of string (key compression) */ - for (char *tmp= min_str ; tmp > min_org && tmp[-1] == '\0';) - *--tmp=' '; - - while (min_str != min_end) - *min_str++ = *max_str++ = ' '; // Because if key compression - return 0; -} - - /****************************************************************************** ** Tree manipulation functions ** If tree is 0 it means that the condition can't be tested. It refers diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index aae8da72c13..39ddee854ff 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -331,11 +331,10 @@ static int my_strxfrm_big5(uchar * dest, const uchar * src, int len) */ #define max_sort_char ((char) 255) -#define wild_one '_' -#define wild_many '%' static my_bool my_like_range_big5(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,uint ptr_length,pchar escape, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { @@ -357,13 +356,13 @@ static my_bool my_like_range_big5(CHARSET_INFO *cs __attribute__((unused)), *min_str++= *max_str++ = *ptr; continue; } - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++=max_sort_char; continue; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { *min_length= (uint) (min_str-min_org); *max_length= res_length; diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index f9f6d60e373..2573ec89660 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -251,7 +251,7 @@ static CHARSET_INFO my_charset_bin_st = 0, /* strxfrm_multiply */ my_strnncoll_binary, /* strnncoll */ NULL, /* strxnfrm */ - NULL, /* like_range */ + my_like_range_simple, /* like_range */ my_wildcmp_bin, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 4d5479bba0f..ea3cc702abd 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -375,13 +375,12 @@ static int my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)), #define min_sort_char ' ' #define max_sort_char '9' -#define wild_one '_' -#define wild_many '%' #define EXAMPLE static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,uint ptr_length,pchar escape, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { @@ -393,9 +392,9 @@ static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)), for (; ptr != end && min_str != min_end ; ptr++) { - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { break; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { break; } if (*ptr == escape && ptr+1 != end) diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 4142b2d3941..8a614851fe3 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8648,7 +8648,7 @@ CHARSET_INFO my_charset_euc_kr = 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_euc_kr, diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index 6a54757ab4c..7a8e9f011a0 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -5698,7 +5698,7 @@ CHARSET_INFO my_charset_gb2312 = 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_gb2312, diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index c7264078d13..504039a4e59 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2650,11 +2650,10 @@ int my_strnxfrm_gbk(CHARSET_INFO *cs __attribute__((unused)), */ #define max_sort_char ((uchar) 255) -#define wild_one '_' -#define wild_many '%' extern my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,uint ptr_length,pchar escape, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { @@ -2676,13 +2675,13 @@ extern my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), *min_str++= *max_str++ = *ptr; continue; } - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++=max_sort_char; continue; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { *min_length= (uint) (min_str - min_org); *max_length= res_length; diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index 1fc395638a6..13a35e3c82e 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -358,12 +358,11 @@ static int my_strnxfrm_latin1_de(CHARSET_INFO *cs __attribute__((unused)), #define min_sort_char ((char) 0) #define max_sort_char ((char) 255) -#define wild_one '_' -#define wild_many '%' static my_bool my_like_range_latin1_de(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, uint ptr_length, - pchar escape, uint res_length, + int escape, int w_one, int w_many, + uint res_length, char *min_str, char *max_str, uint *min_length, uint *max_length) { @@ -379,13 +378,13 @@ static my_bool my_like_range_latin1_de(CHARSET_INFO *cs __attribute__((unused)), *min_str++ = *max_str++ = *ptr; continue; } - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { *min_str++ = min_sort_char; *max_str++ = max_sort_char; continue; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { *min_length = (uint)(min_str - min_org); *max_length = res_length; @@ -399,7 +398,7 @@ static my_bool my_like_range_latin1_de(CHARSET_INFO *cs __attribute__((unused)), } *min_length = *max_length = (uint) (min_str - min_org); - /* Temporary fix for handling wild_one at end of string (key compression) */ + /* Temporary fix for handling w_one at end of string (key compression) */ { char *tmp; for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';) diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 9f8cc4e1aa9..f9a9caad206 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -367,3 +367,72 @@ int my_wildcmp_8bit(CHARSET_INFO *cs, } return (str != str_end ? 1 : 0); } + + +/* +** Calculate min_str and max_str that ranges a LIKE string. +** Arguments: +** ptr Pointer to LIKE string. +** ptr_length Length of LIKE string. +** escape Escape character in LIKE. (Normally '\'). +** All escape characters should be removed from min_str and max_str +** res_length Length of min_str and max_str. +** min_str Smallest case sensitive string that ranges LIKE. +** Should be space padded to res_length. +** max_str Largest case sensitive string that ranges LIKE. +** Normally padded with the biggest character sort value. +** +** The function should return 0 if ok and 1 if the LIKE string can't be +** optimized ! +*/ + +my_bool my_like_range_simple(CHARSET_INFO *cs, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, + uint res_length, + char *min_str,char *max_str, + uint *min_length,uint *max_length) +{ + const char *end=ptr+ptr_length; + char *min_org=min_str; + char *min_end=min_str+res_length; + + for (; ptr != end && min_str != min_end ; ptr++) + { + if (*ptr == escape && ptr+1 != end) + { + ptr++; // Skip escape + *min_str++= *max_str++ = *ptr; + continue; + } + if (*ptr == w_one) // '_' in SQL + { + *min_str++='\0'; // This should be min char + *max_str++=cs->max_sort_char; + continue; + } + if (*ptr == w_many) // '%' in SQL + { + *min_length= (uint) (min_str - min_org); + *max_length=res_length; + do { + *min_str++ = ' '; // Because if key compression + *max_str++ = cs->max_sort_char; + } while (min_str != min_end); + return 0; + } + *min_str++= *max_str++ = *ptr; + } + *min_length= *max_length = (uint) (min_str - min_org); + + /* Temporary fix for handling w_one at end of string (key compression) */ + { + char *tmp; + for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';) + *--tmp=' '; + } + + while (min_str != min_end) + *min_str++ = *max_str++ = ' '; // Because if key compression + return 0; +} diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index b670c0a5f5d..91a9fae55fa 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -263,11 +263,10 @@ static int my_strnxfrm_sjis(CHARSET_INFO *cs __attribute__((unused)), */ #define max_sort_char ((char) 255) -#define wild_one '_' -#define wild_many '%' static my_bool my_like_range_sjis(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,uint ptr_length,pchar escape, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { @@ -290,13 +289,13 @@ static my_bool my_like_range_sjis(CHARSET_INFO *cs __attribute__((unused)), *min_str++ = *max_str++ = *ptr++; continue; } - if (*ptr == wild_one) { /* '_' in SQL */ + if (*ptr == w_one) { /* '_' in SQL */ *min_str++ = '\0'; /* This should be min char */ *max_str++ = max_sort_char; ptr++; continue; } - if (*ptr == wild_many) { /* '%' in SQL */ + if (*ptr == w_many) { /* '%' in SQL */ *min_length = (uint)(min_str - min_org); *max_length = res_length; do { diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 70f746c1605..86056e4f55c 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -610,11 +610,10 @@ int my_strxfrm_tis620(uchar * dest, const uchar * src, int len) thai2sortable string. min_str and max_str will be use for comparison and converted there. */ #define max_sort_chr ((char) 255) -#define wild_one '_' -#define wild_many '%' my_bool my_like_range_tis620(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr, uint ptr_length, pchar escape, + const char *ptr, uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str, char *max_str, uint *min_length, uint *max_length) { @@ -630,13 +629,13 @@ my_bool my_like_range_tis620(CHARSET_INFO *cs __attribute__((unused)), *min_str++= *max_str++ = *ptr; continue; } - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++=max_sort_chr; continue; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { *min_length= (uint) (min_str - min_org); *max_length=res_length; diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 439db91294a..7ae229c0135 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8442,7 +8442,7 @@ CHARSET_INFO my_charset_ujis = 0, /* strxfrm_multiply */ NULL, /* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 3, /* mbmaxlen */ ismbchar_ujis, diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index d561702fc6f..b471a37a852 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1967,7 +1967,7 @@ CHARSET_INFO my_charset_utf8 = 1, /* strxfrm_multiply */ my_strnncoll_utf8, /* strnncoll */ my_strnxfrm_utf8, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 3, /* mbmaxlen */ my_ismbchar_utf8, /* ismbchar */ @@ -2485,7 +2485,7 @@ CHARSET_INFO my_charset_ucs2 = 1, /* strxfrm_multiply */ my_strnncoll_ucs2, /* strnncoll */ my_strnxfrm_ucs2, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ my_ismbchar_ucs2, /* ismbchar */ diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index dbb8d0e1a2f..73e4a5745af 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -555,8 +555,6 @@ static uchar NEAR like_range_prefix_max_win1250ch[] = { #define min_sort_char '\x00' #define max_sort_char '\xff' -#define wild_one '_' -#define wild_many '%' /* ** Calculate min_str and max_str that ranges a LIKE string. @@ -577,7 +575,8 @@ static uchar NEAR like_range_prefix_max_win1250ch[] = { static my_bool my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, uint ptr_length, - pchar escape, uint res_length, + int escape, int w_one, int w_many, + uint res_length, char *min_str, char *max_str, uint *min_length, uint *max_length) { @@ -589,10 +588,10 @@ static my_bool my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)), /* return 1; */ for (; ptr != end && min_str != min_end ; ptr++) { - if (*ptr == wild_one) { /* '_' in SQL */ + if (*ptr == w_one) { /* '_' in SQL */ break; } - if (*ptr == wild_many) { /* '%' in SQL */ + if (*ptr == w_many) { /* '%' in SQL */ break; } if (*ptr == escape && ptr + 1 != end) { /* Skip escape */ diff --git a/strings/ctype.c b/strings/ctype.c index 02774140c8d..7ce259bc00f 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -2822,7 +2822,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -2865,7 +2865,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -2907,7 +2907,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -2949,7 +2949,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -2992,7 +2992,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3034,7 +3034,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3076,7 +3076,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3118,7 +3118,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3161,7 +3161,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3203,7 +3203,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3245,7 +3245,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3287,7 +3287,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3329,7 +3329,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3371,7 +3371,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3413,7 +3413,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3456,7 +3456,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3498,7 +3498,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3541,7 +3541,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3584,7 +3584,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3626,7 +3626,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3668,7 +3668,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3710,7 +3710,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3752,7 +3752,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ From 08253aa93da2f900848d38eeac9393aea01155cc Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 13:58:24 +0400 Subject: [PATCH 143/246] Copy from /sql directory --- client/sql_string.cc | 339 ++++++++++--------------------------------- client/sql_string.h | 5 +- 2 files changed, 76 insertions(+), 268 deletions(-) diff --git a/client/sql_string.cc b/client/sql_string.cc index f0f31004544..5083fb13105 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -93,18 +93,36 @@ bool String::realloc(uint32 alloc_length) bool String::set(longlong num, CHARSET_INFO *cs) { - if (alloc(21)) + uint l=20*cs->mbmaxlen+1; + + if (alloc(l)) return TRUE; - str_length=(uint32) (longlong10_to_str(num,Ptr,-10)-Ptr); + if (cs->snprintf == my_snprintf_8bit) + { + str_length=(uint32) (longlong10_to_str(num,Ptr,-10)-Ptr); + } + else + { + str_length=cs->snprintf(cs,Ptr,l,"%d",num); + } str_charset=cs; return FALSE; } bool String::set(ulonglong num, CHARSET_INFO *cs) { - if (alloc(21)) + uint l=20*cs->mbmaxlen+1; + + if (alloc(l)) return TRUE; - str_length=(uint32) (longlong10_to_str(num,Ptr,10)-Ptr); + if (cs->snprintf == my_snprintf_8bit) + { + str_length=(uint32) (longlong10_to_str(num,Ptr,10)-Ptr); + } + else + { + str_length=cs->snprintf(cs,Ptr,l,"%d",num); + } str_charset=cs; return FALSE; } @@ -117,14 +135,14 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs) if (decimals >= NOT_FIXED_DEC) { sprintf(buff,"%.14g",num); // Enough for a DATETIME - return copy(buff, (uint32) strlen(buff), my_charset_latin1); + return copy(buff, (uint32) strlen(buff), my_charset_latin1, cs); } #ifdef HAVE_FCONVERT int decpt,sign; char *pos,*to; VOID(fconvert(num,(int) decimals,&decpt,&sign,buff+1)); - if (!my_isdigit(system_charset_info, buff[1])) + if (!my_isdigit(my_charset_latin1, buff[1])) { // Nan or Inf pos=buff+1; if (sign) @@ -132,7 +150,7 @@ bool String::set(double num,uint decimals, CHARSET_INFO *cs) buff[0]='-'; pos=buff; } - return copy(pos,(uint32) strlen(pos)); + return copy(pos,(uint32) strlen(pos), my_charset_latin1, cs); } if (alloc((uint32) ((uint32) decpt+3+decimals))) return TRUE; @@ -182,7 +200,7 @@ end: #else sprintf(buff,"%.*f",(int) decimals,num); #endif - return copy(buff,(uint32) strlen(buff), my_charset_latin1); + return copy(buff,(uint32) strlen(buff), my_charset_latin1, cs); #endif } @@ -219,6 +237,55 @@ bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *cs) return FALSE; } +/* Copy with charset convertion */ +bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *from, CHARSET_INFO *to) +{ + uint32 new_length=to->mbmaxlen*arg_length; + int cnvres; + my_wc_t wc; + const uchar *s=(const uchar *)str; + const uchar *se=s+arg_length; + uchar *d, *de; + + if (alloc(new_length)) + return TRUE; + + d=(uchar *)Ptr; + de=d+new_length; + + for (str_length=new_length ; s < se && d < de ; ) + { + if ((cnvres=from->mb_wc(from,&wc,s,se)) > 0 ) + { + s+=cnvres; + } + else if (cnvres==MY_CS_ILSEQ) + { + s++; + wc='?'; + } + else + break; + +outp: + if((cnvres=to->wc_mb(to,wc,d,de)) >0 ) + { + d+=cnvres; + } + else if (cnvres==MY_CS_ILUNI && wc!='?') + { + wc='?'; + goto outp; + } + else + break; + } + Ptr[new_length]=0; + length((uint32) (d-(uchar *)Ptr)); + str_charset=to; + return FALSE; +} + /* This is used by mysql.cc */ bool String::fill(uint32 max_length,char fill_char) @@ -604,261 +671,5 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length) return to; } -/* Make it easier to handle different charactersets */ - -#ifdef USE_MB -#define INC_PTR(cs,A,B) A+=((use_mb_flag && \ - my_ismbchar(cs,A,B)) ? my_ismbchar(cs,A,B) : 1) -#else -#define INC_PTR(cs,A,B) A++ -#endif - -/* -** Compare string against string with wildcard -** 0 if matched -** -1 if not matched with wildcard -** 1 if matched with wildcard -*/ - -#ifdef LIKE_CMP_TOUPPER -#define likeconv(s,A) (uchar) my_toupper(s,A) -#else -#define likeconv(s,A) (uchar) (s)->sort_order[(uchar) (A)] -#endif - -int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *str_end, - const char *wildstr,const char *wildend, - char escape) -{ - int result= -1; // Not found, using wildcards -#ifdef USE_MB - bool use_mb_flag=use_mb(cs); -#endif - while (wildstr != wildend) - { - while (*wildstr != wild_many && *wildstr != wild_one) - { - if (*wildstr == escape && wildstr+1 != wildend) - wildstr++; -#ifdef USE_MB - int l; - if (use_mb_flag && - (l = my_ismbchar(cs, wildstr, wildend))) - { - if (str+l > str_end || memcmp(str, wildstr, l) != 0) - return 1; - str += l; - wildstr += l; - } - else -#endif - if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) - return(1); // No match - if (wildstr == wildend) - return (str != str_end); // Match if both are at end - result=1; // Found an anchor char - } - if (*wildstr == wild_one) - { - do - { - if (str == str_end) // Skip one char if possible - return (result); - INC_PTR(cs,str,str_end); - } while (++wildstr < wildend && *wildstr == wild_one); - if (wildstr == wildend) - break; - } - if (*wildstr == wild_many) - { // Found wild_many - wildstr++; - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ; wildstr++) - { - if (*wildstr == wild_many) - continue; - if (*wildstr == wild_one) - { - if (str == str_end) - return (-1); - INC_PTR(cs,str,str_end); - continue; - } - break; // Not a wild character - } - if (wildstr == wildend) - return(0); // Ok if wild_many is last - if (str == str_end) - return -1; - - uchar cmp; - if ((cmp= *wildstr) == escape && wildstr+1 != wildend) - cmp= *++wildstr; -#ifdef USE_MB - const char* mb = wildstr; - int mblen; - LINT_INIT(mblen); - if (use_mb_flag) - mblen = my_ismbchar(cs, wildstr, wildend); -#endif - INC_PTR(cs,wildstr,wildend); // This is compared trough cmp - cmp=likeconv(cs,cmp); - do - { -#ifdef USE_MB - if (use_mb_flag) - { - for (;;) - { - if (str >= str_end) - return -1; - if (mblen) - { - if (str+mblen <= str_end && memcmp(str, mb, mblen) == 0) - { - str += mblen; - break; - } - } - else if (!my_ismbchar(cs, str, str_end) && - likeconv(cs,*str) == cmp) - { - str++; - break; - } - INC_PTR(cs,str, str_end); - } - } - else - { -#endif /* USE_MB */ - while (str != str_end && likeconv(cs,*str) != cmp) - str++; - if (str++ == str_end) return (-1); -#ifdef USE_MB - } -#endif - { - int tmp=wild_case_compare(cs,str,str_end,wildstr,wildend,escape); - if (tmp <= 0) - return (tmp); - } - } while (str != str_end && wildstr[0] != wild_many); - return(-1); - } - } - return (str != str_end ? 1 : 0); -} - - -int wild_case_compare(String &match,String &wild, char escape) -{ - DBUG_ENTER("wild_case_compare"); - DBUG_PRINT("enter",("match='%s', wild='%s', escape='%c'" - ,match.ptr(),wild.ptr(),escape)); - DBUG_RETURN(wild_case_compare(match.str_charset,match.ptr(),match.ptr()+match.length(), - wild.ptr(), wild.ptr()+wild.length(),escape)); -} - -/* -** The following is used when using LIKE on binary strings -*/ - -int wild_compare(const char *str,const char *str_end, - const char *wildstr,const char *wildend,char escape) -{ - DBUG_ENTER("wild_compare"); - DBUG_PRINT("enter",("str='%s', str_end='%s', wildstr='%s', wildend='%s', escape='%c'" - ,str,str_end,wildstr,wildend,escape)); - int result= -1; // Not found, using wildcards - while (wildstr != wildend) - { - while (*wildstr != wild_many && *wildstr != wild_one) - { - if (*wildstr == escape && wildstr+1 != wildend) - wildstr++; - if (str == str_end || *wildstr++ != *str++) - { - DBUG_RETURN(1); - } - if (wildstr == wildend) - { - DBUG_RETURN(str != str_end); // Match if both are at end - } - result=1; // Found an anchor char - } - if (*wildstr == wild_one) - { - do - { - if (str == str_end) // Skip one char if possible - DBUG_RETURN(result); - str++; - } while (*++wildstr == wild_one && wildstr != wildend); - if (wildstr == wildend) - break; - } - if (*wildstr == wild_many) - { // Found wild_many - wildstr++; - /* Remove any '%' and '_' from the wild search string */ - for (; wildstr != wildend ; wildstr++) - { - if (*wildstr == wild_many) - continue; - if (*wildstr == wild_one) - { - if (str == str_end) - { - DBUG_RETURN(-1); - } - str++; - continue; - } - break; // Not a wild character - } - if (wildstr == wildend) - { - DBUG_RETURN(0); // Ok if wild_many is last - } - if (str == str_end) - { - DBUG_RETURN(-1); - } - char cmp; - if ((cmp= *wildstr) == escape && wildstr+1 != wildend) - cmp= *++wildstr; - wildstr++; // This is compared trough cmp - do - { - while (str != str_end && *str != cmp) - str++; - if (str++ == str_end) - { - DBUG_RETURN(-1); - } - { - int tmp=wild_compare(str,str_end,wildstr,wildend,escape); - if (tmp <= 0) - { - DBUG_RETURN(tmp); - } - } - } while (str != str_end && wildstr[0] != wild_many); - DBUG_RETURN(-1); - } - } - DBUG_RETURN(str != str_end ? 1 : 0); -} - - -int wild_compare(String &match,String &wild, char escape) -{ - DBUG_ENTER("wild_compare"); - DBUG_PRINT("enter",("match='%s', wild='%s', escape='%c'" - ,match.ptr(),wild.ptr(),escape)); - DBUG_RETURN(wild_compare(match.ptr(),match.ptr()+match.length(), - wild.ptr(), wild.ptr()+wild.length(),escape)); -} diff --git a/client/sql_string.h b/client/sql_string.h index 4ac4308f113..42f9e446981 100644 --- a/client/sql_string.h +++ b/client/sql_string.h @@ -28,8 +28,6 @@ class String; int sortcmp(const String *a,const String *b); int stringcmp(const String *a,const String *b); String *copy_if_not_alloced(String *a,String *b,uint32 arg_length); -int wild_case_compare(String &match,String &wild,char escape); -int wild_compare(String &match,String &wild,char escape); class String { @@ -179,6 +177,7 @@ public: bool copy(); // Alloc string if not alloced bool copy(const String &s); // Allocate new string bool copy(const char *s,uint32 arg_length, CHARSET_INFO *cs); // Allocate new string + bool copy(const char*s,uint32 arg_length, CHARSET_INFO *csfrom, CHARSET_INFO *csto); bool append(const String &s); bool append(const char *s,uint32 arg_length=0); bool append(IO_CACHE* file, uint32 arg_length); @@ -207,8 +206,6 @@ public: friend int sortcmp(const String *a,const String *b); friend int stringcmp(const String *a,const String *b); friend String *copy_if_not_alloced(String *a,String *b,uint32 arg_length); - friend int wild_case_compare(String &match,String &wild,char escape); - friend int wild_compare(String &match,String &wild,char escape); uint32 numchars(); int charpos(int i,uint32 offset=0); From a6007a364e556c32977a4c2c08ee7580395b2cc9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 16:45:08 +0400 Subject: [PATCH 144/246] fix for NULL processing --- heap/heapdef.h | 3 ++- heap/hp_hash.c | 29 +++++++++++++++++------------ heap/hp_rkey.c | 6 ++---- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/heap/heapdef.h b/heap/heapdef.h index b651bf4bcb1..63109badb05 100644 --- a/heap/heapdef.h +++ b/heap/heapdef.h @@ -97,7 +97,8 @@ extern uint hp_rb_null_key_length(HP_KEYDEF *keydef, const byte *key); extern my_bool hp_if_null_in_key(HP_KEYDEF *keyinfo, const byte *record); extern int hp_close(register HP_INFO *info); extern void hp_clear(HP_SHARE *info); -extern uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old); +extern uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old, + uint k_len); #ifdef THREAD extern pthread_mutex_t THR_LOCK_heap; #else diff --git a/heap/hp_hash.c b/heap/hp_hash.c index e28f4725caf..946659621fe 100644 --- a/heap/hp_hash.c +++ b/heap/hp_hash.c @@ -30,27 +30,27 @@ ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, const byte *start_key, TREE *rb_tree = &keyinfo->rb_tree; heap_rb_param custom_arg; - info->lastinx = inx; - custom_arg.keyseg = keyinfo->seg; - custom_arg.search_flag = SEARCH_FIND | SEARCH_SAME; - custom_arg.key_length = start_key_len; + info->lastinx= inx; + custom_arg.keyseg= keyinfo->seg; + custom_arg.search_flag= SEARCH_FIND | SEARCH_SAME; if (start_key) { - hp_rb_pack_key(keyinfo, info->recbuf, start_key); + custom_arg.key_length= hp_rb_pack_key(keyinfo, info->recbuf, start_key, + start_key_len); start_pos= tree_record_pos(rb_tree, info->recbuf, start_search_flag, - &custom_arg); + &custom_arg); } else { start_pos= 0; } - custom_arg.key_length = end_key_len; if (end_key) { - hp_rb_pack_key(keyinfo, info->recbuf, end_key); + custom_arg.key_length= hp_rb_pack_key(keyinfo, info->recbuf, end_key, + end_key_len); end_pos= tree_record_pos(rb_tree, info->recbuf, end_search_flag, - &custom_arg); + &custom_arg); } else { @@ -450,21 +450,26 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, byte *key, return key - start_key; } -uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old) +uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old, uint k_len) { HA_KEYSEG *seg, *endseg; uchar *start_key= key; - for (seg= keydef->seg, endseg= seg + keydef->keysegs; seg < endseg; - old+= seg->length, seg++) + for (seg= keydef->seg, endseg= seg + keydef->keysegs; + seg < endseg && (int) k_len > 0; old+= seg->length, seg++) { if (seg->null_bit) { + k_len--; if (!(*key++= (char) 1 - *old++)) + { + k_len-= seg->length; continue; + } } memcpy((byte*) key, old, seg->length); key+= seg->length; + k_len-= seg->length; } return key - start_key; } diff --git a/heap/hp_rkey.c b/heap/hp_rkey.c index 4e47fd52e9b..92d2982a457 100644 --- a/heap/hp_rkey.c +++ b/heap/hp_rkey.c @@ -36,10 +36,9 @@ int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key, { heap_rb_param custom_arg; - hp_rb_pack_key(keyinfo, info->recbuf, key); - custom_arg.keyseg= info->s->keydef[inx].seg; - custom_arg.key_length= key_len; + custom_arg.key_length= info->lastkey_len= + hp_rb_pack_key(keyinfo, info->recbuf, key, key_len); custom_arg.search_flag= SEARCH_FIND | SEARCH_SAME; /* for next rkey() after deletion */ if (find_flag == HA_READ_AFTER_KEY) @@ -48,7 +47,6 @@ int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key, info->last_find_flag= HA_READ_KEY_OR_PREV; else info->last_find_flag= find_flag; - info->lastkey_len= key_len; if (!(pos= tree_search_key(&keyinfo->rb_tree, info->recbuf, info->parents, &info->last_pos, find_flag, &custom_arg))) { From ecd4ac2a3c16db45653b74e8b73dcc7815fd42f5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 17:34:10 +0400 Subject: [PATCH 145/246] test for NULL processing has been added --- mysql-test/r/heap_btree.result | 14 ++++++++++++++ mysql-test/t/heap_btree.test | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result index 12d07bf6660..a33f237a312 100644 --- a/mysql-test/r/heap_btree.result +++ b/mysql-test/r/heap_btree.result @@ -213,6 +213,20 @@ a b INSERT INTO t1 VALUES (1,3); Duplicate entry '3' for key 1 DROP TABLE t1; +CREATE TABLE t1 (a int, b int, c int, key using BTREE (a, b, c)) type=heap; +INSERT INTO t1 VALUES (1, NULL, NULL), (1, 1, NULL), (1, NULL, 1); +SELECT * FROM t1 WHERE a=1 and b IS NULL; +a b c +1 NULL NULL +1 NULL 1 +SELECT * FROM t1 WHERE a=1 and c IS NULL; +a b c +1 NULL NULL +1 1 NULL +SELECT * FROM t1 WHERE a=1 and b IS NULL and c IS NULL; +a b c +1 NULL NULL +DROP TABLE t1; CREATE TABLE t1 (a int not null, primary key using BTREE (a)) type=heap; INSERT into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11); DELETE from t1 where a < 100; diff --git a/mysql-test/t/heap_btree.test b/mysql-test/t/heap_btree.test index 3dd22f2da03..5c0002fede4 100644 --- a/mysql-test/t/heap_btree.test +++ b/mysql-test/t/heap_btree.test @@ -137,6 +137,13 @@ SELECT * FROM t1 WHERE b<=>NULL; INSERT INTO t1 VALUES (1,3); DROP TABLE t1; +CREATE TABLE t1 (a int, b int, c int, key using BTREE (a, b, c)) type=heap; +INSERT INTO t1 VALUES (1, NULL, NULL), (1, 1, NULL), (1, NULL, 1); +SELECT * FROM t1 WHERE a=1 and b IS NULL; +SELECT * FROM t1 WHERE a=1 and c IS NULL; +SELECT * FROM t1 WHERE a=1 and b IS NULL and c IS NULL; +DROP TABLE t1; + # # Test when deleting all rows # From 183a207fd7bc734a1747fa9cfe0eae194d2d1b50 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 16:37:44 +0200 Subject: [PATCH 146/246] few small bug fixes ... sql/sql_delete.cc: A better fix for safe updates sql/sql_table.cc: A fix for foreign key handling ... --- sql/sql_delete.cc | 2 +- sql/sql_table.cc | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index c3e52f42dcd..2d869fdda49 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -90,7 +90,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, if (!table->quick_keys) { thd->lex.select_lex.options|=QUERY_NO_INDEX_USED; - if (safe_update && use_limit) + if (safe_update && !using_limit) { delete select; send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 5187351258e..abb4cf8d3f9 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -523,19 +523,19 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, key_iterator.rewind(); key_number=0; - for (; (key=key_iterator++) ; key_info++, key_number++) + for (; (key=key_iterator++) ; key_number++) { uint key_length=0; key_part_spec *column; switch(key->type){ - case Key::MULTIPLE: + case Key::MULTIPLE: key_info->flags = 0; break; - case Key::FULLTEXT: + case Key::FULLTEXT: key_info->flags = HA_FULLTEXT; break; - case Key::SPATIAL: + case Key::SPATIAL: key_info->flags = HA_SPATIAL; break; case Key::FOREIGN_KEY: @@ -734,6 +734,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, my_error(ER_TOO_LONG_KEY,MYF(0),max_key_length); DBUG_RETURN(-1); } + key_info++; } if (!unique_key && !primary_key && (file->table_flags() & HA_REQUIRE_PRIMARY_KEY)) From 6e289b7d06721e84665491e55b5287a8a2fa11ec Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 18:46:23 +0200 Subject: [PATCH 147/246] ha_innodb.cc: Fix bug intoduced in 4.0.4 in REPLACE and AUTO_INCREMENT: if replace did an update, then auto-inc counter was left 1 too low sql/ha_innodb.cc: Fix bug intoduced in 4.0.4 in REPLACE and AUTO_INCREMENT: if replace did an update, then auto-inc counter was left 1 too low --- sql/ha_innodb.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index d4e5d0e43cf..d473d27e1fc 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1697,6 +1697,7 @@ ha_innobase::write_row( longlong dummy; ibool incremented_auto_inc_for_stat = FALSE; ibool incremented_auto_inc_counter = FALSE; + ibool skip_auto_inc_decr; DBUG_ENTER("ha_innobase::write_row"); @@ -1861,13 +1862,25 @@ ha_innobase::write_row( if (error != DB_SUCCESS) { /* If the insert did not succeed we restore the value of the auto-inc counter we used; note that this behavior was - introduced only in version 4.0.4 */ + introduced only in version 4.0.4. + NOTE that a REPLACE command handles a duplicate key error + itself, and we must not decrement the autoinc counter + if we are performing a REPLACE statement. This was fixed + in 4.0.6. */ - if (incremented_auto_inc_counter) { + skip_auto_inc_decr = FALSE; + + if (error == DB_DUPLICATE_KEY) { + ut_a(user_thd->query); + dict_accept(user_thd->query, "REPLACE", + &skip_auto_inc_decr); + } + + if (!skip_auto_inc_decr && incremented_auto_inc_counter) { dict_table_autoinc_decrement(prebuilt->table); } - if (incremented_auto_inc_for_stat) { + if (!skip_auto_inc_decr && incremented_auto_inc_for_stat) { auto_inc_counter_for_this_stat--; } } From 27b7b8abbd399982ffb8a16cf3dd2ac882acca57 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 19:58:07 +0200 Subject: [PATCH 148/246] A fix for the bug when MyISAM tmp table has to be created in order to resolve derived table. Will make a test case for this quite soon. --- sql/sql_derived.cc | 3 ++- sql/sql_union.cc | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 7cbc1ea6db3..44183a95473 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -88,6 +88,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) if ((derived_result=new select_union(table))) { + derived_result->tmp_table_param=&tmp_table_param; unit->offset_limit_cnt= sl->offset_limit; unit->select_limit_cnt= sl->select_limit+sl->offset_limit; if (unit->select_limit_cnt < sl->select_limit) @@ -118,7 +119,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) table->tmp_table=TMP_TABLE; if (!lex->describe) sl->exclude(); - t->db=""; + t->db=(char *)""; t->derived=(SELECT_LEX *)0; // just in case ... } } diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 53f89747ce7..f48b879838f 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -80,6 +80,7 @@ bool select_union::send_data(List &values) { if (create_myisam_from_heap(table, tmp_table_param, info.last_errno, 0)) return 1; + thd->net.report_error=0; // donno why does it work, but it does ... } return 0; } From d798928d0e248b8d7c0bc38f38388f7854d85429 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 22:01:28 +0200 Subject: [PATCH 149/246] A fix for safe updates --- sql/sql_delete.cc | 8 ++++---- sql/sql_update.cc | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index c40e8a4e947..8fd8488ffa3 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -35,13 +35,13 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, SQL_SELECT *select=0; READ_RECORD info; bool using_limit=limit != HA_POS_ERROR; - bool transactional_table, log_delayed; + bool transactional_table, log_delayed, safe_update; ha_rows deleted; DBUG_ENTER("mysql_delete"); if (!table_list->db) table_list->db=thd->db; - if ((thd->options & OPTION_SAFE_UPDATES) && !conds) + if (((safe_update=thd->options & OPTION_SAFE_UPDATES)) && !conds) { send_error(&thd->net,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); DBUG_RETURN(1); @@ -57,7 +57,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, /* Test if the user wants to delete all rows */ if (!using_limit && (!conds || conds->const_item()) && - !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE))) + !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) && !safe_update) { deleted= table->file->records; if (!(error=table->file->delete_all_rows())) @@ -91,7 +91,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, if (!table->quick_keys) { thd->lex.select_lex.options|=QUERY_NO_INDEX_USED; - if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR) + if (safe_update && !using_limit) { delete select; send_error(&thd->net,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 0b440eb3060..f2d2b71bd5b 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -53,7 +53,7 @@ int mysql_update(THD *thd, enum enum_duplicates handle_duplicates, thr_lock_type lock_type) { - bool using_limit=limit != HA_POS_ERROR; + bool using_limit=limit != HA_POS_ERROR, safe_update= thd->options & OPTION_SAFE_UPDATES; bool used_key_is_modified, transactional_table, log_delayed; int error=0; uint save_time_stamp, used_index, want_privilege; @@ -117,9 +117,7 @@ int mysql_update(THD *thd, table->used_keys=0; select=make_select(table,0,0,conds,&error); if (error || - (select && select->check_quick(test(thd->options & OPTION_SAFE_UPDATES), - limit)) || - !limit) + (select && select->check_quick(safe_update, limit)) || !limit) { delete select; table->time_stamp=save_time_stamp; // Restore timestamp pointer @@ -134,7 +132,7 @@ int mysql_update(THD *thd, if (!table->quick_keys) { thd->lex.select_lex.options|=QUERY_NO_INDEX_USED; - if ((thd->options & OPTION_SAFE_UPDATES) && limit == HA_POS_ERROR) + if (safe_update && !using_limit) { delete select; table->time_stamp=save_time_stamp; From c17c9620efb0c7b4fe7efbe747bc918310771bbc Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 22:59:16 +0200 Subject: [PATCH 150/246] ha_innodb.cc: Fix another bug introduced in 4.0.4 in AUTO_INCREMENT and deadlock or lock wait timeout sql/ha_innodb.cc: Fix another bug introduced in 4.0.4 in AUTO_INCREMENT and deadlock or lock wait timeout --- sql/ha_innodb.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index d473d27e1fc..46ddeb2c027 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1800,6 +1800,8 @@ ha_innobase::write_row( goto func_exit; } + printf("Updated value to %lu + 1\n", (ulint)auto_inc); + dict_table_autoinc_update(prebuilt->table, auto_inc); } else { srv_conc_enter_innodb(prebuilt->trx); @@ -1865,8 +1867,12 @@ ha_innobase::write_row( introduced only in version 4.0.4. NOTE that a REPLACE command handles a duplicate key error itself, and we must not decrement the autoinc counter - if we are performing a REPLACE statement. This was fixed - in 4.0.6. */ + if we are performing a REPLACE statement. + NOTE 2: if there was an error, for example a deadlock, + which caused InnoDB to roll back the whole transaction + already in the call of row_insert_for_mysql(), we may no + longer have the AUTO-INC lock, and cannot decrement + the counter here. */ skip_auto_inc_decr = FALSE; @@ -1876,11 +1882,13 @@ ha_innobase::write_row( &skip_auto_inc_decr); } - if (!skip_auto_inc_decr && incremented_auto_inc_counter) { + if (!skip_auto_inc_decr && incremented_auto_inc_counter + && prebuilt->trx->auto_inc_lock) { dict_table_autoinc_decrement(prebuilt->table); } - if (!skip_auto_inc_decr && incremented_auto_inc_for_stat) { + if (!skip_auto_inc_decr && incremented_auto_inc_for_stat + && prebuilt->trx->auto_inc_lock) { auto_inc_counter_for_this_stat--; } } From 744000cd8e067031ea02bfb869206cbf4b448e1f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Nov 2002 23:10:51 +0200 Subject: [PATCH 151/246] ha_innodb.cc: Remove unintentionally pushed printf sql/ha_innodb.cc: Remove unintentionally pushed printf --- sql/ha_innodb.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 46ddeb2c027..333e971e520 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -1800,8 +1800,6 @@ ha_innobase::write_row( goto func_exit; } - printf("Updated value to %lu + 1\n", (ulint)auto_inc); - dict_table_autoinc_update(prebuilt->table, auto_inc); } else { srv_conc_enter_innodb(prebuilt->trx); From 49aefe3fb75a9dbe19b2615bb922132433586c25 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 16 Nov 2002 00:01:48 +0200 Subject: [PATCH 152/246] Fixed bugs pointed by "Crash with 'big' derivated table in MySQL-4.1" bugreport - fixed switching from heap to MyISAM table - fixed error handler sql/sql_derived.cc: A fix for the bug when MyISAM tmp table has to be created in order to resolve derived table. fixed error handler sql/sql_parse.cc: fixed error handler sql/sql_union.cc: fixed switching from heap to MyISAM table --- sql/sql_derived.cc | 3 +-- sql/sql_parse.cc | 2 +- sql/sql_union.cc | 8 +++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 7cbc1ea6db3..56636f299a7 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -88,6 +88,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) if ((derived_result=new select_union(table))) { + derived_result->tmp_table_param=&tmp_table_param; unit->offset_limit_cnt= sl->offset_limit; unit->select_limit_cnt= sl->select_limit+sl->offset_limit; if (unit->select_limit_cnt < sl->select_limit) @@ -128,8 +129,6 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) free_tmp_table(thd,table); exit: close_thread_tables(thd); - if (res > 0) - send_error(thd, ER_UNKNOWN_COM_ERROR); // temporary only ... } DBUG_RETURN(res); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8df74f332eb..4d6fad17144 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1344,7 +1344,7 @@ mysql_execute_command(THD *thd) cursor->derived, cursor))) { - if (res < 0) + if (res < 0 || thd->net.report_error) send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN : 0); DBUG_VOID_RETURN; } diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 53f89747ce7..0e6de306c0d 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -78,7 +78,13 @@ bool select_union::send_data(List &values) fill_record(table->field,values); if ((write_record(table,&info))) { - if (create_myisam_from_heap(table, tmp_table_param, info.last_errno, 0)) + if (thd->net.last_errno == ER_RECORD_FILE_FULL) + { + thd->clear_error(); // do not report user about table overflow + if (create_myisam_from_heap(table, tmp_table_param, info.last_errno, 0)) + return 1; + } + else return 1; } return 0; From 2c349012b0dd6b51021b7c6e2115081e0c9b24df Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 16 Nov 2002 01:59:04 +0200 Subject: [PATCH 153/246] srv0start.c: Print an error message if someone tries to call InnoDB startip more than once during process lifetime innobase/srv/srv0start.c: Print an error message if someone tries to call InnoDB startip more than once during process lifetime --- innobase/srv/srv0start.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c index d006b4ec915..d6e8a8dcb4a 100644 --- a/innobase/srv/srv0start.c +++ b/innobase/srv/srv0start.c @@ -56,6 +56,8 @@ Created 2/16/1996 Heikki Tuuri #include "srv0start.h" #include "que0que.h" +ibool srv_start_has_been_called = FALSE; + ulint srv_sizeof_trx_t_in_ha_innodb_cc; ibool srv_startup_is_before_trx_rollback_phase = FALSE; @@ -971,6 +973,20 @@ innobase_start_or_create_for_mysql(void) return(DB_ERROR); } + /* Since InnoDB does not currently clean up all its internal data + structures in MySQL Embedded Server Library server_end(), we + print an error message if someone tries to start up InnoDB a + second time during the process lifetime. */ + + if (srv_start_has_been_called) { + fprintf(stderr, +"InnoDB: Error:startup called second time during the process lifetime.\n" +"InnoDB: In the MySQL Embedded Server Library you cannot call server_init()\n" +"InnoDB: more than once during the process lifetime.\n"); + } + + srv_start_has_been_called = TRUE; + log_do_write = TRUE; /* yydebug = TRUE; */ From a40a9d59161e2de19551b0bd1ad016681741e918 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 16 Nov 2002 16:41:29 +0200 Subject: [PATCH 154/246] Some new tests................... mysql-test/r/derived.result: A test for derived table which requires creation on temporary MyISAM table ... mysql-test/r/select_found.result: A test for LIMIT ) mysql-test/t/derived.test: A test for derived table which requires creation on temporary MyISAM table ... mysql-test/t/select_found.test: A test for LIMIT 0 --- mysql-test/r/derived.result | 25 +++++++++++++++++++++++++ mysql-test/r/select_found.result | 10 ++++++++++ mysql-test/t/derived.test | 12 ++++++++++++ mysql-test/t/select_found.test | 4 ++++ 4 files changed, 51 insertions(+) diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 0290d0755d5..204ca86f306 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -40,3 +40,28 @@ a select 1 from (select 1); 1 1 +drop table if exists t1; +create table t1(a int not null, t char(8), index(a)); +SELECT * FROM (SELECT * FROM t1) ORDER BY a ASC LIMIT 0,20; +a t +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +20 20 +drop table if exists t1; diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 1c2cd7da894..6fb9ea0ee0b 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -168,4 +168,14 @@ test2 2 2 SELECT FOUND_ROWS(); FOUND_ROWS() 2 +SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0; +1 +SELECT FOUND_ROWS(); +FOUND_ROWS() +1 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0; +titre numeropost maxnumrep +SELECT FOUND_ROWS(); +FOUND_ROWS() +3 drop table t1; diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index 501d4db26fa..de765a0e280 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -22,3 +22,15 @@ drop table if exists t1.t2,t3; select * from (select 1); select a from (select 1 as a); select 1 from (select 1); +drop table if exists t1; +create table t1(a int not null, t char(8), index(a)); +disable_query_log; +let $1 = 10000; +while ($1) + { + eval insert into t1 values ($1,'$1'); + dec $1; + } +enable_query_log; +SELECT * FROM (SELECT * FROM t1) ORDER BY a ASC LIMIT 0,20; +drop table if exists t1; \ No newline at end of file diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index 0a483c860cb..c67c99924c3 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -84,4 +84,8 @@ INSERT INTO t1 (titre,maxnumrep) VALUES ('test1','1'),('test2','2'),('test3','3'); SELECT SQL_CALC_FOUND_ROWS titre,numeropost,maxnumrep FROM t1 WHERE numeropost IN (1,2) ORDER BY maxnumrep DESC LIMIT 0, 1; SELECT FOUND_ROWS(); +SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0; +SELECT FOUND_ROWS(); +SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0; +SELECT FOUND_ROWS(); drop table t1; From bd1c2d65c46a433e4ea53858584dc987b1b75658 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 16 Nov 2002 20:19:10 +0200 Subject: [PATCH 155/246] Small improvement to alloc_root Add support for LIMIT # OFFSET # Changed lock handling: Now all locks should be stored in TABLE_LIST instead of passed to functions. Don't call query_cache_invalidate() twice in some cases mysql_change_user() now clears states to be equal to close + connect. Fixed a bug with multi-table-update and multi-table-delete when used with LOCK TABLES Fixed a bug with replicate-do and UPDATE BitKeeper/etc/ignore: added autom4te.cache/* bdb/dist/autom4te.cache/* innobase/autom4te.cache/* include/my_alloc.h: Small improvement to alloc_root libmysql/libmysql.c: Removed compiler warning myisam/mi_page.c: Better DBUG message mysql-test/r/multi_update.result: Added test with lock tables mysql-test/r/rpl_replicate_do.result: Update results mysql-test/r/rpl_rotate_logs.result: Make test independent of if t1 exists mysql-test/t/multi_update.test: Added test with lock tables mysql-test/t/rpl_rotate_logs.test: Make test independent of if t1 exists mysys/my_alloc.c: Small imprevement to alloc_root (Don't free blocks less than ALLOC_MAX_BLOCK_ROOT (4K) sql/ha_innodb.cc: More debug messages sql/ha_myisam.cc: Safety change sql/lex.h: Add support for LIMIT # OFFSET # sql/lock.cc: Added assertion sql/mysql_priv.h: Change of lock handling sql/mysqld.cc: Added function clear_error_messages() sql/sql_base.cc: Change lock handling by open_ltable() and open_and_lock_tables() sql/sql_class.cc: Split THD::THD to two functions Move some code from cleanup() to ~THD:THD Add THD::change_user() sql/sql_class.h: Prototype changes in class THD sql/sql_delete.cc: Remove locking argument from mysql_delete() Locking type is now stored in TABLE_LIST Small code change to not call query_cache_invalidate() twice for transactional tables. sql/sql_insert.cc: Remove locking argument from mysql_insert() Locking type is now stored in TABLE_LIST Small code change to not call query_cache_invalidate() twice for transactional tables. Don't use bulk insert if bulk_insert_buff_size is 0 sql/sql_parse.cc: Changes to make mysql_change_user() work as close+connect Changed command statistics to use statstics_increment to get more speed Update code to handle that locks is now stored in TABLE_LIST sql/sql_update.cc: Remove locking argument from mysql_update() Locking type is now stored in TABLE_LIST Small code change to not call query_cache_invalidate() twice for transactional tables. sql/sql_yacc.yy: Locking type is now stored in TABLE_LIST Added support for LIMIT # OFFSET # syntax Removed some wrong (never true) checks for SQLCOM_MULTI_UPDATE mysql-test/t/rpl_replicate_do-slave.opt: Changed tables to use t1,t2,... mysql-test/t/rpl_replicate_do.test: Changed tables to use t1,t2,... --- .bzrignore | 3 + include/my_alloc.h | 3 +- libmysql/libmysql.c | 1 + myisam/mi_page.c | 4 +- mysql-test/r/multi_update.result | 27 ++++- mysql-test/r/rpl000007.result | 20 ---- mysql-test/r/rpl_replicate_do.result | 28 +++++ mysql-test/r/rpl_rotate_logs.result | 3 +- mysql-test/t/multi_update.test | 28 ++++- mysql-test/t/rpl000007-slave.opt | 1 - mysql-test/t/rpl000007.test | 24 ----- mysql-test/t/rpl_replicate_do-slave.opt | 1 + mysql-test/t/rpl_replicate_do.test | 30 ++++++ mysql-test/t/rpl_rotate_logs.test | 4 +- mysys/my_alloc.c | 15 ++- sql/ha_innodb.cc | 1 + sql/ha_myisam.cc | 2 +- sql/lex.h | 1 + sql/lock.cc | 1 + sql/mysql_priv.h | 11 +- sql/mysqld.cc | 11 ++ sql/sql_base.cc | 124 +++++++++++++++------ sql/sql_class.cc | 80 ++++++++++---- sql/sql_class.h | 9 +- sql/sql_delete.cc | 30 ++++-- sql/sql_insert.cc | 24 +++-- sql/sql_parse.cc | 136 ++++++++++++++---------- sql/sql_update.cc | 31 ++++-- sql/sql_yacc.yy | 136 +++++++++++++++--------- 29 files changed, 525 insertions(+), 264 deletions(-) delete mode 100644 mysql-test/r/rpl000007.result create mode 100644 mysql-test/r/rpl_replicate_do.result delete mode 100644 mysql-test/t/rpl000007-slave.opt delete mode 100644 mysql-test/t/rpl000007.test create mode 100644 mysql-test/t/rpl_replicate_do-slave.opt create mode 100644 mysql-test/t/rpl_replicate_do.test diff --git a/.bzrignore b/.bzrignore index d1ea6c7d70e..76725c4017e 100644 --- a/.bzrignore +++ b/.bzrignore @@ -497,3 +497,6 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +autom4te.cache/* +bdb/dist/autom4te.cache/* +innobase/autom4te.cache/* diff --git a/include/my_alloc.h b/include/my_alloc.h index 31f1fb7165f..a3dd35d7ea3 100644 --- a/include/my_alloc.h +++ b/include/my_alloc.h @@ -21,7 +21,8 @@ #ifndef _my_alloc_h #define _my_alloc_h -#define MAX_BLOCK_USAGE_BEFORE_DROP 10 +#define ALLOC_MAX_BLOCK_TO_DROP 4096 +#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 typedef struct st_used_mem { /* struct for once_alloc (block) */ diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index c9fb2f84a3c..c9a46eaf9ad 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1524,6 +1524,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, #endif init_sigpipe_variables DBUG_ENTER("mysql_real_connect"); + LINT_INIT(host_info); DBUG_PRINT("enter",("host: %s db: %s user: %s", host ? host : "(Null)", diff --git a/myisam/mi_page.c b/myisam/mi_page.c index 064e9239e73..1d40980e309 100644 --- a/myisam/mi_page.c +++ b/myisam/mi_page.c @@ -66,7 +66,9 @@ int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo, page+keyinfo->block_length > info->state->key_file_length || (page & (MI_MIN_KEY_BLOCK_LENGTH-1))) { - DBUG_PRINT("error",("Trying to write inside key status region: %lu", + DBUG_PRINT("error",("Trying to write inside key status region: key_start: %lu length: %lu page: %lu", + (long) info->s->base.keystart, + (long) info->state->key_file_length, (long) page)); my_errno=EINVAL; return(-1); diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 9dff4fba825..ce3f7e90f6b 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -150,4 +150,29 @@ n n delete t1,t2 from t2 left outer join t1 using (n); select * from t2 left outer join t1 using (n); n n -drop table if exists t1,t2 ; +drop table t1,t2 ; +create table t1 (n int(10) not null primary key, d int(10)); +create table t2 (n int(10) not null primary key, d int(10)); +insert into t1 values(1,1); +insert into t2 values(1,10),(2,20); +LOCK TABLES t1 write, t2 read; +DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n; +Table 't2' was locked with a READ lock and can't be updated +UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; +Table 't2' was locked with a READ lock and can't be updated +UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; +Table 't2' was locked with a READ lock and can't be updated +unlock tables; +LOCK TABLES t1 write, t2 write; +UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; +select * from t1; +n d +1 10 +DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n; +select * from t1; +n d +select * from t2; +n d +2 20 +unlock tables; +drop table t1,t2; diff --git a/mysql-test/r/rpl000007.result b/mysql-test/r/rpl000007.result deleted file mode 100644 index c2823bf1203..00000000000 --- a/mysql-test/r/rpl000007.result +++ /dev/null @@ -1,20 +0,0 @@ -slave stop; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -slave start; -drop table if exists foo; -create table foo (n int); -insert into foo values(4); -drop table if exists foo; -create table foo (s char(20)); -load data infile '../../std_data/words.dat' into table foo; -insert into foo values('five'); -drop table if exists bar; -create table bar (m int); -insert into bar values(15); -select foo.n,bar.m from foo,bar; -n m -4 15 -drop table if exists bar,foo; diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result new file mode 100644 index 00000000000..372d8c07f64 --- /dev/null +++ b/mysql-test/r/rpl_replicate_do.result @@ -0,0 +1,28 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +drop table if exists t11; +drop table if exists t11; +create table t2 (n int); +insert into t2 values(4); +create table t2 (s char(20)); +load data infile '../../std_data/words.dat' into table t2; +insert into t2 values('five'); +create table t1 (m int); +insert into t1 values(15),(16),(17); +update t1 set m=20 where m=16; +delete from t1 where m=17; +create table t11 select * from t1; +select * from t1; +m +15 +20 +select * from t2; +n +4 +select * from t11; +Table 'test.t11' doesn't exist +drop table if exists t1,t2,t3,t11; diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index 63d5b0b63e1..741c53fe52b 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -1,3 +1,5 @@ +drop table if exists t1, t2, t3, t4; +drop table if exists t1, t2, t3, t4; slave start; Could not initialize master info structure, check permisions on master.info slave start; @@ -8,7 +10,6 @@ reset slave; change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; reset master; slave start; -drop table if exists t1, t2, t3, t4; create temporary table temp_table (a char(80) not null); insert into temp_table values ("testing temporary tables"); create table t1 (s text); diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 7d855dd54ea..b3a51ff65bc 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -147,4 +147,30 @@ insert into t2 values (1),(2),(4),(8),(16),(32); select * from t2 left outer join t1 using (n); delete t1,t2 from t2 left outer join t1 using (n); select * from t2 left outer join t1 using (n); -drop table if exists t1,t2 ; +drop table t1,t2 ; + +# +# Test with locking +# + +create table t1 (n int(10) not null primary key, d int(10)); +create table t2 (n int(10) not null primary key, d int(10)); +insert into t1 values(1,1); +insert into t2 values(1,10),(2,20); +LOCK TABLES t1 write, t2 read; +--error 1099 +DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n; +--error 1099 +UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; +# The following should be fixed to not give an error +--error 1099 +UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; +unlock tables; +LOCK TABLES t1 write, t2 write; +UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; +select * from t1; +DELETE t1.*, t2.* FROM t1,t2 where t1.n=t2.n; +select * from t1; +select * from t2; +unlock tables; +drop table t1,t2; diff --git a/mysql-test/t/rpl000007-slave.opt b/mysql-test/t/rpl000007-slave.opt deleted file mode 100644 index 9ff99337d1f..00000000000 --- a/mysql-test/t/rpl000007-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---replicate-do-table=test.bar diff --git a/mysql-test/t/rpl000007.test b/mysql-test/t/rpl000007.test deleted file mode 100644 index 8ff1e1782cc..00000000000 --- a/mysql-test/t/rpl000007.test +++ /dev/null @@ -1,24 +0,0 @@ -#this one assumes we are ignoring updates on table foo, but doing -#the ones on bar -source include/master-slave.inc; -connection slave; -drop table if exists foo; -create table foo (n int); -insert into foo values(4); -connection master; -drop table if exists foo; -create table foo (s char(20)); -load data infile '../../std_data/words.dat' into table foo; -insert into foo values('five'); -drop table if exists bar; -create table bar (m int); -insert into bar values(15); -save_master_pos; -connection slave; -sync_with_master; -select foo.n,bar.m from foo,bar; -connection master; -drop table if exists bar,foo; -save_master_pos; -connection slave; -sync_with_master; diff --git a/mysql-test/t/rpl_replicate_do-slave.opt b/mysql-test/t/rpl_replicate_do-slave.opt new file mode 100644 index 00000000000..da345474216 --- /dev/null +++ b/mysql-test/t/rpl_replicate_do-slave.opt @@ -0,0 +1 @@ +--replicate-do-table=test.t1 diff --git a/mysql-test/t/rpl_replicate_do.test b/mysql-test/t/rpl_replicate_do.test new file mode 100644 index 00000000000..0800062dc05 --- /dev/null +++ b/mysql-test/t/rpl_replicate_do.test @@ -0,0 +1,30 @@ +# This test assumes we are ignoring updates on table t2, but doing +# updates on t1 + +source include/master-slave.inc; +drop table if exists t11; +connection slave; +drop table if exists t11; +create table t2 (n int); +insert into t2 values(4); +connection master; +create table t2 (s char(20)); +load data infile '../../std_data/words.dat' into table t2; +insert into t2 values('five'); +create table t1 (m int); +insert into t1 values(15),(16),(17); +update t1 set m=20 where m=16; +delete from t1 where m=17; +create table t11 select * from t1; +save_master_pos; +connection slave; +sync_with_master; +select * from t1; +select * from t2; +--error 1146 +select * from t11; +connection master; +drop table if exists t1,t2,t3,t11; +save_master_pos; +connection slave; +sync_with_master; diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test index 5d8f150cdea..a9bb98932ed 100644 --- a/mysql-test/t/rpl_rotate_logs.test +++ b/mysql-test/t/rpl_rotate_logs.test @@ -10,10 +10,12 @@ # - Test creating a duplicate key error and recover from it # connect (master,localhost,root,,test,0,master.sock); +drop table if exists t1, t2, t3, t4; connect (slave,localhost,root,,test,0,slave.sock); system cat /dev/null > var/slave-data/master.info; system chmod 000 var/slave-data/master.info; connection slave; +drop table if exists t1, t2, t3, t4; --error 1201 slave start; system chmod 600 var/slave-data/master.info; @@ -31,8 +33,6 @@ connection slave; slave start; connection master; -drop table if exists t1, t2, t3, t4; - # # Test FLUSH LOGS # diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index f494cce8dbe..1ab86476e41 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -29,7 +29,7 @@ void init_alloc_root(MEM_ROOT *mem_root, uint block_size, mem_root->min_malloc= 32; mem_root->block_size= block_size-MALLOC_OVERHEAD-sizeof(USED_MEM)-8; mem_root->error_handler= 0; - mem_root->block_num= 0; + mem_root->block_num= 4; /* We shift this with >>2 */ mem_root->first_block_usage= 0; #if !(defined(HAVE_purify) && defined(EXTRA_DEBUG)) if (pre_alloc_size) @@ -69,10 +69,11 @@ gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size) reg2 USED_MEM **prev; Size= ALIGN_SIZE(Size); - if ( (*(prev= &mem_root->free)) != NULL ) + if ((*(prev= &mem_root->free)) != NULL) { - if( (*prev)->left < Size && - mem_root->first_block_usage++ >= MAX_BLOCK_USAGE_BEFORE_DROP ) + if ((*prev)->left < Size && + mem_root->first_block_usage++ >= ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP && + (*prev)->left < ALLOC_MAX_BLOCK_TO_DROP) { next= *prev; *prev= next->next; /* Remove block from list */ @@ -85,7 +86,7 @@ gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size) } if (! next) { /* Time to alloc new block */ - block_size= mem_root->block_size*((mem_root->block_num>>2)+1); + block_size= mem_root->block_size * (mem_root->block_num >> 2); get_size= Size+ALIGN_SIZE(sizeof(USED_MEM)); get_size= max(get_size, block_size); @@ -177,10 +178,8 @@ void free_root(MEM_ROOT *root, myf MyFlags) root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(USED_MEM)); root->free->next=0; - root->block_num= 1; } - else - root->block_num= 0; + root->block_num= 4; root->first_block_usage= 0; DBUG_VOID_RETURN; } diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index d4e5d0e43cf..2ce7736001b 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3785,6 +3785,7 @@ ha_innobase::external_lock( trx_t* trx; DBUG_ENTER("ha_innobase::external_lock"); + DBUG_PRINT("enter",("lock_type: %d", lock_type)); update_thd(thd); diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index b4ca822784a..088bad9a84b 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -912,7 +912,7 @@ void ha_myisam::info(uint flag) if (table->key_parts) memcpy((char*) table->key_info[0].rec_per_key, (char*) info.rec_per_key, - sizeof(ulong)*table->key_parts); + sizeof(table->key_info[0].rec_per_key)*table->key_parts); raid_type=info.raid_type; raid_chunks=info.raid_chunks; raid_chunksize=info.raid_chunksize; diff --git a/sql/lex.h b/sql/lex.h index dba919ce366..49b6a3811e5 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -255,6 +255,7 @@ static SYMBOL symbols[] = { { "NOT", SYM(NOT),0,0}, { "NULL", SYM(NULL_SYM),0,0}, { "NUMERIC", SYM(NUMERIC_SYM),0,0}, + { "OFFSET", SYM(OFFSET_SYM),0,0}, { "ON", SYM(ON),0,0}, { "OPEN", SYM(OPEN_SYM),0,0}, { "OPTIMIZE", SYM(OPTIMIZE),0,0}, diff --git a/sql/lock.cc b/sql/lock.cc index 9063b1273e0..15878fe7d15 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -167,6 +167,7 @@ static int lock_external(THD *thd, TABLE **tables, uint count) for (i=1 ; i <= count ; i++, tables++) { + DBUG_ASSERT((*tables)->reginfo.lock_type >= TL_READ); lock_type=F_WRLCK; /* Lock exclusive */ if ((*tables)->db_stat & HA_READ_ONLY || ((*tables)->reginfo.lock_type >= TL_READ && diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index a763bdd35ad..db457aa0aa7 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -413,14 +413,12 @@ int mysql_drop_index(THD *thd, TABLE_LIST *table_list, int mysql_update(THD *thd,TABLE_LIST *tables,List &fields, List &values,COND *conds, ORDER *order, ha_rows limit, - enum enum_duplicates handle_duplicates, - thr_lock_type lock_type); + enum enum_duplicates handle_duplicates); int mysql_insert(THD *thd,TABLE_LIST *table,List &fields, - List &values, enum_duplicates flag, - thr_lock_type lock_type); + List &values, enum_duplicates flag); void kill_delayed_threads(void); int mysql_delete(THD *thd, TABLE_LIST *table, COND *conds, ORDER *order, - ha_rows rows, thr_lock_type lock_type, ulong options); + ha_rows rows, ulong options); int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok=0); TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update); TABLE *open_table(THD *thd,const char *db,const char *table,const char *alias, @@ -496,6 +494,7 @@ TABLE_LIST *add_table_to_list(Table_ident *table,LEX_STRING *alias, thr_lock_type flags=TL_UNLOCK, List *use_index=0, List *ignore_index=0); +void set_lock_for_tables(thr_lock_type lock_type); void add_join_on(TABLE_LIST *b,Item *expr); void add_join_natural(TABLE_LIST *a,TABLE_LIST *b); bool add_proc_to_list(Item *item); @@ -586,6 +585,8 @@ bool open_log(MYSQL_LOG *log, const char *hostname, const char *index_file_name, enum_log_type type, bool read_append = 0, bool no_auto_events = 0); +/* mysqld.cc */ +void clear_error_message(THD *thd); /* External variables diff --git a/sql/mysqld.cc b/sql/mysqld.cc index f2a536ada9b..cfb128f6dd6 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1663,6 +1663,17 @@ extern "C" int my_message_sql(uint error, const char *str, DBUG_RETURN(0); } + +/* + Forget last error message (if we got one) +*/ + +void clear_error_message(THD *thd) +{ + thd->net.last_error[0]= 0; +} + + #ifdef __WIN__ struct utsname diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 23ba04bd6ed..032882080ff 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1403,6 +1403,61 @@ int open_tables(THD *thd,TABLE_LIST *start) } +/* + Check that lock is ok for tables; Call start stmt if ok + + SYNOPSIS + check_lock_and_start_stmt() + thd Thread handle + table_list Table to check + lock_type Lock used for table + + RETURN VALUES + 0 ok + 1 error +*/ + +static bool check_lock_and_start_stmt(THD *thd, TABLE *table, + thr_lock_type lock_type) +{ + int error; + DBUG_ENTER("check_lock_and_start_stmt"); + + if ((int) lock_type >= (int) TL_WRITE_ALLOW_READ && + (int) table->reginfo.lock_type < (int) TL_WRITE_ALLOW_READ) + { + my_printf_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, + ER(ER_TABLE_NOT_LOCKED_FOR_WRITE), + MYF(0),table->table_name); + DBUG_RETURN(1); + } + if ((error=table->file->start_stmt(thd))) + { + table->file->print_error(error,MYF(0)); + DBUG_RETURN(1); + } + DBUG_RETURN(0); +} + + +/* + Open and lock one table + + SYNOPSIS + open_ltable() + thd Thread handler + table_list Table to open is first table in this list + lock_type Lock to use for open + + RETURN VALUES + table Opened table + 0 Error + + If ok, the following are also set: + table_list->lock_type lock_type + table_list->table table +*/ + TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type) { TABLE *table; @@ -1415,8 +1470,6 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type) &refresh)) && refresh) ; if (table) { - int error; - #if defined( __WIN__) || defined(OS2) /* Win32 can't drop a file that is open */ if (lock_type == TL_WRITE_ALLOW_READ) @@ -1424,39 +1477,29 @@ TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type) lock_type= TL_WRITE; } #endif /* __WIN__ || OS2 */ - - table_list->table=table; + table_list->lock_type= lock_type; + table_list->table= table; table->grant= table_list->grant; if (thd->locked_tables) { - thd->proc_info=0; - if ((int) lock_type >= (int) TL_WRITE_ALLOW_READ && - (int) table->reginfo.lock_type < (int) TL_WRITE_ALLOW_READ) - { - my_printf_error(ER_TABLE_NOT_LOCKED_FOR_WRITE, - ER(ER_TABLE_NOT_LOCKED_FOR_WRITE), - MYF(0),table_list->alias); - table=0; - } - else if ((error=table->file->start_stmt(thd))) - { - table->file->print_error(error,MYF(0)); - table=0; - } - thd->proc_info=0; - DBUG_RETURN(table); + if (check_lock_and_start_stmt(thd, table, lock_type)) + table= 0; + } + else + { + if ((table->reginfo.lock_type= lock_type) != TL_UNLOCK) + if (!(thd->lock=mysql_lock_tables(thd,&table_list->table,1))) + table= 0; } - if ((table->reginfo.lock_type=lock_type) != TL_UNLOCK) - if (!(thd->lock=mysql_lock_tables(thd,&table_list->table,1))) - DBUG_RETURN(0); } thd->proc_info=0; DBUG_RETURN(table); } + /* -** Open all tables in list and locks them for read. -** The lock will automaticly be freed by the close_thread_tables + Open all tables in list and locks them for read. + The lock will automaticly be freed by close_thread_tables() */ int open_and_lock_tables(THD *thd,TABLE_LIST *tables) @@ -1466,10 +1509,27 @@ int open_and_lock_tables(THD *thd,TABLE_LIST *tables) return 0; } + +/* + Lock all tables in list + + SYNOPSIS + lock_tables() + thd Thread handler + tables Tables to lock + + RETURN VALUES + 0 ok + -1 Error +*/ + int lock_tables(THD *thd,TABLE_LIST *tables) { TABLE_LIST *table; - if (tables && !thd->locked_tables) + if (!tables) + return 0; + + if (!thd->locked_tables) { uint count=0; for (table = tables ; table ; table=table->next) @@ -1486,10 +1546,9 @@ int lock_tables(THD *thd,TABLE_LIST *tables) { for (table = tables ; table ; table=table->next) { - int error; - if ((error=table->table->file->start_stmt(thd))) + if (check_lock_and_start_stmt(thd, table->table, table->lock_type)) { - table->table->file->print_error(error,MYF(0)); + ha_rollback_stmt(thd); return -1; } } @@ -1497,10 +1556,11 @@ int lock_tables(THD *thd,TABLE_LIST *tables) return 0; } + /* -** Open a single table without table caching and don't set it in open_list -** Used by alter_table to open a temporary table and when creating -** a temporary table with CREATE TEMPORARY ... + Open a single table without table caching and don't set it in open_list + Used by alter_table to open a temporary table and when creating + a temporary table with CREATE TEMPORARY ... */ TABLE *open_temporary_table(THD *thd, const char *path, const char *db, diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c30d253828f..a5f14a507f7 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -87,9 +87,6 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), host_or_ip="unknown ip"; locked=killed=count_cuted_fields=some_tables_deleted=no_errors=password= query_start_used=safe_to_cache_query=0; - pthread_mutex_lock(&LOCK_global_system_variables); - variables= global_system_variables; - pthread_mutex_unlock(&LOCK_global_system_variables); db_length=query_length=col_access=0; query_error=0; next_insert_id=last_insert_id=0; @@ -129,19 +126,12 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), server_id = ::server_id; slave_net = 0; log_pos = 0; - server_status= SERVER_STATUS_AUTOCOMMIT; - update_lock_default= (variables.low_priority_updates ? - TL_WRITE_LOW_PRIORITY : - TL_WRITE); - options= thd_startup_options; - sql_mode=(uint) opt_sql_mode; - open_options=ha_open_options; - session_tx_isolation= (enum_tx_isolation) variables.tx_isolation; command=COM_CONNECT; set_query_id=1; db_access=NO_ACCESS; version=refresh_version; // For boot + init(); /* Initialize sub structures */ bzero((char*) &mem_root,sizeof(mem_root)); bzero((char*) &transaction.mem_root,sizeof(transaction.mem_root)); @@ -174,6 +164,48 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), } } + +/* + Init common variables that has to be reset on start and on change_user +*/ + +void THD::init(void) +{ + server_status= SERVER_STATUS_AUTOCOMMIT; + update_lock_default= (variables.low_priority_updates ? + TL_WRITE_LOW_PRIORITY : + TL_WRITE); + options= thd_startup_options; + sql_mode=(uint) opt_sql_mode; + open_options=ha_open_options; + pthread_mutex_lock(&LOCK_global_system_variables); + variables= global_system_variables; + pthread_mutex_unlock(&LOCK_global_system_variables); + session_tx_isolation= (enum_tx_isolation) variables.tx_isolation; +} + +/* + Do what's needed when one invokes change user + + SYNOPSIS + change_user() + + IMPLEMENTATION + Reset all resources that are connection specific +*/ + + +void THD::change_user(void) +{ + cleanup(); + cleanup_done=0; + init(); + hash_init(&user_vars, USER_VARS_HASH_SIZE, 0, 0, + (hash_get_key) get_var_key, + (hash_free_key) free_user_var,0); +} + + /* Do operations that may take a long time */ void THD::cleanup(void) @@ -191,17 +223,21 @@ void THD::cleanup(void) close_thread_tables(this); } close_temporary_tables(this); -#ifdef USING_TRANSACTIONS - if (opt_using_transactions) + hash_free(&user_vars); + if (global_read_lock) + unlock_global_read_lock(this); + if (ull) { - close_cached_file(&transaction.trans_log); - ha_close_connection(this); + pthread_mutex_lock(&LOCK_user_locks); + item_user_lock_release(ull); + pthread_mutex_unlock(&LOCK_user_locks); + ull= 0; } -#endif cleanup_done=1; DBUG_VOID_RETURN; } + THD::~THD() { THD_CHECK_SENTRY(this); @@ -218,15 +254,13 @@ THD::~THD() } if (!cleanup_done) cleanup(); - if (global_read_lock) - unlock_global_read_lock(this); - if (ull) +#ifdef USING_TRANSACTIONS + if (opt_using_transactions) { - pthread_mutex_lock(&LOCK_user_locks); - item_user_lock_release(ull); - pthread_mutex_unlock(&LOCK_user_locks); + close_cached_file(&transaction.trans_log); + ha_close_connection(this); } - hash_free(&user_vars); +#endif DBUG_PRINT("info", ("freeing host")); if (host != localhost) // If not pointer to constant diff --git a/sql/sql_class.h b/sql/sql_class.h index 0f010b9de28..dba2ad130bf 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -461,6 +461,8 @@ public: THD(); ~THD(); + void init(void); + void change_user(void); void cleanup(void); bool store_globals(); #ifdef SIGNAL_WITH_VIO_CLOSE @@ -804,11 +806,9 @@ public: ha_rows deleted; uint num_of_tables; int error; - thr_lock_type lock_option; bool do_delete, transactional_tables, log_delayed, normal_tables; public: - multi_delete(THD *thd, TABLE_LIST *dt, thr_lock_type lock_option_arg, - uint num_of_tables); + multi_delete(THD *thd, TABLE_LIST *dt, uint num_of_tables); ~multi_delete(); int prepare(List &list); bool send_fields(List &list, @@ -829,7 +829,6 @@ public: ha_rows updated, found; List fields; List **fields_by_tables; - thr_lock_type lock_option; enum enum_duplicates dupl; uint num_of_tables, num_fields, num_updated, *save_time_stamps, *field_sequence; int error; @@ -837,7 +836,7 @@ public: public: multi_update(THD *thd_arg, TABLE_LIST *ut, List &fs, enum enum_duplicates handle_duplicates, - thr_lock_type lock_option_arg, uint num); + uint num); ~multi_update(); int prepare(List &list); bool send_fields(List &list, diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index c40e8a4e947..f21ff345845 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -28,7 +28,7 @@ #include "sql_select.h" int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, - ha_rows limit, thr_lock_type lock_type, ulong options) + ha_rows limit, ulong options) { int error; TABLE *table; @@ -39,15 +39,13 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, ha_rows deleted; DBUG_ENTER("mysql_delete"); - if (!table_list->db) - table_list->db=thd->db; if ((thd->options & OPTION_SAFE_UPDATES) && !conds) { send_error(&thd->net,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); DBUG_RETURN(1); } - if (!(table = open_ltable(thd,table_list, lock_type))) + if (!(table = open_ltable(thd, table_list, table_list->lock_type))) DBUG_RETURN(-1); table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); thd->proc_info="init"; @@ -176,9 +174,19 @@ cleanup: if (!log_delayed) thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } - if (transactional_table && ha_autocommit_or_rollback(thd,error >= 0)) - error=1; - if (deleted) + if (transactional_table) + { + if (ha_autocommit_or_rollback(thd,error >= 0)) + error=1; + } + /* + Only invalidate the query cache if something changed or if we + didn't commit the transacion (query cache is automaticly + invalidated on commit) + */ + if (deleted && + (!transactional_table || + thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { query_cache_invalidate3(thd, table_list, 1); } @@ -211,10 +219,9 @@ extern "C" int refposcmp2(void* arg, const void *a,const void *b) } multi_delete::multi_delete(THD *thd_arg, TABLE_LIST *dt, - thr_lock_type lock_option_arg, uint num_of_tables_arg) : delete_tables (dt), thd(thd_arg), deleted(0), - num_of_tables(num_of_tables_arg), error(0), lock_option(lock_option_arg), + num_of_tables(num_of_tables_arg), error(0), do_delete(0), transactional_tables(0), log_delayed(0), normal_tables(0) { tempfiles = (Unique **) sql_calloc(sizeof(Unique *) * (num_of_tables-1)); @@ -553,8 +560,9 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) if (!ha_supports_generate(table_type)) { /* Probably InnoDB table */ - DBUG_RETURN(mysql_delete(thd,table_list, (COND*) 0, (ORDER*) 0, - HA_POS_ERROR, TL_WRITE, 0)); + table_list->lock_type= TL_WRITE; + DBUG_RETURN(mysql_delete(thd, table_list, (COND*) 0, (ORDER*) 0, + HA_POS_ERROR, 0)); } if (lock_and_wait_for_table_name(thd, table_list)) DBUG_RETURN(-1); diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index c83e21ddcae..71f570e4798 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -98,8 +98,7 @@ check_insert_fields(THD *thd,TABLE *table,List &fields, int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, - List &values_list,enum_duplicates duplic, - thr_lock_type lock_type) + List &values_list,enum_duplicates duplic) { int error; bool log_on= ((thd->options & OPTION_UPDATE_LOG) || @@ -114,6 +113,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, List_iterator_fast its(values_list); List_item *values; char *query=thd->query; + thr_lock_type lock_type = table_list->lock_type; DBUG_ENTER("mysql_insert"); /* @@ -200,8 +200,9 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, { table->file->extra_opt(HA_EXTRA_WRITE_CACHE, thd->variables.read_buff_size); - table->file->extra_opt(HA_EXTRA_BULK_INSERT_BEGIN, - thd->variables.bulk_insert_buff_size); + if (thd->variables.bulk_insert_buff_size) + table->file->extra_opt(HA_EXTRA_BULK_INSERT_BEGIN, + thd->variables.bulk_insert_buff_size); table->bulk_insert= 1; } @@ -266,10 +267,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, info.copied=values_list.elements; end_delayed_insert(thd); } - if (info.copied || info.deleted) - { - query_cache_invalidate3(thd, table_list, 1); - } + query_cache_invalidate3(thd, table_list, 1); } else { @@ -315,7 +313,15 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, } if (transactional_table) error=ha_autocommit_or_rollback(thd,error); - if (info.copied || info.deleted) + + /* + Only invalidate the query cache if something changed or if we + didn't commit the transacion (query cache is automaticly + invalidated on commit) + */ + if ((info.copied || info.deleted) && + (!transactional_table || + thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { query_cache_invalidate3(thd, table_list, 1); } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 6424b97b422..0cebde364f7 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -99,7 +99,17 @@ static void init_signals(void) } #endif -inline bool end_active_trans(THD *thd) +static void unlock_locked_tables(THD *thd) +{ + if (thd->locked_tables) + { + thd->lock=thd->locked_tables; + thd->locked_tables=0; // Will be automaticly closed + close_thread_tables(thd); // Free tables + } +} + +static bool end_active_trans(THD *thd) { int error=0; if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN | @@ -698,7 +708,7 @@ pthread_handler_decl(handle_one_connection,arg) (net->last_errno ? ER(net->last_errno) : ER(ER_UNKNOWN_ERROR))); send_error(net,net->last_errno,NullS); - thread_safe_increment(aborted_threads,&LOCK_status); + statistic_increment(aborted_threads,&LOCK_status); } end_thread: @@ -911,7 +921,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, thd->lex.select_lex.options=0; // We store status here switch (command) { case COM_INIT_DB: - thread_safe_increment(com_stat[SQLCOM_CHANGE_DB],&LOCK_status); + statistic_increment(com_stat[SQLCOM_CHANGE_DB],&LOCK_status); if (!mysql_change_db(thd,packet)) mysql_log.write(thd,command,"%s",thd->db); break; @@ -923,7 +933,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, } case COM_TABLE_DUMP: { - thread_safe_increment(com_other, &LOCK_status); + statistic_increment(com_other, &LOCK_status); slow_command = TRUE; uint db_len = *(uchar*)packet; uint tbl_len = *(uchar*)(packet + db_len + 1); @@ -940,7 +950,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd, } case COM_CHANGE_USER: { - thread_safe_increment(com_other,&LOCK_status); + thd->change_user(); + clear_error_message(thd); // If errors from rollback + + statistic_increment(com_other,&LOCK_status); char *user= (char*) packet; char *passwd= strend(user)+1; char *db= strend(passwd)+1; @@ -1020,7 +1033,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, { char *fields; TABLE_LIST table_list; - thread_safe_increment(com_stat[SQLCOM_SHOW_FIELDS],&LOCK_status); + statistic_increment(com_stat[SQLCOM_SHOW_FIELDS],&LOCK_status); bzero((char*) &table_list,sizeof(table_list)); if (!(table_list.db=thd->db)) { @@ -1055,7 +1068,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, case COM_CREATE_DB: // QQ: To be removed { - thread_safe_increment(com_stat[SQLCOM_CREATE_DB],&LOCK_status); + statistic_increment(com_stat[SQLCOM_CREATE_DB],&LOCK_status); char *db=thd->strdup(packet); // null test to handle EOM if (!db || !strip_sp(db) || check_db_name(db)) @@ -1073,7 +1086,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, } case COM_DROP_DB: // QQ: To be removed { - thread_safe_increment(com_stat[SQLCOM_DROP_DB],&LOCK_status); + statistic_increment(com_stat[SQLCOM_DROP_DB],&LOCK_status); char *db=thd->strdup(packet); // null test to handle EOM if (!db || !strip_sp(db) || check_db_name(db)) @@ -1094,7 +1107,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, } case COM_BINLOG_DUMP: { - thread_safe_increment(com_other,&LOCK_status); + statistic_increment(com_other,&LOCK_status); slow_command = TRUE; if (check_global_access(thd, REPL_SLAVE_ACL)) break; @@ -1118,7 +1131,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, } case COM_REFRESH: { - thread_safe_increment(com_stat[SQLCOM_FLUSH],&LOCK_status); + statistic_increment(com_stat[SQLCOM_FLUSH],&LOCK_status); ulong options= (ulong) (uchar) packet[0]; if (check_global_access(thd,RELOAD_ACL)) break; @@ -1130,7 +1143,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; } case COM_SHUTDOWN: - thread_safe_increment(com_other,&LOCK_status); + statistic_increment(com_other,&LOCK_status); if (check_global_access(thd,SHUTDOWN_ACL)) break; /* purecov: inspected */ DBUG_PRINT("quit",("Got shutdown command")); @@ -1153,7 +1166,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, case COM_STATISTICS: { mysql_log.write(thd,command,NullS); - thread_safe_increment(com_stat[SQLCOM_SHOW_STATUS],&LOCK_status); + statistic_increment(com_stat[SQLCOM_SHOW_STATUS],&LOCK_status); char buff[200]; ulong uptime = (ulong) (thd->start_time - start_time); sprintf((char*) buff, @@ -1172,11 +1185,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; } case COM_PING: - thread_safe_increment(com_other,&LOCK_status); + statistic_increment(com_other,&LOCK_status); send_ok(net); // Tell client we are alive break; case COM_PROCESS_INFO: - thread_safe_increment(com_stat[SQLCOM_SHOW_PROCESSLIST],&LOCK_status); + statistic_increment(com_stat[SQLCOM_SHOW_PROCESSLIST],&LOCK_status); if (!thd->priv_user[0] && check_global_access(thd,PROCESS_ACL)) break; mysql_log.write(thd,command,NullS); @@ -1185,13 +1198,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; case COM_PROCESS_KILL: { - thread_safe_increment(com_stat[SQLCOM_KILL],&LOCK_status); + statistic_increment(com_stat[SQLCOM_KILL],&LOCK_status); ulong id=(ulong) uint4korr(packet); kill_one_thread(thd,id); break; } case COM_DEBUG: - thread_safe_increment(com_other,&LOCK_status); + statistic_increment(com_other,&LOCK_status); if (check_global_access(thd, SUPER_ACL)) break; /* purecov: inspected */ mysql_print_status(thd); @@ -1291,7 +1304,7 @@ mysql_execute_command(void) !tables_ok(thd,tables))) DBUG_VOID_RETURN; - thread_safe_increment(com_stat[lex->sql_command],&LOCK_status); + statistic_increment(com_stat[lex->sql_command],&LOCK_status); switch (lex->sql_command) { case SQLCOM_SELECT: { @@ -1355,6 +1368,8 @@ mysql_execute_command(void) Normal select: Change lock if we are using SELECT HIGH PRIORITY, FOR UPDATE or IN SHARE MODE + + TODO: Delete the following loop when locks is set by sql_yacc */ TABLE_LIST *table; for (table = tables ; table ; table=table->next) @@ -1561,6 +1576,7 @@ mysql_execute_command(void) TABLE_LIST *table; if (check_table_access(thd, SELECT_ACL, tables->next)) goto error; // Error message is given + /* TODO: Delete the following loop when locks is set by sql_yacc */ for (table = tables->next ; table ; table=table->next) table->lock_type= lex->lock_option; } @@ -1802,18 +1818,13 @@ mysql_execute_command(void) } if (select_lex->table_list.elements == 1) { - res = mysql_update(thd,tables, - select_lex->item_list, - lex->value_list, - select_lex->where, - (ORDER *) select_lex->order_list.first, - select_lex->select_limit, - lex->duplicates, - lex->lock_option); - -#ifdef DELETE_ITEMS - delete select_lex->where; -#endif + res= mysql_update(thd,tables, + select_lex->item_list, + lex->value_list, + select_lex->where, + (ORDER *) select_lex->order_list.first, + select_lex->select_limit, + lex->duplicates); } else { @@ -1824,10 +1835,7 @@ mysql_execute_command(void) lex->sql_command=SQLCOM_MULTI_UPDATE; for (auxi=(TABLE_LIST*) tables, table_count=0 ; auxi ; auxi=auxi->next) - { table_count++; - auxi->lock_type=TL_WRITE; - } if (select_lex->order_list.elements) msg="ORDER BY"; else if (select_lex->select_limit && select_lex->select_limit != @@ -1848,8 +1856,7 @@ mysql_execute_command(void) !setup_fields(thd,tables,lex->value_list,0,0,0) && ! thd->fatal_error && (result=new multi_update(thd,tables,select_lex->item_list, - lex->duplicates, lex->lock_option, - table_count))) + lex->duplicates, table_count))) { List total_list; List_iterator field_list(select_lex->item_list); @@ -1880,8 +1887,7 @@ mysql_execute_command(void) if (grant_option && check_grant(thd,INSERT_ACL,tables)) goto error; res = mysql_insert(thd,tables,lex->field_list,lex->many_values, - lex->duplicates, - lex->lock_option); + lex->duplicates); break; case SQLCOM_REPLACE: if (check_access(thd,INSERT_ACL | DELETE_ACL, @@ -1892,8 +1898,7 @@ mysql_execute_command(void) goto error; res = mysql_insert(thd,tables,lex->field_list,lex->many_values, - DUP_REPLACE, - lex->lock_option); + DUP_REPLACE); break; case SQLCOM_REPLACE_SELECT: case SQLCOM_INSERT_SELECT: @@ -1928,8 +1933,8 @@ mysql_execute_command(void) net_printf(&thd->net,ER_INSERT_TABLE_USED,tables->real_name); DBUG_VOID_RETURN; } - tables->lock_type=TL_WRITE; // update first table { + /* TODO: Delete the following loop when locks is set by sql_yacc */ TABLE_LIST *table; for (table = tables->next ; table ; table=table->next) table->lock_type= lex->lock_option; @@ -1972,8 +1977,7 @@ mysql_execute_command(void) tables->grant.want_privilege=(SELECT_ACL & ~tables->grant.privilege); res = mysql_delete(thd,tables, select_lex->where, (ORDER*) select_lex->order_list.first, - select_lex->select_limit, lex->lock_option, - select_lex->options); + select_lex->select_limit, select_lex->options); break; } case SQLCOM_DELETE_MULTI: @@ -2009,12 +2013,12 @@ mysql_execute_command(void) net_printf(&thd->net,ER_NONUNIQ_TABLE,auxi->real_name); goto error; } - auxi->lock_type=walk->lock_type=TL_WRITE; + walk->lock_type= auxi->lock_type; auxi->table= (TABLE *) walk; // Remember corresponding table } if (add_item_to_list(new Item_null())) { - res = -1; + res= -1; break; } tables->grant.want_privilege=(SELECT_ACL & ~tables->grant.privilege); @@ -2025,7 +2029,6 @@ mysql_execute_command(void) for (auxi=(TABLE_LIST*) aux_tables ; auxi ; auxi=auxi->next) auxi->table= ((TABLE_LIST*) auxi->table)->table; if (!thd->fatal_error && (result= new multi_delete(thd,aux_tables, - lex->lock_option, table_count))) { res=mysql_select(thd,tables,select_lex->item_list, @@ -2212,11 +2215,7 @@ mysql_execute_command(void) send_ok(&thd->net); break; case SQLCOM_UNLOCK_TABLES: - if (thd->locked_tables) - { - thd->lock=thd->locked_tables; - thd->locked_tables=0; // Will be automaticly closed - } + unlock_locked_tables(thd); if (thd->options & OPTION_TABLE_LOCK) { end_active_trans(thd); @@ -2227,12 +2226,7 @@ mysql_execute_command(void) send_ok(&thd->net); break; case SQLCOM_LOCK_TABLES: - if (thd->locked_tables) - { - thd->lock=thd->locked_tables; - thd->locked_tables=0; // Will be automaticly closed - close_thread_tables(thd); - } + unlock_locked_tables(thd); if (check_db_used(thd,tables) || end_active_trans(thd)) goto error; if (check_table_access(thd, LOCK_TABLES_ACL | SELECT_ACL, tables)) @@ -3258,6 +3252,37 @@ TABLE_LIST *add_table_to_list(Table_ident *table, LEX_STRING *alias, DBUG_RETURN(ptr); } +/* + Set lock for all tables in current select level + + SYNOPSIS: + set_lock_for_tables() + lock_type Lock to set for tables + + NOTE: + If lock is a write lock, then tables->updating is set 1 + This is to get tables_ok to know that the table is updated by the + query +*/ + +void set_lock_for_tables(thr_lock_type lock_type) +{ + THD *thd=current_thd; + bool for_update= lock_type >= TL_READ_NO_INSERT; + DBUG_ENTER("set_lock_for_tables"); + DBUG_PRINT("enter", ("lock_type: %d for_update: %d", lock_type, + for_update)); + + for (TABLE_LIST *tables= (TABLE_LIST*) thd->lex.select->table_list.first ; + tables ; + tables=tables->next) + { + tables->lock_type= lock_type; + tables->updating= for_update; + } + DBUG_VOID_RETURN; +} + /* ** This is used for UNION to create a new table list of all used tables @@ -3301,7 +3326,6 @@ static bool create_total_list(THD *thd, LEX *lex, TABLE_LIST **result) if (!cursor) { /* Add not used table to the total table list */ - aux->lock_type= lex->lock_option; if (!(cursor = (TABLE_LIST *) thd->memdup((char*) aux, sizeof(*aux)))) { diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 0b440eb3060..c45ce5b6634 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -50,8 +50,7 @@ int mysql_update(THD *thd, COND *conds, ORDER *order, ha_rows limit, - enum enum_duplicates handle_duplicates, - thr_lock_type lock_type) + enum enum_duplicates handle_duplicates) { bool using_limit=limit != HA_POS_ERROR; bool used_key_is_modified, transactional_table, log_delayed; @@ -66,7 +65,7 @@ int mysql_update(THD *thd, LINT_INIT(used_index); LINT_INIT(timestamp_query_id); - if (!(table = open_ltable(thd,table_list,lock_type))) + if (!(table = open_ltable(thd,table_list,table_list->lock_type))) DBUG_RETURN(-1); /* purecov: inspected */ save_time_stamp=table->time_stamp; table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); @@ -316,9 +315,19 @@ int mysql_update(THD *thd, if (!log_delayed) thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; } - if (transactional_table && ha_autocommit_or_rollback(thd, error >= 0)) - error=1; - if (updated) + if (transactional_table) + { + if (ha_autocommit_or_rollback(thd, error >= 0)) + error=1; + } + /* + Only invalidate the query cache if something changed or if we + didn't commit the transacion (query cache is automaticly + invalidated on commit) + */ + if (updated && + (!transactional_table || + thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { query_cache_invalidate3(thd, table_list, 1); } @@ -350,10 +359,12 @@ int mysql_update(THD *thd, Update multiple tables from join ***************************************************************************/ -multi_update::multi_update(THD *thd_arg, TABLE_LIST *ut, List &fs, - enum enum_duplicates handle_duplicates, thr_lock_type lock_option_arg, uint num) - : update_tables (ut), thd(thd_arg), updated(0), found(0), fields(fs), lock_option(lock_option_arg), - dupl(handle_duplicates), num_of_tables(num), num_fields(0), num_updated(0) , error(0), do_update(false) +multi_update::multi_update(THD *thd_arg, TABLE_LIST *ut, List &fs, + enum enum_duplicates handle_duplicates, + uint num) + : update_tables (ut), thd(thd_arg), updated(0), found(0), fields(fs), + dupl(handle_duplicates), num_of_tables(num), num_fields(0), num_updated(0), + error(0), do_update(false) { save_time_stamps = (uint *) sql_calloc (sizeof(uint) * num_of_tables); tmp_tables = (TABLE **)NULL; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 93532d013b5..92b49549a06 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -66,6 +66,7 @@ inline Item *or_or_concat(Item* A, Item* B) enum enum_tx_isolation tx_isolation; enum Item_cast cast_type; enum Item_udftype udf_type; + thr_lock_type lock_type; interval_type interval; } @@ -263,6 +264,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token NO_SYM %token NULL_SYM %token NUM +%token OFFSET_SYM %token ON %token OPEN_SYM %token OPTION @@ -513,7 +515,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); type int_type real_type order_dir opt_field_spec lock_option udf_type if_exists opt_local opt_table_options table_options table_option opt_if_not_exists opt_var_type opt_var_ident_type - opt_temporary + opt_temporary %type ULONG_NUM raid_types merge_insert_types @@ -521,6 +523,9 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %type ulonglong_num +%type + replace_lock_option opt_low_priority insert_lock_option load_data_lock + %type literal text_literal insert_ident order_ident simple_ident select_item2 expr opt_expr opt_else sum_expr in_sum_expr @@ -582,11 +587,11 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); field_opt_list opt_binary table_lock_list table_lock varchar references opt_on_delete opt_on_delete_list opt_on_delete_item use opt_delete_options opt_delete_option - opt_outer table_list table_name opt_option opt_place opt_low_priority + opt_outer table_list table_name opt_option opt_place opt_attribute opt_attribute_list attribute column_list column_list_id opt_column_list grant_privileges opt_table user_list grant_option grant_privilege grant_privilege_list - flush_options flush_option insert_lock_option replace_lock_option + flush_options flush_option equal optional_braces opt_key_definition key_usage_list2 opt_mi_check_type opt_to mi_check_types normal_join table_to_table_list table_to_table opt_table_list opt_as @@ -2249,11 +2254,6 @@ order_clause: ORDER_SYM BY { LEX *lex=Lex; - if (lex->sql_command == SQLCOM_MULTI_UPDATE) - { - net_printf(&lex->thd->net, ER_WRONG_USAGE, "UPDATE", "ORDER BY"); - YYABORT; - } if (lex->select->olap != UNSPECIFIED_OLAP_TYPE) { net_printf(&lex->thd->net, ER_WRONG_USAGE, @@ -2278,7 +2278,7 @@ order_dir: limit_clause: /* empty */ {} - | LIMIT ULONG_NUM + | LIMIT { LEX *lex=Lex; if (lex->select->olap != UNSPECIFIED_OLAP_TYPE) @@ -2287,33 +2287,35 @@ limit_clause: "LIMIT"); YYABORT; } - SELECT_LEX *sel=Select; - sel->select_limit= $2; - sel->offset_limit= 0L; } - | LIMIT ULONG_NUM ',' ULONG_NUM + limit_options + ; + +limit_options: + ULONG_NUM { - LEX *lex=Lex; - if (lex->select->olap != UNSPECIFIED_OLAP_TYPE) - { - net_printf(&lex->thd->net, ER_WRONG_USAGE, "CUBE/ROLLUP", - "LIMIT"); - YYABORT; - } - SELECT_LEX *sel=lex->select; - sel->select_limit= $4; - sel->offset_limit= $2; - }; + SELECT_LEX *sel= Select; + sel->select_limit= $1; + sel->offset_limit= 0L; + } + | ULONG_NUM ',' ULONG_NUM + { + SELECT_LEX *sel= Select; + sel->select_limit= $3; + sel->offset_limit= $1; + } + | ULONG_NUM OFFSET_SYM ULONG_NUM + { + SELECT_LEX *sel= Select; + sel->select_limit= $1; + sel->offset_limit= $3; + } + ; delete_limit_clause: /* empty */ { LEX *lex=Lex; - if (lex->sql_command == SQLCOM_MULTI_UPDATE) - { - net_printf(&lex->thd->net, ER_WRONG_USAGE, "DELETE", "LIMIT"); - YYABORT; - } lex->select->select_limit= HA_POS_ERROR; } | LIMIT ulonglong_num @@ -2448,7 +2450,13 @@ opt_temporary: */ insert: - INSERT { Lex->sql_command = SQLCOM_INSERT; } insert_lock_option opt_ignore insert2 insert_field_spec; + INSERT { Lex->sql_command = SQLCOM_INSERT; } insert_lock_option + opt_ignore insert2 + { + set_lock_for_tables($3); + } + insert_field_spec + ; replace: REPLACE @@ -2457,17 +2465,23 @@ replace: lex->sql_command = SQLCOM_REPLACE; lex->duplicates= DUP_REPLACE; } - replace_lock_option insert2 insert_field_spec; + replace_lock_option insert2 + { + set_lock_for_tables($3); + } + insert_field_spec + ; insert_lock_option: - /* empty */ { Lex->lock_option= TL_WRITE_CONCURRENT_INSERT; } - | LOW_PRIORITY { Lex->lock_option= TL_WRITE_LOW_PRIORITY; } - | DELAYED_SYM { Lex->lock_option= TL_WRITE_DELAYED; } - | HIGH_PRIORITY { Lex->lock_option= TL_WRITE; }; + /* empty */ { $$= TL_WRITE_CONCURRENT_INSERT; } + | LOW_PRIORITY { $$= TL_WRITE_LOW_PRIORITY; } + | DELAYED_SYM { $$= TL_WRITE_DELAYED; } + | HIGH_PRIORITY { $$= TL_WRITE; } + ; replace_lock_option: - opt_low_priority {} - | DELAYED_SYM { Lex->lock_option= TL_WRITE_DELAYED; }; + opt_low_priority { $$= $1; } + | DELAYED_SYM { $$= TL_WRITE_DELAYED; }; insert2: INTO insert_table {} @@ -2588,7 +2602,12 @@ update: lex->select->order_list.first=0; lex->select->order_list.next= (byte**) &lex->select->order_list.first; } - opt_low_priority opt_ignore join_table_list SET update_list where_clause opt_order_clause delete_limit_clause; + opt_low_priority opt_ignore join_table_list + SET update_list where_clause opt_order_clause delete_limit_clause + { + set_lock_for_tables($3); + } + ; update_list: update_list ',' simple_ident equal expr @@ -2603,8 +2622,8 @@ update_list: }; opt_low_priority: - /* empty */ { Lex->lock_option= current_thd->update_lock_default; } - | LOW_PRIORITY { Lex->lock_option= TL_WRITE_LOW_PRIORITY; }; + /* empty */ { $$= current_thd->update_lock_default; } + | LOW_PRIORITY { $$= TL_WRITE_LOW_PRIORITY; }; /* Delete rows from a table */ @@ -2618,13 +2637,20 @@ delete: lex->select->order_list.first=0; lex->select->order_list.next= (byte**) &lex->select->order_list.first; } - opt_delete_options single_multi {}; + opt_delete_options single_multi {} + ; single_multi: - FROM table_name where_clause opt_order_clause delete_limit_clause {} + FROM table_ident + { + if (!add_table_to_list($2, NULL, 1, Lex->lock_option)) + YYABORT; + } + where_clause opt_order_clause + delete_limit_clause | table_wild_list { mysql_init_multi_delete(Lex); } - FROM join_table_list where_clause + FROM join_table_list where_clause | FROM table_wild_list { mysql_init_multi_delete(Lex); } USING join_table_list where_clause; @@ -2636,14 +2662,17 @@ table_wild_list: table_wild_one: ident opt_wild { - if (!add_table_to_list(new Table_ident($1),NULL,1,TL_WRITE)) - YYABORT; + if (!add_table_to_list(new Table_ident($1), NULL, 1, + Lex->lock_option)) + YYABORT; } | ident '.' ident opt_wild { - if (!add_table_to_list(new Table_ident($1,$3,0),NULL,1,TL_WRITE)) + if (!add_table_to_list(new Table_ident($1,$3,0), NULL, 1, + Lex->lock_option)) YYABORT; - }; + } + ; opt_wild: /* empty */ {} @@ -2667,7 +2696,8 @@ truncate: lex->select->order_list.elements=0; lex->select->order_list.first=0; lex->select->order_list.next= (byte**) &lex->select->order_list.first; - lex->lock_option= current_thd->update_lock_default; }; + } + ; opt_table_sym: /* empty */ @@ -2916,7 +2946,8 @@ load: LOAD DATA_SYM load_data_lock opt_local INFILE TEXT_STRING { LEX *lex=Lex; lex->sql_command= SQLCOM_LOAD; - lex->local_file= $4; + lex->lock_option= $3; + lex->local_file= $4; if (!(lex->exchange= new sql_exchange($6.str,0))) YYABORT; lex->field_list.empty(); @@ -2946,9 +2977,9 @@ opt_local: | LOCAL_SYM { $$=1;}; load_data_lock: - /* empty */ { Lex->lock_option= current_thd->update_lock_default; } - | CONCURRENT { Lex->lock_option= TL_WRITE_CONCURRENT_INSERT ; } - | LOW_PRIORITY { Lex->lock_option= TL_WRITE_LOW_PRIORITY; }; + /* empty */ { $$= current_thd->update_lock_default; } + | CONCURRENT { $$= TL_WRITE_CONCURRENT_INSERT ; } + | LOW_PRIORITY { $$= TL_WRITE_LOW_PRIORITY; }; opt_duplicate: @@ -3201,6 +3232,7 @@ keyword: | NEW_SYM {} | NO_SYM {} | NONE_SYM {} + | OFFSET_SYM {} | OPEN_SYM {} | PACK_KEYS_SYM {} | PASSWORD {} From 849b9ed9131257426a92671c2ede72b9c962eb74 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Nov 2002 00:31:57 +0100 Subject: [PATCH 156/246] typelib.h is required by mysql.h and should be installed BitKeeper/deleted/.del-.my_sys.h.swp~f6a4a7f8dae03f18: Delete: include/.my_sys.h.swp --- include/.my_sys.h.swp | Bin 16384 -> 0 bytes include/Makefile.am | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 include/.my_sys.h.swp diff --git a/include/.my_sys.h.swp b/include/.my_sys.h.swp deleted file mode 100644 index e9d01f0e65d1d4e4ce698ca12b4c8342d2ad1697..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHOON=8&8EzmDOrGL-0jV+@ZS2AG@a%&GXCw7^+B41AZl~Mc*+~wqcDro%PP@D5 z$Lu;$9tWhHBJs!tE*wEZ5y~NlNGJzRNQCDB1YC$#91?`Y1vo$m-(TJK*xp&PND&CB zEq&we>iYls>#M*1s`}g0+q|qc*@gA<5({gUcX0nCt}jA>Wd4EsJ$!#HyZ<}xcX0ok?EXWzJ_CFX4N?94lQWPr zkTZ}okTZ}okTZ}okTZ}okTZ}okTZ}o@ZV#=>PymtXznFCl;izB2=`G+D;25X??|f8} zeh2&(cop~xum{`?ym=?;0#||ifH&}ahi?Lp1Dn8~KaBnX0q}X?#vOPL7=RAk5BwTQ zjb8!Z1&)Cx@JZlJGcd85%W)T`W7uduPo+I|!{J$J%*82aIw?Yn*wMr?IsUP((+TkUSA zP}zEzWOjTnW=X_ZJmSppf+S|H)3d_KO=7xI*A-*0aPj<1F64udMAiAYH-jMaU>k=Ox3qr?>sc6ij$Qtq`Ytht! z+A4_tb-|(U_SrSZ>-*Q1Dz>y*S1(jD;$RUmZewtGbPLr}4=9Lk7$awpvNt!VC!>03 z?y8p+Q*G6?)RnzcQpwr?uBu4VSMt&n!rf{APyPaM|k=I*@q_FR5{U< z`T3HjIvn=B^vI2dc3?iC=$hH?=q&a7B|T5^&}U@J+GA`i3|%sY#Oo^jE1d-pPpcJ6 zWj1i&XI2sKdmJIA506l^vyFHsyWA+?H$m-8K!){OG6SrmMSZOGZU) zM==;UXAE;5*4lnBfwdz{4dGPiGiPJJ5655ZX-#V%cGRYF($SD(-a?jCK$g6DQKX@^ z_Cb!`Qd_$xU7LyxF$W@c%?dr5z~IPryrbn-by?kE)6d28=@l$Dk|6NIbjpc3MbD2# zj9mGWKk_2qJDYv4tRW&Hj#o=d*3qb$YTc}N8;#655d$r+&tk+^YiKzh+0}QVBQ{9j z3#WPW0VtVjY6maVty=o3Z5nXK>&QZVon5QKrI$GhC)Av)1>;;|J(BJRVf z28m}sB!+U{6EV${ERq$A2?9-tJ-d0bfVOl*x$SPfZWM}JCDOi~3pF9}H^juniezPjcgjLRO0=Cqp;+16+?wc_E)UI- z?;o*Cq%7;Z>G@{5wow!K!KaDUF3O57ZB}p97Md~sqjs`J3O6@Wp&m(RvfrJuN29oJ zg~RpHV~n8~tC};Idpb7lcoJ~&cp3{%zTqh3AhkUi3}8lMkrhMa3_NV%n3+kNqti5l z^ms(G2+Gm08*zzWhnHdEW8c+MWSxkE2Y5b42~9O z@Ns~}r|nucXKM)Y6iv^a+bpwfKZ;S6R5To$d)VVxu8&niEX(o8iD*+CVpm+vVq}?# zs7Na(ZJcR4LDGkQ!lIF%U>_(JRA8+gN(iSv zomoc?Irh=fK94QOjn+w~spxRhR!81e8*1l}p-x@xv=qZ&bxmh7Ys-2^t#uo4x^`D@ zYlgB8&ae^6Y$7E+Y!naF&YsroFu8Teu)ONfc~})(&^D4EV`EGb4(N2yH!vPrUQE3s z4V^i<7?{KI7KaY>qAFaPBuCgx;=;n#C5B#FZa8g;u?UJmAT`Gb#dJW}nv#}{Oqu#s zgy;l^8|+GHkV|5Tb1h7)shnVBHkc6$h~8)f8{o8LgV+I{;xJXlu@~bZ*?@hDGnkN( za3|;{IkbW8@of#{G7~r~;RuuYXq7rZ`!-CW6N;!U#MKR7v@anb)ZjOvGaSXNSSztD zEFr8pF&=L)d7GWhF6)lx(zZerb!u1G4wn9X-=k@cLW$1*U&r}*3ukIN|DVCv?{Vh; zDex`e2;jg);4a_};O991KM$zDXMwkH_J0}h01a3N{)Dsr>%fb^4nXJqPXm8MJ3j+{ z1iS`32V4iP0ezqcJPD`(*;E1YPtHKjK+ZtUK+ZtUK+ZtUK+eGbj)62sKsn6WVKhD6 zrvJ&xRzl0cnSN!OOh8UU9DEnfv(ty!xfiF}p6|QjWN5~A-~{QBUyYD>69fe?JSb8!0q;giRWbvILVB~*FPcr{tS&2hiJd*m9+;J; z%1V-yh%+t@?)FiXjEgo746#W3vDGmjml@^IaBfYINvlef5JWj;bjQf=N0FK4<>#dW z%Rb^U1cl;NWXERLB!zn@n$m!8r13Ik#Z>*Q`s`v+;C8ADTEvSR6J54&1d6h**&{1t zt1x(AQo6B>zEO|U;?-g3CqabvgaSIN&B+VNRpgM4QK3Ky7UG5qY^X_}P9F<-*SGp} z@^cOS`}WIHstp6sPXaUa{kYgvnx?L49kxoh<$0@dv@VNbO1VvCQFxoO3%xz9EhL2o zIAqov@~(l(LweOA#(mi`*ei<4i5EFTc%LB1aGpZ?F=doejj7MvQa1It9=)6}BZ$Ha zh-SE3CP;E8@@EV`In5-n6g>E-^|2XIZ~=8c?!J46%5dBA2&I z(-IOd7q{o$yrOFQ&L(~JGOe7w$2qA!pWPEau+T>8;NY)Jlnz{LNWPYZhS}trZ)iHM o$S^O+WI;is*qRNkwhxEQQht>G*;V9iB*HHv%d>iHh1ANw0Eb1HDF6Tf diff --git a/include/Makefile.am b/include/Makefile.am index 2df8b46d369..c88e1ee1e40 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -20,7 +20,7 @@ pkginclude_HEADERS = dbug.h m_string.h my_sys.h my_list.h \ mysql.h mysql_com.h mysqld_error.h mysql_embed.h \ my_semaphore.h my_pthread.h my_no_pthread.h raid.h \ errmsg.h my_global.h my_net.h my_alloc.h \ - my_getopt.h sslopt-longopts.h \ + my_getopt.h sslopt-longopts.h typelib.h \ sslopt-vars.h sslopt-case.h $(BUILT_SOURCES) noinst_HEADERS = config-win.h config-os2.h \ nisam.h heap.h merge.h my_bitmap.h\ From 638d4619ad6551c903f6c4ffbad58973f0af034a Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Nov 2002 00:35:13 +0100 Subject: [PATCH 157/246] Delete: include/.my_sys.h.swp --- include/.my_sys.h.swp | Bin 16384 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 include/.my_sys.h.swp diff --git a/include/.my_sys.h.swp b/include/.my_sys.h.swp deleted file mode 100644 index e9d01f0e65d1d4e4ce698ca12b4c8342d2ad1697..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHOON=8&8EzmDOrGL-0jV+@ZS2AG@a%&GXCw7^+B41AZl~Mc*+~wqcDro%PP@D5 z$Lu;$9tWhHBJs!tE*wEZ5y~NlNGJzRNQCDB1YC$#91?`Y1vo$m-(TJK*xp&PND&CB zEq&we>iYls>#M*1s`}g0+q|qc*@gA<5({gUcX0nCt}jA>Wd4EsJ$!#HyZ<}xcX0ok?EXWzJ_CFX4N?94lQWPr zkTZ}okTZ}okTZ}okTZ}okTZ}okTZ}o@ZV#=>PymtXznFCl;izB2=`G+D;25X??|f8} zeh2&(cop~xum{`?ym=?;0#||ifH&}ahi?Lp1Dn8~KaBnX0q}X?#vOPL7=RAk5BwTQ zjb8!Z1&)Cx@JZlJGcd85%W)T`W7uduPo+I|!{J$J%*82aIw?Yn*wMr?IsUP((+TkUSA zP}zEzWOjTnW=X_ZJmSppf+S|H)3d_KO=7xI*A-*0aPj<1F64udMAiAYH-jMaU>k=Ox3qr?>sc6ij$Qtq`Ytht! z+A4_tb-|(U_SrSZ>-*Q1Dz>y*S1(jD;$RUmZewtGbPLr}4=9Lk7$awpvNt!VC!>03 z?y8p+Q*G6?)RnzcQpwr?uBu4VSMt&n!rf{APyPaM|k=I*@q_FR5{U< z`T3HjIvn=B^vI2dc3?iC=$hH?=q&a7B|T5^&}U@J+GA`i3|%sY#Oo^jE1d-pPpcJ6 zWj1i&XI2sKdmJIA506l^vyFHsyWA+?H$m-8K!){OG6SrmMSZOGZU) zM==;UXAE;5*4lnBfwdz{4dGPiGiPJJ5655ZX-#V%cGRYF($SD(-a?jCK$g6DQKX@^ z_Cb!`Qd_$xU7LyxF$W@c%?dr5z~IPryrbn-by?kE)6d28=@l$Dk|6NIbjpc3MbD2# zj9mGWKk_2qJDYv4tRW&Hj#o=d*3qb$YTc}N8;#655d$r+&tk+^YiKzh+0}QVBQ{9j z3#WPW0VtVjY6maVty=o3Z5nXK>&QZVon5QKrI$GhC)Av)1>;;|J(BJRVf z28m}sB!+U{6EV${ERq$A2?9-tJ-d0bfVOl*x$SPfZWM}JCDOi~3pF9}H^juniezPjcgjLRO0=Cqp;+16+?wc_E)UI- z?;o*Cq%7;Z>G@{5wow!K!KaDUF3O57ZB}p97Md~sqjs`J3O6@Wp&m(RvfrJuN29oJ zg~RpHV~n8~tC};Idpb7lcoJ~&cp3{%zTqh3AhkUi3}8lMkrhMa3_NV%n3+kNqti5l z^ms(G2+Gm08*zzWhnHdEW8c+MWSxkE2Y5b42~9O z@Ns~}r|nucXKM)Y6iv^a+bpwfKZ;S6R5To$d)VVxu8&niEX(o8iD*+CVpm+vVq}?# zs7Na(ZJcR4LDGkQ!lIF%U>_(JRA8+gN(iSv zomoc?Irh=fK94QOjn+w~spxRhR!81e8*1l}p-x@xv=qZ&bxmh7Ys-2^t#uo4x^`D@ zYlgB8&ae^6Y$7E+Y!naF&YsroFu8Teu)ONfc~})(&^D4EV`EGb4(N2yH!vPrUQE3s z4V^i<7?{KI7KaY>qAFaPBuCgx;=;n#C5B#FZa8g;u?UJmAT`Gb#dJW}nv#}{Oqu#s zgy;l^8|+GHkV|5Tb1h7)shnVBHkc6$h~8)f8{o8LgV+I{;xJXlu@~bZ*?@hDGnkN( za3|;{IkbW8@of#{G7~r~;RuuYXq7rZ`!-CW6N;!U#MKR7v@anb)ZjOvGaSXNSSztD zEFr8pF&=L)d7GWhF6)lx(zZerb!u1G4wn9X-=k@cLW$1*U&r}*3ukIN|DVCv?{Vh; zDex`e2;jg);4a_};O991KM$zDXMwkH_J0}h01a3N{)Dsr>%fb^4nXJqPXm8MJ3j+{ z1iS`32V4iP0ezqcJPD`(*;E1YPtHKjK+ZtUK+ZtUK+ZtUK+eGbj)62sKsn6WVKhD6 zrvJ&xRzl0cnSN!OOh8UU9DEnfv(ty!xfiF}p6|QjWN5~A-~{QBUyYD>69fe?JSb8!0q;giRWbvILVB~*FPcr{tS&2hiJd*m9+;J; z%1V-yh%+t@?)FiXjEgo746#W3vDGmjml@^IaBfYINvlef5JWj;bjQf=N0FK4<>#dW z%Rb^U1cl;NWXERLB!zn@n$m!8r13Ik#Z>*Q`s`v+;C8ADTEvSR6J54&1d6h**&{1t zt1x(AQo6B>zEO|U;?-g3CqabvgaSIN&B+VNRpgM4QK3Ky7UG5qY^X_}P9F<-*SGp} z@^cOS`}WIHstp6sPXaUa{kYgvnx?L49kxoh<$0@dv@VNbO1VvCQFxoO3%xz9EhL2o zIAqov@~(l(LweOA#(mi`*ei<4i5EFTc%LB1aGpZ?F=doejj7MvQa1It9=)6}BZ$Ha zh-SE3CP;E8@@EV`In5-n6g>E-^|2XIZ~=8c?!J46%5dBA2&I z(-IOd7q{o$yrOFQ&L(~JGOe7w$2qA!pWPEau+T>8;NY)Jlnz{LNWPYZhS}trZ)iHM o$S^O+WI;is*qRNkwhxEQQht>G*;V9iB*HHv%d>iHh1ANw0Eb1HDF6Tf From 2ef5ec316c2e7a34c6db6060f4869f0fd7026e03 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Nov 2002 16:45:21 +0100 Subject: [PATCH 158/246] - Applied required modifications for automake 1.5 - "make distcheck" needs to be fixed BitKeeper/etc/ignore: Added autom4te.cache/output.0 autom4te.cache/requests autom4te.cache/traces.0 bdb/dist/autom4te.cache/output.0 bdb/dist/autom4te.cache/requests bdb/dist/autom4te.cache/traces.0 innobase/autom4te.cache/output.0 innobase/autom4te.cache/requests innobase/autom4te.cache/traces.0 to the ignore list acinclude.m4: - removed libtool.m4 (is part of libtool 1.4) config.guess: - applied diffs from config.guess of automake 1.5 config.sub: - applied diffs from config.sub of automake 1.5 configure.in: - renamed "AM_PROG_LIBTOOL" -> "AC_PROG_LIBTOOL" - added "AM_PROG_AS" for automake 1.5 dbug/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy extra/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy heap/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy install-sh: - applied diffs from install.sh of automake 1.5 isam/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy libmysql_r/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy ltconfig: - small correction for new libtool ltmain.sh: - applied diffs from ltmain.sh of libtool 1.4.2 merge/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy missing: - applied diffs from missing of automake 1.5 myisam/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy myisammrg/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy mysys/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy - added $(EXEEXT) to test_charset regex/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy sql/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy strings/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy - removed @CHARSET_SRCS@ vio/Makefile.am: - removed OMIT_DEPENDENCIES to make automake 1.5 happy --- .bzrignore | 9 + acinclude.m4 | 432 ------- config.guess | 770 +++++++----- config.sub | 271 +++-- configure.in | 5 +- dbug/Makefile.am | 9 - depcomp | 411 +++++++ extra/Makefile.am | 9 - heap/Makefile.am | 9 - install-sh | 3 +- isam/Makefile.am | 9 - libmysql_r/Makefile.am | 11 - ltconfig | 4 +- ltmain.sh | 2599 +++++++++++++++++++++++++++------------- merge/Makefile.am | 9 - missing | 109 +- myisam/Makefile.am | 11 - myisammrg/Makefile.am | 8 - mysys/Makefile.am | 11 +- regex/Makefile.am | 9 - sql/Makefile.am | 10 - strings/Makefile.am | 11 +- vio/Makefile.am | 12 - 23 files changed, 2993 insertions(+), 1748 deletions(-) create mode 100755 depcomp diff --git a/.bzrignore b/.bzrignore index 0cc24f9dbf6..4a707ae05df 100644 --- a/.bzrignore +++ b/.bzrignore @@ -322,3 +322,12 @@ sql-bench/innotest2 sql-bench/innotest2a sql-bench/innotest2b depcomp +autom4te.cache/output.0 +autom4te.cache/requests +autom4te.cache/traces.0 +bdb/dist/autom4te.cache/output.0 +bdb/dist/autom4te.cache/requests +bdb/dist/autom4te.cache/traces.0 +innobase/autom4te.cache/output.0 +innobase/autom4te.cache/requests +innobase/autom4te.cache/traces.0 diff --git a/acinclude.m4 b/acinclude.m4 index b8d46b25db2..246fb40eb83 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1152,435 +1152,3 @@ AC_DEFUN(MYSQL_SYS_LARGEFILE, esac]) fi ]) - - -## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- -## Copyright (C) 1996-1999 Free Software Foundation, Inc. -## Originally by Gordon Matzigkeit , 1996 -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -## As a special exception to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$lt_target" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$lt_target" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library, adds --enable-ltdl-convenience to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library, and adds --enable-ltdl-install to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl diff --git a/config.guess b/config.guess index a3369c0f908..27ccc69772b 100755 --- a/config.guess +++ b/config.guess @@ -1,8 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. -# + +timestamp='2001-08-21' + # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -23,51 +25,162 @@ # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# Please send patches to the Autoconf mailing list . +# Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# +# don't specify an explicit build system type. -# Use $HOST_CC if defined. $CC may point to a cross-compiler -if test x"$CC_FOR_BUILD" = x; then - if test x"$HOST_CC" != x; then - CC_FOR_BUILD="$HOST_CC" - else - if test x"$CC" != x; then - CC_FOR_BUILD="$CC" - else - CC_FOR_BUILD=cc - fi - fi +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 fi +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac' + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 +case "${UNAME_MACHINE}" in + i?86) + test -z "$VENDOR" && VENDOR=pc + ;; + *) + test -z "$VENDOR" && VENDOR=unknown + ;; +esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -77,41 +190,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text .globl main + .align 4 .ent main main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit .end main EOF + eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; - 15) + 1-0) UNAME_MACHINE="alphaev5" ;; - 14) + 1-1) UNAME_MACHINE="alphaev56" ;; - 10) + 1-101) UNAME_MACHINE="alphapca56" ;; - 16) + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; esac fi rm -f $dummy.s $dummy @@ -127,11 +254,8 @@ EOF echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 + echo m68k-unknown-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -156,13 +280,13 @@ EOF wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) @@ -218,15 +342,15 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} + sparc*:NetBSD:*) + echo `uname -p`-unknown-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor + # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not @@ -250,15 +374,9 @@ EOF *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -271,9 +389,6 @@ EOF powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; @@ -289,6 +404,7 @@ EOF mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus +#include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -307,12 +423,16 @@ EOF exit (-1); } EOF + eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm $dummy.c $dummy && exit 0 + && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -328,15 +448,18 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then echo m88k-dg-dgux${UNAME_RELEASE} - else + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -357,9 +480,17 @@ EOF ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) + i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c @@ -373,7 +504,8 @@ EOF exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then @@ -382,9 +514,9 @@ EOF echo rs6000-ibm-aix3.2 fi exit 0 ;; - *:AIX:*:4) + *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -392,7 +524,7 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=4.${UNAME_RELEASE} + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; @@ -402,7 +534,7 @@ EOF ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -418,11 +550,31 @@ EOF echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE #include #include @@ -453,12 +605,18 @@ EOF exit (0); } EOF - ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + eval $set_cc_for_build + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy + fi ;; esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include @@ -485,7 +643,8 @@ EOF exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; @@ -495,7 +654,7 @@ EOF 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; - *9??*:MPE/iX:*:*) + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) @@ -504,7 +663,7 @@ EOF hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; - i?86:OSF1:*:*) + i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else @@ -539,37 +698,39 @@ EOF echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; - F300:UNIX_System_V:*:*) + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; - i?86:BSD/386:*:* | i?86:BSD/OS:*:*) + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) @@ -579,17 +740,8 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - if test -x /usr/bin/objformat; then - if test "elf" = "`/usr/bin/objformat`"; then - echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` - exit 0 - fi - fi echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; @@ -599,6 +751,9 @@ EOF i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -617,151 +772,101 @@ EOF *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - armv*) UNAME_MACHINE=$UNAME_MACHINE ;; - arm* | sa110*) UNAME_MACHINE="arm" ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + mips:Linux:*:*) + case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in + big) echo mips-${VENDOR}-linux && exit 0 ;; + little) echo mipsel-${VENDOR}-linux && exit 0 ;; esac - + case `sed -n '/^system type/s/^.*: \([^ ]*\).*/\1/p' < /proc/cpuinfo` in + SGI|sgi) echo mips-${VENDOR}-linux-gnu && exit 0 ;; + esac + ;; + ppc:Linux:*:*|ppc64:Linux:*:*) + echo powerpc-${VENDOR}-linux + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-${VENDOR}-linux ;; + PA8*) echo hppa2.0-${VENDOR}-linux ;; + *) echo hppa-${VENDOR}-linux ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-${VENDOR}-linux + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-${VENDOR}-linux + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-${VENDOR}-linux + exit 0 ;; + i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_help_string=`cd /; ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d + ld_supported_targets=`cd /; ld --help 2>&1 \ + | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g - s/.*supported emulations: *// + s/.*supported targets: *// s/ .*// p'` - case "$ld_supported_emulations" in - *ia64) echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 ;; - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf_i?86) echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 ;; - elf32ppc | elf32ppclinux) - # Determine Lib Version - cat >$dummy.c < -#if defined(__GLIBC__) -extern char __libc_version[]; -extern char __libc_release[]; -#endif -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined(__GLIBC__) - printf("%s %s\n", __libc_version, __libc_release); -#else - printf("unkown\n"); -#endif - return 0; -} -EOF - LIBC="" - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy | grep 1\.99 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-${VENDOR}-linuxaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linuxoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld" + exit 0 ;; esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <$dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >$dummy.c <$dummy.c < #ifdef __cplusplus +#include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { @@ -769,25 +874,28 @@ EOF #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); + printf ("%s-${VENDOR}-linux\n", argv[1]); # else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]); # endif # else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); + printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]); # endif #else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); + printf ("%s-${VENDOR}-linuxaout\n", argv[1]); #endif return 0; } EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) @@ -799,7 +907,7 @@ EOF echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else @@ -807,13 +915,12 @@ EOF fi exit 0 ;; i*86:*:5:[78]*) - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -833,7 +940,11 @@ EOF echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; pc:*:*:*) + # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp @@ -857,7 +968,7 @@ EOF exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -868,21 +979,24 @@ EOF 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; @@ -900,8 +1014,8 @@ EOF echo ns32k-sni-sysv fi exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) @@ -913,10 +1027,14 @@ EOF # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; - news*:NEWS-OS:*:6*) + news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) @@ -950,6 +1068,64 @@ EOF *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1041,11 +1217,24 @@ main () #endif #if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif #endif #if defined (alliant) && defined (i860) @@ -1056,7 +1245,8 @@ main () } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 +eval $set_cc_for_build +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. @@ -1089,6 +1279,48 @@ then esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.sub b/config.sub index 70716b4e206..83f4b0151e0 100755 --- a/config.sub +++ b/config.sub @@ -1,6 +1,10 @@ #! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-08-13' + # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -25,6 +29,8 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# Please send patches to . +# # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. @@ -111,7 +117,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - linux-gnu*) + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -137,7 +143,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) + -apple | -axis) os= basic_machine=$1 ;; @@ -148,18 +154,20 @@ case $os in -scout) ;; -wrs) - os=vxworks + os=-vxworks basic_machine=$1 ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; - -unixware7.0.0) - os=-unixware7.0.0 - ;; - -unixware7.0.1) - os=-unixware7.0.1 - ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -205,32 +213,45 @@ case $os in -psos*) os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ - | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ - | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 \ - | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | hppa64 \ - | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ - | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ - | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp10 | pdp11 \ - | mips16 | mips64 | mipsel | mips64el \ - | mips64orion | mips64orionel | mipstx39 | mipstx39el \ - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ - | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ - | v850 | c4x \ - | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ - | pj | pjl | h8500 | z8k) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dsp16xx \ + | fr30 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el | mips64vr4300 \ + | mips64vr4300el | mips64vr5000 | mips64vr5000el \ + | mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | s390 | s390x \ + | sh | sh[34] | sh[34]eb | shbe | shle \ + | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 \ + | we32k \ + | x86 | xscale \ + | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -253,31 +274,43 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - # FIXME: clean up the formatting here. - vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ - | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ - | xmp-* | ymp-* \ - | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ - | hppa2.0n-* | hppa64-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ - | alphaev6[78]-* \ - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ - | clipper-* | orion-* \ - | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ - | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ - | mips16-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* | mcore-* \ - | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ - | [cjt]90-* \ - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ - | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alphapca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armv*-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c54x-* \ + | clipper-* | cray2-* | cydra-* \ + | d10v-* | d30v-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | m32r-* \ + | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ + | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \ + | mipsle-* | mipstx39-* | mipstx39el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | s390-* | s390x-* \ + | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \ + | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ + | v850-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -314,14 +347,14 @@ case $basic_machine in os=-sysv ;; amiga | amiga-*) - basic_machine=m68k-cbm + basic_machine=m68k-unknown ;; amigaos | amigados) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-sysv4 ;; apollo68) @@ -368,13 +401,16 @@ case $basic_machine in basic_machine=cray2-cray os=-unicos ;; - [ctj]90-cray) - basic_machine=c90-cray + [cjt]90) + basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -422,6 +458,10 @@ case $basic_machine in basic_machine=tron-gmicro os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -521,14 +561,6 @@ case $basic_machine in basic_machine=i386-unknown os=-vsta ;; - i386-go32 | go32) - basic_machine=i386-unknown - os=-go32 - ;; - i386-mingw32 | mingw32) - basic_machine=i386-unknown - os=-mingw32 - ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -554,20 +586,22 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; - *mint | *MiNT) + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown - os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown - os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` @@ -575,14 +609,22 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) - basic_machine=i386-unknown + basic_machine=i386-pc os=-msdos ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -592,7 +634,7 @@ case $basic_machine in os=-netbsd ;; netwinder) - basic_machine=armv4l-corel + basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) @@ -704,6 +746,8 @@ case $basic_machine in ;; ppc) basic_machine=powerpc-unknown ;; + ppc64) basic_machine=powerpc-unknown + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) @@ -712,6 +756,16 @@ case $basic_machine in ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; @@ -798,6 +852,10 @@ case $basic_machine in sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix @@ -806,6 +864,10 @@ case $basic_machine in basic_machine=t3e-cray os=-unicos ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -858,6 +920,10 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt + ;; xmp) basic_machine=xmp-cray os=-unicos @@ -886,11 +952,14 @@ case $basic_machine in basic_machine=hppa1.1-oki ;; mips) - if [ x$os = x-linux-gnu ]; then + case $os in + linux*) basic_machine=mips-unknown - else + ;; + *) basic_machine=mips-mips - fi + ;; + esac ;; romp) basic_machine=romp-ibm @@ -901,13 +970,20 @@ case $basic_machine in vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; - sparc | sparcv9) + sh3 | sh4 | sh3eb | sh4eb) + basic_machine=sh-unknown + ;; + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -967,12 +1043,6 @@ case $os in -svr4*) os=-sysv4 ;; - -unixware7.0.0) - os=-unixware7.0.0 - ;; - -unixware7.0.1) - os=-unixware7.0.1 - ;; -unixware*) os=-sysv4.2uw ;; @@ -996,10 +1066,11 @@ case $os in | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1021,15 +1092,18 @@ case $os in -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -1054,6 +1128,9 @@ case $os in -ns2 ) os=-nextstep2 ;; + -nsk*) + os=-nsk + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -1088,7 +1165,7 @@ case $os in -xenix) os=-xenix ;; - -*mint | -*MiNT) + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) @@ -1116,12 +1193,15 @@ case $basic_machine in *-acorn) os=-riscix1.2 ;; - arm*-corel) + arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; + pdp10-*) + os=-tops20 + ;; pdp11-*) os=-none ;; @@ -1230,7 +1310,7 @@ case $basic_machine in *-masscomp) os=-rtu ;; - f301-fujitsu) + f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) @@ -1290,7 +1370,7 @@ case $basic_machine in -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) @@ -1308,9 +1388,12 @@ case $basic_machine in -mpw* | -macos*) vendor=apple ;; - -*mint | -*MiNT) + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/configure.in b/configure.in index 0fc85479db5..97b934b1420 100644 --- a/configure.in +++ b/configure.in @@ -161,7 +161,7 @@ fi AC_PROG_RANLIB # We use libtool #AC_LIBTOOL_WIN32_DLL -AM_PROG_LIBTOOL +AC_PROG_LIBTOOL #AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_DISABLE_FAST_INSTALL AC_DISABLE_SHARED AC_DISABLE_STATIC @@ -446,6 +446,9 @@ AC_MSG_RESULT("$CHECK_PID") # We need a ANSI C compiler AM_PROG_CC_STDC +# We need an assembler, too +AM_PROG_AS + if test "$am_cv_prog_cc_stdc" = "no" then AC_MSG_ERROR([MySQL requires a ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.]) diff --git a/dbug/Makefile.am b/dbug/Makefile.am index c789019cc6b..08f0164c02c 100644 --- a/dbug/Makefile.am +++ b/dbug/Makefile.am @@ -24,15 +24,6 @@ EXTRA_DIST = example1.c example2.c example3.c \ user.r monty.doc readme.prof \ main.c factorial.c dbug_analyze.c -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h - # Must be linked with libs that are not compiled yet extra_progs: factorial dbug_analyze diff --git a/depcomp b/depcomp new file mode 100755 index 00000000000..65899658ee7 --- /dev/null +++ b/depcomp @@ -0,0 +1,411 @@ +#! /bin/sh + +# depcomp - compile a program generating dependencies as side-effects +# Copyright 1999, 2000 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi +# `libtool' can also be set to `yes' or `no'. + +depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. This file always lives in the current directory. + # Also, the AIX compiler puts `$object:' at the start of each line; + # $object doesn't have directory information. + stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + outname="$stripped.o" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 AIX compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + + tmpdepfile1="$object.d" + tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` + if test "$libtool" = yes; then + "$@" -Wc,-MD + else + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + else + tmpdepfile="$tmpdepfile2" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a space and a tab in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + test -z "$dashmflag" && dashmflag=-M + ( IFS=" " + case " $* " in + *" --mode=compile "*) # this is libtool, let us make it quiet + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + # X makedepend + ( + shift + cleared=no + for arg in "$@"; do + case $cleared in no) + set ""; shift + cleared=yes + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift;; + -*) + ;; + *) + set fnord "$@" "$arg"; shift;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tail +3 "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case $arg in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case $arg in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 diff --git a/extra/Makefile.am b/extra/Makefile.am index ee6c2ba92f2..6292faf4ad4 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -20,14 +20,5 @@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ resolve_stack_dump -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h - # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/heap/Makefile.am b/heap/Makefile.am index 2e6682e29d0..41d98b79ae9 100644 --- a/heap/Makefile.am +++ b/heap/Makefile.am @@ -29,14 +29,5 @@ libheap_a_SOURCES = hp_open.c hp_extra.c hp_close.c hp_panic.c hp_info.c \ hp_rkey.c hp_block.c \ hp_hash.c _check.c _rectest.c hp_static.c -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h - # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/install-sh b/install-sh index ebc66913e94..e9de23842dc 100755 --- a/install-sh +++ b/install-sh @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). @@ -118,6 +118,7 @@ if [ x"$dir_arg" != x ]; then if [ -d $dst ]; then instcmd=: + chmodcmd="" else instcmd=mkdir fi diff --git a/isam/Makefile.am b/isam/Makefile.am index c29be94bf6a..8f23138f29f 100644 --- a/isam/Makefile.am +++ b/isam/Makefile.am @@ -36,15 +36,6 @@ libnisam_a_SOURCES = open.c extra.c info.c rkey.c rnext.c \ log.c changed.c static.c isamchk_SOURCES = isamchk.c sort.c CLEANFILES = test?.IS? isam.log -# Omit dependency for ../mit-pthreads/include/ things -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h wait.h # Move to automake rules ? prolint:; plparse -b -u -hF1 "-width(0,0)" "-format=%f:%l:\s%t:%n\s%m" \ diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am index aa1d398f874..f95ee0661da 100644 --- a/libmysql_r/Makefile.am +++ b/libmysql_r/Makefile.am @@ -27,17 +27,6 @@ INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include \ ## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include include $(top_srcdir)/libmysql/Makefile.shared -# Don't depend on files in pthread library -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h lex.h \ - wait.h - libmysql_dir = $(top_srcdir)/libmysql libmysqlclient_r_la_SOURCES = $(target_sources) diff --git a/ltconfig b/ltconfig index 18af7c4dce8..5c6366c9890 100755 --- a/ltconfig +++ b/ltconfig @@ -1997,12 +1997,12 @@ irix5* | irix6*) ;; # No shared lib support for Linux oldld, aout, or coff. -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) +linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. -linux-gnu*) +linux*) version_type=linux need_lib_prefix=no need_version=no diff --git a/ltmain.sh b/ltmain.sh index cebed74c167..e82e48a9ca0 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -1,7 +1,8 @@ # ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun ltconfig. +# NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996-1999 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify @@ -54,8 +55,8 @@ modename="$progname" # Constants. PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.3.5 -TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)" +VERSION=1.4.2 +TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)" default_mode= help="Try \`$progname --help' for more information." @@ -83,11 +84,8 @@ if test "${LANG+set}" = set; then save_LANG="$LANG"; LANG=C; export LANG fi -if test "$LTCONFIG_VERSION" != "$VERSION"; then - echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 -fi +# Make sure IFS has a sensible default +: ${IFS=" "} if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then echo "$modename: not configured to build any kind of library" 1>&2 @@ -113,16 +111,16 @@ do arg="$1" shift - case "$arg" in + case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then - case "$prev" in + case $prev in execute_dlfiles) - eval "$prev=\"\$$prev \$arg\"" + execute_dlfiles="$execute_dlfiles $arg" ;; *) eval "$prev=\$arg" @@ -135,7 +133,7 @@ do fi # Have we seen a non-optional argument yet? - case "$arg" in + case $arg in --help) show_help=yes ;; @@ -146,7 +144,7 @@ do ;; --config) - sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0 + sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 exit 0 ;; @@ -207,16 +205,21 @@ if test -n "$prevopt"; then exit 1 fi +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then - case "$nonopt" in + case $nonopt in *cc | *++ | gcc* | *-gcc*) mode=link for arg do - case "$arg" in + case $arg in -c) mode=compile break @@ -261,12 +264,13 @@ if test -z "$show_help"; then help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. - case "$mode" in + case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= + prev= lastarg= srcfile="$nonopt" suppress_output= @@ -274,8 +278,34 @@ if test -z "$show_help"; then user_target=no for arg do + case $prev in + "") ;; + xcompiler) + # Aesthetically quote the previous argument. + prev= + lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + + case $arg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + + # Add the previous argument to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + continue + ;; + esac + # Accept any command-line options. - case "$arg" in + case $arg in -o) if test "$user_target" != "no"; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 @@ -288,9 +318,53 @@ if test -z "$show_help"; then build_old_libs=yes continue ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + if test -z "$base_compile"; then + base_compile="$lastarg" + else + base_compile="$base_compile $lastarg" + fi + continue + ;; esac - case "$user_target" in + case $user_target in next) # The next one is the -o target name user_target=yes @@ -316,10 +390,10 @@ if test -z "$show_help"; then lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly in scan - # sets, so we specify it separately. - case "$lastarg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $lastarg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac @@ -332,7 +406,7 @@ if test -z "$show_help"; then fi done - case "$user_target" in + case $user_target in set) ;; no) @@ -348,7 +422,7 @@ if test -z "$show_help"; then # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSfmso]' - case "$libobj" in + case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; @@ -363,7 +437,7 @@ if test -z "$show_help"; then libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - case "$libobj" in + case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 @@ -387,10 +461,21 @@ if test -z "$show_help"; then $run $rm $removelist trap "$run $rm $removelist; exit 1" 1 2 15 + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext} + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit 1" 1 2 15 @@ -402,7 +487,7 @@ if test -z "$show_help"; then # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then - until ln "$0" "$lockfile" 2>/dev/null; do + until $run ln "$0" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done @@ -434,8 +519,13 @@ compiler." # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - # All platforms use -DPIC, to notify preprocessed assembler code. - command="$base_compile $srcfile $pic_flag -DPIC" + if test "$pic_mode" != no; then + # All platforms use -DPIC, to notify preprocessed assembler code. + command="$base_compile $srcfile $pic_flag -DPIC" + else + # Don't build PIC code + command="$base_compile $srcfile" + fi if test "$build_old_libs" = yes; then lo_libobj="$libobj" dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` @@ -506,7 +596,8 @@ compiler." fi # If we have no pic_flag, then copy the object into place and finish. - if test -z "$pic_flag" && test "$build_old_libs" = yes; then + if (test -z "$pic_flag" || test "$pic_mode" != default) && + test "$build_old_libs" = yes; then # Rename the .lo from within objdir to obj if test -f $obj; then $show $rm $obj @@ -532,6 +623,10 @@ compiler." # Now arrange that obj and lo_libobj become the same file $show "(cd $xdir && $LN_S $baseobj $libobj)" if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + $run $rm "$lockfile" + fi exit 0 else error=$? @@ -546,7 +641,13 @@ compiler." # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then - command="$base_compile $srcfile" + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $srcfile" + else + # All platforms use -DPIC, to notify preprocessed assembler code. + command="$base_compile $srcfile $pic_flag -DPIC" + fi if test "$compiler_c_o" = yes; then command="$command -o $obj" output_obj="$obj" @@ -612,17 +713,17 @@ compiler." # Unlock the critical section if it was locked if test "$need_locks" != no; then - $rm "$lockfile" + $run $rm "$lockfile" fi exit 0 ;; # libtool link mode - link) + link | relink) modename="$modename: link" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra @@ -635,181 +736,13 @@ compiler." # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes - - # This is a source program that is used to create dlls on Windows - # Don't remove nor modify the starting and closing comments -# /* ltdll.c starts here */ -# #define WIN32_LEAN_AND_MEAN -# #include -# #undef WIN32_LEAN_AND_MEAN -# #include -# -# #ifndef __CYGWIN__ -# # ifdef __CYGWIN32__ -# # define __CYGWIN__ __CYGWIN32__ -# # endif -# #endif -# -# #ifdef __cplusplus -# extern "C" { -# #endif -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); -# #ifdef __cplusplus -# } -# #endif -# -# #ifdef __CYGWIN__ -# #include -# DECLARE_CYGWIN_DLL( DllMain ); -# #endif -# HINSTANCE __hDllInstance_base; -# -# BOOL APIENTRY -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -# { -# __hDllInstance_base = hInst; -# return TRUE; -# } -# /* ltdll.c ends here */ - # This is a source program that is used to create import libraries - # on Windows for dlls which lack them. Don't remove nor modify the - # starting and closing comments -# /* impgen.c starts here */ -# /* Copyright (C) 1999 Free Software Foundation, Inc. -# -# This file is part of GNU libtool. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# */ -# -# #include /* for printf() */ -# #include /* for open(), lseek(), read() */ -# #include /* for O_RDONLY, O_BINARY */ -# #include /* for strdup() */ -# -# static unsigned int -# pe_get16 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[2]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 2); -# return b[0] + (b[1]<<8); -# } -# -# static unsigned int -# pe_get32 (fd, offset) -# int fd; -# int offset; -# { -# unsigned char b[4]; -# lseek (fd, offset, SEEK_SET); -# read (fd, b, 4); -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# static unsigned int -# pe_as32 (ptr) -# void *ptr; -# { -# unsigned char *b = ptr; -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); -# } -# -# int -# main (argc, argv) -# int argc; -# char *argv[]; -# { -# int dll; -# unsigned long pe_header_offset, opthdr_ofs, num_entries, i; -# unsigned long export_rva, export_size, nsections, secptr, expptr; -# unsigned long name_rvas, nexp; -# unsigned char *expdata, *erva; -# char *filename, *dll_name; -# -# filename = argv[1]; -# -# dll = open(filename, O_RDONLY|O_BINARY); -# if (!dll) -# return 1; -# -# dll_name = filename; -# -# for (i=0; filename[i]; i++) -# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -# dll_name = filename + i +1; -# -# pe_header_offset = pe_get32 (dll, 0x3c); -# opthdr_ofs = pe_header_offset + 4 + 20; -# num_entries = pe_get32 (dll, opthdr_ofs + 92); -# -# if (num_entries < 1) /* no exports */ -# return 1; -# -# export_rva = pe_get32 (dll, opthdr_ofs + 96); -# export_size = pe_get32 (dll, opthdr_ofs + 100); -# nsections = pe_get16 (dll, pe_header_offset + 4 +2); -# secptr = (pe_header_offset + 4 + 20 + -# pe_get16 (dll, pe_header_offset + 4 + 16)); -# -# expptr = 0; -# for (i = 0; i < nsections; i++) -# { -# char sname[8]; -# unsigned long secptr1 = secptr + 40 * i; -# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -# lseek(dll, secptr1, SEEK_SET); -# read(dll, sname, 8); -# if (vaddr <= export_rva && vaddr+vsize > export_rva) -# { -# expptr = fptr + (export_rva - vaddr); -# if (export_rva + export_size > vaddr + vsize) -# export_size = vsize - (export_rva - vaddr); -# break; -# } -# } -# -# expdata = (unsigned char*)malloc(export_size); -# lseek (dll, expptr, SEEK_SET); -# read (dll, expdata, export_size); -# erva = expdata - export_rva; -# -# nexp = pe_as32 (expdata+24); -# name_rvas = pe_as32 (expdata+32); -# -# printf ("EXPORTS\n"); -# for (i = 0; i\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then - case "$prev" in + case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac - case "$prev" in + case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. @@ -907,7 +840,7 @@ compiler." finalize_command="$finalize_command @SYMFILE@" preload=yes fi - case "$arg" in + case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then @@ -936,6 +869,7 @@ compiler." dlprefiles="$dlprefiles $arg" fi prev= + continue ;; esac ;; @@ -960,7 +894,7 @@ compiler." ;; rpath | xrpath) # We need an absolute path. - case "$arg" in + case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 @@ -981,17 +915,32 @@ compiler." prev= continue ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac - fi + fi # test -n $prev prevarg="$arg" - case "$arg" in + case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" @@ -1028,7 +977,7 @@ compiler." -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: not more than one -exported-symbols argument allowed" + $echo "$modename: more than one -exported-symbols argument is not allowed" exit 1 fi if test "X$arg" = "X-export-symbols"; then @@ -1039,58 +988,76 @@ compiler." continue ;; + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. - case "$dir" in + case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - absdir="$dir" + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + exit 1 fi dir="$absdir" ;; esac - case " $deplibs " in - *" $arg "*) ;; - *) deplibs="$deplibs $arg";; + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; esac - case " $lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir";; - esac - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) - dllsearchdir=`cd "$dir" && pwd || echo "$dir"` - case ":$dllsearchpath:" in - ::) dllsearchpath="$dllsearchdir";; - *":$dllsearchdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dllsearchdir";; + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac + continue ;; -l*) - if test "$arg" = "-lc"; then - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) - # These systems don't actually have c library (as such) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) continue ;; + *-*-mingw* | *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; esac - elif test "$arg" = "-lm"; then - case "$host" in - *-*-cygwin* | *-*-beos*) - # These systems don't actually have math library (as such) + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd*) + # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" + continue ;; -module) @@ -1098,6 +1065,25 @@ compiler." continue ;; + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + -no-undefined) allow_undefined=no continue @@ -1123,7 +1109,7 @@ compiler." -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. - case "$dir" in + case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 @@ -1138,11 +1124,11 @@ compiler." ;; -static) - # If we have no pic_flag, then this is the same as -all-static. - if test -z "$pic_flag" && test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. continue ;; @@ -1156,29 +1142,71 @@ compiler." continue ;; + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - linkflags="$linkflags $arg" - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; - *.o | *.obj | *.a | *.lib) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A library object. + *.lo | *.$objext) + # A library or standard object. if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then + # This file was specified with -dlopen. + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $arg" prev= continue else @@ -1191,300 +1219,35 @@ compiler." # Preload the old-style object. dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` prev= + else + case $arg in + *.lo) libobjs="$libobjs $arg" ;; + *) objs="$objs $arg" ;; + esac fi - libobjs="$libobjs $arg" + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue ;; *.la) # A libtool-controlled library. - dlname= - libdir= - library_names= - old_library= - - # Check to see that this really is a libtool archive. - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2 - exit 1 - fi - - # If the library was installed with an old release of libtool, - # it will not redefine variable installed. - installed=yes - - # Read the .la file - # If there is no directory component, then add one. - case "$arg" in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$arg'" 1>&2 - exit 1 - fi - - # Find the relevant object directory and library name. - name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'` - - if test "X$installed" = Xyes; then - dir="$libdir" - else - dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$arg"; then - dir="$objdir" - else - dir="$dir/$objdir" - fi - fi - - if test -n "$dependency_libs"; then - # Extract -R and -L from dependency_libs - temp_deplibs= - for deplib in $dependency_libs; do - case "$deplib" in - -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - case " $rpath $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - -L*) case "$compile_command $temp_deplibs " in - *" $deplib "*) ;; - *) temp_deplibs="$temp_deplibs $deplib";; - esac - temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'` - case " $lib_search_path " in - *" $temp_dir "*) ;; - *) lib_search_path="$lib_search_path $temp_dir";; - esac - ;; - *) temp_deplibs="$temp_deplibs $deplib";; - esac - done - dependency_libs="$temp_deplibs" - fi - - if test -z "$libdir"; then - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $dir/$old_library" - old_convenience="$old_convenience $dir/$old_library" - deplibs="$deplibs$dependency_libs" - compile_command="$compile_command $dir/$old_library$dependency_libs" - finalize_command="$finalize_command $dir/$old_library$dependency_libs" - continue - fi - - # This library was specified with -dlopen. if test "$prev" = dlfiles; then + # This library was specified with -dlopen. dlfiles="$dlfiles $arg" - if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking statically, - # we need to preload. - prev=dlprefiles - else - # We should not create a dependency on this library, but we - # may need any libraries it requires. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" - prev= - continue - fi - fi - - # The library was specified with -dlpreopen. - if test "$prev" = dlprefiles; then - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - dlprefiles="$dlprefiles $dir/$old_library" - else - dlprefiles="$dlprefiles $dir/$linklib" - fi prev= - fi - - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - link_against_libtool_libs="$link_against_libtool_libs $arg" - if test -n "$shlibpath_var"; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *) temp_rpath="$temp_rpath $dir" ;; - esac - fi - - # We need an absolute path. - case "$dir" in - [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - absdir="$dir" - fi - ;; - esac - - # This is the magic to use -rpath. - # Skip directories that are in the system default run-time - # search path, unless they have been requested with -R. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - - lib_linked=yes - case "$hardcode_action" in - immediate | unsupported) - if test "$hardcode_direct" = no; then - compile_command="$compile_command $dir/$linklib" - deplibs="$deplibs $dir/$linklib" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2*) - dllsearchdir=`cd "$dir" && pwd || echo "$dir"` - if test -n "$dllsearchpath"; then - dllsearchpath="$dllsearchpath:$dllsearchdir" - else - dllsearchpath="$dllsearchdir" - fi - ;; - esac - elif test "$hardcode_minus_L" = no; then - case "$host" in - *-*-sunos*) - compile_shlibpath="$compile_shlibpath$dir:" - ;; - esac - case "$compile_command " in - *" -L$dir "*) ;; - *) compile_command="$compile_command -L$dir";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -L$dir -l$name" - elif test "$hardcode_shlibpath_var" = no; then - case ":$compile_shlibpath:" in - *":$dir:"*) ;; - *) compile_shlibpath="$compile_shlibpath$dir:";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -l$name" - else - lib_linked=no - fi - ;; - - relink) - if test "$hardcode_direct" = yes; then - compile_command="$compile_command $absdir/$linklib" - deplibs="$deplibs $absdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - case "$compile_command " in - *" -L$absdir "*) ;; - *) compile_command="$compile_command -L$absdir";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -L$absdir -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case ":$compile_shlibpath:" in - *":$absdir:"*) ;; - *) compile_shlibpath="$compile_shlibpath$absdir:";; - esac - compile_command="$compile_command -l$name" - deplibs="$deplibs -l$name" - else - lib_linked=no - fi - ;; - - *) - lib_linked=no - ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit 1 - fi - - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - finalize_command="$finalize_command $libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - case "$finalize_command " in - *" -L$libdir "*) ;; - *) finalize_command="$finalize_command -L$libdir";; - esac - finalize_command="$finalize_command -l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case ":$finalize_shlibpath:" in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:";; - esac - finalize_command="$finalize_command -l$name" - else - # We cannot seem to hardcode it, guess we'll fake it. - case "$finalize_command " in - *" -L$dir "*) ;; - *) finalize_command="$finalize_command -L$libdir";; - esac - finalize_command="$finalize_command -l$name" - fi + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= else - # Transform directly to old archives if we don't build new libraries. - if test -n "$pic_flag" && test -z "$old_library"; then - $echo "$modename: cannot find static library for \`$arg'" 1>&2 - exit 1 - fi - - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_command="$compile_command $dir/$linklib" - finalize_command="$finalize_command $dir/$linklib" - else - case "$compile_command " in - *" -L$dir "*) ;; - *) compile_command="$compile_command -L$dir";; - esac - compile_command="$compile_command -l$name" - case "$finalize_command " in - *" -L$dir "*) ;; - *) finalize_command="$finalize_command -L$dir";; - esac - finalize_command="$finalize_command -l$name" - fi + deplibs="$deplibs $arg" fi - - # Add in any libraries that this one depends upon. - compile_command="$compile_command$dependency_libs" - finalize_command="$finalize_command$dependency_libs" continue ;; @@ -1493,20 +1256,20 @@ compiler." # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; - esac + esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi - done + done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 @@ -1520,28 +1283,830 @@ compiler." finalize_command="$finalize_command $arg" fi - oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" - case "$output" in + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d $output_objdir; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + status=$? + if test $status -ne 0 && test ! -d $output_objdir; then + exit $status + fi + fi + + # Determine the type of output + case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit 1 ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac - *.a | *.lib) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into archives" 1>&2 - exit 1 + specialdeplibs= + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + libs="$libs $deplib" + done + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit 1 + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test $linkmode = prog; then + # Determine which files to process + case $pass in + dlopen) + libs="$dlfiles" + save_deplibs="$deplibs" # Collect dlpreopened libraries + deplibs= + ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -l*) + if test $linkmode = oldlib && test $linkmode = obj; then + $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2 + continue + fi + if test $pass = conv; then + deplibs="$deplib $deplibs" + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + # Search the libtool library + lib="$searchdir/lib${name}.la" + if test -f "$lib"; then + found=yes + break + fi + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test $pass = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test $pass = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test $pass = scan; then + deplibs="$deplib $deplibs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test $pass = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test $pass = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + if test "$deplibs_check_method" != pass_all; then + echo + echo "*** Warning: This library needs some functionality provided by $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + else + echo + echo "*** Warning: Linking the shared library $output against the" + echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test $pass != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test $found = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib'" 1>&2 + exit 1 + fi - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + # Check to see that this really is a libtool archive. + if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variable installed. + installed=yes + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test $linkmode = oldlib && test $linkmode = obj; }; then + # Add dl[pre]opened files of deplib + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test $pass = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + tmp_libs="$tmp_libs $deplib" + done + elif test $linkmode != prog && test $linkmode != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit 1 + fi + continue + fi # $pass = conv + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit 1 + fi + + # This library was specified with -dlopen. + if test $pass = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit 1 + fi + if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. + dlprefiles="$dlprefiles $lib" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test $pass = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit 1 + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test $linkmode = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" + fi + continue + fi + + if test $linkmode = prog && test $pass != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test $linkalldeplibs = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + link_static=no # Whether the deplib will be linked statically + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + # Link against this shared library + + if test "$linkmode,$pass" = "prog,link" || + { test $linkmode = lib && test $hardcode_into_libs = yes; }; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + if test $linkmode = prog; then + # We need to hardcode the library path + if test -n "$shlibpath_var"; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $dir" ;; + esac + fi + fi + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`echo $soroot | sed -e 's/^.*\///'` + newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + eval cmds=\"$extract_expsyms_cmds\" + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + eval cmds=\"$old_archive_from_expsyms_cmds\" + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n $old_archive_from_expsyms_cmds + + if test $linkmode = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit 1 + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test $linkmode = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test $linkmode = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + else + # We cannot seem to hardcode it, guess we'll fake it. + if test "X$installed" = Xyes; then + add_dir="-L$libdir" + else + add_dir="-L$DESTDIR$libdir" + fi + add="-l$name" + fi + + if test $linkmode = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test $linkmode = prog; then + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + + # Try to link the static library + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + echo "*** Warning: This library needs some functionality provided by $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** Therefore, libtool will create a static module, that should work " + echo "*** as long as the dlopening application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + convenience="$convenience $dir/$old_library" + old_convenience="$old_convenience $dir/$old_library" + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test $linkmode = lib; then + if test -n "$dependency_libs" && + { test $hardcode_into_libs != yes || test $build_old_libs = yes || + test $link_static = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + tmp_libs="$tmp_libs $deplib" + done + + if test $link_all_deplibs != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="-L$absdir/$objdir" + else + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="-L$absdir" + fi + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$deplibs $path" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test $pass = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done fi + if test $pass != dlopen; then + test $pass != scan && dependency_libs="$newdependency_libs" + if test $pass != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + *) + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + if test "$pass" = "conv" && + { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then + libs="$deplibs" # reset libs + deplibs= + fi + done # for pass + if test $linkmode = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi @@ -1569,11 +2134,12 @@ compiler." # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" + objs="$objs$old_deplibs" ;; - *.la) + lib) # Make sure we only generate libraries of the form `libNAME.la'. - case "$outputname" in + case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval libname=\"$libname_spec\" @@ -1594,26 +2160,20 @@ compiler." ;; esac - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - if test -n "$objs"; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1 - exit 1 + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit 1 + else + echo + echo "*** Warning: Linking the shared library $output against the non-libtool" + echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi fi - # How the heck are we supposed to write a wrapper for a shared library? - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2 - exit 1 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2 + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath @@ -1631,7 +2191,6 @@ compiler." build_libtool_libs=convenience build_old_libs=yes fi - dependency_libs="$deplibs" if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2 @@ -1643,7 +2202,7 @@ compiler." else # Parse the version information argument. - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':' + save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" @@ -1658,8 +2217,8 @@ compiler." age="$4" # Check that each of the things are valid numbers. - case "$current" in - 0 | [1-9] | [1-9][0-9]*) ;; + case $current in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 @@ -1667,8 +2226,8 @@ compiler." ;; esac - case "$revision" in - 0 | [1-9] | [1-9][0-9]*) ;; + case $revision in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 @@ -1676,8 +2235,8 @@ compiler." ;; esac - case "$age" in - 0 | [1-9] | [1-9][0-9]*) ;; + case $age in + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 @@ -1695,12 +2254,31 @@ compiler." major= versuffix= verstring= - case "$version_type" in + case $version_type in none) ;; + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + irix) major=`expr $current - $age + 1` - versuffix="$major.$revision" verstring="sgi$major.$revision" # Add in all the interfaces that we are compatible with. @@ -1710,6 +2288,10 @@ compiler." loop=`expr $loop - 1` verstring="sgi$major.$iface:$verstring" done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" ;; linux) @@ -1739,21 +2321,11 @@ compiler." versuffix=".$current.$revision" ;; - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - windows) - # Like Linux, but with '-' rather than '.', since we only - # want one extension on Windows 95. + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. major=`expr $current - $age` - versuffix="-$major-$age-$revision" + versuffix="-$major" ;; *) @@ -1767,6 +2339,16 @@ compiler." if test -z "$vinfo" && test -n "$release"; then major= verstring="0.0" + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring="" + ;; + *) + verstring="0.0" + ;; + esac if test "$need_version" = no; then versuffix= else @@ -1780,7 +2362,7 @@ compiler." versuffix= verstring="" fi - + # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then @@ -1792,37 +2374,12 @@ compiler." # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi - - dependency_libs="$deplibs" - case "$host" in - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-freebsd*) - #FreeBSD needs to handle -lc and -lc_r itself - ;; - *-*-rhapsody*) - # rhapsody is a little odd... - deplibs="$deplibs -framework System" - ;; - *) - # Add libc to deplibs on all other systems. - deplibs="$deplibs -lc" - ;; - esac fi - # Create the output directory, or remove our outputs if we need to. - if test -d $output_objdir; then + if test "$mode" != relink; then + # Remove our outputs. $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* - else - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi fi # Now set the variables for building old libraries. @@ -1833,7 +2390,73 @@ compiler." oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'` + deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'` + dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test $hardcode_into_libs != yes || test $build_old_libs = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd*) + # Do not include libc due to us having libc/libc_r. + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test $build_libtool_need_lc = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname @@ -1848,7 +2471,7 @@ compiler." major="" newdeplibs= droppeddeps=no - case "$deplibs_check_method" in + case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check @@ -1873,7 +2496,7 @@ EOF for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. - if test "$name" != "" ; then + if test -n "$name" && test "$name" != "0"; then libname=`eval \\$echo \"$libname_spec\"` deplib_matches=`eval \\$echo \"$library_names_spec\"` set dummy $deplib_matches @@ -1898,7 +2521,7 @@ EOF for i in $deplibs; do name="`expr $i : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. - if test "$name" != "" ; then + if test -n "$name" && test "$name" != "0"; then $rm conftest $CC -o conftest conftest.c $i # Did it work? @@ -1934,19 +2557,19 @@ EOF ;; file_magic*) set dummy $deplibs_check_method - file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`" + file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name="`expr $a_deplib : '-l\(.*\)'`" # If $name is empty we are operating on a -L argument. - if test "$name" != "" ; then + if test -n "$name" && test "$name" != "0"; then libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path; do + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then - continue + continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. @@ -1956,7 +2579,7 @@ EOF potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | sed 's/.* -> //'` - case "$potliblink" in + case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac @@ -1984,6 +2607,40 @@ EOF fi done # Gone through all deplibs. ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name="`expr $a_deplib : '-l\(.*\)'`" + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + if eval echo \"$potent_lib\" 2>/dev/null \ + | sed 10q \ + | egrep "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + echo "*** Warning: This library needs some functionality provided by $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; none | unknown | *) newdeplibs="" if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ @@ -2006,6 +2663,13 @@ EOF libname=$libname_save name=$name_save + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + if test "$droppeddeps" = yes; then if test "$module" = yes; then echo @@ -2031,6 +2695,21 @@ EOF echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." + + if test $allow_undefined = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi fi fi # Done checking deplibs! @@ -2041,9 +2720,64 @@ EOF library_names= old_library= dlname= - + # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + if test $hardcode_into_libs = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + # Get the real and link names of the library. eval library_names=\"$library_names_spec\" set dummy $library_names @@ -2055,6 +2789,7 @@ EOF else soname="$realname" fi + test -z "$dlname" && dlname=$soname lib="$output_objdir/$realname" for link @@ -2089,7 +2824,7 @@ EOF export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols eval cmds=\"$export_symbols_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2126,7 +2861,7 @@ EOF for xlib in $convenience; do # Extract the objects. - case "$xlib" in + case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac @@ -2151,7 +2886,12 @@ EOF if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" - linkopts="$linkopts $flag" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. @@ -2160,7 +2900,7 @@ EOF else eval cmds=\"$archive_cmds\" fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2168,6 +2908,12 @@ EOF done IFS="$save_ifs" + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + exit 0 + fi + # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then @@ -2184,12 +2930,7 @@ EOF fi ;; - *.lo | *.o | *.obj) - if test -n "$link_against_libtool_libs"; then - $echo "$modename: error: cannot link libtool libraries into objects" 1>&2 - exit 1 - fi - + obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi @@ -2214,9 +2955,9 @@ EOF $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi - case "$output" in + case $output in *.lo) - if test -n "$objs"; then + if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit 1 fi @@ -2240,7 +2981,7 @@ EOF gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec - wl= + wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then @@ -2259,7 +3000,7 @@ EOF for xlib in $convenience; do # Extract the objects. - case "$xlib" in + case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac @@ -2283,11 +3024,11 @@ EOF fi # Create the old-style object. - reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2318,12 +3059,12 @@ EOF exit 0 fi - if test -n "$pic_flag"; then + if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" eval cmds=\"$reload_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -2354,8 +3095,10 @@ EOF exit 0 ;; - # Anything else should be a program. - *) + prog) + case $host in + *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;; + esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi @@ -2365,20 +3108,27 @@ EOF fi if test "$preload" = yes; then - if test "$dlopen" = unknown && test "$dlopen_self" = unknown && + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi + fi fi - + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. - case "$compile_rpath " in - *" $libdir "*) ;; - *) compile_rpath="$compile_rpath $libdir" ;; - esac case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; @@ -2396,7 +3146,7 @@ EOF hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) @@ -2414,6 +3164,14 @@ EOF *) perm_rpath="$perm_rpath $libdir" ;; esac fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + ;; + esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && @@ -2432,7 +3190,7 @@ EOF hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) @@ -2459,23 +3217,6 @@ EOF fi finalize_rpath="$rpath" - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - - # Create the binary in the object directory, then wrap it. - if test ! -d $output_objdir; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - status=$? - if test $status -ne 0 && test ! -d $output_objdir; then - exit $status - fi - fi - if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` @@ -2492,7 +3233,7 @@ EOF fi if test -n "$dlsyms"; then - case "$dlsyms" in + case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. @@ -2524,7 +3265,7 @@ extern \"C\" { test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" @@ -2534,7 +3275,7 @@ extern \"C\" { $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi - + if test -n "$export_symbols_regex"; then $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' @@ -2586,27 +3327,25 @@ extern \"C\" { #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ -# define lt_ptr_t void * +# define lt_ptr void * #else -# define lt_ptr_t char * +# define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; - lt_ptr_t address; + lt_ptr address; } lt_preloaded_symbols[] = {\ " - sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \ - -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \ - < "$nlist" >> "$output_objdir/$dlsyms" + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr_t) 0} + {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ @@ -2623,7 +3362,7 @@ static const void *lt_preloaded_setup() { fi pic_flag_for_symtable= - case "$host" in + case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use @@ -2668,7 +3407,7 @@ static const void *lt_preloaded_setup() { finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi - if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then + if test $need_relink = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" @@ -2677,7 +3416,7 @@ static const void *lt_preloaded_setup() { $show "$link_command" $run eval "$link_command" status=$? - + # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" @@ -2691,7 +3430,7 @@ static const void *lt_preloaded_setup() { # We should set the shlibpath_var rpath= for dir in $temp_rpath; do - case "$dir" in + case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" @@ -2733,11 +3472,24 @@ static const void *lt_preloaded_setup() { fi fi + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit 0 + fi + if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" - + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else @@ -2757,7 +3509,7 @@ static const void *lt_preloaded_setup() { # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - + # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname @@ -2769,12 +3521,24 @@ static const void *lt_preloaded_setup() { # Quote the relink command for shipping. if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="cd `pwd`; $relink_command" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $0 --fallback-echo"; then - case "$0" in + case $0 in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";; *) qecho="$SHELL `pwd`/$0 --fallback-echo";; esac @@ -2790,6 +3554,11 @@ static const void *lt_preloaded_setup() { case $output in *.exe) output=`echo $output|sed 's,.exe$,,'` ;; esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) exeext=.exe ;; + *) exeext= ;; + esac $rm $output trap "$rm $output; exit 1" 1 2 15 @@ -2819,7 +3588,7 @@ relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: - link_against_libtool_libs='$link_against_libtool_libs' + notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then @@ -2852,7 +3621,7 @@ else # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in - [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;; + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi @@ -2868,9 +3637,9 @@ else if test "$fast_install" = yes; then echo >> $output "\ - program=lt-'$outputname' + program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" - + if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then @@ -2887,8 +3656,9 @@ else # relink executable if necessary if test -n \"\$relink_command\"; then - if (cd \"\$thisdir\" && eval \$relink_command); then : + if relink_command_output=\`eval \$relink_command 2>&1\`; then : else + $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit 1 fi @@ -2937,9 +3707,9 @@ else # Run the actual program with our arguments. " case $host in - # win32 systems need to use the prog path for dll - # lookup to work - *-*-cygwin*) + # win32 systems need to use the prog path for dll + # lookup to work + *-*-cygwin* | *-*-pw32*) $echo >> $output "\ exec \$progdir/\$program \${1+\"\$@\"} " @@ -2993,7 +3763,7 @@ fi\ oldobjs="$libobjs_save" build_libtool_libs=no else - oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP` fi addlibs="$old_convenience" fi @@ -3009,11 +3779,11 @@ fi\ exit $status fi generated="$generated $gentop" - + # Add in members from convenience archives. for xlib in $addlibs; do # Extract the objects. - case "$xlib" in + case $xlib in [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; *) xabs=`pwd`"/$xlib" ;; esac @@ -3059,7 +3829,7 @@ fi\ eval cmds=\"$old_archive_cmds\" fi - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -3074,19 +3844,26 @@ fi\ fi # Now create the libtool archive. - case "$output" in + case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" - if test -n "$xrpath"; then - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - done - dependency_libs="$temp_xrpath $dependency_libs" - fi + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` # Only create the output if not a dry run. if test -z "$run"; then @@ -3096,8 +3873,52 @@ fi\ break fi output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit 1 + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" fi $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP @@ -3106,7 +3927,7 @@ fi\ # It is necessary for linking the library. # The name that we can dlopen(3). -dlname='$dlname' +dlname='$tdlname' # Names of this library. library_names='$library_names' @@ -3125,16 +3946,23 @@ revision=$revision # Is this an already installed library? installed=$installed +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + # Directory that this library needs to be installed in: -libdir='$install_libdir'\ -" +libdir='$install_libdir'" + if test "$installed" = no && test $need_relink = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $? + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit 0 @@ -3146,10 +3974,12 @@ libdir='$install_libdir'\ # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case "$arg" in + case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; @@ -3165,7 +3995,7 @@ libdir='$install_libdir'\ # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in + case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; @@ -3188,7 +4018,7 @@ libdir='$install_libdir'\ continue fi - case "$arg" in + case $arg in -d) isdir=yes ;; -f) prev="-f" ;; -g) prev="-g" ;; @@ -3213,7 +4043,7 @@ libdir='$install_libdir'\ # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case "$arg" in + case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) arg="\"$arg\"" ;; @@ -3264,11 +4094,11 @@ libdir='$install_libdir'\ exit 1 fi fi - case "$destdir" in + case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do - case "$file" in + case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 @@ -3290,8 +4120,8 @@ libdir='$install_libdir'\ for file in $files; do # Do each installation. - case "$file" in - *.a | *.lib) + case $file in + *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; @@ -3307,19 +4137,29 @@ libdir='$install_libdir'\ library_names= old_library= + relink_command= # If there is no directory component, then add one. - case "$file" in + case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. + DESTDIR= if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else + case "$destdir" in + *"$libdir") + DESTDIR=`$echo "$destdir" | sed -e 's!'"$libdir"'$!!'` + if test "X$destdir" != "X$DESTDIR$libdir"; then + DESTDIR= + fi + ;; + esac # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; @@ -3327,10 +4167,22 @@ libdir='$install_libdir'\ esac fi - dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/" + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" + if test -n "$relink_command"; then + $echo "$modename: warning: relinking \`$file'" 1>&2 + export DESTDIR + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + continue + fi + fi + unset DESTDIR + # See the names of the shared library. set dummy $library_names if test -n "$2"; then @@ -3338,9 +4190,16 @@ libdir='$install_libdir'\ shift shift + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + # Install the shared library and build the symlinks. - $show "$install_prog $dir/$realname $destdir/$realname" - $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $? + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi if test $# -gt 0; then # Delete the old symlinks, and create new ones. @@ -3356,7 +4215,7 @@ libdir='$install_libdir'\ # Do each command in the postinstall commands. lib="$destdir/$realname" eval cmds=\"$postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -3387,11 +4246,11 @@ libdir='$install_libdir'\ fi # Deduce the name of the destination old-style object file. - case "$destfile" in + case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; - *.o | *.obj) + *.$objext) staticdest="$destfile" destfile= ;; @@ -3430,39 +4289,46 @@ libdir='$install_libdir'\ # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - link_against_libtool_libs= + notinst_deplibs= relink_command= # If there is no directory component, then add one. - case "$file" in + case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Check the variables that should have been set. - if test -z "$link_against_libtool_libs"; then + if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2 exit 1 fi finalize=yes - for lib in $link_against_libtool_libs; do + for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. - case "$lib" in + case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi - libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`" + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then @@ -3474,6 +4340,7 @@ libdir='$install_libdir'\ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi + file=`$echo "X$file" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` @@ -3495,6 +4362,23 @@ libdir='$install_libdir'\ fi fi + # remove .exe since cygwin /usr/bin/install will append another + # one anyways + case $install_prog,$host in + /usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`echo $destfile | sed -e 's,.exe$,,'` + ;; + esac + ;; + esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" @@ -3511,9 +4395,14 @@ libdir='$install_libdir'\ $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + # Do each command in the postinstall commands. eval cmds=\"$old_postinstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -3529,11 +4418,10 @@ libdir='$install_libdir'\ if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" - exec $SHELL $0 --finish$current_libdirs - exit 1 + exec_cmd='$SHELL $0 --finish$current_libdirs' + else + exit 0 fi - - exit 0 ;; # libtool finish mode @@ -3552,7 +4440,7 @@ libdir='$install_libdir'\ if test -n "$finish_cmds"; then # Do each command in the finish commands. eval cmds=\"$finish_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' + save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" $show "$cmd" @@ -3571,7 +4459,7 @@ libdir='$install_libdir'\ fi # Exit here if they wanted silent mode. - test "$show" = : && exit 0 + test "$show" = ":" && exit 0 echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" @@ -3581,7 +4469,7 @@ libdir='$install_libdir'\ echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use \`-LLIBDIR'" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" @@ -3631,7 +4519,7 @@ libdir='$install_libdir'\ fi dir= - case "$file" in + case $file in *.la) # Check to see that this really is a libtool archive. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : @@ -3646,7 +4534,7 @@ libdir='$install_libdir'\ library_names= # If there is no directory component, then add one. - case "$file" in + case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac @@ -3701,13 +4589,13 @@ libdir='$install_libdir'\ args= for file do - case "$file" in + case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. - case "$file" in + case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac @@ -3724,8 +4612,8 @@ libdir='$install_libdir'\ if test -z "$run"; then if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" + # Export the shlibpath_var. + eval "export $shlibpath_var" fi # Restore saved enviroment variables @@ -3736,31 +4624,35 @@ libdir='$install_libdir'\ LANG="$save_LANG"; export LANG fi - # Now actually exec the command. - eval "exec \$cmd$args" - - $echo "$modename: cannot exec \$cmd$args" - exit 1 + # Now prepare to actually exec the command. + exec_cmd='"$cmd"$args' else # Display what would be done. if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" fi $echo "$cmd$args" exit 0 fi ;; - # libtool uninstall mode - uninstall) - modename="$modename: uninstall" + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" rm="$nonopt" files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" for arg do - case "$arg" in + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac @@ -3772,14 +4664,42 @@ libdir='$install_libdir'\ exit 1 fi + rmdirs= + for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. + if test "X$dir" = "X$file"; then + dir=. + objdir="$objdir" + else + objdir="$dir/$objdir" + fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test $mode = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test $mode = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi rmfiles="$file" - case "$name" in + case $name in *.la) # Possibly a libtool archive, so verify it. if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then @@ -3787,38 +4707,43 @@ libdir='$install_libdir'\ # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $dir/$n" + rmfiles="$rmfiles $objdir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library" + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - $show "$rm $rmfiles" - $run $rm $rmfiles - - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - eval cmds=\"$postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + if test $mode = uninstall; then + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + eval cmds=\"$postuninstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + if test $? != 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" - fi + fi - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - eval cmds=\"$old_postuninstall_cmds\" - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + eval cmds=\"$old_postuninstall_cmds\" + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" + if test $? != 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" - done - IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. fi - - # FIXME: should reinstall the best remaining shared library. fi ;; @@ -3827,17 +4752,35 @@ libdir='$install_libdir'\ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` rmfiles="$rmfiles $dir/$oldobj" fi - $show "$rm $rmfiles" - $run $rm $rmfiles ;; *) - $show "$rm $rmfiles" - $run $rm $rmfiles + # Do a test to see if this is a libtool program. + if test $mode = clean && + (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$file + + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + fi ;; esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 done - exit 0 + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status ;; "") @@ -3847,13 +4790,20 @@ libdir='$install_libdir'\ ;; esac - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit 1 + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit 1 + fi fi # test -z "$show_help" +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit 1 +fi + # We need to display help for each of the modes. -case "$mode" in +case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... @@ -3872,6 +4822,7 @@ Provide generalized library-building support services. MODE must be one of the following: + clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries @@ -3884,6 +4835,20 @@ a more detailed description of MODE." exit 0 ;; +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE @@ -3893,6 +4858,8 @@ Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file @@ -3972,6 +4939,8 @@ The following components of LINK-COMMAND are treated specially: -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -release RELEASE specify package release information diff --git a/merge/Makefile.am b/merge/Makefile.am index 52abfc4cdc0..240ff1593a9 100644 --- a/merge/Makefile.am +++ b/merge/Makefile.am @@ -21,14 +21,5 @@ libmerge_a_SOURCES = open.c extra.c info.c _locking.c \ rrnd.c update.c delete.c rsame.c panic.c \ close.c create.c static.c -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h - # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/missing b/missing index 7789652e877..0a7fb5a2ace 100755 --- a/missing +++ b/missing @@ -1,7 +1,7 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright (C) 1996, 1997 Free Software Foundation, Inc. -# Franc,ois Pinard , 1996. +# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,11 +18,37 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. case "$1" in -h|--h|--he|--hel|--help) @@ -35,6 +61,7 @@ error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' @@ -43,13 +70,15 @@ Supported PROGRAM values: automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing - GNU libit 0.0" + echo "missing 0.3 - GNU automake" ;; -*) @@ -61,7 +90,7 @@ Supported PROGRAM values: aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want + you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 @@ -70,7 +99,7 @@ WARNING: \`$1' is missing on your system. You should only need it if autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the + you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure @@ -79,10 +108,10 @@ WARNING: \`$1' is missing on your system. You should only need it if autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want + you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do @@ -98,7 +127,7 @@ WARNING: \`$1' is missing on your system. You should only need it if automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | @@ -159,7 +188,32 @@ WARNING: \`$1' is missing on your system. You should only need it if fi ;; + help2man) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -175,6 +229,45 @@ WARNING: \`$1' is missing on your system. You should only need it if touch $file ;; + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar ${1+"$@"} && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar ${1+"$@"} && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your diff --git a/myisam/Makefile.am b/myisam/Makefile.am index a18ff55ba9e..b68126d5d69 100644 --- a/myisam/Makefile.am +++ b/myisam/Makefile.am @@ -48,17 +48,6 @@ libmyisam_a_SOURCES = mi_open.c mi_extra.c mi_info.c mi_rkey.c \ ft_update.c sort.c CLEANFILES = test?.MY? FT?.MY? isam.log mi_test_all DEFS = -DMAP_TO_USE_RAID -# Omit dependency for ../mit-pthreads/include/sys that only exits if -# mit-pthreads are used -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h \ - wait.h # Move to automake rules ? prolint:; plparse -b -u -hF1 "-width(0,0)" "-format=%f:%l:\s%t:%n\s%m" \ diff --git a/myisammrg/Makefile.am b/myisammrg/Makefile.am index b09d7d70191..04fa1c9ec13 100644 --- a/myisammrg/Makefile.am +++ b/myisammrg/Makefile.am @@ -22,14 +22,6 @@ libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ myrg_panic.c myrg_close.c myrg_create.c myrg_static.c \ myrg_rkey.c myrg_rfirst.c myrg_rlast.c myrg_rnext.c \ myrg_rprev.c myrg_queue.c -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/mysys/Makefile.am b/mysys/Makefile.am index e3918f71b58..9141ab132bd 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -69,15 +69,6 @@ DEFS = -DDEFAULT_BASEDIR=\"$(prefix)\" \ libmysys_a_DEPENDENCIES= @THREAD_LOBJECTS@ -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h - # I hope this always does the right thing. Otherwise this is only test programs FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@ @@ -104,7 +95,7 @@ test_vsnprintf: my_vsnprintf.c $(LIBRARIES) test_dir: test_dir.c $(LIBRARIES) $(LINK) $(FLAGS) -DMAIN $(srcdir)/test_dir.c $(LDADD) $(LIBS) -test_charset: test_charset.c $(LIBRARIES) +test_charset$(EXEEXT): test_charset.c $(LIBRARIES) $(LINK) $(FLAGS) -DMAIN $(srcdir)/test_charset.c $(LDADD) $(LIBS) testhash: testhash.c $(LIBRARIES) diff --git a/regex/Makefile.am b/regex/Makefile.am index 6492ab0370f..ee421b70bcf 100644 --- a/regex/Makefile.am +++ b/regex/Makefile.am @@ -28,15 +28,6 @@ EXTRA_DIST = tests CHANGES COPYRIGHT WHATSNEW regexp.c \ debug.ih engine.ih main.ih regcomp.ih regerror.ih \ regex.3 regex.7 -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h - test: re tests ./re < tests ./re -el < tests diff --git a/sql/Makefile.am b/sql/Makefile.am index 47cee300b09..659633727ae 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -93,16 +93,6 @@ BUILT_SOURCES = sql_yacc.cc sql_yacc.h EXTRA_DIST = udf_example.cc $(BUILT_SOURCES) YFLAGS = -d -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h lex.h \ - wait.h - link_sources: rm -f mini_client_errors.c @LN_CP_F@ ../libmysql/errmsg.c mini_client_errors.c diff --git a/strings/Makefile.am b/strings/Makefile.am index a3a58565bbd..a81ba1c17cb 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -38,7 +38,7 @@ CSRCS = strxmov.c bmove_upp.c strappend.c strcont.c strend.c strfill.c strcend. endif endif -libmystrings_a_SOURCES = @CHARSET_SRCS@ $(ASRCS) $(CSRCS) +libmystrings_a_SOURCES = $(ASRCS) $(CSRCS) noinst_PROGRAMS = conf_to_src # Default charset definitions EXTRA_DIST = ctype-big5.c ctype-czech.c ctype-euc_kr.c \ @@ -54,15 +54,6 @@ EXTRA_DIST = ctype-big5.c ctype-czech.c ctype-euc_kr.c \ strnmov-sparc.s strstr-sparc.s strxmov-sparc.s \ t_ctype.h -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h - libmystrings_a_LIBADD= @CHARSET_OBJS@ ctype.o: ctype_extra_sources.c diff --git a/vio/Makefile.am b/vio/Makefile.am index 9bb8691eee6..d60a59ee3a5 100644 --- a/vio/Makefile.am +++ b/vio/Makefile.am @@ -29,17 +29,5 @@ libvio_la_SOURCES = \ vdbug.cc version.cc \ vmem.cc violitexx.cc -OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\ - __math.h time.h __time.h unistd.h __unistd.h types.h \ - xtypes.h ac-types.h posix.h string.h __string.h \ - errno.h socket.h inet.h dirent.h netdb.h \ - cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \ - prio_queue.h pthread_attr.h pthread_once.h queue.h\ - sleep.h specific.h version.h pwd.h timers.h uio.h \ - cdefs.h machdep.h signal.h __signal.h util.h \ - openssl/x509 openssl/ssl.h openssl/err.h \ - openssl/pem.h openssl/asn1.h - - # Don't update the files from bitkeeper %::SCCS/s.% From 564c7b241fface9cc9843f47972f3a4060d2bd4d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Nov 2002 18:54:23 +0100 Subject: [PATCH 159/246] myisammrg::records_in_range --- myisammrg/Makefile.am | 2 +- myisammrg/myrg_range.c | 39 +++++++++++++++++++++++++++++++++++++++ sql/ha_myisammrg.cc | 13 +++++++++++++ sql/ha_myisammrg.h | 5 +++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 myisammrg/myrg_range.c diff --git a/myisammrg/Makefile.am b/myisammrg/Makefile.am index 299b1a20d6e..6a6824affba 100644 --- a/myisammrg/Makefile.am +++ b/myisammrg/Makefile.am @@ -21,7 +21,7 @@ libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ myrg_rrnd.c myrg_update.c myrg_delete.c myrg_rsame.c \ myrg_panic.c myrg_close.c myrg_create.c myrg_static.c \ myrg_rkey.c myrg_rfirst.c myrg_rlast.c myrg_rnext.c \ - myrg_rprev.c myrg_queue.c myrg_write.c + myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/myisammrg/myrg_range.c b/myisammrg/myrg_range.c new file mode 100644 index 00000000000..9d93ad75a35 --- /dev/null +++ b/myisammrg/myrg_range.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "myrg_def.h" + +ha_rows myrg_records_in_range(MYRG_INFO *info, int inx, const byte *start_key, + uint start_key_len, + enum ha_rkey_function start_search_flag, + const byte *end_key, uint end_key_len, + enum ha_rkey_function end_search_flag) +{ + ha_rows records=0, res; + MYRG_TABLE *table; + + for (table=info->open_tables ; table != info->end_table ; table++) + { + res=mi_records_in_range(table->table, inx, + start_key, start_key_len, start_search_flag, + end_key, end_key_len, end_search_flag); + if (res == HA_POS_ERROR || records > HA_POS_ERROR - res) + return res; + records+=res; + } + return records; +} + diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 2342561b7f8..07683dca73e 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -187,6 +187,19 @@ void ha_myisammrg::position(const byte *record) ha_store_ptr(ref, ref_length, (my_off_t) position); } +ha_rows ha_myisammrg::records_in_range(int inx, + const byte *start_key,uint start_key_len, + enum ha_rkey_function start_search_flag, + const byte *end_key,uint end_key_len, + enum ha_rkey_function end_search_flag) +{ + return (ha_rows) myrg_records_in_range(file, + inx, + start_key,start_key_len, + start_search_flag, + end_key,end_key_len, + end_search_flag); +} void ha_myisammrg::info(uint flag) { diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h index b75d5360097..8e33b99e418 100644 --- a/sql/ha_myisammrg.h +++ b/sql/ha_myisammrg.h @@ -69,6 +69,11 @@ class ha_myisammrg: public handler int rnd_next(byte *buf); int rnd_pos(byte * buf, byte *pos); void position(const byte *record); + ha_rows ha_myisammrg::records_in_range(int inx, + const byte *start_key,uint start_key_len, + enum ha_rkey_function start_search_flag, + const byte *end_key,uint end_key_len, + enum ha_rkey_function end_search_flag); my_off_t row_position() { return myrg_position(file); } void info(uint); int extra(enum ha_extra_function operation); From 4589844513f1663d49f32ed6cdf1e14003f940bc Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Nov 2002 18:58:03 +0100 Subject: [PATCH 160/246] merge::records_in_range and optimizer sql/sql_select.cc: optimizer bug fixed. (what's the difference between s->records ans s->found_records ?) --- mysql-test/r/merge.result | 39 +++++++++++++++++++++++++++++++++++++-- mysql-test/t/merge.test | 33 +++++++++++++++++++++++++++++++++ sql/sql_select.cc | 4 ++-- 3 files changed, 72 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index c6546d8cac6..f7e692d1c7b 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -35,10 +35,10 @@ insert into t1 select NULL,message from t2; create table t3 (a int not null, b char(20), key(a)) type=MERGE UNION=(test.t1,test.t2); explain select * from t3 where a < 10; table type possible_keys key key_len ref rows Extra -t3 range a a 4 NULL 10 Using where +t3 range a a 4 NULL 18 Using where explain select * from t3 where a > 10 and a < 20; table type possible_keys key key_len ref rows Extra -t3 range a a 4 NULL 10 Using where +t3 range a a 4 NULL 16 Using where select * from t3 where a = 10; a b 10 Testing @@ -561,3 +561,38 @@ a 1 2 drop table if exists t1, t2, t3, t4, t5, t6; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 ( +fileset_id tinyint(3) unsigned NOT NULL default '0', +file_code varchar(32) NOT NULL default '', +fileset_root_id tinyint(3) unsigned NOT NULL default '0', +PRIMARY KEY (fileset_id,file_code), +KEY files (fileset_id,fileset_root_id) +) TYPE=MyISAM; +INSERT INTO t1 VALUES (2, '0000000111', 1), (2, '0000000112', 1), (2, '0000000113', 1), +(2, '0000000114', 1), (2, '0000000115', 1), (2, '0000000116', 1), (2, '0000000117', 1), +(2, '0000000118', 1), (2, '0000000119', 1), (2, '0000000120', 1); +CREATE TABLE t2 ( +fileset_id tinyint(3) unsigned NOT NULL default '0', +file_code varchar(32) NOT NULL default '', +fileset_root_id tinyint(3) unsigned NOT NULL default '0', +PRIMARY KEY (fileset_id,file_code), +KEY files (fileset_id,fileset_root_id) +) TYPE=MRG_MyISAM UNION=(t1); +EXPLAIN SELECT * FROM t2 IGNORE INDEX (files) WHERE fileset_id = 2 +AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; +table type possible_keys key key_len ref rows Extra +t2 range PRIMARY PRIMARY 33 NULL 5 Using where +EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2 +AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; +table type possible_keys key key_len ref rows Extra +t2 range PRIMARY,files PRIMARY 33 NULL 5 Using where +EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2 +AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; +table type possible_keys key key_len ref rows Extra +t1 range PRIMARY,files PRIMARY 33 NULL 5 Using where +EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2 +AND file_code = '0000000115' LIMIT 1; +table type possible_keys key key_len ref rows Extra +t2 const PRIMARY,files PRIMARY 33 const,const 1 +DROP TABLE IF EXISTS t1, t2; diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 55a71cc0ab8..2199f50fb16 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -204,3 +204,36 @@ create temporary table t6 (a int not null) TYPE=MERGE UNION=(t4,t5); select * from t6; drop table if exists t1, t2, t3, t4, t5, t6; +# +# testing merge::records_in_range and optimizer +# + +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 ( + fileset_id tinyint(3) unsigned NOT NULL default '0', + file_code varchar(32) NOT NULL default '', + fileset_root_id tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (fileset_id,file_code), + KEY files (fileset_id,fileset_root_id) +) TYPE=MyISAM; +INSERT INTO t1 VALUES (2, '0000000111', 1), (2, '0000000112', 1), (2, '0000000113', 1), +(2, '0000000114', 1), (2, '0000000115', 1), (2, '0000000116', 1), (2, '0000000117', 1), +(2, '0000000118', 1), (2, '0000000119', 1), (2, '0000000120', 1); +CREATE TABLE t2 ( + fileset_id tinyint(3) unsigned NOT NULL default '0', + file_code varchar(32) NOT NULL default '', + fileset_root_id tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (fileset_id,file_code), + KEY files (fileset_id,fileset_root_id) +) TYPE=MRG_MyISAM UNION=(t1); + +EXPLAIN SELECT * FROM t2 IGNORE INDEX (files) WHERE fileset_id = 2 +AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; +EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2 +AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; +EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2 +AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; +EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2 +AND file_code = '0000000115' LIMIT 1; +DROP TABLE IF EXISTS t1, t2; + diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 4f3ebd61774..a7e378420f2 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1219,7 +1219,7 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds, select->quick=0; if (records != HA_POS_ERROR) { - s->found_records=records; + s->records=s->found_records=records; s->read_time= (ha_rows) (s->quick ? s->quick->read_time : 0.0); } } @@ -1944,7 +1944,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, records This gives the formula: records= (x * (b-a) + a*c-b)/(c-1) - + b = records matched by whole key a = records matched by first key part (10% of all records?) c = number of key parts in key From b463146ac6bf0a828bceacfb02242069f1930abb Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Nov 2002 20:41:25 +0200 Subject: [PATCH 161/246] new status variable (number of queries deleted because of low memory) mysql-test/r/query_cache.result: test of new status variable mysql-test/t/query_cache.test: test of new status variable --- mysql-test/r/query_cache.result | 6 ++++++ mysql-test/t/query_cache.test | 2 ++ sql/mysqld.cc | 1 + sql/sql_cache.cc | 3 ++- sql/sql_cache.h | 2 +- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index a09f4608142..a37313a150a 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -320,6 +320,9 @@ insert into t1 select * from t2; show status like "Qcache_hits"; Variable_name Value Qcache_hits 4 +show status like "Qcache_lowmem_prunes"; +Variable_name Value +Qcache_lowmem_prunes 0 select a as a1, a as a2 from t1; select a as a2, a as a3 from t1; select a as a3, a as a4 from t1; @@ -330,6 +333,9 @@ Qcache_hits 4 show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 2 +show status like "Qcache_lowmem_prunes"; +Variable_name Value +Qcache_lowmem_prunes 2 reset query cache; insert into t2 select * from t1; insert into t1 select * from t2; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index a0d2a34ee76..6c3f3d6ac52 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -206,6 +206,7 @@ insert into t2 select * from t1; # 2584 insert into t1 select * from t2; # 4181 show status like "Qcache_hits"; +show status like "Qcache_lowmem_prunes"; disable_result_log; select a as a1, a as a2 from t1; select a as a2, a as a3 from t1; @@ -215,6 +216,7 @@ select a as a1, a as a2 from t1; enable_result_log; show status like "Qcache_hits"; show status like "Qcache_queries_in_cache"; +show status like "Qcache_lowmem_prunes"; reset query cache; # # Query bigger then query_cache_limit diff --git a/sql/mysqld.cc b/sql/mysqld.cc index cfb128f6dd6..2404b35b00f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3793,6 +3793,7 @@ struct show_var_st status_vars[]= { {"Qcache_queries_in_cache", (char*) &query_cache.queries_in_cache, SHOW_LONG_CONST}, {"Qcache_inserts", (char*) &query_cache.inserts, SHOW_LONG}, {"Qcache_hits", (char*) &query_cache.hits, SHOW_LONG}, + {"Qcache_lowmem_prunes", (char*) &query_cache.lowmem_prunes, SHOW_LONG}, {"Qcache_not_cached", (char*) &query_cache.refused, SHOW_LONG}, {"Qcache_free_memory", (char*) &query_cache.free_memory, SHOW_LONG_CONST}, diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index db601cd8a00..64c62345182 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -708,7 +708,7 @@ Query_cache::Query_cache(ulong query_cache_limit_arg, :query_cache_size(0), query_cache_limit(query_cache_limit_arg), queries_in_cache(0), hits(0), inserts(0), refused(0), - total_blocks(0), + total_blocks(0), lowmem_prunes(0), min_allocation_unit(ALIGN_SIZE(min_allocation_unit_arg)), min_result_data_size(ALIGN_SIZE(min_result_data_size_arg)), def_query_hash_size(ALIGN_SIZE(def_query_hash_size_arg)), @@ -1512,6 +1512,7 @@ my_bool Query_cache::free_old_query() if (query_block != 0) { free_query(query_block); + lowmem_prunes++; DBUG_RETURN(0); } } diff --git a/sql/sql_cache.h b/sql/sql_cache.h index 0c73c46652e..b15df28f54b 100644 --- a/sql/sql_cache.h +++ b/sql/sql_cache.h @@ -219,7 +219,7 @@ public: ulong query_cache_size, query_cache_limit; /* statistics */ ulong free_memory, queries_in_cache, hits, inserts, refused, - free_memory_blocks, total_blocks; + free_memory_blocks, total_blocks, lowmem_prunes; protected: /* From d8eda713379befa0f9b9048d3d2d58f7f4c59d2d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Nov 2002 20:08:42 +0100 Subject: [PATCH 162/246] better boundary behaviour --- myisammrg/myrg_range.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/myisammrg/myrg_range.c b/myisammrg/myrg_range.c index 9d93ad75a35..7644ae40c7b 100644 --- a/myisammrg/myrg_range.c +++ b/myisammrg/myrg_range.c @@ -30,8 +30,10 @@ ha_rows myrg_records_in_range(MYRG_INFO *info, int inx, const byte *start_key, res=mi_records_in_range(table->table, inx, start_key, start_key_len, start_search_flag, end_key, end_key_len, end_search_flag); - if (res == HA_POS_ERROR || records > HA_POS_ERROR - res) - return res; + if (res == HA_POS_ERROR) + return HA_POS_ERROR; + if (records > HA_POS_ERROR - res) + return HA_POS_ERROR-1; records+=res; } return records; From 0fb3b8d9abc3eb2e3072c2f8681099e7db0a256e Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Nov 2002 22:23:57 +0200 Subject: [PATCH 163/246] fixed subselect explain bug mysql-test/r/subselect.result: test of subselect explain bug mysql-test/t/subselect.test: test of subselect explain bug sql/sql_select.cc: remuved difference between optimization for execution and optimization for description --- mysql-test/r/subselect.result | 18 ++++++++++++++++++ mysql-test/t/subselect.test | 15 +++++++++++++++ sql/sql_select.cc | 11 +++-------- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index d1a3056d8e9..f4341e5dd71 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -269,3 +269,21 @@ INSERT INTO iftest VALUES (); SELECT field FROM iftest WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) HAVING field='b'); Subselect returns more than 1 record drop table iftest; +drop table if exists threadhardwarefr7; +CREATE TABLE `threadhardwarefr7` ( +`numeropost` mediumint(8) unsigned NOT NULL default '0', +`numreponse` int(10) unsigned NOT NULL auto_increment, +`pseudo` varchar(35) NOT NULL default '', +PRIMARY KEY (`numeropost`,`numreponse`), +UNIQUE KEY `numreponse` (`numreponse`), +KEY `pseudo` (`pseudo`,`numeropost`) +) TYPE=MyISAM; +INSERT INTO threadhardwarefr7 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); +EXPLAIN SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE Select tables optimized away +EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY threadhardwarefr7 const PRIMARY,numreponse PRIMARY 7 const,const 1 +2 SUBSELECT Select tables optimized away +drop table if exists threadhardwarefrtest7; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 63f689d2608..a81b3f62945 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -166,3 +166,18 @@ INSERT INTO iftest VALUES (); -- error 1240 SELECT field FROM iftest WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) HAVING field='b'); drop table iftest; + +drop table if exists threadhardwarefr7; +CREATE TABLE `threadhardwarefr7` ( + `numeropost` mediumint(8) unsigned NOT NULL default '0', + `numreponse` int(10) unsigned NOT NULL auto_increment, + `pseudo` varchar(35) NOT NULL default '', + PRIMARY KEY (`numeropost`,`numreponse`), + UNIQUE KEY `numreponse` (`numreponse`), + KEY `pseudo` (`pseudo`,`numeropost`) +) TYPE=MyISAM; +INSERT INTO threadhardwarefr7 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); + +EXPLAIN SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'; +EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'); +drop table if exists threadhardwarefrtest7; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b3838628d35..7861d6c5541 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -395,13 +395,7 @@ JOIN::optimize() zero_result_cause= "No matching min/max row"; DBUG_RETURN(0); } - if (select_options & SELECT_DESCRIBE) - { - select_describe(this, false, false, false, - "Select tables optimized away"); - delete procedure; - DBUG_RETURN(1); - } + zero_result_cause= "Select tables optimized away"; tables_list= 0; // All tables resolved } } @@ -663,7 +657,8 @@ JOIN::exec() { // Only test of functions error=0; if (select_options & SELECT_DESCRIBE) - select_describe(this, false, false, false, "No tables used"); + select_describe(this, false, false, false, + (zero_result_cause?zero_result_cause:"No tables used")); else { result->send_fields(fields_list,1); From f5ddbac858550cdc4539d0ca2821247702b40afb Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 11:40:55 +0100 Subject: [PATCH 164/246] - Tagged ChangeSet 1.1400.1.3 as "mysql-4.0.5" - bumped up version number in configure.in - fixed a typo in test-create.sh BitKeeper/etc/ignore: Added autom4te.cache/output.0 autom4te.cache/requests autom4te.cache/traces.0 bdb/dist/autom4te.cache/output.0 bdb/dist/autom4te.cache/requests bdb/dist/autom4te.cache/traces.0 innobase/autom4te.cache/output.0 innobase/autom4te.cache/requests innobase/autom4te.cache/traces.0 to the ignore list configure.in: - Bumped up version number to 4.0.6 now that 4.0.5 is tagged (4.0.6 is now labelled "gamma", according to conversation with Monty) sql-bench/test-create.sh: - typo fixed --- .bzrignore | 9 +++++++++ configure.in | 2 +- sql-bench/test-create.sh | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.bzrignore b/.bzrignore index d1ea6c7d70e..da38498d824 100644 --- a/.bzrignore +++ b/.bzrignore @@ -497,3 +497,12 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +autom4te.cache/output.0 +autom4te.cache/requests +autom4te.cache/traces.0 +bdb/dist/autom4te.cache/output.0 +bdb/dist/autom4te.cache/requests +bdb/dist/autom4te.cache/traces.0 +innobase/autom4te.cache/output.0 +innobase/autom4te.cache/requests +innobase/autom4te.cache/traces.0 diff --git a/configure.in b/configure.in index 1bbb9fc68c5..4f574f30f97 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! -AM_INIT_AUTOMAKE(mysql, 4.0.5-beta) +AM_INIT_AUTOMAKE(mysql, 4.0.6-gamma) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 diff --git a/sql-bench/test-create.sh b/sql-bench/test-create.sh index 2853984e393..1e7d3841bb5 100644 --- a/sql-bench/test-create.sh +++ b/sql-bench/test-create.sh @@ -54,7 +54,7 @@ if ($opt_small_test) } -print "Testing the speed of creating and droping tables\n"; +print "Testing the speed of creating and dropping tables\n"; print "Testing with $max_tables tables and $opt_loop_count loop count\n\n"; #### From 925cd76bc9f6538c2d7f10a756dde7b5d648d40f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 13:41:07 +0200 Subject: [PATCH 165/246] Added tests for boolean operators in select part Redo of changeset I commited, but failed to push mysql-test/r/bool.result: Added tests for boolean operators in select part mysql-test/t/bool.test: Added tests for boolean operators in select part --- mysql-test/r/bool.result | 26 ++++++++++++++++++++++++++ mysql-test/t/bool.test | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/mysql-test/r/bool.result b/mysql-test/r/bool.result index dc170ee5150..cb82c6baa0f 100644 --- a/mysql-test/r/bool.result +++ b/mysql-test/r/bool.result @@ -46,3 +46,29 @@ SELECT @a, @b; @a @b 0 6 DROP TABLE t1; +drop table if exists t; +create table t(a int, b int); +insert into t values(null, null), (0, null), (1, null), (null, 0), (null, 1), (0, 0), (0, 1), (1, 0), (1, 1); +select ifnull(A, 'N') as A, ifnull(B, 'N') as B, ifnull(not A, 'N') as nA, ifnull(not B, 'N') as nB, ifnull(A and B, 'N') as AB, ifnull(not (A and B), 'N') as `n(AB)`, ifnull((not A or not B), 'N') as nAonB, ifnull(A or B, 'N') as AoB, ifnull(not(A or B), 'N') as `n(AoB)`, ifnull(not A and not B, 'N') as nAnB from t; +A B nA nB AB n(AB) nAonB AoB n(AoB) nAnB +N N N N N N N N N N +0 N 1 N 0 1 1 N N N +1 N 0 N N N N 1 0 0 +N 0 N 1 0 1 1 N N N +N 1 N 0 N N N 1 0 0 +0 0 1 1 0 1 1 0 1 1 +0 1 1 0 0 1 1 1 0 0 +1 0 0 1 0 1 1 1 0 0 +1 1 0 0 1 0 0 1 0 0 +select ifnull(A=1, 'N') as A, ifnull(B=1, 'N') as B, ifnull(not (A=1), 'N') as nA, ifnull(not (B=1), 'N') as nB, ifnull((A=1) and (B=1), 'N') as AB, ifnull(not ((A=1) and (B=1)), 'N') as `n(AB)`, ifnull((not (A=1) or not (B=1)), 'N') as nAonB, ifnull((A=1) or (B=1), 'N') as AoB, ifnull(not((A=1) or (B=1)), 'N') as `n(AoB)`, ifnull(not (A=1) and not (B=1), 'N') as nAnB from t; +A B nA nB AB n(AB) nAonB AoB n(AoB) nAnB +N N N N N N N N N N +0 N 1 N 0 1 1 N N N +1 N 0 N N N N 1 0 0 +N 0 N 1 0 1 1 N N N +N 1 N 0 N N N 1 0 0 +0 0 1 1 0 1 1 0 1 1 +0 1 1 0 0 1 1 1 0 0 +1 0 0 1 0 1 1 1 0 0 +1 1 0 0 1 0 0 1 0 0 +drop table t; diff --git a/mysql-test/t/bool.test b/mysql-test/t/bool.test index 5754acf4bcd..10f97fefb73 100644 --- a/mysql-test/t/bool.test +++ b/mysql-test/t/bool.test @@ -26,3 +26,26 @@ SELECT * FROM t1 WHERE a=2 OR (NULL AND (@a:=@a+1)); SELECT * FROM t1 WHERE NOT(a=2 OR (NULL AND (@b:=@b+1))); SELECT @a, @b; DROP TABLE t1; + + +# Test boolean operators in select part +# NULLs are represented as N for readability +# Read nA as !A, AB as A && B, AoB as A || B +# Result table makes ANSI happy + +drop table if exists t; +create table t(a int, b int); +insert into t values(null, null), (0, null), (1, null), (null, 0), (null, 1), (0, 0), (0, 1), (1, 0), (1, 1); + +# Below test is valid untill we have True/False implemented as 1/0 +# To comply to all rules it must show that: n(AB) = nAonB, n(AoB) = nAnB + +select ifnull(A, 'N') as A, ifnull(B, 'N') as B, ifnull(not A, 'N') as nA, ifnull(not B, 'N') as nB, ifnull(A and B, 'N') as AB, ifnull(not (A and B), 'N') as `n(AB)`, ifnull((not A or not B), 'N') as nAonB, ifnull(A or B, 'N') as AoB, ifnull(not(A or B), 'N') as `n(AoB)`, ifnull(not A and not B, 'N') as nAnB from t; + +# This should work with any internal representation of True/False +# Result must be same as above + +select ifnull(A=1, 'N') as A, ifnull(B=1, 'N') as B, ifnull(not (A=1), 'N') as nA, ifnull(not (B=1), 'N') as nB, ifnull((A=1) and (B=1), 'N') as AB, ifnull(not ((A=1) and (B=1)), 'N') as `n(AB)`, ifnull((not (A=1) or not (B=1)), 'N') as nAonB, ifnull((A=1) or (B=1), 'N') as AoB, ifnull(not((A=1) or (B=1)), 'N') as `n(AoB)`, ifnull(not (A=1) and not (B=1), 'N') as nAnB from t; + + +drop table t; From e41123b89fbf0bb0590c1736f7ad2f9bbb2c47c4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 14:59:45 +0200 Subject: [PATCH 166/246] Small change to make key cache code cleaer --- mysys/mf_keycache.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index 5b8ec96b4d1..d5b0a0a056a 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -548,13 +548,14 @@ int flush_key_blocks(File file, enum flush_type type) count++; } /* Only allocate a new buffer if its bigger than the one we have */ - if (count <= FLUSH_CACHE || - !(cache=(SEC_LINK**) my_malloc(sizeof(SEC_LINK*)*count,MYF(0)))) + if (count > FLUSH_CACHE) { - cache=cache_buff; /* Fall back to safe buffer */ - count=FLUSH_CACHE; + if (!(cache=(SEC_LINK**) my_malloc(sizeof(SEC_LINK*)*count,MYF(0)))) + { + cache=cache_buff; /* Fall back to safe buffer */ + count=FLUSH_CACHE; + } } - end=cache+count; } /* Go through the keys and write them to buffer to be flushed */ From 4cdf5497a9924266b2fa789e25370fd82b59389b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 16:30:19 +0100 Subject: [PATCH 167/246] added -DHAVE_BROKEN_REALPATH for FreeBSD builds --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 0fc85479db5..c66364f3b0c 100644 --- a/configure.in +++ b/configure.in @@ -922,7 +922,7 @@ case $SYSTEM_TYPE in ;; *freebsd*) echo "Adding fix for interrupted reads" - CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000" + CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH" ;; *netbsd*) echo "Adding flag -Dunix" From 6600e656b18fdaa458297c50ed13cdf4c7f5c89e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 16:50:37 +0100 Subject: [PATCH 168/246] add -DHAVE_BROKEN_REALPATH to CFLAGS on FreeBSD (previous patch touched only CXXFLAGS) --- configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.in b/configure.in index e413bd20045..3fb495281a0 100644 --- a/configure.in +++ b/configure.in @@ -925,6 +925,7 @@ case $SYSTEM_TYPE in ;; *freebsd*) echo "Adding fix for interrupted reads" + CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH" CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH" ;; *netbsd*) From 8e2346e88409006fddec39d2db08563275e0682f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 18:28:51 +0200 Subject: [PATCH 169/246] lot's of fixes with test cases mysql-test/r/create.result: A test case for foreign key bug that is resolved mysql-test/r/select_found.result: test case for new select ... limit 0 behaviour mysql-test/t/create.test: test case for foreign key bug that is fixed mysql-test/t/select_found.test: test case for new behaviour of SELECT ... LIMIT 0 sql/sql_select.cc: SELECT ... LIMIT 0 sql/sql_union.cc: replacing my dirty hack with Sanja's "proper" fix --- mysql-test/r/create.result | 3 +++ mysql-test/r/select_found.result | 4 ++-- mysql-test/t/create.test | 3 +++ mysql-test/t/select_found.test | 2 +- sql/sql_select.cc | 7 ++++--- sql/sql_union.cc | 1 - 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index cc1780a12d0..49a42872fa3 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -158,3 +158,6 @@ select * from t1; if('2002'='2002','Y','N') Y drop table if exists t1; +create table t1 (a int, key(a)); +create table t2 (b int, foreign key(b) references t1(a), key(b)); +drop table if exists t1,t2; diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 6fb9ea0ee0b..bbf0a8ba09f 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -173,9 +173,9 @@ SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0; SELECT FOUND_ROWS(); FOUND_ROWS() 1 -SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0; +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE numeropost > 1 LIMIT 0; titre numeropost maxnumrep SELECT FOUND_ROWS(); FOUND_ROWS() -3 +2 drop table t1; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 65be9683061..3bad053875c 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -110,3 +110,6 @@ drop table t1; create table t1 select if('2002'='2002','Y','N'); select * from t1; drop table if exists t1; +create table t1 (a int, key(a)); +create table t2 (b int, foreign key(b) references t1(a), key(b)); +drop table if exists t1,t2; diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index c67c99924c3..c8458dd3aea 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -86,6 +86,6 @@ SELECT SQL_CALC_FOUND_ROWS titre,numeropost,maxnumrep FROM t1 WHERE numeropost I SELECT FOUND_ROWS(); SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0; SELECT FOUND_ROWS(); -SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0; +SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE numeropost > 1 LIMIT 0; SELECT FOUND_ROWS(); drop table t1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9f9e2c67c2d..db3acfba909 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -324,6 +324,7 @@ JOIN::prepare(TABLE_LIST *tables_init, this->group= group_list != 0; row_limit= ((select_distinct || order || group_list) ? HA_POS_ERROR : unit->select_limit_cnt); + do_send_rows = (row_limit) ? 1 : 0; this->unit= unit; #ifdef RESTRICTED_GROUP @@ -664,7 +665,7 @@ JOIN::exec() result->send_fields(fields_list,1); if (!having || having->val_int()) { - if (do_send_rows && unit->select_limit_cnt && result->send_data(fields_list)) + if (do_send_rows && result->send_data(fields_list)) error= 1; else { @@ -2611,8 +2612,8 @@ make_simple_join(JOIN *join,TABLE *tmp_table) join->sum_funcs=0; join->send_records=(ha_rows) 0; join->group=0; - join->do_send_rows = 1; join->row_limit=join->unit->select_limit_cnt; + join->do_send_rows = (join->row_limit) ? 1 : 0; join_tab->cache.buff=0; /* No cacheing */ join_tab->table=tmp_table; @@ -5184,7 +5185,7 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)), error=0; if (join->procedure) error=join->procedure->send_row(*join->fields); - else if (join->do_send_rows && join->unit->select_limit_cnt) + else if (join->do_send_rows) error=join->result->send_data(*join->fields); if (error) DBUG_RETURN(-1); /* purecov: inspected */ diff --git a/sql/sql_union.cc b/sql/sql_union.cc index aeaae92f0c3..0e6de306c0d 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -86,7 +86,6 @@ bool select_union::send_data(List &values) } else return 1; - thd->net.report_error=0; // donno why does it work, but it does ... } return 0; } From db7357a9e752982c537ee95c0f76a7b4d11669c3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 20:50:42 +0400 Subject: [PATCH 170/246] fix xml-output of mysqldump client/mysqldump.c: fix xml-output --- client/mysqldump.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 39e9714660a..a6eaf1794fd 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -294,7 +294,10 @@ static void short_usage(void) static void write_header(FILE *sql_file, char *db_name) { if (opt_xml) + { fprintf(sql_file,"\n"); + fprintf(sql_file,"\n"); + } else { fprintf(sql_file, "-- MySQL dump %s\n--\n", DUMP_VERSION); @@ -308,6 +311,12 @@ static void write_header(FILE *sql_file, char *db_name) return; } /* write_header */ +static void write_footer(FILE *sql_file) +{ + if (opt_xml) + fprintf(sql_file,""); + fputs("\n", sql_file); +} /* write_footer */ static my_bool get_one_option(int optid, const struct my_option *opt __attribute__((unused)), @@ -978,7 +987,7 @@ static void dumpTable(uint numFields, char *table) rownr=0; init_length=(uint) strlen(insert_pat)+4; if (opt_xml) - fprintf(md_result_file, "\t<%s>\n", table); + fprintf(md_result_file, "\t\n", table); if (opt_autocommit) fprintf(md_result_file, "set autocommit=0;\n"); @@ -1067,8 +1076,8 @@ static void dumpTable(uint numFields, char *table) /* change any strings ("inf","nan",..) into NULL */ char *ptr = row[i]; if (opt_xml) - fprintf(md_result_file, "\t\t<%s>%s\n", - field->name,!isalpha(*ptr) ?ptr: "NULL",field->name); + fprintf(md_result_file, "\t\t%s\n", + field->name,!isalpha(*ptr) ?ptr: "NULL"); else fputs((!isalpha(*ptr)) ? ptr : "NULL", md_result_file); } @@ -1076,8 +1085,8 @@ static void dumpTable(uint numFields, char *table) else { if (opt_xml) - fprintf(md_result_file, "\t\t<%s>%s\n", - field->name, "NULL", field->name); + fprintf(md_result_file, "\t\t%s\n", + field->name, "NULL"); else fputs("NULL", md_result_file); } @@ -1118,7 +1127,7 @@ static void dumpTable(uint numFields, char *table) /* XML - close table tag and supress regular output */ if (opt_xml) - fprintf(md_result_file, "\t\n", table); + fprintf(md_result_file, "\t
\n"); else if (extended_insert && row_break) fputs(";\n", md_result_file); /* If not empty table */ fflush(md_result_file); @@ -1150,7 +1159,7 @@ static void print_quoted_xml(FILE *output, char *fname, char *str, uint len) { const char *end; - fprintf(output, "\t\t<%s>", fname); + fprintf(output, "\t\t", fname); for (end = str + len; str != end; str++) { if (*str == '<') @@ -1164,7 +1173,7 @@ static void print_quoted_xml(FILE *output, char *fname, char *str, uint len) else fputc(*str, output); } - fprintf(output, "\n", fname); + fprintf(output, "\n"); } static char *getTableName(int reset) @@ -1219,13 +1228,8 @@ static int dump_databases(char **db_names) int result=0; for ( ; *db_names ; db_names++) { - /* XML edit - add database element */ - if (opt_xml) - fprintf(md_result_file, "<%s>\n", *db_names); if (dump_all_tables_in_db(*db_names)) result=1; - if (opt_xml) - fprintf(md_result_file, "\n", *db_names); } return result; } /* dump_databases */ @@ -1238,7 +1242,7 @@ static int init_dumping(char *database) DBerror(sock, "when selecting the database"); return 1; /* If --force */ } - if (!path) + if (!path && !opt_xml) { if (opt_databases || opt_alldbs) { @@ -1264,6 +1268,8 @@ static int dump_all_tables_in_db(char *database) if (init_dumping(database)) return 1; + if (opt_xml) + fprintf(md_result_file, "\n", database); if (lock_tables) { DYNAMIC_STRING query; @@ -1290,6 +1296,8 @@ static int dump_all_tables_in_db(char *database) if (!dFlag && numrows > 0) dumpTable(numrows,table); } + if (opt_xml) + fprintf(md_result_file, "\n"); if (lock_tables) mysql_query(sock,"UNLOCK_TABLES"); return 0; @@ -1326,12 +1334,16 @@ static int dump_selected_tables(char *db, char **table_names, int tables) DBerror(sock, "when doing refresh"); /* We shall countinue here, if --force was given */ } + if (opt_xml) + fprintf(md_result_file, "\n", db); for (; tables > 0 ; tables-- , table_names++) { numrows = getTableStructure(*table_names, db); if (!dFlag && numrows > 0) dumpTable(numrows, *table_names); } + if (opt_xml) + fprintf(md_result_file, "\n"); if (lock_tables) mysql_query(sock,"UNLOCK_TABLES"); return 0; @@ -1462,7 +1474,7 @@ int main(int argc, char **argv) } } dbDisconnect(current_host); - fputs("\n", md_result_file); + write_footer(md_result_file); if (md_result_file != stdout) my_fclose(md_result_file, MYF(0)); my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR)); From f22010c835d6f7baa184c4647c9c9eca5c0a6ef2 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 20:58:04 +0200 Subject: [PATCH 171/246] fix for message being sent in EXPLAIN ... sql/sql_base.cc: temporary removal ... --- sql/sql_base.cc | 2 +- sql/sql_class.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index fd6c2c48020..be630fd375c 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1078,7 +1078,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, table->status=STATUS_NO_RECORD; table->keys_in_use_for_query= table->keys_in_use; table->used_keys= table->keys_for_keyread; - DBUG_ASSERT(table->key_read == 0); +// DBUG_ASSERT(table->key_read == 0); put in comment as this fails on EXPLAIN DBUG_RETURN(table); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index e6acab6a244..ebea620ffa1 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -882,7 +882,8 @@ bool select_singleval_subselect::send_data(List &items) DBUG_ENTER("select_singleval_subselect::send_data"); Item_singleval_subselect *it= (Item_singleval_subselect *)item; if (it->assigned()){ - my_message(ER_SUBSELECT_NO_1_ROW, ER(ER_SUBSELECT_NO_1_ROW), MYF(0)); + if (!current_thd->lex.describe) + my_message(ER_SUBSELECT_NO_1_ROW, ER(ER_SUBSELECT_NO_1_ROW), MYF(0)); DBUG_RETURN(1); } if (unit->offset_limit_cnt) From 2eb4a1ea383e7db5fc5549dcc9d0557aaffc928e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 22:19:15 +0200 Subject: [PATCH 172/246] Fixed explain error handling mysql-test/r/subselect.result: test of subselect explain mysql-test/t/subselect.test: test of subselect explain --- mysql-test/r/subselect.result | 2 ++ mysql-test/t/subselect.test | 3 ++- sql/sql_select.cc | 16 ++++++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index f4341e5dd71..e54e1fb0fef 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -279,6 +279,8 @@ UNIQUE KEY `numreponse` (`numreponse`), KEY `pseudo` (`pseudo`,`numeropost`) ) TYPE=MyISAM; INSERT INTO threadhardwarefr7 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); +EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM threadhardwarefr7 WHERE numeropost='1'); +Subselect returns more than 1 record EXPLAIN SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE Select tables optimized away diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index a81b3f62945..7a507be4ed2 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -177,7 +177,8 @@ CREATE TABLE `threadhardwarefr7` ( KEY `pseudo` (`pseudo`,`numeropost`) ) TYPE=MyISAM; INSERT INTO threadhardwarefr7 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); - +-- error 1240 +EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM threadhardwarefr7 WHERE numeropost='1'); EXPLAIN SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'; EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'); drop table if exists threadhardwarefrtest7; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 7861d6c5541..6221fb87ef2 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -371,13 +371,17 @@ JOIN::optimize() } #endif - conds=optimize_cond(conds,&cond_value); - if (thd->fatal_error || thd->net.report_error) + conds= optimize_cond(conds,&cond_value); + if (thd->fatal_error) { + // quick abort delete procedure; - error = 0; + error= 0; DBUG_RETURN(1); - } + } else if (thd->net.report_error) + // normal error processing & cleanup + DBUG_RETURN(-1); + if (cond_value == Item::COND_FALSE || !unit->select_limit_cnt) { /* Impossible cond */ zero_result_cause= "Impossible WHERE"; @@ -7516,8 +7520,8 @@ int mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result) break; } - if (res > 0) - res= -res; // mysql_explain_select do not report error + if (res > 0 || thd->net.report_error) + res= -1; // mysql_explain_select do not report error DBUG_RETURN(res); } From 1556ea9ae71fa4ed6683cf848887e7b41611126b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 22:41:57 +0200 Subject: [PATCH 173/246] small change sql/sql_class.cc: reverting some changes and fixig C style of Sanja ... ;o) --- sql/sql_class.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index ebea620ffa1..996c70a0305 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -881,8 +881,8 @@ bool select_singleval_subselect::send_data(List &items) { DBUG_ENTER("select_singleval_subselect::send_data"); Item_singleval_subselect *it= (Item_singleval_subselect *)item; - if (it->assigned()){ - if (!current_thd->lex.describe) + if (it->assigned()) + { my_message(ER_SUBSELECT_NO_1_ROW, ER(ER_SUBSELECT_NO_1_ROW), MYF(0)); DBUG_RETURN(1); } From fb23575c7ac4511d6a3e6ab09a9af3c08e00ed36 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Nov 2002 23:11:45 +0200 Subject: [PATCH 174/246] small revert sql/sql_base.cc: one more change reverted --- sql/sql_base.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_base.cc b/sql/sql_base.cc index be630fd375c..fd6c2c48020 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1078,7 +1078,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, table->status=STATUS_NO_RECORD; table->keys_in_use_for_query= table->keys_in_use; table->used_keys= table->keys_for_keyread; -// DBUG_ASSERT(table->key_read == 0); put in comment as this fails on EXPLAIN + DBUG_ASSERT(table->key_read == 0); DBUG_RETURN(table); } From 56b6433e66cd461dfd9e9ad269ab65a588b81331 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 16:02:19 +0400 Subject: [PATCH 175/246] fix for BDB --- bdb/dist/RELEASE | 2 +- bdb/dist/s_all | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/bdb/dist/RELEASE b/bdb/dist/RELEASE index 20b648efa04..61151b8589c 100644 --- a/bdb/dist/RELEASE +++ b/bdb/dist/RELEASE @@ -16,7 +16,7 @@ DB_VERSION_STRING="Sleepycat Software: Berkeley DB $DB_VERSION: ($DB_RELEASE_DAT # bitkeeper doesn't like somebody to mess with permissions! chmod() { - #echo "chmod $1 $2" + echo "chmod $1 $2" >/dev/null } # useful trick to find auto-generated files diff --git a/bdb/dist/s_all b/bdb/dist/s_all index c0e3ac72f3a..51c9afabcae 100644 --- a/bdb/dist/s_all +++ b/bdb/dist/s_all @@ -1,7 +1,22 @@ #!/bin/sh - # $Id: s_all,v 1.10 2001/08/04 14:01:44 bostic Exp $ -sh s_perm # permissions. +make_dir() +{ + if test ! -d $1; then + echo "mkdir $1" + mkdir $1 + status=$? + if test $status -ne 0 && test ! -d $1; then + echo "error: $status" + fi + fi +} + +make_dir ../test_server +make_dir ../dbinc_auto + +#sh s_perm # permissions. sh s_symlink # symbolic links. sh s_readme # db/README file. From 8e9a5a4f10a04ce793e76c91bd47b4ed146406b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 13:45:51 +0100 Subject: [PATCH 176/246] - applied patch for AMD x86-64 (thanks to Gwenole Beauchesne bdb/dist/aclocal/mutex.m4: - applied patch for AMD x86-64 --- bdb/dist/aclocal/mutex.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bdb/dist/aclocal/mutex.m4 b/bdb/dist/aclocal/mutex.m4 index a6b1fa1a053..5c9218da163 100644 --- a/bdb/dist/aclocal/mutex.m4 +++ b/bdb/dist/aclocal/mutex.m4 @@ -403,5 +403,7 @@ UTS/cc-assembly) ADDITIONAL_OBJS="$ADDITIONAL_OBJS uts4.cc${o}" AC_DEFINE(HAVE_MUTEX_UTS_CC_ASSEMBLY);; x86/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS" AC_DEFINE(HAVE_MUTEX_X86_GCC_ASSEMBLY);; +x86_64/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS" + AC_DEFINE(HAVE_MUTEX_X86_64_GCC_ASSEMBLY);; esac ])dnl From 953f6c51fed3478cc3905d2ce15728e5c3e7f00c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 18:26:53 +0400 Subject: [PATCH 177/246] upgrade readline to version 4.3 client/completion_hash.cc: correct headers of functions for readline 4.3 (add const modifier to char*) client/completion_hash.h: correct headers of functions for readline 4.3 (add const modifier to char*) client/mysql.cc: correct functions for readline 4.3 --- client/completion_hash.cc | 6 +- client/completion_hash.h | 4 +- client/mysql.cc | 18 +- readline/COPYING | 4 +- readline/INSTALL | 277 +- readline/Makefile.am | 2 +- readline/README | 37 +- readline/ansi_stdlib.h | 21 +- readline/bind.c | 734 +++-- readline/callback.c | 64 +- readline/chardefs.h | 95 +- readline/complete.c | 644 ++-- readline/configure | 6170 +++++++++++++++++++++++++++---------- readline/configure.in | 105 +- readline/display.c | 1222 ++++++-- readline/emacs_keymap.c | 1292 ++++---- readline/funmap.c | 55 +- readline/histexpand.c | 263 +- readline/histfile.c | 249 +- readline/histlib.h | 28 +- readline/history.c | 59 +- readline/history.h | 88 +- readline/histsearch.c | 25 +- readline/input.c | 365 ++- readline/isearch.c | 265 +- readline/keymaps.c | 16 +- readline/keymaps.h | 45 +- readline/kill.c | 141 +- readline/macro.c | 86 +- readline/mbutil.c | 337 ++ readline/misc.c | 496 +++ readline/nls.c | 37 +- readline/parens.c | 67 +- readline/posixdir.h | 12 +- readline/posixjmp.h | 18 + readline/posixstat.h | 4 +- readline/readline.c | 1776 ++--------- readline/readline.h | 684 ++-- readline/rlconf.h | 11 +- readline/rldefs.h | 43 +- readline/rlmbutil.h | 108 + readline/rlprivate.h | 284 ++ readline/rlshell.h | 34 + readline/rlstdc.h | 64 +- readline/rltty.c | 322 +- readline/rltty.h | 25 +- readline/rltypedefs.h | 88 + readline/rlwinsize.h | 5 +- readline/search.c | 282 +- readline/shell.c | 96 +- readline/signals.c | 68 +- readline/tcap.h | 4 +- readline/terminal.c | 496 +-- readline/text.c | 1540 +++++++++ readline/tilde.c | 124 +- readline/tilde.h | 45 +- readline/undo.c | 33 +- readline/util.c | 163 +- readline/vi_keymap.c | 1284 ++++---- readline/vi_mode.c | 400 ++- readline/xmalloc.c | 67 +- readline/xmalloc.h | 46 + 62 files changed, 14264 insertions(+), 7179 deletions(-) create mode 100644 readline/mbutil.c create mode 100644 readline/misc.c create mode 100644 readline/rlmbutil.h create mode 100644 readline/rlprivate.h create mode 100644 readline/rlshell.h create mode 100644 readline/rltypedefs.h create mode 100644 readline/text.c create mode 100644 readline/xmalloc.h diff --git a/client/completion_hash.cc b/client/completion_hash.cc index ff5d0b28e41..536e7f9373a 100644 --- a/client/completion_hash.cc +++ b/client/completion_hash.cc @@ -27,7 +27,7 @@ #include #include "completion_hash.h" -uint hashpjw(char *arKey, uint nKeyLength) +uint hashpjw(const char *arKey, uint nKeyLength) { uint h = 0, g, i; @@ -111,7 +111,7 @@ int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength, return SUCCESS; } -static Bucket *completion_hash_find(HashTable *ht, char *arKey, +static Bucket *completion_hash_find(HashTable *ht, const char *arKey, uint nKeyLength) { uint h, nIndex; @@ -156,7 +156,7 @@ int completion_hash_exists(HashTable *ht, char *arKey, uint nKeyLength) return 0; } -Bucket *find_all_matches(HashTable *ht, char *str, uint length, +Bucket *find_all_matches(HashTable *ht, const char *str, uint length, uint *res_length) { Bucket *b; diff --git a/client/completion_hash.h b/client/completion_hash.h index c0853fddfe7..2595a445c9d 100644 --- a/client/completion_hash.h +++ b/client/completion_hash.h @@ -43,14 +43,14 @@ typedef struct hashtable { uint nTableSize; uint initialized; MEM_ROOT mem_root; - uint(*pHashFunction) (char *arKey, uint nKeyLength); + uint(*pHashFunction) (const char *arKey, uint nKeyLength); Bucket **arBuckets; } HashTable; extern int completion_hash_init(HashTable *ht, uint nSize); extern int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength, char *str); extern int hash_exists(HashTable *ht, char *arKey); -extern Bucket *find_all_matches(HashTable *ht, char *str, uint length, uint *res_length); +extern Bucket *find_all_matches(HashTable *ht, const char *str, uint length, uint *res_length); extern Bucket *find_longest_match(HashTable *ht, char *str, uint length, uint *res_length); extern void add_word(HashTable *ht,char *str); extern void completion_hash_clean(HashTable *ht); diff --git a/client/mysql.cc b/client/mysql.cc index 241f4cf7ecc..391779ef801 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1049,8 +1049,8 @@ static bool add_line(String &buffer,char *line,char *in_string) #ifdef HAVE_READLINE -static char *new_command_generator(char *text, int); -static char **new_mysql_completion (char *text, int start, int end); +static char *new_command_generator(const char *text, int); +static char **new_mysql_completion (const char *text, int start, int end); /* Tell the GNU Readline library how to complete. We want to try to complete @@ -1058,8 +1058,8 @@ static char **new_mysql_completion (char *text, int start, int end); if not. */ -char **no_completion (char *text __attribute__ ((unused)), - char *word __attribute__ ((unused))) +char *no_completion (const char *text __attribute__ ((unused)), + int ) { return 0; /* No filename completion */ } @@ -1071,8 +1071,8 @@ static void initialize_readline (char *name) /* Tell the completer that we want a crack first. */ /* rl_attempted_completion_function = (CPPFunction *)mysql_completion;*/ - rl_attempted_completion_function = (CPPFunction *) new_mysql_completion; - rl_completion_entry_function=(Function *) no_completion; + rl_attempted_completion_function = &new_mysql_completion; + rl_completion_entry_function= &no_completion; } /* @@ -1082,17 +1082,17 @@ static void initialize_readline (char *name) array of matches, or NULL if there aren't any. */ -static char **new_mysql_completion (char *text, +static char **new_mysql_completion (const char *text, int start __attribute__((unused)), int end __attribute__((unused))) { if (!status.batch && !quick) - return completion_matches(text, (CPFunction*) new_command_generator); + return rl_completion_matches(text, new_command_generator); else return (char**) 0; } -static char *new_command_generator(char *text,int state) +static char *new_command_generator(const char *text,int state) { static int textlen; char *ptr; diff --git a/readline/COPYING b/readline/COPYING index a43ea2126fb..1bf15263878 100644 --- a/readline/COPYING +++ b/readline/COPYING @@ -2,7 +2,7 @@ Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA + 59 Temple Place, Suite 330, Boston, MA 02111 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Also add information on how to contact you by electronic and paper mail. diff --git a/readline/INSTALL b/readline/INSTALL index 95d84c820fb..adb27a9f222 100644 --- a/readline/INSTALL +++ b/readline/INSTALL @@ -1,73 +1,81 @@ Basic Installation ================== - These are generic installation instructions. +These are installation instructions for Readline-4.3. - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). +The simplest way to compile readline is: - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're + 1. `cd' to the directory containing the readline source code and type + `./configure' to configure readline for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. - Running `configure' takes awhile. While running, it prints some + Running `configure' takes some time. While running, it prints some messages telling which features it is checking for. - 2. Type `make' to compile the package. + 2. Type `make' to compile readline and build the static readline + and history libraries. If supported, the shared readline and history + libraries will be built also. See below for instructions on compiling + the other parts of the distribution. Typing `make everything' will + cause the static and shared libraries (if supported) and the example + programs to be built. - 3. Optionally, type `make check' to run any self-tests that come with - the package. + 3. Type `make install' to install the static readline and history + libraries, the readline include files, the documentation, and, if + supported, the shared readline and history libraries. - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for + 4. You can remove the created libraries and object files from the + build directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile readline for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. + for the readline developers, and should be used with care. + +The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It +uses those values to create a `Makefile' in the build directory, +and Makefiles in the `doc', `shlib', and `examples' +subdirectories. It also creates a `config.h' file containing +system-dependent definitions. Finally, it creates a shell script +`config.status' that you can run in the future to recreate the +current configuration, a file `config.cache' that saves the +results of its tests to speed up reconfiguring, and a file +`config.log' containing compiler output (useful mainly for +debugging `configure'). + +If you need to do unusual things to compile readline, please try +to figure out how `configure' could check whether to do them, and +mail diffs or instructions to so they can +be considered for the next release. If at some point +`config.cache' contains results you don't want to keep, you may +remove or edit it. + +The file `configure.in' is used to create `configure' by a +program called `autoconf'. You only need `configure.in' if you +want to change it or regenerate `configure' using a newer version +of `autoconf'. The readline `configure.in' requires autoconf +version 2.50 or newer. Compilers and Options ===================== - Some systems require unusual options for compilation or linking that +Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== - You can compile the package for more than one kind of computer at the +You can compile readline for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the @@ -75,80 +83,59 @@ directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. +If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile readline for one architecture at a +time in the source code directory. After you have installed +readline for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. +By default, `make install' will install the readline libraries in +`/usr/local/lib', the include files in +`/usr/local/include/readline', the man pages in `/usr/local/man', +and the info files in `/usr/local/info'. You can specify an +installation prefix other than `/usr/local' by giving `configure' +the option `--prefix=PATH' or by supplying a value for the +DESTDIR variable when running `make install'. - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. +You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. +If you give `configure' the option `--exec-prefix=PATH', the +readline Makefiles will use PATH as the prefix for installing the +libraries. Documentation and other data files will still use the +regular prefix. Specifying the System Type ========================== - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM +There may be some features `configure' can not figure out +automatically, but need to determine by the type of host readline +will run on. Usually `configure' can figure that out, but if it +prints a message saying it can not guess the host type, give it +the `--host=TYPE' option. TYPE can either be a short name for +the system type, such as `sun4', or a canonical name with three +fields: CPU-COMPANY-SYSTEM (e.g., i386-unknown-freebsd4.2). -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. +See the file `config.sub' for the possible values of each field. Sharing Defaults ================ - If you want to set default values for `configure' scripts to share, +If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. +A warning: the readline `configure' looks for a site script, but not +all `configure' scripts do. Operation Controls ================== - `configure' recognizes the following options to control how it +`configure' recognizes the following options to control how it operates. `--cache-file=FILE' @@ -174,3 +161,113 @@ operates. `configure' also accepts some other, not widely useful, options. +Optional Features +================= + +The readline `configure' recognizes a single `--with-PACKAGE' option: + +`--with-curses' + This tells readline that it can find the termcap library functions + (tgetent, et al.) in the curses library, rather than a separate + termcap library. Readline uses the termcap functions, but does not + link with the termcap or curses library itself, allowing applications + which link with readline the to choose an appropriate library. + This option tells readline to link the example programs with the + curses library rather than libtermcap. + +`configure' also recognizes two `--enable-FEATURE' options: + +`--enable-shared' + Build the shared libraries by default on supported platforms. The + default is `yes'. + +`--enable-static' + Build the static libraries by default. The default is `yes'. + +Shared Libraries +================ + +There is support for building shared versions of the readline and +history libraries. The configure script creates a Makefile in +the `shlib' subdirectory, and typing `make shared' will cause +shared versions of the readline and history libraries to be built +on supported platforms. + +If `configure' is given the `--enable-shared' option, it will attempt +to build the shared libraries by default on supported platforms. + +Configure calls the script support/shobj-conf to test whether or +not shared library creation is supported and to generate the values +of variables that are substituted into shlib/Makefile. If you +try to build shared libraries on an unsupported platform, `make' +will display a message asking you to update support/shobj-conf for +your platform. + +If you need to update support/shobj-conf, you will need to create +a `stanza' for your operating system and compiler. The script uses +the value of host_os and ${CC} as determined by configure. For +instance, FreeBSD 4.2 with any version of gcc is identified as +`freebsd4.2-gcc*'. + +In the stanza for your operating system-compiler pair, you will need to +define several variables. They are: + +SHOBJ_CC The C compiler used to compile source files into shareable + object files. This is normally set to the value of ${CC} + by configure, and should not need to be changed. + +SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create + position-independent code. If you are using gcc, this + should probably be set to `-fpic'. + +SHOBJ_LD The link editor to be used to create the shared library from + the object files created by $SHOBJ_CC. If you are using + gcc, a value of `gcc' will probably work. + +SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation. + If you are using gcc, `-shared' may be all that is necessary. + These should be the flags needed for generic shared object + creation. + +SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library + creation. Many systems use the -R option to the link + editor to embed a path within the library for run-time + library searches. A reasonable value for such systems would + be `-R$(libdir)'. + +SHLIB_LIBS Any additional libraries that shared libraries should be + linked against when they are created. + +SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when + generating the filename of the shared library. Many systems + use `so'; HP-UX uses `sl'. + +SHLIB_LIBVERSION The string to append to the filename to indicate the version + of the shared library. It should begin with $(SHLIB_LIBSUFF), + and possibly include version information that allows the + run-time loader to load the version of the shared library + appropriate for a particular program. Systems using shared + libraries similar to SunOS 4.x use major and minor library + version numbers; for those systems a value of + `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate. + Systems based on System V Release 4 don't use minor version + numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems. + Other Unix versions use different schemes. + +SHLIB_STATUS Set this to `supported' when you have defined the other + necessary variables. Make uses this to determine whether + or not shared library creation should be attempted. If + shared libraries are not supported, this will be set to + `unsupported'. + +You should look at the existing stanzas in support/shobj-conf for ideas. + +Once you have updated support/shobj-conf, re-run configure and type +`make shared' or `make'. The shared libraries will be created in the +shlib subdirectory. + +If shared libraries are created, `make install' will install them. +You may install only the shared libraries by running `make +install-shared' from the top-level build directory. Running `make +install' in the shlib subdirectory will also work. If you don't want +to install any created shared libraries, run `make install-static'. diff --git a/readline/Makefile.am b/readline/Makefile.am index 37e97289e6b..e9c6b3b8d58 100644 --- a/readline/Makefile.am +++ b/readline/Makefile.am @@ -15,7 +15,7 @@ libreadline_a_SOURCES = readline.c funmap.c keymaps.c \ callback.c terminal.c xmalloc.c \ history.c histsearch.c histexpand.c \ histfile.c nls.c search.c \ - shell.c tilde.c + shell.c tilde.c misc.c text.c mbutil.c pkginclude_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h diff --git a/readline/README b/readline/README index 56565b2fb80..7aa939452fb 100644 --- a/readline/README +++ b/readline/README @@ -1,7 +1,7 @@ Introduction ============ -This is the Gnu Readline library, version 4.0. +This is the Gnu Readline library, version 4.3. The Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in. Both @@ -16,8 +16,8 @@ may be used without Readline in applications which desire its capabilities. The Readline library is free software, distributed under the terms of -the GNU Public License, version 2. For more information, see the file -COPYING. +the [GNU] General Public License, version 2. For more information, see +the file COPYING. To build the library, try typing `./configure', then `make'. The configuration process is automated, so no further intervention should @@ -37,6 +37,9 @@ to customize and control the build process. The file rlconf.h contains C preprocessor defines that enable and disable certain Readline features. +The special make target `everything' will build the static and shared +libraries (if the target platform supports them) and the examples. + Examples ======== @@ -54,6 +57,9 @@ a Makefile in the `shlib' subdirectory, and typing `make shared' will cause shared versions of the Readline and History libraries to be built on supported platforms. +If `configure' is given the `--enable-shared' option, it will attempt +to build the shared libraries by default on supported platforms. + Configure calls the script support/shobj-conf to test whether or not shared library creation is supported and to generate the values of variables that are substituted into shlib/Makefile. If you @@ -64,8 +70,8 @@ your platform. If you need to update support/shobj-conf, you will need to create a `stanza' for your operating system and compiler. The script uses the value of host_os and ${CC} as determined by configure. For -instance, FreeBSD 2.2.5 with any version of gcc is identified as -`freebsd2.2.5-gcc*'. +instance, FreeBSD 4.2 with any version of gcc is identified as +`freebsd4.2-gcc*'. In the stanza for your operating system-compiler pair, you will need to define several variables. They are: @@ -122,18 +128,21 @@ Once you have updated support/shobj-conf, re-run configure and type `make shared'. The shared libraries will be created in the shlib subdirectory. -Since shared libraries are not created on all platforms, `make install' -will not automatically install the shared libraries. To install them, -change the current directory to shlib and type `make install'. Running -`make install-shared' from the top-level build directory will also work. +If shared libraries are created, `make install' will install them. +You may install only the shared libraries by running `make +install-shared' from the top-level build directory. Running `make +install' in the shlib subdirectory will also work. If you don't want +to install any created shared libraries, run `make install-static'. Documentation ============= -The documentation for the Readline and History libraries appears in the -`doc' subdirectory. There are two texinfo files and a Unix-style manual -page describing the programming facilities available in the Readline -library. The texinfo files include both user and programmer's manuals. +The documentation for the Readline and History libraries appears in +the `doc' subdirectory. There are three texinfo files and a +Unix-style manual page describing the facilities available in the +Readline library. The texinfo files include both user and +programmer's manuals. HTML versions of the manuals appear in the +`doc' subdirectory as well. Reporting Bugs ============== @@ -144,7 +153,7 @@ Bug reports for Readline should be sent to: When reporting a bug, please include the following information: - * the version number and release status of Readline (e.g., 4.0-release) + * the version number and release status of Readline (e.g., 4.2-release) * the machine and OS that it is running on * a list of the compilation flags or the contents of `config.h', if appropriate diff --git a/readline/ansi_stdlib.h b/readline/ansi_stdlib.h index 52339da5d33..db13cd234bd 100644 --- a/readline/ansi_stdlib.h +++ b/readline/ansi_stdlib.h @@ -18,18 +18,31 @@ You should have received a copy of the GNU General Public License along with Bash; see the file COPYING. If not, write to the Free Software - Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_STDLIB_H_) #define _STDLIB_H_ 1 /* String conversion functions. */ extern int atoi (); -extern long int atol (); + +extern double atof (); +extern double strtod (); /* Memory allocation functions. */ -extern char *malloc (); -extern char *realloc (); +/* Generic pointer type. */ +#ifndef PTR_T + +#if defined (__STDC__) +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* PTR_T */ + +extern PTR_T malloc (); +extern PTR_T realloc (); extern void free (); /* Other miscellaneous functions. */ diff --git a/readline/bind.c b/readline/bind.c index f122bdf4860..324499acf8f 100644 --- a/readline/bind.c +++ b/readline/bind.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -42,7 +42,6 @@ # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ -#include #include #if !defined (errno) @@ -58,61 +57,27 @@ extern int errno; #include "readline.h" #include "history.h" +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + #if !defined (strchr) && !defined (__STDC__) extern char *strchr (), *strrchr (); #endif /* !strchr && !__STDC__ */ -extern int _rl_horizontal_scroll_mode; -extern int _rl_mark_modified_lines; -extern int _rl_bell_preference; -extern int _rl_meta_flag; -extern int _rl_convert_meta_chars_to_ascii; -extern int _rl_output_meta_chars; -extern int _rl_complete_show_all; -extern int _rl_complete_mark_directories; -extern int _rl_print_completions_horizontally; -extern int _rl_completion_case_fold; -extern int _rl_enable_keypad; -#if defined (PAREN_MATCHING) -extern int rl_blink_matching_paren; -#endif /* PAREN_MATCHING */ -#if defined (VISIBLE_STATS) -extern int rl_visible_stats; -#endif /* VISIBLE_STATS */ -extern int rl_complete_with_tilde_expansion; -extern int rl_completion_query_items; -extern int rl_inhibit_completion; -extern char *_rl_comment_begin; -extern unsigned char *_rl_isearch_terminators; - -extern int rl_explicit_arg; -extern int rl_editing_mode; -extern unsigned char _rl_parsing_conditionalized_out; -extern Keymap _rl_keymap; - -extern char *possible_control_prefixes[], *possible_meta_prefixes[]; - -/* Functions imported from funmap.c */ -extern char **rl_funmap_names (); -extern int rl_add_funmap_entry (); - -/* Functions imported from util.c */ -extern char *_rl_strindex (); - -/* Functions imported from shell.c */ -extern char *get_env_value (); - /* Variables exported by this file. */ Keymap rl_binding_keymap; -/* Forward declarations */ -void rl_set_keymap_from_edit_mode (); +static char *_rl_read_file PARAMS((char *, size_t *)); +static void _rl_init_file_error PARAMS((const char *)); +static int _rl_read_init_file PARAMS((const char *, int)); +static int glean_key_from_name PARAMS((char *)); +static int substring_member_of_array PARAMS((char *, const char **)); -static int _rl_read_init_file (const char *filename, int include_level); -static int glean_key_from_name (); -static int substring_member_of_array (); +static int currently_reading_init_file; -extern char *xmalloc (), *xrealloc (); +/* used only in this file */ +static int _rl_prefer_visible_bell = 1; /* **************************************************************** */ /* */ @@ -120,13 +85,13 @@ extern char *xmalloc (), *xrealloc (); /* */ /* **************************************************************** */ -/* rl_add_defun (char *name, Function *function, int key) +/* rl_add_defun (char *name, rl_command_func_t *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it. */ int rl_add_defun (name, function, key) - char *name; - Function *function; + const char *name; + rl_command_func_t *function; int key; { if (key != -1) @@ -139,7 +104,7 @@ rl_add_defun (name, function, key) int rl_bind_key (key, function) int key; - Function *function; + rl_command_func_t *function; { if (key < 0) return (key); @@ -170,7 +135,7 @@ rl_bind_key (key, function) int rl_bind_key_in_map (key, function, map) int key; - Function *function; + rl_command_func_t *function; Keymap map; { int result; @@ -189,7 +154,7 @@ int rl_unbind_key (key) int key; { - return (rl_bind_key (key, (Function *)NULL)); + return (rl_bind_key (key, (rl_command_func_t *)NULL)); } /* Make KEY do nothing in MAP. @@ -199,13 +164,13 @@ rl_unbind_key_in_map (key, map) int key; Keymap map; { - return (rl_bind_key_in_map (key, (Function *)NULL, map)); + return (rl_bind_key_in_map (key, (rl_command_func_t *)NULL, map)); } /* Unbind all keys bound to FUNCTION in MAP. */ int rl_unbind_function_in_map (func, map) - Function *func; + rl_command_func_t *func; Keymap map; { register int i, rval; @@ -214,7 +179,7 @@ rl_unbind_function_in_map (func, map) { if (map[i].type == ISFUNC && map[i].function == func) { - map[i].function = (Function *)NULL; + map[i].function = (rl_command_func_t *)NULL; rval = 1; } } @@ -223,10 +188,10 @@ rl_unbind_function_in_map (func, map) int rl_unbind_command_in_map (command, map) - char *command; + const char *command; Keymap map; { - Function *func; + rl_command_func_t *func; func = rl_named_function (command); if (func == 0) @@ -239,8 +204,8 @@ rl_unbind_command_in_map (command, map) place to do bindings is in MAP. */ int rl_set_key (keyseq, function, map) - char *keyseq; - Function *function; + const char *keyseq; + rl_command_func_t *function; Keymap map; { return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map)); @@ -251,7 +216,7 @@ rl_set_key (keyseq, function, map) necessary. The initial place to do bindings is in MAP. */ int rl_macro_bind (keyseq, macro, map) - char *keyseq, *macro; + const char *keyseq, *macro; Keymap map; { char *macro_keys; @@ -276,12 +241,16 @@ rl_macro_bind (keyseq, macro, map) int rl_generic_bind (type, keyseq, data, map) int type; - char *keyseq, *data; + const char *keyseq; + char *data; Keymap map; { char *keys; int keys_len; register int i; + KEYMAP_ENTRY k; + + k.function = 0; /* If no keys to bind to, exit right away. */ if (!keyseq || !*keyseq) @@ -291,7 +260,7 @@ rl_generic_bind (type, keyseq, data, map) return -1; } - keys = xmalloc (1 + (2 * strlen (keyseq))); + keys = (char *)xmalloc (1 + (2 * strlen (keyseq))); /* Translate the ASCII representation of KEYSEQ into an array of characters. Stuff the characters into KEYS, and the length of @@ -305,7 +274,12 @@ rl_generic_bind (type, keyseq, data, map) /* Bind keys, making new keymaps as necessary. */ for (i = 0; i < keys_len; i++) { - int ic = (int) ((unsigned char)keys[i]); + unsigned char uc = keys[i]; + int ic; + + ic = uc; + if (ic < 0 || ic >= KEYMAP_SIZE) + return -1; if (_rl_convert_meta_chars_to_ascii && META_CHAR (ic)) { @@ -318,18 +292,40 @@ rl_generic_bind (type, keyseq, data, map) { if (map[ic].type != ISKMAP) { - if (map[ic].type == ISMACR) - free ((char *)map[ic].function); + /* We allow subsequences of keys. If a keymap is being + created that will `shadow' an existing function or macro + key binding, we save that keybinding into the ANYOTHERKEY + index in the new map. The dispatch code will look there + to find the function to execute if the subsequence is not + matched. ANYOTHERKEY was chosen to be greater than + UCHAR_MAX. */ + k = map[ic]; map[ic].type = ISKMAP; map[ic].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap()); } map = FUNCTION_TO_KEYMAP (map, ic); + /* The dispatch code will return this function if no matching + key sequence is found in the keymap. This (with a little + help from the dispatch code in readline.c) allows `a' to be + mapped to something, `abc' to be mapped to something else, + and the function bound to `a' to be executed when the user + types `abx', leaving `bx' in the input queue. */ + if (k.function /* && k.type == ISFUNC */) + { + map[ANYOTHERKEY] = k; + k.function = 0; + } } else { if (map[ic].type == ISMACR) free ((char *)map[ic].function); + else if (map[ic].type == ISKMAP) + { + map = FUNCTION_TO_KEYMAP (map, ic); + ic = ANYOTHERKEY; + } map[ic].function = KEYMAP_TO_FUNCTION (data); map[ic].type = type; @@ -346,7 +342,8 @@ rl_generic_bind (type, keyseq, data, map) non-zero if there was an error parsing SEQ. */ int rl_translate_keyseq (seq, array, len) - char *seq, *array; + const char *seq; + char *array; int *len; { register int i, c, l, temp; @@ -366,7 +363,7 @@ rl_translate_keyseq (seq, array, len) /* Handle special case of backwards define. */ if (strncmp (&seq[i], "C-\\M-", 5) == 0) { - array[l++] = ESC; + array[l++] = ESC; /* ESC is meta-prefix */ i += 5; array[l++] = CTRL (_rl_to_upper (seq[i])); if (seq[i] == '\0') @@ -375,7 +372,7 @@ rl_translate_keyseq (seq, array, len) else if (c == 'M') { i++; - array[l++] = ESC; /* XXX */ + array[l++] = ESC; /* ESC is meta-prefix */ } else if (c == 'C') { @@ -428,16 +425,16 @@ rl_translate_keyseq (seq, array, len) for (temp = 2, c -= '0'; ISOCTAL (seq[i]) && temp--; i++) c = (c * 8) + OCTVALUE (seq[i]); i--; /* auto-increment in for loop */ - array[l++] = c % (largest_char + 1); + array[l++] = c & largest_char; break; case 'x': i++; - for (temp = 3, c = 0; isxdigit (seq[i]) && temp--; i++) + for (temp = 2, c = 0; ISXDIGIT ((unsigned char)seq[i]) && temp--; i++) c = (c * 16) + HEXVALUE (seq[i]); - if (temp == 3) + if (temp == 2) c = 'x'; i--; /* auto-increment in for loop */ - array[l++] = c % (largest_char + 1); + array[l++] = c & largest_char; break; default: /* backslashes before non-special chars just add the char */ array[l++] = c; @@ -507,7 +504,7 @@ _rl_untranslate_macro_value (seq) char *ret, *r, *s; int c; - r = ret = xmalloc (7 * strlen (seq) + 1); + r = ret = (char *)xmalloc (7 * strlen (seq) + 1); for (s = seq; *s; s++) { c = *s; @@ -550,9 +547,9 @@ _rl_untranslate_macro_value (seq) /* Return a pointer to the function that STRING represents. If STRING doesn't have a matching function, then a NULL pointer is returned. */ -Function * +rl_command_func_t * rl_named_function (string) - char *string; + const char *string; { register int i; @@ -561,7 +558,7 @@ rl_named_function (string) for (i = 0; funmap[i]; i++) if (_rl_stricmp (funmap[i]->name, string) == 0) return (funmap[i]->function); - return ((Function *)NULL); + return ((rl_command_func_t *)NULL); } /* Return the function (or macro) definition which would be invoked via @@ -569,8 +566,11 @@ rl_named_function (string) used. TYPE, if non-NULL, is a pointer to an int which will receive the type of the object pointed to. One of ISFUNC (function), ISKMAP (keymap), or ISMACR (macro). */ -Function * -rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) +rl_command_func_t * +rl_function_of_keyseq (keyseq, map, type) + const char *keyseq; + Keymap map; + int *type; { register int i; @@ -579,7 +579,7 @@ rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) for (i = 0; keyseq && keyseq[i]; i++) { - int ic = keyseq[i]; + unsigned char ic = keyseq[i]; if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) { @@ -619,7 +619,7 @@ rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) return (map[ic].function); } } - return ((Function *) NULL); + return ((rl_command_func_t *) NULL); } /* The last key bindings file read. */ @@ -664,29 +664,26 @@ _rl_read_file (filename, sizep) i = read (file, buffer, file_size); close (file); -#if 0 - if (i < file_size) -#else if (i < 0) -#endif { free (buffer); return ((char *)NULL); } - buffer[file_size] = '\0'; + buffer[i] = '\0'; if (sizep) - *sizep = file_size; + *sizep = i; + return (buffer); } /* Re-read the current keybindings file. */ int -rl_re_read_init_file (int count __attribute__((unused)), - int ignore __attribute__((unused))) +rl_re_read_init_file (count, ignore) + int count __attribute__((unused)), ignore __attribute__((unused)); { int r; - r = rl_read_init_file ((char *)NULL); + r = rl_read_init_file ((const char *)NULL); rl_set_keymap_from_edit_mode (); return r; } @@ -699,14 +696,15 @@ rl_re_read_init_file (int count __attribute__((unused)), If the file existed and could be opened and read, 0 is returned, otherwise errno is returned. */ int -rl_read_init_file (const char *filename) +rl_read_init_file (filename) + const char *filename; { /* Default the filename. */ if (filename == 0) { filename = last_readline_init_file; if (filename == 0) - filename = get_env_value ("INPUTRC"); + filename = sh_get_env_value ("INPUTRC"); if (filename == 0) filename = DEFAULT_INPUTRC; } @@ -714,11 +712,18 @@ rl_read_init_file (const char *filename) if (*filename == 0) filename = DEFAULT_INPUTRC; +#if defined (__MSDOS__) + if (_rl_read_init_file (filename, 0) == 0) + return 0; + filename = "~/_inputrc"; +#endif return (_rl_read_init_file (filename, 0)); } static int -_rl_read_init_file (const char *filename, int include_level) +_rl_read_init_file (filename, include_level) + const char *filename; + int include_level; { register int i; char *buffer, *openname, *line, *end; @@ -733,13 +738,15 @@ _rl_read_init_file (const char *filename, int include_level) if (buffer == 0) return (errno); - + if (include_level == 0 && filename != last_readline_init_file) { FREE (last_readline_init_file); last_readline_init_file = savestring (filename); } + currently_reading_init_file = 1; + /* Loop over the lines in the file. Lines that start with `#' are comments; all other lines are commands for readline initialization. */ current_readline_init_lineno = 1; @@ -750,6 +757,12 @@ _rl_read_init_file (const char *filename, int include_level) /* Find the end of this line. */ for (i = 0; line + i != end && line[i] != '\n'; i++); +#if defined (__CYGWIN__) + /* ``Be liberal in what you accept.'' */ + if (line[i] == '\n' && line[i-1] == '\r') + line[i - 1] = '\0'; +#endif + /* Mark end of line. */ line[i] = '\0'; @@ -770,16 +783,19 @@ _rl_read_init_file (const char *filename, int include_level) } free (buffer); + currently_reading_init_file = 0; return (0); } static void _rl_init_file_error (msg) - char *msg; + const char *msg; { - fprintf (stderr, "readline: %s: line %d: %s\n", current_readline_init_file, - current_readline_init_lineno, - msg); + if (currently_reading_init_file) + fprintf (stderr, "readline: %s: line %d: %s\n", current_readline_init_file, + current_readline_init_lineno, msg); + else + fprintf (stderr, "readline: %s\n", msg); } /* **************************************************************** */ @@ -788,6 +804,17 @@ _rl_init_file_error (msg) /* */ /* **************************************************************** */ +typedef int _rl_parser_func_t PARAMS((char *)); + +/* Things that mean `Control'. */ +const char *_rl_possible_control_prefixes[] = { + "Control-", "C-", "CTRL-", (const char *)NULL +}; + +const char *_rl_possible_meta_prefixes[] = { + "Meta", "M-", (const char *)NULL +}; + /* Conditionals. */ /* Calling programs set this to have their argv[0]. */ @@ -875,7 +902,7 @@ parser_if (args) /* Invert the current parser state if there is anything on the stack. */ static int parser_else (args) -char *args __attribute__((unused)); + char *args __attribute__((unused)); { register int i; @@ -900,7 +927,7 @@ char *args __attribute__((unused)); _rl_parsing_conditionalized_out from the stack. */ static int parser_endif (args) -char *args __attribute__((unused)); + char *args __attribute__((unused)); { if (if_stack_depth) _rl_parsing_conditionalized_out = if_stack[--if_stack_depth]; @@ -927,7 +954,7 @@ parser_include (args) e = strchr (args, '\n'); if (e) *e = '\0'; - r = _rl_read_init_file (args, old_include_level + 1); + r = _rl_read_init_file ((const char *)args, old_include_level + 1); current_readline_init_file = old_init_file; current_readline_init_lineno = old_line_number; @@ -935,17 +962,17 @@ parser_include (args) return r; } - + /* Associate textual names with actual functions. */ static struct { const char *name; - Function *function; + _rl_parser_func_t *function; } parser_directives [] = { { "if", parser_if }, { "endif", parser_endif }, { "else", parser_else }, { "include", parser_include }, - { (char *)0x0, (Function *)0x0 } + { (char *)0x0, (_rl_parser_func_t *)0x0 } }; /* Handle a parser directive. STATEMENT is the line of the directive @@ -1070,7 +1097,7 @@ rl_parse_and_bind (string) /* Make VAR point to start of variable name. */ while (*var && whitespace (*var)) var++; - /* Make value point to start of value string. */ + /* Make VALUE point to start of value string. */ value = var; while (*value && !whitespace (*value)) value++; if (*value) @@ -1140,7 +1167,7 @@ rl_parse_and_bind (string) char *seq; register int j, k, passc; - seq = xmalloc (1 + strlen (string)); + seq = (char *)xmalloc (1 + strlen (string)); for (j = 1, k = passc = 0; string[j]; j++) { /* Allow backslash to quote characters, but leave them in place. @@ -1189,23 +1216,23 @@ rl_parse_and_bind (string) key = glean_key_from_name (kname); /* Add in control and meta bits. */ - if (substring_member_of_array (string, possible_control_prefixes)) + if (substring_member_of_array (string, _rl_possible_control_prefixes)) key = CTRL (_rl_to_upper (key)); - if (substring_member_of_array (string, possible_meta_prefixes)) + if (substring_member_of_array (string, _rl_possible_meta_prefixes)) key = META (key); /* Temporary. Handle old-style keyname with macro-binding. */ if (*funname == '\'' || *funname == '"') { - unsigned char useq[2]; + char useq[2]; int fl = strlen (funname); useq[0] = key; useq[1] = '\0'; if (fl && funname[fl - 1] == *funname) funname[fl - 1] = '\0'; - rl_macro_bind ((char*) useq, &funname[1], _rl_keymap); + rl_macro_bind (useq, &funname[1], _rl_keymap); } #if defined (PREFIX_META_HACK) /* Ugly, but working hack to keep prefix-meta around. */ @@ -1227,154 +1254,278 @@ rl_parse_and_bind (string) have one of two values; either "On" or 1 for truth, or "Off" or 0 for false. */ +#define V_SPECIAL 0x1 + static struct { const char *name; int *value; + int flags; } boolean_varlist [] = { -#if defined (PAREN_MATCHING) - { "blink-matching-paren", &rl_blink_matching_paren }, -#endif - { "completion-ignore-case", &_rl_completion_case_fold }, - { "convert-meta", &_rl_convert_meta_chars_to_ascii }, - { "disable-completion", &rl_inhibit_completion }, - { "enable-keypad", &_rl_enable_keypad }, - { "expand-tilde", &rl_complete_with_tilde_expansion }, - { "horizontal-scroll-mode", &_rl_horizontal_scroll_mode }, - { "input-meta", &_rl_meta_flag }, - { "mark-directories", &_rl_complete_mark_directories }, - { "mark-modified-lines", &_rl_mark_modified_lines }, - { "meta-flag", &_rl_meta_flag }, - { "output-meta", &_rl_output_meta_chars }, - { "print-completions-horizontally", &_rl_print_completions_horizontally }, - { "show-all-if-ambiguous", &_rl_complete_show_all }, + { "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL }, + { "byte-oriented", &rl_byte_oriented, 0 }, + { "completion-ignore-case", &_rl_completion_case_fold, 0 }, + { "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 }, + { "disable-completion", &rl_inhibit_completion, 0 }, + { "enable-keypad", &_rl_enable_keypad, 0 }, + { "expand-tilde", &rl_complete_with_tilde_expansion, 0 }, + { "history-preserve-point", &_rl_history_preserve_point, 0 }, + { "horizontal-scroll-mode", &_rl_horizontal_scroll_mode, 0 }, + { "input-meta", &_rl_meta_flag, 0 }, + { "mark-directories", &_rl_complete_mark_directories, 0 }, + { "mark-modified-lines", &_rl_mark_modified_lines, 0 }, + { "mark-symlinked-directories", &_rl_complete_mark_symlink_dirs, 0 }, + { "match-hidden-files", &_rl_match_hidden_files, 0 }, + { "meta-flag", &_rl_meta_flag, 0 }, + { "output-meta", &_rl_output_meta_chars, 0 }, + { "page-completions", &_rl_page_completions, 0 }, + { "prefer-visible-bell", &_rl_prefer_visible_bell, V_SPECIAL }, + { "print-completions-horizontally", &_rl_print_completions_horizontally, 0 }, + { "show-all-if-ambiguous", &_rl_complete_show_all, 0 }, #if defined (VISIBLE_STATS) - { "visible-stats", &rl_visible_stats }, + { "visible-stats", &rl_visible_stats, 0 }, #endif /* VISIBLE_STATS */ - { (char *)NULL, (int *)NULL } + { (char *)NULL, (int *)NULL, 0 } }; -int -rl_variable_bind (name, value) - char *name, *value; +static int +find_boolean_var (name) + const char *name; { register int i; - /* Check for simple variables first. */ for (i = 0; boolean_varlist[i].name; i++) - { - if (_rl_stricmp (name, boolean_varlist[i].name) == 0) - { - /* A variable is TRUE if the "value" is "on", "1" or "". */ - *boolean_varlist[i].value = *value == 0 || - _rl_stricmp (value, "on") == 0 || - (value[0] == '1' && value[1] == '\0'); - return 0; - } - } + if (_rl_stricmp (name, boolean_varlist[i].name) == 0) + return i; + return -1; +} - /* Not a boolean variable, so check for specials. */ +/* Hooks for handling special boolean variables, where a + function needs to be called or another variable needs + to be changed when they're changed. */ +static void +hack_special_boolean_var (i) + int i; +{ + const char *name; - /* Editing mode change? */ - if (_rl_stricmp (name, "editing-mode") == 0) - { - if (_rl_strnicmp (value, "vi", 2) == 0) - { -#if defined (VI_MODE) - _rl_keymap = vi_insertion_keymap; - rl_editing_mode = vi_mode; -#endif /* VI_MODE */ - } - else if (_rl_strnicmp (value, "emacs", 5) == 0) - { - _rl_keymap = emacs_standard_keymap; - rl_editing_mode = emacs_mode; - } - } + name = boolean_varlist[i].name; - /* Comment string change? */ - else if (_rl_stricmp (name, "comment-begin") == 0) - { - if (*value) - { - if (_rl_comment_begin) - free (_rl_comment_begin); - - _rl_comment_begin = savestring (value); - } - } - else if (_rl_stricmp (name, "completion-query-items") == 0) - { - int nval = 100; - if (*value) - { - nval = atoi (value); - if (nval < 0) - nval = 0; - } - rl_completion_query_items = nval; - } - else if (_rl_stricmp (name, "keymap") == 0) - { - Keymap kmap; - kmap = rl_get_keymap_by_name (value); - if (kmap) - rl_set_keymap (kmap); - } - else if (_rl_stricmp (name, "bell-style") == 0) - { - if (!*value) - _rl_bell_preference = AUDIBLE_BELL; - else - { - if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0) - _rl_bell_preference = NO_BELL; - else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0) - _rl_bell_preference = AUDIBLE_BELL; - else if (_rl_stricmp (value, "visible") == 0) - _rl_bell_preference = VISIBLE_BELL; - } - } + if (_rl_stricmp (name, "blink-matching-paren") == 0) + _rl_enable_paren_matching (rl_blink_matching_paren); else if (_rl_stricmp (name, "prefer-visible-bell") == 0) { - /* Backwards compatibility. */ - if (*value && (_rl_stricmp (value, "on") == 0 || - (*value == '1' && !value[1]))) - _rl_bell_preference = VISIBLE_BELL; + if (_rl_prefer_visible_bell) + _rl_bell_preference = VISIBLE_BELL; else - _rl_bell_preference = AUDIBLE_BELL; + _rl_bell_preference = AUDIBLE_BELL; } - else if (_rl_stricmp (name, "isearch-terminators") == 0) +} + +typedef int _rl_sv_func_t PARAMS((const char *)); + +/* These *must* correspond to the array indices for the appropriate + string variable. (Though they're not used right now.) */ +#define V_BELLSTYLE 0 +#define V_COMBEGIN 1 +#define V_EDITMODE 2 +#define V_ISRCHTERM 3 +#define V_KEYMAP 4 + +#define V_STRING 1 +#define V_INT 2 + +/* Forward declarations */ +static int sv_bell_style PARAMS((const char *)); +static int sv_combegin PARAMS((const char *)); +static int sv_compquery PARAMS((const char *)); +static int sv_editmode PARAMS((const char *)); +static int sv_isrchterm PARAMS((const char *)); +static int sv_keymap PARAMS((const char *)); + +static struct { + const char *name; + int flags; + _rl_sv_func_t *set_func; +} string_varlist[] = { + { "bell-style", V_STRING, sv_bell_style }, + { "comment-begin", V_STRING, sv_combegin }, + { "completion-query-items", V_INT, sv_compquery }, + { "editing-mode", V_STRING, sv_editmode }, + { "isearch-terminators", V_STRING, sv_isrchterm }, + { "keymap", V_STRING, sv_keymap }, + { (char *)NULL, 0, 0 } +}; + +static int +find_string_var (name) + const char *name; +{ + register int i; + + for (i = 0; string_varlist[i].name; i++) + if (_rl_stricmp (name, string_varlist[i].name) == 0) + return i; + return -1; +} + +/* A boolean value that can appear in a `set variable' command is true if + the value is null or empty, `on' (case-insenstive), or "1". Any other + values result in 0 (false). */ +static int +bool_to_int (value) + char *value; +{ + return (value == 0 || *value == '\0' || + (_rl_stricmp (value, "on") == 0) || + (value[0] == '1' && value[1] == '\0')); +} + +int +rl_variable_bind (name, value) + const char *name, *value; +{ + register int i; + int v; + + /* Check for simple variables first. */ + i = find_boolean_var (name); + if (i >= 0) { - /* Isolate the value and translate it into a character string. */ - int beg, end; - char *v; - - v = savestring (value); - FREE (_rl_isearch_terminators); - if (v[0] == '"' || v[0] == '\'') - { - int delim = v[0]; - for (beg = end = 1; v[end] && v[end] != delim; end++) - ; - } - else - { - for (beg = end = 0; whitespace (v[end]) == 0; end++) - ; - } - - v[end] = '\0'; - /* The value starts at v + beg. Translate it into a character string. */ - _rl_isearch_terminators = (unsigned char *)xmalloc (2 * strlen (v) + 1); - rl_translate_keyseq (v + beg, (char*) _rl_isearch_terminators, &end); - _rl_isearch_terminators[end] = '\0'; - free (v); + *boolean_varlist[i].value = bool_to_int (value); + if (boolean_varlist[i].flags & V_SPECIAL) + hack_special_boolean_var (i); + return 0; } - /* For the time being, unknown variable names are simply ignored. */ + i = find_string_var (name); + + /* For the time being, unknown variable names or string names without a + handler function are simply ignored. */ + if (i < 0 || string_varlist[i].set_func == 0) + return 0; + + v = (*string_varlist[i].set_func) (value); + return v; +} + +static int +sv_editmode (value) + const char *value; +{ + if (_rl_strnicmp (value, "vi", 2) == 0) + { +#if defined (VI_MODE) + _rl_keymap = vi_insertion_keymap; + rl_editing_mode = vi_mode; +#endif /* VI_MODE */ + return 0; + } + else if (_rl_strnicmp (value, "emacs", 5) == 0) + { + _rl_keymap = emacs_standard_keymap; + rl_editing_mode = emacs_mode; + return 0; + } + return 1; +} + +static int +sv_combegin (value) + const char *value; +{ + if (value && *value) + { + FREE (_rl_comment_begin); + _rl_comment_begin = savestring (value); + return 0; + } + return 1; +} + +static int +sv_compquery (value) + const char *value; +{ + int nval = 100; + + if (value && *value) + { + nval = atoi (value); + if (nval < 0) + nval = 0; + } + rl_completion_query_items = nval; return 0; } +static int +sv_keymap (value) + const char *value; +{ + Keymap kmap; + + kmap = rl_get_keymap_by_name (value); + if (kmap) + { + rl_set_keymap (kmap); + return 0; + } + return 1; +} + +static int +sv_bell_style (value) + const char *value; +{ + if (value == 0 || *value == '\0') + _rl_bell_preference = AUDIBLE_BELL; + else if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0) + _rl_bell_preference = NO_BELL; + else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0) + _rl_bell_preference = AUDIBLE_BELL; + else if (_rl_stricmp (value, "visible") == 0) + _rl_bell_preference = VISIBLE_BELL; + else + return 1; + return 0; +} + +static int +sv_isrchterm (value) + const char *value; +{ + int beg, end, delim; + char *v; + + if (value == 0) + return 1; + + /* Isolate the value and translate it into a character string. */ + v = savestring (value); + FREE (_rl_isearch_terminators); + if (v[0] == '"' || v[0] == '\'') + { + delim = v[0]; + for (beg = end = 1; v[end] && v[end] != delim; end++) + ; + } + else + { + for (beg = end = 0; whitespace (v[end]) == 0; end++) + ; + } + + v[end] = '\0'; + + /* The value starts at v + beg. Translate it into a character string. */ + _rl_isearch_terminators = (char *)xmalloc (2 * strlen (v) + 1); + rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end); + _rl_isearch_terminators[end] = '\0'; + + free (v); + return 0; +} + /* Return the character which matches NAME. For example, `Space' returns ' '. */ @@ -1431,27 +1582,27 @@ static struct { Keymap rl_get_keymap_by_name (name) - char *name; + const char *name; { register int i; for (i = 0; keymap_names[i].name; i++) - if (strcmp (name, keymap_names[i].name) == 0) + if (_rl_stricmp (name, keymap_names[i].name) == 0) return (keymap_names[i].map); return ((Keymap) NULL); } -const char * +char * rl_get_keymap_name (map) Keymap map; { register int i; for (i = 0; keymap_names[i].name; i++) if (map == keymap_names[i].map) - return (keymap_names[i].name); + return ((char *)keymap_names[i].name); return ((char *)NULL); } - + void rl_set_keymap (map) Keymap map; @@ -1477,17 +1628,18 @@ rl_set_keymap_from_edit_mode () #endif /* VI_MODE */ } -const char * + +char * rl_get_keymap_name_from_edit_mode () { if (rl_editing_mode == emacs_mode) - return "emacs"; + return (char*)"emacs"; #if defined (VI_MODE) else if (rl_editing_mode == vi_mode) - return "vi"; + return (char*)"vi"; #endif /* VI_MODE */ else - return "none"; + return (char*)"nope"; } /* **************************************************************** */ @@ -1506,7 +1658,7 @@ void rl_list_funmap_names () { register int i; - char **funmap_names; + const char **funmap_names; funmap_names = rl_funmap_names (); @@ -1533,17 +1685,18 @@ _rl_get_keyname (key) pairs for possible inclusion in an inputrc file, we don't want to do any special meta processing on KEY. */ -#if 0 +#if 1 + /* XXX - Experimental */ /* We might want to do this, but the old version of the code did not. */ /* If this is an escape character, we don't want to do any more processing. Just add the special ESC key sequence and return. */ if (c == ESC) { - keyseq[0] = '\\'; - keyseq[1] = 'e'; - keyseq[2] = '\0'; - return keyseq; + keyname[0] = '\\'; + keyname[1] = 'e'; + keyname[2] = '\0'; + return keyname; } #endif @@ -1596,7 +1749,7 @@ _rl_get_keyname (key) sequences that are used to invoke FUNCTION in MAP. */ char ** rl_invoking_keyseqs_in_map (function, map) - Function *function; + rl_command_func_t *function; Keymap map; { register int key; @@ -1625,7 +1778,7 @@ rl_invoking_keyseqs_in_map (function, map) if (result_index + 2 > result_size) { result_size += 10; - result = (char **) xrealloc (result, result_size * sizeof (char *)); + result = (char **)xrealloc (result, result_size * sizeof (char *)); } result[result_index++] = keyname; @@ -1654,7 +1807,12 @@ rl_invoking_keyseqs_in_map (function, map) char *keyname = (char *)xmalloc (6 + strlen (seqs[i])); if (key == ESC) +#if 0 sprintf (keyname, "\\e"); +#else + /* XXX - experimental */ + sprintf (keyname, "\\M-"); +#endif else if (CTRL_CHAR (key)) sprintf (keyname, "\\C-%c", _rl_to_lower (UNCTRL (key))); else if (key == RUBOUT) @@ -1670,14 +1828,14 @@ rl_invoking_keyseqs_in_map (function, map) keyname[0] = (char) key; keyname[1] = '\0'; } - + strcat (keyname, seqs[i]); free (seqs[i]); if (result_index + 2 > result_size) { result_size += 10; - result = (char **) xrealloc (result, result_size * sizeof (char *)); + result = (char **)xrealloc (result, result_size * sizeof (char *)); } result[result_index++] = keyname; @@ -1696,7 +1854,7 @@ rl_invoking_keyseqs_in_map (function, map) sequences that can be used to invoke FUNCTION using the current keymap. */ char ** rl_invoking_keyseqs (function) - Function *function; + rl_command_func_t *function; { return (rl_invoking_keyseqs_in_map (function, _rl_keymap)); } @@ -1709,8 +1867,8 @@ rl_function_dumper (print_readably) int print_readably; { register int i; - char **names; - char *name; + const char **names; + const char *name; names = rl_funmap_names (); @@ -1718,7 +1876,7 @@ rl_function_dumper (print_readably) for (i = 0; (name = names[i]); i++) { - Function *function; + rl_command_func_t *function; char **invokers; function = rl_named_function (name); @@ -1775,8 +1933,8 @@ rl_function_dumper (print_readably) rl_outstream. If an explicit argument is given, then print the output in such a way that it can be read back in. */ int -rl_dump_functions (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_dump_functions (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); @@ -1801,11 +1959,8 @@ _rl_macro_dumper_internal (print_readably, map, prefix) { case ISMACR: keyname = _rl_get_keyname (key); -#if 0 - out = (char *)map[key].function; -#else out = _rl_untranslate_macro_value ((char *)map[key].function); -#endif + if (print_readably) fprintf (rl_outstream, "\"%s%s\": \"%s\"\n", prefix ? prefix : "", keyname, @@ -1815,9 +1970,7 @@ _rl_macro_dumper_internal (print_readably, map, prefix) keyname, out ? out : ""); free (keyname); -#if 1 free (out); -#endif break; case ISFUNC: break; @@ -1825,7 +1978,7 @@ _rl_macro_dumper_internal (print_readably, map, prefix) prefix_len = prefix ? strlen (prefix) : 0; if (key == ESC) { - keyname = xmalloc (3 + prefix_len); + keyname = (char *)xmalloc (3 + prefix_len); if (prefix) strcpy (keyname, prefix); keyname[prefix_len] = '\\'; @@ -1837,7 +1990,7 @@ _rl_macro_dumper_internal (print_readably, map, prefix) keyname = _rl_get_keyname (key); if (prefix) { - out = xmalloc (strlen (keyname) + prefix_len + 1); + out = (char *)xmalloc (strlen (keyname) + prefix_len + 1); strcpy (out, prefix); strcpy (out + prefix_len, keyname); free (keyname); @@ -1860,8 +2013,8 @@ rl_macro_dumper (print_readably) } int -rl_dump_macros (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_dump_macros (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); @@ -1907,7 +2060,7 @@ rl_variable_dumper (print_readably) if (print_readably) fprintf (rl_outstream, "set comment-begin %s\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); else - fprintf (rl_outstream, "comment-begin is set to `%s'\n", _rl_comment_begin ? _rl_comment_begin : ""); + fprintf (rl_outstream, "comment-begin is set to `%s'\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); /* completion-query-items */ if (print_readably) @@ -1921,15 +2074,6 @@ rl_variable_dumper (print_readably) else fprintf (rl_outstream, "editing-mode is set to `%s'\n", (rl_editing_mode == emacs_mode) ? "emacs" : "vi"); - /* keymap */ - kname = rl_get_keymap_name (_rl_keymap); - if (kname == 0) - kname = rl_get_keymap_name_from_edit_mode (); - if (print_readably) - fprintf (rl_outstream, "set keymap %s\n", kname ? kname : "none"); - else - fprintf (rl_outstream, "keymap is set to `%s'\n", kname ? kname : "none"); - /* isearch-terminators */ if (_rl_isearch_terminators) { @@ -1944,14 +2088,23 @@ rl_variable_dumper (print_readably) free (disp); } + + /* keymap */ + kname = rl_get_keymap_name (_rl_keymap); + if (kname == 0) + kname = rl_get_keymap_name_from_edit_mode (); + if (print_readably) + fprintf (rl_outstream, "set keymap %s\n", kname ? kname : "none"); + else + fprintf (rl_outstream, "keymap is set to `%s'\n", kname ? kname : "none"); } /* Print all of the current variables and their values to rl_outstream. If an explicit argument is given, then print the output in such a way that it can be read back in. */ int -rl_dump_variables (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_dump_variables (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { if (rl_dispatching) fprintf (rl_outstream, "\r\n"); @@ -1960,18 +2113,24 @@ rl_dump_variables (int count __attribute__((unused)), return (0); } -/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. */ +/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right + now, this is always used to attempt to bind the arrow keys, hence the + check for rl_vi_movement_mode. */ void _rl_bind_if_unbound (keyseq, default_func) - char *keyseq; - Function *default_func; + const char *keyseq; + rl_command_func_t *default_func; { - Function *func; + rl_command_func_t *func; if (keyseq) { func = rl_function_of_keyseq (keyseq, _rl_keymap, (int *)NULL); +#if defined (VI_MODE) + if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode) +#else if (!func || func == rl_do_lowercase_version) +#endif rl_set_key (keyseq, default_func, _rl_keymap); } } @@ -1979,7 +2138,8 @@ _rl_bind_if_unbound (keyseq, default_func) /* Return non-zero if any members of ARRAY are a substring in STRING. */ static int substring_member_of_array (string, array) - char *string, **array; + char *string; + const char **array; { while (*array) { diff --git a/readline/callback.c b/readline/callback.c index 200f3cc37f9..a8f4323c929 100644 --- a/readline/callback.c +++ b/readline/callback.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -29,22 +29,20 @@ #if defined (READLINE_CALLBACKS) -#include #include + +#ifdef HAVE_STDLIB_H +# include +#else +# include "ansi_stdlib.h" +#endif + #include /* System-specific feature definitions and include files. */ #include "rldefs.h" #include "readline.h" - -extern void readline_internal_setup (); -extern char *readline_internal_teardown (); -extern int readline_internal_char (); -extern void _rl_init_line_state (); - -extern int _rl_meta_flag; -extern char *rl_prompt; -extern int rl_visible_prompt_length; +#include "rlprivate.h" /* **************************************************************** */ /* */ @@ -61,7 +59,7 @@ extern int rl_visible_prompt_length; text read in at each end of line. The terminal is kept prepped and signals handled all the time, except during calls to the user's function. */ -VFunction *rl_linefunc; /* user callback function */ +rl_vcpfunc_t *rl_linefunc; /* user callback function */ static int in_handler; /* terminal_prepped and signals set? */ /* Make sure the terminal is set up, initialize readline, and prompt. */ @@ -87,11 +85,10 @@ _rl_callback_newline () /* Install a readline handler, set up the terminal, and issue the prompt. */ void rl_callback_handler_install (prompt, linefunc) - char *prompt; - VFunction *linefunc; + const char *prompt; + rl_vcpfunc_t *linefunc; { - rl_prompt = prompt; - rl_visible_prompt_length = rl_prompt ? rl_expand_prompt (rl_prompt) : 0; + rl_set_prompt (prompt); rl_linefunc = linefunc; _rl_callback_newline (); } @@ -111,24 +108,33 @@ rl_callback_read_char () eof = readline_internal_char (); - if (rl_done) + /* We loop in case some function has pushed input back with rl_execute_next. */ + for (;;) { - line = readline_internal_teardown (eof); + if (rl_done) + { + line = readline_internal_teardown (eof); - (*rl_deprep_term_function) (); + (*rl_deprep_term_function) (); #if defined (HANDLE_SIGNALS) - rl_clear_signals (); + rl_clear_signals (); #endif - in_handler = 0; - (*rl_linefunc) (line); + in_handler = 0; + (*rl_linefunc) (line); - /* If the user did not clear out the line, do it for him. */ - if (rl_line_buffer[0]) - _rl_init_line_state (); + /* If the user did not clear out the line, do it for him. */ + if (rl_line_buffer[0]) + _rl_init_line_state (); - /* Redisplay the prompt if readline_handler_{install,remove} not called. */ - if (in_handler == 0 && rl_linefunc) - _rl_callback_newline (); + /* Redisplay the prompt if readline_handler_{install,remove} + not called. */ + if (in_handler == 0 && rl_linefunc) + _rl_callback_newline (); + } + if (rl_pending_input) + eof = readline_internal_char (); + else + break; } } diff --git a/readline/chardefs.h b/readline/chardefs.h index 740f14b185b..a537be220b0 100644 --- a/readline/chardefs.h +++ b/readline/chardefs.h @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,21 +18,23 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #ifndef _CHARDEFS_H_ #define _CHARDEFS_H_ -#ifndef _m_ctype_h #include -#endif #if defined (HAVE_CONFIG_H) # if defined (HAVE_STRING_H) +# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) +# include +# endif # include -# else -# include # endif /* HAVE_STRING_H */ +# if defined (HAVE_STRINGS_H) +# include +# endif /* HAVE_STRINGS_H */ #else # include #endif /* !HAVE_CONFIG_H */ @@ -42,7 +44,10 @@ #endif #ifdef CTRL -#undef CTRL +# undef CTRL +#endif +#ifdef UNCTRL +# undef UNCTRL #endif /* Some character stuff. */ @@ -53,7 +58,7 @@ #define meta_character_bit 0x080 /* x0000000, must be on. */ #define largest_char 255 /* Largest character value. */ -#define CTRL_CHAR(c) ((c) < control_character_threshold && (c) >= 0) +#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0)) #define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char) #define CTRL(c) ((c) & control_character_mask) @@ -62,33 +67,59 @@ #define UNMETA(c) ((c) & (~meta_character_bit)) #define UNCTRL(c) _rl_to_upper(((c)|control_character_bit)) -/* Old versions -#define _rl_lowercase_p(c) (((c) > ('a' - 1) && (c) < ('z' + 1))) -#define _rl_uppercase_p(c) (((c) > ('A' - 1) && (c) < ('Z' + 1))) -#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') -*/ +#if defined STDC_HEADERS || (!defined (isascii) && !defined (HAVE_ISASCII)) +# define IN_CTYPE_DOMAIN(c) 1 +#else +# define IN_CTYPE_DOMAIN(c) isascii(c) +#endif -#define _rl_lowercase_p(c) (islower(c)) -#define _rl_uppercase_p(c) (isupper(c)) -#define _rl_digit_p(x) (isdigit (x)) +#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) +# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) +#endif -#define _rl_pure_alphabetic(c) (_rl_lowercase_p(c) || _rl_uppercase_p(c)) -#define ALPHABETIC(c) (_rl_lowercase_p(c) || _rl_uppercase_p(c) || _rl_digit_p(c)) +#define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) -/* Old versions -# define _rl_to_upper(c) (_rl_lowercase_p(c) ? ((c) - 32) : (c)) -# define _rl_to_lower(c) (_rl_uppercase_p(c) ? ((c) + 32) : (c)) -*/ +/* Some systems define these; we want our definitions. */ +#undef ISPRINT + +#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) +#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) +#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) +#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) +#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) +#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) + +#define _rl_lowercase_p(c) (NON_NEGATIVE(c) && ISLOWER(c)) +#define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c)) +#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') + +#define _rl_pure_alphabetic(c) (NON_NEGATIVE(c) && ISALPHA(c)) +#define ALPHABETIC(c) (NON_NEGATIVE(c) && ISALNUM(c)) #ifndef _rl_to_upper -# define _rl_to_upper(c) (islower(c) ? toupper(c) : (c)) -# define _rl_to_lower(c) (isupper(c) ? tolower(c) : (c)) +# define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : (c)) +# define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : (c)) #endif #ifndef _rl_digit_value -#define _rl_digit_value(x) ((x) - '0') +# define _rl_digit_value(x) ((x) - '0') #endif +#ifndef _rl_isident +# define _rl_isident(c) (ISALNUM(c) || (c) == '_') +#endif + +#ifndef ISOCTAL +# define ISOCTAL(c) ((c) >= '0' && (c) <= '7') +#endif +#define OCTVALUE(c) ((c) - '0') + +#define HEXVALUE(c) \ + (((c) >= 'a' && (c) <= 'f') \ + ? (c)-'a'+10 \ + : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') + #ifndef NEWLINE #define NEWLINE '\n' #endif @@ -125,18 +156,4 @@ #endif #define ESC CTRL('[') -#ifndef ISOCTAL -#define ISOCTAL(c) ((c) >= '0' && (c) <= '7') -#endif -#define OCTVALUE(c) ((c) - '0') - -#ifndef isxdigit -# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) -#endif - -#define HEXVALUE(c) \ - (((c) >= 'a' && (c) <= 'f') \ - ? (c)-'a'+10 \ - : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') - #endif /* _CHARDEFS_H_ */ diff --git a/readline/complete.c b/readline/complete.c index 8810ca06d5f..693550c9945 100644 --- a/readline/complete.c +++ b/readline/complete.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -49,41 +49,39 @@ extern int errno; #endif /* !errno */ #include -#if !defined (HAVE_GETPW_DECLS) -extern struct passwd *getpwent (); -#endif /* USG && !HAVE_GETPW_DECLS */ - -/* ISC systems don't define getpwent() if _POSIX_SOURCE is defined. */ -#if defined (isc386) && defined (_POSIX_SOURCE) -# if defined (__STDC__) -extern struct passwd *getpwent (void); -# else -extern struct passwd *getpwent (); -# endif /* !__STDC__ */ -#endif /* isc386 && _POSIX_SOURCE */ #include "posixdir.h" #include "posixstat.h" /* System-specific feature definitions and include files. */ #include "rldefs.h" +#include "rlmbutil.h" /* Some standard library routines. */ #include "readline.h" +#include "xmalloc.h" +#include "rlprivate.h" -extern char *tilde_expand (); -extern char *rl_copy_text (); -extern void _rl_abort_internal (); -extern int _rl_qsort_string_compare (); -extern void _rl_replace_text (); +#ifdef __STDC__ +typedef int QSFUNC (const void *, const void *); +#else +typedef int QSFUNC (); +#endif -extern Function *rl_last_func; -extern int rl_editing_mode; -extern int screenwidth; +#ifdef HAVE_LSTAT +# define LSTAT lstat +#else +# define LSTAT stat +#endif -extern void _rl_move_vert (); -extern int _rl_vis_botlin; -extern int rl_display_fixed; +/* Unix version of a hidden file. Could be different on other systems. */ +#define HIDDEN_FILE(fname) ((fname)[0] == '.') + +/* Most systems don't declare getpwent in if _POSIX_SOURCE is + defined. */ +#if !defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE) +extern struct passwd *getpwent PARAMS((void)); +#endif /* !HAVE_GETPW_DECLS || _POSIX_SOURCE */ /* If non-zero, then this is the address of a function to call when completing a word would normally display the list of possible matches. @@ -92,30 +90,34 @@ extern int rl_display_fixed; where MATCHES is the array of strings that matched, NUM_MATCHES is the number of strings in that array, and MAX_LENGTH is the length of the longest string in that array. */ -VFunction *rl_completion_display_matches_hook = (VFunction *)NULL; - -/* Forward declarations for functions defined and used in this file. */ -char *filename_completion_function (const char *text, int state); -char **completion_matches (); +rl_compdisp_func_t *rl_completion_display_matches_hook = (rl_compdisp_func_t *)NULL; #if defined (VISIBLE_STATS) # if !defined (X_OK) # define X_OK 1 # endif -static int stat_char (); +static int stat_char PARAMS((char *)); #endif -static char *rl_quote_filename (); -static char *rl_strpbrk (); +static char *rl_quote_filename PARAMS((char *, int, char *)); -static char **remove_duplicate_matches (); -static void insert_match (); -static int append_to_match (); -static void insert_all_matches (); -static void display_matches (); -static int compute_lcd_of_matches (); +static void set_completion_defaults PARAMS((int)); +static int get_y_or_n PARAMS((int)); +static int _rl_internal_pager PARAMS((int)); +static char *printable_part PARAMS((char *)); +static int print_filename PARAMS((char *, char *)); -extern char *xmalloc (), *xrealloc (); +static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int)); + +static char **remove_duplicate_matches PARAMS((char **)); +static void insert_match PARAMS((char *, int, int, char *)); +static int append_to_match PARAMS((char *, int, int, int)); +static void insert_all_matches PARAMS((char **, int, char *)); +static void display_matches PARAMS((char **)); +static int compute_lcd_of_matches PARAMS((char **, int, const char *)); +static int postprocess_matches PARAMS((char ***, int)); + +static char *make_quoted_replacement PARAMS((char *, int, char *)); /* **************************************************************** */ /* */ @@ -131,12 +133,26 @@ int _rl_complete_show_all = 0; /* If non-zero, completed directory names have a slash appended. */ int _rl_complete_mark_directories = 1; +/* If non-zero, the symlinked directory completion behavior introduced in + readline-4.2a is disabled, and symlinks that point to directories have + a slash appended (subject to the value of _rl_complete_mark_directories). + This is user-settable via the mark-symlinked-directories variable. */ +int _rl_complete_mark_symlink_dirs = 0; + /* If non-zero, completions are printed horizontally in alphabetical order, like `ls -x'. */ int _rl_print_completions_horizontally; /* Non-zero means that case is not significant in filename completion. */ +#if defined (__MSDOS__) && !defined (__DJGPP__) +int _rl_completion_case_fold = 1; +#else int _rl_completion_case_fold; +#endif + +/* If non-zero, don't match hidden files (filenames beginning with a `.' on + Unix) when doing filename completion. */ +int _rl_match_hidden_files = 1; /* Global variables available to applications using readline. */ @@ -150,15 +166,17 @@ int rl_visible_stats = 0; /* If non-zero, then this is the address of a function to call when completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. */ -Function *rl_directory_completion_hook = (Function *)NULL; +rl_icppfunc_t *rl_directory_completion_hook = (rl_icppfunc_t *)NULL; + +rl_icppfunc_t *rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; /* Non-zero means readline completion functions perform tilde expansion. */ int rl_complete_with_tilde_expansion = 0; /* Pointer to the generator function for completion_matches (). - NULL means to use filename_completion_function (), the default filename + NULL means to use rl_filename_completion_function (), the default filename completer. */ -Function *rl_completion_entry_function = (Function *)NULL; +rl_compentry_func_t *rl_completion_entry_function = (rl_compentry_func_t *)NULL; /* Pointer to alternative function to create matches. Function is called with TEXT, START, and END. @@ -167,7 +185,7 @@ Function *rl_completion_entry_function = (Function *)NULL; If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ -CPPFunction *rl_attempted_completion_function = (CPPFunction *)NULL; +rl_completion_func_t *rl_attempted_completion_function = (rl_completion_func_t *)NULL; /* Non-zero means to suppress normal filename completion after the user-specified completion function has been called. */ @@ -183,10 +201,12 @@ int rl_completion_type = 0; she is sure she wants to see them all. */ int rl_completion_query_items = 100; +int _rl_page_completions = 1; + /* The basic list of characters that signal a break between words for the completer routine. The contents of this variable is what breaks words in the shell, i.e. " \t\n\"\\'`@$><=" */ -const char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; +const char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; /* }) */ /* List of basic quoting characters. */ const char *rl_basic_quote_characters = "\"'"; @@ -194,21 +214,21 @@ const char *rl_basic_quote_characters = "\"'"; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ -const char *rl_completer_word_break_characters = (char *)NULL; +const char *rl_completer_word_break_characters = (const char *)NULL; /* List of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, unless they also appear within this list. */ -char *rl_completer_quote_characters = (char *)NULL; +const char *rl_completer_quote_characters = (const char *)NULL; /* List of characters that should be quoted in filenames by the completer. */ -char *rl_filename_quote_characters = (char *)NULL; +const char *rl_filename_quote_characters = (const char *)NULL; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ -char *rl_special_prefixes = (char *)NULL; +const char *rl_special_prefixes = (const char *)NULL; /* If non-zero, then disallow duplicates in the matches. */ int rl_ignore_completion_duplicates = 1; @@ -234,29 +254,45 @@ int rl_filename_quoting_desired = 1; the list of matches as required, but all elements of the array must be free()'d if they are deleted. The main intent of this function is to implement FIGNORE a la SunOS csh. */ -Function *rl_ignore_some_completions_function = (Function *)NULL; +rl_compignore_func_t *rl_ignore_some_completions_function = (rl_compignore_func_t *)NULL; /* Set to a function to quote a filename in an application-specific fashion. Called with the text to quote, the type of match found (single or multiple) and a pointer to the quoting character to be used, which the function can reset if desired. */ -CPFunction *rl_filename_quoting_function = rl_quote_filename; - +rl_quote_func_t *rl_filename_quoting_function = rl_quote_filename; + /* Function to call to remove quoting characters from a filename. Called before completion is attempted, so the embedded quotes do not interfere with matching names in the file system. Readline doesn't do anything with this; it's set only by applications. */ -CPFunction *rl_filename_dequoting_function = (CPFunction *)NULL; +rl_dequote_func_t *rl_filename_dequoting_function = (rl_dequote_func_t *)NULL; /* Function to call to decide whether or not a word break character is quoted. If a character is quoted, it does not break words for the completer. */ -Function *rl_char_is_quoted_p = (Function *)NULL; +rl_linebuf_func_t *rl_char_is_quoted_p = (rl_linebuf_func_t *)NULL; + +/* If non-zero, the completion functions don't append anything except a + possible closing quote. This is set to 0 by rl_complete_internal and + may be changed by an application-specific completion function. */ +int rl_completion_suppress_append = 0; /* Character appended to completed words when at the end of the line. The default is a space. */ int rl_completion_append_character = ' '; +/* If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + mark-directories variable (which is user-settable). This exists so + that application completion functions can override the user's preference + (set via the mark-symlinked-directories variable) if appropriate. + It's set to the value of _rl_complete_mark_symlink_dirs in + rl_complete_internal before any application-specific completion + function is called, so without that function doing anything, the user's + preferences are honored. */ +int rl_completion_mark_symlink_dirs; + /* If non-zero, inhibit completion (temporarily). */ int rl_inhibit_completion; @@ -273,13 +309,13 @@ static int completion_changed_buffer; /* Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see - completion_matches ()). The default is to do filename completion. */ + rl_completion_matches ()). The default is to do filename completion. */ int rl_complete (ignore, invoking_key) int ignore, invoking_key; { if (rl_inhibit_completion) - return (rl_insert (ignore, invoking_key)); + return (_rl_insert_char (ignore, invoking_key)); else if (rl_last_func == rl_complete && !completion_changed_buffer) return (rl_complete_internal ('?')); else if (_rl_complete_show_all) @@ -303,52 +339,90 @@ rl_insert_completions (ignore, invoking_key) return (rl_complete_internal ('*')); } +/* Return the correct value to pass to rl_complete_internal performing + the same tests as rl_complete. This allows consecutive calls to an + application's completion function to list possible completions and for + an application-specific completion function to honor the + show-all-if-ambiguous readline variable. */ +int +rl_completion_mode (cfunc) + rl_command_func_t *cfunc; +{ + if (rl_last_func == cfunc && !completion_changed_buffer) + return '?'; + else if (_rl_complete_show_all) + return '!'; + else + return TAB; +} + /************************************/ /* */ /* Completion utility functions */ /* */ /************************************/ -/* Find the first occurrence in STRING1 of any character from STRING2. - Return a pointer to the character in STRING1. */ -static char * -rl_strpbrk (string1, string2) - char *string1, *string2; +/* Set default values for readline word completion. These are the variables + that application completion functions can change or inspect. */ +static void +set_completion_defaults (what_to_do) + int what_to_do; { - register char *scan; + /* Only the completion entry function can change these. */ + rl_filename_completion_desired = 0; + rl_filename_quoting_desired = 1; + rl_completion_type = what_to_do; + rl_completion_suppress_append = 0; - for (; *string1; string1++) - { - for (scan = string2; *scan; scan++) - { - if (*string1 == *scan) - { - return (string1); - } - } - } - return ((char *)NULL); + /* The completion entry function may optionally change this. */ + rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs; } /* The user must press "y" or "n". Non-zero return means "y" pressed. */ static int -get_y_or_n () +get_y_or_n (for_pager) + int for_pager; { int c; for (;;) { + RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + if (c == 'y' || c == 'Y' || c == ' ') return (1); if (c == 'n' || c == 'N' || c == RUBOUT) return (0); if (c == ABORT_CHAR) _rl_abort_internal (); - ding (); + if (for_pager && (c == NEWLINE || c == RETURN)) + return (2); + if (for_pager && (c == 'q' || c == 'Q')) + return (0); + rl_ding (); } } +static int +_rl_internal_pager (lines) + int lines; +{ + int i; + + fprintf (rl_outstream, "--More--"); + fflush (rl_outstream); + i = get_y_or_n (1); + _rl_erase_entire_line (); + if (i == 0) + return -1; + else if (i == 2) + return (lines - 1); + else + return 0; +} + #if defined (VISIBLE_STATS) /* Return the character which best describes FILENAME. `@' for symbolic links @@ -409,15 +483,41 @@ stat_char (filename) /* Return the portion of PATHNAME that should be output when listing possible completions. If we are hacking filename completion, we are only interested in the basename, the portion following the - final slash. Otherwise, we return what we were passed. */ + final slash. Otherwise, we return what we were passed. Since + printing empty strings is not very informative, if we're doing + filename completion, and the basename is the empty string, we look + for the previous slash and return the portion following that. If + there's no previous slash, we just return what we were passed. */ static char * printable_part (pathname) char *pathname; { - char *temp; + char *temp, *x; - temp = rl_filename_completion_desired ? strrchr (pathname, '/') : (char *)NULL; - return (temp ? ++temp : pathname); + if (rl_filename_completion_desired == 0) /* don't need to do anything */ + return (pathname); + + temp = strrchr (pathname, '/'); +#if defined (__MSDOS__) + if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':') + temp = pathname + 1; +#endif + + if (temp == 0 || *temp == '\0') + return (pathname); + /* If the basename is NULL, we might have a pathname like '/usr/src/'. + Look for a previous slash and, if one is found, return the portion + following that slash. If there's no previous slash, just return the + pathname we were passed. */ + else if (temp[1] == '\0') + { + for (x = temp - 1; x > pathname; x--) + if (*x == '/') + break; + return ((*x == '/') ? x + 1 : pathname); + } + else + return ++temp; } /* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and we @@ -477,13 +577,18 @@ print_filename (to_print, full_pathname) c = to_print[-1]; to_print[-1] = '\0'; - s = tilde_expand (full_pathname); + /* If setting the last slash in full_pathname to a NUL results in + full_pathname being the empty string, we are trying to complete + files in the root directory. If we pass a null string to the + bash directory completion hook, for example, it will expand it + to the current directory. We just want the `/'. */ + s = tilde_expand (full_pathname && *full_pathname ? full_pathname : "/"); if (rl_directory_completion_hook) (*rl_directory_completion_hook) (&s); slen = strlen (s); tlen = strlen (to_print); - new_full_pathname = xmalloc (slen + tlen + 2); + new_full_pathname = (char *)xmalloc (slen + tlen + 2); strcpy (new_full_pathname, s); new_full_pathname[slen] = '/'; strcpy (new_full_pathname + slen + 1, to_print); @@ -518,7 +623,7 @@ rl_quote_filename (s, rtype, qcp) { char *r; - r = xmalloc (strlen (s) + 2); + r = (char *)xmalloc (strlen (s) + 2); *r = *rl_completer_quote_characters; strcpy (r + 1, s); if (qcp) @@ -529,7 +634,7 @@ rl_quote_filename (s, rtype, qcp) /* Find the bounds of the current word for completion purposes, and leave rl_point set to the end of the word. This function skips quoted substrings (characters between matched pairs of characters in - rl_completer_quote_characters. First we try to find an unclosed + rl_completer_quote_characters). First we try to find an unclosed quoted substring on which to do matching. If one is not found, we use the word break characters to find the boundaries of the current word. We call an application-specific function to decide whether or not a @@ -541,8 +646,8 @@ rl_quote_filename (s, rtype, qcp) quote, or backslash) anywhere in the string. DP, if non-null, is set to the value of the delimiter character that caused a word break. */ -static char -find_completion_word (fp, dp) +char +_rl_find_completion_word (fp, dp) int *fp, *dp; { int scan, end, found_quote, delimiter, pass_next, isbrk; @@ -566,7 +671,11 @@ find_completion_word (fp, dp) continue; } - if (rl_line_buffer[scan] == '\\') + /* Shell-like semantics for single quotes -- don't allow backslash + to quote anything in single quotes, especially not the closing + quote. If you don't like this, take out the check on the value + of quote_char. */ + if (quote_char != '\'' && rl_line_buffer[scan] == '\\') { pass_next = 1; found_quote |= RL_QF_BACKSLASH; @@ -593,6 +702,8 @@ find_completion_word (fp, dp) found_quote |= RL_QF_SINGLE_QUOTE; else if (quote_char == '"') found_quote |= RL_QF_DOUBLE_QUOTE; + else + found_quote |= RL_QF_OTHER_QUOTE; } } } @@ -602,7 +713,11 @@ find_completion_word (fp, dp) /* We didn't find an unclosed quoted substring upon which to do completion, so use the word break characters to find the substring on which to complete. */ +#if defined (HANDLE_MULTIBYTE) + while (rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY)) +#else while (--rl_point) +#endif { scan = rl_line_buffer[rl_point]; @@ -627,25 +742,31 @@ find_completion_word (fp, dp) /* If there is an application-specific function to say whether or not a character is quoted and we found a quote character, let that function decide whether or not a character is a word break, even - if it is found in rl_completer_word_break_characters. */ - if (rl_char_is_quoted_p) - isbrk = (found_quote == 0 || - (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) && - strchr (rl_completer_word_break_characters, scan) != 0; - else - isbrk = strchr (rl_completer_word_break_characters, scan) != 0; - - if (isbrk) + if it is found in rl_completer_word_break_characters. Don't bother + if we're at the end of the line, though. */ + if (scan) { - /* If the character that caused the word break was a quoting - character, then remember it as the delimiter. */ - if (rl_basic_quote_characters && strchr (rl_basic_quote_characters, scan) && (end - rl_point) > 1) - delimiter = scan; + if (rl_char_is_quoted_p) + isbrk = (found_quote == 0 || + (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) && + strchr (rl_completer_word_break_characters, scan) != 0; + else + isbrk = strchr (rl_completer_word_break_characters, scan) != 0; - /* If the character isn't needed to determine something special - about what kind of completion to perform, then advance past it. */ - if (rl_special_prefixes == 0 || strchr (rl_special_prefixes, scan) == 0) - rl_point++; + if (isbrk) + { + /* If the character that caused the word break was a quoting + character, then remember it as the delimiter. */ + if (rl_basic_quote_characters && + strchr (rl_basic_quote_characters, scan) && + (end - rl_point) > 1) + delimiter = scan; + + /* If the character isn't needed to determine something special + about what kind of completion to perform, then advance past it. */ + if (rl_special_prefixes == 0 || strchr (rl_special_prefixes, scan) == 0) + rl_point++; + } } if (fp) @@ -660,7 +781,7 @@ static char ** gen_completion_matches (text, start, end, our_func, found_quote, quote_char) char *text; int start, end; - Function *our_func; + rl_compentry_func_t *our_func; int found_quote, quote_char; { char **matches, *temp; @@ -684,7 +805,7 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char) filename dequoting function. */ temp = (char *)NULL; - if (found_quote && our_func == (Function *)filename_completion_function && + if (found_quote && our_func == rl_filename_completion_function && rl_filename_dequoting_function) { /* delete single and double quotes */ @@ -692,7 +813,7 @@ gen_completion_matches (text, start, end, our_func, found_quote, quote_char) text = temp; /* not freeing text is not a memory leak */ } - matches = completion_matches (text, (CPFunction *)our_func); + matches = rl_completion_matches (text, our_func); FREE (temp); return matches; } @@ -715,7 +836,7 @@ remove_duplicate_matches (matches) /* Sort the array without matches[0], since we need it to stay in place no matter what. */ if (i) - qsort (matches+1, i-1, sizeof (char *), _rl_qsort_string_compare); + qsort (matches+1, i-1, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); /* Remember the lowest common denominator for it may be unique. */ lowest_common = savestring (matches[0]); @@ -764,10 +885,15 @@ static int compute_lcd_of_matches (match_list, matches, text) char **match_list; int matches; - char *text; + const char *text; { register int i, c1, c2, si; int low; /* Count of max-matched characters. */ +#if defined (HANDLE_MULTIBYTE) + int v; + mbstate_t ps1, ps2; + wchar_t wc1, wc2; +#endif /* If only one match, just use that. Otherwise, compare each member of the list with the next, finding out where they @@ -781,12 +907,33 @@ compute_lcd_of_matches (match_list, matches, text) for (i = 1, low = 100000; i < matches; i++) { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + memset (&ps1, 0, sizeof (mbstate_t)); + memset (&ps2, 0, sizeof (mbstate_t)); + } +#endif if (_rl_completion_case_fold) { for (si = 0; (c1 = _rl_to_lower(match_list[i][si])) && (c2 = _rl_to_lower(match_list[i + 1][si])); si++) +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + v = mbrtowc (&wc1, match_list[i]+si, strlen (match_list[i]+si), &ps1); + mbrtowc (&wc2, match_list[i+1]+si, strlen (match_list[i+1]+si), &ps2); + wc1 = towlower (wc1); + wc2 = towlower (wc2); + if (wc1 != wc2) + break; + else if (v > 1) + si += v - 1; + } + else +#endif if (c1 != c2) break; } @@ -796,6 +943,17 @@ compute_lcd_of_matches (match_list, matches, text) (c1 = match_list[i][si]) && (c2 = match_list[i + 1][si]); si++) +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + mbstate_t ps_back = ps1; + if (!_rl_compare_chars (match_list[i], si, &ps1, match_list[i+1], si, &ps2)) + break; + else if ((v = _rl_get_char_len (&match_list[i][si], &ps_back)) > 1) + si += v - 1; + } + else +#endif if (c1 != c2) break; } @@ -809,13 +967,42 @@ compute_lcd_of_matches (match_list, matches, text) value of matches[0]. */ if (low == 0 && text && *text) { - match_list[0] = xmalloc (strlen (text) + 1); + match_list[0] = (char *)xmalloc (strlen (text) + 1); strcpy (match_list[0], text); } else { - match_list[0] = xmalloc (low + 1); - strncpy (match_list[0], match_list[1], low); + match_list[0] = (char *)xmalloc (low + 1); + + /* XXX - this might need changes in the presence of multibyte chars */ + + /* If we are ignoring case, try to preserve the case of the string + the user typed in the face of multiple matches differing in case. */ + if (_rl_completion_case_fold) + { + /* sort the list to get consistent answers. */ + qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare); + + si = strlen (text); + if (si <= low) + { + for (i = 1; i <= matches; i++) + if (strncmp (match_list[i], text, si) == 0) + { + strncpy (match_list[0], match_list[i], low); + break; + } + /* no casematch, use first entry */ + if (i > matches) + strncpy (match_list[0], match_list[1], low); + } + else + /* otherwise, just use the text the user typed. */ + strncpy (match_list[0], text, low); + } + else + strncpy (match_list[0], match_list[1], low); + match_list[0][low] = '\0'; } @@ -832,6 +1019,9 @@ postprocess_matches (matchesp, matching_filenames) matches = *matchesp; + if (matches == 0) + return 0; + /* It seems to me that in all the cases we handle we would like to ignore duplicate possiblilities. Scan for the text to insert being identical to the other completions. */ @@ -884,17 +1074,17 @@ rl_display_match_list (matches, len, max) char **matches; int len, max; { - int count, limit, printed_len; + int count, limit, printed_len, lines; int i, j, k, l; char *temp; /* How many items of MAX length can we fit in the screen window? */ max += 2; - limit = screenwidth / max; - if (limit != 1 && (limit * max == screenwidth)) + limit = _rl_screenwidth / max; + if (limit != 1 && (limit * max == _rl_screenwidth)) limit--; - /* Avoid a possible floating exception. If max > screenwidth, + /* Avoid a possible floating exception. If max > _rl_screenwidth, limit will be 0 and a divide-by-zero fault will result. */ if (limit == 0) limit = 1; @@ -908,10 +1098,11 @@ rl_display_match_list (matches, len, max) /* Sort the items if they are not already sorted. */ if (rl_ignore_completion_duplicates == 0) - qsort (matches + 1, len, sizeof (char *), _rl_qsort_string_compare); + qsort (matches + 1, len, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); - crlf (); + rl_crlf (); + lines = 0; if (_rl_print_completions_horizontally == 0) { /* Print the sorted items, up-and-down alphabetically, like ls. */ @@ -932,7 +1123,14 @@ rl_display_match_list (matches, len, max) } l += count; } - crlf (); + rl_crlf (); + lines++; + if (_rl_page_completions && lines >= (_rl_screenheight - 1) && i < count) + { + lines = _rl_internal_pager (lines); + if (lines < 0) + return; + } } } else @@ -946,13 +1144,22 @@ rl_display_match_list (matches, len, max) if (matches[i+1]) { if (i && (limit > 1) && (i % limit) == 0) - crlf (); + { + rl_crlf (); + lines++; + if (_rl_page_completions && lines >= _rl_screenheight - 1) + { + lines = _rl_internal_pager (lines); + if (lines < 0) + return; + } + } else for (k = 0; k < max - printed_len; k++) putc (' ', rl_outstream); } } - crlf (); + rl_crlf (); } } @@ -981,9 +1188,9 @@ display_matches (matches) if (matches[1] == 0) { temp = printable_part (matches[0]); - crlf (); + rl_crlf (); print_filename (temp, matches[0]); - crlf (); + rl_crlf (); rl_forced_update_display (); rl_display_fixed = 1; @@ -1010,17 +1217,17 @@ display_matches (matches) (*rl_completion_display_matches_hook) (matches, len, max); return; } - + /* If there are many items, then ask the user if she really wants to see them all. */ if (len >= rl_completion_query_items) { - crlf (); + rl_crlf (); fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len); fflush (rl_outstream); - if (get_y_or_n () == 0) + if (get_y_or_n (0) == 0) { - crlf (); + rl_crlf (); rl_forced_update_display (); rl_display_fixed = 1; @@ -1068,7 +1275,7 @@ make_quoted_replacement (match, mtype, qc) This also checks whether the common prefix of several matches needs to be quoted. */ should_quote = rl_filename_quote_characters - ? (rl_strpbrk (match, rl_filename_quote_characters) != 0) + ? (_rl_strpbrk (match, rl_filename_quote_characters) != 0) : 0; do_replace = should_quote ? mtype : NO_MATCH; @@ -1114,14 +1321,20 @@ insert_match (match, start, mtype, qc) just-inserted match. If the user has specified that directories should be marked by a trailing `/', append one of those instead. The default trailing character is a space. Returns the number of characters - appended. */ + appended. If NONTRIVIAL_MATCH is set, we test for a symlink (if the OS + has them) and don't add a suffix for a symlink to a directory. A + nontrivial match is one that actually adds to the word being completed. + The variable rl_completion_mark_symlink_dirs controls this behavior + (it's initially set to the what the user has chosen, indicated by the + value of _rl_complete_mark_symlink_dirs, but may be modified by an + application's completion function). */ static int -append_to_match (text, delimiter, quote_char) +append_to_match (text, delimiter, quote_char, nontrivial_match) char *text; - int delimiter, quote_char; + int delimiter, quote_char, nontrivial_match; { char temp_string[4], *filename; - int temp_string_index; + int temp_string_index, s; struct stat finfo; temp_string_index = 0; @@ -1130,7 +1343,7 @@ append_to_match (text, delimiter, quote_char) if (delimiter) temp_string[temp_string_index++] = delimiter; - else if (rl_completion_append_character) + else if (rl_completion_suppress_append == 0 && rl_completion_append_character) temp_string[temp_string_index++] = rl_completion_append_character; temp_string[temp_string_index++] = '\0'; @@ -1138,21 +1351,39 @@ append_to_match (text, delimiter, quote_char) if (rl_filename_completion_desired) { filename = tilde_expand (text); - if (stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode)) + s = (nontrivial_match && rl_completion_mark_symlink_dirs == 0) + ? LSTAT (filename, &finfo) + : stat (filename, &finfo); + if (s == 0 && S_ISDIR (finfo.st_mode)) { - if (_rl_complete_mark_directories && rl_line_buffer[rl_point] != '/') - rl_insert_text ("/"); + if (_rl_complete_mark_directories) + { + /* This is clumsy. Avoid putting in a double slash if point + is at the end of the line and the previous character is a + slash. */ + if (rl_point && rl_line_buffer[rl_point] == '\0' && rl_line_buffer[rl_point - 1] == '/') + ; + else if (rl_line_buffer[rl_point] != '/') + rl_insert_text ("/"); + } } +#ifdef S_ISLNK + /* Don't add anything if the filename is a symlink and resolves to a + directory. */ + else if (s == 0 && S_ISLNK (finfo.st_mode) && + stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode)) + ; +#endif else { - if (rl_point == rl_end) + if (rl_point == rl_end && temp_string_index) rl_insert_text (temp_string); } free (filename); } else { - if (rl_point == rl_end) + if (rl_point == rl_end && temp_string_index) rl_insert_text (temp_string); } @@ -1198,12 +1429,15 @@ insert_all_matches (matches, point, qc) rl_end_undo_group (); } -static void -free_match_list (matches) +void +_rl_free_match_list (matches) char **matches; { register int i; + if (matches == 0) + return; + for (i = 0; matches[i]; i++) free (matches[i]); free (matches); @@ -1221,20 +1455,19 @@ rl_complete_internal (what_to_do) int what_to_do; { char **matches; - Function *our_func; - int start, end, delimiter, found_quote, i; + rl_compentry_func_t *our_func; + int start, end, delimiter, found_quote, i, nontrivial_lcd; char *text, *saved_line_buffer; char quote_char; - /* Only the completion entry function can change these. */ - rl_filename_completion_desired = 0; - rl_filename_quoting_desired = 1; - rl_completion_type = what_to_do; + RL_SETSTATE(RL_STATE_COMPLETING); + + set_completion_defaults (what_to_do); saved_line_buffer = rl_line_buffer ? savestring (rl_line_buffer) : (char *)NULL; our_func = rl_completion_entry_function ? rl_completion_entry_function - : (Function *)filename_completion_function; + : rl_filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ end = rl_point; @@ -1244,38 +1477,38 @@ rl_complete_internal (what_to_do) if (rl_point) /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ - quote_char = find_completion_word (&found_quote, &delimiter); + quote_char = _rl_find_completion_word (&found_quote, &delimiter); start = rl_point; rl_point = end; text = rl_copy_text (start, end); matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); + /* nontrivial_lcd is set if the common prefix adds something to the word + being completed. */ + nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; free (text); if (matches == 0) { - ding (); + rl_ding (); FREE (saved_line_buffer); + completion_changed_buffer = 0; + RL_UNSETSTATE(RL_STATE_COMPLETING); return (0); } -#if 0 - /* If we are matching filenames, our_func will have been set to - filename_completion_function */ - i = our_func == (Function *)filename_completion_function; -#else /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic - filename_completion_function does this. */ + rl_filename_completion_function does this. */ i = rl_filename_completion_desired; -#endif if (postprocess_matches (&matches, i) == 0) { - ding (); + rl_ding (); FREE (saved_line_buffer); completion_changed_buffer = 0; + RL_UNSETSTATE(RL_STATE_COMPLETING); return (0); } @@ -1303,10 +1536,10 @@ rl_complete_internal (what_to_do) break; } else if (rl_editing_mode != vi_mode) - ding (); /* There are other matches remaining. */ + rl_ding (); /* There are other matches remaining. */ } else - append_to_match (matches[0], delimiter, quote_char); + append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd); break; @@ -1320,12 +1553,13 @@ rl_complete_internal (what_to_do) default: fprintf (stderr, "\r\nreadline: bad value %d for what_to_do in rl_complete\n", what_to_do); - ding (); + rl_ding (); FREE (saved_line_buffer); + RL_UNSETSTATE(RL_STATE_COMPLETING); return 1; } - free_match_list (matches); + _rl_free_match_list (matches); /* Check to see if the line has changed through all of this manipulation. */ if (saved_line_buffer) @@ -1334,6 +1568,7 @@ rl_complete_internal (what_to_do) free (saved_line_buffer); } + RL_UNSETSTATE(RL_STATE_COMPLETING); return 0; } @@ -1356,7 +1591,9 @@ rl_complete_internal (what_to_do) when there are no more matches. */ char ** -completion_matches (const char *text, CPFunction *entry_function) +rl_completion_matches (text, entry_function) + const char *text; + rl_compentry_func_t *entry_function; { /* Number of slots in match_list. */ int match_list_size; @@ -1401,11 +1638,13 @@ completion_matches (const char *text, CPFunction *entry_function) TEXT contains a partial username preceded by a random character (usually `~'). */ char * -username_completion_function (const char *text, int state) +rl_username_completion_function (text, state) + const char *text; + int state; { -#if defined (__GO32__) || defined (__WIN__) || defined (__OPENNT) +#if defined (__WIN32__) || defined (__OPENNT) return (char *)NULL; -#else /* !__GO32__ */ +#else /* !__WIN32__ && !__OPENNT) */ static char *username = (char *)NULL; static struct passwd *entry; static int namelen, first_char, first_char_loc; @@ -1437,7 +1676,7 @@ username_completion_function (const char *text, int state) } else { - value = xmalloc (2 + strlen (entry->pw_name)); + value = (char *)xmalloc (2 + strlen (entry->pw_name)); *value = *text; @@ -1448,7 +1687,7 @@ username_completion_function (const char *text, int state) return (value); } -#endif /* !__GO32__ */ +#endif /* !__WIN32__ && !__OPENNT */ } /* Okay, now we write the entry_function for filename completion. In the @@ -1456,7 +1695,9 @@ username_completion_function (const char *text, int state) because of all the pathnames that must be followed when looking up the completion for a command. */ char * -filename_completion_function (const char *text, int state) +rl_filename_completion_function (text, state) + const char *text; + int state; { static DIR *directory = (DIR *)NULL; static char *filename = (char *)NULL; @@ -1488,11 +1729,25 @@ filename_completion_function (const char *text, int state) temp = strrchr (dirname, '/'); +#if defined (__MSDOS__) + /* special hack for //X/... */ + if (dirname[0] == '/' && dirname[1] == '/' && ISALPHA ((unsigned char)dirname[2]) && dirname[3] == '/') + temp = strrchr (dirname + 3, '/'); +#endif + if (temp) { strcpy (filename, ++temp); *temp = '\0'; } +#if defined (__MSDOS__) + /* searches from current directory on the drive */ + else if (ISALPHA ((unsigned char)dirname[0]) && dirname[1] == ':') + { + strcpy (filename, dirname + 2); + dirname[2] = '\0'; + } +#endif else { dirname[0] = '.'; @@ -1511,6 +1766,9 @@ filename_completion_function (const char *text, int state) dirname = temp; } + if (rl_directory_rewrite_hook) + (*rl_directory_rewrite_hook) (&dirname); + if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname)) { free (users_dirname); @@ -1534,10 +1792,14 @@ filename_completion_function (const char *text, int state) entry = (struct dirent *)NULL; while (directory && (entry = readdir (directory))) { - /* Special case for no filename. - All entries except "." and ".." match. */ + /* Special case for no filename. If the user has disabled the + `match-hidden-files' variable, skip filenames beginning with `.'. + All other entries except "." and ".." match. */ if (filename_len == 0) { + if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name)) + continue; + if (entry->d_name[0] != '.' || (entry->d_name[1] && (entry->d_name[1] != '.' || entry->d_name[2]))) @@ -1597,7 +1859,7 @@ filename_completion_function (const char *text, int state) if (rl_complete_with_tilde_expansion && *users_dirname == '~') { dirlen = strlen (dirname); - temp = xmalloc (2 + dirlen + D_NAMLEN (entry)); + temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, dirname); /* Canonicalization cuts off any final slash present. We may need to add it back. */ @@ -1610,8 +1872,11 @@ filename_completion_function (const char *text, int state) else { dirlen = strlen (users_dirname); - temp = xmalloc (1 + dirlen + D_NAMLEN (entry)); + temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, users_dirname); + /* Make sure that temp has a trailing slash here. */ + if (users_dirname[dirlen - 1] != '/') + temp[dirlen++] = '/'; } strcpy (temp + dirlen, entry->d_name); @@ -1633,9 +1898,10 @@ filename_completion_function (const char *text, int state) hit the end of the match list, we restore the original unmatched text, ring the bell, and reset the counter to zero. */ int -rl_menu_complete (int count, int ignore __attribute__((unused))) +rl_menu_complete (count, ignore) + int count, ignore __attribute__((unused)); { - Function *our_func; + rl_compentry_func_t *our_func; int matching_filenames, found_quote; static char *orig_text; @@ -1653,23 +1919,17 @@ rl_menu_complete (int count, int ignore __attribute__((unused))) /* Clean up from previous call, if any. */ FREE (orig_text); if (matches) - { - for (match_list_index = 0; matches[match_list_index]; match_list_index++) - free (matches[match_list_index]); - free (matches); - } + _rl_free_match_list (matches); match_list_index = match_list_size = 0; matches = (char **)NULL; /* Only the completion entry function can change these. */ - rl_filename_completion_desired = 0; - rl_filename_quoting_desired = 1; - rl_completion_type = '%'; + set_completion_defaults ('%'); our_func = rl_completion_entry_function ? rl_completion_entry_function - : (Function *)filename_completion_function; + : rl_filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ orig_end = rl_point; @@ -1679,7 +1939,7 @@ rl_menu_complete (int count, int ignore __attribute__((unused))) if (rl_point) /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ - quote_char = find_completion_word (&found_quote, &delimiter); + quote_char = _rl_find_completion_word (&found_quote, &delimiter); orig_start = rl_point; rl_point = orig_end; @@ -1688,19 +1948,14 @@ rl_menu_complete (int count, int ignore __attribute__((unused))) matches = gen_completion_matches (orig_text, orig_start, orig_end, our_func, found_quote, quote_char); -#if 0 - /* If we are matching filenames, our_func will have been set to - filename_completion_function */ - matching_filenames = our_func == (Function *)filename_completion_function; -#else /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic - filename_completion_function does this. */ + rl_filename_completion_function does this. */ matching_filenames = rl_filename_completion_desired; -#endif + if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) { - ding (); + rl_ding (); FREE (matches); matches = (char **)0; FREE (orig_text); @@ -1721,7 +1976,7 @@ rl_menu_complete (int count, int ignore __attribute__((unused))) if (matches == 0 || match_list_size == 0) { - ding (); + rl_ding (); FREE (matches); matches = (char **)0; completion_changed_buffer = 0; @@ -1734,13 +1989,14 @@ rl_menu_complete (int count, int ignore __attribute__((unused))) if (match_list_index == 0 && match_list_size > 1) { - ding (); + rl_ding (); insert_match (orig_text, orig_start, MULT_MATCH, "e_char); } else { insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); - append_to_match (matches[match_list_index], delimiter, quote_char); + append_to_match (matches[match_list_index], delimiter, quote_char, + strcmp (orig_text, matches[match_list_index])); } completion_changed_buffer = 1; diff --git a/readline/configure b/readline/configure index 454a177e35d..fc3769f50e8 100755 --- a/readline/configure +++ b/readline/configure @@ -1,119 +1,158 @@ #! /bin/sh - -# From configure.in for Readline 4.0, version 2.14, from autoconf version 2.12 -LIBVERSION=4.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# From configure.in for Readline 4.3, version 2.45, from autoconf version 2.52. # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# Generated by Autoconf 2.52 for readline 4.3. # +# Report bugs to . +# +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -# Defaults: -ac_help= +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_help="$ac_help ---with-curses use the curses library instead of the termcap library" +cross_compiling=no +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +ac_unique_file="readline.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" # Initialize some variables set by options. +ac_init_help= +ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. -build=NONE -cache_file=./config.cache +cache_file=/dev/null exec_prefix=NONE -host=NONE no_create= -nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE @@ -122,10 +161,15 @@ program_transform_name=s,x,x, silent= site= srcdir= -target=NONE verbose= x_includes=NONE x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' @@ -139,16 +183,16 @@ oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 +# Identity of this package. +PACKAGE_NAME='readline' +PACKAGE_TARNAME='readline' +PACKAGE_VERSION='4.3' +PACKAGE_STRING='readline 4.3' +PACKAGE_BUGREPORT='bug-readline@gnu.org' ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" @@ -156,59 +200,59 @@ do continue fi - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. - case "$ac_option" in + case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; + bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) - ac_prev=build ;; + ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; + build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) - datadir="$ac_optarg" ;; + datadir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "enable_${ac_feature}='$ac_optarg'" ;; + eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -217,95 +261,47 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; + exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; -host | --host | --hos | --ho) - ac_prev=host ;; + ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; + host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; + includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; + infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; + libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; + libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ @@ -314,12 +310,12 @@ EOF -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; + localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; + mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. @@ -340,26 +336,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; + oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; + prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; + program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; + program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ @@ -376,7 +372,7 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; + program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) @@ -386,7 +382,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; + sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ @@ -397,58 +393,57 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; + sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; + site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; + srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; + sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; + ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; + target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" - exit 0 ;; + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac - eval "with_${ac_package}='$ac_optarg'" ;; + eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. @@ -459,98 +454,98 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; + x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; + x_libraries=$ac_optarg ;; - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } fi -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; esac done -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +build=$build_alias +host=$host_alias +target=$target_alias -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=readline.h +# FIXME: should be removed in autoconf 3.0. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then @@ -561,13 +556,316 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + { echo "$as_me: error: cannot find sources in $srcdir" >&2 + { (exit 1); exit 1; }; } fi fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat < if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +EOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue + cd $ac_subdir + # A "../" for each directory in /$ac_subdir. + ac_dots=`echo $ac_subdir | + sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` + + case $srcdir in + .) # No --srcdir option. We are building in place. + ac_sub_srcdir=$srcdir ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_sub_srcdir=$srcdir/$ac_subdir ;; + *) # Relative path. + ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; + esac + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_sub_srcdir/configure.gnu; then + echo + $SHELL $ac_sub_srcdir/configure.gnu --help=recursive + elif test -f $ac_sub_srcdir/configure; then + echo + $SHELL $ac_sub_srcdir/configure --help=recursive + elif test -f $ac_sub_srcdir/configure.ac || + test -f $ac_sub_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\EOF +readline configure 4.3 +generated by GNU Autoconf 2.52 + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +EOF + exit 0 +fi +exec 5>config.log +cat >&5 </dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +PATH = $PATH + +_ASUNAME +} >&5 + +cat >&5 <\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + echo >&5 + echo "## ----------------- ##" >&5 + echo "## Cache variables. ##" >&5 + echo "## ----------------- ##" >&5 + echo >&5 + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} >&5 + sed "/^$/d" confdefs.h >conftest.log + if test -s conftest.log; then + echo >&5 + echo "## ------------ ##" >&5 + echo "## confdefs.h. ##" >&5 + echo "## ------------ ##" >&5 + echo >&5 + cat conftest.log >&5 + fi + (echo; echo) >&5 + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" >&5 + echo "$as_me: exit $exit_status" >&5 + rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then @@ -578,42 +876,107 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" + { echo "$as_me:879: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + cat "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:890: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi else - echo "creating cache $cache_file" - > $cache_file + { echo "$as_me:898: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:914: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:918: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:924: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:926: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:928: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. It doesn't matter if + # we pass some twice (in addition to the command line arguments). + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" + ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:947: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:949: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } fi ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac +echo "#! $SHELL" >conftest.sh +echo "exit 0" >>conftest.sh +chmod +x conftest.sh +if { (echo "$as_me:969: PATH=\".;.\"; conftest.sh") >&5 + (PATH=".;."; conftest.sh) 2>&5 + ac_status=$? + echo "$as_me:972: \$? = $ac_status" >&5 + (exit $ac_status); }; then + ac_path_separator=';' else - ac_n= ac_c='\c' ac_t= + ac_path_separator=: fi - - - - - +PATH_SEPARATOR="$ac_path_separator" +rm -f conftest.sh ac_aux_dir= for ac_dir in ./support $srcdir/./support; do @@ -625,387 +988,1135 @@ for ac_dir in ./support $srcdir/./support; do ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in ./support $srcdir/./support" 1>&2; exit 1; } + { { echo "$as_me:998: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&2;} + { (exit 1); exit 1; }; } fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. +ac_config_headers="$ac_config_headers config.h" +LIBVERSION=4.3 # Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:1012: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:1016: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:1025: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:1029: error: $ac_config_sub $ac_cv_build_alias failed." >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} + { (exit 1); exit 1; }; } + fi +echo "$as_me:1034: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:646: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`$ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 +echo "$as_me:1041: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:1050: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:1055: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` opt_curses=no -opt_shared=no # Check whether --with-curses or --without-curses was given. if test "${with_curses+set}" = set; then withval="$with_curses" opt_curses=$withval -fi - +fi; if test "$opt_curses" = "yes"; then prefer_curses=yes fi +opt_static_libs=yes +opt_shared_libs=yes + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + opt_shared_libs=$enableval +fi; +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + opt_static_libs=$enableval +fi; + +echo "" +echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}" +echo "" + # We want these before the checks, so the checks can modify their values. test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:687: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1095: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:1115: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:1119: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:1132: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}gcc" +echo "$as_me:1147: found $ac_dir/$ac_word" >&5 +break +done + fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1155: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1158: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:1167: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="gcc" +echo "$as_me:1182: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1190: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1193: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:716: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:1206: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="${ac_tool_prefix}cc" +echo "$as_me:1221: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1229: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1232: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1241: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="cc" +echo "$as_me:1256: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1264: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1267: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:1280: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" ac_prog_rejected=no - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue +fi +ac_cv_prog_CC="cc" +echo "$as_me:1300: found $ac_dir/$ac_word" >&5 +break +done + if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift - if test $# -gt 0; then + if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - set dummy "$ac_dir/$ac_word" "$@" + set dummy "$ac_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi -CC="$ac_cv_prog_CC" +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 + echo "$as_me:1322: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:1325: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:1336: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +echo "$as_me:1351: found $ac_dir/$ac_word" >&5 +break +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:1359: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:1362: result: no" >&5 +echo "${ECHO_T}no" >&6 fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:1375: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_CC="$ac_prog" +echo "$as_me:1390: found $ac_dir/$ac_word" >&5 +break +done -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:1398: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:1401: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi -cat > conftest.$ac_ext <&5 +echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:1418:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:1421: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:1424: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:1426: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:1429: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:1431: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:1434: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line 1438 "configure" #include "confdefs.h" -main(){return(0);} -EOF -if { (eval echo configure:778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - ac_cv_prog_cc_works=yes - # If we can't run a trivial program, we are probably using a cross compiler. - if (./conftest; exit) 2>/dev/null; then - ac_cv_prog_cc_cross=no + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:1454: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:1457: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:1460: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. +for ac_file in `ls a.exe conftest.exe 2>/dev/null; + ls a.out conftest 2>/dev/null; + ls a.* conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1483: error: C compiler cannot create executables" >&5 +echo "$as_me: error: C compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:1489: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1494: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:1500: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1503: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no else - ac_cv_prog_cc_cross=yes + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:1510: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi fi -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no fi -rm -fr conftest* +echo "$as_me:1518: result: yes" >&5 +echo "${ECHO_T}yes" >&6 -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 -if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } -fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:798: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 -cross_compiling=$ac_cv_prog_cc_cross +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:1525: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:1527: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:803: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:1530: checking for executable suffix" >&5 +echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 +if { (eval echo "$as_me:1532: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:1535: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done else - cat > conftest.c <&5 +echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:1557: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:1563: checking for object suffix" >&5 +echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1569 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:1581: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1584: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:1596: error: cannot compute OBJEXT: cannot compile" >&5 +echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:1603: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:1607: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1613 "configure" +#include "confdefs.h" + +int +main () +{ +#ifndef __GNUC__ + choke me #endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:827: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1628: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1631: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1634: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1637: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:1649: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:1655: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 1661 "configure" +#include "confdefs.h" + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1673: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1676: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1679: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1682: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else - ac_cv_prog_cc_g=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no fi -rm -f conftest* - +rm -f conftest.$ac_objext conftest.$ac_ext fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +echo "$as_me:1692: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1719: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1722: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1725: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1728: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line 1740 "configure" +#include "confdefs.h" +#include +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1753: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1756: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1759: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1762: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line 1772 "configure" +#include "confdefs.h" +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1787: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1790: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1793: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:855: checking how to run the C preprocessor" >&5 +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:1825: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 1846 "configure" #include "confdefs.h" #include -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then + Syntax error +_ACEOF +if { (eval echo "$as_me:1851: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1857: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then : else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp + # Broken: fails on valid input. +continue fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 +rm -f conftest.err conftest.$ac_ext -ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -echo "configure:917: checking for minix/config.h" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 1880 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:1884: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1890: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - cat > conftest.$ac_ext <&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:1927: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line 1937 "configure" +#include "confdefs.h" +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:1942: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1948: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line 1971 "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:1975: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:1981: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:2009: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +echo "$as_me:2020: checking for minix/config.h" >&5 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 +if test "${ac_cv_header_minix_config_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2026 "configure" #include "confdefs.h" #include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +_ACEOF +if { (eval echo "$as_me:2030: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2036: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_minix_config_h=yes +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + ac_cv_header_minix_config_h=no fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$as_me:2055: result: $ac_cv_header_minix_config_h" >&5 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 +if test $ac_cv_header_minix_config_h = yes; then MINIX=yes else - echo "$ac_t""no" 1>&6 -MINIX= + MINIX= fi if test "$MINIX" = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF - cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define _POSIX_1_SOURCE 2 EOF - cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define _MINIX 1 EOF fi - # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" -if test $ac_cv_prog_gcc = yes; then - echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:970: checking whether ${CC-cc} needs -traditional" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test $ac_cv_c_compiler_gnu = yes; then + echo "$as_me:2083: checking whether $CC needs -traditional" >&5 +echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 +if test "${ac_cv_prog_gcc_traditional+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2090 "configure" #include "confdefs.h" #include Autoconf TIOCGETP -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* ac_cv_prog_gcc_traditional=yes else - rm -rf conftest* ac_cv_prog_gcc_traditional=no fi rm -f conftest* - if test $ac_cv_prog_gcc_traditional = no; then - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2105 "configure" #include "confdefs.h" #include Autoconf TCGETA -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi - -echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 +echo "$as_me:2118: result: $ac_cv_prog_gcc_traditional" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi @@ -1018,28 +2129,38 @@ fi # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1026: checking for a BSD compatible install" >&5 +echo "$as_me:2137: checking for a BSD compatible install" >&5 +echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + ac_save_IFS=$IFS; IFS=$ac_path_separator for ac_dir in $PATH; do + IFS=$ac_save_IFS # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + case $ac_dir/ in + / | ./ | .// | /cC/* \ + | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ + | /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if $as_executable_p "$ac_dir/$ac_prog"; then if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. + : + elif test $ac_prog = install && + grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -1050,101 +2171,581 @@ else ;; esac done - IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" + INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. - INSTALL="$ac_install_sh" + INSTALL=$ac_install_sh fi fi -echo "$ac_t""$INSTALL" 1>&6 +echo "$as_me:2186: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1078: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2199: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_AR="ar" - break - fi - done - IFS="$ac_save_ifs" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_AR="" +echo "$as_me:2214: found $ac_dir/$ac_word" >&5 +break +done + + test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" fi fi -AR="$ac_cv_prog_AR" +AR=$ac_cv_prog_AR if test -n "$AR"; then - echo "$ac_t""$AR" 1>&6 + echo "$as_me:2223: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2226: result: no" >&5 +echo "${ECHO_T}no" >&6 fi test -n "$ARFLAGS" || ARFLAGS="cr" -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1107: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:2234: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +echo "$as_me:2249: found $ac_dir/$ac_word" >&5 +break +done + fi fi -RANLIB="$ac_cv_prog_RANLIB" +RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 + echo "$as_me:2257: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 else - echo "$ac_t""no" 1>&6 + echo "$as_me:2260: result: no" >&5 +echo "${ECHO_T}no" >&6 fi +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:2269: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else + ac_save_IFS=$IFS; IFS=$ac_path_separator +ac_dummy="$PATH" +for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue +ac_cv_prog_ac_ct_RANLIB="ranlib" +echo "$as_me:2284: found $ac_dir/$ac_word" >&5 +break +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:2293: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:2296: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi MAKE_SHELL=/bin/sh - -echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1138: checking return type of signal handlers" >&5 -if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2307: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2315 "configure" +#include "confdefs.h" +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:2364: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2367: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2370: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2373: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:2390: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:2393: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +echo "$as_me:2398: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2404 "configure" +#include "confdefs.h" + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2462: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2465: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2468: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2471: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_const=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2481: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\EOF +#define const +EOF + +fi + +echo "$as_me:2491: checking for function prototypes" >&5 +echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 +if test "$ac_cv_prog_cc_stdc" != no; then + echo "$as_me:2494: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\EOF +#define PROTOTYPES 1 +EOF + +else + echo "$as_me:2502: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +echo "$as_me:2506: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2512 "configure" +#include "confdefs.h" +#include +#include +#include +#include + +_ACEOF +if { (eval echo "$as_me:2520: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:2526: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line 2548 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line 2566 "configure" +#include "confdefs.h" +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line 2587 "configure" +#include "confdefs.h" +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:2613: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:2616: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:2618: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2621: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_stdc=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:2634: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:2650: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2656 "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2662: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2665: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2668: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2671: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2681: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 +if test "${ac_cv_c_char_unsigned+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2697 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +int _array_ [1 - 2 * !(((char) -1) < 0)] + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2709: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2712: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2715: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2718: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_char_unsigned=no +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_c_char_unsigned=yes +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2728: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + cat >>confdefs.h <<\EOF +#define __CHAR_UNSIGNED__ 1 +EOF + +fi + +echo "$as_me:2737: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2743 "configure" #include "confdefs.h" #include #include #ifdef signal -#undef signal +# undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); @@ -1152,36 +2753,152 @@ extern "C" void (*signal (int, void (*)(int)))(int); void (*signal ()) (); #endif -int main() { +int +main () +{ int i; -; return 0; } -EOF -if { (eval echo configure:1160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2765: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2768: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2771: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2774: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_type_signal=void else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_type_signal=int + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_signal=int fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:2784: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 -echo "$ac_t""$ac_cv_type_signal" 1>&6 -cat >> confdefs.h <>confdefs.h <&6 -echo "configure:1180: checking whether stat file-mode macros are broken" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:2791: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2797 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2812: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2815: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2818: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2821: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_size_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2831: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +if test "${ac_cv_type_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2849 "configure" +#include "confdefs.h" +$ac_includes_default +int +main () +{ +if ((ssize_t *) 0) + return 0; +if (sizeof (ssize_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2867: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2870: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2873: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_ssize_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:2883: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 +if test $ac_cv_type_ssize_t = yes; then + : +else + +cat >>confdefs.h <&5 +echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 +if test "${ac_cv_header_stat_broken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 2901 "configure" #include "confdefs.h" #include #include @@ -1210,408 +2927,516 @@ You lose. # endif #endif -EOF +_ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "You lose" >/dev/null 2>&1; then - rm -rf conftest* ac_cv_header_stat_broken=yes else - rm -rf conftest* ac_cv_header_stat_broken=no fi rm -f conftest* fi - -echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 +echo "$as_me:2940: result: $ac_cv_header_stat_broken" >&5 +echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 if test $ac_cv_header_stat_broken = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define STAT_MACROS_BROKEN 1 EOF fi ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1240: checking for $ac_hdr that defines DIR" >&5 -if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +echo "$as_me:2953: checking for $ac_hdr that defines DIR" >&5 +echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 2959 "configure" #include "confdefs.h" #include #include <$ac_hdr> -int main() { -DIR *dirp = 0; -; return 0; } -EOF -if { (eval echo configure:1253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=yes" + +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:2974: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2977: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2980: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2983: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_dirent_$ac_safe=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&6 + +ac_header_dirent=$ac_hdr; break fi + done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then -echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1278: checking for opendir in -ldir" >&5 -ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:3006: checking for opendir in -ldir" >&5 +echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 +if test "${ac_cv_lib_dir_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ldir $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3014 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir(); - -int main() { -opendir() -; return 0; } -EOF -if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3033: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3036: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3039: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3042: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dir_opendir=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dir_opendir=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$as_me:3053: result: $ac_cv_lib_dir_opendir" >&5 +echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 +if test $ac_cv_lib_dir_opendir = yes; then LIBS="$LIBS -ldir" -else - echo "$ac_t""no" 1>&6 fi else -echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1319: checking for opendir in -lx" >&5 -ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:3060: checking for opendir in -lx" >&5 +echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 +if test "${ac_cv_lib_x_opendir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lx $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3068 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir(); - -int main() { -opendir() -; return 0; } -EOF -if { (eval echo configure:1338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char opendir (); +int +main () +{ +opendir (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3087: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3090: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3093: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3096: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_x_opendir=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_x_opendir=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$as_me:3107: result: $ac_cv_lib_x_opendir" >&5 +echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 +if test $ac_cv_lib_x_opendir = yes; then LIBS="$LIBS -lx" -else - echo "$ac_t""no" 1>&6 fi fi - -for ac_func in strcasecmp select setenv putenv tcgetattr setlocale lstat +for ac_func in lstat memmove putenv select setenv setlocale \ + strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1364: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:3119: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3125 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func(); below. */ + which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); +int +main () +{ /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else -$ac_func(); +f = $ac_func; #endif -; return 0; } -EOF -if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3156: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3159: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3162: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3165: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi +echo "$as_me:3175: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done - -echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:1418: checking for working strcoll" >&5 -if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3185: checking for working strcoll" >&5 +echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6 +if test "${ac_cv_func_strcoll_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_strcoll_works=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3194 "configure" #include "confdefs.h" -#include +$ac_includes_default +int main () { - exit (strcoll ("abc", "def") >= 0 || - strcoll ("ABC", "DEF") >= 0 || - strcoll ("123", "456") >= 0); +exit (strcoll ("abc", "def") >= 0 || + strcoll ("ABC", "DEF") >= 0 || + strcoll ("123", "456") >= 0) + ; + return 0; } -EOF -if { (eval echo configure:1436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3208: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3211: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3213: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3216: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ac_cv_func_strcoll_works=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_func_strcoll_works=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_strcoll_works=no fi -rm -fr conftest* +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi - fi - -echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6 +echo "$as_me:3228: result: $ac_cv_func_strcoll_works" >&5 +echo "${ECHO_T}$ac_cv_func_strcoll_works" >&6 if test $ac_cv_func_strcoll_works = yes; then - cat >> confdefs.h <<\EOF + +cat >>confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF fi - -for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \ - sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ - termcap.h termios.h termio.h sys/file.h locale.h +for ac_header in unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \ + limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ + termcap.h termios.h termio.h sys/file.h locale.h memory.h do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1465: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:3243: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3249 "configure" #include "confdefs.h" -#include <$ac_hdr> -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:3253: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:3259: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" + eval "$as_ac_Header=no" fi -rm -f conftest* +rm -f conftest.err conftest.$ac_ext fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&6 + fi done - - -echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6 -echo "configure:1504: checking for type of signal functions" >&5 -if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3288: checking for type of signal functions" >&5 +echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6 +if test "${bash_cv_signal_vintage+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3295 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ sigset_t ss; struct sigaction sa; sigemptyset(&ss); sigsuspend(&ss); sigaction(SIGINT, &sa, (struct sigaction *) 0); sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); - -; return 0; } -EOF -if { (eval echo configure:1523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3313: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3316: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3319: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3322: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_signal_vintage=posix else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - cat > conftest.$ac_ext <&5 +cat conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +#line 3330 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ int mask = sigmask(SIGINT); sigsetmask(mask); sigblock(mask); sigpause(mask); - -; return 0; } -EOF -if { (eval echo configure:1542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3345: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3348: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3351: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3354: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_signal_vintage=4.2bsd else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - - cat > conftest.$ac_ext <&5 +cat conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +#line 3362 "configure" #include "confdefs.h" #include RETSIGTYPE foo() { } -int main() { +int +main () +{ int mask = sigmask(SIGINT); sigset(SIGINT, foo); sigrelse(SIGINT); sighold(SIGINT); sigpause(SIGINT); - -; return 0; } -EOF -if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3380: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3383: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3386: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3389: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_signal_vintage=svr3 else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_signal_vintage=v7 - -fi -rm -f conftest* - -fi -rm -f conftest* + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_signal_vintage=v7 fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi -echo "$ac_t""$bash_cv_signal_vintage" 1>&6 +echo "$as_me:3408: result: $bash_cv_signal_vintage" >&5 +echo "${ECHO_T}$bash_cv_signal_vintage" >&6 if test "$bash_cv_signal_vintage" = posix; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define HAVE_POSIX_SIGNALS 1 EOF elif test "$bash_cv_signal_vintage" = "4.2bsd"; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define HAVE_BSD_SIGNALS 1 EOF elif test "$bash_cv_signal_vintage" = svr3; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define HAVE_USG_SIGHOLD 1 EOF fi - - -echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6 -echo "configure:1605: checking if signal handlers must be reinstalled when invoked" >&5 -if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3427: checking if signal handlers must be reinstalled when invoked" >&5 +echo $ECHO_N "checking if signal handlers must be reinstalled when invoked... $ECHO_C" >&6 +if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2 + { echo "$as_me:3433: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 +echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} bash_cv_must_reinstall_sighandlers=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3439 "configure" #include "confdefs.h" #include @@ -1657,43 +3482,51 @@ main() exit(nsigint != 2); } -EOF -if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3487: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3490: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3492: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3495: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_must_reinstall_sighandlers=no else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - bash_cv_must_reinstall_sighandlers=yes + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_must_reinstall_sighandlers=yes +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -fr conftest* fi -fi - -echo "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6 +echo "$as_me:3508: result: $bash_cv_must_reinstall_sighandlers" >&5 +echo "${ECHO_T}$bash_cv_must_reinstall_sighandlers" >&6 if test $bash_cv_must_reinstall_sighandlers = yes; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define MUST_REINSTALL_SIGHANDLERS 1 EOF fi - - -echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6 -echo "configure:1687: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 -if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3517: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 +echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6 +if test "${bash_cv_func_sigsetjmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2 + { echo "$as_me:3523: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5 +echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;} bash_cv_func_sigsetjmp=missing else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3529 "configure" #include "confdefs.h" #ifdef HAVE_UNISTD_H @@ -1733,115 +3566,100 @@ siglongjmp(xx, 10); exit(1); #endif } -EOF -if { (eval echo configure:1738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3571: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3574: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3576: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3579: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_func_sigsetjmp=present else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - bash_cv_func_sigsetjmp=missing + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_func_sigsetjmp=missing +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -fr conftest* fi -fi - -echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6 +echo "$as_me:3592: result: $bash_cv_func_sigsetjmp" >&5 +echo "${ECHO_T}$bash_cv_func_sigsetjmp" >&6 if test $bash_cv_func_sigsetjmp = present; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define HAVE_POSIX_SIGSETJMP 1 EOF fi -echo $ac_n "checking for lstat""... $ac_c" 1>&6 -echo "configure:1761: checking for lstat" >&5 -if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3601: checking for lstat" >&5 +echo $ECHO_N "checking for lstat... $ECHO_C" >&6 +if test "${bash_cv_func_lstat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3607 "configure" #include "confdefs.h" #include #include -int main() { - lstat(".",(struct stat *)0); -; return 0; } -EOF -if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* +int +main () +{ + lstat(".",(struct stat *)0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3622: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3625: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3628: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3631: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_func_lstat=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_func_lstat=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_func_lstat=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi - -echo "$ac_t""$bash_cv_func_lstat" 1>&6 +echo "$as_me:3641: result: $bash_cv_func_lstat" >&5 +echo "${ECHO_T}$bash_cv_func_lstat" >&6 if test $bash_cv_func_lstat = yes; then - cat >> confdefs.h <<\EOF + cat >>confdefs.h <<\EOF #define HAVE_LSTAT 1 EOF fi -echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6 -echo "configure:1797: checking whether programs are able to redeclare getpw functions" >&5 -if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -extern struct passwd *getpwent(); -extern struct passwd *getpwuid(); -extern struct passwd *getpwnam(); -int main() { -struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root"); -; return 0; } -EOF -if { (eval echo configure:1813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - bash_cv_can_redecl_getpw=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_can_redecl_getpw=no -fi -rm -f conftest* -fi - -echo "$ac_t""$bash_cv_can_redecl_getpw" 1>&6 -if test $bash_cv_can_redecl_getpw = no; then -cat >> confdefs.h <<\EOF -#define HAVE_GETPW_DECLS 1 -EOF - -fi - - -echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6 -echo "configure:1835: checking whether or not strcoll and strcmp differ" >&5 -if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3650: checking whether or not strcoll and strcmp differ" >&5 +echo $ECHO_N "checking whether or not strcoll and strcmp differ... $ECHO_C" >&6 +if test "${bash_cv_func_strcoll_broken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then - echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2 + { echo "$as_me:3656: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 +echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} bash_cv_func_strcoll_broken=no else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3662 "configure" #include "confdefs.h" #include @@ -1879,37 +3697,189 @@ char *v[]; exit (r1 > 0 && r2 > 0); } -EOF -if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:3702: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3705: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:3707: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3710: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_func_strcoll_broken=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - bash_cv_func_strcoll_broken=no + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_func_strcoll_broken=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -rm -fr conftest* fi -fi - -echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6 +echo "$as_me:3723: result: $bash_cv_func_strcoll_broken" >&5 +echo "${ECHO_T}$bash_cv_func_strcoll_broken" >&6 if test $bash_cv_func_strcoll_broken = yes; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define STRCOLL_BROKEN 1 EOF fi - -echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6 -echo "configure:1908: checking whether signal handlers are of type void" >&5 -if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3732: checking whether getpw functions are declared in pwd.h" >&5 +echo $ECHO_N "checking whether getpw functions are declared in pwd.h... $ECHO_C" >&6 +if test "${bash_cv_getpw_declared+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3738 "configure" +#include "confdefs.h" + +#include +#ifdef HAVE_UNISTD_H +# include +#endif +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "getpwuid" >/dev/null 2>&1; then + bash_cv_getpw_declared=yes +else + bash_cv_getpw_declared=no +fi +rm -f conftest* + +fi + +echo "$as_me:3758: result: $bash_cv_getpw_declared" >&5 +echo "${ECHO_T}$bash_cv_getpw_declared" >&6 +if test $bash_cv_getpw_declared = yes; then +cat >>confdefs.h <<\EOF +#define HAVE_GETPW_DECLS 1 +EOF + +fi + +echo "$as_me:3767: checking POSIX termios" >&5 +echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6 +if test "${ac_cv_sys_posix_termios+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3773 "configure" +#include "confdefs.h" +#include +#include +#include +int +main () +{ +/* SunOS 4.0.3 has termios.h but not the library calls. */ + tcgetattr(0, 0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:3788: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:3791: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:3794: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3797: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_posix_termios=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_sys_posix_termios=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:3807: result: $ac_cv_sys_posix_termios" >&5 +echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6 + +if test $ac_cv_sys_posix_termios = yes; then + echo "$as_me:3811: checking whether termios.h defines TIOCGWINSZ" >&5 +echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6 +if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3817 "configure" +#include "confdefs.h" +#include +#include +#ifdef TIOCGWINSZ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + ac_cv_sys_tiocgwinsz_in_termios_h=yes +else + ac_cv_sys_tiocgwinsz_in_termios_h=no +fi +rm -f conftest* + +fi +echo "$as_me:3835: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 +echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6 + +fi +if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then + echo "$as_me:3840: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 +echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6 +if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3846 "configure" +#include "confdefs.h" +#include +#include +#ifdef TIOCGWINSZ + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes +else + ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no +fi +rm -f conftest* + +fi +echo "$as_me:3864: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 +echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6 + + if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then + +cat >>confdefs.h <<\EOF +#define GWINSZ_IN_SYS_IOCTL 1 +EOF + + fi +fi + +echo "$as_me:3876: checking whether signal handlers are of type void" >&5 +echo $ECHO_N "checking whether signal handlers are of type void... $ECHO_C" >&6 +if test "${bash_cv_void_sighandler+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 3882 "configure" #include "confdefs.h" #include #include @@ -1920,233 +3890,283 @@ else extern "C" #endif void (*signal ()) (); -int main() { +int +main () +{ int i; -; return 0; } -EOF -if { (eval echo configure:1928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3902: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3905: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3908: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3911: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_void_sighandler=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_void_sighandler=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_void_sighandler=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$bash_cv_void_sighandler" 1>&6 +echo "$as_me:3921: result: $bash_cv_void_sighandler" >&5 +echo "${ECHO_T}$bash_cv_void_sighandler" >&6 if test $bash_cv_void_sighandler = yes; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define VOID_SIGHANDLER 1 EOF fi -echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:1948: checking for TIOCGWINSZ in sys/ioctl.h" >&5 -if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3930: checking for TIOCSTAT in sys/ioctl.h" >&5 +echo $ECHO_N "checking for TIOCSTAT in sys/ioctl.h... $ECHO_C" >&6 +if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3936 "configure" #include "confdefs.h" #include #include -int main() { -int x = TIOCGWINSZ; -; return 0; } -EOF -if { (eval echo configure:1961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - bash_cv_tiocgwinsz_in_ioctl=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_tiocgwinsz_in_ioctl=no -fi -rm -f conftest* -fi - -echo "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6 -if test $bash_cv_tiocgwinsz_in_ioctl = yes; then -cat >> confdefs.h <<\EOF -#define GWINSZ_IN_SYS_IOCTL 1 -EOF - -fi - -echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:1982: checking for TIOCSTAT in sys/ioctl.h" >&5 -if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -int main() { +int +main () +{ int x = TIOCSTAT; -; return 0; } -EOF -if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3949: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3952: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3955: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3958: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_tiocstat_in_ioctl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_tiocstat_in_ioctl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_tiocstat_in_ioctl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6 -if test $bash_cv_tiocstat_in_ioctl = yes; then -cat >> confdefs.h <<\EOF +echo "$as_me:3969: result: $bash_cv_tiocstat_in_ioctl" >&5 +echo "${ECHO_T}$bash_cv_tiocstat_in_ioctl" >&6 +if test $bash_cv_tiocstat_in_ioctl = yes; then +cat >>confdefs.h <<\EOF #define TIOCSTAT_IN_SYS_IOCTL 1 EOF fi -echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6 -echo "configure:2016: checking for FIONREAD in sys/ioctl.h" >&5 -if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:3978: checking for FIONREAD in sys/ioctl.h" >&5 +echo $ECHO_N "checking for FIONREAD in sys/ioctl.h... $ECHO_C" >&6 +if test "${bash_cv_fionread_in_ioctl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 3984 "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ int x = FIONREAD; -; return 0; } -EOF -if { (eval echo configure:2029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:3997: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4000: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4003: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4006: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_fionread_in_ioctl=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_fionread_in_ioctl=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_fionread_in_ioctl=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6 -if test $bash_cv_fionread_in_ioctl = yes; then -cat >> confdefs.h <<\EOF +echo "$as_me:4017: result: $bash_cv_fionread_in_ioctl" >&5 +echo "${ECHO_T}$bash_cv_fionread_in_ioctl" >&6 +if test $bash_cv_fionread_in_ioctl = yes; then +cat >>confdefs.h <<\EOF #define FIONREAD_IN_SYS_IOCTL 1 EOF fi -echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:2050: checking for speed_t in sys/types.h" >&5 -if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4026: checking for speed_t in sys/types.h" >&5 +echo $ECHO_N "checking for speed_t in sys/types.h... $ECHO_C" >&6 +if test "${bash_cv_speed_t_in_sys_types+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4032 "configure" #include "confdefs.h" #include -int main() { +int +main () +{ speed_t x; -; return 0; } -EOF -if { (eval echo configure:2062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4044: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4047: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4050: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4053: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_speed_t_in_sys_types=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_speed_t_in_sys_types=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_speed_t_in_sys_types=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6 -if test $bash_cv_speed_t_in_sys_types = yes; then -cat >> confdefs.h <<\EOF +echo "$as_me:4064: result: $bash_cv_speed_t_in_sys_types" >&5 +echo "${ECHO_T}$bash_cv_speed_t_in_sys_types" >&6 +if test $bash_cv_speed_t_in_sys_types = yes; then +cat >>confdefs.h <<\EOF #define SPEED_T_IN_SYS_TYPES 1 EOF fi -echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6 -echo "configure:2083: checking for struct winsize in sys/ioctl.h and termios.h" >&5 -if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4073: checking for struct winsize in sys/ioctl.h and termios.h" >&5 +echo $ECHO_N "checking for struct winsize in sys/ioctl.h and termios.h... $ECHO_C" >&6 +if test "${bash_cv_struct_winsize_header+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4079 "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct winsize x; -; return 0; } -EOF -if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4092: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4095: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4098: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4101: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_struct_winsize_header=ioctl_h else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - cat > conftest.$ac_ext <&5 +cat conftest.$ac_ext >&5 +cat >conftest.$ac_ext <<_ACEOF +#line 4108 "configure" #include "confdefs.h" #include #include -int main() { +int +main () +{ struct winsize x; -; return 0; } -EOF -if { (eval echo configure:2112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4121: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4124: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4127: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4130: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_struct_winsize_header=termios_h else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_struct_winsize_header=other + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_struct_winsize_header=other fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi if test $bash_cv_struct_winsize_header = ioctl_h; then - echo "$ac_t""sys/ioctl.h" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:4145: result: sys/ioctl.h" >&5 +echo "${ECHO_T}sys/ioctl.h" >&6 + cat >>confdefs.h <<\EOF #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 EOF elif test $bash_cv_struct_winsize_header = termios_h; then - echo "$ac_t""termios.h" 1>&6 - cat >> confdefs.h <<\EOF + echo "$as_me:4152: result: termios.h" >&5 +echo "${ECHO_T}termios.h" >&6 + cat >>confdefs.h <<\EOF #define STRUCT_WINSIZE_IN_TERMIOS 1 EOF else - echo "$ac_t""not found" 1>&6 + echo "$as_me:4159: result: not found" >&5 +echo "${ECHO_T}not found" >&6 fi - -echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6 -echo "configure:2145: checking if struct dirent has a d_ino member" >&5 -if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4163: checking if struct dirent has a d_ino member" >&5 +echo $ECHO_N "checking if struct dirent has a d_ino member... $ECHO_C" >&6 +if test "${bash_cv_dirent_has_dino+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4169 "configure" #include "confdefs.h" #include @@ -2169,40 +4189,53 @@ else # endif #endif /* HAVE_DIRENT_H */ -int main() { +int +main () +{ struct dirent d; int z; z = d.d_ino; -; return 0; } -EOF -if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4203: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4206: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4209: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4212: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_dirent_has_dino=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_dirent_has_dino=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_dirent_has_dino=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6 +echo "$as_me:4223: result: $bash_cv_dirent_has_dino" >&5 +echo "${ECHO_T}$bash_cv_dirent_has_dino" >&6 if test $bash_cv_dirent_has_dino = yes; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define STRUCT_DIRENT_HAS_D_INO 1 EOF fi - -echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6 -echo "configure:2201: checking if struct dirent has a d_fileno member" >&5 -if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +echo "$as_me:4232: checking if struct dirent has a d_fileno member" >&5 +echo $ECHO_N "checking if struct dirent has a d_fileno member... $ECHO_C" >&6 +if test "${bash_cv_dirent_has_d_fileno+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4238 "configure" #include "confdefs.h" #include @@ -2225,33 +4258,46 @@ else # endif #endif /* HAVE_DIRENT_H */ -int main() { +int +main () +{ struct dirent d; int z; z = d.d_fileno; -; return 0; } -EOF -if { (eval echo configure:2235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:4272: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:4275: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:4278: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4281: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then bash_cv_dirent_has_d_fileno=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - bash_cv_dirent_has_d_fileno=no + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_dirent_has_d_fileno=no fi -rm -f conftest* +rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6 +echo "$as_me:4292: result: $bash_cv_dirent_has_d_fileno" >&5 +echo "${ECHO_T}$bash_cv_dirent_has_d_fileno" >&6 if test $bash_cv_dirent_has_d_fileno = yes; then -cat >> confdefs.h <<\EOF +cat >>confdefs.h <<\EOF #define STRUCT_DIRENT_HAS_D_FILENO 1 EOF fi - case "$host_os" in aix*) prefer_curses=yes ;; esac @@ -2259,128 +4305,224 @@ esac if test "X$bash_cv_termcap_lib" = "X"; then _bash_needmsg=yes else -echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 -echo "configure:2264: checking which library has the termcap functions" >&5 +echo "$as_me:4308: checking which library has the termcap functions" >&5 +echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 _bash_needmsg= fi -if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 +if test "${bash_cv_termcap_lib+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:2271: checking for tgetent in -ltermcap" >&5 -ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4315: checking for tgetent in -ltermcap" >&5 +echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6 +if test "${ac_cv_lib_termcap_tgetent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4323 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char tgetent(); - -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char tgetent (); +int +main () +{ +tgetent (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4342: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4345: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4348: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4351: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_termcap_tgetent=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_termcap_tgetent=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$as_me:4362: result: $ac_cv_lib_termcap_tgetent" >&5 +echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6 +if test $ac_cv_lib_termcap_tgetent = yes; then bash_cv_termcap_lib=libtermcap else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:2309: checking for tgetent in -lcurses" >&5 -ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4367: checking for tgetent in -ltinfo" >&5 +echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6 +if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" -LIBS="-lcurses $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4375 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char tgetent(); - -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:2328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char tgetent (); +int +main () +{ +tgetent (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4394: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4397: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4400: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4403: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_tinfo_tgetent=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_tinfo_tgetent=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4414: result: $ac_cv_lib_tinfo_tgetent" >&5 +echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6 +if test $ac_cv_lib_tinfo_tgetent = yes; then + bash_cv_termcap_lib=libtinfo +else + echo "$as_me:4419: checking for tgetent in -lcurses" >&5 +echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6 +if test "${ac_cv_lib_curses_tgetent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcurses $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line 4427 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgetent (); +int +main () +{ +tgetent (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4446: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4449: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4452: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4455: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_curses_tgetent=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_curses_tgetent=no fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:4466: result: $ac_cv_lib_curses_tgetent" >&5 +echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6 +if test $ac_cv_lib_curses_tgetent = yes; then bash_cv_termcap_lib=libcurses else - echo "$ac_t""no" 1>&6 -echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:2347: checking for tgetent in -lncurses" >&5 -ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 + echo "$as_me:4471: checking for tgetent in -lncurses" >&5 +echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6 +if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_save_LIBS="$LIBS" + ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" -cat > conftest.$ac_ext <conftest.$ac_ext <<_ACEOF +#line 4479 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char tgetent(); - -int main() { -tgetent() -; return 0; } -EOF -if { (eval echo configure:2366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" + builtin and then its argument prototype would still apply. */ +char tgetent (); +int +main () +{ +tgetent (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4498: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4501: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4504: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4507: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ncurses_tgetent=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_ncurses_tgetent=no fi -rm -f conftest* -LIBS="$ac_save_LIBS" - +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 +echo "$as_me:4518: result: $ac_cv_lib_ncurses_tgetent" >&5 +echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6 +if test $ac_cv_lib_ncurses_tgetent = yes; then bash_cv_termcap_lib=libncurses else - echo "$ac_t""no" 1>&6 -bash_cv_termcap_lib=gnutermcap + bash_cv_termcap_lib=gnutermcap +fi + fi fi @@ -2390,10 +4532,11 @@ fi fi if test "X$_bash_needmsg" = "Xyes"; then -echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 -echo "configure:2395: checking which library has the termcap functions" >&5 +echo "$as_me:4535: checking which library has the termcap functions" >&5 +echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 fi -echo "$ac_t""using $bash_cv_termcap_lib" 1>&6 +echo "$as_me:4538: result: using $bash_cv_termcap_lib" >&5 +echo "${ECHO_T}using $bash_cv_termcap_lib" >&6 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then LDFLAGS="$LDFLAGS -L./lib/termcap" TERMCAP_LIB="./lib/termcap/libtermcap.a" @@ -2401,6 +4544,9 @@ TERMCAP_DEP="./lib/termcap/libtermcap.a" elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then TERMCAP_LIB=-ltermcap TERMCAP_DEP= +elif test $bash_cv_termcap_lib = libtinfo; then +TERMCAP_LIB=-ltinfo +TERMCAP_DEP= elif test $bash_cv_termcap_lib = libncurses; then TERMCAP_LIB=-lncurses TERMCAP_DEP= @@ -2410,11 +4556,388 @@ TERMCAP_DEP= fi if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then - TERMCAP_LIB=-ltermcap #default + if test "$prefer_curses" = yes; then + TERMCAP_LIB=-lcurses + else + TERMCAP_LIB=-ltermcap #default + fi +fi + +for ac_header in wctype.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:4569: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4575 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:4579: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:4585: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:4604: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4623 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:4627: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:4633: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:4652: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4671 "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:4675: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:4681: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_ext +fi +echo "$as_me:4700: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 +echo $ECHO_N "checking for mbsrtowcs... $ECHO_C" >&6 +if test "${ac_cv_func_mbsrtowcs+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4716 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char mbsrtowcs (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char mbsrtowcs (); +char (*f) (); + +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs) +choke me +#else +f = mbsrtowcs; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4747: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4750: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4753: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4756: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_mbsrtowcs=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_mbsrtowcs=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:4766: result: $ac_cv_func_mbsrtowcs" >&5 +echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6 +if test $ac_cv_func_mbsrtowcs = yes; then + cat >>confdefs.h <<\EOF +#define HAVE_MBSRTOWCS 1 +EOF + +fi + +echo "$as_me:4775: checking for wcwidth" >&5 +echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6 +if test "${ac_cv_func_wcwidth+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4781 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char wcwidth (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char wcwidth (); +char (*f) (); + +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_wcwidth) || defined (__stub___wcwidth) +choke me +#else +f = wcwidth; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4812: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4815: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4818: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4821: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_wcwidth=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_wcwidth=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:4831: result: $ac_cv_func_wcwidth" >&5 +echo "${ECHO_T}$ac_cv_func_wcwidth" >&6 +if test $ac_cv_func_wcwidth = yes; then + cat >>confdefs.h <<\EOF +#define HAVE_WCWIDTH 1 +EOF + +fi + +echo "$as_me:4840: checking for mbstate_t" >&5 +echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6 +if test "${bash_cv_have_mbstate_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:4846: error: cannot run test program while cross compiling" >&5 +echo "$as_me: error: cannot run test program while cross compiling" >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +#line 4851 "configure" +#include "confdefs.h" + +#include +int +main () +{ + mbstate_t ps; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:4863: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4866: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:4868: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4871: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + bash_cv_have_mbstate_t=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_have_mbstate_t=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:4883: result: $bash_cv_have_mbstate_t" >&5 +echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6 +if test $bash_cv_have_mbstate_t = yes; then + cat >>confdefs.h <<\EOF +#define HAVE_MBSTATE_T 1 +EOF + +fi + +echo "$as_me:4892: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 +if test "${bash_cv_langinfo_codeset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line 4898 "configure" +#include "confdefs.h" +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:4910: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:4913: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:4916: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:4919: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + bash_cv_langinfo_codeset=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +bash_cv_langinfo_codeset=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:4929: result: $bash_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6 +if test $bash_cv_langinfo_codeset = yes; then + cat >>confdefs.h <<\EOF +#define HAVE_LANGINFO_CODESET 1 +EOF + fi case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; +*s390*) LOCAL_CFLAGS=-fsigned-char ;; esac case "$host_os" in @@ -2427,423 +4950,916 @@ esac # ${srcdir}/support/shobj-conf # if test -f ${srcdir}/support/shobj-conf; then - echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6 -echo "configure:2432: checking configuration for building shared libraries" >&5 - eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}` - - - - - - - - - - - - - echo "$ac_t""$SHLIB_STATUS" 1>&6 + echo "$as_me:4953: checking configuration for building shared libraries" >&5 +echo $ECHO_N "checking configuration for building shared libraries... $ECHO_C" >&6 + eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` + + echo "$as_me:4957: result: $SHLIB_STATUS" >&5 +echo "${ECHO_T}$SHLIB_STATUS" >&6 + + # SHLIB_STATUS is either `supported' or `unsupported'. If it's + # `unsupported', turn off any default shared library building + if test "$SHLIB_STATUS" = 'unsupported'; then + opt_shared_libs=no + fi + + # shared library versioning + # quoted for m4 so I can use character classes + SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'` + SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'` + fi -BUILD_DIR=`pwd` +if test "$opt_static_libs" = "yes"; then + STATIC_TARGET=static + STATIC_INSTALL_TARGET=install-static +fi +if test "$opt_shared_libs" = "yes"; then + SHARED_TARGET=shared + SHARED_INSTALL_TARGET=install-shared +fi +case "$host_os" in +msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file +*) BUILD_DIR=`pwd` ;; +esac - - - - - - - - - - - - - - - -trap '' 1 2 15 -cat > confcache <<\EOF +ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile" +ac_config_commands="$ac_config_commands default" +cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. # -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. # -EOF +# `ac_cv_env_foo' variables (set or unset) will be overriden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' fi -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H -# Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL # Generated automatically by configure. # Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# # Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. +# configure, is in config.log if it exists. -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +ac_cs_invocation="\$0 \$@" -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" +_ACEOF -trap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile shlib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@AR@%$AR%g -s%@RANLIB@%$RANLIB%g -s%@MAKE_SHELL@%$MAKE_SHELL%g -s%@SHOBJ_CC@%$SHOBJ_CC%g -s%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g -s%@SHOBJ_LD@%$SHOBJ_LD%g -s%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g -s%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g -s%@SHOBJ_LIBS@%$SHOBJ_LIBS%g -s%@SHOBJ_STATUS@%$SHOBJ_STATUS%g -s%@SHLIB_STATUS@%$SHLIB_STATUS%g -s%@SHLIB_XLDFLAGS@%$SHLIB_XLDFLAGS%g -s%@SHLIB_LIBSUFF@%$SHLIB_LIBSUFF%g -s%@SHLIB_LIBVERSION@%$SHLIB_LIBVERSION%g -s%@SHLIB_LIBS@%$SHLIB_LIBS%g -s%@BUILD_DIR@%$BUILD_DIR%g -s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g -s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g -s%@LOCAL_DEFS@%$LOCAL_DEFS%g -s%@ARFLAGS@%$ARFLAGS%g -s%@LIBVERSION@%$LIBVERSION%g -s%@TERMCAP_LIB@%$TERMCAP_LIB%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat +cat >>$CONFIG_STATUS <<\_ACEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi + +# Name of the executable. +as_me=`echo "$0" |sed 's,.*[\\/],,'` + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +# NLS nuisances. +$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } +$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } +$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } +$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } +$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } +$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } +$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } +$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + +exec 6>&1 + +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\EOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." EOF -cat >> $CONFIG_STATUS <>$CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + +cat >>$CONFIG_STATUS <<\EOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; esac - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + case $1 in + # Handling of the options. +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:5244: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + # This is an error. + -*) { { echo "$as_me:5263: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +exec 5>>config.log +cat >&5 << _ACEOF + +## ----------------------- ## +## Running config.status. ## +## ----------------------- ## + +This file was extended by $as_me (readline 4.3) 2.52, executed with + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + > $ac_cs_invocation +on `(hostname || uname -n) 2>/dev/null | sed 1q` + +_ACEOF +EOF + +cat >>$CONFIG_STATUS <<\EOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; + "shlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES shlib/Makefile" ;; + "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:5304: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + +EOF + +cat >>$CONFIG_STATUS <\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@DEFS@,$DEFS,;t t +s,@LIBS@,$LIBS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CPP@,$CPP,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@AR@,$AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@MAKE_SHELL@,$MAKE_SHELL,;t t +s,@SHOBJ_CC@,$SHOBJ_CC,;t t +s,@SHOBJ_CFLAGS@,$SHOBJ_CFLAGS,;t t +s,@SHOBJ_LD@,$SHOBJ_LD,;t t +s,@SHOBJ_LDFLAGS@,$SHOBJ_LDFLAGS,;t t +s,@SHOBJ_XLDFLAGS@,$SHOBJ_XLDFLAGS,;t t +s,@SHOBJ_LIBS@,$SHOBJ_LIBS,;t t +s,@SHOBJ_STATUS@,$SHOBJ_STATUS,;t t +s,@SHLIB_STATUS@,$SHLIB_STATUS,;t t +s,@SHLIB_XLDFLAGS@,$SHLIB_XLDFLAGS,;t t +s,@SHLIB_LIBSUFF@,$SHLIB_LIBSUFF,;t t +s,@SHLIB_LIBVERSION@,$SHLIB_LIBVERSION,;t t +s,@SHLIB_LIBS@,$SHLIB_LIBS,;t t +s,@SHLIB_MAJOR@,$SHLIB_MAJOR,;t t +s,@SHLIB_MINOR@,$SHLIB_MINOR,;t t +s,@STATIC_TARGET@,$STATIC_TARGET,;t t +s,@SHARED_TARGET@,$SHARED_TARGET,;t t +s,@STATIC_INSTALL_TARGET@,$STATIC_INSTALL_TARGET,;t t +s,@SHARED_INSTALL_TARGET@,$SHARED_INSTALL_TARGET,;t t +s,@BUILD_DIR@,$BUILD_DIR,;t t +s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t +s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t +s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t +s,@ARFLAGS@,$ARFLAGS,;t t +s,@LIBVERSION@,$LIBVERSION,;t t +s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t +CEOF + +EOF + + cat >>$CONFIG_STATUS <<\EOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +EOF +cat >>$CONFIG_STATUS <<\EOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + + ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else ac_dir_suffix= ac_dots= fi - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + case $srcdir in + .) ac_srcdir=. + if test -z "$ac_dots"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; + ac_srcdir=$ac_dots$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_dots$srcdir ;; esac - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_dots$INSTALL ;; esac - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac + if test x"$ac_file" != x-; then + { echo "$as_me:5549: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + configure_input="Generated automatically from `echo $ac_file_in | + sed 's,.*/,,'` by configure." - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:5567: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:5580: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +EOF +cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +EOF +cat >>$CONFIG_STATUS <<\EOF + +# +# CONFIG_HEADER section. +# # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' +ac_uD=',;t' -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; esac - echo creating $ac_file + test x"$ac_file" != x- && { echo "$as_me:5641: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:5652: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:5665: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in EOF -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\EOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +cat >>conftest.undefs <<\EOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, EOF -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS rm -f conftest.tail -while : +while grep . conftest.defines >/dev/null do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines done -rm -f conftest.vals +rm -f conftest.defines +echo ' fi # egrep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\EOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated automatically by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated automatically by configure. */" >$tmp/config.h else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file + echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h fi -fi; done + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:5782: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || mkdir "$as_incr_dir" + ;; + esac +done; } + fi + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done EOF -cat >> $CONFIG_STATUS <>$CONFIG_STATUS <<\EOF -EOF -cat >> $CONFIG_STATUS <<\EOF +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + case $ac_dest in + default ) # Makefile uses this timestamp file to record whether config.h is up to date. echo > stamp-h + ;; + esac +done +EOF -exit 0 +cat >>$CONFIG_STATUS <<\EOF + +{ (exit 0); exit 0; } EOF chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 +ac_clean_files=$ac_clean_files_save + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi diff --git a/readline/configure.in b/readline/configure.in index 240a3addc45..bc78f8a0f60 100644 --- a/readline/configure.in +++ b/readline/configure.in @@ -4,34 +4,49 @@ dnl dnl report bugs to chet@po.cwru.edu dnl dnl Process this file with autoconf to produce a configure script. -AC_REVISION([for Readline 4.0, version 2.14, from autoconf version] AC_ACVERSION) -LIBVERSION=4.0 +AC_REVISION([for Readline 4.3, version 2.45, from autoconf version] AC_ACVERSION) -AC_INIT(readline.h) -AC_CONFIG_HEADER(config.h) +AC_INIT(readline, 4.3, bug-readline@gnu.org) dnl make sure we are using a recent autoconf version -AC_PREREQ(2.10) +AC_PREREQ(2.50) +AC_CONFIG_SRCDIR(readline.h) AC_CONFIG_AUX_DIR(./support) +AC_CONFIG_HEADERS(config.h) + +dnl update the value of RL_READLINE_VERSION in readline.h when this changes +LIBVERSION=4.3 AC_CANONICAL_HOST dnl configure defaults opt_curses=no -opt_shared=no dnl arguments to configure -AC_ARG_WITH(curses, --with-curses use the curses library instead of the termcap library,opt_curses=$withval) +AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) if test "$opt_curses" = "yes"; then prefer_curses=yes fi +dnl option parsing for optional features +opt_static_libs=yes +opt_shared_libs=yes + +AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build shared libraries [[default=YES]]]), opt_shared_libs=$enableval) +AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [build static libraries [[default=YES]]]), opt_static_libs=$enableval) + +echo "" +echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}" +echo "" + # We want these before the checks, so the checks can modify their values. test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 +AC_PROG_MAKE_SET AC_PROG_CC +dnl AC_AIX AC_MINIX # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. @@ -39,7 +54,7 @@ test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL -AC_CHECK_PROG(AR, ar, ar) +AC_CHECK_PROG(AR, ar, , ar) dnl Set default for ARFLAGS, since autoconf does not have a macro for it. dnl This allows people to set it when running configure or make test -n "$ARFLAGS" || ARFLAGS="cr" @@ -48,32 +63,42 @@ AC_PROG_RANLIB MAKE_SHELL=/bin/sh AC_SUBST(MAKE_SHELL) -AC_RETSIGTYPE +AC_C_CONST +AC_C_PROTOTYPES +AC_C_CHAR_UNSIGNED + +AC_TYPE_SIGNAL + +AC_TYPE_SIZE_T +AC_CHECK_TYPE(ssize_t, int) AC_HEADER_STAT AC_HEADER_DIRENT -AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat) +AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \ + strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit) AC_FUNC_STRCOLL -AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \ - sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ - termcap.h termios.h termio.h sys/file.h locale.h) +AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \ + limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ + termcap.h termios.h termio.h sys/file.h locale.h memory.h ) -BASH_SIGNAL_CHECK -BASH_REINSTALL_SIGHANDLERS +BASH_SYS_SIGNAL_VINTAGE +BASH_SYS_REINSTALL_SIGHANDLERS BASH_FUNC_POSIX_SETJMP BASH_FUNC_LSTAT -BASH_CHECK_GETPW_FUNCS BASH_FUNC_STRCOLL +BASH_CHECK_GETPW_FUNCS + +AC_HEADER_TIOCGWINSZ + BASH_TYPE_SIGHANDLER -BASH_HAVE_TIOCGWINSZ BASH_HAVE_TIOCSTAT BASH_HAVE_FIONREAD -BASH_MISC_SPEED_T +BASH_CHECK_SPEED_T BASH_STRUCT_WINSIZE BASH_STRUCT_DIRENT_D_INO BASH_STRUCT_DIRENT_D_FILENO @@ -84,11 +109,18 @@ aix*) prefer_curses=yes ;; esac BASH_CHECK_LIB_TERMCAP if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then - TERMCAP_LIB=-ltermcap #default + if test "$prefer_curses" = yes; then + TERMCAP_LIB=-lcurses + else + TERMCAP_LIB=-ltermcap #default + fi fi +BASH_CHECK_MULTIBYTE + case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; +*s390*) LOCAL_CFLAGS=-fsigned-char ;; esac case "$host_os" in @@ -102,7 +134,7 @@ esac # if test -f ${srcdir}/support/shobj-conf; then AC_MSG_CHECKING(configuration for building shared libraries) - eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C ${CC} -c ${host_cpu} -o ${host_os} -v ${host_vendor}` + eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` AC_SUBST(SHOBJ_CC) AC_SUBST(SHOBJ_CFLAGS) AC_SUBST(SHOBJ_LD) @@ -116,9 +148,40 @@ if test -f ${srcdir}/support/shobj-conf; then AC_SUBST(SHLIB_LIBVERSION) AC_SUBST(SHLIB_LIBS) AC_MSG_RESULT($SHLIB_STATUS) + + # SHLIB_STATUS is either `supported' or `unsupported'. If it's + # `unsupported', turn off any default shared library building + if test "$SHLIB_STATUS" = 'unsupported'; then + opt_shared_libs=no + fi + + # shared library versioning + # quoted for m4 so I can use character classes + SHLIB_MAJOR=[`expr "$LIBVERSION" : '\([0-9]\)\..*'`] + SHLIB_MINOR=[`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'`] + AC_SUBST(SHLIB_MAJOR) + AC_SUBST(SHLIB_MINOR) fi -BUILD_DIR=`pwd` +if test "$opt_static_libs" = "yes"; then + STATIC_TARGET=static + STATIC_INSTALL_TARGET=install-static +fi +if test "$opt_shared_libs" = "yes"; then + SHARED_TARGET=shared + SHARED_INSTALL_TARGET=install-shared +fi + +AC_SUBST(STATIC_TARGET) +AC_SUBST(SHARED_TARGET) +AC_SUBST(STATIC_INSTALL_TARGET) +AC_SUBST(SHARED_INSTALL_TARGET) + +case "$host_os" in +msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file +*) BUILD_DIR=`pwd` ;; +esac + AC_SUBST(BUILD_DIR) AC_SUBST(CFLAGS) diff --git a/readline/display.c b/readline/display.c index df9e212ac0c..180061b29ae 100644 --- a/readline/display.c +++ b/readline/display.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -41,13 +41,9 @@ #include -#if defined (__GO32__) -# include -# include -#endif /* __GO32__ */ - /* System-specific feature definitions and include files. */ #include "rldefs.h" +#include "rlmbutil.h" /* Termcap library stuff. */ #include "tcap.h" @@ -56,48 +52,32 @@ #include "readline.h" #include "history.h" +#include "rlprivate.h" +#include "xmalloc.h" + #if !defined (strchr) && !defined (__STDC__) extern char *strchr (), *strrchr (); #endif /* !strchr && !__STDC__ */ -/* Global and pseudo-global variables and functions - imported from readline.c. */ -extern char *rl_prompt; -extern int readline_echoing_p; - -extern int _rl_output_meta_chars; -extern int _rl_horizontal_scroll_mode; -extern int _rl_mark_modified_lines; -extern int _rl_prefer_visible_bell; - -/* Variables and functions imported from terminal.c */ -extern void _rl_output_some_chars (); -#ifdef _MINIX -extern void _rl_output_character_function (); -#else -extern int _rl_output_character_function (); +#if defined (HACK_TERMCAP_MOTION) +extern char *_rl_term_forward_char; #endif -extern int _rl_backspace (); -extern const char *term_clreol, *term_clrpag; -extern const char *term_im, *term_ic, *term_ei, *term_DC; -extern const char *term_up, *term_dc, *term_cr, *term_IC; -extern int screenheight, screenwidth, screenchars; -extern int terminal_can_insert, _rl_term_autowrap; +static void update_line PARAMS((char *, char *, int, int, int, int)); +static void space_to_eol PARAMS((int)); +static void delete_chars PARAMS((int)); +static void insert_some_chars PARAMS((char *, int, int)); +static void cr PARAMS((void)); -/* Pseudo-global functions (local to the readline library) exported - by this file. */ -void _rl_move_cursor_relative (), _rl_output_some_chars (); -void _rl_move_vert (); -void _rl_clear_to_eol (), _rl_clear_screen (); - -static void update_line (), space_to_eol (); -static void delete_chars (), insert_some_chars (); -static void cr (); +#if defined (HANDLE_MULTIBYTE) +static int _rl_col_width PARAMS((char *, int, int)); +static int *_rl_wrapped_line; +#else +# define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s)) +#endif static int *inv_lbreaks, *vis_lbreaks; - -extern char *xmalloc (), *xrealloc (); +static int inv_lbsize, vis_lbsize; /* Heuristic used to decide whether it is faster to move from CUR to NEW by backing up or outputting a carriage return and moving forward. */ @@ -131,7 +111,7 @@ extern char *xmalloc (), *xrealloc (); RL_DISPLAY_FIXED variable. This is good for efficiency. */ /* Application-specific redisplay function. */ -VFunction *rl_redisplay_function = rl_redisplay; +rl_voidfunc_t *rl_redisplay_function = rl_redisplay; /* Global variables declared here. */ /* What YOU turn on when you have handled all redisplay yourself. */ @@ -141,7 +121,7 @@ int _rl_suppress_redisplay = 0; /* The stuff that gets printed out before the actual text of the line. This is usually pointing to rl_prompt. */ -const char *rl_display_prompt = (char *)NULL; +char *rl_display_prompt = (char *)NULL; /* Pseudo-global variables declared here. */ /* The visible cursor position. If you print some text, adjust this. */ @@ -170,27 +150,40 @@ static int forced_display; /* Default and initial buffer size. Can grow. */ static int line_size = 1024; +/* Variables to keep track of the expanded prompt string, which may + include invisible characters. */ + static char *local_prompt, *local_prompt_prefix; -static int visible_length, prefix_length; +static int prompt_visible_length, prompt_prefix_length; /* The number of invisible characters in the line currently being displayed on the screen. */ static int visible_wrap_offset; -/* static so it can be shared between rl_redisplay and update_line */ +/* The number of invisible characters in the prompt string. Static so it + can be shared between rl_redisplay and update_line */ static int wrap_offset; -/* The index of the last invisible_character in the prompt string. */ -static int last_invisible; +/* The index of the last invisible character in the prompt string. */ +static int prompt_last_invisible; /* The length (buffer offset) of the first line of the last (possibly multi-line) buffer displayed on the screen. */ static int visible_first_line_len; +/* Number of invisible characters on the first physical line of the prompt. + Only valid when the number of physical characters in the prompt exceeds + (or is equal to) _rl_screenwidth. */ +static int prompt_invis_chars_first_line; + +static int prompt_last_screen_line; + /* Expand the prompt string S and return the number of visible characters in *LP, if LP is not null. This is currently more-or-less a placeholder for expansion. LIP, if non-null is a place to store the - index of the last invisible character in ther eturned string. */ + index of the last invisible character in the returned string. NIFLP, + if non-zero, is a place to store the number of invisible characters in + the first prompt line. */ /* Current implementation: \001 (^A) start non-visible characters @@ -200,12 +193,12 @@ static int visible_first_line_len; \002 are assumed to be `visible'. */ static char * -expand_prompt (pmt, lp, lip) +expand_prompt (pmt, lp, lip, niflp) char *pmt; - int *lp, *lip; + int *lp, *lip, *niflp; { char *r, *ret, *p; - int l, rl, last, ignoring; + int l, rl, last, ignoring, ninvis, invfl; /* Short-circuit if we can. */ if (strchr (pmt, RL_PROMPT_START_IGNORE) == 0) @@ -217,9 +210,11 @@ expand_prompt (pmt, lp, lip) } l = strlen (pmt); - r = ret = xmalloc (l + 1); + r = ret = (char *)xmalloc (l + 1); - for (rl = ignoring = last = 0, p = pmt; p && *p; p++) + invfl = 0; /* invisible chars in first line of prompt */ + + for (rl = ignoring = last = ninvis = 0, p = pmt; p && *p; p++) { /* This code strips the invisible character string markers RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */ @@ -239,14 +234,35 @@ expand_prompt (pmt, lp, lip) *r++ = *p; if (!ignoring) rl++; + else + ninvis++; + if (rl == _rl_screenwidth) + invfl = ninvis; } } + if (rl < _rl_screenwidth) + invfl = ninvis; + *r = '\0'; if (lp) *lp = rl; if (lip) *lip = last; + if (niflp) + *niflp = invfl; + return ret; +} + +/* Just strip out RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE from + PMT and return the rest of PMT. */ +char * +_rl_strip_prompt (pmt) + char *pmt; +{ + char *ret; + + ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL); return ret; } @@ -258,8 +274,8 @@ expand_prompt (pmt, lp, lip) * (portion after the final newline) * local_prompt_prefix = portion before last newline of rl_display_prompt, * expanded via expand_prompt - * visible_length = number of visible characters in local_prompt - * prefix_length = number of visible characters in local_prompt_prefix + * prompt_visible_length = number of visible characters in local_prompt + * prompt_prefix_length = number of visible characters in local_prompt_prefix * * This function is called once per call to readline(). It may also be * called arbitrarily to expand the primary prompt. @@ -275,12 +291,11 @@ rl_expand_prompt (prompt) int c; /* Clear out any saved values. */ - if (local_prompt) - free (local_prompt); - if (local_prompt_prefix) - free (local_prompt_prefix); + FREE (local_prompt); + FREE (local_prompt_prefix); + local_prompt = local_prompt_prefix = (char *)0; - last_invisible = visible_length = 0; + prompt_last_invisible = prompt_visible_length = 0; if (prompt == 0 || *prompt == 0) return (0); @@ -288,25 +303,77 @@ rl_expand_prompt (prompt) p = strrchr (prompt, '\n'); if (!p) { - /* The prompt is only one line. */ - local_prompt = expand_prompt (prompt, &visible_length, &last_invisible); + /* The prompt is only one logical line, though it might wrap. */ + local_prompt = expand_prompt (prompt, &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line); local_prompt_prefix = (char *)0; - return (visible_length); + return (prompt_visible_length); } else { /* The prompt spans multiple lines. */ t = ++p; - local_prompt = expand_prompt (p, &visible_length, &last_invisible); + local_prompt = expand_prompt (p, &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line); c = *t; *t = '\0'; /* The portion of the prompt string up to and including the final newline is now null-terminated. */ - local_prompt_prefix = expand_prompt (prompt, &prefix_length, (int *)NULL); + local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, + (int *)NULL, + &prompt_invis_chars_first_line); *t = c; - return (prefix_length); + return (prompt_prefix_length); } } +/* Initialize the VISIBLE_LINE and INVISIBLE_LINE arrays, and their associated + arrays of line break markers. MINSIZE is the minimum size of VISIBLE_LINE + and INVISIBLE_LINE; if it is greater than LINE_SIZE, LINE_SIZE is + increased. If the lines have already been allocated, this ensures that + they can hold at least MINSIZE characters. */ +static void +init_line_structures (minsize) + int minsize; +{ + register int n; + + if (invisible_line == 0) /* initialize it */ + { + if (line_size < minsize) + line_size = minsize; + visible_line = (char *)xmalloc (line_size); + invisible_line = (char *)xmalloc (line_size); + } + else if (line_size < minsize) /* ensure it can hold MINSIZE chars */ + { + line_size *= 2; + if (line_size < minsize) + line_size = minsize; + visible_line = (char *)xrealloc (visible_line, line_size); + invisible_line = (char *)xrealloc (invisible_line, line_size); + } + + for (n = minsize; n < line_size; n++) + { + visible_line[n] = 0; + invisible_line[n] = 1; + } + + if (vis_lbreaks == 0) + { + /* should be enough. */ + inv_lbsize = vis_lbsize = 256; + inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int)); + vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int)); +#if defined (HANDLE_MULTIBYTE) + _rl_wrapped_line = (int *)xmalloc (vis_lbsize * sizeof (int)); +#endif + inv_lbreaks[0] = vis_lbreaks[0] = 0; + } +} + /* Basic redisplay algorithm. */ void rl_redisplay () @@ -315,29 +382,24 @@ rl_redisplay () register char *line; int c_pos, inv_botlin, lb_botlin, lb_linenum; int newlines, lpos, temp; - const char *prompt_this_line; + char *prompt_this_line; +#if defined (HANDLE_MULTIBYTE) + wchar_t wc; + size_t wc_bytes; + int wc_width; + mbstate_t ps; + int _rl_wrapped_multicolumn = 0; +#endif if (!readline_echoing_p) return; if (!rl_display_prompt) - rl_display_prompt = ""; + rl_display_prompt = (char*)""; if (invisible_line == 0) { - visible_line = xmalloc (line_size); - invisible_line = xmalloc (line_size); - for (in = 0; in < line_size; in++) - { - visible_line[in] = 0; - invisible_line[in] = 1; - } - - /* should be enough, but then again, this is just for testing. */ - inv_lbreaks = (int *)malloc (256 * sizeof (int)); - vis_lbreaks = (int *)malloc (256 * sizeof (int)); - inv_lbreaks[0] = vis_lbreaks[0] = 0; - + init_line_structures (0); rl_on_new_line (); } @@ -377,14 +439,14 @@ rl_redisplay () if (temp >= line_size) { line_size = (temp + 1024) - (temp % 1024); - visible_line = xrealloc (visible_line, line_size); - line = invisible_line = xrealloc (invisible_line, line_size); + visible_line = (char *)xrealloc (visible_line, line_size); + line = invisible_line = (char *)xrealloc (invisible_line, line_size); } strncpy (line + out, local_prompt, local_len); out += local_len; } line[out] = '\0'; - wrap_offset = local_len - visible_length; + wrap_offset = local_len - prompt_visible_length; } else { @@ -395,12 +457,13 @@ rl_redisplay () else { prompt_this_line++; + pmtlen = prompt_this_line - rl_display_prompt; /* temp var */ if (forced_display) { - _rl_output_some_chars (rl_display_prompt, prompt_this_line - rl_display_prompt); + _rl_output_some_chars (rl_display_prompt, pmtlen); /* Make sure we are at column zero even after a newline, regardless of the state of terminal output processing. */ - if (prompt_this_line[-2] != '\r') + if (pmtlen < 2 || prompt_this_line[-2] != '\r') cr (); } } @@ -410,55 +473,143 @@ rl_redisplay () if (temp >= line_size) { line_size = (temp + 1024) - (temp % 1024); - visible_line = xrealloc (visible_line, line_size); - line = invisible_line = xrealloc (invisible_line, line_size); + visible_line = (char *)xrealloc (visible_line, line_size); + line = invisible_line = (char *)xrealloc (invisible_line, line_size); } strncpy (line + out, prompt_this_line, pmtlen); out += pmtlen; line[out] = '\0'; - wrap_offset = 0; + wrap_offset = prompt_invis_chars_first_line = 0; } +#define CHECK_INV_LBREAKS() \ + do { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + } \ + } while (0) + +#if defined (HANDLE_MULTIBYTE) #define CHECK_LPOS() \ do { \ lpos++; \ - if (lpos >= screenwidth) \ + if (lpos >= _rl_screenwidth) \ { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \ + } \ + inv_lbreaks[++newlines] = out; \ + _rl_wrapped_line[newlines] = _rl_wrapped_multicolumn; \ + lpos = 0; \ + } \ + } while (0) +#else +#define CHECK_LPOS() \ + do { \ + lpos++; \ + if (lpos >= _rl_screenwidth) \ + { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ + } \ inv_lbreaks[++newlines] = out; \ lpos = 0; \ } \ } while (0) +#endif /* inv_lbreaks[i] is where line i starts in the buffer. */ inv_lbreaks[newlines = 0] = 0; lpos = out - wrap_offset; - - /* XXX - what if lpos is already >= screenwidth before we start drawing the - contents of the command line? */ - while (lpos >= screenwidth) - { -#if 0 - temp = ((newlines + 1) * screenwidth) - ((newlines == 0) ? wrap_offset : 0); -#else - /* XXX - possible fix from Darin Johnson for prompt - string with invisible characters that is longer than the screen - width. */ - temp = ((newlines + 1) * screenwidth) + ((newlines == 0) ? wrap_offset : 0); +#if defined (HANDLE_MULTIBYTE) + memset (_rl_wrapped_line, 0, vis_lbsize); #endif + + /* prompt_invis_chars_first_line is the number of invisible characters in + the first physical line of the prompt. + wrap_offset - prompt_invis_chars_first_line is the number of invis + chars on the second line. */ + + /* what if lpos is already >= _rl_screenwidth before we start drawing the + contents of the command line? */ + while (lpos >= _rl_screenwidth) + { + /* fix from Darin Johnson for prompt string with + invisible characters that is longer than the screen width. The + prompt_invis_chars_first_line variable could be made into an array + saying how many invisible characters there are per line, but that's + probably too much work for the benefit gained. How many people have + prompts that exceed two physical lines? */ + temp = ((newlines + 1) * _rl_screenwidth) + +#if 0 + ((newlines == 0) ? prompt_invis_chars_first_line : 0) + +#else + ((newlines == 0 && local_prompt_prefix == 0) ? prompt_invis_chars_first_line : 0) + +#endif + ((newlines == 1) ? wrap_offset : 0); + inv_lbreaks[++newlines] = temp; - lpos -= screenwidth; + lpos -= _rl_screenwidth; } + prompt_last_screen_line = newlines; + + /* Draw the rest of the line (after the prompt) into invisible_line, keeping + track of where the cursor is (c_pos), the number of the line containing + the cursor (lb_linenum), the last line number (lb_botlin and inv_botlin). + It maintains an array of line breaks for display (inv_lbreaks). + This handles expanding tabs for display and displaying meta characters. */ lb_linenum = 0; +#if defined (HANDLE_MULTIBYTE) + in = 0; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + memset (&ps, 0, sizeof (mbstate_t)); + wc_bytes = mbrtowc (&wc, rl_line_buffer, rl_end, &ps); + } + else + wc_bytes = 1; + while (in < rl_end) +#else for (in = 0; in < rl_end; in++) +#endif { c = (unsigned char)rl_line_buffer[in]; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + if (wc_bytes == (size_t)-1 || wc_bytes == (size_t)-2) + { + /* Byte sequence is invalid or shortened. Assume that the + first byte represents a character. */ + wc_bytes = 1; + /* Assume that a character occupies a single column. */ + wc_width = 1; + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (wc_bytes == (size_t)0) + break; /* Found '\0' */ + else + { + temp = wcwidth (wc); + wc_width = (temp < 0) ? 1 : temp; + } + } +#endif + if (out + 8 >= line_size) /* XXX - 8 for \t */ { line_size *= 2; - visible_line = xrealloc (visible_line, line_size); - invisible_line = xrealloc (invisible_line, line_size); + visible_line = (char *)xrealloc (visible_line, line_size); + invisible_line = (char *)xrealloc (invisible_line, line_size); line = invisible_line; } @@ -468,15 +619,20 @@ rl_redisplay () lb_linenum = newlines; } +#if defined (HANDLE_MULTIBYTE) + if (META_CHAR (c) && _rl_output_meta_chars == 0) /* XXX - clean up */ +#else if (META_CHAR (c)) +#endif { if (_rl_output_meta_chars == 0) { sprintf (line + out, "\\%o", c); - if (lpos + 4 >= screenwidth) + if (lpos + 4 >= _rl_screenwidth) { - temp = screenwidth - lpos; + temp = _rl_screenwidth - lpos; + CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp; lpos = 4 - temp; } @@ -494,7 +650,7 @@ rl_redisplay () #if defined (DISPLAY_TABS) else if (c == '\t') { - register int temp, newout; + register int newout; #if 0 newout = (out | (int)7) + 1; @@ -502,10 +658,11 @@ rl_redisplay () newout = out + 8 - lpos % 8; #endif temp = newout - out; - if (lpos + temp >= screenwidth) + if (lpos + temp >= _rl_screenwidth) { register int temp2; - temp2 = screenwidth - lpos; + temp2 = _rl_screenwidth - lpos; + CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp2; lpos = temp - temp2; while (out < newout) @@ -519,9 +676,10 @@ rl_redisplay () } } #endif - else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && term_up && *term_up) + else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) { line[out++] = '\0'; /* XXX - sentinel */ + CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out; lpos = 0; } @@ -534,9 +692,52 @@ rl_redisplay () } else { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + register int i; + + _rl_wrapped_multicolumn = 0; + + if (_rl_screenwidth < lpos + wc_width) + for (i = lpos; i < _rl_screenwidth; i++) + { + /* The space will be removed in update_line() */ + line[out++] = ' '; + _rl_wrapped_multicolumn++; + CHECK_LPOS(); + } + if (in == rl_point) + { + c_pos = out; + lb_linenum = newlines; + } + for (i = in; i < in+wc_bytes; i++) + line[out++] = rl_line_buffer[i]; + for (i = 0; i < wc_width; i++) + CHECK_LPOS(); + } + else + { + line[out++] = c; + CHECK_LPOS(); + } +#else line[out++] = c; CHECK_LPOS(); +#endif } + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + in += wc_bytes; + wc_bytes = mbrtowc (&wc, rl_line_buffer + in, rl_end - in, &ps); + } + else + in++; +#endif + } line[out] = '\0'; if (c_pos < 0) @@ -546,10 +747,12 @@ rl_redisplay () } inv_botlin = lb_botlin = newlines; + CHECK_INV_LBREAKS (); inv_lbreaks[newlines+1] = out; cursor_linenum = lb_linenum; - /* C_POS == position in buffer where cursor should be placed. */ + /* C_POS == position in buffer where cursor should be placed. + CURSOR_LINENUM == line number where the cursor should be placed. */ /* PWP: now is when things get a bit hairy. The visible and invisible line buffers are really multiple lines, which would wrap every @@ -560,7 +763,7 @@ rl_redisplay () otherwise, let long lines display in a single terminal line, and horizontally scroll it. */ - if (_rl_horizontal_scroll_mode == 0 && term_up && *term_up) + if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) { int nleft, pos, changed_screen_line; @@ -571,8 +774,13 @@ rl_redisplay () /* If we have more than a screenful of material to display, then only display a screenful. We should display the last screen, not the first. */ - if (out >= screenchars) - out = screenchars - 1; + if (out >= _rl_screenchars) + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + out = _rl_find_prev_mbchar (line, _rl_screenchars, MB_FIND_ANY); + else + out = _rl_screenchars - 1; + } /* The first line is at character position 0 in the buffer. The second and subsequent lines start at inv_lbreaks[N], offset by @@ -582,7 +790,7 @@ rl_redisplay () #define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l])) #define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l]) #define VIS_CHARS(line) (visible_line + vis_lbreaks[line]) -#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line) +#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? (char*)"" : VIS_CHARS(line) #define INV_LINE(line) (invisible_line + inv_lbreaks[line]) /* For each line in the buffer, do the updating display. */ @@ -602,7 +810,7 @@ rl_redisplay () (wrap_offset > visible_wrap_offset) && (_rl_last_c_pos < visible_first_line_len)) { - nleft = screenwidth + wrap_offset - _rl_last_c_pos; + nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos; if (nleft) _rl_clear_to_eol (nleft); } @@ -623,7 +831,7 @@ rl_redisplay () _rl_move_vert (linenum); _rl_move_cursor_relative (0, tt); _rl_clear_to_eol - ((linenum == _rl_vis_botlin) ? (int) strlen (tt) : screenwidth); + ((linenum == _rl_vis_botlin) ? (int)strlen (tt) : _rl_screenwidth); } } _rl_vis_botlin = inv_botlin; @@ -634,7 +842,7 @@ rl_redisplay () if (changed_screen_line) { _rl_move_vert (cursor_linenum); - /* If we moved up to the line with the prompt using term_up, + /* If we moved up to the line with the prompt using _rl_term_up, the physical cursor position on the screen stays the same, but the buffer position needs to be adjusted to account for invisible characters. */ @@ -647,14 +855,21 @@ rl_redisplay () the characters from the current cursor position. But we only need to reprint it if the cursor is before the last invisible character in the prompt string. */ - nleft = visible_length + wrap_offset; + nleft = prompt_visible_length + wrap_offset; if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 && - _rl_last_c_pos <= last_invisible && local_prompt) + _rl_last_c_pos <= prompt_last_invisible && local_prompt) { - if (term_cr) - tputs (term_cr, 1, _rl_output_character_function); +#if defined (__MSDOS__) + putc ('\r', rl_outstream); +#else + if (_rl_term_cr) + tputs (_rl_term_cr, 1, _rl_output_character_function); +#endif _rl_output_some_chars (local_prompt, nleft); - _rl_last_c_pos = nleft; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = _rl_col_width(local_prompt, 0, nleft); + else + _rl_last_c_pos = nleft; } /* Where on that line? And where does that line start @@ -670,10 +885,15 @@ rl_redisplay () if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos) { _rl_backspace (_rl_last_c_pos - nleft); - _rl_last_c_pos = nleft; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = _rl_col_width (&visible_line[pos], 0, nleft); + else + _rl_last_c_pos = nleft; } - if (nleft != _rl_last_c_pos) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + _rl_move_cursor_relative (nleft, &invisible_line[pos]); + else if (nleft != _rl_last_c_pos) _rl_move_cursor_relative (nleft, &invisible_line[pos]); } } @@ -690,11 +910,11 @@ rl_redisplay () /* The number of characters that will be displayed before the cursor. */ ndisp = c_pos - wrap_offset; - nleft = visible_length + wrap_offset; + nleft = prompt_visible_length + wrap_offset; /* Where the new cursor position will be on the screen. This can be longer than SCREENWIDTH; if it is, lmargin will be adjusted. */ phys_c_pos = c_pos - (last_lmargin ? last_lmargin : wrap_offset); - t = screenwidth / 3; + t = _rl_screenwidth / 3; /* If the number of characters had already exceeded the screenwidth, last_lmargin will be > 0. */ @@ -702,7 +922,7 @@ rl_redisplay () /* If the number of characters to be displayed is more than the screen width, compute the starting offset so that the cursor is about two-thirds of the way across the screen. */ - if (phys_c_pos > screenwidth - 2) + if (phys_c_pos > _rl_screenwidth - 2) { lmargin = c_pos - (2 * t); if (lmargin < 0) @@ -712,7 +932,7 @@ rl_redisplay () if (wrap_offset && lmargin > 0 && lmargin < nleft) lmargin = nleft; } - else if (ndisp < screenwidth - 2) /* XXX - was -1 */ + else if (ndisp < _rl_screenwidth - 2) /* XXX - was -1 */ lmargin = 0; else if (phys_c_pos < 1) { @@ -734,7 +954,7 @@ rl_redisplay () the whole line, indicate that with a special character at the right edge of the screen. If LMARGIN is 0, we need to take the wrap offset into account. */ - t = lmargin + M_OFFSET (lmargin, wrap_offset) + screenwidth; + t = lmargin + M_OFFSET (lmargin, wrap_offset) + _rl_screenwidth; if (t < out) line[t - 1] = '>'; @@ -744,8 +964,8 @@ rl_redisplay () update_line (&visible_line[last_lmargin], &invisible_line[lmargin], 0, - screenwidth + visible_wrap_offset, - screenwidth + (lmargin ? 0 : wrap_offset), + _rl_screenwidth + visible_wrap_offset, + _rl_screenwidth + (lmargin ? 0 : wrap_offset), 0); /* If the visible new line is shorter than the old, but the number @@ -756,12 +976,12 @@ rl_redisplay () (_rl_last_c_pos == out) && t < visible_first_line_len) { - nleft = screenwidth - t; + nleft = _rl_screenwidth - t; _rl_clear_to_eol (nleft); } visible_first_line_len = out - lmargin - M_OFFSET (lmargin, wrap_offset); - if (visible_first_line_len > screenwidth) - visible_first_line_len = screenwidth; + if (visible_first_line_len > _rl_screenwidth) + visible_first_line_len = _rl_screenwidth; _rl_move_cursor_relative (c_pos - lmargin, &invisible_line[lmargin]); last_lmargin = lmargin; @@ -771,12 +991,18 @@ rl_redisplay () /* Swap visible and non-visible lines. */ { - char *temp = visible_line; - int *itemp = vis_lbreaks; + char *vtemp = visible_line; + int *itemp = vis_lbreaks, ntemp = vis_lbsize; + visible_line = invisible_line; - invisible_line = temp; + invisible_line = vtemp; + vis_lbreaks = inv_lbreaks; inv_lbreaks = itemp; + + vis_lbsize = inv_lbsize; + inv_lbsize = ntemp; + rl_display_fixed = 0; /* If we are displaying on a single line, and last_lmargin is > 0, we are not displaying any invisible characters, so set visible_wrap_offset @@ -812,6 +1038,11 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) register char *ofd, *ols, *oe, *nfd, *nls, *ne; int temp, lendiff, wsatend, od, nd; int current_invis_chars; + int col_lendiff, col_temp; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps_new, ps_old; + int new_offset, old_offset, tmp; +#endif /* If we're at the right edge of a terminal that supports xn, we're ready to wrap around, so do so. This fixes problems with knowing @@ -819,20 +1050,98 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) emulators. In this calculation, TEMP is the physical screen position of the cursor. */ temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); - if (temp == screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode - && _rl_last_v_pos == current_line - 1) + if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode + && _rl_last_v_pos == current_line - 1) { - if (new[0]) - putc (new[0], rl_outstream); +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + wchar_t wc; + mbstate_t ps; + int tempwidth, bytes; + size_t ret; + + /* This fixes only double-column characters, but if the wrapped + character comsumes more than three columns, spaces will be + inserted in the string buffer. */ + if (_rl_wrapped_line[current_line] > 0) + _rl_clear_to_eol (_rl_wrapped_line[current_line]); + + memset (&ps, 0, sizeof (mbstate_t)); + ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps); + if (ret == (size_t)-1 || ret == (size_t)-2) + { + tempwidth = 1; + ret = 1; + } + else if (ret == 0) + tempwidth = 0; + else + tempwidth = wcwidth (wc); + + if (tempwidth > 0) + { + int count; + bytes = ret; + for (count = 0; count < bytes; count++) + putc (new[count], rl_outstream); + _rl_last_c_pos = tempwidth; + _rl_last_v_pos++; + memset (&ps, 0, sizeof (mbstate_t)); + ret = mbrtowc (&wc, old, MB_CUR_MAX, &ps); + if (ret != 0 && bytes != 0) + { + if (ret == (size_t)-1 || ret == (size_t)-2) + memmove (old+bytes, old+1, strlen (old+1)); + else + memmove (old+bytes, old+ret, strlen (old+ret)); + memcpy (old, new, bytes); + } + } + else + { + putc (' ', rl_outstream); + _rl_last_c_pos = 1; + _rl_last_v_pos++; + if (old[0] && new[0]) + old[0] = new[0]; + } + } else - putc (' ', rl_outstream); - _rl_last_c_pos = 1; /* XXX */ - _rl_last_v_pos++; - if (old[0] && new[0]) - old[0] = new[0]; +#endif + { + if (new[0]) + putc (new[0], rl_outstream); + else + putc (' ', rl_outstream); + _rl_last_c_pos = 1; /* XXX */ + _rl_last_v_pos++; + if (old[0] && new[0]) + old[0] = new[0]; + } } + /* Find first difference. */ +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + memset (&ps_new, 0, sizeof(mbstate_t)); + memset (&ps_old, 0, sizeof(mbstate_t)); + + new_offset = old_offset = 0; + for (ofd = old, nfd = new; + (ofd - old < omax) && *ofd && + _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); ) + { + old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY); + new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY); + ofd = old + old_offset; + nfd = new + new_offset; + } + } + else +#endif for (ofd = old, nfd = new; (ofd - old < omax) && *ofd && (*ofd == *nfd); ofd++, nfd++) @@ -849,6 +1158,33 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) return; wsatend = 1; /* flag for trailing whitespace */ + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + ols = old + _rl_find_prev_mbchar (old, oe - old, MB_FIND_ANY); + nls = new + _rl_find_prev_mbchar (new, ne - new, MB_FIND_ANY); + while ((ols > ofd) && (nls > nfd)) + { + memset (&ps_old, 0, sizeof (mbstate_t)); + memset (&ps_new, 0, sizeof (mbstate_t)); + + _rl_adjust_point (old, ols - old, &ps_old); + _rl_adjust_point (new, nls - new, &ps_new); + + if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0) + break; + + if (*ols == ' ') + wsatend = 0; + + ols = old + _rl_find_prev_mbchar (old, ols - old, MB_FIND_ANY); + nls = new + _rl_find_prev_mbchar (new, nls - new, MB_FIND_ANY); + } + } + else + { +#endif /* HANDLE_MULTIBYTE */ ols = oe - 1; /* find last same */ nls = ne - 1; while ((ols > ofd) && (nls > nfd) && (*ols == *nls)) @@ -858,18 +1194,38 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) ols--; nls--; } +#if defined (HANDLE_MULTIBYTE) + } +#endif if (wsatend) { ols = oe; nls = ne; } +#if defined (HANDLE_MULTIBYTE) + /* This may not work for stateful encoding, but who cares? To handle + stateful encoding properly, we have to scan each string from the + beginning and compare. */ + else if (_rl_compare_chars (ols, 0, NULL, nls, 0, NULL) == 0) +#else else if (*ols != *nls) +#endif { if (*ols) /* don't step past the NUL */ - ols++; + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + ols = old + _rl_find_next_mbchar (old, ols - old, 1, MB_FIND_ANY); + else + ols++; + } if (*nls) - nls++; + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + nls = new + _rl_find_next_mbchar (new, nls - new, 1, MB_FIND_ANY); + else + nls++; + } } /* count of invisible characters in the current invisible line. */ @@ -896,29 +1252,59 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) lendiff = local_prompt ? strlen (local_prompt) : 0; od = ofd - old; /* index of first difference in visible line */ if (current_line == 0 && !_rl_horizontal_scroll_mode && - term_cr && lendiff > visible_length && _rl_last_c_pos > 0 && - od > lendiff && _rl_last_c_pos < last_invisible) + _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 && + od >= lendiff && _rl_last_c_pos <= prompt_last_invisible) { - tputs (term_cr, 1, _rl_output_character_function); +#if defined (__MSDOS__) + putc ('\r', rl_outstream); +#else + tputs (_rl_term_cr, 1, _rl_output_character_function); +#endif _rl_output_some_chars (local_prompt, lendiff); - _rl_last_c_pos = lendiff; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff); + else + _rl_last_c_pos = lendiff; } _rl_move_cursor_relative (od, old); - /* if (len (new) > len (old)) */ + /* if (len (new) > len (old)) + lendiff == difference in buffer + col_lendiff == difference on screen + When not using multibyte characters, these are equal */ lendiff = (nls - nfd) - (ols - ofd); + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + col_lendiff = _rl_col_width (new, nfd - new, nls - new) - _rl_col_width (old, ofd - old, ols - old); + else + col_lendiff = lendiff; /* If we are changing the number of invisible characters in a line, and the spot of first difference is before the end of the invisible chars, lendiff needs to be adjusted. */ if (current_line == 0 && !_rl_horizontal_scroll_mode && current_invis_chars != visible_wrap_offset) - lendiff += visible_wrap_offset - current_invis_chars; + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + lendiff += visible_wrap_offset - current_invis_chars; + col_lendiff += visible_wrap_offset - current_invis_chars; + } + else + { + lendiff += visible_wrap_offset - current_invis_chars; + col_lendiff = lendiff; + } + } /* Insert (diff (len (old), len (new)) ch. */ temp = ne - nfd; - if (lendiff > 0) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + col_temp = _rl_col_width (new, nfd - new, ne - new); + else + col_temp = temp; + + if (col_lendiff > 0) /* XXX - was lendiff */ { /* Non-zero if we're increasing the number of lines. */ int gl = current_line >= _rl_vis_botlin && inv_botlin > _rl_vis_botlin; @@ -926,17 +1312,17 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) use the terminal's capabilities. If we're growing the number of lines, make sure we actually cause the new line to wrap around on auto-wrapping terminals. */ - if (terminal_can_insert && ((2 * temp) >= lendiff || term_IC) && (!_rl_term_autowrap || !gl)) + if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff || _rl_term_IC) && (!_rl_term_autowrap || !gl)) { - /* If lendiff > visible_length and _rl_last_c_pos == 0 and + /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and _rl_horizontal_scroll_mode == 1, inserting the characters with - term_IC or term_ic will screw up the screen because of the + _rl_term_IC or _rl_term_ic will screw up the screen because of the invisible characters. We need to just draw them. */ if (*ols && (!_rl_horizontal_scroll_mode || _rl_last_c_pos > 0 || - lendiff <= visible_length || !current_invis_chars)) + lendiff <= prompt_visible_length || !current_invis_chars)) { - insert_some_chars (nfd, lendiff); - _rl_last_c_pos += lendiff; + insert_some_chars (nfd, lendiff, col_lendiff); + _rl_last_c_pos += col_lendiff; } else if (*ols == 0) { @@ -945,7 +1331,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) /* However, this screws up the rest of this block, which assumes you've done the insert because you can. */ _rl_output_some_chars (nfd, lendiff); - _rl_last_c_pos += lendiff; + _rl_last_c_pos += col_lendiff; } else { @@ -953,7 +1339,7 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) the end. We have invisible characters in this line. This is a dumb update. */ _rl_output_some_chars (nfd, temp); - _rl_last_c_pos += temp; + _rl_last_c_pos += col_temp; return; } /* Copy (new) chars to screen from first diff to last match. */ @@ -961,37 +1347,41 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) if ((temp - lendiff) > 0) { _rl_output_some_chars (nfd + lendiff, temp - lendiff); - _rl_last_c_pos += temp - lendiff; +#if 0 + _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff; +#else + _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); +#endif } } else { /* cannot insert chars, write to EOL */ _rl_output_some_chars (nfd, temp); - _rl_last_c_pos += temp; + _rl_last_c_pos += col_temp; } } else /* Delete characters from line. */ { /* If possible and inexpensive to use terminal deletion, then do so. */ - if (term_dc && (2 * temp) >= -lendiff) + if (_rl_term_dc && (2 * col_temp) >= -col_lendiff) { /* If all we're doing is erasing the invisible characters in the prompt string, don't bother. It screws up the assumptions about what's on the screen. */ if (_rl_horizontal_scroll_mode && _rl_last_c_pos == 0 && -lendiff == visible_wrap_offset) - lendiff = 0; + col_lendiff = 0; - if (lendiff) - delete_chars (-lendiff); /* delete (diff) characters */ + if (col_lendiff) + delete_chars (-col_lendiff); /* delete (diff) characters */ /* Copy (new) chars to screen from first diff to last match */ temp = nls - nfd; if (temp > 0) { _rl_output_some_chars (nfd, temp); - _rl_last_c_pos += temp; + _rl_last_c_pos += _rl_col_width (nfd, 0, temp);; } } /* Otherwise, print over the existing material. */ @@ -1000,15 +1390,20 @@ update_line (old, new, current_line, omax, nmax, inv_botlin) if (temp > 0) { _rl_output_some_chars (nfd, temp); - _rl_last_c_pos += temp; + _rl_last_c_pos += col_temp; } lendiff = (oe - old) - (ne - new); - if (lendiff) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + col_lendiff = _rl_col_width (old, 0, oe - old) - _rl_col_width (new, 0, ne - new); + else + col_lendiff = lendiff; + + if (col_lendiff) { if (_rl_term_autowrap && current_line < inv_botlin) - space_to_eol (lendiff); + space_to_eol (col_lendiff); else - _rl_clear_to_eol (lendiff); + _rl_clear_to_eol (col_lendiff); } } } @@ -1029,6 +1424,61 @@ rl_on_new_line () return 0; } +/* Tell the update routines that we have moved onto a new line with the + prompt already displayed. Code originally from the version of readline + distributed with CLISP. */ +int +rl_on_new_line_with_prompt () +{ + int prompt_size, i, l, real_screenwidth, newlines; + char *prompt_last_line; + + /* Initialize visible_line and invisible_line to ensure that they can hold + the already-displayed prompt. */ + prompt_size = strlen (rl_prompt) + 1; + init_line_structures (prompt_size); + + /* Make sure the line structures hold the already-displayed prompt for + redisplay. */ + strcpy (visible_line, rl_prompt); + strcpy (invisible_line, rl_prompt); + + /* If the prompt contains newlines, take the last tail. */ + prompt_last_line = strrchr (rl_prompt, '\n'); + if (!prompt_last_line) + prompt_last_line = rl_prompt; + + l = strlen (prompt_last_line); + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l); + else + _rl_last_c_pos = l; + + /* Dissect prompt_last_line into screen lines. Note that here we have + to use the real screenwidth. Readline's notion of screenwidth might be + one less, see terminal.c. */ + real_screenwidth = _rl_screenwidth + (_rl_term_autowrap ? 0 : 1); + _rl_last_v_pos = l / real_screenwidth; + /* If the prompt length is a multiple of real_screenwidth, we don't know + whether the cursor is at the end of the last line, or already at the + beginning of the next line. Output a newline just to be safe. */ + if (l > 0 && (l % real_screenwidth) == 0) + _rl_output_some_chars ("\n", 1); + last_lmargin = 0; + + newlines = 0; i = 0; + while (i <= l) + { + _rl_vis_botlin = newlines; + vis_lbreaks[newlines++] = i; + i += real_screenwidth; + } + vis_lbreaks[newlines] = l; + visible_wrap_offset = 0; + + return 0; +} + /* Actually update the display, period. */ int rl_forced_update_display () @@ -1052,24 +1502,31 @@ rl_forced_update_display () void _rl_move_cursor_relative (new, data) int new; - char *data; + const char *data; { register int i; /* If we don't have to do anything, then return. */ +#if defined (HANDLE_MULTIBYTE) + /* If we have multibyte characters, NEW is indexed by the buffer point in + a multibyte string, but _rl_last_c_pos is the display position. In + this case, NEW's display position is not obvious. */ + if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return; +#else if (_rl_last_c_pos == new) return; +#endif /* It may be faster to output a CR, and then move forwards instead of moving backwards. */ /* i == current physical cursor position. */ i = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); if (new == 0 || CR_FASTER (new, _rl_last_c_pos) || - (_rl_term_autowrap && i == screenwidth)) + (_rl_term_autowrap && i == _rl_screenwidth)) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else - tputs (term_cr, 1, _rl_output_character_function); + tputs (_rl_term_cr, 1, _rl_output_character_function); #endif /* !__MSDOS__ */ _rl_last_c_pos = 0; } @@ -1086,22 +1543,70 @@ _rl_move_cursor_relative (new, data) That kind of control is for people who don't know what the data is underneath the cursor. */ #if defined (HACK_TERMCAP_MOTION) - extern char *term_forward_char; - - if (term_forward_char) - for (i = _rl_last_c_pos; i < new; i++) - tputs (term_forward_char, 1, _rl_output_character_function); + if (_rl_term_forward_char) + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int width; + width = _rl_col_width (data, _rl_last_c_pos, new); + for (i = 0; i < width; i++) + tputs (_rl_term_forward_char, 1, _rl_output_character_function); + } + else + { + for (i = _rl_last_c_pos; i < new; i++) + tputs (_rl_term_forward_char, 1, _rl_output_character_function); + } + } + else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + tputs (_rl_term_cr, 1, _rl_output_character_function); + for (i = 0; i < new; i++) + putc (data[i], rl_outstream); + } else for (i = _rl_last_c_pos; i < new; i++) putc (data[i], rl_outstream); -#else - for (i = _rl_last_c_pos; i < new; i++) - putc (data[i], rl_outstream); -#endif /* HACK_TERMCAP_MOTION */ + +#else /* !HACK_TERMCAP_MOTION */ + + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + tputs (_rl_term_cr, 1, _rl_output_character_function); + for (i = 0; i < new; i++) + putc (data[i], rl_outstream); + } + else + for (i = _rl_last_c_pos; i < new; i++) + putc (data[i], rl_outstream); + +#endif /* !HACK_TERMCAP_MOTION */ + } +#if defined (HANDLE_MULTIBYTE) + /* NEW points to the buffer point, but _rl_last_c_pos is the display point. + The byte length of the string is probably bigger than the column width + of the string, which means that if NEW == _rl_last_c_pos, then NEW's + display point is less than _rl_last_c_pos. */ + else if (_rl_last_c_pos >= new) +#else else if (_rl_last_c_pos > new) - _rl_backspace (_rl_last_c_pos - new); - _rl_last_c_pos = new; +#endif + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + tputs (_rl_term_cr, 1, _rl_output_character_function); + for (i = 0; i < new; i++) + putc (data[i], rl_outstream); + } + else + _rl_backspace (_rl_last_c_pos - new); + } + + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + _rl_last_c_pos = _rl_col_width (data, 0, new); + else + _rl_last_c_pos = new; } /* PWP: move the cursor up or down. */ @@ -1111,32 +1616,27 @@ _rl_move_vert (to) { register int delta, i; - if (_rl_last_v_pos == to || to > screenheight) + if (_rl_last_v_pos == to || to > _rl_screenheight) return; -#if defined (__GO32__) - { - int row, col; - - ScreenGetCursor (&row, &col); - ScreenSetCursor ((row + to - _rl_last_v_pos), col); - } -#else /* !__GO32__ */ - if ((delta = to - _rl_last_v_pos) > 0) { for (i = 0; i < delta; i++) putc ('\n', rl_outstream); - tputs (term_cr, 1, _rl_output_character_function); +#if defined (__MSDOS__) + putc ('\r', rl_outstream); +#else + tputs (_rl_term_cr, 1, _rl_output_character_function); +#endif _rl_last_c_pos = 0; } else { /* delta < 0 */ - if (term_up && *term_up) + if (_rl_term_up && *_rl_term_up) for (i = 0; i < -delta; i++) - tputs (term_up, 1, _rl_output_character_function); + tputs (_rl_term_up, 1, _rl_output_character_function); } -#endif /* !__GO32__ */ + _rl_last_v_pos = to; /* Now TO is here */ } @@ -1193,7 +1693,7 @@ rl_character_len (c, pos) if (CTRL_CHAR (c) || c == RUBOUT) return (2); - return ((isprint (uc)) ? 1 : 2); + return ((ISPRINT (uc)) ? 1 : 2); } /* How to print things in the "echo-area". The prompt is treated as a @@ -1220,7 +1720,12 @@ rl_message (va_alist) format = va_arg (args, char *); #endif +#if defined (HAVE_VSNPRINTF) + vsnprintf (msg_buf, sizeof (msg_buf) - 1, format, args); +#else vsprintf (msg_buf, format, args); + msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ +#endif va_end (args); rl_display_prompt = msg_buf; @@ -1229,9 +1734,12 @@ rl_message (va_alist) } #else /* !USE_VARARGS */ int -rl_message (char *format, void *arg1, void *arg2) +rl_message (format, arg1, arg2) + char *format; + int arg1, arg2; { sprintf (msg_buf, format, arg1, arg2); + msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ rl_display_prompt = msg_buf; (*rl_redisplay_function) (); return 0; @@ -1252,7 +1760,7 @@ rl_reset_line_state () { rl_on_new_line (); - rl_display_prompt = rl_prompt ? rl_prompt : ""; + rl_display_prompt = (char*)(rl_prompt ? rl_prompt : ""); forced_display = 1; return 0; } @@ -1267,25 +1775,23 @@ rl_save_prompt () { saved_local_prompt = local_prompt; saved_local_prefix = local_prompt_prefix; - saved_last_invisible = last_invisible; - saved_visible_length = visible_length; + saved_last_invisible = prompt_last_invisible; + saved_visible_length = prompt_visible_length; local_prompt = local_prompt_prefix = (char *)0; - last_invisible = visible_length = 0; + prompt_last_invisible = prompt_visible_length = 0; } void rl_restore_prompt () { - if (local_prompt) - free (local_prompt); - if (local_prompt_prefix) - free (local_prompt_prefix); + FREE (local_prompt); + FREE (local_prompt_prefix); local_prompt = saved_local_prompt; local_prompt_prefix = saved_local_prefix; - last_invisible = saved_last_invisible; - visible_length = saved_visible_length; + prompt_last_invisible = saved_last_invisible; + prompt_visible_length = saved_visible_length; } char * @@ -1300,7 +1806,7 @@ _rl_make_prompt_for_search (pchar) if (saved_local_prompt == 0) { len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; - pmt = xmalloc (len + 2); + pmt = (char *)xmalloc (len + 2); if (len) strcpy (pmt, rl_prompt); pmt[len] = pchar; @@ -1309,14 +1815,14 @@ _rl_make_prompt_for_search (pchar) else { len = *saved_local_prompt ? strlen (saved_local_prompt) : 0; - pmt = xmalloc (len + 2); + pmt = (char *)xmalloc (len + 2); if (len) strcpy (pmt, saved_local_prompt); pmt[len] = pchar; pmt[len+1] = '\0'; local_prompt = savestring (pmt); - last_invisible = saved_last_invisible; - visible_length = saved_visible_length + 1; + prompt_last_invisible = saved_last_invisible; + prompt_visible_length = saved_visible_length + 1; } return pmt; } @@ -1343,11 +1849,9 @@ void _rl_clear_to_eol (count) int count; { -#if !defined (__GO32__) - if (term_clreol) - tputs (term_clreol, 1, _rl_output_character_function); + if (_rl_term_clreol) + tputs (_rl_term_clreol, 1, _rl_output_character_function); else if (count) -#endif /* !__GO32__ */ space_to_eol (count); } @@ -1368,39 +1872,29 @@ space_to_eol (count) void _rl_clear_screen () { -#if !defined (__GO32__) - if (term_clrpag) - tputs (term_clrpag, 1, _rl_output_character_function); + if (_rl_term_clrpag) + tputs (_rl_term_clrpag, 1, _rl_output_character_function); else -#endif /* !__GO32__ */ - crlf (); + rl_crlf (); } -/* Insert COUNT characters from STRING to the output stream. */ +/* Insert COUNT characters from STRING to the output stream at column COL. */ static void -insert_some_chars (string, count) +insert_some_chars (string, count, col) char *string; - int count; + int count, col; { -#if defined (__GO32__) - int row, col, width; - char *row_start; - - ScreenGetCursor (&row, &col); - width = ScreenCols (); - row_start = ScreenPrimary + (row * width); - - memcpy (row_start + col + count, row_start + col, width - col - count); - - /* Place the text on the screen. */ - _rl_output_some_chars (string, count); -#else /* !_GO32 */ + /* DEBUGGING */ + if (MB_CUR_MAX == 1 || rl_byte_oriented) + if (count != col) + fprintf(stderr, "readline: debug: insert_some_chars: count (%d) != col (%d)\n", count, col); /* If IC is defined, then we do not have to "enter" insert mode. */ - if (term_IC) + if (_rl_term_IC) { char *buffer; - buffer = tgoto (term_IC, 0, count); + + buffer = tgoto (_rl_term_IC, 0, col); tputs (buffer, 1, _rl_output_character_function); _rl_output_some_chars (string, count); } @@ -1409,15 +1903,15 @@ insert_some_chars (string, count) register int i; /* If we have to turn on insert-mode, then do so. */ - if (term_im && *term_im) - tputs (term_im, 1, _rl_output_character_function); + if (_rl_term_im && *_rl_term_im) + tputs (_rl_term_im, 1, _rl_output_character_function); /* If there is a special command for inserting characters, then use that first to open up the space. */ - if (term_ic && *term_ic) + if (_rl_term_ic && *_rl_term_ic) { - for (i = count; i--; ) - tputs (term_ic, 1, _rl_output_character_function); + for (i = col; i--; ) + tputs (_rl_term_ic, 1, _rl_output_character_function); } /* Print the text. */ @@ -1425,10 +1919,9 @@ insert_some_chars (string, count) /* If there is a string to turn off insert mode, we had best use it now. */ - if (term_ei && *term_ei) - tputs (term_ei, 1, _rl_output_character_function); + if (_rl_term_ei && *_rl_term_ei) + tputs (_rl_term_ei, 1, _rl_output_character_function); } -#endif /* !__GO32__ */ } /* Delete COUNT characters from the display line. */ @@ -1436,34 +1929,21 @@ static void delete_chars (count) int count; { -#if defined (__GO32__) - int row, col, width; - char *row_start; - - ScreenGetCursor (&row, &col); - width = ScreenCols (); - row_start = ScreenPrimary + (row * width); - - memcpy (row_start + col, row_start + col + count, width - col - count); - memset (row_start + width - count, 0, count * 2); -#else /* !_GO32 */ - - if (count > screenwidth) /* XXX */ + if (count > _rl_screenwidth) /* XXX */ return; - if (term_DC && *term_DC) + if (_rl_term_DC && *_rl_term_DC) { char *buffer; - buffer = tgoto (term_DC, count, count); + buffer = tgoto (_rl_term_DC, count, count); tputs (buffer, count, _rl_output_character_function); } else { - if (term_dc && *term_dc) + if (_rl_term_dc && *_rl_term_dc) while (count--) - tputs (term_dc, 1, _rl_output_character_function); + tputs (_rl_term_dc, 1, _rl_output_character_function); } -#endif /* !__GO32__ */ } void @@ -1482,16 +1962,17 @@ _rl_update_final () } _rl_move_vert (_rl_vis_botlin); /* If we've wrapped lines, remove the final xterm line-wrap flag. */ - if (full_lines && _rl_term_autowrap && (VIS_LLEN(_rl_vis_botlin) == screenwidth)) + if (full_lines && _rl_term_autowrap && (VIS_LLEN(_rl_vis_botlin) == _rl_screenwidth)) { char *last_line; - last_line = &visible_line[inv_lbreaks[_rl_vis_botlin]]; - _rl_move_cursor_relative (screenwidth - 1, last_line); + + last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; + _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); _rl_clear_to_eol (0); - putc (last_line[screenwidth - 1], rl_outstream); + putc (last_line[_rl_screenwidth - 1], rl_outstream); } _rl_vis_botlin = 0; - crlf (); + rl_crlf (); fflush (rl_outstream); rl_display_fixed++; } @@ -1500,53 +1981,90 @@ _rl_update_final () static void cr () { - if (term_cr) + if (_rl_term_cr) { - tputs (term_cr, 1, _rl_output_character_function); +#if defined (__MSDOS__) + putc ('\r', rl_outstream); +#else + tputs (_rl_term_cr, 1, _rl_output_character_function); +#endif _rl_last_c_pos = 0; } } +/* Redraw the last line of a multi-line prompt that may possibly contain + terminal escape sequences. Called with the cursor at column 0 of the + line to draw the prompt on. */ +static void +redraw_prompt (t) + char *t; +{ + char *oldp, *oldl, *oldlprefix; + int oldlen, oldlast, oldplen, oldninvis; + + /* Geez, I should make this a struct. */ + oldp = rl_display_prompt; + oldl = local_prompt; + oldlprefix = local_prompt_prefix; + oldlen = prompt_visible_length; + oldplen = prompt_prefix_length; + oldlast = prompt_last_invisible; + oldninvis = prompt_invis_chars_first_line; + + rl_display_prompt = t; + local_prompt = expand_prompt (t, &prompt_visible_length, + &prompt_last_invisible, + &prompt_invis_chars_first_line); + local_prompt_prefix = (char *)NULL; + rl_forced_update_display (); + + rl_display_prompt = oldp; + local_prompt = oldl; + local_prompt_prefix = oldlprefix; + prompt_visible_length = oldlen; + prompt_prefix_length = oldplen; + prompt_last_invisible = oldlast; + prompt_invis_chars_first_line = oldninvis; +} + /* Redisplay the current line after a SIGWINCH is received. */ void _rl_redisplay_after_sigwinch () { - char *t, *oldl, *oldlprefix; - const char *oldp; + char *t; /* Clear the current line and put the cursor at column 0. Make sure the right thing happens if we have wrapped to a new screen line. */ - if (term_cr) + if (_rl_term_cr) { - tputs (term_cr, 1, _rl_output_character_function); +#if defined (__MSDOS__) + putc ('\r', rl_outstream); +#else + tputs (_rl_term_cr, 1, _rl_output_character_function); +#endif _rl_last_c_pos = 0; - if (term_clreol) - tputs (term_clreol, 1, _rl_output_character_function); +#if defined (__MSDOS__) + space_to_eol (_rl_screenwidth); + putc ('\r', rl_outstream); +#else + if (_rl_term_clreol) + tputs (_rl_term_clreol, 1, _rl_output_character_function); else { - space_to_eol (screenwidth); - tputs (term_cr, 1, _rl_output_character_function); + space_to_eol (_rl_screenwidth); + tputs (_rl_term_cr, 1, _rl_output_character_function); } +#endif if (_rl_last_v_pos > 0) _rl_move_vert (0); } else - crlf (); + rl_crlf (); /* Redraw only the last line of a multi-line prompt. */ t = strrchr (rl_display_prompt, '\n'); if (t) - { - oldp = rl_display_prompt; - oldl = local_prompt; - oldlprefix = local_prompt_prefix; - rl_display_prompt = ++t; - local_prompt = local_prompt_prefix = (char *)NULL; - rl_forced_update_display (); - rl_display_prompt = oldp; - local_prompt = oldl; - local_prompt_prefix = oldlprefix; - } + redraw_prompt (++t); else rl_forced_update_display (); } @@ -1571,3 +2089,109 @@ _rl_erase_entire_line () cr (); fflush (rl_outstream); } + +/* return the `current display line' of the cursor -- the number of lines to + move up to get to the first screen line of the current readline line. */ +int +_rl_current_display_line () +{ + int ret, nleft; + + /* Find out whether or not there might be invisible characters in the + editing buffer. */ + if (rl_display_prompt == rl_prompt) + nleft = _rl_last_c_pos - _rl_screenwidth - rl_visible_prompt_length; + else + nleft = _rl_last_c_pos - _rl_screenwidth; + + if (nleft > 0) + ret = 1 + nleft / _rl_screenwidth; + else + ret = 0; + + return ret; +} + +#if defined (HANDLE_MULTIBYTE) +/* Calculate the number of screen columns occupied by STR from START to END. + In the case of multibyte characters with stateful encoding, we have to + scan from the beginning of the string to take the state into account. */ +static int +_rl_col_width (str, start, end) + char *str; + int start, end; +{ + wchar_t wc; + mbstate_t ps = {0}; + int tmp, point, width, max; + + if (end <= start) + return 0; + + point = 0; + max = end; + + while (point < start) + { + tmp = mbrlen (str + point, max, &ps); + if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2) + { + /* In this case, the bytes are invalid or too short to compose a + multibyte character, so we assume that the first byte represents + a single character. */ + point++; + max--; + + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (tmp == 0) + break; /* Found '\0' */ + else + { + point += tmp; + max -= tmp; + } + } + + /* If START is not a byte that starts a character, then POINT will be + greater than START. In this case, assume that (POINT - START) gives + a byte count that is the number of columns of difference. */ + width = point - start; + + while (point < end) + { + tmp = mbrtowc (&wc, str + point, max, &ps); + if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2) + { + /* In this case, the bytes are invalid or too short to compose a + multibyte character, so we assume that the first byte represents + a single character. */ + point++; + max--; + + /* and assume that the byte occupies a single column. */ + width++; + + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (tmp == 0) + break; /* Found '\0' */ + else + { + point += tmp; + max -= tmp; + tmp = wcwidth(wc); + width += (tmp >= 0) ? tmp : 1; + } + } + + width += point - end; + + return width; +} +#endif /* HANDLE_MULTIBYTE */ + diff --git a/readline/emacs_keymap.c b/readline/emacs_keymap.c index 4ba385843f6..ca9d1343b65 100644 --- a/readline/emacs_keymap.c +++ b/readline/emacs_keymap.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (BUFSIZ) #include @@ -33,197 +33,185 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { /* Control keys. */ - { ISFUNC, rl_set_mark }, /* Control-@ */ - { ISFUNC, rl_beg_of_line }, /* Control-a */ - { ISFUNC, rl_backward }, /* Control-b */ - { ISFUNC, (Function *)0x0 }, /* Control-c */ - { ISFUNC, rl_delete }, /* Control-d */ - { ISFUNC, rl_end_of_line }, /* Control-e */ - { ISFUNC, rl_forward }, /* Control-f */ - { ISFUNC, rl_abort }, /* Control-g */ - { ISFUNC, rl_rubout }, /* Control-h */ - { ISFUNC, rl_complete }, /* Control-i */ - { ISFUNC, rl_newline }, /* Control-j */ - { ISFUNC, rl_kill_line }, /* Control-k */ - { ISFUNC, rl_clear_screen }, /* Control-l */ - { ISFUNC, rl_newline }, /* Control-m */ - { ISFUNC, rl_get_next_history }, /* Control-n */ - { ISFUNC, (Function *)0x0 }, /* Control-o */ - { ISFUNC, rl_get_previous_history }, /* Control-p */ - { ISFUNC, rl_quoted_insert }, /* Control-q */ - { ISFUNC, rl_reverse_search_history }, /* Control-r */ - { ISFUNC, rl_forward_search_history }, /* Control-s */ - { ISFUNC, rl_transpose_chars }, /* Control-t */ - { ISFUNC, rl_unix_line_discard }, /* Control-u */ - { ISFUNC, rl_quoted_insert }, /* Control-v */ - { ISFUNC, rl_unix_word_rubout }, /* Control-w */ - { ISKMAP, (Function *)emacs_ctlx_keymap }, /* Control-x */ - { ISFUNC, rl_yank }, /* Control-y */ - { ISFUNC, (Function *)0x0 }, /* Control-z */ - { ISKMAP, (Function *)emacs_meta_keymap }, /* Control-[ */ - { ISFUNC, (Function *)0x0 }, /* Control-\ */ - { ISFUNC, rl_char_search }, /* Control-] */ - { ISFUNC, (Function *)0x0 }, /* Control-^ */ - { ISFUNC, rl_undo_command }, /* Control-_ */ + { ISFUNC, rl_set_mark }, /* Control-@ */ + { ISFUNC, rl_beg_of_line }, /* Control-a */ + { ISFUNC, rl_backward_char }, /* Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ + { ISFUNC, rl_delete }, /* Control-d */ + { ISFUNC, rl_end_of_line }, /* Control-e */ + { ISFUNC, rl_forward_char }, /* Control-f */ + { ISFUNC, rl_abort }, /* Control-g */ + { ISFUNC, rl_rubout }, /* Control-h */ + { ISFUNC, rl_complete }, /* Control-i */ + { ISFUNC, rl_newline }, /* Control-j */ + { ISFUNC, rl_kill_line }, /* Control-k */ + { ISFUNC, rl_clear_screen }, /* Control-l */ + { ISFUNC, rl_newline }, /* Control-m */ + { ISFUNC, rl_get_next_history }, /* Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ + { ISFUNC, rl_get_previous_history }, /* Control-p */ + { ISFUNC, rl_quoted_insert }, /* Control-q */ + { ISFUNC, rl_reverse_search_history }, /* Control-r */ + { ISFUNC, rl_forward_search_history }, /* Control-s */ + { ISFUNC, rl_transpose_chars }, /* Control-t */ + { ISFUNC, rl_unix_line_discard }, /* Control-u */ + { ISFUNC, rl_quoted_insert }, /* Control-v */ + { ISFUNC, rl_unix_word_rubout }, /* Control-w */ + { ISKMAP, (rl_command_func_t *)emacs_ctlx_keymap }, /* Control-x */ + { ISFUNC, rl_yank }, /* Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ + { ISKMAP, (rl_command_func_t *)emacs_meta_keymap }, /* Control-[ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ + { ISFUNC, rl_char_search }, /* Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ + { ISFUNC, rl_undo_command }, /* Control-_ */ /* The start of printing characters. */ - { ISFUNC, rl_insert }, /* SPACE */ - { ISFUNC, rl_insert }, /* ! */ - { ISFUNC, rl_insert }, /* " */ - { ISFUNC, rl_insert }, /* # */ - { ISFUNC, rl_insert }, /* $ */ - { ISFUNC, rl_insert }, /* % */ - { ISFUNC, rl_insert }, /* & */ - { ISFUNC, rl_insert }, /* ' */ - { ISFUNC, rl_insert }, /* ( */ -#if defined (PAREN_MATCHING) - { ISFUNC, rl_insert_close }, /* ) */ -#else - { ISFUNC, rl_insert }, /* ) */ -#endif /* !PAREN_MATCHING */ - { ISFUNC, rl_insert }, /* * */ - { ISFUNC, rl_insert }, /* + */ - { ISFUNC, rl_insert }, /* , */ - { ISFUNC, rl_insert }, /* - */ - { ISFUNC, rl_insert }, /* . */ - { ISFUNC, rl_insert }, /* / */ - - /* Regular digits. */ - { ISFUNC, rl_insert }, /* 0 */ - { ISFUNC, rl_insert }, /* 1 */ - { ISFUNC, rl_insert }, /* 2 */ - { ISFUNC, rl_insert }, /* 3 */ - { ISFUNC, rl_insert }, /* 4 */ - { ISFUNC, rl_insert }, /* 5 */ - { ISFUNC, rl_insert }, /* 6 */ - { ISFUNC, rl_insert }, /* 7 */ - { ISFUNC, rl_insert }, /* 8 */ - { ISFUNC, rl_insert }, /* 9 */ + { ISFUNC, rl_insert }, /* SPACE */ + { ISFUNC, rl_insert }, /* ! */ + { ISFUNC, rl_insert }, /* " */ + { ISFUNC, rl_insert }, /* # */ + { ISFUNC, rl_insert }, /* $ */ + { ISFUNC, rl_insert }, /* % */ + { ISFUNC, rl_insert }, /* & */ + { ISFUNC, rl_insert }, /* ' */ + { ISFUNC, rl_insert }, /* ( */ + { ISFUNC, rl_insert }, /* ) */ + { ISFUNC, rl_insert }, /* * */ + { ISFUNC, rl_insert }, /* + */ + { ISFUNC, rl_insert }, /* , */ + { ISFUNC, rl_insert }, /* - */ + { ISFUNC, rl_insert }, /* . */ + { ISFUNC, rl_insert }, /* / */ + + /* Regular digits. */ + { ISFUNC, rl_insert }, /* 0 */ + { ISFUNC, rl_insert }, /* 1 */ + { ISFUNC, rl_insert }, /* 2 */ + { ISFUNC, rl_insert }, /* 3 */ + { ISFUNC, rl_insert }, /* 4 */ + { ISFUNC, rl_insert }, /* 5 */ + { ISFUNC, rl_insert }, /* 6 */ + { ISFUNC, rl_insert }, /* 7 */ + { ISFUNC, rl_insert }, /* 8 */ + { ISFUNC, rl_insert }, /* 9 */ /* A little more punctuation. */ - { ISFUNC, rl_insert }, /* : */ - { ISFUNC, rl_insert }, /* ; */ - { ISFUNC, rl_insert }, /* < */ - { ISFUNC, rl_insert }, /* = */ - { ISFUNC, rl_insert }, /* > */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* @ */ + { ISFUNC, rl_insert }, /* : */ + { ISFUNC, rl_insert }, /* ; */ + { ISFUNC, rl_insert }, /* < */ + { ISFUNC, rl_insert }, /* = */ + { ISFUNC, rl_insert }, /* > */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* @ */ /* Uppercase alphabet. */ - { ISFUNC, rl_insert }, /* A */ - { ISFUNC, rl_insert }, /* B */ - { ISFUNC, rl_insert }, /* C */ - { ISFUNC, rl_insert }, /* D */ - { ISFUNC, rl_insert }, /* E */ - { ISFUNC, rl_insert }, /* F */ - { ISFUNC, rl_insert }, /* G */ - { ISFUNC, rl_insert }, /* H */ - { ISFUNC, rl_insert }, /* I */ - { ISFUNC, rl_insert }, /* J */ - { ISFUNC, rl_insert }, /* K */ - { ISFUNC, rl_insert }, /* L */ - { ISFUNC, rl_insert }, /* M */ - { ISFUNC, rl_insert }, /* N */ - { ISFUNC, rl_insert }, /* O */ - { ISFUNC, rl_insert }, /* P */ - { ISFUNC, rl_insert }, /* Q */ - { ISFUNC, rl_insert }, /* R */ - { ISFUNC, rl_insert }, /* S */ - { ISFUNC, rl_insert }, /* T */ - { ISFUNC, rl_insert }, /* U */ - { ISFUNC, rl_insert }, /* V */ - { ISFUNC, rl_insert }, /* W */ - { ISFUNC, rl_insert }, /* X */ - { ISFUNC, rl_insert }, /* Y */ - { ISFUNC, rl_insert }, /* Z */ + { ISFUNC, rl_insert }, /* A */ + { ISFUNC, rl_insert }, /* B */ + { ISFUNC, rl_insert }, /* C */ + { ISFUNC, rl_insert }, /* D */ + { ISFUNC, rl_insert }, /* E */ + { ISFUNC, rl_insert }, /* F */ + { ISFUNC, rl_insert }, /* G */ + { ISFUNC, rl_insert }, /* H */ + { ISFUNC, rl_insert }, /* I */ + { ISFUNC, rl_insert }, /* J */ + { ISFUNC, rl_insert }, /* K */ + { ISFUNC, rl_insert }, /* L */ + { ISFUNC, rl_insert }, /* M */ + { ISFUNC, rl_insert }, /* N */ + { ISFUNC, rl_insert }, /* O */ + { ISFUNC, rl_insert }, /* P */ + { ISFUNC, rl_insert }, /* Q */ + { ISFUNC, rl_insert }, /* R */ + { ISFUNC, rl_insert }, /* S */ + { ISFUNC, rl_insert }, /* T */ + { ISFUNC, rl_insert }, /* U */ + { ISFUNC, rl_insert }, /* V */ + { ISFUNC, rl_insert }, /* W */ + { ISFUNC, rl_insert }, /* X */ + { ISFUNC, rl_insert }, /* Y */ + { ISFUNC, rl_insert }, /* Z */ /* Some more punctuation. */ - { ISFUNC, rl_insert }, /* [ */ - { ISFUNC, rl_insert }, /* \ */ -#if defined (PAREN_MATCHING) - { ISFUNC, rl_insert_close }, /* ] */ -#else - { ISFUNC, rl_insert }, /* ] */ -#endif /* !PAREN_MATCHING */ - { ISFUNC, rl_insert }, /* ^ */ - { ISFUNC, rl_insert }, /* _ */ - { ISFUNC, rl_insert }, /* ` */ + { ISFUNC, rl_insert }, /* [ */ + { ISFUNC, rl_insert }, /* \ */ + { ISFUNC, rl_insert }, /* ] */ + { ISFUNC, rl_insert }, /* ^ */ + { ISFUNC, rl_insert }, /* _ */ + { ISFUNC, rl_insert }, /* ` */ /* Lowercase alphabet. */ - { ISFUNC, rl_insert }, /* a */ - { ISFUNC, rl_insert }, /* b */ - { ISFUNC, rl_insert }, /* c */ - { ISFUNC, rl_insert }, /* d */ - { ISFUNC, rl_insert }, /* e */ - { ISFUNC, rl_insert }, /* f */ - { ISFUNC, rl_insert }, /* g */ - { ISFUNC, rl_insert }, /* h */ - { ISFUNC, rl_insert }, /* i */ - { ISFUNC, rl_insert }, /* j */ - { ISFUNC, rl_insert }, /* k */ - { ISFUNC, rl_insert }, /* l */ - { ISFUNC, rl_insert }, /* m */ - { ISFUNC, rl_insert }, /* n */ - { ISFUNC, rl_insert }, /* o */ - { ISFUNC, rl_insert }, /* p */ - { ISFUNC, rl_insert }, /* q */ - { ISFUNC, rl_insert }, /* r */ - { ISFUNC, rl_insert }, /* s */ - { ISFUNC, rl_insert }, /* t */ - { ISFUNC, rl_insert }, /* u */ - { ISFUNC, rl_insert }, /* v */ - { ISFUNC, rl_insert }, /* w */ - { ISFUNC, rl_insert }, /* x */ - { ISFUNC, rl_insert }, /* y */ - { ISFUNC, rl_insert }, /* z */ + { ISFUNC, rl_insert }, /* a */ + { ISFUNC, rl_insert }, /* b */ + { ISFUNC, rl_insert }, /* c */ + { ISFUNC, rl_insert }, /* d */ + { ISFUNC, rl_insert }, /* e */ + { ISFUNC, rl_insert }, /* f */ + { ISFUNC, rl_insert }, /* g */ + { ISFUNC, rl_insert }, /* h */ + { ISFUNC, rl_insert }, /* i */ + { ISFUNC, rl_insert }, /* j */ + { ISFUNC, rl_insert }, /* k */ + { ISFUNC, rl_insert }, /* l */ + { ISFUNC, rl_insert }, /* m */ + { ISFUNC, rl_insert }, /* n */ + { ISFUNC, rl_insert }, /* o */ + { ISFUNC, rl_insert }, /* p */ + { ISFUNC, rl_insert }, /* q */ + { ISFUNC, rl_insert }, /* r */ + { ISFUNC, rl_insert }, /* s */ + { ISFUNC, rl_insert }, /* t */ + { ISFUNC, rl_insert }, /* u */ + { ISFUNC, rl_insert }, /* v */ + { ISFUNC, rl_insert }, /* w */ + { ISFUNC, rl_insert }, /* x */ + { ISFUNC, rl_insert }, /* y */ + { ISFUNC, rl_insert }, /* z */ /* Final punctuation. */ - { ISFUNC, rl_insert }, /* { */ - { ISFUNC, rl_insert }, /* | */ -#if defined (PAREN_MATCHING) - { ISFUNC, rl_insert_close }, /* } */ -#else - { ISFUNC, rl_insert }, /* } */ -#endif /* !PAREN_MATCHING */ - { ISFUNC, rl_insert }, /* ~ */ - { ISFUNC, rl_rubout }, /* RUBOUT */ + { ISFUNC, rl_insert }, /* { */ + { ISFUNC, rl_insert }, /* | */ + { ISFUNC, rl_insert }, /* } */ + { ISFUNC, rl_insert }, /* ~ */ + { ISFUNC, rl_rubout }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Pure 8-bit characters (128 - 159). These might be used in some character sets. */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* ? */ /* ISO Latin-1 characters (160 - 255) */ { ISFUNC, rl_insert }, /* No-break space */ @@ -328,78 +316,78 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = { KEYMAP_ENTRY_ARRAY emacs_meta_keymap = { /* Meta keys. Just like above, but the high bit is set. */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-@ */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-a */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-b */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-c */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-d */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-e */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-f */ - { ISFUNC, rl_abort }, /* Meta-Control-g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-f */ + { ISFUNC, rl_abort }, /* Meta-Control-g */ { ISFUNC, rl_backward_kill_word }, /* Meta-Control-h */ - { ISFUNC, rl_tab_insert }, /* Meta-Control-i */ - { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-k */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-l */ - { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-n */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-o */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-p */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-q */ - { ISFUNC, rl_revert_line }, /* Meta-Control-r */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-s */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-t */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-u */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-v */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-w */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-x */ - { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-z */ + { ISFUNC, rl_tab_insert }, /* Meta-Control-i */ + { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-l */ + { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-q */ + { ISFUNC, rl_revert_line }, /* Meta-Control-r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-t */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-x */ + { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-z */ - { ISFUNC, rl_complete }, /* Meta-Control-[ */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-\ */ + { ISFUNC, rl_complete }, /* Meta-Control-[ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-\ */ { ISFUNC, rl_backward_char_search }, /* Meta-Control-] */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-^ */ - { ISFUNC, (Function *)0x0 }, /* Meta-Control-_ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-^ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-_ */ /* The start of printing characters. */ - { ISFUNC, rl_set_mark }, /* Meta-SPACE */ - { ISFUNC, (Function *)0x0 }, /* Meta-! */ - { ISFUNC, (Function *)0x0 }, /* Meta-" */ - { ISFUNC, rl_insert_comment },/* Meta-# */ - { ISFUNC, (Function *)0x0 }, /* Meta-$ */ - { ISFUNC, (Function *)0x0 }, /* Meta-% */ - { ISFUNC, rl_tilde_expand }, /* Meta-& */ - { ISFUNC, (Function *)0x0 }, /* Meta-' */ - { ISFUNC, (Function *)0x0 }, /* Meta-( */ - { ISFUNC, (Function *)0x0 }, /* Meta-) */ + { ISFUNC, rl_set_mark }, /* Meta-SPACE */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-! */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-" */ + { ISFUNC, rl_insert_comment }, /* Meta-# */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-$ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-% */ + { ISFUNC, rl_tilde_expand }, /* Meta-& */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-' */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-( */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-) */ { ISFUNC, rl_insert_completions }, /* Meta-* */ - { ISFUNC, (Function *)0x0 }, /* Meta-+ */ - { ISFUNC, (Function *)0x0 }, /* Meta-, */ - { ISFUNC, rl_digit_argument }, /* Meta-- */ - { ISFUNC, rl_yank_last_arg}, /* Meta-. */ - { ISFUNC, (Function *)0x0 }, /* Meta-/ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-+ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-, */ + { ISFUNC, rl_digit_argument }, /* Meta-- */ + { ISFUNC, rl_yank_last_arg}, /* Meta-. */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-/ */ /* Regular digits. */ - { ISFUNC, rl_digit_argument }, /* Meta-0 */ - { ISFUNC, rl_digit_argument }, /* Meta-1 */ - { ISFUNC, rl_digit_argument }, /* Meta-2 */ - { ISFUNC, rl_digit_argument }, /* Meta-3 */ - { ISFUNC, rl_digit_argument }, /* Meta-4 */ - { ISFUNC, rl_digit_argument }, /* Meta-5 */ - { ISFUNC, rl_digit_argument }, /* Meta-6 */ - { ISFUNC, rl_digit_argument }, /* Meta-7 */ - { ISFUNC, rl_digit_argument }, /* Meta-8 */ - { ISFUNC, rl_digit_argument }, /* Meta-9 */ + { ISFUNC, rl_digit_argument }, /* Meta-0 */ + { ISFUNC, rl_digit_argument }, /* Meta-1 */ + { ISFUNC, rl_digit_argument }, /* Meta-2 */ + { ISFUNC, rl_digit_argument }, /* Meta-3 */ + { ISFUNC, rl_digit_argument }, /* Meta-4 */ + { ISFUNC, rl_digit_argument }, /* Meta-5 */ + { ISFUNC, rl_digit_argument }, /* Meta-6 */ + { ISFUNC, rl_digit_argument }, /* Meta-7 */ + { ISFUNC, rl_digit_argument }, /* Meta-8 */ + { ISFUNC, rl_digit_argument }, /* Meta-9 */ /* A little more punctuation. */ - { ISFUNC, (Function *)0x0 }, /* Meta-: */ - { ISFUNC, (Function *)0x0 }, /* Meta-; */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-: */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-; */ { ISFUNC, rl_beginning_of_history }, /* Meta-< */ { ISFUNC, rl_possible_completions }, /* Meta-= */ { ISFUNC, rl_end_of_history }, /* Meta-> */ { ISFUNC, rl_possible_completions }, /* Meta-? */ - { ISFUNC, (Function *)0x0 }, /* Meta-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-@ */ /* Uppercase alphabet. */ { ISFUNC, rl_do_lowercase_version }, /* Meta-A */ @@ -430,456 +418,456 @@ KEYMAP_ENTRY_ARRAY emacs_meta_keymap = { { ISFUNC, rl_do_lowercase_version }, /* Meta-Z */ /* Some more punctuation. */ - { ISFUNC, (Function *)0x0 }, /* Meta-[ */ /* was rl_arrow_keys */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-[ */ /* was rl_arrow_keys */ { ISFUNC, rl_delete_horizontal_space }, /* Meta-\ */ - { ISFUNC, (Function *)0x0 }, /* Meta-] */ - { ISFUNC, (Function *)0x0 }, /* Meta-^ */ - { ISFUNC, rl_yank_last_arg }, /* Meta-_ */ - { ISFUNC, (Function *)0x0 }, /* Meta-` */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-^ */ + { ISFUNC, rl_yank_last_arg }, /* Meta-_ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-` */ /* Lowercase alphabet. */ - { ISFUNC, (Function *)0x0 }, /* Meta-a */ - { ISFUNC, rl_backward_word }, /* Meta-b */ - { ISFUNC, rl_capitalize_word }, /* Meta-c */ - { ISFUNC, rl_kill_word }, /* Meta-d */ - { ISFUNC, (Function *)0x0 }, /* Meta-e */ - { ISFUNC, rl_forward_word }, /* Meta-f */ - { ISFUNC, (Function *)0x0 }, /* Meta-g */ - { ISFUNC, (Function *)0x0 }, /* Meta-h */ - { ISFUNC, (Function *)0x0 }, /* Meta-i */ - { ISFUNC, (Function *)0x0 }, /* Meta-j */ - { ISFUNC, (Function *)0x0 }, /* Meta-k */ - { ISFUNC, rl_downcase_word }, /* Meta-l */ - { ISFUNC, (Function *)0x0 }, /* Meta-m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-a */ + { ISFUNC, rl_backward_word }, /* Meta-b */ + { ISFUNC, rl_capitalize_word }, /* Meta-c */ + { ISFUNC, rl_kill_word }, /* Meta-d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-e */ + { ISFUNC, rl_forward_word }, /* Meta-f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-i */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-k */ + { ISFUNC, rl_downcase_word }, /* Meta-l */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-m */ { ISFUNC, rl_noninc_forward_search }, /* Meta-n */ - { ISFUNC, (Function *)0x0 }, /* Meta-o */ /* was rl_arrow_keys */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-o */ /* was rl_arrow_keys */ { ISFUNC, rl_noninc_reverse_search }, /* Meta-p */ - { ISFUNC, (Function *)0x0 }, /* Meta-q */ - { ISFUNC, rl_revert_line }, /* Meta-r */ - { ISFUNC, (Function *)0x0 }, /* Meta-s */ - { ISFUNC, rl_transpose_words }, /* Meta-t */ - { ISFUNC, rl_upcase_word }, /* Meta-u */ - { ISFUNC, (Function *)0x0 }, /* Meta-v */ - { ISFUNC, (Function *)0x0 }, /* Meta-w */ - { ISFUNC, (Function *)0x0 }, /* Meta-x */ - { ISFUNC, rl_yank_pop }, /* Meta-y */ - { ISFUNC, (Function *)0x0 }, /* Meta-z */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-q */ + { ISFUNC, rl_revert_line }, /* Meta-r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-s */ + { ISFUNC, rl_transpose_words }, /* Meta-t */ + { ISFUNC, rl_upcase_word }, /* Meta-u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-x */ + { ISFUNC, rl_yank_pop }, /* Meta-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-z */ /* Final punctuation. */ - { ISFUNC, (Function *)0x0 }, /* Meta-{ */ - { ISFUNC, (Function *)0x0 }, /* Meta-| */ - { ISFUNC, (Function *)0x0 }, /* Meta-} */ - { ISFUNC, rl_tilde_expand }, /* Meta-~ */ - { ISFUNC, rl_backward_kill_word }, /* Meta-rubout */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-{ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-| */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-} */ + { ISFUNC, rl_tilde_expand }, /* Meta-~ */ + { ISFUNC, rl_backward_kill_word }, /* Meta-rubout */ #if KEYMAP_SIZE > 128 /* Undefined keys. */ - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 } + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 } #endif /* KEYMAP_SIZE > 128 */ }; KEYMAP_ENTRY_ARRAY emacs_ctlx_keymap = { /* Control keys. */ - { ISFUNC, (Function *)0x0 }, /* Control-@ */ - { ISFUNC, (Function *)0x0 }, /* Control-a */ - { ISFUNC, (Function *)0x0 }, /* Control-b */ - { ISFUNC, (Function *)0x0 }, /* Control-c */ - { ISFUNC, (Function *)0x0 }, /* Control-d */ - { ISFUNC, (Function *)0x0 }, /* Control-e */ - { ISFUNC, (Function *)0x0 }, /* Control-f */ - { ISFUNC, rl_abort }, /* Control-g */ - { ISFUNC, (Function *)0x0 }, /* Control-h */ - { ISFUNC, (Function *)0x0 }, /* Control-i */ - { ISFUNC, (Function *)0x0 }, /* Control-j */ - { ISFUNC, (Function *)0x0 }, /* Control-k */ - { ISFUNC, (Function *)0x0 }, /* Control-l */ - { ISFUNC, (Function *)0x0 }, /* Control-m */ - { ISFUNC, (Function *)0x0 }, /* Control-n */ - { ISFUNC, (Function *)0x0 }, /* Control-o */ - { ISFUNC, (Function *)0x0 }, /* Control-p */ - { ISFUNC, (Function *)0x0 }, /* Control-q */ - { ISFUNC, rl_re_read_init_file }, /* Control-r */ - { ISFUNC, (Function *)0x0 }, /* Control-s */ - { ISFUNC, (Function *)0x0 }, /* Control-t */ - { ISFUNC, rl_undo_command }, /* Control-u */ - { ISFUNC, (Function *)0x0 }, /* Control-v */ - { ISFUNC, (Function *)0x0 }, /* Control-w */ - { ISFUNC, rl_exchange_point_and_mark },/* Control-x */ - { ISFUNC, (Function *)0x0 }, /* Control-y */ - { ISFUNC, (Function *)0x0 }, /* Control-z */ - { ISFUNC, (Function *)0x0 }, /* Control-[ */ - { ISFUNC, (Function *)0x0 }, /* Control-\ */ - { ISFUNC, (Function *)0x0 }, /* Control-] */ - { ISFUNC, (Function *)0x0 }, /* Control-^ */ - { ISFUNC, (Function *)0x0 }, /* Control-_ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ + { ISFUNC, rl_abort }, /* Control-g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */ + { ISFUNC, rl_re_read_init_file }, /* Control-r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */ + { ISFUNC, rl_undo_command }, /* Control-u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */ + { ISFUNC, rl_exchange_point_and_mark }, /* Control-x */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-_ */ /* The start of printing characters. */ - { ISFUNC, (Function *)0x0 }, /* SPACE */ - { ISFUNC, (Function *)0x0 }, /* ! */ - { ISFUNC, (Function *)0x0 }, /* " */ - { ISFUNC, (Function *)0x0 }, /* # */ - { ISFUNC, (Function *)0x0 }, /* $ */ - { ISFUNC, (Function *)0x0 }, /* % */ - { ISFUNC, (Function *)0x0 }, /* & */ - { ISFUNC, (Function *)0x0 }, /* ' */ - { ISFUNC, rl_start_kbd_macro }, /* ( */ - { ISFUNC, rl_end_kbd_macro }, /* ) */ - { ISFUNC, (Function *)0x0 }, /* * */ - { ISFUNC, (Function *)0x0 }, /* + */ - { ISFUNC, (Function *)0x0 }, /* , */ - { ISFUNC, (Function *)0x0 }, /* - */ - { ISFUNC, (Function *)0x0 }, /* . */ - { ISFUNC, (Function *)0x0 }, /* / */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* # */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* % */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* & */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ + { ISFUNC, rl_start_kbd_macro }, /* ( */ + { ISFUNC, rl_end_kbd_macro }, /* ) */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* * */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* + */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* , */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* - */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* . */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* / */ /* Regular digits. */ - { ISFUNC, (Function *)0x0 }, /* 0 */ - { ISFUNC, (Function *)0x0 }, /* 1 */ - { ISFUNC, (Function *)0x0 }, /* 2 */ - { ISFUNC, (Function *)0x0 }, /* 3 */ - { ISFUNC, (Function *)0x0 }, /* 4 */ - { ISFUNC, (Function *)0x0 }, /* 5 */ - { ISFUNC, (Function *)0x0 }, /* 6 */ - { ISFUNC, (Function *)0x0 }, /* 7 */ - { ISFUNC, (Function *)0x0 }, /* 8 */ - { ISFUNC, (Function *)0x0 }, /* 9 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 0 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 1 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 2 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 3 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 4 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 5 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 6 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 7 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 8 */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* 9 */ /* A little more punctuation. */ - { ISFUNC, (Function *)0x0 }, /* : */ - { ISFUNC, (Function *)0x0 }, /* ; */ - { ISFUNC, (Function *)0x0 }, /* < */ - { ISFUNC, (Function *)0x0 }, /* = */ - { ISFUNC, (Function *)0x0 }, /* > */ - { ISFUNC, (Function *)0x0 }, /* ? */ - { ISFUNC, (Function *)0x0 }, /* @ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* = */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ /* Uppercase alphabet. */ - { ISFUNC, rl_do_lowercase_version }, /* A */ - { ISFUNC, rl_do_lowercase_version }, /* B */ - { ISFUNC, rl_do_lowercase_version }, /* C */ - { ISFUNC, rl_do_lowercase_version }, /* D */ - { ISFUNC, rl_do_lowercase_version }, /* E */ - { ISFUNC, rl_do_lowercase_version }, /* F */ - { ISFUNC, rl_do_lowercase_version }, /* G */ - { ISFUNC, rl_do_lowercase_version }, /* H */ - { ISFUNC, rl_do_lowercase_version }, /* I */ - { ISFUNC, rl_do_lowercase_version }, /* J */ - { ISFUNC, rl_do_lowercase_version }, /* K */ - { ISFUNC, rl_do_lowercase_version }, /* L */ - { ISFUNC, rl_do_lowercase_version }, /* M */ - { ISFUNC, rl_do_lowercase_version }, /* N */ - { ISFUNC, rl_do_lowercase_version }, /* O */ - { ISFUNC, rl_do_lowercase_version }, /* P */ - { ISFUNC, rl_do_lowercase_version }, /* Q */ - { ISFUNC, rl_do_lowercase_version }, /* R */ - { ISFUNC, rl_do_lowercase_version }, /* S */ - { ISFUNC, rl_do_lowercase_version }, /* T */ - { ISFUNC, rl_do_lowercase_version }, /* U */ - { ISFUNC, rl_do_lowercase_version }, /* V */ - { ISFUNC, rl_do_lowercase_version }, /* W */ - { ISFUNC, rl_do_lowercase_version }, /* X */ - { ISFUNC, rl_do_lowercase_version }, /* Y */ - { ISFUNC, rl_do_lowercase_version }, /* Z */ + { ISFUNC, rl_do_lowercase_version }, /* A */ + { ISFUNC, rl_do_lowercase_version }, /* B */ + { ISFUNC, rl_do_lowercase_version }, /* C */ + { ISFUNC, rl_do_lowercase_version }, /* D */ + { ISFUNC, rl_do_lowercase_version }, /* E */ + { ISFUNC, rl_do_lowercase_version }, /* F */ + { ISFUNC, rl_do_lowercase_version }, /* G */ + { ISFUNC, rl_do_lowercase_version }, /* H */ + { ISFUNC, rl_do_lowercase_version }, /* I */ + { ISFUNC, rl_do_lowercase_version }, /* J */ + { ISFUNC, rl_do_lowercase_version }, /* K */ + { ISFUNC, rl_do_lowercase_version }, /* L */ + { ISFUNC, rl_do_lowercase_version }, /* M */ + { ISFUNC, rl_do_lowercase_version }, /* N */ + { ISFUNC, rl_do_lowercase_version }, /* O */ + { ISFUNC, rl_do_lowercase_version }, /* P */ + { ISFUNC, rl_do_lowercase_version }, /* Q */ + { ISFUNC, rl_do_lowercase_version }, /* R */ + { ISFUNC, rl_do_lowercase_version }, /* S */ + { ISFUNC, rl_do_lowercase_version }, /* T */ + { ISFUNC, rl_do_lowercase_version }, /* U */ + { ISFUNC, rl_do_lowercase_version }, /* V */ + { ISFUNC, rl_do_lowercase_version }, /* W */ + { ISFUNC, rl_do_lowercase_version }, /* X */ + { ISFUNC, rl_do_lowercase_version }, /* Y */ + { ISFUNC, rl_do_lowercase_version }, /* Z */ /* Some more punctuation. */ - { ISFUNC, (Function *)0x0 }, /* [ */ - { ISFUNC, (Function *)0x0 }, /* \ */ - { ISFUNC, (Function *)0x0 }, /* ] */ - { ISFUNC, (Function *)0x0 }, /* ^ */ - { ISFUNC, (Function *)0x0 }, /* _ */ - { ISFUNC, (Function *)0x0 }, /* ` */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */ /* Lowercase alphabet. */ - { ISFUNC, (Function *)0x0 }, /* a */ - { ISFUNC, (Function *)0x0 }, /* b */ - { ISFUNC, (Function *)0x0 }, /* c */ - { ISFUNC, (Function *)0x0 }, /* d */ - { ISFUNC, rl_call_last_kbd_macro }, /* e */ - { ISFUNC, (Function *)0x0 }, /* f */ - { ISFUNC, (Function *)0x0 }, /* g */ - { ISFUNC, (Function *)0x0 }, /* h */ - { ISFUNC, (Function *)0x0 }, /* i */ - { ISFUNC, (Function *)0x0 }, /* j */ - { ISFUNC, (Function *)0x0 }, /* k */ - { ISFUNC, (Function *)0x0 }, /* l */ - { ISFUNC, (Function *)0x0 }, /* m */ - { ISFUNC, (Function *)0x0 }, /* n */ - { ISFUNC, (Function *)0x0 }, /* o */ - { ISFUNC, (Function *)0x0 }, /* p */ - { ISFUNC, (Function *)0x0 }, /* q */ - { ISFUNC, (Function *)0x0 }, /* r */ - { ISFUNC, (Function *)0x0 }, /* s */ - { ISFUNC, (Function *)0x0 }, /* t */ - { ISFUNC, (Function *)0x0 }, /* u */ - { ISFUNC, (Function *)0x0 }, /* v */ - { ISFUNC, (Function *)0x0 }, /* w */ - { ISFUNC, (Function *)0x0 }, /* x */ - { ISFUNC, (Function *)0x0 }, /* y */ - { ISFUNC, (Function *)0x0 }, /* z */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* d */ + { ISFUNC, rl_call_last_kbd_macro }, /* e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* i */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* l */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* t */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* x */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ /* Final punctuation. */ - { ISFUNC, (Function *)0x0 }, /* { */ - { ISFUNC, (Function *)0x0 }, /* | */ - { ISFUNC, (Function *)0x0 }, /* } */ - { ISFUNC, (Function *)0x0 }, /* ~ */ - { ISFUNC, rl_backward_kill_line }, /* RUBOUT */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* | */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */ + { ISFUNC, rl_backward_kill_line }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Undefined keys. */ - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 } + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 } #endif /* KEYMAP_SIZE > 128 */ }; diff --git a/readline/funmap.c b/readline/funmap.c index 472119bd80a..fe9a1da43d7 100644 --- a/readline/funmap.c +++ b/readline/funmap.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,15 +18,13 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif -extern char *xmalloc (), *xrealloc (); - #if !defined (BUFSIZ) #include #endif /* BUFSIZ */ @@ -40,7 +38,15 @@ extern char *xmalloc (), *xrealloc (); #include "rlconf.h" #include "readline.h" -extern int _rl_qsort_string_compare (); +#include "xmalloc.h" + +#ifdef __STDC__ +typedef int QSFUNC (const void *, const void *); +#else +typedef int QSFUNC (); +#endif + +extern int _rl_qsort_string_compare PARAMS((char **, char **)); FUNMAP **funmap; static int funmap_size; @@ -54,7 +60,8 @@ static FUNMAP default_funmap[] = { { "abort", rl_abort }, { "accept-line", rl_newline }, { "arrow-key-prefix", rl_arrow_keys }, - { "backward-char", rl_backward }, + { "backward-byte", rl_backward_byte }, + { "backward-char", rl_backward_char }, { "backward-delete-char", rl_rubout }, { "backward-kill-line", rl_backward_kill_line }, { "backward-kill-word", rl_backward_kill_word }, @@ -85,7 +92,8 @@ static FUNMAP default_funmap[] = { { "end-of-line", rl_end_of_line }, { "exchange-point-and-mark", rl_exchange_point_and_mark }, { "forward-backward-delete-char", rl_rubout_or_delete }, - { "forward-char", rl_forward }, + { "forward-byte", rl_forward_byte }, + { "forward-char", rl_forward_char }, { "forward-search-history", rl_forward_search_history }, { "forward-word", rl_forward_word }, { "history-search-backward", rl_history_search_backward }, @@ -102,7 +110,8 @@ static FUNMAP default_funmap[] = { { "non-incremental-reverse-search-history", rl_noninc_reverse_search }, { "non-incremental-forward-search-history-again", rl_noninc_forward_search_again }, { "non-incremental-reverse-search-history-again", rl_noninc_reverse_search_again }, -#ifdef __CYGWIN32__ + { "overwrite-mode", rl_overwrite_mode }, +#ifdef __CYGWIN__ { "paste-from-clipboard", rl_paste_from_clipboard }, #endif { "possible-completions", rl_possible_completions }, @@ -136,7 +145,6 @@ static FUNMAP default_funmap[] = { { "vi-arg-digit", rl_vi_arg_digit }, { "vi-back-to-indent", rl_vi_back_to_indent }, { "vi-bWord", rl_vi_bWord }, - { "vi-bracktype", rl_vi_bracktype }, { "vi-bword", rl_vi_bword }, { "vi-change-case", rl_vi_change_case }, { "vi-change-char", rl_vi_change_char }, @@ -176,18 +184,20 @@ static FUNMAP default_funmap[] = { { "vi-yank-to", rl_vi_yank_to }, #endif /* VI_MODE */ - {(char *)NULL, (Function *)NULL } + {(char *)NULL, (rl_command_func_t *)NULL } }; int -rl_add_funmap_entry (const char *name, Function *function) +rl_add_funmap_entry (name, function) + const char *name; + rl_command_func_t *function; { if (funmap_entry + 2 >= funmap_size) { funmap_size += 64; funmap = (FUNMAP **)xrealloc (funmap, funmap_size * sizeof (FUNMAP *)); } - + funmap[funmap_entry] = (FUNMAP *)xmalloc (sizeof (FUNMAP)); funmap[funmap_entry]->name = name; funmap[funmap_entry]->function = function; @@ -217,36 +227,27 @@ rl_initialize_funmap () /* Produce a NULL terminated array of known function names. The array is sorted. The array itself is allocated, but not the strings inside. You should free () the array when you done, but not the pointrs. */ -char ** +const char ** rl_funmap_names () { - char **result; + const char **result; int result_size, result_index; /* Make sure that the function map has been initialized. */ rl_initialize_funmap (); - for (result_index = result_size = 0, result = (char **)NULL; funmap[result_index]; result_index++) + for (result_index = result_size = 0, result = (const char **)NULL; funmap[result_index]; result_index++) { if (result_index + 2 > result_size) { result_size += 20; - result = (char **)xrealloc (result, result_size * sizeof (char *)); + result = (const char **)xrealloc (result, result_size * sizeof (char *)); } - result[result_index] = (char*) funmap[result_index]->name; + result[result_index] = funmap[result_index]->name; result[result_index + 1] = (char *)NULL; } - qsort (result, result_index, sizeof (char *), _rl_qsort_string_compare); + qsort (result, result_index, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); return (result); } - -/* Things that mean `Control'. */ -const char *possible_control_prefixes[] = { - "Control-", "C-", "CTRL-", (char *)NULL -}; - -const char *possible_meta_prefixes[] = { - "Meta", "M-", (char *)NULL -}; diff --git a/readline/histexpand.c b/readline/histexpand.c index f78838ef2ba..a98067956c2 100644 --- a/readline/histexpand.c +++ b/readline/histexpand.c @@ -7,7 +7,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY @@ -41,18 +41,21 @@ # include #endif -#if defined (HAVE_STRING_H) -# include -#else -# include -#endif /* !HAVE_STRING_H */ +#include "rlmbutil.h" #include "history.h" #include "histlib.h" +#include "rlshell.h" +#include "xmalloc.h" + #define HISTORY_WORD_DELIMITERS " \t\n;&()|<>" #define HISTORY_QUOTE_CHARACTERS "\"'`" +typedef int _hist_search_func_t PARAMS((const char *, int)); + +extern int rl_byte_oriented; /* declared in mbutil.c */ + static char error_pointer; static char *subst_lhs; @@ -60,15 +63,10 @@ static char *subst_rhs; static int subst_lhs_len; static int subst_rhs_len; -static char *get_history_word_specifier (); -static char *history_find_word (); +static char *get_history_word_specifier PARAMS((char *, char *, int *)); +static char *history_find_word PARAMS((char *, int)); -extern int history_offset; - -extern char *single_quote (); -static char *quote_breaks (); - -extern char *xmalloc (), *xrealloc (); +static char *quote_breaks PARAMS((char *)); /* Variables exported by this file. */ /* The character that represents the start of a history expansion @@ -87,15 +85,18 @@ char history_comment_char = '\0'; /* The list of characters which inhibit the expansion of text if found immediately following history_expansion_char. */ -const char *history_no_expand_chars = " \t\n\r="; +char *history_no_expand_chars = (char*)" \t\n\r="; /* If set to a non-zero value, single quotes inhibit history expansion. The default is 0. */ int history_quotes_inhibit_expansion = 0; +/* Used to split words by history_tokenize_internal. */ +char *history_word_delimiters = (char*)HISTORY_WORD_DELIMITERS; + /* If set, this points to a function that is called to verify that a particular history expansion should be performed. */ -Function *history_inhibit_expansion_function; +rl_linebuf_func_t *history_inhibit_expansion_function; /* **************************************************************** */ /* */ @@ -124,7 +125,7 @@ static char *search_match; line = get_history_event ("!echo:p", &index, 0); */ char * get_history_event (string, caller_index, delimiting_quote) - char *string; + const char *string; int *caller_index; int delimiting_quote; { @@ -132,7 +133,7 @@ get_history_event (string, caller_index, delimiting_quote) register char c; HIST_ENTRY *entry; int which, sign, local_index, substring_okay; - Function *search_func; + _hist_search_func_t *search_func; char *temp; /* The event can be specified in a number of ways. @@ -201,15 +202,33 @@ get_history_event (string, caller_index, delimiting_quote) /* Only a closing `?' or a newline delimit a substring search string. */ for (local_index = i; (c = string[i]); i++) - if ((!substring_okay && (whitespace (c) || c == ':' || - (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) || - string[i] == delimiting_quote)) || - string[i] == '\n' || - (substring_okay && string[i] == '?')) - break; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int v; + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); + /* These produce warnings because we're passing a const string to a + function that takes a non-const string. */ + _rl_adjust_point (string, i, &ps); + if ((v = _rl_get_char_len (string + i, &ps)) > 1) + { + i += v - 1; + continue; + } + } + else +#endif /* HANDLE_MULTIBYTE */ + if ((!substring_okay && (whitespace (c) || c == ':' || + (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) || + string[i] == delimiting_quote)) || + string[i] == '\n' || + (substring_okay && string[i] == '?')) + break; which = i - local_index; - temp = xmalloc (1 + which); + temp = (char *)xmalloc (1 + which); if (which) strncpy (temp, string + local_index, which); temp[which] = '\0'; @@ -249,7 +268,7 @@ get_history_event (string, caller_index, delimiting_quote) { entry = current_history (); history_offset = history_length; - + /* If this was a substring search, then remember the string that we matched for word substitution. */ if (substring_okay) @@ -311,7 +330,7 @@ quote_breaks (s) len += 2; } - r = ret = xmalloc (len); + r = ret = (char *)xmalloc (len); *r++ = '\''; for (p = s; p && *p; ) { @@ -376,7 +395,7 @@ hist_error(s, start, current, errtype) break; } - temp = xmalloc (ll + elen + 3); + temp = (char *)xmalloc (ll + elen + 3); strncpy (temp, s + start, ll); temp[ll] = ':'; temp[ll + 1] = ' '; @@ -402,17 +421,37 @@ get_subst_pattern (str, iptr, delimiter, is_rhs, lenptr) int *iptr, delimiter, is_rhs, *lenptr; { register int si, i, j, k; - char *s = (char *) NULL; + char *s; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; +#endif + s = (char *)NULL; i = *iptr; +#if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); + _rl_adjust_point (str, i, &ps); +#endif + for (si = i; str[si] && str[si] != delimiter; si++) - if (str[si] == '\\' && str[si + 1] == delimiter) - si++; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int v; + if ((v = _rl_get_char_len (str + si, &ps)) > 1) + si += v - 1; + else if (str[si] == '\\' && str[si + 1] == delimiter) + si++; + } + else +#endif /* HANDLE_MULTIBYTE */ + if (str[si] == '\\' && str[si + 1] == delimiter) + si++; if (si > i || is_rhs) { - s = xmalloc (si - i + 1); + s = (char *)xmalloc (si - i + 1); for (j = 0, k = i; k < si; j++, k++) { /* Remove a backslash quoting the search string delimiter. */ @@ -439,13 +478,13 @@ postproc_subst_rhs () char *new; int i, j, new_size; - new = xmalloc (new_size = subst_rhs_len + subst_lhs_len); + new = (char *)xmalloc (new_size = subst_rhs_len + subst_lhs_len); for (i = j = 0; i < subst_rhs_len; i++) { if (subst_rhs[i] == '&') { if (j + subst_lhs_len >= new_size) - new = xrealloc (new, (new_size = new_size * 2 + subst_lhs_len)); + new = (char *)xrealloc (new, (new_size = new_size * 2 + subst_lhs_len)); strcpy (new + j, subst_lhs); j += subst_lhs_len; } @@ -455,7 +494,7 @@ postproc_subst_rhs () if (subst_rhs[i] == '\\' && subst_rhs[i + 1] == '&') i++; if (j >= new_size) - new = xrealloc (new, new_size *= 2); + new = (char *)xrealloc (new, new_size *= 2); new[j++] = subst_rhs[i]; } } @@ -481,8 +520,13 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) int substitute_globally, want_quotes, print_only; char *event, *temp, *result, *tstr, *t, c, *word_spec; int result_len; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; - result = xmalloc (result_len = 128); + memset (&ps, 0, sizeof (mbstate_t)); +#endif + + result = (char *)xmalloc (result_len = 128); i = start; @@ -511,11 +555,24 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) quote, then this expansion takes place inside of the quoted string. If we have to search for some text ("!foo"), allow the delimiter to end the search string. */ - if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) - quoted_search_delimiter = string[i - 1]; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int c, l; + l = _rl_find_prev_mbchar (string, i, MB_FIND_ANY); + c = string[l]; + /* XXX - original patch had i - 1 ??? If i == 0 it would fail. */ + if (i && (c == '\'' || c == '"')) + quoted_search_delimiter = c; + } + else +#endif /* HANDLE_MULTIBYTE */ + if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) + quoted_search_delimiter = string[i - 1]; + event = get_history_event (string, &i, quoted_search_delimiter); } - + if (event == 0) { *ret_string = hist_error (string, start, i, EVENT_NOT_FOUND); @@ -625,13 +682,26 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) case '&': case 's': { - char *new_event, *t; + char *new_event; int delimiter, failed, si, l_temp; if (c == 's') { if (i + 2 < (int)strlen (string)) - delimiter = string[i + 2]; + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + _rl_adjust_point (string, i + 2, &ps); + if (_rl_get_char_len (string + i + 2, &ps) > 1) + delimiter = 0; + else + delimiter = string[i + 2]; + } + else +#endif /* HANDLE_MULTIBYTE */ + delimiter = string[i + 2]; + } else break; /* no search delimiter */ @@ -695,7 +765,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) if (STREQN (temp+si, subst_lhs, subst_lhs_len)) { int len = subst_rhs_len - subst_lhs_len + l_temp; - new_event = xmalloc (1 + len); + new_event = (char *)xmalloc (1 + len); strncpy (new_event, temp, si); strncpy (new_event + si, subst_rhs, subst_rhs_len); strncpy (new_event + si + subst_rhs_len, @@ -744,7 +814,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) char *x; if (want_quotes == 'q') - x = single_quote (temp); + x = sh_single_quote (temp); else if (want_quotes == 'x') x = quote_breaks (temp); else @@ -756,7 +826,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) n = strlen (temp); if (n >= result_len) - result = xrealloc (result, n + 2); + result = (char *)xrealloc (result, n + 2); strcpy (result, temp); free (temp); @@ -787,7 +857,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) { \ while (j >= result_len) \ result_len += 128; \ - result = xrealloc (result, result_len); \ + result = (char *)xrealloc (result, result_len); \ } \ strcpy (result + j - sl, s); \ } \ @@ -797,7 +867,7 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line) do \ { \ if (j >= result_len - 1) \ - result = xrealloc (result, result_len += 64); \ + result = (char *)xrealloc (result, result_len += 64); \ result[j++] = c; \ result[j] = '\0'; \ } \ @@ -816,9 +886,17 @@ history_expand (hstring, output) int result_len; char *result; +#if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; + mbstate_t ps; +#endif + /* Used when adding the string. */ char *temp; + if (output == 0) + return 0; + /* Setting the history expansion character to 0 inhibits all history expansion. */ if (history_expansion_char == 0) @@ -826,9 +904,9 @@ history_expand (hstring, output) *output = savestring (hstring); return (0); } - + /* Prepare the buffer for printing error messages. */ - result = xmalloc (result_len = 256); + result = (char *)xmalloc (result_len = 256); result[0] = '\0'; only_printing = modified = 0; @@ -845,7 +923,7 @@ history_expand (hstring, output) that is the substitution that we do. */ if (hstring[0] == history_subst_char) { - string = xmalloc (l + 5); + string = (char *)xmalloc (l + 5); string[0] = string[1] = history_expansion_char; string[2] = ':'; @@ -855,6 +933,10 @@ history_expand (hstring, output) } else { +#if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); +#endif + string = hstring; /* If not quick substitution, still maybe have to do expansion. */ @@ -862,13 +944,26 @@ history_expand (hstring, output) is NOT an expansion. */ for (i = 0; string[i]; i++) { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int v; + v = _rl_get_char_len (string + i, &ps); + if (v > 1) + { + i += v - 1; + continue; + } + } +#endif /* HANDLE_MULTIBYTE */ + cc = string[i + 1]; - /* The history_comment_char, if set, appearing that the beginning + /* The history_comment_char, if set, appearing at the beginning of a word signifies that the rest of the line should not have history expansion performed on it. Skip the rest of the line and break out of the loop. */ if (history_comment_char && string[i] == history_comment_char && - (i == 0 || member (string[i - 1], HISTORY_WORD_DELIMITERS))) + (i == 0 || member (string[i - 1], history_word_delimiters))) { while (string[i]) i++; @@ -905,7 +1000,7 @@ history_expand (hstring, output) i++; } } - + if (string[i] != history_expansion_char) { free (result); @@ -926,6 +1021,30 @@ history_expand (hstring, output) continue; } +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int k, c; + + c = tchar; + memset (mb, 0, sizeof (mb)); + for (k = 0; k < MB_LEN_MAX; k++) + { + mb[k] = (char)c; + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_get_char_len (mb, &ps) == -2) + c = string[++i]; + else + break; + } + if (strlen (mb) > 1) + { + ADD_STRING (mb); + break; + } + } +#endif /* HANDLE_MULTIBYTE */ + if (tchar == history_expansion_char) tchar = -3; else if (tchar == history_comment_char) @@ -954,7 +1073,7 @@ history_expand (hstring, output) hist_string_extract_single_quoted (string, &i); slen = i - quote + 2; - temp = xmalloc (slen); + temp = (char *)xmalloc (slen); strncpy (temp, string + quote, slen); temp[slen - 1] = '\0'; ADD_STRING (temp); @@ -966,9 +1085,9 @@ history_expand (hstring, output) } case -2: /* history_comment_char */ - if (i == 0 || member (string[i - 1], HISTORY_WORD_DELIMITERS)) + if (i == 0 || member (string[i - 1], history_word_delimiters)) { - temp = xmalloc (l - i + 1); + temp = (char *)xmalloc (l - i + 1); strcpy (temp, string + i); ADD_STRING (temp); free (temp); @@ -1000,7 +1119,7 @@ history_expand (hstring, output) { if (result) { - temp = xmalloc (1 + strlen (result)); + temp = (char *)xmalloc (1 + strlen (result)); strcpy (temp, result); ADD_STRING (temp); free (temp); @@ -1134,7 +1253,14 @@ get_history_word_specifier (spec, from, caller_index) i++; last = '$'; } - else if (!spec[i] || spec[i] == ':') /* could be modifier separator */ +#if 0 + else if (!spec[i] || spec[i] == ':') + /* check against `:' because there could be a modifier separator */ +#else + else + /* csh seems to allow anything to terminate the word spec here, + leaving it as an abbreviation. */ +#endif last = -1; /* x- abbreviates x-$ omitting word `$' */ } @@ -1154,7 +1280,7 @@ get_history_word_specifier (spec, from, caller_index) char * history_arg_extract (first, last, string) int first, last; - char *string; + const char *string; { register int i, len; char *result; @@ -1190,7 +1316,7 @@ history_arg_extract (first, last, string) { for (size = 0, i = first; i < last; i++) size += strlen (list[i]) + 1; - result = xmalloc (size + 1); + result = (char *)xmalloc (size + 1); result[0] = '\0'; for (i = first, offset = 0; i < last; i++) @@ -1220,13 +1346,18 @@ history_arg_extract (first, last, string) *INDP. */ static char ** history_tokenize_internal (string, wind, indp) - char *string; + const char *string; int wind, *indp; { char **result; register int i, start, result_index, size; int len, delimiter; + /* If we're searching for a string that's not part of a word (e.g., " "), + make sure we set *INDP to a reasonable value. */ + if (indp && wind != -1) + *indp = -1; + /* Get a token, and stuff it into RESULT. The tokens are split exactly where the shell would split them. */ for (i = result_index = size = 0, result = (char **)NULL; string[i]; ) @@ -1240,7 +1371,7 @@ history_tokenize_internal (string, wind, indp) return (result); start = i; - + if (member (string[i], "()\n")) { i++; @@ -1301,7 +1432,7 @@ history_tokenize_internal (string, wind, indp) continue; } - if (!delimiter && (member (string[i], HISTORY_WORD_DELIMITERS))) + if (!delimiter && (member (string[i], history_word_delimiters))) break; if (!delimiter && member (string[i], HISTORY_QUOTE_CHARACTERS)) @@ -1318,7 +1449,7 @@ history_tokenize_internal (string, wind, indp) len = i - start; if (result_index + 2 >= size) result = (char **)xrealloc (result, ((size += 10) * sizeof (char *))); - result[result_index] = xmalloc (1 + len); + result[result_index] = (char *)xmalloc (1 + len); strncpy (result[result_index], string + start, len); result[result_index][len] = '\0'; result[++result_index] = (char *)NULL; @@ -1331,7 +1462,7 @@ history_tokenize_internal (string, wind, indp) parsed out of STRING. */ char ** history_tokenize (string) - char *string; + const char *string; { return (history_tokenize_internal (string, -1, (int *)NULL)); } @@ -1348,7 +1479,7 @@ history_find_word (line, ind) int i, wind; words = history_tokenize_internal (line, ind, &wind); - if (wind == -1) + if (wind == -1 || words == 0) return ((char *)NULL); s = words[wind]; for (i = 0; i < wind; i++) diff --git a/readline/histfile.c b/readline/histfile.c index 1da45b00b58..60a91251b7a 100644 --- a/readline/histfile.c +++ b/readline/histfile.c @@ -7,7 +7,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ /* The goal is to make the implementation transparent, so that you don't have to know what data types are used, just what functions @@ -35,7 +35,7 @@ #ifndef _MINIX # include #endif -#include +#include "posixstat.h" #include #if defined (HAVE_STDLIB_H) @@ -48,21 +48,39 @@ # include #endif -#if defined (HAVE_STRING_H) -# include -#else -# include -#endif /* !HAVE_STRING_H */ +#if defined (__EMX__) || defined (__CYGWIN__) +# undef HAVE_MMAP +#endif -#if defined (__EMX__) +#ifdef HAVE_MMAP +# include + +# ifdef MAP_FILE +# define MAP_RFLAGS (MAP_FILE|MAP_PRIVATE) +# define MAP_WFLAGS (MAP_FILE|MAP_SHARED) +# else +# define MAP_RFLAGS MAP_PRIVATE +# define MAP_WFLAGS MAP_SHARED +# endif + +# ifndef MAP_FAILED +# define MAP_FAILED ((void *)-1) +# endif + +#endif /* HAVE_MMAP */ + +/* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment + on win 95/98/nt), we want to open files with O_BINARY mode so that there + is no \n -> \r\n conversion performed. On other systems, we don't want to + mess around with O_BINARY at all, so we ensure that it's defined to 0. */ +#if defined (__EMX__) || defined (__CYGWIN__) # ifndef O_BINARY # define O_BINARY 0 # endif -#else /* !__EMX__ */ - /* If we're not compiling for __EMX__, we don't want this at all. Ever. */ +#else /* !__EMX__ && !__CYGWIN__ */ # undef O_BINARY # define O_BINARY 0 -#endif /* !__EMX__ */ +#endif /* !__EMX__ && !__CYGWIN__ */ #include #if !defined (errno) @@ -72,17 +90,15 @@ extern int errno; #include "history.h" #include "histlib.h" -/* Functions imported from shell.c */ -extern char *get_env_value (); - -extern char *xmalloc (), *xrealloc (); +#include "rlshell.h" +#include "xmalloc.h" /* Return the string that should be used in the place of this filename. This only matters when you don't specify the filename to read_history (), or write_history (). */ static char * history_filename (filename) - char *filename; + const char *filename; { char *return_val; const char *home; @@ -92,8 +108,8 @@ history_filename (filename) if (return_val) return (return_val); - - home = get_env_value ("HOME"); + + home = sh_get_env_value ("HOME"); if (home == 0) { @@ -103,10 +119,14 @@ history_filename (filename) else home_len = strlen (home); - return_val = xmalloc (2 + home_len + 8); /* strlen(".history") == 8 */ + return_val = (char *)xmalloc (2 + home_len + 8); /* strlen(".history") == 8 */ strcpy (return_val, home); return_val[home_len] = '/'; +#if defined (__MSDOS__) + strcpy (return_val + home_len + 1, "_history"); +#else strcpy (return_val + home_len + 1, ".history"); +#endif return (return_val); } @@ -116,7 +136,7 @@ history_filename (filename) successful, or errno if not. */ int read_history (filename) - char *filename; + const char *filename; { return (read_history_range (filename, 0, -1)); } @@ -128,13 +148,14 @@ read_history (filename) ~/.history. Returns 0 if successful, or errno if not. */ int read_history_range (filename, from, to) - char *filename; + const char *filename; int from, to; { - char *input, *buffer; - int file, current_line; + register char *line_start, *line_end; + char *input, *buffer, *bufend; + int file, current_line, chars_read; struct stat finfo; - size_t line_start, line_end, file_size; + size_t file_size; buffer = (char *)NULL; input = history_filename (filename); @@ -150,57 +171,67 @@ read_history_range (filename, from, to) { #if defined (EFBIG) errno = EFBIG; +#elif defined (EOVERFLOW) + errno = EOVERFLOW; #endif goto error_and_exit; } - buffer = xmalloc (file_size + 1); -#if 0 - if (read (file, buffer, file_size) != file_size) +#ifdef HAVE_MMAP + /* We map read/write and private so we can change newlines to NULs without + affecting the underlying object. */ + buffer = (char *)mmap (0, file_size, PROT_READ|PROT_WRITE, MAP_RFLAGS, file, 0); + if ((void *)buffer == MAP_FAILED) + goto error_and_exit; + chars_read = file_size; #else - if (read (file, buffer, file_size) < 0) + buffer = (char *)malloc (file_size + 1); + if (buffer == 0) + goto error_and_exit; + + chars_read = read (file, buffer, file_size); #endif + if (chars_read < 0) { error_and_exit: + chars_read = errno; if (file >= 0) close (file); FREE (input); +#ifndef HAVE_MMAP FREE (buffer); +#endif - return (errno); + return (chars_read); } close (file); /* Set TO to larger than end of file if negative. */ if (to < 0) - to = file_size; + to = chars_read; /* Start at beginning of file, work to end. */ - line_start = line_end = current_line = 0; + bufend = buffer + chars_read; + current_line = 0; /* Skip lines until we are at FROM. */ - while (line_start < file_size && current_line < from) - { - for (line_end = line_start; line_end < file_size; line_end++) - if (buffer[line_end] == '\n') - { - current_line++; - line_start = line_end + 1; - if (current_line == from) - break; - } - } + for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++) + if (*line_end == '\n') + { + current_line++; + line_start = line_end + 1; + } /* If there are lines left to gobble, then gobble them now. */ - for (line_end = line_start; line_end < file_size; line_end++) - if (buffer[line_end] == '\n') + for (line_end = line_start; line_end < bufend; line_end++) + if (*line_end == '\n') { - buffer[line_end] = '\0'; + *line_end = '\0'; - if (buffer[line_start]) - add_history (buffer + line_start); + if (*line_start) + add_history (line_start); current_line++; @@ -211,30 +242,52 @@ read_history_range (filename, from, to) } FREE (input); +#ifndef HAVE_MMAP FREE (buffer); +#else + munmap (buffer, file_size); +#endif return (0); } /* Truncate the history file FNAME, leaving only LINES trailing lines. - If FNAME is NULL, then use ~/.history. */ + If FNAME is NULL, then use ~/.history. Returns 0 on success, errno + on failure. */ int history_truncate_file (fname, lines) - char *fname; + const char *fname; int lines; { - register int i; - int file, chars_read; - char *buffer, *filename; + char *buffer, *filename, *bp; + int file, chars_read, rv; struct stat finfo; size_t file_size; buffer = (char *)NULL; filename = history_filename (fname); file = open (filename, O_RDONLY|O_BINARY, 0666); + rv = 0; + /* Don't try to truncate non-regular files. */ if (file == -1 || fstat (file, &finfo) == -1) - goto truncate_exit; + { + rv = errno; + if (file != -1) + close (file); + goto truncate_exit; + } + + if (S_ISREG (finfo.st_mode) == 0) + { + close (file); +#ifdef EFTYPE + rv = EFTYPE; +#else + rv = EINVAL; +#endif + goto truncate_exit; + } file_size = (size_t)finfo.st_size; @@ -243,23 +296,36 @@ history_truncate_file (fname, lines) { close (file); #if defined (EFBIG) - errno = EFBIG; + rv = errno = EFBIG; +#elif defined (EOVERFLOW) + rv = errno = EOVERFLOW; +#else + rv = errno = EINVAL; #endif goto truncate_exit; } - buffer = xmalloc (file_size + 1); + buffer = (char *)malloc (file_size + 1); + if (buffer == 0) + { + close (file); + goto truncate_exit; + } + chars_read = read (file, buffer, file_size); close (file); if (chars_read <= 0) - goto truncate_exit; + { + rv = (chars_read < 0) ? errno : 0; + goto truncate_exit; + } /* Count backwards from the end of buffer until we have passed LINES lines. */ - for (i = chars_read - 1; lines && i; i--) + for (bp = buffer + chars_read - 1; lines && bp > buffer; bp--) { - if (buffer[i] == '\n') + if (*bp == '\n') lines--; } @@ -268,22 +334,22 @@ history_truncate_file (fname, lines) anything. It's the first line if we don't find a newline between the current value of i and 0. Otherwise, write from the start of this line until the end of the buffer. */ - for ( ; i; i--) - if (buffer[i] == '\n') + for ( ; bp > buffer; bp--) + if (*bp == '\n') { - i++; + bp++; break; } /* Write only if there are more lines in the file than we want to truncate to. */ - if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1)) + if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1)) { - write (file, buffer + i, file_size - i); + write (file, bp, chars_read - (bp - buffer)); #if defined (__BEOS__) /* BeOS ignores O_TRUNC. */ - ftruncate (file, file_size - i); + ftruncate (file, chars_read - (bp - buffer)); #endif close (file); @@ -294,7 +360,7 @@ history_truncate_file (fname, lines) FREE (buffer); free (filename); - return 0; + return rv; } /* Workhorse function for writing history. Writes NELEMENT entries @@ -302,15 +368,21 @@ history_truncate_file (fname, lines) wish to replace FILENAME with the entries. */ static int history_do_write (filename, nelements, overwrite) - char *filename; + const char *filename; int nelements, overwrite; { register int i; char *output; - int file, mode; + int file, mode, rv; + size_t cursize; +#ifdef HAVE_MMAP + mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY; +#else mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY; +#endif output = history_filename (filename); + rv = 0; if ((file = open (output, mode, 0600)) == -1) { @@ -318,6 +390,10 @@ history_do_write (filename, nelements, overwrite) return (errno); } +#ifdef HAVE_MMAP + cursize = overwrite ? 0 : lseek (file, 0, SEEK_END); +#endif + if (nelements > history_length) nelements = history_length; @@ -335,7 +411,28 @@ history_do_write (filename, nelements, overwrite) buffer_size += 1 + strlen (the_history[i]->line); /* Allocate the buffer, and fill it. */ - buffer = xmalloc (buffer_size); +#ifdef HAVE_MMAP + if (ftruncate (file, buffer_size+cursize) == -1) + goto mmap_error; + buffer = (char *)mmap (0, buffer_size, PROT_READ|PROT_WRITE, MAP_WFLAGS, file, cursize); + if ((void *)buffer == MAP_FAILED) + { +mmap_error: + rv = errno; + FREE (output); + close (file); + return rv; + } +#else + buffer = (char *)malloc (buffer_size); + if (buffer == 0) + { + rv = errno; + FREE (output); + close (file); + return rv; + } +#endif for (j = 0, i = history_length - nelements; i < history_length; i++) { @@ -344,15 +441,21 @@ history_do_write (filename, nelements, overwrite) buffer[j++] = '\n'; } - write (file, buffer, buffer_size); +#ifdef HAVE_MMAP + if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0) + rv = errno; +#else + if (write (file, buffer, buffer_size) < 0) + rv = errno; free (buffer); +#endif } close (file); FREE (output); - return (0); + return (rv); } /* Append NELEMENT entries to FILENAME. The entries appended are from @@ -360,7 +463,7 @@ history_do_write (filename, nelements, overwrite) int append_history (nelements, filename) int nelements; - char *filename; + const char *filename; { return (history_do_write (filename, nelements, HISTORY_APPEND)); } @@ -370,7 +473,7 @@ append_history (nelements, filename) are as in read_history ().*/ int write_history (filename) - char *filename; + const char *filename; { return (history_do_write (filename, history_length, HISTORY_OVERWRITE)); } diff --git a/readline/histlib.h b/readline/histlib.h index 422cf5974db..c39af71814c 100644 --- a/readline/histlib.h +++ b/readline/histlib.h @@ -6,7 +6,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -17,27 +17,24 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_HISTLIB_H_) #define _HISTLIB_H_ -/* Function pointers can be declared as (Function *)foo. */ -#if !defined (_FUNCTION_DEF) -# define _FUNCTION_DEF -typedef int Function (); -typedef void VFunction (); -typedef char *CPFunction (); -typedef char **CPPFunction (); -#endif /* _FUNCTION_DEF */ +#if defined (HAVE_STRING_H) +# include +#else +# include +#endif /* !HAVE_STRING_H */ +#if !defined (STREQ) #define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) -#define STREQN(a, b, n) (((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) +#define STREQN(a, b, n) (((n) == 0) ? (1) \ + : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) +#endif #ifndef savestring -# ifndef strcpy -extern char *strcpy (); -# endif #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) #endif @@ -79,4 +76,7 @@ extern char *strchr (); #define HISTORY_APPEND 0 #define HISTORY_OVERWRITE 1 +/* Some variable definitions shared across history source files. */ +extern int history_offset; + #endif /* !_HISTLIB_H_ */ diff --git a/readline/history.c b/readline/history.c index 804ffddcd89..4242f33efe1 100644 --- a/readline/history.c +++ b/readline/history.c @@ -7,7 +7,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ /* The goal is to make the implementation transparent, so that you don't have to know what data types are used, just what functions @@ -44,16 +44,10 @@ # include #endif -#if defined (HAVE_STRING_H) -# include -#else -# include -#endif /* !HAVE_STRING_H */ - #include "history.h" #include "histlib.h" -extern char *xmalloc (), *xrealloc (); +#include "xmalloc.h" /* The number of slots to increase the_history by. */ #define DEFAULT_HISTORY_GROW_SIZE 50 @@ -71,9 +65,13 @@ static HIST_ENTRY **the_history = (HIST_ENTRY **)NULL; history that we save. */ static int history_stifled; +/* The current number of slots allocated to the input_history. */ +static int history_size; + /* If HISTORY_STIFLED is non-zero, then this is the maximum number of entries to remember. */ -int max_input_history; +int history_max_entries; +int max_input_history; /* backwards compatibility */ /* The current location of the interactive history pointer. Just makes life easier for outside callers. */ @@ -82,9 +80,6 @@ int history_offset; /* The number of strings currently stored in the history list. */ int history_length; -/* The current number of slots allocated to the input_history. */ -static int history_size; - /* The logical `base' of the history array. It defaults to 1. */ int history_base = 1; @@ -134,9 +129,7 @@ history_total_bytes () { register int i, result; - result = 0; - - for (i = 0; the_history && the_history[i]; i++) + for (i = result = 0; the_history && the_history[i]; i++) result += strlen (the_history[i]->line); return (result); @@ -161,7 +154,7 @@ history_set_pos (pos) history_offset = pos; return (1); } - + /* Return the current history array. The caller has to be carefull, since this is the actual array of data, and could be bashed or made corrupt easily. The array is terminated with a NULL pointer. */ @@ -217,16 +210,16 @@ history_get (offset) is set to NULL. */ void add_history (string) - char *string; + const char *string; { HIST_ENTRY *temp; - if (history_stifled && (history_length == max_input_history)) + if (history_stifled && (history_length == history_max_entries)) { register int i; /* If the history is stifled, and history_length is zero, - and it equals max_input_history, we don't save items. */ + and it equals history_max_entries, we don't save items. */ if (history_length == 0) return; @@ -277,15 +270,15 @@ add_history (string) HIST_ENTRY * replace_history_entry (which, line, data) int which; - char *line; + const char *line; histdata_t data; { - HIST_ENTRY *temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); - HIST_ENTRY *old_value; + HIST_ENTRY *temp, *old_value; if (which >= history_length) return ((HIST_ENTRY *)NULL); + temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); old_value = the_history[which]; temp->line = savestring (line); @@ -303,12 +296,12 @@ remove_history (which) int which; { HIST_ENTRY *return_value; + register int i; if (which >= history_length || !history_length) return_value = (HIST_ENTRY *)NULL; else { - register int i; return_value = the_history[which]; for (i = which; i < history_length; i++) @@ -325,13 +318,13 @@ void stifle_history (max) int max; { + register int i, j; + if (max < 0) max = 0; if (history_length > max) { - register int i, j; - /* This loses because we cannot free the data. */ for (i = 0, j = history_length - max; i < j; i++) { @@ -347,22 +340,22 @@ stifle_history (max) } history_stifled = 1; - max_input_history = max; + max_input_history = history_max_entries = max; } -/* Stop stifling the history. This returns the previous amount the - history was stifled by. The value is positive if the history was - stifled, negative if it wasn't. */ +/* Stop stifling the history. This returns the previous maximum + number of history entries. The value is positive if the history + was stifled, negative if it wasn't. */ int unstifle_history () { if (history_stifled) { history_stifled = 0; - return (-max_input_history); + return (history_max_entries); } - - return (max_input_history); + else + return (-history_max_entries); } int diff --git a/readline/history.h b/readline/history.h index 88bf471bb62..58b5de4655f 100644 --- a/readline/history.h +++ b/readline/history.h @@ -6,7 +6,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -17,7 +17,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #ifndef _HISTORY_H_ #define _HISTORY_H_ @@ -28,16 +28,10 @@ extern "C" { #if defined READLINE_LIBRARY # include "rlstdc.h" +# include "rltypedefs.h" #else # include -#endif - -#if !defined (_FUNCTION_DEF) -# define _FUNCTION_DEF -typedef int Function (); -typedef void VFunction (); -typedef char *CPFunction (); -typedef char **CPPFunction (); +# include #endif #ifdef __STDC__ @@ -68,81 +62,81 @@ typedef struct _hist_state { /* Begin a session in which the history functions might be used. This just initializes the interactive variables. */ -extern void using_history __P((void)); +extern void using_history PARAMS((void)); /* Return the current HISTORY_STATE of the history. */ -extern HISTORY_STATE *history_get_history_state __P((void)); +extern HISTORY_STATE *history_get_history_state PARAMS((void)); /* Set the state of the current history array to STATE. */ -extern void history_set_history_state __P((HISTORY_STATE *)); +extern void history_set_history_state PARAMS((HISTORY_STATE *)); /* Manage the history list. */ /* Place STRING at the end of the history list. The associated data field (if any) is set to NULL. */ -extern void add_history __P((char *)); +extern void add_history PARAMS((const char *)); /* A reasonably useless function, only here for completeness. WHICH is the magic number that tells us which element to delete. The elements are numbered from 0. */ -extern HIST_ENTRY *remove_history __P((int)); +extern HIST_ENTRY *remove_history PARAMS((int)); /* Make the history entry at WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a NULL pointer is returned. */ -extern HIST_ENTRY *replace_history_entry __P((int, char *, histdata_t)); +extern HIST_ENTRY *replace_history_entry PARAMS((int, const char *, histdata_t)); /* Clear the history list and start over. */ -extern void clear_history __P((void)); +extern void clear_history PARAMS((void)); /* Stifle the history list, remembering only MAX number of entries. */ -extern void stifle_history __P((int)); +extern void stifle_history PARAMS((int)); /* Stop stifling the history. This returns the previous amount the history was stifled by. The value is positive if the history was stifled, negative if it wasn't. */ -extern int unstifle_history __P((void)); +extern int unstifle_history PARAMS((void)); /* Return 1 if the history is stifled, 0 if it is not. */ -extern int history_is_stifled __P((void)); +extern int history_is_stifled PARAMS((void)); /* Information about the history list. */ /* Return a NULL terminated array of HIST_ENTRY which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return NULL. */ -extern HIST_ENTRY **history_list __P((void)); +extern HIST_ENTRY **history_list PARAMS((void)); /* Returns the number which says what history element we are now looking at. */ -extern int where_history __P((void)); - +extern int where_history PARAMS((void)); + /* Return the history entry at the current position, as determined by history_offset. If there is no entry there, return a NULL pointer. */ -HIST_ENTRY *current_history __P((void)); +extern HIST_ENTRY *current_history PARAMS((void)); /* Return the history entry which is logically at OFFSET in the history array. OFFSET is relative to history_base. */ -extern HIST_ENTRY *history_get __P((int)); +extern HIST_ENTRY *history_get PARAMS((int)); /* Return the number of bytes that the primary history entries are using. This just adds up the lengths of the_history->lines. */ -extern int history_total_bytes __P((void)); +extern int history_total_bytes PARAMS((void)); /* Moving around the history list. */ /* Set the position in the history list to POS. */ -int history_set_pos __P((int)); +extern int history_set_pos PARAMS((int)); /* Back up history_offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a NULL pointer. */ -extern HIST_ENTRY *previous_history __P((void)); +extern HIST_ENTRY *previous_history PARAMS((void)); /* Move history_offset forward to the next item in the input_history, and return the a pointer to that entry. If there is no next entry, return a NULL pointer. */ -extern HIST_ENTRY *next_history __P((void)); +extern HIST_ENTRY *next_history PARAMS((void)); /* Searching the history list. */ @@ -152,45 +146,45 @@ extern HIST_ENTRY *next_history __P((void)); current_history () is the history entry, and the value of this function is the offset in the line of that history entry that the string was found in. Otherwise, nothing is changed, and a -1 is returned. */ -extern int history_search __P((char *, int)); +extern int history_search PARAMS((const char *, int)); /* Search the history for STRING, starting at history_offset. The search is anchored: matching lines must begin with string. DIRECTION is as in history_search(). */ -extern int history_search_prefix __P((char *, int)); +extern int history_search_prefix PARAMS((const char *, int)); /* Search for STRING in the history list, starting at POS, an absolute index into the list. DIR, if negative, says to search backwards from POS, else forwards. Returns the absolute index of the history element where STRING was found, or -1 otherwise. */ -extern int history_search_pos __P((char *, int, int)); +extern int history_search_pos PARAMS((const char *, int, int)); /* Managing the history file. */ /* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ -extern int read_history __P((char *)); +extern int read_history PARAMS((const char *)); /* Read a range of lines from FILENAME, adding them to the history list. Start reading at the FROM'th line and end at the TO'th. If FROM is zero, start at the beginning. If TO is less than FROM, read until the end of the file. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */ -extern int read_history_range __P((char *, int, int)); +extern int read_history_range PARAMS((const char *, int, int)); /* Write the current history to FILENAME. If FILENAME is NULL, then write the history list to ~/.history. Values returned are as in read_history (). */ -extern int write_history __P((char *)); +extern int write_history PARAMS((const char *)); /* Append NELEMENT entries to FILENAME. The entries appended are from the end of the list minus NELEMENTs up to the end of the list. */ -int append_history __P((int, char *)); +extern int append_history PARAMS((int, const char *)); /* Truncate the history file, leaving only the last NLINES lines. */ -extern int history_truncate_file __P((char *, int)); +extern int history_truncate_file PARAMS((const char *, int)); /* History expansion. */ @@ -206,12 +200,12 @@ extern int history_truncate_file __P((char *, int)); If an error ocurred in expansion, then OUTPUT contains a descriptive error message. */ -extern int history_expand __P((char *, char **)); +extern int history_expand PARAMS((char *, char **)); /* Extract a string segment consisting of the FIRST through LAST arguments present in STRING. Arguments are broken up as in the shell. */ -extern char *history_arg_extract __P((int, int, char *)); +extern char *history_arg_extract PARAMS((int, int, const char *)); /* Return the text of the history event beginning at the current offset into STRING. Pass STRING with *INDEX equal to the @@ -219,27 +213,31 @@ extern char *history_arg_extract __P((int, int, char *)); DELIMITING_QUOTE is a character that is allowed to end the string specification for what to search for in addition to the normal characters `:', ` ', `\t', `\n', and sometimes `?'. */ -extern char *get_history_event __P((char *, int *, int)); +extern char *get_history_event PARAMS((const char *, int *, int)); /* Return an array of tokens, much as the shell might. The tokens are parsed out of STRING. */ -extern char **history_tokenize __P((char *)); +extern char **history_tokenize PARAMS((const char *)); /* Exported history variables. */ extern int history_base; extern int history_length; -extern int max_input_history; +extern int history_max_entries; extern char history_expansion_char; extern char history_subst_char; +extern char *history_word_delimiters; extern char history_comment_char; -extern const char *history_no_expand_chars; -extern const char *history_search_delimiter_chars; +extern char *history_no_expand_chars; +extern char *history_search_delimiter_chars; extern int history_quotes_inhibit_expansion; +/* Backwards compatibility */ +extern int max_input_history; + /* If set, this function is called to decide whether or not a particular history expansion should be treated as a special case for the calling application and not expanded. */ -extern Function *history_inhibit_expansion_function; +extern rl_linebuf_func_t *history_inhibit_expansion_function; #ifdef __cplusplus } diff --git a/readline/histsearch.c b/readline/histsearch.c index eb17e9332e8..d94fd6cd9c6 100644 --- a/readline/histsearch.c +++ b/readline/histsearch.c @@ -7,7 +7,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY @@ -32,27 +32,22 @@ #else # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ + #if defined (HAVE_UNISTD_H) # ifdef _MINIX # include # endif # include #endif -#if defined (HAVE_STRING_H) -# include -#else -# include -#endif /* !HAVE_STRING_H */ #include "history.h" #include "histlib.h" -/* Variables imported from other history library files. */ -extern int history_offset; - /* The list of alternate characters that can delimit a history search string. */ -const char *history_search_delimiter_chars = (char *)NULL; +char *history_search_delimiter_chars = (char *)NULL; + +static int history_search_internal PARAMS((const char *, int, int)); /* Search the history for STRING, starting at history_offset. If DIRECTION < 0, then the search is through previous entries, else @@ -66,7 +61,7 @@ const char *history_search_delimiter_chars = (char *)NULL; static int history_search_internal (string, direction, anchored) - char *string; + const char *string; int direction, anchored; { register int i, reverse; @@ -162,7 +157,7 @@ history_search_internal (string, direction, anchored) /* Do a non-anchored search for STRING through the history in DIRECTION. */ int history_search (string, direction) - char *string; + const char *string; int direction; { return (history_search_internal (string, direction, NON_ANCHORED_SEARCH)); @@ -171,7 +166,7 @@ history_search (string, direction) /* Do an anchored search for string through the history in DIRECTION. */ int history_search_prefix (string, direction) - char *string; + const char *string; int direction; { return (history_search_internal (string, direction, ANCHORED_SEARCH)); @@ -182,7 +177,7 @@ history_search_prefix (string, direction) which point to begin searching. */ int history_search_pos (string, dir, pos) - char *string; + const char *string; int dir, pos; { int ret, old; diff --git a/readline/input.c b/readline/input.c index ea1342969b0..1442c5ef155 100644 --- a/readline/input.c +++ b/readline/input.c @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -42,7 +42,7 @@ #endif /* HAVE_STDLIB_H */ #if defined (HAVE_SELECT) -# if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX) || defined(TIME_WITH_SYS_TIME) +# if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX) # include # endif #endif /* HAVE_SELECT */ @@ -63,48 +63,31 @@ extern int errno; /* System-specific feature definitions and include files. */ #include "rldefs.h" +#include "rlmbutil.h" /* Some standard library routines. */ #include "readline.h" +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + /* What kind of non-blocking I/O do we have? */ #if !defined (O_NDELAY) && defined (O_NONBLOCK) # define O_NDELAY O_NONBLOCK /* Posix style */ #endif -/* Functions imported from other files in the library. */ -extern char *xmalloc (), *xrealloc (); - -/* Variables and functions from macro.c. */ -extern void _rl_add_macro_char (); -extern void _rl_with_macro_input (); -extern int _rl_next_macro_key (); -extern int _rl_defining_kbd_macro; - -#if defined (VI_MODE) -extern void _rl_vi_set_last (); -extern int _rl_vi_textmod_command (); -#endif /* VI_MODE */ - -extern FILE *rl_instream, *rl_outstream; -extern Function *rl_last_func; -extern int rl_key_sequence_length; -extern int rl_pending_input; -extern int rl_editing_mode; - -extern Keymap _rl_keymap; - -extern int _rl_convert_meta_chars_to_ascii; - -#if defined (__GO32__) -# include -#endif /* __GO32__ */ - /* Non-null means it is a pointer to a function to run while waiting for character input. */ -Function *rl_event_hook = (Function *)NULL; +rl_hook_func_t *rl_event_hook = (rl_hook_func_t *)NULL; -Function *rl_getc_function = rl_getc; +rl_getc_func_t *rl_getc_function = rl_getc; + +static int _keyboard_input_timeout = 100000; /* 0.1 seconds; it's in usec */ + +static int ibuffer_space PARAMS((void)); +static int rl_get_char PARAMS((int *)); +static int rl_gather_tyi PARAMS((void)); /* **************************************************************** */ /* */ @@ -156,8 +139,8 @@ rl_get_char (key) /* Stuff KEY into the *front* of the input buffer. Returns non-zero if successful, zero if there is no space left in the buffer. */ -static int -rl_unget_char (key) +int +_rl_unget_char (key) int key; { if (ibuffer_space ()) @@ -171,33 +154,12 @@ rl_unget_char (key) return (0); } -#if defined(__EMX__) -int waiting_char = -1; -#endif - -/* If a character is available to be read, then read it - and stuff it into IBUFFER. Otherwise, just return. */ -static void +/* If a character is available to be read, then read it and stuff it into + IBUFFER. Otherwise, just return. Returns number of characters read + (0 if none available) and -1 on error (EIO). */ +static int rl_gather_tyi () { -#if defined (__EMX__) - if (isatty (0) && (waiting_char = _read_kbd(0, 0, 0)) != -1 && ibuffer_space ()) - { - int i; - i = (*rl_getc_function) (rl_instream); - rl_stuff_char (i); - } -#elif defined (__GO32__) - char input; - - if (isatty (0) && kbhit () && ibuffer_space ()) - { - int i; - i = (*rl_getc_function) (rl_instream); - rl_stuff_char (i); - } -#else /* !__GO32__ */ - int tty; register int tem, result; int chars_avail; @@ -215,14 +177,18 @@ rl_gather_tyi () FD_SET (tty, &readfds); FD_SET (tty, &exceptfds); timeout.tv_sec = 0; - timeout.tv_usec = 100000; /* 0.1 seconds */ - if (select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout) <= 0) - return; /* Nothing to read. */ + timeout.tv_usec = _keyboard_input_timeout; + result = select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout); + if (result <= 0) + return 0; /* Nothing to read. */ #endif result = -1; #if defined (FIONREAD) + errno = 0; result = ioctl (tty, FIONREAD, &chars_avail); + if (result == -1 && errno == EIO) + return -1; #endif #if defined (O_NDELAY) @@ -235,14 +201,14 @@ rl_gather_tyi () fcntl (tty, F_SETFL, tem); if (chars_avail == -1 && errno == EAGAIN) - return; + return 0; } #endif /* O_NDELAY */ /* If there's nothing available, don't waste time trying to read something. */ if (chars_avail <= 0) - return; + return 0; tem = ibuffer_space (); @@ -266,23 +232,36 @@ rl_gather_tyi () if (chars_avail) rl_stuff_char (input); } -#endif /* !__GO32__ */ + + return 1; +} + +int +rl_set_keyboard_input_timeout (u) + int u; +{ + int o; + + o = _keyboard_input_timeout; + if (u > 0) + _keyboard_input_timeout = u; + return (o); } /* Is there input available to be read on the readline input file - descriptor? Only works if the system has select(2) or FIONREAD. */ + descriptor? Only works if the system has select(2) or FIONREAD. + Uses the value of _keyboard_input_timeout as the timeout; if another + readline function wants to specify a timeout and not leave it up to + the user, it should use _rl_input_queued(timeout_value_in_microseconds) + instead. */ int _rl_input_available () { -#if defined (__EMX__) - if (isatty (0) && (waiting_char = _read_kbd(0, 0, 0)) != -1) - return 1; -#else /* __EMX__ */ #if defined(HAVE_SELECT) fd_set readfds, exceptfds; struct timeval timeout; #endif -#if defined(FIONREAD) +#if !defined (HAVE_SELECT) && defined(FIONREAD) int chars_avail; #endif int tty; @@ -295,28 +274,41 @@ _rl_input_available () FD_SET (tty, &readfds); FD_SET (tty, &exceptfds); timeout.tv_sec = 0; - timeout.tv_usec = 100000; /* 0.1 seconds */ + timeout.tv_usec = _keyboard_input_timeout; return (select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout) > 0); -#endif +#else #if defined (FIONREAD) if (ioctl (tty, FIONREAD, &chars_avail) == 0) return (chars_avail); #endif -#endif /* !__EMX__ */ + +#endif return 0; } +int +_rl_input_queued (t) + int t; +{ + int old_timeout, r; + + old_timeout = rl_set_keyboard_input_timeout (t); + r = _rl_input_available (); + rl_set_keyboard_input_timeout (old_timeout); + return r; +} + void _rl_insert_typein (c) int c; -{ +{ int key, t, i; char *string; i = key = 0; - string = xmalloc (ibuffer_len + 1); + string = (char *)xmalloc (ibuffer_len + 1); string[i++] = (char) c; while ((t = rl_get_char (&key)) && @@ -325,7 +317,7 @@ _rl_insert_typein (c) string[i++] = key; if (t) - rl_unget_char (key); + _rl_unget_char (key); string[i] = '\0'; rl_insert_text (string); @@ -345,6 +337,7 @@ rl_stuff_char (key) { key = NEWLINE; rl_pending_input = EOF; + RL_SETSTATE (RL_STATE_INPUTPENDING); } ibuffer[push_index++] = key; if (push_index >= ibuffer_len) @@ -359,6 +352,16 @@ rl_execute_next (c) int c; { rl_pending_input = c; + RL_SETSTATE (RL_STATE_INPUTPENDING); + return 0; +} + +/* Clear any pending input pushed with rl_execute_next() */ +int +rl_clear_pending_input () +{ + rl_pending_input = 0; + RL_UNSETSTATE (RL_STATE_INPUTPENDING); return 0; } @@ -379,7 +382,7 @@ rl_read_key () if (rl_pending_input) { c = rl_pending_input; - rl_pending_input = 0; + rl_clear_pending_input (); } else { @@ -393,7 +396,13 @@ rl_read_key () while (rl_event_hook && rl_get_char (&c) == 0) { (*rl_event_hook) (); - rl_gather_tyi (); + if (rl_done) /* XXX - experimental */ + return ('\n'); + if (rl_gather_tyi () < 0) /* XXX - EIO */ + { + rl_done = 1; + return ('\n'); + } } } else @@ -410,96 +419,9 @@ int rl_getc (stream) FILE *stream; { - int result, flags; + int result; unsigned char c; -#if defined (__EMX__) - if (isatty (0)) - { - int key; - - if (waiting_char != -1) - { - key = waiting_char; - waiting_char = -1; - } - else - { -#ifdef __RSXNT__ - pc_flush(); -#endif - key = _read_kbd(0, 1, 0); - } - - while (key == 0) - { - key |= (_read_kbd(0, 1, 0) << 8); - /* printf("<%04X> ", key); - fflush(stdout); */ - - switch (key) - { - case 0x4B00: /* left arrow */ - key = 'B' - 64; - break; - case 0x4D00: /* right arrow */ - key = 'F' - 64; - break; - case 0x7300: /* ctrl left arrow */ - key = 27; - waiting_char = 'B'; - break; - case 0x7400: /* ctrl right arrow */ - key = 27; - waiting_char = 'F'; - break; - case 0x4800: /* up arrow */ - key = 'P' - 64; - break; - case 0x5000: /* down arrow */ - key = 'N' - 64; - break; - case 0x8D00: /* ctrl up arrow */ - key = 'R' - 64; - break; - case 0x9100: /* ctrl down arrow */ - key = 'S' - 64; - break; - case 0x4700: /* home key */ - key = 'A' - 64; - break; - case 0x4F00: /* end key */ - key = 'E' - 64; - break; - case 0x7700: /* ctrl home key */ - key = 27; - waiting_char = '<'; - break; - case 0x7500: /* ctrl end key */ - key = 27; - waiting_char = '>'; - break; - case 0x5300: /* delete key */ - key = 'D' - 64; - break; - case 0x5200: /* insert key */ - key = 'V' - 64; - break; - default: /* ignore all other special keys, read next */ - key = _read_kbd(0, 1, 0); - break; - } - } - - return (key & 0xFF); - } -#endif /* __EMX__ */ - -#if defined (__GO32__) - if (isatty (0)) - return (getkey () & 0x7F); -#endif /* __GO32__ */ - while (1) { result = read (fileno (stream), &c, sizeof (unsigned char)); @@ -518,40 +440,101 @@ rl_getc (stream) #endif #if defined (EWOULDBLOCK) - if (errno == EWOULDBLOCK) +# define X_EWOULDBLOCK EWOULDBLOCK +#else +# define X_EWOULDBLOCK -99 +#endif + +#if defined (EAGAIN) +# define X_EAGAIN EAGAIN +#else +# define X_EAGAIN -99 +#endif + + if (errno == X_EWOULDBLOCK || errno == X_EAGAIN) { - if ((flags = fcntl (fileno (stream), F_GETFL, 0)) < 0) + if (sh_unset_nodelay_mode (fileno (stream)) < 0) return (EOF); - if (flags & O_NDELAY) - { - flags &= ~O_NDELAY; - fcntl (fileno (stream), F_SETFL, flags); - continue; - } continue; } -#endif /* EWOULDBLOCK */ -#if defined (_POSIX_VERSION) && defined (EAGAIN) && defined (O_NONBLOCK) - if (errno == EAGAIN) - { - if ((flags = fcntl (fileno (stream), F_GETFL, 0)) < 0) - return (EOF); - if (flags & O_NONBLOCK) - { - flags &= ~O_NONBLOCK; - fcntl (fileno (stream), F_SETFL, flags); - continue; - } - } -#endif /* _POSIX_VERSION && EAGAIN && O_NONBLOCK */ +#undef X_EWOULDBLOCK +#undef X_EAGAIN -#if !defined (__GO32__) /* If the error that we received was SIGINT, then try again, this is simply an interrupted system call to read (). Otherwise, some error ocurred, also signifying EOF. */ if (errno != EINTR) return (EOF); -#endif /* !__GO32__ */ } } + +#if defined (HANDLE_MULTIBYTE) +/* read multibyte char */ +int +_rl_read_mbchar (mbchar, size) + char *mbchar; + int size; +{ + int mb_len = 0; + size_t mbchar_bytes_length; + wchar_t wc; + mbstate_t ps, ps_back; + + memset(&ps, 0, sizeof (mbstate_t)); + memset(&ps_back, 0, sizeof (mbstate_t)); + + while (mb_len < size) + { + RL_SETSTATE(RL_STATE_MOREINPUT); + mbchar[mb_len++] = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps); + if (mbchar_bytes_length == (size_t)(-1)) + break; /* invalid byte sequence for the current locale */ + else if (mbchar_bytes_length == (size_t)(-2)) + { + /* shorted bytes */ + ps = ps_back; + continue; + } + else if (mbchar_bytes_length > (size_t)(0)) + break; + } + + return mb_len; +} + +/* Read a multibyte-character string whose first character is FIRST into + the buffer MB of length MBLEN. Returns the last character read, which + may be FIRST. Used by the search functions, among others. Very similar + to _rl_read_mbchar. */ +int +_rl_read_mbstring (first, mb, mblen) + int first; + char *mb; + int mblen; +{ + int i, c; + mbstate_t ps; + + c = first; + memset (mb, 0, mblen); + for (i = 0; i < mblen; i++) + { + mb[i] = (char)c; + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_get_char_len (mb, &ps) == -2) + { + /* Read more for multibyte character */ + RL_SETSTATE (RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE (RL_STATE_MOREINPUT); + } + else + break; + } + return c; +} +#endif /* HANDLE_MULTIBYTE */ diff --git a/readline/isearch.c b/readline/isearch.c index a4a294b6b20..c0604ce703c 100644 --- a/readline/isearch.c +++ b/readline/isearch.c @@ -4,7 +4,7 @@ /* */ /* **************************************************************** */ -/* Copyright (C) 1987,1989 Free Software Foundation, Inc. +/* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file contains the Readline Library (the Library), a set of routines for providing Emacs style line input to programs that ask @@ -12,7 +12,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -23,7 +23,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -45,32 +45,33 @@ #endif #include "rldefs.h" +#include "rlmbutil.h" + #include "readline.h" #include "history.h" +#include "rlprivate.h" +#include "xmalloc.h" + /* Variables exported to other files in the readline library. */ -unsigned char *_rl_isearch_terminators = (unsigned char *)NULL; +char *_rl_isearch_terminators = (char *)NULL; /* Variables imported from other files in the readline library. */ -extern Keymap _rl_keymap; -extern HIST_ENTRY *saved_line_for_history; -extern int rl_line_buffer_len; -extern int rl_point, rl_end; -extern char *rl_line_buffer; +extern HIST_ENTRY *_rl_saved_line_for_history; -extern int rl_execute_next (); -extern void rl_extend_line_buffer (); - -extern int _rl_input_available (); - -extern char *xmalloc (), *xrealloc (); - -static int rl_search_history (); +/* Forward declarations */ +static int rl_search_history PARAMS((int, int)); /* Last line found by the current incremental search, so we don't `find' identical lines many times in a row. */ static char *prev_line_found; +/* Last search string and its length. */ +static char *last_isearch_string; +static int last_isearch_string_len; + +static char default_isearch_terminators[] = "\033\012"; + /* Search backwards through the history looking for a string which is typed interactively. Start with the current line. */ int @@ -97,15 +98,14 @@ rl_forward_search_history (sign, key) static void rl_display_search (search_string, reverse_p, where) char *search_string; - int reverse_p; - int where __attribute__((unused)); + int reverse_p, where __attribute__((unused)); { char *message; int msglen, searchlen; searchlen = (search_string && *search_string) ? strlen (search_string) : 0; - message = xmalloc (searchlen + 33); + message = (char *)xmalloc (searchlen + 33); msglen = 0; #if defined (NOTDEF) @@ -135,7 +135,7 @@ rl_display_search (search_string, reverse_p, where) strcpy (message + msglen, "': "); - rl_message ("%s", message, 0); + rl_message ("%s", message); free (message); (*rl_redisplay_function) (); } @@ -145,7 +145,8 @@ rl_display_search (search_string, reverse_p, where) DIRECTION is which direction to search; >= 0 means forward, < 0 means backwards. */ static int -rl_search_history (int direction, int invoking_key __attribute__((unused))) +rl_search_history (direction, invoking_key) + int direction, invoking_key __attribute__((unused)); { /* The string that the user types in to search for. */ char *search_string; @@ -166,8 +167,12 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) HIST_ENTRY **hlist; register int i; - int orig_point, orig_line, last_found_line; + int orig_point, orig_mark, orig_line, last_found_line; int c, found, failed, sline_len; + int n, wstart, wlen; +#if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; +#endif /* The line currently being searched. */ char *sline; @@ -181,19 +186,21 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) /* The list of characters which terminate the search, but are not subsequently executed. If the variable isearch-terminators has been set, we use that value, otherwise we use ESC and C-J. */ - unsigned char *isearch_terminators; + char *isearch_terminators; + RL_SETSTATE(RL_STATE_ISEARCH); orig_point = rl_point; + orig_mark = rl_mark; last_found_line = orig_line = where_history (); reverse = direction < 0; hlist = history_list (); allocated_line = (char *)NULL; isearch_terminators = _rl_isearch_terminators ? _rl_isearch_terminators - : (unsigned char *)"\033\012"; + : default_isearch_terminators; /* Create an arrary of pointers to the lines that we want to search. */ - maybe_replace_line (); + rl_maybe_replace_line (); i = 0; if (hlist) for (i = 0; hlist[i]; i++); @@ -204,12 +211,12 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) for (i = 0; i < hlen; i++) lines[i] = hlist[i]->line; - if (saved_line_for_history) - lines[i] = saved_line_for_history->line; + if (_rl_saved_line_for_history) + lines[i] = _rl_saved_line_for_history->line; else { /* Keep track of this so we can free it. */ - allocated_line = xmalloc (1 + strlen (rl_line_buffer)); + allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer)); strcpy (allocated_line, &rl_line_buffer[0]); lines[i] = allocated_line; } @@ -222,7 +229,7 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) rl_save_prompt (); /* Initialize search parameters. */ - search_string = xmalloc (search_string_size = 128); + search_string = (char *)xmalloc (search_string_size = 128); *search_string = '\0'; search_string_index = 0; prev_line_found = (char *)0; /* XXX */ @@ -239,12 +246,20 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) found = failed = 0; for (;;) { - Function *f = (Function *)NULL; + rl_command_func_t *f = (rl_command_func_t *)NULL; /* Read a key and decide how to proceed. */ + RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); - if (_rl_keymap[c].type == ISFUNC) +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + c = _rl_read_mbstring (c, mb, MB_LEN_MAX); +#endif + + /* Translate the keys we do something with to opcodes. */ + if (c >= 0 && _rl_keymap[c].type == ISFUNC) { f = _rl_keymap[c].function; @@ -252,34 +267,56 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) c = reverse ? -1 : -2; else if (f == rl_forward_search_history) c = !reverse ? -1 : -2; + else if (f == rl_rubout) + c = -3; + else if (c == CTRL ('G')) + c = -4; + else if (c == CTRL ('W')) /* XXX */ + c = -5; + else if (c == CTRL ('Y')) /* XXX */ + c = -6; } -#if 0 - /* Let NEWLINE (^J) terminate the search for people who don't like - using ESC. ^M can still be used to terminate the search and - immediately execute the command. */ - if (c == ESC || c == NEWLINE) -#else /* The characters in isearch_terminators (set from the user-settable variable isearch-terminators) are used to terminate the search but not subsequently execute the character as a command. The default value is "\033\012" (ESC and C-J). */ - if (strchr((char*) isearch_terminators, c)) -#endif + if (strchr (isearch_terminators, c)) { /* ESC still terminates the search, but if there is pending input or if input arrives within 0.1 seconds (on systems with select(2)) it is used as a prefix character with rl_execute_next. WATCH OUT FOR THIS! This is intended to allow the arrow keys to be used like ^F and ^B are used - to terminate the search and execute the movement command. */ - if (c == ESC && _rl_input_available ()) /* XXX */ + to terminate the search and execute the movement command. + XXX - since _rl_input_available depends on the application- + settable keyboard timeout value, this could alternatively + use _rl_input_queued(100000) */ + if (c == ESC && _rl_input_available ()) rl_execute_next (ESC); break; } - if (c >= 0 && (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT) && c != CTRL ('G')) +#define ENDSRCH_CHAR(c) \ + ((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G'))) + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) { + if (c >= 0 && strlen (mb) == 1 && ENDSRCH_CHAR (c)) + { + /* This sets rl_pending_input to c; it will be picked up the next + time rl_read_key is called. */ + rl_execute_next (c); + break; + } + } + else +#endif + if (c >= 0 && ENDSRCH_CHAR (c)) + { + /* This sets rl_pending_input to c; it will be picked up the next + time rl_read_key is called. */ rl_execute_next (c); break; } @@ -288,13 +325,24 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) { case -1: if (search_string_index == 0) - continue; + { + if (last_isearch_string) + { + search_string_size = 64 + last_isearch_string_len; + search_string = (char *)xrealloc (search_string, search_string_size); + strcpy (search_string, last_isearch_string); + search_string_index = last_isearch_string_len; + rl_display_search (search_string, reverse, -1); + break; + } + continue; + } else if (reverse) --line_index; else if (line_index != sline_len) ++line_index; else - ding (); + rl_ding (); break; /* switch directions */ @@ -303,40 +351,96 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) reverse = direction < 0; break; - case CTRL ('G'): - strcpy (rl_line_buffer, lines[orig_line]); + /* delete character from search string. */ + case -3: /* C-H, DEL */ + /* This is tricky. To do this right, we need to keep a + stack of search positions for the current search, with + sentinels marking the beginning and end. But this will + do until we have a real isearch-undo. */ + if (search_string_index == 0) + rl_ding (); + else + search_string[--search_string_index] = '\0'; + + break; + + case -4: /* C-G */ + rl_replace_line (lines[orig_line], 0); rl_point = orig_point; - rl_end = strlen (rl_line_buffer); + rl_mark = orig_mark; rl_restore_prompt(); rl_clear_message (); if (allocated_line) free (allocated_line); free (lines); + RL_UNSETSTATE(RL_STATE_ISEARCH); return 0; -#if 0 - /* delete character from search string. */ - case -3: - if (search_string_index == 0) - ding (); - else + case -5: /* C-W */ + /* skip over portion of line we already matched */ + wstart = rl_point + search_string_index; + if (wstart >= rl_end) { - search_string[--search_string_index] = '\0'; - /* This is tricky. To do this right, we need to keep a - stack of search positions for the current search, with - sentinels marking the beginning and end. */ + rl_ding (); + break; } + + /* if not in a word, move to one. */ + if (rl_alphabetic(rl_line_buffer[wstart]) == 0) + { + rl_ding (); + break; + } + n = wstart; + while (n < rl_end && rl_alphabetic(rl_line_buffer[n])) + n++; + wlen = n - wstart + 1; + if (search_string_index + wlen + 1 >= search_string_size) + { + search_string_size += wlen + 1; + search_string = (char *)xrealloc (search_string, search_string_size); + } + for (; wstart < n; wstart++) + search_string[search_string_index++] = rl_line_buffer[wstart]; + search_string[search_string_index] = '\0'; + break; + + case -6: /* C-Y */ + /* skip over portion of line we already matched */ + wstart = rl_point + search_string_index; + if (wstart >= rl_end) + { + rl_ding (); + break; + } + n = rl_end - wstart + 1; + if (search_string_index + n + 1 >= search_string_size) + { + search_string_size += n + 1; + search_string = (char *)xrealloc (search_string, search_string_size); + } + for (n = wstart; n < rl_end; n++) + search_string[search_string_index++] = rl_line_buffer[n]; + search_string[search_string_index] = '\0'; break; -#endif default: /* Add character to search string and continue search. */ if (search_string_index + 2 >= search_string_size) { search_string_size += 128; - search_string = xrealloc (search_string, search_string_size); + search_string = (char *)xrealloc (search_string, search_string_size); } - search_string[search_string_index++] = c; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int j, l; + for (j = 0, l = strlen (mb); j < l; ) + search_string[search_string_index++] = mb[j++]; + } + else +#endif + search_string[search_string_index++] = c; search_string[search_string_index] = '\0'; break; } @@ -391,7 +495,7 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) if (failed) { /* We cannot find the search string. Ding the bell. */ - ding (); + rl_ding (); i = last_found_line; continue; /* XXX - was break */ } @@ -401,17 +505,9 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) the location. */ if (found) { - int line_len; - prev_line_found = lines[i]; - line_len = strlen (lines[i]); - - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - - strcpy (rl_line_buffer, lines[i]); + rl_replace_line (lines[i], 0); rl_point = line_index; - rl_end = line_len; last_found_line = i; rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i); } @@ -427,23 +523,38 @@ rl_search_history (int direction, int invoking_key __attribute__((unused))) rl_restore_prompt (); - /* Free the search string. */ - free (search_string); + /* Save the search string for possible later use. */ + FREE (last_isearch_string); + last_isearch_string = search_string; + last_isearch_string_len = search_string_index; if (last_found_line < orig_line) rl_get_previous_history (orig_line - last_found_line, 0); else rl_get_next_history (last_found_line - orig_line, 0); - /* If the string was not found, put point at the end of the line. */ + /* If the string was not found, put point at the end of the last matching + line. If last_found_line == orig_line, we didn't find any matching + history lines at all, so put point back in its original position. */ if (line_index < 0) - line_index = strlen (rl_line_buffer); + { + if (last_found_line == orig_line) + line_index = orig_point; + else + line_index = strlen (rl_line_buffer); + rl_mark = orig_mark; + } + rl_point = line_index; + /* Don't worry about where to put the mark here; rl_get_previous_history + and rl_get_next_history take care of it. */ + rl_clear_message (); - if (allocated_line) - free (allocated_line); + FREE (allocated_line); free (lines); + RL_UNSETSTATE(RL_STATE_ISEARCH); + return 0; } diff --git a/readline/keymaps.c b/readline/keymaps.c index c73666bf273..12506d3aab2 100644 --- a/readline/keymaps.c +++ b/readline/keymaps.c @@ -7,7 +7,7 @@ Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 1, or (at your option) any + Free Software Foundation; either version 2, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with Readline; see the file COPYING. If not, write to the Free - Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -30,18 +30,18 @@ # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ +#include /* for FILE * definition for readline.h */ + +#include "readline.h" #include "rlconf.h" -#include "keymaps.h" + #include "emacs_keymap.c" #if defined (VI_MODE) #include "vi_keymap.c" #endif -extern int rl_do_lowercase_version (); -extern int rl_rubout (), rl_insert (); - -extern char *xmalloc (), *xrealloc (); +#include "xmalloc.h" /* **************************************************************** */ /* */ @@ -61,7 +61,7 @@ rl_make_bare_keymap () for (i = 0; i < KEYMAP_SIZE; i++) { keymap[i].type = ISFUNC; - keymap[i].function = (Function *)NULL; + keymap[i].function = (rl_command_func_t *)NULL; } for (i = 'A'; i < ('Z' + 1); i++) diff --git a/readline/keymaps.h b/readline/keymaps.h index 5dff46f56c2..66fa2a5ec14 100644 --- a/readline/keymaps.h +++ b/readline/keymaps.h @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,25 +18,23 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #ifndef _KEYMAPS_H_ #define _KEYMAPS_H_ +#ifdef __cplusplus +extern "C" { +#endif + #if defined (READLINE_LIBRARY) # include "rlstdc.h" # include "chardefs.h" +# include "rltypedefs.h" #else # include # include -#endif - -#if !defined (_FUNCTION_DEF) -# define _FUNCTION_DEF -typedef int Function (); -typedef void VFunction (); -typedef char *CPFunction (); -typedef char **CPPFunction (); +# include #endif /* A keymap contains one entry for each key in the ASCII set. @@ -46,16 +44,17 @@ typedef char **CPPFunction (); TYPE says which kind of thing FUNCTION is. */ typedef struct _keymap_entry { char type; - Function *function; + rl_command_func_t *function; } KEYMAP_ENTRY; /* This must be large enough to hold bindings for all of the characters in a desired character set (e.g, 128 for ASCII, 256 for ISO Latin-x, - and so on). */ -#define KEYMAP_SIZE 256 + and so on) plus one for subsequence matching. */ +#define KEYMAP_SIZE 257 +#define ANYOTHERKEY KEYMAP_SIZE-1 /* I wanted to make the above structure contain a union of: - union { Function *function; struct _keymap_entry *keymap; } value; + union { rl_command_func_t *function; struct _keymap_entry *keymap; } value; but this made it impossible for me to create a static array. Maybe I need C lessons. */ @@ -72,29 +71,33 @@ extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap; /* Return a new, empty keymap. Free it with free() when you are done. */ -extern Keymap rl_make_bare_keymap __P((void)); +extern Keymap rl_make_bare_keymap PARAMS((void)); /* Return a new keymap which is a copy of MAP. */ -extern Keymap rl_copy_keymap __P((Keymap)); +extern Keymap rl_copy_keymap PARAMS((Keymap)); /* Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and the Meta digits bound to produce numeric arguments. */ -extern Keymap rl_make_keymap __P((void)); +extern Keymap rl_make_keymap PARAMS((void)); /* Free the storage associated with a keymap. */ -extern void rl_discard_keymap __P((Keymap)); +extern void rl_discard_keymap PARAMS((Keymap)); /* These functions actually appear in bind.c */ /* Return the keymap corresponding to a given name. Names look like `emacs' or `emacs-meta' or `vi-insert'. */ -extern Keymap rl_get_keymap_by_name __P((char *)); +extern Keymap rl_get_keymap_by_name PARAMS((const char *)); /* Return the current keymap. */ -extern Keymap rl_get_keymap __P((void)); +extern Keymap rl_get_keymap PARAMS((void)); /* Set the current keymap to MAP. */ -extern void rl_set_keymap __P((Keymap)); +extern void rl_set_keymap PARAMS((Keymap)); + +#ifdef __cplusplus +} +#endif #endif /* _KEYMAPS_H_ */ diff --git a/readline/kill.c b/readline/kill.c index 78387e138c2..f8c6961bbd3 100644 --- a/readline/kill.c +++ b/readline/kill.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -46,17 +46,8 @@ #include "readline.h" #include "history.h" -extern int _rl_last_command_was_kill; -extern int rl_editing_mode; -extern int rl_explicit_arg; -extern Function *rl_last_func; - -extern void _rl_init_argument (); -extern int _rl_set_mark_at_pos (); -extern void _rl_fix_point (); -extern void _rl_abort_internal (); - -extern char *xmalloc (), *xrealloc (); +#include "rlprivate.h" +#include "xmalloc.h" /* **************************************************************** */ /* */ @@ -79,10 +70,16 @@ static int rl_kill_index; /* How many slots we have in the kill ring. */ static int rl_kill_ring_length; +static int _rl_copy_to_kill_ring PARAMS((char *, int)); +static int region_kill_internal PARAMS((int)); +static int _rl_copy_word_as_kill PARAMS((int, int)); +static int rl_yank_nth_arg_internal PARAMS((int, int, int)); + /* How to say that you only want to save a certain amount of kill material. */ int -rl_set_retained_kills (int num __attribute__((unused))) +rl_set_retained_kills (num) + int num __attribute__((unused)); { return 0; } @@ -137,7 +134,7 @@ _rl_copy_to_kill_ring (text, append) if (_rl_last_command_was_kill && rl_editing_mode != vi_mode) { old = rl_kill_ring[slot]; - new = xmalloc (1 + strlen (old) + strlen (text)); + new = (char *)xmalloc (1 + strlen (old) + strlen (text)); if (append) { @@ -204,18 +201,21 @@ int rl_kill_word (count, key) int count, key; { - int orig_point = rl_point; + int orig_point; if (count < 0) return (rl_backward_kill_word (-count, key)); else { + orig_point = rl_point; rl_forward_word (count, key); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; } @@ -225,16 +225,20 @@ int rl_backward_kill_word (count, ignore) int count, ignore; { - int orig_point = rl_point; + int orig_point; if (count < 0) return (rl_kill_word (-count, ignore)); else { + orig_point = rl_point; rl_backward_word (count, ignore); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); + + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; } @@ -245,16 +249,19 @@ int rl_kill_line (direction, ignore) int direction, ignore; { - int orig_point = rl_point; + int orig_point; if (direction < 0) return (rl_backward_kill_line (1, ignore)); else { + orig_point = rl_point; rl_end_of_line (1, ignore); if (orig_point != rl_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; } @@ -265,18 +272,22 @@ int rl_backward_kill_line (direction, ignore) int direction, ignore; { - int orig_point = rl_point; + int orig_point; if (direction < 0) return (rl_kill_line (1, ignore)); else { if (!rl_point) - ding (); + rl_ding (); else { + orig_point = rl_point; rl_beg_of_line (1, ignore); - rl_kill_text (orig_point, rl_point); + if (rl_point != orig_point) + rl_kill_text (orig_point, rl_point); + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } } return 0; @@ -284,12 +295,13 @@ rl_backward_kill_line (direction, ignore) /* Kill the whole line, no matter where point is. */ int -rl_kill_full_line (int count __attribute__((unused)), - int ignore __attribute__((unused))) +rl_kill_full_line (count, ignore) + int count __attribute__((unused)), ignore __attribute__((unused)); { rl_begin_undo_group (); rl_point = 0; rl_kill_text (rl_point, rl_end); + rl_mark = 0; rl_end_undo_group (); return 0; } @@ -301,12 +313,13 @@ rl_kill_full_line (int count __attribute__((unused)), /* This does what C-w does in Unix. We can't prevent people from using behaviour that they expect. */ int -rl_unix_word_rubout (int count, int key __attribute__((unused))) +rl_unix_word_rubout (count, key) + int count, key __attribute__((unused)); { int orig_point; if (rl_point == 0) - ding (); + rl_ding (); else { orig_point = rl_point; @@ -323,6 +336,8 @@ rl_unix_word_rubout (int count, int key __attribute__((unused))) } rl_kill_text (orig_point, rl_point); + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; } @@ -334,15 +349,17 @@ rl_unix_word_rubout (int count, int key __attribute__((unused))) into the line at all, and if you aren't, then you know what you are doing. */ int -rl_unix_line_discard (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_unix_line_discard (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { if (rl_point == 0) - ding (); + rl_ding (); else { rl_kill_text (rl_point, 0); rl_point = 0; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; } @@ -355,38 +372,37 @@ region_kill_internal (delete) { char *text; - if (rl_mark == rl_point) + if (rl_mark != rl_point) { - _rl_last_command_was_kill++; - return 0; + text = rl_copy_text (rl_point, rl_mark); + if (delete) + rl_delete_text (rl_point, rl_mark); + _rl_copy_to_kill_ring (text, rl_point < rl_mark); } - text = rl_copy_text (rl_point, rl_mark); - if (delete) - rl_delete_text (rl_point, rl_mark); - _rl_copy_to_kill_ring (text, rl_point < rl_mark); - _rl_last_command_was_kill++; return 0; } /* Copy the text in the region to the kill ring. */ int -rl_copy_region_to_kill (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_copy_region_to_kill (count, ignore) + int count __attribute__((unused)), ignore __attribute__((unused)); { return (region_kill_internal (0)); } /* Kill the text between the point and mark. */ int -rl_kill_region (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_kill_region (count, ignore) + int count __attribute__((unused)), ignore __attribute__((unused)); { - int r; + int r, npoint; + npoint = (rl_point < rl_mark) ? rl_point : rl_mark; r = region_kill_internal (1); _rl_fix_point (1); + rl_point = npoint; return r; } @@ -440,11 +456,11 @@ rl_copy_backward_word (count, key) return (_rl_copy_word_as_kill (count, -1)); } - + /* Yank back the last killed text. This ignores arguments. */ int -rl_yank (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_yank (count, ignore) + int count __attribute__((unused)), ignore __attribute__((unused)); { if (rl_kill_ring == 0) { @@ -462,8 +478,8 @@ rl_yank (int count __attribute__((unused)), delete that text from the line, rotate the index down, and yank back some other text. */ int -rl_yank_pop (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_yank_pop (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { int l, n; @@ -501,7 +517,9 @@ rl_yank_nth_arg_internal (count, ignore, history_skip) { register HIST_ENTRY *entry; char *arg; - int i; + int i, pos; + + pos = where_history (); if (history_skip) { @@ -510,30 +528,26 @@ rl_yank_nth_arg_internal (count, ignore, history_skip) } entry = previous_history (); - if (entry) + + history_set_pos (pos); + + if (entry == 0) { - if (history_skip) - { - for (i = 0; i < history_skip; i++) - next_history (); - } - next_history (); - } - else - { - ding (); + rl_ding (); return -1; } arg = history_arg_extract (count, count, entry->line); if (!arg || !*arg) { - ding (); + rl_ding (); return -1; } rl_begin_undo_group (); + _rl_set_mark_at_pos (rl_point); + #if defined (VI_MODE) /* Vi mode always inserts a space before yanking the argument, and it inserts it right *after* rl_point. */ @@ -590,7 +604,7 @@ rl_yank_last_arg (count, key) if (history_skip < 0) history_skip = 0; } - + if (explicit_arg_p) retval = rl_yank_nth_arg_internal (count_passed, key, history_skip); else @@ -601,7 +615,7 @@ rl_yank_last_arg (count, key) } /* A special paste command for users of Cygnus's cygwin32. */ -#if defined (__CYGWIN32__) +#if defined (__CYGWIN__) #include int @@ -621,12 +635,13 @@ rl_paste_from_clipboard (count, key) if (ptr) { len = ptr - data; - ptr = xmalloc (len + 1); + ptr = (char *)xmalloc (len + 1); ptr[len] = '\0'; strncpy (ptr, data, len); } else ptr = data; + _rl_set_mark_at_pos (rl_point); rl_insert_text (ptr); if (ptr != data) free (ptr); @@ -634,4 +649,4 @@ rl_paste_from_clipboard (count, key) } return (0); } -#endif /* __CYGWIN32__ */ +#endif /* __CYGWIN__ */ diff --git a/readline/macro.c b/readline/macro.c index b4d7835c631..7ab4b6ca657 100644 --- a/readline/macro.c +++ b/readline/macro.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -46,19 +46,8 @@ #include "readline.h" #include "history.h" -#define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) - -/* Forward definitions. */ -void _rl_push_executing_macro (), _rl_pop_executing_macro (); -void _rl_add_macro_char (); - -/* Extern declarations. */ -extern int rl_explicit_arg; -extern int rl_key_sequence_length; - -extern void _rl_abort_internal (); - -extern char *xmalloc (), *xrealloc (); +#include "rlprivate.h" +#include "xmalloc.h" /* **************************************************************** */ /* */ @@ -66,12 +55,9 @@ extern char *xmalloc (), *xrealloc (); /* */ /* **************************************************************** */ -/* Non-zero means to save keys that we dispatch on in a kbd macro. */ -int _rl_defining_kbd_macro = 0; - /* The currently executing macro string. If this is non-zero, then it is a malloc ()'ed string where input is coming from. */ -char *_rl_executing_macro = (char *)NULL; +char *rl_executing_macro = (char *)NULL; /* The offset in the above string to the next character to be read. */ static int executing_macro_index; @@ -90,7 +76,7 @@ static int current_macro_index; It is a linked list of string/index for each saved macro. */ struct saved_macro { struct saved_macro *next; - const char *string; + char *string; int sindex; }; @@ -100,11 +86,13 @@ static struct saved_macro *macro_list = (struct saved_macro *)NULL; /* Set up to read subsequent input from STRING. STRING is free ()'ed when we are done with it. */ void -_rl_with_macro_input (const char *string) +_rl_with_macro_input (string) + char *string; { _rl_push_executing_macro (); - _rl_executing_macro = (char*) string; + rl_executing_macro = string; executing_macro_index = 0; + RL_SETSTATE(RL_STATE_MACROINPUT); } /* Return the next character available from a macro, or 0 if @@ -112,16 +100,16 @@ _rl_with_macro_input (const char *string) int _rl_next_macro_key () { - if (_rl_executing_macro == 0) + if (rl_executing_macro == 0) return (0); - if (_rl_executing_macro[executing_macro_index] == 0) + if (rl_executing_macro[executing_macro_index] == 0) { _rl_pop_executing_macro (); return (_rl_next_macro_key ()); } - return (_rl_executing_macro[executing_macro_index++]); + return (rl_executing_macro[executing_macro_index++]); } /* Save the currently executing macro on a stack of saved macros. */ @@ -133,7 +121,7 @@ _rl_push_executing_macro () saver = (struct saved_macro *)xmalloc (sizeof (struct saved_macro)); saver->next = macro_list; saver->sindex = executing_macro_index; - saver->string = _rl_executing_macro; + saver->string = rl_executing_macro; macro_list = saver; } @@ -145,20 +133,21 @@ _rl_pop_executing_macro () { struct saved_macro *macro; - if (_rl_executing_macro) - free (_rl_executing_macro); - - _rl_executing_macro = (char *)NULL; + FREE (rl_executing_macro); + rl_executing_macro = (char *)NULL; executing_macro_index = 0; if (macro_list) { macro = macro_list; - _rl_executing_macro = (char*) macro_list->string; + rl_executing_macro = macro_list->string; executing_macro_index = macro_list->sindex; macro_list = macro_list->next; free (macro); } + + if (rl_executing_macro == 0) + RL_UNSETSTATE(RL_STATE_MACROINPUT); } /* Add a character to the macro being built. */ @@ -169,9 +158,9 @@ _rl_add_macro_char (c) if (current_macro_index + 1 >= current_macro_size) { if (current_macro == 0) - current_macro = xmalloc (current_macro_size = 25); + current_macro = (char *)xmalloc (current_macro_size = 25); else - current_macro = xrealloc (current_macro, current_macro_size += 25); + current_macro = (char *)xrealloc (current_macro, current_macro_size += 25); } current_macro[current_macro_index++] = c; @@ -188,14 +177,11 @@ _rl_kill_kbd_macro () } current_macro_size = current_macro_index = 0; - if (_rl_executing_macro) - { - free (_rl_executing_macro); - _rl_executing_macro = (char *) NULL; - } + FREE (rl_executing_macro); + rl_executing_macro = (char *) NULL; executing_macro_index = 0; - _rl_defining_kbd_macro = 0; + RL_UNSETSTATE(RL_STATE_MACRODEF); } /* Begin defining a keyboard macro. @@ -205,10 +191,10 @@ _rl_kill_kbd_macro () definition to the end of the existing macro, and start by re-executing the existing macro. */ int -rl_start_kbd_macro (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_start_kbd_macro (ignore1, ignore2) + int ignore1 __attribute__((unused)), ignore2 __attribute__((unused)); { - if (_rl_defining_kbd_macro) + if (RL_ISSTATE (RL_STATE_MACRODEF)) { _rl_abort_internal (); return -1; @@ -222,7 +208,7 @@ rl_start_kbd_macro (int count __attribute__((unused)), else current_macro_index = 0; - _rl_defining_kbd_macro = 1; + RL_SETSTATE(RL_STATE_MACRODEF); return 0; } @@ -230,9 +216,10 @@ rl_start_kbd_macro (int count __attribute__((unused)), A numeric argument says to execute the macro right now, that many times, counting the definition as the first time. */ int -rl_end_kbd_macro (int count, int ignore __attribute__((unused))) +rl_end_kbd_macro (count, ignore) + int count, ignore __attribute__((unused)); { - if (_rl_defining_kbd_macro == 0) + if (RL_ISSTATE (RL_STATE_MACRODEF) == 0) { _rl_abort_internal (); return -1; @@ -241,7 +228,7 @@ rl_end_kbd_macro (int count, int ignore __attribute__((unused))) current_macro_index -= rl_key_sequence_length - 1; current_macro[current_macro_index] = '\0'; - _rl_defining_kbd_macro = 0; + RL_UNSETSTATE(RL_STATE_MACRODEF); return (rl_call_last_kbd_macro (--count, 0)); } @@ -249,14 +236,15 @@ rl_end_kbd_macro (int count, int ignore __attribute__((unused))) /* Execute the most recently defined keyboard macro. COUNT says how many times to execute it. */ int -rl_call_last_kbd_macro (int count, int key __attribute__((unused))) +rl_call_last_kbd_macro (count, ignore) + int count, ignore __attribute__((unused)); { if (current_macro == 0) _rl_abort_internal (); - if (_rl_defining_kbd_macro) + if (RL_ISSTATE (RL_STATE_MACRODEF)) { - ding (); /* no recursive macros */ + rl_ding (); /* no recursive macros */ current_macro[--current_macro_index] = '\0'; /* erase this char */ return 0; } diff --git a/readline/mbutil.c b/readline/mbutil.c new file mode 100644 index 00000000000..1b7342bfc0b --- /dev/null +++ b/readline/mbutil.c @@ -0,0 +1,337 @@ +/* mbutil.c -- readline multibyte character utility functions */ + +/* Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#include +#include +#include "posixjmp.h" + +#if defined (HAVE_UNISTD_H) +# include /* for _POSIX_VERSION */ +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#include +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +#if defined (TIOCSTAT_IN_SYS_IOCTL) +# include +#endif /* TIOCSTAT_IN_SYS_IOCTL */ + +/* Some standard library routines. */ +#include "readline.h" + +#include "rlprivate.h" +#include "xmalloc.h" + +/* Declared here so it can be shared between the readline and history + libraries. */ +#if defined (HANDLE_MULTIBYTE) +int rl_byte_oriented = 0; +#else +int rl_byte_oriented = 1; +#endif + +/* **************************************************************** */ +/* */ +/* Multibyte Character Utility Functions */ +/* */ +/* **************************************************************** */ + +#if defined(HANDLE_MULTIBYTE) + +static int +_rl_find_next_mbchar_internal (string, seed, count, find_non_zero) + char *string; + int seed, count, find_non_zero; +{ + size_t tmp = 0; + mbstate_t ps; + int point = 0; + wchar_t wc; + + memset(&ps, 0, sizeof (mbstate_t)); + if (seed < 0) + seed = 0; + if (count <= 0) + return seed; + + point = seed + _rl_adjust_point(string, seed, &ps); + /* if this is true, means that seed was not pointed character + started byte. So correct the point and consume count */ + if (seed < point) + count --; + + while (count > 0) + { + tmp = mbrtowc (&wc, string+point, strlen(string + point), &ps); + if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) + { + /* invalid bytes. asume a byte represents a character */ + point++; + count--; + /* reset states. */ + memset(&ps, 0, sizeof(mbstate_t)); + } + else if (tmp == (size_t)0) + /* found '\0' char */ + break; + else + { + /* valid bytes */ + point += tmp; + if (find_non_zero) + { + if (wcwidth (wc) == 0) + continue; + else + count--; + } + else + count--; + } + } + + if (find_non_zero) + { + tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); + while (wcwidth (wc) == 0) + { + point += tmp; + tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); + if (tmp == (size_t)(0) || tmp == (size_t)(-1) || tmp == (size_t)(-2)) + break; + } + } + return point; +} + +static int +_rl_find_prev_mbchar_internal (string, seed, find_non_zero) + char *string; + int seed, find_non_zero; +{ + mbstate_t ps; + int prev, non_zero_prev, point, length; + size_t tmp; + wchar_t wc; + + memset(&ps, 0, sizeof(mbstate_t)); + length = strlen(string); + + if (seed < 0) + return 0; + else if (length < seed) + return length; + + prev = non_zero_prev = point = 0; + while (point < seed) + { + tmp = mbrtowc (&wc, string + point, length - point, &ps); + if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) + { + /* in this case, bytes are invalid or shorted to compose + multibyte char, so assume that the first byte represents + a single character anyway. */ + tmp = 1; + /* clear the state of the byte sequence, because + in this case effect of mbstate is undefined */ + memset(&ps, 0, sizeof (mbstate_t)); + } + else if (tmp == 0) + break; /* Found '\0' char. Can this happen? */ + else + { + if (find_non_zero) + { + if (wcwidth (wc) != 0) + prev = point; + } + else + prev = point; + } + + point += tmp; + } + + return prev; +} + +/* return the number of bytes parsed from the multibyte sequence starting + at src, if a non-L'\0' wide character was recognized. It returns 0, + if a L'\0' wide character was recognized. It returns (size_t)(-1), + if an invalid multibyte sequence was encountered. It returns (size_t)(-2) + if it couldn't parse a complete multibyte character. */ +int +_rl_get_char_len (src, ps) + char *src; + mbstate_t *ps; +{ + size_t tmp; + + tmp = mbrlen((const char *)src, (size_t)strlen (src), ps); + if (tmp == (size_t)(-2)) + { + /* shorted to compose multibyte char */ + memset (ps, 0, sizeof(mbstate_t)); + return -2; + } + else if (tmp == (size_t)(-1)) + { + /* invalid to compose multibyte char */ + /* initialize the conversion state */ + memset (ps, 0, sizeof(mbstate_t)); + return -1; + } + else if (tmp == (size_t)0) + return 0; + else + return (int)tmp; +} + +/* compare the specified two characters. If the characters matched, + return 1. Otherwise return 0. */ +int +_rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2) + char *buf1, *buf2; + mbstate_t *ps1, *ps2; + int pos1, pos2; +{ + int i, w1, w2; + + if ((w1 = _rl_get_char_len (&buf1[pos1], ps1)) <= 0 || + (w2 = _rl_get_char_len (&buf2[pos2], ps2)) <= 0 || + (w1 != w2) || + (buf1[pos1] != buf2[pos2])) + return 0; + + for (i = 1; i < w1; i++) + if (buf1[pos1+i] != buf2[pos2+i]) + return 0; + + return 1; +} + +/* adjust pointed byte and find mbstate of the point of string. + adjusted point will be point <= adjusted_point, and returns + differences of the byte(adjusted_point - point). + if point is invalied (point < 0 || more than string length), + it returns -1 */ +int +_rl_adjust_point(string, point, ps) + char *string; + int point; + mbstate_t *ps; +{ + size_t tmp = 0; + int length; + int pos = 0; + + length = strlen(string); + if (point < 0) + return -1; + if (length < point) + return -1; + + while (pos < point) + { + tmp = mbrlen (string + pos, length - pos, ps); + if((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) + { + /* in this case, bytes are invalid or shorted to compose + multibyte char, so assume that the first byte represents + a single character anyway. */ + pos++; + /* clear the state of the byte sequence, because + in this case effect of mbstate is undefined */ + memset (ps, 0, sizeof (mbstate_t)); + } + else + pos += tmp; + } + + return (pos - point); +} + +int +_rl_is_mbchar_matched (string, seed, end, mbchar, length) + char *string; + int seed, end; + char *mbchar; + int length; +{ + int i; + + if ((end - seed) < length) + return 0; + + for (i = 0; i < length; i++) + if (string[seed + i] != mbchar[i]) + return 0; + return 1; +} +#endif /* HANDLE_MULTIBYTE */ + +/* Find next `count' characters started byte point of the specified seed. + If flags is MB_FIND_NONZERO, we look for non-zero-width multibyte + characters. */ +#undef _rl_find_next_mbchar +int +_rl_find_next_mbchar (string, seed, count, flags) + char *string __attribute__((unused)); + int seed, count, flags __attribute__((unused)); +{ +#if defined (HANDLE_MULTIBYTE) + return _rl_find_next_mbchar_internal (string, seed, count, flags); +#else + return (seed + count); +#endif +} + +/* Find previous character started byte point of the specified seed. + Returned point will be point <= seed. If flags is MB_FIND_NONZERO, + we look for non-zero-width multibyte characters. */ +#undef _rl_find_prev_mbchar +int +_rl_find_prev_mbchar (string, seed, flags) + char *string __attribute__((unused)); + int seed, flags __attribute__((unused)); +{ +#if defined (HANDLE_MULTIBYTE) + return _rl_find_prev_mbchar_internal (string, seed, flags); +#else + return ((seed == 0) ? seed : seed - 1); +#endif +} diff --git a/readline/misc.c b/readline/misc.c new file mode 100644 index 00000000000..94ad433473b --- /dev/null +++ b/readline/misc.c @@ -0,0 +1,496 @@ +/* misc.c -- miscellaneous bindable readline functions. */ + +/* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +static int rl_digit_loop PARAMS((void)); +static void _rl_history_set_point PARAMS((void)); + +/* Forward declarations used in this file */ +void _rl_free_history_entry PARAMS((HIST_ENTRY *)); + +/* If non-zero, rl_get_previous_history and rl_get_next_history attempt + to preserve the value of rl_point from line to line. */ +int _rl_history_preserve_point = 0; + +/* Saved target point for when _rl_history_preserve_point is set. Special + value of -1 means that point is at the end of the line. */ +int _rl_history_saved_point = -1; + +/* **************************************************************** */ +/* */ +/* Numeric Arguments */ +/* */ +/* **************************************************************** */ + +/* Handle C-u style numeric args, as well as M--, and M-digits. */ +static int +rl_digit_loop () +{ + int key, c, sawminus, sawdigits; + + rl_save_prompt (); + + RL_SETSTATE(RL_STATE_NUMERICARG); + sawminus = sawdigits = 0; + while (1) + { + if (rl_numeric_arg > 1000000) + { + sawdigits = rl_explicit_arg = rl_numeric_arg = 0; + rl_ding (); + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return 1; + } + rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); + RL_SETSTATE(RL_STATE_MOREINPUT); + key = c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (c < 0) + { + _rl_abort_internal (); + return -1; + } + + /* If we see a key bound to `universal-argument' after seeing digits, + it ends the argument but is otherwise ignored. */ + if (_rl_keymap[c].type == ISFUNC && + _rl_keymap[c].function == rl_universal_argument) + { + if (sawdigits == 0) + { + rl_numeric_arg *= 4; + continue; + } + else + { + RL_SETSTATE(RL_STATE_MOREINPUT); + key = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return (_rl_dispatch (key, _rl_keymap)); + } + } + + c = UNMETA (c); + + if (_rl_digit_p (c)) + { + rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + c - '0' : c - '0'; + sawdigits = rl_explicit_arg = 1; + } + else if (c == '-' && rl_explicit_arg == 0) + { + rl_numeric_arg = sawminus = 1; + rl_arg_sign = -1; + } + else + { + /* Make M-- command equivalent to M--1 command. */ + if (sawminus && rl_numeric_arg == 1 && rl_explicit_arg == 0) + rl_explicit_arg = 1; + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return (_rl_dispatch (key, _rl_keymap)); + } + } + + /*NOTREACHED*/ +} + +/* Add the current digit to the argument in progress. */ +int +rl_digit_argument (ignore, key) + int ignore __attribute__((unused)), key; +{ + rl_execute_next (key); + return (rl_digit_loop ()); +} + +/* What to do when you abort reading an argument. */ +int +rl_discard_argument () +{ + rl_ding (); + rl_clear_message (); + _rl_init_argument (); + return 0; +} + +/* Create a default argument. */ +int +_rl_init_argument () +{ + rl_numeric_arg = rl_arg_sign = 1; + rl_explicit_arg = 0; + return 0; +} + +/* C-u, universal argument. Multiply the current argument by 4. + Read a key. If the key has nothing to do with arguments, then + dispatch on it. If the key is the abort character then abort. */ +int +rl_universal_argument (count, key) + int count __attribute__((unused)), key __attribute__((unused)); +{ + rl_numeric_arg *= 4; + return (rl_digit_loop ()); +} + +/* **************************************************************** */ +/* */ +/* History Utilities */ +/* */ +/* **************************************************************** */ + +/* We already have a history library, and that is what we use to control + the history features of readline. This is our local interface to + the history mechanism. */ + +/* While we are editing the history, this is the saved + version of the original line. */ +HIST_ENTRY *_rl_saved_line_for_history = (HIST_ENTRY *)NULL; + +/* Set the history pointer back to the last entry in the history. */ +void +_rl_start_using_history () +{ + using_history (); + if (_rl_saved_line_for_history) + _rl_free_history_entry (_rl_saved_line_for_history); + + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; +} + +/* Free the contents (and containing structure) of a HIST_ENTRY. */ +void +_rl_free_history_entry (entry) + HIST_ENTRY *entry; +{ + if (entry == 0) + return; + if (entry->line) + free (entry->line); + free (entry); +} + +/* Perhaps put back the current line if it has changed. */ +int +rl_maybe_replace_line () +{ + HIST_ENTRY *temp; + + temp = current_history (); + /* If the current line has changed, save the changes. */ + if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list)) + { + temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list); + free (temp->line); + free (temp); + } + return 0; +} + +/* Restore the _rl_saved_line_for_history if there is one. */ +int +rl_maybe_unsave_line () +{ + if (_rl_saved_line_for_history) + { + rl_replace_line (_rl_saved_line_for_history->line, 0); + rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data; + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + rl_point = rl_end; /* rl_replace_line sets rl_end */ + } + else + rl_ding (); + return 0; +} + +/* Save the current line in _rl_saved_line_for_history. */ +int +rl_maybe_save_line () +{ + if (_rl_saved_line_for_history == 0) + { + _rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); + _rl_saved_line_for_history->line = savestring (rl_line_buffer); + _rl_saved_line_for_history->data = (char *)rl_undo_list; + } + return 0; +} + +int +_rl_free_saved_history_line () +{ + if (_rl_saved_line_for_history) + { + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + } + return 0; +} + +static void +_rl_history_set_point () +{ + rl_point = (_rl_history_preserve_point && _rl_history_saved_point != -1) + ? _rl_history_saved_point + : rl_end; + if (rl_point > rl_end) + rl_point = rl_end; + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + rl_point = 0; +#endif /* VI_MODE */ + + if (rl_editing_mode == emacs_mode) + rl_mark = (rl_point == rl_end ? 0 : rl_end); +} + +void +rl_replace_from_history (entry, flags) + HIST_ENTRY *entry; + int flags __attribute__((unused)); /* currently unused */ +{ + rl_replace_line (entry->line, 0); + rl_undo_list = (UNDO_LIST *)entry->data; + rl_point = rl_end; + rl_mark = 0; + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + { + rl_point = 0; + rl_mark = rl_end; + } +#endif +} + +/* **************************************************************** */ +/* */ +/* History Commands */ +/* */ +/* **************************************************************** */ + +/* Meta-< goes to the start of the history. */ +int +rl_beginning_of_history (count, key) + int count __attribute__((unused)), key; +{ + return (rl_get_previous_history (1 + where_history (), key)); +} + +/* Meta-> goes to the end of the history. (The current line). */ +int +rl_end_of_history (count, key) + int count __attribute__((unused)), key __attribute__((unused)); +{ + rl_maybe_replace_line (); + using_history (); + rl_maybe_unsave_line (); + return 0; +} + +/* Move down to the next history line. */ +int +rl_get_next_history (count, key) + int count, key; +{ + HIST_ENTRY *temp; + + if (count < 0) + return (rl_get_previous_history (-count, key)); + + if (count == 0) + return 0; + + rl_maybe_replace_line (); + + /* either not saved by rl_newline or at end of line, so set appropriately. */ + if (_rl_history_saved_point == -1 && (rl_point || rl_end)) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + temp = (HIST_ENTRY *)NULL; + while (count) + { + temp = next_history (); + if (!temp) + break; + --count; + } + + if (temp == 0) + rl_maybe_unsave_line (); + else + { + rl_replace_from_history (temp, 0); + _rl_history_set_point (); + } + return 0; +} + +/* Get the previous item out of our interactive history, making it the current + line. If there is no previous history, just ding. */ +int +rl_get_previous_history (count, key) + int count, key; +{ + HIST_ENTRY *old_temp, *temp; + + if (count < 0) + return (rl_get_next_history (-count, key)); + + if (count == 0) + return 0; + + /* either not saved by rl_newline or at end of line, so set appropriately. */ + if (_rl_history_saved_point == -1 && (rl_point || rl_end)) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + /* If we don't have a line saved, then save this one. */ + rl_maybe_save_line (); + + /* If the current line has changed, save the changes. */ + rl_maybe_replace_line (); + + temp = old_temp = (HIST_ENTRY *)NULL; + while (count) + { + temp = previous_history (); + if (temp == 0) + break; + + old_temp = temp; + --count; + } + + /* If there was a large argument, and we moved back to the start of the + history, that is not an error. So use the last value found. */ + if (!temp && old_temp) + temp = old_temp; + + if (temp == 0) + rl_ding (); + else + { + rl_replace_from_history (temp, 0); + _rl_history_set_point (); + } + return 0; +} + +/* **************************************************************** */ +/* */ +/* Editing Modes */ +/* */ +/* **************************************************************** */ +/* How to toggle back and forth between editing modes. */ +int +rl_vi_editing_mode (count, key) + int count __attribute__((unused)), key; +{ +#if defined (VI_MODE) + _rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */ + rl_editing_mode = vi_mode; + rl_vi_insertion_mode (1, key); +#endif /* VI_MODE */ + + return 0; +} + +int +rl_emacs_editing_mode (count, key) + int count __attribute__((unused)), key __attribute__((unused)); +{ + rl_editing_mode = emacs_mode; + _rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */ + _rl_keymap = emacs_standard_keymap; + return 0; +} + +/* Function for the rest of the library to use to set insert/overwrite mode. */ +void +_rl_set_insert_mode (im, force) + int im, force __attribute__((unused)); +{ +#ifdef CURSOR_MODE + _rl_set_cursor (im, force); +#endif + + rl_insert_mode = im; +} + +/* Toggle overwrite mode. A positive explicit argument selects overwrite + mode. A negative or zero explicit argument selects insert mode. */ +int +rl_overwrite_mode (count, key) + int count, key __attribute__((unused)); +{ + if (rl_explicit_arg == 0) + _rl_set_insert_mode (rl_insert_mode ^ 1, 0); + else if (count > 0) + _rl_set_insert_mode (RL_IM_OVERWRITE, 0); + else + _rl_set_insert_mode (RL_IM_INSERT, 0); + + return 0; +} diff --git a/readline/nls.c b/readline/nls.c index f2d413d59d5..706c8195c10 100644 --- a/readline/nls.c +++ b/readline/nls.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -27,6 +27,8 @@ #include +#include + #if defined (HAVE_UNISTD_H) # include #endif /* HAVE_UNISTD_H */ @@ -44,13 +46,9 @@ #include #include "rldefs.h" - -extern int _rl_convert_meta_chars_to_ascii; -extern int _rl_output_meta_chars; -extern int _rl_meta_flag; - -/* Functions imported from shell.c */ -extern char *get_env_value (); +#include "readline.h" +#include "rlshell.h" +#include "rlprivate.h" #if !defined (HAVE_SETLOCALE) /* A list of legal values for the LANG or LC_CTYPE environment variables. @@ -70,12 +68,11 @@ static char *legal_lang_values[] = "iso88599", "iso885910", "koi8r", - "koi8-r", 0 }; -static char *normalize_codeset (); -static char *find_codeset (); +static char *normalize_codeset PARAMS((char *)); +static char *find_codeset PARAMS((char *, size_t *)); #endif /* !HAVE_SETLOCALE */ /* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value @@ -108,9 +105,9 @@ _rl_init_eightbit () /* We don't have setlocale. Finesse it. Check the environment for the appropriate variables and set eight-bit mode if they have the right values. */ - lspec = get_env_value ("LC_ALL"); - if (lspec == 0) lspec = get_env_value ("LC_CTYPE"); - if (lspec == 0) lspec = get_env_value ("LANG"); + lspec = sh_get_env_value ("LC_ALL"); + if (lspec == 0) lspec = sh_get_env_value ("LC_CTYPE"); + if (lspec == 0) lspec = sh_get_env_value ("LANG"); if (lspec == 0 || (t = normalize_codeset (lspec)) == 0) return (0); for (i = 0; t && legal_lang_values[i]; i++) @@ -144,10 +141,10 @@ normalize_codeset (codeset) all_digits = 1; for (len = 0, i = 0; i < namelen; i++) { - if (isalnum (codeset[i])) + if (ISALNUM ((unsigned char)codeset[i])) { len++; - all_digits &= isdigit (codeset[i]); + all_digits &= _rl_digit_p (codeset[i]); } } @@ -165,9 +162,9 @@ normalize_codeset (codeset) } for (i = 0; i < namelen; i++) - if (isalpha (codeset[i])) - *wp++ = (isupper (codeset[i])) ? tolower (codeset[i]) : codeset[i]; - else if (isdigit (codeset[i])) + if (ISALPHA ((unsigned char)codeset[i])) + *wp++ = _rl_to_lower (codeset[i]); + else if (_rl_digit_p (codeset[i])) *wp++ = codeset[i]; *wp = '\0'; diff --git a/readline/parens.c b/readline/parens.c index a500c0afac7..54ef1f3695f 100644 --- a/readline/parens.c +++ b/readline/parens.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,23 +18,11 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #include "rlconf.h" -#if !defined (PAREN_MATCHING) -extern int rl_insert (); - -int -rl_insert_close (count, invoking_key) - int count, invoking_key; -{ - return (rl_insert (count, invoking_key)); -} - -#else /* PAREN_MATCHING */ - #if defined (HAVE_CONFIG_H) # include #endif @@ -42,6 +30,10 @@ rl_insert_close (count, invoking_key) #include #include +#if defined (HAVE_UNISTD_H) +# include +#endif + #if defined (FD_SET) && !defined (HAVE_SELECT) # define HAVE_SELECT #endif @@ -64,8 +56,9 @@ extern char *strchr (), *strrchr (); #endif /* !strchr && !__STDC__ */ #include "readline.h" +#include "rlprivate.h" -extern int rl_explicit_arg; +static int find_matching_open PARAMS((char *, int, int)); /* Non-zero means try to blink the matching open parenthesis when the close parenthesis is inserted. */ @@ -75,14 +68,46 @@ int rl_blink_matching_paren = 1; int rl_blink_matching_paren = 0; #endif /* !HAVE_SELECT */ -static int find_matching_open (); +static int _paren_blink_usec = 500000; + +/* Change emacs_standard_keymap to have bindings for paren matching when + ON_OR_OFF is 1, change them back to self_insert when ON_OR_OFF == 0. */ +void +_rl_enable_paren_matching (on_or_off) + int on_or_off; +{ + if (on_or_off) + { /* ([{ */ + rl_bind_key_in_map (')', rl_insert_close, emacs_standard_keymap); + rl_bind_key_in_map (']', rl_insert_close, emacs_standard_keymap); + rl_bind_key_in_map ('}', rl_insert_close, emacs_standard_keymap); + } + else + { /* ([{ */ + rl_bind_key_in_map (')', rl_insert, emacs_standard_keymap); + rl_bind_key_in_map (']', rl_insert, emacs_standard_keymap); + rl_bind_key_in_map ('}', rl_insert, emacs_standard_keymap); + } +} + +int +rl_set_paren_blink_timeout (u) + int u; +{ + int o; + + o = _paren_blink_usec; + if (u > 0) + _paren_blink_usec = u; + return (o); +} int rl_insert_close (count, invoking_key) int count, invoking_key; { if (rl_explicit_arg || !rl_blink_matching_paren) - rl_insert (count, invoking_key); + _rl_insert_char (count, invoking_key); else { #if defined (HAVE_SELECT) @@ -90,7 +115,7 @@ rl_insert_close (count, invoking_key) struct timeval timer; fd_set readfds; - rl_insert (1, invoking_key); + _rl_insert_char (1, invoking_key); (*rl_redisplay_function) (); match_point = find_matching_open (rl_line_buffer, rl_point - 2, invoking_key); @@ -102,7 +127,7 @@ rl_insert_close (count, invoking_key) FD_ZERO (&readfds); FD_SET (fileno (rl_instream), &readfds); timer.tv_sec = 0; - timer.tv_usec = 500000; + timer.tv_usec = _paren_blink_usec; orig_point = rl_point; rl_point = match_point; @@ -110,7 +135,7 @@ rl_insert_close (count, invoking_key) ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer); rl_point = orig_point; #else /* !HAVE_SELECT */ - rl_insert (count, invoking_key); + _rl_insert_char (count, invoking_key); #endif /* !HAVE_SELECT */ } return 0; @@ -152,5 +177,3 @@ find_matching_open (string, from, closer) } return (i); } - -#endif /* PAREN_MATCHING */ diff --git a/readline/posixdir.h b/readline/posixdir.h index 7480a93d5db..505e27954f1 100644 --- a/readline/posixdir.h +++ b/readline/posixdir.h @@ -6,7 +6,7 @@ Bash is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with Bash; see the file COPYING. If not, write to the Free - Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ /* This file should be included instead of or . */ @@ -46,4 +46,12 @@ # define d_fileno d_ino #endif +#if defined (_POSIX_SOURCE) && (!defined (STRUCT_DIRENT_HAS_D_INO) || defined (BROKEN_DIRENT_D_INO)) +/* Posix does not require that the d_ino field be present, and some + systems do not provide it. */ +# define REAL_DIR_ENTRY(dp) 1 +#else +# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) +#endif /* _POSIX_SOURCE */ + #endif /* !_POSIXDIR_H_ */ diff --git a/readline/posixjmp.h b/readline/posixjmp.h index 1347cc07ebc..b52aa00332b 100644 --- a/readline/posixjmp.h +++ b/readline/posixjmp.h @@ -1,5 +1,23 @@ /* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ +/* Copyright (C) 1987,1991 Free Software Foundation, Inc. + + This file is part of GNU Bash, the Bourne Again SHell. + + Bash is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Bash is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with Bash; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #ifndef _POSIXJMP_H_ #define _POSIXJMP_H_ diff --git a/readline/posixstat.h b/readline/posixstat.h index bfce8c04fef..c93b52887e9 100644 --- a/readline/posixstat.h +++ b/readline/posixstat.h @@ -7,7 +7,7 @@ Bash is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with Bash; see the file COPYING. If not, write to the Free - Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ /* This file should be included instead of . It relies on the local sys/stat.h to work though. */ diff --git a/readline/readline.c b/readline/readline.c index 1da73250773..28801f19dfc 100644 --- a/readline/readline.c +++ b/readline/readline.c @@ -1,14 +1,14 @@ /* readline.c -- a general facility for reading lines of input with emacs style editing and completion. */ -/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. +/* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for reading lines of text with interactive input and history editing. The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -19,7 +19,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -47,12 +47,12 @@ # include #endif -#include #include #include "posixjmp.h" /* System-specific feature definitions and include files. */ #include "rldefs.h" +#include "rlmbutil.h" #if defined (__EMX__) # define INCL_DOSPROCESS @@ -63,117 +63,28 @@ #include "readline.h" #include "history.h" +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + #ifndef RL_LIBRARY_VERSION -# define RL_LIBRARY_VERSION "4.0" +# define RL_LIBRARY_VERSION "4.3" #endif -/* Evaluates its arguments multiple times. */ -#define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) - -/* NOTE: Functions and variables prefixed with `_rl_' are - pseudo-global: they are global so they can be shared - between files in the readline library, but are not intended - to be visible to readline callers. */ - -/* Variables and functions imported from terminal.c */ -extern int _rl_init_terminal_io (); -extern void _rl_enable_meta_key (); -#ifdef _MINIX -extern void _rl_output_character_function (); -#else -extern int _rl_output_character_function (); +#ifndef RL_READLINE_VERSION +# define RL_READLINE_VERSION 0x0403 #endif -extern int _rl_enable_meta; -extern int _rl_term_autowrap; -extern int screenwidth, screenheight, screenchars; - -/* Variables and functions imported from rltty.c. */ -extern void rl_prep_terminal (), rl_deprep_terminal (); -extern void rltty_set_default_bindings (); - -/* Functions imported from util.c. */ -extern void _rl_abort_internal (); -extern void rl_extend_line_buffer (); -extern int alphabetic (); - -/* Functions imported from bind.c. */ -extern void _rl_bind_if_unbound (); - -/* Functions imported from input.c. */ -extern int _rl_any_typein (); -extern void _rl_insert_typein (); -extern int rl_read_key (); - -/* Functions imported from nls.c */ -extern int _rl_init_eightbit (); - -/* Functions imported from shell.c */ -extern char *get_env_value (); - -/* External redisplay functions and variables from display.c */ -extern void _rl_move_vert (); -extern void _rl_update_final (); -extern void _rl_clear_to_eol (); -extern void _rl_clear_screen (); -extern void _rl_erase_entire_line (); - -extern void _rl_erase_at_end_of_line (); -extern void _rl_move_cursor_relative (); - -extern int _rl_vis_botlin; -extern int _rl_last_c_pos; -extern int _rl_horizontal_scroll_mode; -extern int rl_display_fixed; -extern int _rl_suppress_redisplay; -extern char *rl_display_prompt; - -/* Variables imported from complete.c. */ -extern const char *rl_completer_word_break_characters; -extern const char *rl_basic_word_break_characters; -extern int rl_completion_query_items; -extern int rl_complete_with_tilde_expansion; - -/* Variables and functions from macro.c. */ -extern void _rl_add_macro_char (); -extern void _rl_with_macro_input (); -extern int _rl_next_macro_key (); -extern int _rl_defining_kbd_macro; - -#if defined (VI_MODE) -/* Functions imported from vi_mode.c. */ -extern void _rl_vi_set_last (); -extern void _rl_vi_reset_last (); -extern void _rl_vi_done_inserting (); -extern int _rl_vi_textmod_command (); -extern void _rl_vi_initialize_line (); -#endif /* VI_MODE */ - -extern UNDO_LIST *rl_undo_list; -extern int _rl_doing_an_undo; +extern void _rl_free_history_entry PARAMS((HIST_ENTRY *)); /* Forward declarations used in this file. */ -void _rl_free_history_entry (); +static char *readline_internal PARAMS((void)); +static void readline_initialize_everything PARAMS((void)); -int _rl_dispatch (); -int _rl_init_argument (); +static void bind_arrow_keys_internal PARAMS((Keymap)); +static void bind_arrow_keys PARAMS((void)); -static char *readline_internal (); -static void readline_initialize_everything (); -static void start_using_history (); -static void bind_arrow_keys (); - -#if !defined (__GO32__) -static void readline_default_bindings (); -#endif /* !__GO32__ */ - -#if defined (__GO32__) -# include -# include -# undef HANDLE_SIGNALS -#endif /* __GO32__ */ - -extern char *xmalloc (), *xrealloc (); +static void readline_default_bindings PARAMS((void)); /* **************************************************************** */ /* */ @@ -183,6 +94,11 @@ extern char *xmalloc (), *xrealloc (); const char *rl_library_version = RL_LIBRARY_VERSION; +int rl_readline_version = RL_READLINE_VERSION; + +/* True if this is `real' readline as opposed to some stub substitute. */ +int rl_gnu_readline_p = 1; + /* A pointer to the keymap that is currently in use. By default, it is the standard emacs keymap. */ Keymap _rl_keymap = emacs_standard_keymap; @@ -190,6 +106,9 @@ Keymap _rl_keymap = emacs_standard_keymap; /* The current style of editing. */ int rl_editing_mode = emacs_mode; +/* The current insert mode: input (the default) or overwrite */ +int rl_insert_mode = RL_IM_DEFAULT; + /* Non-zero if we called this function from _rl_dispatch(). It's present so functions can find out whether they were called from a key binding or directly from an application. */ @@ -210,8 +129,13 @@ int rl_arg_sign = 1; /* Non-zero means we have been called at least once before. */ static int rl_initialized; +#if 0 /* If non-zero, this program is running in an EMACS buffer. */ static int running_in_emacs; +#endif + +/* Flags word encapsulating the current readline state. */ +int rl_readline_state = RL_STATE_NONE; /* The current offset in the current input line. */ int rl_point; @@ -226,7 +150,7 @@ int rl_end; int rl_done; /* The last function executed by readline. */ -Function *rl_last_func = (Function *)NULL; +rl_command_func_t *rl_last_func = (rl_command_func_t *)NULL; /* Top level environment for readline_internal (). */ procenv_t readline_top_level; @@ -238,24 +162,31 @@ FILE *_rl_in_stream, *_rl_out_stream; FILE *rl_instream = (FILE *)NULL; FILE *rl_outstream = (FILE *)NULL; -/* Non-zero means echo characters as they are read. */ -int readline_echoing_p = 1; +/* Non-zero means echo characters as they are read. Defaults to no echo; + set to 1 if there is a controlling terminal, we can get its attributes, + and the attributes include `echo'. Look at rltty.c:prepare_terminal_settings + for the code that sets it. */ +int readline_echoing_p = 0; /* Current prompt. */ -char *rl_prompt; +char *rl_prompt = (char *)NULL; int rl_visible_prompt_length = 0; +/* Set to non-zero by calling application if it has already printed rl_prompt + and does not want readline to do it the first time. */ +int rl_already_prompted = 0; + /* The number of characters read in order to type this complete command. */ int rl_key_sequence_length = 0; /* If non-zero, then this is the address of a function to call just before readline_internal_setup () prints the first prompt. */ -Function *rl_startup_hook = (Function *)NULL; +rl_hook_func_t *rl_startup_hook = (rl_hook_func_t *)NULL; /* If non-zero, this is the address of a function to call just before readline_internal_setup () returns and readline_internal starts reading input characters. */ -Function *rl_pre_input_hook = (Function *)NULL; +rl_hook_func_t *rl_pre_input_hook = (rl_hook_func_t *)NULL; /* What we use internally. You should always refer to RL_LINE_BUFFER. */ static char *the_line; @@ -268,7 +199,7 @@ int _rl_eof_char = CTRL ('D'); int rl_pending_input = 0; /* Pointer to a useful terminal name. */ -char *rl_terminal_name = (char *)NULL; +const char *rl_terminal_name = (const char *)NULL; /* Non-zero means to always use horizontal scrolling in line display. */ int _rl_horizontal_scroll_mode = 0; @@ -280,7 +211,7 @@ int _rl_mark_modified_lines = 0; /* The style of `bell' notification preferred. This can be set to NO_BELL, AUDIBLE_BELL, or VISIBLE_BELL. */ int _rl_bell_preference = AUDIBLE_BELL; - + /* String inserted into the line by rl_insert_comment (). */ char *_rl_comment_begin; @@ -290,11 +221,15 @@ Keymap rl_executing_keymap; /* Non-zero means to erase entire line, including prompt, on empty input lines. */ int rl_erase_empty_line = 0; +/* Non-zero means to read only this many characters rather than up to a + character bound to accept-line. */ +int rl_num_chars_to_read; + /* Line buffer and maintenence. */ char *rl_line_buffer = (char *)NULL; int rl_line_buffer_len = 0; -/* Forward declarations used by the display and termcap code. */ +/* Forward declarations used by the display, termcap, and history code. */ /* **************************************************************** */ /* */ @@ -324,24 +259,35 @@ int _rl_output_meta_chars = 0; /* Non-zero means treat 0200 bit in terminal input as Meta bit. */ int _rl_meta_flag = 0; /* Forward declaration */ +/* Set up the prompt and expand it. Called from readline() and + rl_callback_handler_install (). */ +int +rl_set_prompt (prompt) + const char *prompt; +{ + FREE (rl_prompt); + rl_prompt = prompt ? savestring (prompt) : (char *)NULL; + + rl_visible_prompt_length = rl_expand_prompt (rl_prompt); + return 0; +} + /* Read a line of input. Prompt with PROMPT. An empty PROMPT means none. A return value of NULL means that EOF was encountered. */ char * readline (prompt) - char *prompt; + const char *prompt; { char *value; - rl_prompt = prompt; - /* If we are at EOF return a NULL string. */ if (rl_pending_input == EOF) { - rl_pending_input = 0; + rl_clear_pending_input (); return ((char *)NULL); } - rl_visible_prompt_length = rl_expand_prompt (rl_prompt); + rl_set_prompt (prompt); rl_initialize (); (*rl_prep_term_function) (_rl_meta_flag); @@ -369,30 +315,41 @@ readline (prompt) STATIC_CALLBACK void readline_internal_setup () { + char *nprompt; + _rl_in_stream = rl_instream; _rl_out_stream = rl_outstream; if (rl_startup_hook) (*rl_startup_hook) (); - if (readline_echoing_p == 0) + /* If we're not echoing, we still want to at least print a prompt, because + rl_redisplay will not do it for us. If the calling application has a + custom redisplay function, though, let that function handle it. */ + if (readline_echoing_p == 0 && rl_redisplay_function == rl_redisplay) { - if (rl_prompt) + if (rl_prompt && rl_already_prompted == 0) { - fprintf (_rl_out_stream, "%s", rl_prompt); + nprompt = _rl_strip_prompt (rl_prompt); + fprintf (_rl_out_stream, "%s", nprompt); fflush (_rl_out_stream); + free (nprompt); } } else { - rl_on_new_line (); + if (rl_prompt && rl_already_prompted) + rl_on_new_line_with_prompt (); + else + rl_on_new_line (); (*rl_redisplay_function) (); -#if defined (VI_MODE) - if (rl_editing_mode == vi_mode) - rl_vi_insertion_mode (1, 0); -#endif /* VI_MODE */ } +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + rl_vi_insertion_mode (1, 0); +#endif /* VI_MODE */ + if (rl_pre_input_hook) (*rl_pre_input_hook) (); } @@ -422,7 +379,10 @@ readline_internal_teardown (eof) /* At any rate, it is highly likely that this line has an undo list. Get rid of it now. */ if (rl_undo_list) - free_undo_list (); + rl_free_undo_list (); + + /* Restore normal cursor, if available. */ + _rl_set_insert_mode (RL_IM_INSERT, 0); return (eof ? (char *)NULL : savestring (the_line)); } @@ -458,7 +418,9 @@ readline_internal_charloop () rl_key_sequence_length = 0; } + RL_SETSTATE(RL_STATE_READCMD); c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_READCMD); /* EOF typed to a non-blank line is a . */ if (c == EOF && rl_end) @@ -469,6 +431,7 @@ readline_internal_charloop () if (((c == _rl_eof_char && lastc != c) || c == EOF) && !rl_end) { #if defined (READLINE_CALLBACKS) + RL_SETSTATE(RL_STATE_DONE); return (rl_done = 1); #else eof_found = 1; @@ -477,7 +440,7 @@ readline_internal_charloop () } lastc = c; - _rl_dispatch (c, _rl_keymap); + _rl_dispatch ((unsigned char)c, _rl_keymap); /* If there was no change in _rl_last_command_was_kill, then no kill has taken place. Note that if input is pending we are reading @@ -492,6 +455,12 @@ readline_internal_charloop () rl_vi_check (); #endif /* VI_MODE */ + if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read) + { + (*rl_redisplay_function) (); + rl_newline (1, '\n'); + } + if (rl_done == 0) (*rl_redisplay_function) (); @@ -538,7 +507,7 @@ readline_internal () void _rl_init_line_state () { - rl_point = rl_end = 0; + rl_point = rl_end = rl_mark = 0; the_line = rl_line_buffer; the_line[0] = 0; } @@ -556,16 +525,25 @@ int _rl_dispatch (key, map) register int key; Keymap map; +{ + return _rl_dispatch_subseq (key, map, 0); +} + +int +_rl_dispatch_subseq (key, map, got_subseq) + register int key; + Keymap map; + int got_subseq; { int r, newkey; char *macro; - Function *func; + rl_command_func_t *func; if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii) { if (map[ESC].type == ISKMAP) { - if (_rl_defining_kbd_macro) + if (RL_ISSTATE (RL_STATE_MACRODEF)) _rl_add_macro_char (ESC); map = FUNCTION_TO_KEYMAP (map, ESC); key = UNMETA (key); @@ -573,11 +551,11 @@ _rl_dispatch (key, map) return (_rl_dispatch (key, map)); } else - ding (); + rl_ding (); return 0; } - if (_rl_defining_kbd_macro) + if (RL_ISSTATE (RL_STATE_MACRODEF)) _rl_add_macro_char (key); r = 0; @@ -585,7 +563,7 @@ _rl_dispatch (key, map) { case ISFUNC: func = map[key].function; - if (func != (Function *)NULL) + if (func) { /* Special case rl_do_lowercase_version (). */ if (func == rl_do_lowercase_version) @@ -598,15 +576,34 @@ _rl_dispatch (key, map) #endif rl_dispatching = 1; + RL_SETSTATE(RL_STATE_DISPATCHING); r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key); + RL_UNSETSTATE(RL_STATE_DISPATCHING); rl_dispatching = 0; /* If we have input pending, then the last command was a prefix command. Don't change the state of rl_last_func. Otherwise, remember the last command executed in this variable. */ - if (!rl_pending_input && map[key].function != rl_digit_argument) + if (rl_pending_input == 0 && map[key].function != rl_digit_argument) rl_last_func = map[key].function; } + else if (map[ANYOTHERKEY].function) + { + /* OK, there's no function bound in this map, but there is a + shadow function that was overridden when the current keymap + was created. Return -2 to note that. */ + _rl_unget_char (key); + return -2; + } + else if (got_subseq) + { + /* Return -1 to note that we're in a subsequence, but we don't + have a matching key, nor was one overridden. This means + we need to back up the recursion chain and find the last + subsequence that is bound to a function. */ + _rl_unget_char (key); + return -1; + } else { _rl_abort_internal (); @@ -615,11 +612,59 @@ _rl_dispatch (key, map) break; case ISKMAP: - if (map[key].function != (Function *)NULL) + if (map[key].function != 0) { +#if defined (VI_MODE) + /* The only way this test will be true is if a subsequence has been + bound starting with ESC, generally the arrow keys. What we do is + check whether there's input in the queue, which there generally + will be if an arrow key has been pressed, and, if there's not, + just dispatch to (what we assume is) rl_vi_movement_mode right + away. This is essentially an input test with a zero timeout. */ + if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap + && _rl_input_queued (0) == 0) + return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key))); +#endif + rl_key_sequence_length++; + + if (key == ESC) + RL_SETSTATE(RL_STATE_METANEXT); + RL_SETSTATE(RL_STATE_MOREINPUT); newkey = rl_read_key (); - r = _rl_dispatch (newkey, FUNCTION_TO_KEYMAP (map, key)); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + if (key == ESC) + RL_UNSETSTATE(RL_STATE_METANEXT); + + if (newkey < 0) + { + _rl_abort_internal (); + return -1; + } + + r = _rl_dispatch_subseq (newkey, FUNCTION_TO_KEYMAP (map, key), got_subseq || map[ANYOTHERKEY].function); + + if (r == -2) + /* We didn't match anything, and the keymap we're indexed into + shadowed a function previously bound to that prefix. Call + the function. The recursive call to _rl_dispatch_subseq has + already taken care of pushing any necessary input back onto + the input queue with _rl_unget_char. */ + r = _rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key)); + else if (r && map[ANYOTHERKEY].function) + { + /* We didn't match (r is probably -1), so return something to + tell the caller that it should try ANYOTHERKEY for an + overridden function. */ + _rl_unget_char (key); + return -2; + } + else if (r && got_subseq) + { + /* OK, back up the chain. */ + _rl_unget_char (key); + return -1; + } } else { @@ -629,7 +674,7 @@ _rl_dispatch (key, map) break; case ISMACR: - if (map[key].function != (Function *)NULL) + if (map[key].function != 0) { macro = savestring ((char *)map[key].function); _rl_with_macro_input (macro); @@ -659,8 +704,11 @@ rl_initialize () terminal and data structures. */ if (!rl_initialized) { + RL_SETSTATE(RL_STATE_INITIALIZING); readline_initialize_everything (); + RL_UNSETSTATE(RL_STATE_INITIALIZING); rl_initialized++; + RL_SETSTATE(RL_STATE_INITIALIZED); } /* Initalize the current line information. */ @@ -668,15 +716,16 @@ rl_initialize () /* We aren't done yet. We haven't even gotten started yet! */ rl_done = 0; + RL_UNSETSTATE(RL_STATE_DONE); /* Tell the history routines what is going on. */ - start_using_history (); + _rl_start_using_history (); /* Make the display buffer match the state of the line. */ rl_reset_line_state (); /* No such function typed yet. */ - rl_last_func = (Function *)NULL; + rl_last_func = (rl_command_func_t *)NULL; /* Parsing of key-bindings begins in an enabled state. */ _rl_parsing_conditionalized_out = 0; @@ -686,9 +735,13 @@ rl_initialize () _rl_vi_initialize_line (); #endif + /* Each line starts in insert mode (the default). */ + _rl_set_insert_mode (RL_IM_DEFAULT, 1); + return 0; } +#if 0 #if defined (__EMX__) static void _emx_build_environ () @@ -712,18 +765,23 @@ _emx_build_environ () *tp = 0; } #endif /* __EMX__ */ +#endif /* Initialize the entire state of the world. */ static void readline_initialize_everything () { +#if 0 #if defined (__EMX__) if (environ == 0) _emx_build_environ (); #endif +#endif - /* Find out if we are running in Emacs. */ - running_in_emacs = get_env_value ("EMACS") != (char *)0; +#if 0 + /* Find out if we are running in Emacs -- UNUSED. */ + running_in_emacs = sh_get_env_value ("EMACS") != (char *)0; +#endif /* Set up input and output if they are not already set up. */ if (!rl_instream) @@ -740,30 +798,30 @@ readline_initialize_everything () /* Allocate data structures. */ if (rl_line_buffer == 0) - rl_line_buffer = xmalloc (rl_line_buffer_len = DEFAULT_BUFFER_SIZE); + rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = DEFAULT_BUFFER_SIZE); /* Initialize the terminal interface. */ - _rl_init_terminal_io ((char *)NULL); + if (rl_terminal_name == 0) + rl_terminal_name = sh_get_env_value ("TERM"); + _rl_init_terminal_io (rl_terminal_name); -#if !defined (__GO32__) /* Bind tty characters to readline functions. */ readline_default_bindings (); -#endif /* !__GO32__ */ /* Initialize the function names. */ rl_initialize_funmap (); /* Decide whether we should automatically go into eight-bit mode. */ _rl_init_eightbit (); - + /* Read in the init file. */ rl_read_init_file ((char *)NULL); /* XXX */ if (_rl_horizontal_scroll_mode && _rl_term_autowrap) { - screenwidth--; - screenchars -= screenheight; + _rl_screenwidth--; + _rl_screenchars -= _rl_screenheight; } /* Override the effect of any `set keymap' assignments in the @@ -789,1367 +847,127 @@ readline_initialize_everything () static void readline_default_bindings () { - rltty_set_default_bindings (_rl_keymap); + rl_tty_set_default_bindings (_rl_keymap); } +/* Bind some common arrow key sequences in MAP. */ static void -bind_arrow_keys_internal () +bind_arrow_keys_internal (map) + Keymap map; { - Function *f; + Keymap xkeymap; - f = rl_function_of_keyseq ("\033[A", _rl_keymap, (int *)NULL); - if (!f || f == rl_do_lowercase_version) - { - _rl_bind_if_unbound ("\033[A", rl_get_previous_history); - _rl_bind_if_unbound ("\033[B", rl_get_next_history); - _rl_bind_if_unbound ("\033[C", rl_forward); - _rl_bind_if_unbound ("\033[D", rl_backward); - } + xkeymap = _rl_keymap; + _rl_keymap = map; - f = rl_function_of_keyseq ("\033OA", _rl_keymap, (int *)NULL); - if (!f || f == rl_do_lowercase_version) - { - _rl_bind_if_unbound ("\033OA", rl_get_previous_history); - _rl_bind_if_unbound ("\033OB", rl_get_next_history); - _rl_bind_if_unbound ("\033OC", rl_forward); - _rl_bind_if_unbound ("\033OD", rl_backward); - } +#if defined (__MSDOS__) + _rl_bind_if_unbound ("\033[0A", rl_get_previous_history); + _rl_bind_if_unbound ("\033[0B", rl_backward_char); + _rl_bind_if_unbound ("\033[0C", rl_forward_char); + _rl_bind_if_unbound ("\033[0D", rl_get_next_history); +#endif + + _rl_bind_if_unbound ("\033[A", rl_get_previous_history); + _rl_bind_if_unbound ("\033[B", rl_get_next_history); + _rl_bind_if_unbound ("\033[C", rl_forward_char); + _rl_bind_if_unbound ("\033[D", rl_backward_char); + _rl_bind_if_unbound ("\033[H", rl_beg_of_line); + _rl_bind_if_unbound ("\033[F", rl_end_of_line); + + _rl_bind_if_unbound ("\033OA", rl_get_previous_history); + _rl_bind_if_unbound ("\033OB", rl_get_next_history); + _rl_bind_if_unbound ("\033OC", rl_forward_char); + _rl_bind_if_unbound ("\033OD", rl_backward_char); + _rl_bind_if_unbound ("\033OH", rl_beg_of_line); + _rl_bind_if_unbound ("\033OF", rl_end_of_line); + + _rl_keymap = xkeymap; } -/* Try and bind the common arrow key prefix after giving termcap and +/* Try and bind the common arrow key prefixes after giving termcap and the inputrc file a chance to bind them and create `real' keymaps for the arrow key prefix. */ static void bind_arrow_keys () { - Keymap xkeymap; - - xkeymap = _rl_keymap; - - _rl_keymap = emacs_standard_keymap; - bind_arrow_keys_internal (); + bind_arrow_keys_internal (emacs_standard_keymap); #if defined (VI_MODE) - _rl_keymap = vi_movement_keymap; - bind_arrow_keys_internal (); + bind_arrow_keys_internal (vi_movement_keymap); + bind_arrow_keys_internal (vi_insertion_keymap); #endif - - _rl_keymap = xkeymap; -} - - -/* **************************************************************** */ -/* */ -/* Numeric Arguments */ -/* */ -/* **************************************************************** */ - -/* Handle C-u style numeric args, as well as M--, and M-digits. */ -static int -rl_digit_loop () -{ - int key, c, sawminus, sawdigits; - - rl_save_prompt (); - - sawminus = sawdigits = 0; - while (1) - { - if (rl_numeric_arg > 1000000) - { - sawdigits = rl_explicit_arg = rl_numeric_arg = 0; - ding (); - rl_restore_prompt (); - rl_clear_message (); - return 1; - } - rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); - key = c = rl_read_key (); - - /* If we see a key bound to `universal-argument' after seeing digits, - it ends the argument but is otherwise ignored. */ - if (_rl_keymap[c].type == ISFUNC && - _rl_keymap[c].function == rl_universal_argument) - { - if (sawdigits == 0) - { - rl_numeric_arg *= 4; - continue; - } - else - { - key = rl_read_key (); - rl_restore_prompt (); - rl_clear_message (); - return (_rl_dispatch (key, _rl_keymap)); - } - } - - c = UNMETA (c); - - if (_rl_digit_p (c)) - { - rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + c - '0' : c - '0'; - sawdigits = rl_explicit_arg = 1; - } - else if (c == '-' && rl_explicit_arg == 0) - { - rl_numeric_arg = sawminus = 1; - rl_arg_sign = -1; - } - else - { - /* Make M-- command equivalent to M--1 command. */ - if (sawminus && rl_numeric_arg == 1 && rl_explicit_arg == 0) - rl_explicit_arg = 1; - rl_restore_prompt (); - rl_clear_message (); - return (_rl_dispatch (key, _rl_keymap)); - } - } - - return 0; -} - -/* Add the current digit to the argument in progress. */ -int -rl_digit_argument (ignore, key) - int ignore __attribute__((unused)), key; -{ - rl_pending_input = key; - return (rl_digit_loop ()); -} - -/* What to do when you abort reading an argument. */ -int -rl_discard_argument () -{ - ding (); - rl_clear_message (); - _rl_init_argument (); - return 0; -} - -/* Create a default argument. */ -int -_rl_init_argument () -{ - rl_numeric_arg = rl_arg_sign = 1; - rl_explicit_arg = 0; - return 0; -} - -/* C-u, universal argument. Multiply the current argument by 4. - Read a key. If the key has nothing to do with arguments, then - dispatch on it. If the key is the abort character then abort. */ -int -rl_universal_argument (count, key) - int count __attribute__((unused)), key __attribute__((unused)); -{ - rl_numeric_arg *= 4; - return (rl_digit_loop ()); } /* **************************************************************** */ /* */ -/* Insert and Delete */ -/* */ -/* **************************************************************** */ - -/* Insert a string of text into the line at point. This is the only - way that you should do insertion. rl_insert () calls this - function. */ -int -rl_insert_text (const char *string) -{ - register int i, l = strlen (string); - - if (rl_end + l >= rl_line_buffer_len) - rl_extend_line_buffer (rl_end + l); - - for (i = rl_end; i >= rl_point; i--) - the_line[i + l] = the_line[i]; - strncpy (the_line + rl_point, string, l); - - /* Remember how to undo this if we aren't undoing something. */ - if (!_rl_doing_an_undo) - { - /* If possible and desirable, concatenate the undos. */ - if ((l == 1) && - rl_undo_list && - (rl_undo_list->what == UNDO_INSERT) && - (rl_undo_list->end == rl_point) && - (rl_undo_list->end - rl_undo_list->start < 20)) - rl_undo_list->end++; - else - rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL); - } - rl_point += l; - rl_end += l; - the_line[rl_end] = '\0'; - return l; -} - -/* Delete the string between FROM and TO. FROM is - inclusive, TO is not. */ -int -rl_delete_text (from, to) - int from, to; -{ - register char *text; - register int diff, i; - - /* Fix it if the caller is confused. */ - if (from > to) - SWAP (from, to); - - /* fix boundaries */ - if (to > rl_end) - { - to = rl_end; - if (from > to) - from = to; - } - - text = rl_copy_text (from, to); - - /* Some versions of strncpy() can't handle overlapping arguments. */ - diff = to - from; - for (i = from; i < rl_end - diff; i++) - the_line[i] = the_line[i + diff]; - - /* Remember how to undo this delete. */ - if (_rl_doing_an_undo == 0) - rl_add_undo (UNDO_DELETE, from, to, text); - else - free (text); - - rl_end -= diff; - the_line[rl_end] = '\0'; - return (diff); -} - -/* Fix up point so that it is within the line boundaries after killing - text. If FIX_MARK_TOO is non-zero, the mark is forced within line - boundaries also. */ - -#define _RL_FIX_POINT(x) \ - do { \ - if (x > rl_end) \ - x = rl_end; \ - else if (x < 0) \ - x = 0; \ - } while (0) - -void -_rl_fix_point (fix_mark_too) - int fix_mark_too; -{ - _RL_FIX_POINT (rl_point); - if (fix_mark_too) - _RL_FIX_POINT (rl_mark); -} -#undef _RL_FIX_POINT - -void -_rl_replace_text (text, start, end) - char *text; - int start, end; -{ - rl_begin_undo_group (); - rl_delete_text (start, end + 1); - rl_point = start; - rl_insert_text (text); - rl_end_undo_group (); -} - -/* **************************************************************** */ -/* */ -/* Readline character functions */ -/* */ -/* **************************************************************** */ - -/* This is not a gap editor, just a stupid line input routine. No hair - is involved in writing any of the functions, and none should be. */ - -/* Note that: - - rl_end is the place in the string that we would place '\0'; - i.e., it is always safe to place '\0' there. - - rl_point is the place in the string where the cursor is. Sometimes - this is the same as rl_end. - - Any command that is called interactively receives two arguments. - The first is a count: the numeric arg pased to this command. - The second is the key which invoked this command. -*/ - -/* **************************************************************** */ -/* */ -/* Movement Commands */ -/* */ -/* **************************************************************** */ - -/* Note that if you `optimize' the display for these functions, you cannot - use said functions in other functions which do not do optimizing display. - I.e., you will have to update the data base for rl_redisplay, and you - might as well let rl_redisplay do that job. */ - -/* Move forward COUNT characters. */ -int -rl_forward (count, key) - int count, key; -{ - if (count < 0) - rl_backward (-count, key); - else if (count > 0) - { - int end = rl_point + count; -#if defined (VI_MODE) - int lend = rl_end - (rl_editing_mode == vi_mode); -#else - int lend = rl_end; -#endif - - if (end > lend) - { - rl_point = lend; - ding (); - } - else - rl_point = end; - } - return 0; -} - -/* Move backward COUNT characters. */ -int -rl_backward (count, key) - int count, key; -{ - if (count < 0) - rl_forward (-count, key); - else if (count > 0) - { - if (rl_point < count) - { - rl_point = 0; - ding (); - } - else - rl_point -= count; - } - return 0; -} - -/* Move to the beginning of the line. */ -int -rl_beg_of_line (count, key) - int count __attribute__((unused)), key __attribute__((unused)); -{ - rl_point = 0; - return 0; -} - -/* Move to the end of the line. */ -int -rl_end_of_line (count, key) - int count __attribute__((unused)), key __attribute__((unused)); -{ - rl_point = rl_end; - return 0; -} - -/* Move forward a word. We do what Emacs does. */ -int -rl_forward_word (count, key) - int count, key; -{ - int c; - - if (count < 0) - { - rl_backward_word (-count, key); - return 0; - } - - while (count) - { - if (rl_point == rl_end) - return 0; - - /* If we are not in a word, move forward until we are in one. - Then, move forward until we hit a non-alphabetic character. */ - c = the_line[rl_point]; - if (alphabetic (c) == 0) - { - while (++rl_point < rl_end) - { - c = the_line[rl_point]; - if (alphabetic (c)) - break; - } - } - if (rl_point == rl_end) - return 0; - while (++rl_point < rl_end) - { - c = the_line[rl_point]; - if (alphabetic (c) == 0) - break; - } - --count; - } - return 0; -} - -/* Move backward a word. We do what Emacs does. */ -int -rl_backward_word (count, key) - int count, key; -{ - int c; - - if (count < 0) - { - rl_forward_word (-count, key); - return 0; - } - - while (count) - { - if (!rl_point) - return 0; - - /* Like rl_forward_word (), except that we look at the characters - just before point. */ - - c = the_line[rl_point - 1]; - if (alphabetic (c) == 0) - { - while (--rl_point) - { - c = the_line[rl_point - 1]; - if (alphabetic (c)) - break; - } - } - - while (rl_point) - { - c = the_line[rl_point - 1]; - if (alphabetic (c) == 0) - break; - else - --rl_point; - } - --count; - } - return 0; -} - -/* Clear the current line. Numeric argument to C-l does this. */ -int -rl_refresh_line (ignore1, ignore2) - int ignore1 __attribute__((unused)), ignore2 __attribute__((unused)); -{ - int curr_line, nleft; - - /* Find out whether or not there might be invisible characters in the - editing buffer. */ - if (rl_display_prompt == rl_prompt) - nleft = _rl_last_c_pos - screenwidth - rl_visible_prompt_length; - else - nleft = _rl_last_c_pos - screenwidth; - - if (nleft > 0) - curr_line = 1 + nleft / screenwidth; - else - curr_line = 0; - - _rl_move_vert (curr_line); - _rl_move_cursor_relative (0, the_line); /* XXX is this right */ - -#if defined (__GO32__) - { - int row, col, width, row_start; - - ScreenGetCursor (&row, &col); - width = ScreenCols (); - row_start = ScreenPrimary + (row * width); - memset (row_start + col, 0, (width - col) * 2); - } -#else /* !__GO32__ */ - _rl_clear_to_eol (0); /* arg of 0 means to not use spaces */ -#endif /* !__GO32__ */ - - rl_forced_update_display (); - rl_display_fixed = 1; - - return 0; -} - -/* C-l typed to a line without quoting clears the screen, and then reprints - the prompt and the current input line. Given a numeric arg, redraw only - the current line. */ -int -rl_clear_screen (count, key) - int count, key; -{ - if (rl_explicit_arg) - { - rl_refresh_line (count, key); - return 0; - } - - _rl_clear_screen (); /* calls termcap function to clear screen */ - rl_forced_update_display (); - rl_display_fixed = 1; - - return 0; -} - -int -rl_arrow_keys (count, c) - int count, c __attribute__((unused)); -{ - int ch; - - ch = rl_read_key (); - - switch (_rl_to_upper (ch)) - { - case 'A': - rl_get_previous_history (count, ch); - break; - - case 'B': - rl_get_next_history (count, ch); - break; - - case 'C': - rl_forward (count, ch); - break; - - case 'D': - rl_backward (count, ch); - break; - - default: - ding (); - } - return 0; -} - - -/* **************************************************************** */ -/* */ -/* Text commands */ -/* */ -/* **************************************************************** */ - -/* Insert the character C at the current location, moving point forward. */ -int -rl_insert (count, c) - int count, c; -{ - register int i; - char *string; - - if (count <= 0) - return 0; - - /* If we can optimize, then do it. But don't let people crash - readline because of extra large arguments. */ - if (count > 1 && count <= 1024) - { - string = xmalloc (1 + count); - - for (i = 0; i < count; i++) - string[i] = c; - - string[i] = '\0'; - rl_insert_text (string); - free (string); - - return 0; - } - - if (count > 1024) - { - int decreaser; - char str[1024+1]; - - for (i = 0; i < 1024; i++) - str[i] = c; - - while (count) - { - decreaser = (count > 1024 ? 1024 : count); - str[decreaser] = '\0'; - rl_insert_text (str); - count -= decreaser; - } - - return 0; - } - - /* We are inserting a single character. - If there is pending input, then make a string of all of the - pending characters that are bound to rl_insert, and insert - them all. */ - if (_rl_any_typein ()) - _rl_insert_typein (c); - else - { - /* Inserting a single character. */ - char str[2]; - - str[1] = '\0'; - str[0] = c; - rl_insert_text (str); - } - return 0; -} - -/* Insert the next typed character verbatim. */ -int -rl_quoted_insert (count, key) - int count, key __attribute__((unused)); -{ - int c; - - c = rl_read_key (); - return (rl_insert (count, c)); -} - -/* Insert a tab character. */ -int -rl_tab_insert (count, key) - int count, key __attribute__((unused)); -{ - return (rl_insert (count, '\t')); -} - -/* What to do when a NEWLINE is pressed. We accept the whole line. - KEY is the key that invoked this command. I guess it could have - meaning in the future. */ -int -rl_newline (count, key) - int count __attribute__((unused)), key __attribute__((unused)); -{ - rl_done = 1; - -#if defined (VI_MODE) - if (rl_editing_mode == vi_mode) - { - _rl_vi_done_inserting (); - _rl_vi_reset_last (); - } -#endif /* VI_MODE */ - - /* If we've been asked to erase empty lines, suppress the final update, - since _rl_update_final calls crlf(). */ - if (rl_erase_empty_line && rl_point == 0 && rl_end == 0) - return 0; - - if (readline_echoing_p) - _rl_update_final (); - return 0; -} - -/* What to do for some uppercase characters, like meta characters, - and some characters appearing in emacs_ctlx_keymap. This function - is just a stub, you bind keys to it and the code in _rl_dispatch () - is special cased. */ -int -rl_do_lowercase_version (ignore1, ignore2) - int ignore1 __attribute__((unused)), ignore2 __attribute__((unused)); -{ - return 0; -} - -/* Rubout the character behind point. */ -int -rl_rubout (count, key) - int count, key; -{ - if (count < 0) - { - rl_delete (-count, key); - return 0; - } - - if (!rl_point) - { - ding (); - return -1; - } - - if (count > 1 || rl_explicit_arg) - { - int orig_point = rl_point; - rl_backward (count, key); - rl_kill_text (orig_point, rl_point); - } - else - { - int c = the_line[--rl_point]; - rl_delete_text (rl_point, rl_point + 1); - - if (rl_point == rl_end && isprint (c) && _rl_last_c_pos) - { - int l; - l = rl_character_len (c, rl_point); - _rl_erase_at_end_of_line (l); - } - } - return 0; -} - -/* Delete the character under the cursor. Given a numeric argument, - kill that many characters instead. */ -int -rl_delete (count, key) - int count, key; -{ - if (count < 0) - return (rl_rubout (-count, key)); - - if (rl_point == rl_end) - { - ding (); - return -1; - } - - if (count > 1 || rl_explicit_arg) - { - int orig_point = rl_point; - rl_forward (count, key); - rl_kill_text (orig_point, rl_point); - rl_point = orig_point; - return 0; - } - else - return (rl_delete_text (rl_point, rl_point + 1)); -} - -/* Delete the character under the cursor, unless the insertion - point is at the end of the line, in which case the character - behind the cursor is deleted. COUNT is obeyed and may be used - to delete forward or backward that many characters. */ -int -rl_rubout_or_delete (count, key) - int count, key; -{ - if (rl_end != 0 && rl_point == rl_end) - return (rl_rubout (count, key)); - else - return (rl_delete (count, key)); -} - -/* Delete all spaces and tabs around point. */ -int -rl_delete_horizontal_space (count, ignore) - int count __attribute__((unused)), ignore __attribute__((unused)); -{ - int start = rl_point; - - while (rl_point && whitespace (the_line[rl_point - 1])) - rl_point--; - - start = rl_point; - - while (rl_point < rl_end && whitespace (the_line[rl_point])) - rl_point++; - - if (start != rl_point) - { - rl_delete_text (start, rl_point); - rl_point = start; - } - return 0; -} - -/* Like the tcsh editing function delete-char-or-list. The eof character - is caught before this is invoked, so this really does the same thing as - delete-char-or-list-or-eof, as long as it's bound to the eof character. */ -int -rl_delete_or_show_completions (count, key) - int count, key; -{ - if (rl_end != 0 && rl_point == rl_end) - return (rl_possible_completions (count, key)); - else - return (rl_delete (count, key)); -} - -#ifndef RL_COMMENT_BEGIN_DEFAULT -#define RL_COMMENT_BEGIN_DEFAULT "#" -#endif - -/* Turn the current line into a comment in shell history. - A K*rn shell style function. */ -int -rl_insert_comment (count, key) - int count __attribute__((unused)), key; -{ - rl_beg_of_line (1, key); - rl_insert_text (_rl_comment_begin ? _rl_comment_begin - : RL_COMMENT_BEGIN_DEFAULT); - (*rl_redisplay_function) (); - rl_newline (1, '\n'); - return (0); -} - -/* **************************************************************** */ -/* */ -/* Changing Case */ -/* */ -/* **************************************************************** */ - -/* The three kinds of things that we know how to do. */ -#define UpCase 1 -#define DownCase 2 -#define CapCase 3 - -static int rl_change_case (); - -/* Uppercase the word at point. */ -int -rl_upcase_word (count, key) - int count, key __attribute__((unused)); -{ - return (rl_change_case (count, UpCase)); -} - -/* Lowercase the word at point. */ -int -rl_downcase_word (count, key) - int count, key __attribute__((unused)); -{ - return (rl_change_case (count, DownCase)); -} - -/* Upcase the first letter, downcase the rest. */ -int -rl_capitalize_word (count, key) - int count, key __attribute__((unused)); -{ - return (rl_change_case (count, CapCase)); -} - -/* The meaty function. - Change the case of COUNT words, performing OP on them. - OP is one of UpCase, DownCase, or CapCase. - If a negative argument is given, leave point where it started, - otherwise, leave it where it moves to. */ -static int -rl_change_case (count, op) - int count, op; -{ - register int start, end; - int inword, c; - - start = rl_point; - rl_forward_word (count, 0); - end = rl_point; - - if (count < 0) - SWAP (start, end); - - /* We are going to modify some text, so let's prepare to undo it. */ - rl_modifying (start, end); - - for (inword = 0; start < end; start++) - { - c = the_line[start]; - switch (op) - { - case UpCase: - the_line[start] = _rl_to_upper (c); - break; - - case DownCase: - the_line[start] = _rl_to_lower (c); - break; - - case CapCase: - the_line[start] = (inword == 0) ? _rl_to_upper (c) : _rl_to_lower (c); - inword = alphabetic (the_line[start]); - break; - - default: - ding (); - return -1; - } - } - rl_point = end; - return 0; -} - -/* **************************************************************** */ -/* */ -/* Transposition */ -/* */ -/* **************************************************************** */ - -/* Transpose the words at point. */ -int -rl_transpose_words (count, key) - int count, key; -{ - char *word1, *word2; - int w1_beg, w1_end, w2_beg, w2_end; - int orig_point = rl_point; - - if (!count) - return 0; - - /* Find the two words. */ - rl_forward_word (count, key); - w2_end = rl_point; - rl_backward_word (1, key); - w2_beg = rl_point; - rl_backward_word (count, key); - w1_beg = rl_point; - rl_forward_word (1, key); - w1_end = rl_point; - - /* Do some check to make sure that there really are two words. */ - if ((w1_beg == w2_beg) || (w2_beg < w1_end)) - { - ding (); - rl_point = orig_point; - return -1; - } - - /* Get the text of the words. */ - word1 = rl_copy_text (w1_beg, w1_end); - word2 = rl_copy_text (w2_beg, w2_end); - - /* We are about to do many insertions and deletions. Remember them - as one operation. */ - rl_begin_undo_group (); - - /* Do the stuff at word2 first, so that we don't have to worry - about word1 moving. */ - rl_point = w2_beg; - rl_delete_text (w2_beg, w2_end); - rl_insert_text (word1); - - rl_point = w1_beg; - rl_delete_text (w1_beg, w1_end); - rl_insert_text (word2); - - /* This is exactly correct since the text before this point has not - changed in length. */ - rl_point = w2_end; - - /* I think that does it. */ - rl_end_undo_group (); - free (word1); - free (word2); - - return 0; -} - -/* Transpose the characters at point. If point is at the end of the line, - then transpose the characters before point. */ -int -rl_transpose_chars (count, key) - int count, key __attribute__((unused)); -{ - char dummy[2]; - - if (!count) - return 0; - - if (!rl_point || rl_end < 2) - { - ding (); - return -1; - } - - rl_begin_undo_group (); - - if (rl_point == rl_end) - { - --rl_point; - count = 1; - } - rl_point--; - - dummy[0] = the_line[rl_point]; - dummy[1] = '\0'; - - rl_delete_text (rl_point, rl_point + 1); - - rl_point += count; - _rl_fix_point (0); - rl_insert_text (dummy); - - rl_end_undo_group (); - return 0; -} - -/* **************************************************************** */ -/* */ -/* Character Searching */ +/* Saving and Restoring Readline's state */ /* */ /* **************************************************************** */ int -_rl_char_search_internal (count, dir, schar) - int count, dir, schar; +rl_save_state (sp) + struct readline_state *sp; { - int pos, inc; - - pos = rl_point; - inc = (dir < 0) ? -1 : 1; - while (count) - { - if ((dir < 0 && pos <= 0) || (dir > 0 && pos >= rl_end)) - { - ding (); - return -1; - } - - pos += inc; - do - { - if (rl_line_buffer[pos] == schar) - { - count--; - if (dir < 0) - rl_point = (dir == BTO) ? pos + 1 : pos; - else - rl_point = (dir == FTO) ? pos - 1 : pos; - break; - } - } - while ((dir < 0) ? pos-- : ++pos < rl_end); - } - return (0); -} - -/* Search COUNT times for a character read from the current input stream. - FDIR is the direction to search if COUNT is non-negative; otherwise - the search goes in BDIR. */ -static int -_rl_char_search (count, fdir, bdir) - int count, fdir, bdir; -{ - int c; - - c = rl_read_key (); - if (count < 0) - return (_rl_char_search_internal (-count, bdir, c)); - else - return (_rl_char_search_internal (count, fdir, c)); -} - -int -rl_char_search (count, key) - int count, key __attribute__((unused)); -{ - return (_rl_char_search (count, FFIND, BFIND)); -} - -int -rl_backward_char_search (count, key) - int count, key __attribute__((unused)); -{ - return (_rl_char_search (count, BFIND, FFIND)); -} - -/* **************************************************************** */ -/* */ -/* History Utilities */ -/* */ -/* **************************************************************** */ - -/* We already have a history library, and that is what we use to control - the history features of readline. This is our local interface to - the history mechanism. */ - -/* While we are editing the history, this is the saved - version of the original line. */ -HIST_ENTRY *saved_line_for_history = (HIST_ENTRY *)NULL; - -/* Set the history pointer back to the last entry in the history. */ -static void -start_using_history () -{ - using_history (); - if (saved_line_for_history) - _rl_free_history_entry (saved_line_for_history); - - saved_line_for_history = (HIST_ENTRY *)NULL; -} - -/* Free the contents (and containing structure) of a HIST_ENTRY. */ -void -_rl_free_history_entry (entry) - HIST_ENTRY *entry; -{ - if (entry == 0) - return; - if (entry->line) - free (entry->line); - free (entry); -} - -/* Perhaps put back the current line if it has changed. */ -int -maybe_replace_line () -{ - HIST_ENTRY *temp; - - temp = current_history (); - /* If the current line has changed, save the changes. */ - if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list)) - { - temp = replace_history_entry (where_history (), the_line, (histdata_t)rl_undo_list); - free (temp->line); - free (temp); - } - return 0; -} - -/* Put back the saved_line_for_history if there is one. */ -int -maybe_unsave_line () -{ - int line_len; - - if (saved_line_for_history) - { - line_len = strlen (saved_line_for_history->line); - - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - - strcpy (the_line, saved_line_for_history->line); - rl_undo_list = (UNDO_LIST *)saved_line_for_history->data; - _rl_free_history_entry (saved_line_for_history); - saved_line_for_history = (HIST_ENTRY *)NULL; - rl_end = rl_point = strlen (the_line); - } - else - ding (); - return 0; -} - -/* Save the current line in saved_line_for_history. */ -int -maybe_save_line () -{ - if (saved_line_for_history == 0) - { - saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); - saved_line_for_history->line = savestring (the_line); - saved_line_for_history->data = (char *)rl_undo_list; - } - return 0; -} - -/* **************************************************************** */ -/* */ -/* History Commands */ -/* */ -/* **************************************************************** */ - -/* Meta-< goes to the start of the history. */ -int -rl_beginning_of_history (count, key) - int count __attribute__((unused)), key; -{ - return (rl_get_previous_history (1 + where_history (), key)); -} - -/* Meta-> goes to the end of the history. (The current line). */ -int -rl_end_of_history (count, key) - int count __attribute__((unused)), key __attribute__((unused)); -{ - maybe_replace_line (); - using_history (); - maybe_unsave_line (); - return 0; -} - -/* Move down to the next history line. */ -int -rl_get_next_history (count, key) - int count, key; -{ - HIST_ENTRY *temp; - int line_len; - - if (count < 0) - return (rl_get_previous_history (-count, key)); - - if (count == 0) - return 0; - - maybe_replace_line (); - - temp = (HIST_ENTRY *)NULL; - while (count) - { - temp = next_history (); - if (!temp) - break; - --count; - } - - if (temp == 0) - maybe_unsave_line (); - else - { - line_len = strlen (temp->line); - - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - - strcpy (the_line, temp->line); - rl_undo_list = (UNDO_LIST *)temp->data; - rl_end = rl_point = strlen (the_line); -#if defined (VI_MODE) - if (rl_editing_mode == vi_mode) - rl_point = 0; -#endif /* VI_MODE */ - } - return 0; -} - -/* Get the previous item out of our interactive history, making it the current - line. If there is no previous history, just ding. */ -int -rl_get_previous_history (count, key) - int count, key; -{ - HIST_ENTRY *old_temp, *temp; - int line_len; - - if (count < 0) - return (rl_get_next_history (-count, key)); - - if (count == 0) - return 0; - - /* If we don't have a line saved, then save this one. */ - maybe_save_line (); - - /* If the current line has changed, save the changes. */ - maybe_replace_line (); - - temp = old_temp = (HIST_ENTRY *)NULL; - while (count) - { - temp = previous_history (); - if (temp == 0) - break; - - old_temp = temp; - --count; - } - - /* If there was a large argument, and we moved back to the start of the - history, that is not an error. So use the last value found. */ - if (!temp && old_temp) - temp = old_temp; - - if (temp == 0) - ding (); - else - { - line_len = strlen (temp->line); - - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - - strcpy (the_line, temp->line); - rl_undo_list = (UNDO_LIST *)temp->data; - rl_end = rl_point = line_len; - -#if defined (VI_MODE) - if (rl_editing_mode == vi_mode) - rl_point = 0; -#endif /* VI_MODE */ - } - return 0; -} - -/* **************************************************************** */ -/* */ -/* The Mark and the Region. */ -/* */ -/* **************************************************************** */ - -/* Set the mark at POSITION. */ -int -_rl_set_mark_at_pos (position) - int position; -{ - if (position > rl_end) + if (sp == 0) return -1; - rl_mark = position; - return 0; -} + sp->point = rl_point; + sp->end = rl_end; + sp->mark = rl_mark; + sp->buffer = rl_line_buffer; + sp->buflen = rl_line_buffer_len; + sp->ul = rl_undo_list; + sp->prompt = rl_prompt; -/* A bindable command to set the mark. */ -int -rl_set_mark (count, key) - int count, key __attribute__((unused)); -{ - return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point)); -} + sp->rlstate = rl_readline_state; + sp->done = rl_done; + sp->kmap = _rl_keymap; -/* Exchange the position of mark and point. */ -int -rl_exchange_point_and_mark (count, key) - int count __attribute__((unused)), key __attribute__((unused)); -{ - if (rl_mark > rl_end) - rl_mark = -1; + sp->lastfunc = rl_last_func; + sp->insmode = rl_insert_mode; + sp->edmode = rl_editing_mode; + sp->kseqlen = rl_key_sequence_length; + sp->inf = rl_instream; + sp->outf = rl_outstream; + sp->pendingin = rl_pending_input; + sp->macro = rl_executing_macro; - if (rl_mark == -1) - { - ding (); - return -1; - } - else - SWAP (rl_point, rl_mark); + sp->catchsigs = rl_catch_signals; + sp->catchsigwinch = rl_catch_sigwinch; - return 0; -} - -/* **************************************************************** */ -/* */ -/* Editing Modes */ -/* */ -/* **************************************************************** */ -/* How to toggle back and forth between editing modes. */ -int -rl_vi_editing_mode (count, key) - int count __attribute__((unused)), key; -{ -#if defined (VI_MODE) - rl_editing_mode = vi_mode; - rl_vi_insertion_mode (1, key); -#endif /* VI_MODE */ - return 0; + return (0); } int -rl_emacs_editing_mode (count, key) - int count __attribute__((unused)), key __attribute__((unused)); +rl_restore_state (sp) + struct readline_state *sp; { - rl_editing_mode = emacs_mode; - _rl_keymap = emacs_standard_keymap; - return 0; + if (sp == 0) + return -1; + + rl_point = sp->point; + rl_end = sp->end; + rl_mark = sp->mark; + the_line = rl_line_buffer = sp->buffer; + rl_line_buffer_len = sp->buflen; + rl_undo_list = sp->ul; + rl_prompt = sp->prompt; + + rl_readline_state = sp->rlstate; + rl_done = sp->done; + _rl_keymap = sp->kmap; + + rl_last_func = sp->lastfunc; + rl_insert_mode = sp->insmode; + rl_editing_mode = sp->edmode; + rl_key_sequence_length = sp->kseqlen; + rl_instream = sp->inf; + rl_outstream = sp->outf; + rl_pending_input = sp->pendingin; + rl_executing_macro = sp->macro; + + rl_catch_signals = sp->catchsigs; + rl_catch_sigwinch = sp->catchsigwinch; + + return (0); } diff --git a/readline/readline.h b/readline/readline.h index 7804d31efb1..f11b3d0357c 100644 --- a/readline/readline.h +++ b/readline/readline.h @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_READLINE_H_) #define _READLINE_H_ @@ -29,14 +29,21 @@ extern "C" { #if defined (READLINE_LIBRARY) # include "rlstdc.h" +# include "rltypedefs.h" # include "keymaps.h" # include "tilde.h" #else # include +# include # include # include #endif +/* Hex-encoded Readline version number. */ +#define RL_READLINE_VERSION 0x0403 /* Readline 4.3 */ +#define RL_VERSION_MAJOR 4 +#define RL_VERSION_MINOR 3 + /* Readline data structures. */ /* Maintaining the state of undo. We remember individual deletes and inserts @@ -61,7 +68,7 @@ extern UNDO_LIST *rl_undo_list; /* The data structure for mapping textual names to code addresses. */ typedef struct _funmap { const char *name; - Function *function; + rl_command_func_t *function; } FUNMAP; extern FUNMAP **funmap; @@ -73,184 +80,191 @@ extern FUNMAP **funmap; /* **************************************************************** */ /* Bindable commands for numeric arguments. */ -extern int rl_digit_argument __P((int, int)); -extern int rl_universal_argument __P((int, int)); +extern int rl_digit_argument PARAMS((int, int)); +extern int rl_universal_argument PARAMS((int, int)); /* Bindable commands for moving the cursor. */ -extern int rl_forward __P((int, int)); -extern int rl_backward __P((int, int)); -extern int rl_beg_of_line __P((int, int)); -extern int rl_end_of_line __P((int, int)); -extern int rl_forward_word __P((int, int)); -extern int rl_backward_word __P((int, int)); -extern int rl_refresh_line __P((int, int)); -extern int rl_clear_screen __P((int, int)); -extern int rl_arrow_keys __P((int, int)); +extern int rl_forward_byte PARAMS((int, int)); +extern int rl_forward_char PARAMS((int, int)); +extern int rl_forward PARAMS((int, int)); +extern int rl_backward_byte PARAMS((int, int)); +extern int rl_backward_char PARAMS((int, int)); +extern int rl_backward PARAMS((int, int)); +extern int rl_beg_of_line PARAMS((int, int)); +extern int rl_end_of_line PARAMS((int, int)); +extern int rl_forward_word PARAMS((int, int)); +extern int rl_backward_word PARAMS((int, int)); +extern int rl_refresh_line PARAMS((int, int)); +extern int rl_clear_screen PARAMS((int, int)); +extern int rl_arrow_keys PARAMS((int, int)); /* Bindable commands for inserting and deleting text. */ -extern int rl_insert __P((int, int)); -extern int rl_quoted_insert __P((int, int)); -extern int rl_tab_insert __P((int, int)); -extern int rl_newline __P((int, int)); -extern int rl_do_lowercase_version __P((int, int)); -extern int rl_rubout __P((int, int)); -extern int rl_delete __P((int, int)); -extern int rl_rubout_or_delete __P((int, int)); -extern int rl_delete_horizontal_space __P((int, int)); -extern int rl_delete_or_show_completions __P((int, int)); -extern int rl_insert_comment __P((int, int)); +extern int rl_insert PARAMS((int, int)); +extern int rl_quoted_insert PARAMS((int, int)); +extern int rl_tab_insert PARAMS((int, int)); +extern int rl_newline PARAMS((int, int)); +extern int rl_do_lowercase_version PARAMS((int, int)); +extern int rl_rubout PARAMS((int, int)); +extern int rl_delete PARAMS((int, int)); +extern int rl_rubout_or_delete PARAMS((int, int)); +extern int rl_delete_horizontal_space PARAMS((int, int)); +extern int rl_delete_or_show_completions PARAMS((int, int)); +extern int rl_insert_comment PARAMS((int, int)); /* Bindable commands for changing case. */ -extern int rl_upcase_word __P((int, int)); -extern int rl_downcase_word __P((int, int)); -extern int rl_capitalize_word __P((int, int)); +extern int rl_upcase_word PARAMS((int, int)); +extern int rl_downcase_word PARAMS((int, int)); +extern int rl_capitalize_word PARAMS((int, int)); /* Bindable commands for transposing characters and words. */ -extern int rl_transpose_words __P((int, int)); -extern int rl_transpose_chars __P((int, int)); +extern int rl_transpose_words PARAMS((int, int)); +extern int rl_transpose_chars PARAMS((int, int)); /* Bindable commands for searching within a line. */ -extern int rl_char_search __P((int, int)); -extern int rl_backward_char_search __P((int, int)); +extern int rl_char_search PARAMS((int, int)); +extern int rl_backward_char_search PARAMS((int, int)); /* Bindable commands for readline's interface to the command history. */ -extern int rl_beginning_of_history __P((int, int)); -extern int rl_end_of_history __P((int, int)); -extern int rl_get_next_history __P((int, int)); -extern int rl_get_previous_history __P((int, int)); +extern int rl_beginning_of_history PARAMS((int, int)); +extern int rl_end_of_history PARAMS((int, int)); +extern int rl_get_next_history PARAMS((int, int)); +extern int rl_get_previous_history PARAMS((int, int)); /* Bindable commands for managing the mark and region. */ -extern int rl_set_mark __P((int, int)); -extern int rl_exchange_point_and_mark __P((int, int)); +extern int rl_set_mark PARAMS((int, int)); +extern int rl_exchange_point_and_mark PARAMS((int, int)); /* Bindable commands to set the editing mode (emacs or vi). */ -extern int rl_vi_editing_mode __P((int, int)); -extern int rl_emacs_editing_mode __P((int, int)); +extern int rl_vi_editing_mode PARAMS((int, int)); +extern int rl_emacs_editing_mode PARAMS((int, int)); + +/* Bindable commands to change the insert mode (insert or overwrite) */ +extern int rl_overwrite_mode PARAMS((int, int)); /* Bindable commands for managing key bindings. */ -extern int rl_re_read_init_file __P((int, int)); -extern int rl_dump_functions __P((int, int)); -extern int rl_dump_macros __P((int, int)); -extern int rl_dump_variables __P((int, int)); +extern int rl_re_read_init_file PARAMS((int, int)); +extern int rl_dump_functions PARAMS((int, int)); +extern int rl_dump_macros PARAMS((int, int)); +extern int rl_dump_variables PARAMS((int, int)); /* Bindable commands for word completion. */ -extern int rl_complete __P((int, int)); -extern int rl_possible_completions __P((int, int)); -extern int rl_insert_completions __P((int, int)); -extern int rl_menu_complete __P((int, int)); +extern int rl_complete PARAMS((int, int)); +extern int rl_possible_completions PARAMS((int, int)); +extern int rl_insert_completions PARAMS((int, int)); +extern int rl_menu_complete PARAMS((int, int)); /* Bindable commands for killing and yanking text, and managing the kill ring. */ -extern int rl_kill_word __P((int, int)); -extern int rl_backward_kill_word __P((int, int)); -extern int rl_kill_line __P((int, int)); -extern int rl_backward_kill_line __P((int, int)); -extern int rl_kill_full_line __P((int, int)); -extern int rl_unix_word_rubout __P((int, int)); -extern int rl_unix_line_discard __P((int, int)); -extern int rl_copy_region_to_kill __P((int, int)); -extern int rl_kill_region __P((int, int)); -extern int rl_copy_forward_word __P((int, int)); -extern int rl_copy_backward_word __P((int, int)); -extern int rl_yank __P((int, int)); -extern int rl_yank_pop __P((int, int)); -extern int rl_yank_nth_arg __P((int, int)); -extern int rl_yank_last_arg __P((int, int)); -/* Not available unless __CYGWIN32__ is defined. */ -#ifdef __CYGWIN32__ -extern int rl_paste_from_clipboard __P((int, int)); +extern int rl_kill_word PARAMS((int, int)); +extern int rl_backward_kill_word PARAMS((int, int)); +extern int rl_kill_line PARAMS((int, int)); +extern int rl_backward_kill_line PARAMS((int, int)); +extern int rl_kill_full_line PARAMS((int, int)); +extern int rl_unix_word_rubout PARAMS((int, int)); +extern int rl_unix_line_discard PARAMS((int, int)); +extern int rl_copy_region_to_kill PARAMS((int, int)); +extern int rl_kill_region PARAMS((int, int)); +extern int rl_copy_forward_word PARAMS((int, int)); +extern int rl_copy_backward_word PARAMS((int, int)); +extern int rl_yank PARAMS((int, int)); +extern int rl_yank_pop PARAMS((int, int)); +extern int rl_yank_nth_arg PARAMS((int, int)); +extern int rl_yank_last_arg PARAMS((int, int)); +/* Not available unless __CYGWIN__ is defined. */ +#ifdef __CYGWIN__ +extern int rl_paste_from_clipboard PARAMS((int, int)); #endif /* Bindable commands for incremental searching. */ -extern int rl_reverse_search_history __P((int, int)); -extern int rl_forward_search_history __P((int, int)); +extern int rl_reverse_search_history PARAMS((int, int)); +extern int rl_forward_search_history PARAMS((int, int)); /* Bindable keyboard macro commands. */ -extern int rl_start_kbd_macro __P((int, int)); -extern int rl_end_kbd_macro __P((int, int)); -extern int rl_call_last_kbd_macro __P((int, int)); +extern int rl_start_kbd_macro PARAMS((int, int)); +extern int rl_end_kbd_macro PARAMS((int, int)); +extern int rl_call_last_kbd_macro PARAMS((int, int)); /* Bindable undo commands. */ -extern int rl_revert_line __P((int, int)); -extern int rl_undo_command __P((int, int)); +extern int rl_revert_line PARAMS((int, int)); +extern int rl_undo_command PARAMS((int, int)); /* Bindable tilde expansion commands. */ -extern int rl_tilde_expand __P((int, int)); +extern int rl_tilde_expand PARAMS((int, int)); /* Bindable terminal control commands. */ -extern int rl_restart_output __P((int, int)); -extern int rl_stop_output __P((int, int)); +extern int rl_restart_output PARAMS((int, int)); +extern int rl_stop_output PARAMS((int, int)); /* Miscellaneous bindable commands. */ -extern int rl_abort __P((int, int)); -extern int rl_tty_status __P((int, int)); +extern int rl_abort PARAMS((int, int)); +extern int rl_tty_status PARAMS((int, int)); /* Bindable commands for incremental and non-incremental history searching. */ -extern int rl_history_search_forward __P((int, int)); -extern int rl_history_search_backward __P((int, int)); -extern int rl_noninc_forward_search __P((int, int)); -extern int rl_noninc_reverse_search __P((int, int)); -extern int rl_noninc_forward_search_again __P((int, int)); -extern int rl_noninc_reverse_search_again __P((int, int)); +extern int rl_history_search_forward PARAMS((int, int)); +extern int rl_history_search_backward PARAMS((int, int)); +extern int rl_noninc_forward_search PARAMS((int, int)); +extern int rl_noninc_reverse_search PARAMS((int, int)); +extern int rl_noninc_forward_search_again PARAMS((int, int)); +extern int rl_noninc_reverse_search_again PARAMS((int, int)); -/* Not available unless readline is compiled -DPAREN_MATCHING. */ -extern int rl_insert_close __P((int, int)); +/* Bindable command used when inserting a matching close character. */ +extern int rl_insert_close PARAMS((int, int)); /* Not available unless READLINE_CALLBACKS is defined. */ -extern void rl_callback_handler_install __P((char *, VFunction *)); -extern void rl_callback_read_char __P((void)); -extern void rl_callback_handler_remove __P((void)); +extern void rl_callback_handler_install PARAMS((const char *, rl_vcpfunc_t *)); +extern void rl_callback_read_char PARAMS((void)); +extern void rl_callback_handler_remove PARAMS((void)); /* Things for vi mode. Not available unless readline is compiled -DVI_MODE. */ /* VI-mode bindable commands. */ -extern int rl_vi_redo __P((int, int)); -extern int rl_vi_undo __P((int, int)); -extern int rl_vi_yank_arg __P((int, int)); -extern int rl_vi_fetch_history __P((int, int)); -extern int rl_vi_search_again __P((int, int)); -extern int rl_vi_search __P((int, int)); -extern int rl_vi_complete __P((int, int)); -extern int rl_vi_tilde_expand __P((int, int)); -extern int rl_vi_prev_word __P((int, int)); -extern int rl_vi_next_word __P((int, int)); -extern int rl_vi_end_word __P((int, int)); -extern int rl_vi_insert_beg __P((int, int)); -extern int rl_vi_append_mode __P((int, int)); -extern int rl_vi_append_eol __P((int, int)); -extern int rl_vi_eof_maybe __P((int, int)); -extern int rl_vi_insertion_mode __P((int, int)); -extern int rl_vi_movement_mode __P((int, int)); -extern int rl_vi_arg_digit __P((int, int)); -extern int rl_vi_change_case __P((int, int)); -extern int rl_vi_put __P((int, int)); -extern int rl_vi_column __P((int, int)); -extern int rl_vi_delete_to __P((int, int)); -extern int rl_vi_change_to __P((int, int)); -extern int rl_vi_yank_to __P((int, int)); -extern int rl_vi_delete __P((int, int)); -extern int rl_vi_back_to_indent __P((int, int)); -extern int rl_vi_first_print __P((int, int)); -extern int rl_vi_char_search __P((int, int)); -extern int rl_vi_match __P((int, int)); -extern int rl_vi_change_char __P((int, int)); -extern int rl_vi_subst __P((int, int)); -extern int rl_vi_overstrike __P((int, int)); -extern int rl_vi_overstrike_delete __P((int, int)); -extern int rl_vi_replace __P((int, int)); -extern int rl_vi_set_mark __P((int, int)); -extern int rl_vi_goto_mark __P((int, int)); +extern int rl_vi_redo PARAMS((int, int)); +extern int rl_vi_undo PARAMS((int, int)); +extern int rl_vi_yank_arg PARAMS((int, int)); +extern int rl_vi_fetch_history PARAMS((int, int)); +extern int rl_vi_search_again PARAMS((int, int)); +extern int rl_vi_search PARAMS((int, int)); +extern int rl_vi_complete PARAMS((int, int)); +extern int rl_vi_tilde_expand PARAMS((int, int)); +extern int rl_vi_prev_word PARAMS((int, int)); +extern int rl_vi_next_word PARAMS((int, int)); +extern int rl_vi_end_word PARAMS((int, int)); +extern int rl_vi_insert_beg PARAMS((int, int)); +extern int rl_vi_append_mode PARAMS((int, int)); +extern int rl_vi_append_eol PARAMS((int, int)); +extern int rl_vi_eof_maybe PARAMS((int, int)); +extern int rl_vi_insertion_mode PARAMS((int, int)); +extern int rl_vi_movement_mode PARAMS((int, int)); +extern int rl_vi_arg_digit PARAMS((int, int)); +extern int rl_vi_change_case PARAMS((int, int)); +extern int rl_vi_put PARAMS((int, int)); +extern int rl_vi_column PARAMS((int, int)); +extern int rl_vi_delete_to PARAMS((int, int)); +extern int rl_vi_change_to PARAMS((int, int)); +extern int rl_vi_yank_to PARAMS((int, int)); +extern int rl_vi_delete PARAMS((int, int)); +extern int rl_vi_back_to_indent PARAMS((int, int)); +extern int rl_vi_first_print PARAMS((int, int)); +extern int rl_vi_char_search PARAMS((int, int)); +extern int rl_vi_match PARAMS((int, int)); +extern int rl_vi_change_char PARAMS((int, int)); +extern int rl_vi_subst PARAMS((int, int)); +extern int rl_vi_overstrike PARAMS((int, int)); +extern int rl_vi_overstrike_delete PARAMS((int, int)); +extern int rl_vi_replace PARAMS((int, int)); +extern int rl_vi_set_mark PARAMS((int, int)); +extern int rl_vi_goto_mark PARAMS((int, int)); /* VI-mode utility functions. */ -extern int rl_vi_check __P((void)); -extern int rl_vi_domove __P((int, int *)); -extern int rl_vi_bracktype __P((int)); +extern int rl_vi_check PARAMS((void)); +extern int rl_vi_domove PARAMS((int, int *)); +extern int rl_vi_bracktype PARAMS((int)); /* VI-mode pseudo-bindable commands, used as utility functions. */ -extern int rl_vi_fWord __P((int, int)); -extern int rl_vi_bWord __P((int, int)); -extern int rl_vi_eWord __P((int, int)); -extern int rl_vi_fword __P((int, int)); -extern int rl_vi_bword __P((int, int)); -extern int rl_vi_eword __P((int, int)); +extern int rl_vi_fWord PARAMS((int, int)); +extern int rl_vi_bWord PARAMS((int, int)); +extern int rl_vi_eWord PARAMS((int, int)); +extern int rl_vi_fword PARAMS((int, int)); +extern int rl_vi_bword PARAMS((int, int)); +extern int rl_vi_eword PARAMS((int, int)); /* **************************************************************** */ /* */ @@ -260,141 +274,176 @@ extern int rl_vi_eword __P((int, int)); /* Readline functions. */ /* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. */ -extern char *readline __P((char *)); +extern char *readline PARAMS((const char *)); -extern int rl_initialize __P((void)); +extern int rl_set_prompt PARAMS((const char *)); +extern int rl_expand_prompt PARAMS((char *)); -extern int rl_discard_argument __P((void)); +extern int rl_initialize PARAMS((void)); + +/* Undocumented; unused by readline */ +extern int rl_discard_argument PARAMS((void)); /* Utility functions to bind keys to readline commands. */ -extern int rl_add_defun __P((char *, Function *, int)); -extern int rl_bind_key __P((int, Function *)); -extern int rl_bind_key_in_map __P((int, Function *, Keymap)); -extern int rl_unbind_key __P((int)); -extern int rl_unbind_key_in_map __P((int, Keymap)); -extern int rl_unbind_function_in_map __P((Function *, Keymap)); -extern int rl_unbind_command_in_map __P((char *, Keymap)); -extern int rl_set_key __P((char *, Function *, Keymap)); -extern int rl_generic_bind __P((int, char *, char *, Keymap)); -extern int rl_variable_bind __P((char *, char *)); +extern int rl_add_defun PARAMS((const char *, rl_command_func_t *, int)); +extern int rl_bind_key PARAMS((int, rl_command_func_t *)); +extern int rl_bind_key_in_map PARAMS((int, rl_command_func_t *, Keymap)); +extern int rl_unbind_key PARAMS((int)); +extern int rl_unbind_key_in_map PARAMS((int, Keymap)); +extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap)); +extern int rl_unbind_command_in_map PARAMS((const char *, Keymap)); +extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap)); +extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap)); +extern int rl_variable_bind PARAMS((const char *, const char *)); /* Backwards compatibility, use rl_generic_bind instead. */ -extern int rl_macro_bind __P((char *, char *, Keymap)); +extern int rl_macro_bind PARAMS((const char *, const char *, Keymap)); /* Undocumented in the texinfo manual; not really useful to programs. */ -extern int rl_translate_keyseq __P((char *, char *, int *)); -extern char *rl_untranslate_keyseq __P((int)); +extern int rl_translate_keyseq PARAMS((const char *, char *, int *)); +extern char *rl_untranslate_keyseq PARAMS((int)); -extern Function *rl_named_function __P((char *)); -extern Function *rl_function_of_keyseq __P((const char *, Keymap, int *)); +extern rl_command_func_t *rl_named_function PARAMS((const char *)); +extern rl_command_func_t *rl_function_of_keyseq PARAMS((const char *, Keymap, int *)); -extern void rl_list_funmap_names __P((void)); -extern char **rl_invoking_keyseqs_in_map __P((Function *, Keymap)); -extern char **rl_invoking_keyseqs __P((Function *)); +extern void rl_list_funmap_names PARAMS((void)); +extern char **rl_invoking_keyseqs_in_map PARAMS((rl_command_func_t *, Keymap)); +extern char **rl_invoking_keyseqs PARAMS((rl_command_func_t *)); + +extern void rl_function_dumper PARAMS((int)); +extern void rl_macro_dumper PARAMS((int)); +extern void rl_variable_dumper PARAMS((int)); -extern void rl_function_dumper __P((int)); -extern void rl_macro_dumper __P((int)); -extern void rl_variable_dumper __P((int)); - -extern int rl_read_init_file __P((const char *)); -extern int rl_parse_and_bind __P((char *)); +extern int rl_read_init_file PARAMS((const char *)); +extern int rl_parse_and_bind PARAMS((char *)); /* Functions for manipulating keymaps. */ -extern Keymap rl_make_bare_keymap __P((void)); -extern Keymap rl_copy_keymap __P((Keymap)); -extern Keymap rl_make_keymap __P((void)); -extern void rl_discard_keymap __P((Keymap)); +extern Keymap rl_make_bare_keymap PARAMS((void)); +extern Keymap rl_copy_keymap PARAMS((Keymap)); +extern Keymap rl_make_keymap PARAMS((void)); +extern void rl_discard_keymap PARAMS((Keymap)); -extern Keymap rl_get_keymap_by_name __P((char *)); -extern const char *rl_get_keymap_name __P((Keymap)); -extern void rl_set_keymap __P((Keymap)); -extern Keymap rl_get_keymap __P((void)); -extern void rl_set_keymap_from_edit_mode __P((void)); -extern const char *rl_get_keymap_name_from_edit_mode __P((void)); +extern Keymap rl_get_keymap_by_name PARAMS((const char *)); +extern char *rl_get_keymap_name PARAMS((Keymap)); +extern void rl_set_keymap PARAMS((Keymap)); +extern Keymap rl_get_keymap PARAMS((void)); +/* Undocumented; used internally only. */ +extern void rl_set_keymap_from_edit_mode PARAMS((void)); +extern char *rl_get_keymap_name_from_edit_mode PARAMS((void)); /* Functions for manipulating the funmap, which maps command names to functions. */ -extern int rl_add_funmap_entry __P((const char *, Function *)); -extern void rl_initialize_funmap __P((void)); -extern char **rl_funmap_names __P((void)); +extern int rl_add_funmap_entry PARAMS((const char *, rl_command_func_t *)); +extern const char **rl_funmap_names PARAMS((void)); +/* Undocumented, only used internally -- there is only one funmap, and this + function may be called only once. */ +extern void rl_initialize_funmap PARAMS((void)); /* Utility functions for managing keyboard macros. */ -extern void rl_push_macro_input __P((char *)); +extern void rl_push_macro_input PARAMS((char *)); /* Functions for undoing, from undo.c */ -extern void rl_add_undo __P((enum undo_code, int, int, char *)); -extern void free_undo_list __P((void)); -extern int rl_do_undo __P((void)); -extern int rl_begin_undo_group __P((void)); -extern int rl_end_undo_group __P((void)); -extern int rl_modifying __P((int, int)); +extern void rl_add_undo PARAMS((enum undo_code, int, int, char *)); +extern void rl_free_undo_list PARAMS((void)); +extern int rl_do_undo PARAMS((void)); +extern int rl_begin_undo_group PARAMS((void)); +extern int rl_end_undo_group PARAMS((void)); +extern int rl_modifying PARAMS((int, int)); /* Functions for redisplay. */ -extern void rl_redisplay __P((void)); -extern int rl_on_new_line __P((void)); -extern int rl_forced_update_display __P((void)); -extern int rl_clear_message __P((void)); -extern int rl_reset_line_state __P((void)); +extern void rl_redisplay PARAMS((void)); +extern int rl_on_new_line PARAMS((void)); +extern int rl_on_new_line_with_prompt PARAMS((void)); +extern int rl_forced_update_display PARAMS((void)); +extern int rl_clear_message PARAMS((void)); +extern int rl_reset_line_state PARAMS((void)); +extern int rl_crlf PARAMS((void)); -#if defined (__STDC__) && defined (USE_VARARGS) && defined (PREFER_STDARG) -extern int rl_message (const char *, ...); +#if (defined (__STDC__) || defined (__cplusplus)) && defined (USE_VARARGS) && defined (PREFER_STDARG) +extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2))); #else extern int rl_message (); #endif +extern int rl_show_char PARAMS((int)); + /* Undocumented in texinfo manual. */ -extern int rl_show_char __P((int)); -extern int rl_character_len __P((int, int)); -extern int crlf __P((void)); +extern int rl_character_len PARAMS((int, int)); /* Save and restore internal prompt redisplay information. */ -extern void rl_save_prompt __P((void)); -extern void rl_restore_prompt __P((void)); +extern void rl_save_prompt PARAMS((void)); +extern void rl_restore_prompt PARAMS((void)); /* Modifying text. */ -extern int rl_insert_text __P((const char *)); -extern int rl_delete_text __P((int, int)); -extern int rl_kill_text __P((int, int)); -extern char *rl_copy_text __P((int, int)); +extern void rl_replace_line PARAMS((const char *, int)); +extern int rl_insert_text PARAMS((const char *)); +extern int rl_delete_text PARAMS((int, int)); +extern int rl_kill_text PARAMS((int, int)); +extern char *rl_copy_text PARAMS((int, int)); /* Terminal and tty mode management. */ -extern void rl_prep_terminal __P((int)); -extern void rl_deprep_terminal __P((void)); -extern void rltty_set_default_bindings __P((Keymap)); +extern void rl_prep_terminal PARAMS((int)); +extern void rl_deprep_terminal PARAMS((void)); +extern void rl_tty_set_default_bindings PARAMS((Keymap)); -extern int rl_reset_terminal __P((char *)); -extern void rl_resize_terminal __P((void)); +extern int rl_reset_terminal PARAMS((const char *)); +extern void rl_resize_terminal PARAMS((void)); +extern void rl_set_screen_size PARAMS((int, int)); +extern void rl_get_screen_size PARAMS((int *, int *)); -/* `Public' utility functions . */ -extern void rl_extend_line_buffer __P((int)); -extern int ding __P((void)); +extern char *rl_get_termcap PARAMS((const char *)); /* Functions for character input. */ -extern int rl_stuff_char __P((int)); -extern int rl_execute_next __P((int)); -extern int rl_read_key __P((void)); -extern int rl_getc __P((FILE *)); +extern int rl_stuff_char PARAMS((int)); +extern int rl_execute_next PARAMS((int)); +extern int rl_clear_pending_input PARAMS((void)); +extern int rl_read_key PARAMS((void)); +extern int rl_getc PARAMS((FILE *)); +extern int rl_set_keyboard_input_timeout PARAMS((int)); + +/* `Public' utility functions . */ +extern void rl_extend_line_buffer PARAMS((int)); +extern int rl_ding PARAMS((void)); +extern int rl_alphabetic PARAMS((int)); /* Readline signal handling, from signals.c */ -extern int rl_set_signals __P((void)); -extern int rl_clear_signals __P((void)); -extern void rl_cleanup_after_signal __P((void)); -extern void rl_reset_after_signal __P((void)); -extern void rl_free_line_state __P((void)); +extern int rl_set_signals PARAMS((void)); +extern int rl_clear_signals PARAMS((void)); +extern void rl_cleanup_after_signal PARAMS((void)); +extern void rl_reset_after_signal PARAMS((void)); +extern void rl_free_line_state PARAMS((void)); + +extern int rl_set_paren_blink_timeout PARAMS((int)); /* Undocumented. */ -extern int rl_expand_prompt __P((char *)); - -extern int maybe_save_line __P((void)); -extern int maybe_unsave_line __P((void)); -extern int maybe_replace_line __P((void)); +extern int rl_maybe_save_line PARAMS((void)); +extern int rl_maybe_unsave_line PARAMS((void)); +extern int rl_maybe_replace_line PARAMS((void)); /* Completion functions. */ -extern int rl_complete_internal __P((int)); -extern void rl_display_match_list __P((char **, int, int)); +extern int rl_complete_internal PARAMS((int)); +extern void rl_display_match_list PARAMS((char **, int, int)); -extern char **completion_matches __P((const char *, CPFunction *)); -extern char *username_completion_function __P((const char *, int)); -extern char *filename_completion_function __P((const char *, int)); +extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); +extern char *rl_username_completion_function PARAMS((const char *, int)); +extern char *rl_filename_completion_function PARAMS((const char *, int)); + +extern int rl_completion_mode PARAMS((rl_command_func_t *)); + +#if 0 +/* Backwards compatibility (compat.c). These will go away sometime. */ +extern void free_undo_list PARAMS((void)); +extern int maybe_save_line PARAMS((void)); +extern int maybe_unsave_line PARAMS((void)); +extern int maybe_replace_line PARAMS((void)); + +extern int ding PARAMS((void)); +extern int alphabetic PARAMS((int)); +extern int crlf PARAMS((void)); + +extern char **completion_matches PARAMS((char *, rl_compentry_func_t *)); +extern char *username_completion_function PARAMS((const char *, int)); +extern char *filename_completion_function PARAMS((const char *, int)); +#endif /* **************************************************************** */ /* */ @@ -403,7 +452,22 @@ extern char *filename_completion_function __P((const char *, int)); /* **************************************************************** */ /* The version of this incarnation of the readline library. */ -extern const char *rl_library_version; +extern const char *rl_library_version; /* e.g., "4.2" */ +extern int rl_readline_version; /* e.g., 0x0402 */ + +/* True if this is real GNU readline. */ +extern int rl_gnu_readline_p; + +/* Flags word encapsulating the current readline state. */ +extern int rl_readline_state; + +/* Says which editing mode readline is currently using. 1 means emacs mode; + 0 means vi mode. */ +extern int rl_editing_mode; + +/* Insert or overwrite mode for emacs mode. 1 means insert mode; 0 means + overwrite mode. Reset to insert mode on each input line. */ +extern int rl_insert_mode; /* The name of the calling program. You should initialize this to whatever was in argv[0]. It is used when parsing conditionals. */ @@ -417,7 +481,8 @@ extern char *rl_prompt; extern char *rl_line_buffer; /* The location of point, and end. */ -extern int rl_point, rl_end; +extern int rl_point; +extern int rl_end; /* The mark, or saved cursor position. */ extern int rl_mark; @@ -434,29 +499,44 @@ extern int rl_pending_input; or directly from an application. */ extern int rl_dispatching; +/* Non-zero if the user typed a numeric argument before executing the + current function. */ +extern int rl_explicit_arg; + +/* The current value of the numeric argument specified by the user. */ +extern int rl_numeric_arg; + +/* The address of the last command function Readline executed. */ +extern rl_command_func_t *rl_last_func; + /* The name of the terminal to use. */ -extern char *rl_terminal_name; +extern const char *rl_terminal_name; /* The input and output streams. */ -extern FILE *rl_instream, *rl_outstream; +extern FILE *rl_instream; +extern FILE *rl_outstream; /* If non-zero, then this is the address of a function to call just before readline_internal () prints the first prompt. */ -extern Function *rl_startup_hook; +extern rl_hook_func_t *rl_startup_hook; /* If non-zero, this is the address of a function to call just before readline_internal_setup () returns and readline_internal starts reading input characters. */ -extern Function *rl_pre_input_hook; - +extern rl_hook_func_t *rl_pre_input_hook; + /* The address of a function to call periodically while Readline is awaiting character input, or NULL, for no event handling. */ -extern Function *rl_event_hook; +extern rl_hook_func_t *rl_event_hook; -extern Function *rl_getc_function; -extern VFunction *rl_redisplay_function; -extern VFunction *rl_prep_term_function; -extern VFunction *rl_deprep_term_function; +/* The address of the function to call to fetch a character from the current + Readline input stream */ +extern rl_getc_func_t *rl_getc_function; + +extern rl_voidfunc_t *rl_redisplay_function; + +extern rl_vintfunc_t *rl_prep_term_function; +extern rl_voidfunc_t *rl_deprep_term_function; /* Dispatch variables. */ extern Keymap rl_executing_keymap; @@ -468,6 +548,18 @@ extern Keymap rl_binding_keymap; rl_newline. */ extern int rl_erase_empty_line; +/* If non-zero, the application has already printed the prompt (rl_prompt) + before calling readline, so readline should not output it the first time + redisplay is done. */ +extern int rl_already_prompted; + +/* A non-zero value means to read only this many characters rather than + up to a character bound to accept-line. */ +extern int rl_num_chars_to_read; + +/* The text of a currently-executing keyboard macro. */ +extern char *rl_executing_macro; + /* Variables to control readline signal handling. */ /* If non-zero, readline will install its own signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */ @@ -482,9 +574,9 @@ extern int rl_catch_sigwinch; /* Completion variables. */ /* Pointer to the generator function for completion_matches (). - NULL means to use filename_entry_function (), the default filename - completer. */ -extern Function *rl_completion_entry_function; + NULL means to use rl_filename_completion_function (), the default + filename completer. */ +extern rl_compentry_func_t *rl_completion_entry_function; /* If rl_ignore_some_completions_function is non-NULL it is the address of a function to call after all of the possible matches have been @@ -492,7 +584,7 @@ extern Function *rl_completion_entry_function; The function is called with one argument; a NULL terminated array of (char *). If your function removes any of the elements, they must be free()'ed. */ -extern Function *rl_ignore_some_completions_function; +extern rl_compignore_func_t *rl_ignore_some_completions_function; /* Pointer to alternative function to create matches. Function is called with TEXT, START, and END. @@ -501,7 +593,7 @@ extern Function *rl_ignore_some_completions_function; If this function exists and returns NULL then call the value of rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ -extern CPPFunction *rl_attempted_completion_function; +extern rl_completion_func_t *rl_attempted_completion_function; /* The basic list of characters that signal a break between words for the completer routine. The initial contents of this variable is what @@ -517,23 +609,34 @@ extern const char *rl_completer_word_break_characters; Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, unless they also appear within this list. */ -extern char *rl_completer_quote_characters; +extern const char *rl_completer_quote_characters; /* List of quote characters which cause a word break. */ extern const char *rl_basic_quote_characters; /* List of characters that need to be quoted in filenames by the completer. */ -extern char *rl_filename_quote_characters; +extern const char *rl_filename_quote_characters; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ -extern char *rl_special_prefixes; +extern const char *rl_special_prefixes; /* If non-zero, then this is the address of a function to call when completing on a directory name. The function is called with - the address of a string (the current directory name) as an arg. */ -extern Function *rl_directory_completion_hook; + the address of a string (the current directory name) as an arg. It + changes what is displayed when the possible completions are printed + or inserted. */ +extern rl_icppfunc_t *rl_directory_completion_hook; + +/* If non-zero, this is the address of a function to call when completing + a directory name. This function takes the address of the directory name + to be modified as an argument. Unlike rl_directory_completion_hook, it + only modifies the directory name used in opendir(2), not what is displayed + when the possible completions are printed or inserted. It is called + before rl_directory_completion_hook. I'm not happy with how this works + yet, so it's undocumented. */ +extern rl_icppfunc_t *rl_directory_rewrite_hook; /* Backwards compatibility with previous versions of readline. */ #define rl_symbolic_link_hook rl_directory_completion_hook @@ -545,7 +648,7 @@ extern Function *rl_directory_completion_hook; where MATCHES is the array of strings that matched, NUM_MATCHES is the number of strings in that array, and MAX_LENGTH is the length of the longest string in that array. */ -extern VFunction *rl_completion_display_matches_hook; +extern rl_compdisp_func_t *rl_completion_display_matches_hook; /* Non-zero means that the results of the matches are to be treated as filenames. This is ALWAYS zero on entry, and can only be changed @@ -563,17 +666,17 @@ extern int rl_filename_quoting_desired; Called with the text to quote, the type of match found (single or multiple) and a pointer to the quoting character to be used, which the function can reset if desired. */ -extern CPFunction *rl_filename_quoting_function; +extern rl_quote_func_t *rl_filename_quoting_function; /* Function to call to remove quoting characters from a filename. Called before completion is attempted, so the embedded quotes do not interfere with matching names in the file system. */ -extern CPFunction *rl_filename_dequoting_function; +extern rl_dequote_func_t *rl_filename_dequoting_function; /* Function to call to decide whether or not a word break character is quoted. If a character is quoted, it does not break words for the completer. */ -extern Function *rl_char_is_quoted_p; +extern rl_linebuf_func_t *rl_char_is_quoted_p; /* Non-zero means to suppress normal filename completion after the user-specified completion function has been called. */ @@ -588,11 +691,26 @@ extern int rl_completion_type; default is a space. Nothing is added if this is '\0'. */ extern int rl_completion_append_character; +/* If set to non-zero by an application completion function, + rl_completion_append_character will not be appended. */ +extern int rl_completion_suppress_append; + /* Up to this many items will be displayed in response to a possible-completions call. After that, we ask the user if she is sure she wants to see them all. The default value is 100. */ extern int rl_completion_query_items; +/* If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + mark-directories variable (which is user-settable). This exists so + that application completion functions can override the user's preference + (set via the mark-symlinked-directories variable) if appropriate. + It's set to the value of _rl_complete_mark_symlink_dirs in + rl_complete_internal before any application-specific completion + function is called, so without that function doing anything, the user's + preferences are honored. */ +extern int rl_completion_mark_symlink_dirs; + /* If non-zero, then disallow duplicates in the matches. */ extern int rl_ignore_completion_duplicates; @@ -610,9 +728,69 @@ extern int rl_inhibit_completion; #define SINGLE_MATCH 1 #define MULT_MATCH 2 -#if !defined (savestring) -extern char *savestring (); /* XXX backwards compatibility */ -#endif +/* Possible state values for rl_readline_state */ +#define RL_STATE_NONE 0x00000 /* no state; before first call */ + +#define RL_STATE_INITIALIZING 0x00001 /* initializing */ +#define RL_STATE_INITIALIZED 0x00002 /* initialization done */ +#define RL_STATE_TERMPREPPED 0x00004 /* terminal is prepped */ +#define RL_STATE_READCMD 0x00008 /* reading a command key */ +#define RL_STATE_METANEXT 0x00010 /* reading input after ESC */ +#define RL_STATE_DISPATCHING 0x00020 /* dispatching to a command */ +#define RL_STATE_MOREINPUT 0x00040 /* reading more input in a command function */ +#define RL_STATE_ISEARCH 0x00080 /* doing incremental search */ +#define RL_STATE_NSEARCH 0x00100 /* doing non-inc search */ +#define RL_STATE_SEARCH 0x00200 /* doing a history search */ +#define RL_STATE_NUMERICARG 0x00400 /* reading numeric argument */ +#define RL_STATE_MACROINPUT 0x00800 /* getting input from a macro */ +#define RL_STATE_MACRODEF 0x01000 /* defining keyboard macro */ +#define RL_STATE_OVERWRITE 0x02000 /* overwrite mode */ +#define RL_STATE_COMPLETING 0x04000 /* doing completion */ +#define RL_STATE_SIGHANDLER 0x08000 /* in readline sighandler */ +#define RL_STATE_UNDOING 0x10000 /* doing an undo */ +#define RL_STATE_INPUTPENDING 0x20000 /* rl_execute_next called */ + +#define RL_STATE_DONE 0x80000 /* done; accepted line */ + +#define RL_SETSTATE(x) (rl_readline_state |= (x)) +#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x)) +#define RL_ISSTATE(x) (rl_readline_state & (x)) + +struct readline_state { + /* line state */ + int point; + int end; + int mark; + char *buffer; + int buflen; + UNDO_LIST *ul; + char *prompt; + + /* global state */ + int rlstate; + int done; + Keymap kmap; + + /* input state */ + rl_command_func_t *lastfunc; + int insmode; + int edmode; + int kseqlen; + FILE *inf; + FILE *outf; + int pendingin; + char *macro; + + /* signal state */ + int catchsigs; + int catchsigwinch; + + /* reserved for future expansion, so the struct size doesn't change */ + char reserved[64]; +}; + +extern int rl_save_state PARAMS((struct readline_state *)); +extern int rl_restore_state PARAMS((struct readline_state *)); #ifdef __cplusplus } diff --git a/readline/rlconf.h b/readline/rlconf.h index 1356fd87924..c651fd8b41f 100644 --- a/readline/rlconf.h +++ b/readline/rlconf.h @@ -8,7 +8,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -19,7 +19,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_RLCONF_H_) #define _RLCONF_H_ @@ -30,10 +30,6 @@ /* Define this to get an indication of file type when listing completions. */ #define VISIBLE_STATS -/* If defined, readline shows opening parens and braces when closing - paren or brace entered. */ -/* #define PAREN_MATCHING */ - /* This definition is needed by readline.c, rltty.c, and signals.c. */ /* If on, then readline handles signals in a way that doesn't screw. */ #define HANDLE_SIGNALS @@ -58,4 +54,7 @@ X `callback' style. */ #define READLINE_CALLBACKS +/* Define this if you want the cursor to indicate insert or overwrite mode. */ +/* #define CURSOR_MODE */ + #endif /* _RLCONF_H_ */ diff --git a/readline/rldefs.h b/readline/rldefs.h index d4aced43e2a..4a28bd1e49c 100644 --- a/readline/rldefs.h +++ b/readline/rldefs.h @@ -10,7 +10,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -21,7 +21,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_RLDEFS_H_) #define _RLDEFS_H_ @@ -30,6 +30,8 @@ # include "config.h" #endif +#include "rlstdc.h" + #if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING) # define TERMIOS_TTY_DRIVER #else @@ -71,7 +73,14 @@ extern char *strchr (), *strrchr (); #define _rl_stricmp strcasecmp #define _rl_strnicmp strncasecmp #else -extern int _rl_stricmp (), _rl_strnicmp (); +extern int _rl_stricmp PARAMS((char *, char *)); +extern int _rl_strnicmp PARAMS((char *, char *, int)); +#endif + +#if defined (HAVE_STRPBRK) +# define _rl_strpbrk(a,b) strpbrk((a),(b)) +#else +extern char *_rl_strpbrk PARAMS((const char *, const char *)); #endif #if !defined (emacs_mode) @@ -80,6 +89,13 @@ extern int _rl_stricmp (), _rl_strnicmp (); # define emacs_mode 1 #endif +#if !defined (RL_IM_INSERT) +# define RL_IM_INSERT 1 +# define RL_IM_OVERWRITE 0 +# +# define RL_IM_DEFAULT RL_IM_INSERT +#endif + /* If you cast map[key].function to type (Keymap) on a Cray, the compiler takes the value of map[key].function and divides it by 4 to convert between pointer types (pointers @@ -87,15 +103,14 @@ extern int _rl_stricmp (), _rl_strnicmp (); This is not what is wanted. */ #if defined (CRAY) # define FUNCTION_TO_KEYMAP(map, key) (Keymap)((int)map[key].function) -# define KEYMAP_TO_FUNCTION(data) (Function *)((int)(data)) +# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)((int)(data)) #else # define FUNCTION_TO_KEYMAP(map, key) (Keymap)(map[key].function) -# define KEYMAP_TO_FUNCTION(data) (Function *)(data) +# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)(data) #endif #ifndef savestring -extern char *xmalloc (); -#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) +#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) #endif /* Possible values for _rl_bell_preference. */ @@ -113,22 +128,28 @@ extern char *xmalloc (); /* Possible values for the found_quote flags word used by the completion functions. It says what kind of (shell-like) quoting we found anywhere in the line. */ -#define RL_QF_SINGLE_QUOTE 0x1 -#define RL_QF_DOUBLE_QUOTE 0x2 -#define RL_QF_BACKSLASH 0x4 +#define RL_QF_SINGLE_QUOTE 0x01 +#define RL_QF_DOUBLE_QUOTE 0x02 +#define RL_QF_BACKSLASH 0x04 +#define RL_QF_OTHER_QUOTE 0x08 /* Default readline line buffer length. */ #define DEFAULT_BUFFER_SIZE 256 #if !defined (STREQ) #define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) -#define STREQN(a, b, n) (((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) +#define STREQN(a, b, n) (((n) == 0) ? (1) \ + : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0)) #endif #if !defined (FREE) # define FREE(x) if (x) free (x) #endif +#if !defined (SWAP) +# define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) +#endif + /* CONFIGURATION SECTION */ #include "rlconf.h" diff --git a/readline/rlmbutil.h b/readline/rlmbutil.h new file mode 100644 index 00000000000..27ca32bfc7d --- /dev/null +++ b/readline/rlmbutil.h @@ -0,0 +1,108 @@ +/* rlmbutil.h -- utility functions for multibyte characters. */ + +/* Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + +#if !defined (_RL_MBUTIL_H_) +#define _RL_MBUTIL_H_ + +#include "rlstdc.h" + +/************************************************/ +/* check multibyte capability for I18N code */ +/************************************************/ + +/* For platforms which support the ISO C amendement 1 functionality we + support user defined character classes. */ + /* Solaris 2.5 has a bug: must be included before . */ +#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) +# include +# include +# if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */ +# define HANDLE_MULTIBYTE 1 +# endif +#endif + +/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ +#if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) +# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0) +# define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0) +# define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0) +# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) +# define mbrlen(s, n, ps) (mbrlen) (s, n, 0) +# define mbstate_t int +#endif + +/* Make sure MB_LEN_MAX is at least 16 on systems that claim to be able to + handle multibyte chars (some systems define MB_LEN_MAX as 1) */ +#ifdef HANDLE_MULTIBYTE +# include +# if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16) +# undef MB_LEN_MAX +# endif +# if !defined (MB_LEN_MAX) +# define MB_LEN_MAX 16 +# endif +#endif + +/************************************************/ +/* end of multibyte capability checks for I18N */ +/************************************************/ + +/* + * Flags for _rl_find_prev_mbchar and _rl_find_next_mbchar: + * + * MB_FIND_ANY find any multibyte character + * MB_FIND_NONZERO find a non-zero-width multibyte character + */ + +#define MB_FIND_ANY 0x00 +#define MB_FIND_NONZERO 0x01 + +extern int _rl_find_prev_mbchar PARAMS((char *, int, int)); +extern int _rl_find_next_mbchar PARAMS((char *, int, int, int)); + +#ifdef HANDLE_MULTIBYTE + +extern int _rl_compare_chars PARAMS((char *, int, mbstate_t *, char *, int, mbstate_t *)); +extern int _rl_get_char_len PARAMS((char *, mbstate_t *)); +extern int _rl_adjust_point PARAMS((char *, int, mbstate_t *)); + +extern int _rl_read_mbchar PARAMS((char *, int)); +extern int _rl_read_mbstring PARAMS((int, char *, int)); + +extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int)); + +#else /* !HANDLE_MULTIBYTE */ + +#undef MB_LEN_MAX +#undef MB_CUR_MAX + +#define MB_LEN_MAX 1 +#define MB_CUR_MAX 1 + +#define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1)) +#define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2)) + +#endif /* !HANDLE_MULTIBYTE */ + +extern int rl_byte_oriented; + +#endif /* _RL_MBUTIL_H_ */ diff --git a/readline/rlprivate.h b/readline/rlprivate.h new file mode 100644 index 00000000000..78bee107dcd --- /dev/null +++ b/readline/rlprivate.h @@ -0,0 +1,284 @@ +/* rlprivate.h -- functions and variables global to the readline library, + but not intended for use by applications. */ + +/* Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + +#if !defined (_RL_PRIVATE_H_) +#define _RL_PRIVATE_H_ + +#include "rlconf.h" /* for VISIBLE_STATS */ +#include "rlstdc.h" +#include "posixjmp.h" /* defines procenv_t */ + +/************************************************************************* + * * + * Global functions undocumented in texinfo manual and not in readline.h * + * * + *************************************************************************/ + +/************************************************************************* + * * + * Global variables undocumented in texinfo manual and not in readline.h * + * * + *************************************************************************/ + +/* complete.c */ +extern int rl_complete_with_tilde_expansion; +#if defined (VISIBLE_STATS) +extern int rl_visible_stats; +#endif /* VISIBLE_STATS */ + +/* readline.c */ +extern int rl_line_buffer_len; +extern int rl_arg_sign; +extern int rl_visible_prompt_length; +extern int readline_echoing_p; +extern int rl_key_sequence_length; +extern int rl_byte_oriented; + +/* display.c */ +extern int rl_display_fixed; + +/* parens.c */ +extern int rl_blink_matching_paren; + +/************************************************************************* + * * + * Global functions and variables unsed and undocumented * + * * + *************************************************************************/ + +/* kill.c */ +extern int rl_set_retained_kills PARAMS((int)); + +/* terminal.c */ +extern void _rl_set_screen_size PARAMS((int, int)); + +/* undo.c */ +extern int _rl_fix_last_undo_of_type PARAMS((unsigned int, int, int)); + +/* util.c */ +extern char *_rl_savestring PARAMS((const char *)); + +/************************************************************************* + * * + * Functions and variables private to the readline library * + * * + *************************************************************************/ + +/* NOTE: Functions and variables prefixed with `_rl_' are + pseudo-global: they are global so they can be shared + between files in the readline library, but are not intended + to be visible to readline callers. */ + +/************************************************************************* + * Undocumented private functions * + *************************************************************************/ + +#if defined(READLINE_CALLBACKS) + +/* readline.c */ +extern void readline_internal_setup PARAMS((void)); +extern char *readline_internal_teardown PARAMS((int)); +extern int readline_internal_char PARAMS((void)); + +#endif /* READLINE_CALLBACKS */ + +/* bind.c */ +extern void _rl_bind_if_unbound PARAMS((const char *, rl_command_func_t *)); + +/* complete.c */ +extern char _rl_find_completion_word PARAMS((int *, int *)); +extern void _rl_free_match_list PARAMS((char **)); + +/* display.c */ +extern char *_rl_strip_prompt PARAMS((char *)); +extern void _rl_move_cursor_relative PARAMS((int, const char *)); +extern void _rl_move_vert PARAMS((int)); +extern void _rl_save_prompt PARAMS((void)); +extern void _rl_restore_prompt PARAMS((void)); +extern char *_rl_make_prompt_for_search PARAMS((int)); +extern void _rl_erase_at_end_of_line PARAMS((int)); +extern void _rl_clear_to_eol PARAMS((int)); +extern void _rl_clear_screen PARAMS((void)); +extern void _rl_update_final PARAMS((void)); +extern void _rl_redisplay_after_sigwinch PARAMS((void)); +extern void _rl_clean_up_for_exit PARAMS((void)); +extern void _rl_erase_entire_line PARAMS((void)); +extern int _rl_current_display_line PARAMS((void)); + +/* input.c */ +extern int _rl_any_typein PARAMS((void)); +extern int _rl_input_available PARAMS((void)); +extern int _rl_input_queued PARAMS((int)); +extern void _rl_insert_typein PARAMS((int)); +extern int _rl_unget_char PARAMS((int)); + +/* macro.c */ +extern void _rl_with_macro_input PARAMS((char *)); +extern int _rl_next_macro_key PARAMS((void)); +extern void _rl_push_executing_macro PARAMS((void)); +extern void _rl_pop_executing_macro PARAMS((void)); +extern void _rl_add_macro_char PARAMS((int)); +extern void _rl_kill_kbd_macro PARAMS((void)); + +/* misc.c */ +extern int _rl_init_argument PARAMS((void)); +extern void _rl_start_using_history PARAMS((void)); +extern int _rl_free_saved_history_line PARAMS((void)); +extern void _rl_set_insert_mode PARAMS((int, int)); + +/* nls.c */ +extern int _rl_init_eightbit PARAMS((void)); + +/* parens.c */ +extern void _rl_enable_paren_matching PARAMS((int)); + +/* readline.c */ +extern void _rl_init_line_state PARAMS((void)); +extern void _rl_set_the_line PARAMS((void)); +extern int _rl_dispatch PARAMS((int, Keymap)); +extern int _rl_dispatch_subseq PARAMS((int, Keymap, int)); + +/* rltty.c */ +extern int _rl_disable_tty_signals PARAMS((void)); +extern int _rl_restore_tty_signals PARAMS((void)); + +/* terminal.c */ +extern void _rl_get_screen_size PARAMS((int, int)); +extern int _rl_init_terminal_io PARAMS((const char *)); +#ifdef _MINIX +extern void _rl_output_character_function PARAMS((int)); +#else +extern int _rl_output_character_function PARAMS((int)); +#endif +extern void _rl_output_some_chars PARAMS((const char *, int)); +extern int _rl_backspace PARAMS((int)); +extern void _rl_enable_meta_key PARAMS((void)); +extern void _rl_control_keypad PARAMS((int)); +extern void _rl_set_cursor PARAMS((int, int)); + +/* text.c */ +extern void _rl_fix_point PARAMS((int)); +extern int _rl_replace_text PARAMS((const char *, int, int)); +extern int _rl_insert_char PARAMS((int, int)); +extern int _rl_overwrite_char PARAMS((int, int)); +extern int _rl_overwrite_rubout PARAMS((int, int)); +extern int _rl_rubout_char PARAMS((int, int)); +#if defined (HANDLE_MULTIBYTE) +extern int _rl_char_search_internal PARAMS((int, int, char *, int)); +#else +extern int _rl_char_search_internal PARAMS((int, int, int)); +#endif +extern int _rl_set_mark_at_pos PARAMS((int)); + +/* util.c */ +extern int _rl_abort_internal PARAMS((void)); +extern char *_rl_strindex PARAMS((const char *, const char *)); +extern int _rl_qsort_string_compare PARAMS((char **, char **)); +extern int (_rl_uppercase_p) PARAMS((int)); +extern int (_rl_lowercase_p) PARAMS((int)); +extern int (_rl_pure_alphabetic) PARAMS((int)); +extern int (_rl_digit_p) PARAMS((int)); +extern int (_rl_to_lower) PARAMS((int)); +extern int (_rl_to_upper) PARAMS((int)); +extern int (_rl_digit_value) PARAMS((int)); + +/* vi_mode.c */ +extern void _rl_vi_initialize_line PARAMS((void)); +extern void _rl_vi_reset_last PARAMS((void)); +extern void _rl_vi_set_last PARAMS((int, int, int)); +extern int _rl_vi_textmod_command PARAMS((int)); +extern void _rl_vi_done_inserting PARAMS((void)); + +/************************************************************************* + * Undocumented private variables * + *************************************************************************/ + +/* bind.c */ +extern const char *_rl_possible_control_prefixes[]; +extern const char *_rl_possible_meta_prefixes[]; + +/* complete.c */ +extern int _rl_complete_show_all; +extern int _rl_complete_mark_directories; +extern int _rl_complete_mark_symlink_dirs; +extern int _rl_print_completions_horizontally; +extern int _rl_completion_case_fold; +extern int _rl_match_hidden_files; +extern int _rl_page_completions; + +/* display.c */ +extern int _rl_vis_botlin; +extern int _rl_last_c_pos; +extern int _rl_suppress_redisplay; +extern char *rl_display_prompt; + +/* isearch.c */ +extern char *_rl_isearch_terminators; + +/* macro.c */ +extern char *_rl_executing_macro; + +/* misc.c */ +extern int _rl_history_preserve_point; +extern int _rl_history_saved_point; + +/* readline.c */ +extern int _rl_horizontal_scroll_mode; +extern int _rl_mark_modified_lines; +extern int _rl_bell_preference; +extern int _rl_meta_flag; +extern int _rl_convert_meta_chars_to_ascii; +extern int _rl_output_meta_chars; +extern char *_rl_comment_begin; +extern unsigned char _rl_parsing_conditionalized_out; +extern Keymap _rl_keymap; +extern FILE *_rl_in_stream; +extern FILE *_rl_out_stream; +extern int _rl_last_command_was_kill; +extern int _rl_eof_char; +extern procenv_t readline_top_level; + +/* terminal.c */ +extern int _rl_enable_keypad; +extern int _rl_enable_meta; +extern char *_rl_term_clreol; +extern char *_rl_term_clrpag; +extern char *_rl_term_im; +extern char *_rl_term_ic; +extern char *_rl_term_ei; +extern char *_rl_term_DC; +extern char *_rl_term_up; +extern char *_rl_term_dc; +extern char *_rl_term_cr; +extern char *_rl_term_IC; +extern int _rl_screenheight; +extern int _rl_screenwidth; +extern int _rl_screenchars; +extern int _rl_terminal_can_insert; +extern int _rl_term_autowrap; + +/* undo.c */ +extern int _rl_doing_an_undo; +extern int _rl_undo_group_level; + +#endif /* _RL_PRIVATE_H_ */ diff --git a/readline/rlshell.h b/readline/rlshell.h new file mode 100644 index 00000000000..3c03fbad576 --- /dev/null +++ b/readline/rlshell.h @@ -0,0 +1,34 @@ +/* rlshell.h -- utility functions normally provided by bash. */ + +/* Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + +#if !defined (_RL_SHELL_H_) +#define _RL_SHELL_H_ + +#include "rlstdc.h" + +extern char *sh_single_quote PARAMS((char *)); +extern void sh_set_lines_and_columns PARAMS((int, int)); +extern char *sh_get_env_value PARAMS((const char *)); +extern char *sh_get_home_dir PARAMS((void)); +extern int sh_unset_nodelay_mode PARAMS((int)); + +#endif /* _RL_SHELL_H_ */ diff --git a/readline/rlstdc.h b/readline/rlstdc.h index f79cf89fe76..d6a22b3742c 100644 --- a/readline/rlstdc.h +++ b/readline/rlstdc.h @@ -7,7 +7,7 @@ Bash is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. Bash is distributed in the hope that it will be useful, but WITHOUT @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with Bash; see the file COPYING. If not, write to the Free - Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_RL_STDC_H_) #define _RL_STDC_H_ @@ -26,58 +26,20 @@ /* A function can be defined using prototypes and compile on both ANSI C and traditional C compilers with something like this: - extern char *func __P((char *, char *, int)); */ + extern char *func PARAMS((char *, char *, int)); */ -#if defined (__STDC__) || defined(__cplusplus) +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif -# if !defined (__P) -# define __P(protos) protos +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ +# define __attribute__(x) # endif -# define __STRING(x) #x - -# if !defined (__GNUC__) && !defined(__cplusplus) && !defined(inline) -# define inline -# endif - -#else /* !__STDC__ */ - -# if !defined (__P) -# define __P(protos) () -# endif -# define __STRING(x) "x" - -#if defined (__GNUC__) /* gcc with -traditional */ -# if !defined (const) -# define const __const -# endif -# if !defined (inline) -# define inline __inline -# endif -# if !defined (signed) -# define signed __signed -# endif -# if !defined (volatile) -# define volatile __volatile -# endif -#else /* !__GNUC__ */ -# if !defined (const) -# define const -# endif -# if !defined (inline) -# define inline -# endif -# if !defined (signed) -# define signed -# endif -# if !defined (volatile) -# define volatile -# endif -#endif /* !__GNUC__ */ - -#endif /* !__STDC__ */ - -#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8) -#define __attribute__(A) #endif #endif /* !_RL_STDC_H_ */ diff --git a/readline/rltty.c b/readline/rltty.c index f87c1c9747f..09702e9e755 100644 --- a/readline/rltty.c +++ b/readline/rltty.c @@ -8,7 +8,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -19,7 +19,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -43,28 +43,19 @@ #include "rltty.h" #include "readline.h" +#include "rlprivate.h" #if !defined (errno) extern int errno; #endif /* !errno */ -extern int readline_echoing_p; -extern int _rl_eof_char; +rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal; +rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal; -extern int _rl_enable_keypad, _rl_enable_meta; +static void block_sigint PARAMS((void)); +static void release_sigint PARAMS((void)); -extern void _rl_control_keypad (); - -#if defined (__GO32__) -# include -# undef HANDLE_SIGNALS -#endif /* __GO32__ */ - -/* Indirect functions to allow apps control over terminal management. */ -extern void rl_prep_terminal (), rl_deprep_terminal (); - -VFunction *rl_prep_term_function = rl_prep_terminal; -VFunction *rl_deprep_term_function = rl_deprep_terminal; +static void set_winsize PARAMS((int)); /* **************************************************************** */ /* */ @@ -104,6 +95,7 @@ block_sigint () # endif /* HAVE_USG_SIGHOLD */ # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ + sigint_blocked = 1; } @@ -111,7 +103,7 @@ block_sigint () static void release_sigint () { - if (!sigint_blocked) + if (sigint_blocked == 0) return; #if defined (HAVE_POSIX_SIGNALS) @@ -138,32 +130,27 @@ release_sigint () /* Non-zero means that the terminal is in a prepped state. */ static int terminal_prepped; +static _RL_TTY_CHARS _rl_tty_chars, _rl_last_tty_chars; + /* If non-zero, means that this process has called tcflow(fd, TCOOFF) and output is suspended. */ #if defined (__ksr1__) static int ksrflow; #endif -#if defined (TIOCGWINSZ) /* Dummy call to force a backgrounded readline to stop before it tries to get the tty settings. */ static void set_winsize (tty) int tty; { +#if defined (TIOCGWINSZ) struct winsize w; if (ioctl (tty, TIOCGWINSZ, &w) == 0) (void) ioctl (tty, TIOCSWINSZ, &w); -} -#else -static void -set_winsize (tty) - int tty; -{ -// dummy function, required by other code. What should be doing? -} #endif /* TIOCGWINSZ */ +} #if defined (NEW_TTY_DRIVER) @@ -191,6 +178,50 @@ struct bsdtty { static TIOTYPE otio; +static void save_tty_chars PARAMS((TIOTYPE *)); +static int _get_tty_settings PARAMS((int, TIOTYPE *)); +static int get_tty_settings PARAMS((int, TIOTYPE *)); +static int _set_tty_settings PARAMS((int, TIOTYPE *)); +static int set_tty_settings PARAMS((int, TIOTYPE *)); + +static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); + +static void +save_tty_chars (tiop) + TIOTYPE *tiop; +{ + _rl_last_tty_chars = _rl_tty_chars; + + if (tiop->flags & SGTTY_SET) + { + _rl_tty_chars.t_erase = tiop->sgttyb.sg_erase; + _rl_tty_chars.t_kill = tiop->sgttyb.sg_kill; + } + + if (tiop->flags & TCHARS_SET) + { + _rl_tty_chars.t_intr = tiop->tchars.t_intrc; + _rl_tty_chars.t_quit = tiop->tchars.t_quitc; + _rl_tty_chars.t_start = tiop->tchars.t_startc; + _rl_tty_chars.t_stop = tiop->tchars.t_stopc; + _rl_tty_chars.t_eof = tiop->tchars.t_eofc; + _rl_tty_chars.t_eol = '\n'; + _rl_tty_chars.t_eol2 = tiop->tchars.t_brkc; + } + + if (tiop->flags & LTCHARS_SET) + { + _rl_tty_chars.t_susp = tiop->ltchars.t_suspc; + _rl_tty_chars.t_dsusp = tiop->ltchars.t_dsuspc; + _rl_tty_chars.t_reprint = tiop->ltchars.t_rprntc; + _rl_tty_chars.t_flush = tiop->ltchars.t_flushc; + _rl_tty_chars.t_werase = tiop->ltchars.t_werasc; + _rl_tty_chars.t_lnext = tiop->ltchars.t_lnextc; + } + + _rl_tty_chars.t_status = -1; +} + static int get_tty_settings (tty, tiop) int tty; @@ -200,22 +231,23 @@ get_tty_settings (tty, tiop) tiop->flags = tiop->lflag = 0; - ioctl (tty, TIOCGETP, &(tiop->sgttyb)); + if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0) + return -1; tiop->flags |= SGTTY_SET; #if defined (TIOCLGET) - ioctl (tty, TIOCLGET, &(tiop->lflag)); - tiop->flags |= LFLAG_SET; + if (ioctl (tty, TIOCLGET, &(tiop->lflag)) == 0) + tiop->flags |= LFLAG_SET; #endif #if defined (TIOCGETC) - ioctl (tty, TIOCGETC, &(tiop->tchars)); - tiop->flags |= TCHARS_SET; + if (ioctl (tty, TIOCGETC, &(tiop->tchars)) == 0) + tiop->flags |= TCHARS_SET; #endif #if defined (TIOCGLTC) - ioctl (tty, TIOCGLTC, &(tiop->ltchars)); - tiop->flags |= LTCHARS_SET; + if (ioctl (tty, TIOCGLTC, &(tiop->ltchars)) == 0) + tiop->flags |= LTCHARS_SET; #endif return 0; @@ -261,24 +293,23 @@ set_tty_settings (tty, tiop) } static void -prepare_terminal_settings (meta_flag, otio, tiop) +prepare_terminal_settings (meta_flag, oldtio, tiop) int meta_flag; - TIOTYPE otio, *tiop; + TIOTYPE oldtio, *tiop; { -#if !defined (__GO32__) - readline_echoing_p = (otio.sgttyb.sg_flags & ECHO); + readline_echoing_p = (oldtio.sgttyb.sg_flags & ECHO); /* Copy the original settings to the structure we're going to use for our settings. */ - tiop->sgttyb = otio.sgttyb; - tiop->lflag = otio.lflag; + tiop->sgttyb = oldtio.sgttyb; + tiop->lflag = oldtio.lflag; #if defined (TIOCGETC) - tiop->tchars = otio.tchars; + tiop->tchars = oldtio.tchars; #endif #if defined (TIOCGLTC) - tiop->ltchars = otio.ltchars; + tiop->ltchars = oldtio.ltchars; #endif - tiop->flags = otio.flags; + tiop->flags = oldtio.flags; /* First, the basic settings to put us into character-at-a-time, no-echo input mode. */ @@ -291,8 +322,8 @@ prepare_terminal_settings (meta_flag, otio, tiop) #if !defined (ANYP) # define ANYP (EVENP | ODDP) #endif - if (((otio.sgttyb.sg_flags & ANYP) == ANYP) || - ((otio.sgttyb.sg_flags & ANYP) == 0)) + if (((oldtio.sgttyb.sg_flags & ANYP) == ANYP) || + ((oldtio.sgttyb.sg_flags & ANYP) == 0)) { tiop->sgttyb.sg_flags |= ANYP; @@ -311,13 +342,13 @@ prepare_terminal_settings (meta_flag, otio, tiop) tiop->tchars.t_startc = -1; /* C-q */ /* If there is an XON character, bind it to restart the output. */ - if (otio.tchars.t_startc != -1) - rl_bind_key (otio.tchars.t_startc, rl_restart_output); + if (oldtio.tchars.t_startc != -1) + rl_bind_key (oldtio.tchars.t_startc, rl_restart_output); # endif /* USE_XON_XOFF */ /* If there is an EOF char, bind _rl_eof_char to it. */ - if (otio.tchars.t_eofc != -1) - _rl_eof_char = otio.tchars.t_eofc; + if (oldtio.tchars.t_eofc != -1) + _rl_eof_char = oldtio.tchars.t_eofc; # if defined (NO_KILL_INTR) /* Get rid of terminal-generated SIGQUIT and SIGINT. */ @@ -331,7 +362,6 @@ prepare_terminal_settings (meta_flag, otio, tiop) tiop->ltchars.t_dsuspc = -1; /* C-y */ tiop->ltchars.t_lnextc = -1; /* C-v */ #endif /* TIOCGLTC */ -#endif /* !__GO32__ */ } #else /* !defined (NEW_TTY_DRIVER) */ @@ -357,18 +387,71 @@ prepare_terminal_settings (meta_flag, otio, tiop) # define TIOTYPE struct termio # define DRAIN_OUTPUT(fd) # define GETATTR(tty, tiop) (ioctl (tty, TCGETA, tiop)) -# define SETATTR(tty, tiop) (ioctl (tty, TCSETA, tiop)) +# define SETATTR(tty, tiop) (ioctl (tty, TCSETAW, tiop)) #endif /* !TERMIOS_TTY_DRIVER */ static TIOTYPE otio; +static void save_tty_chars PARAMS((TIOTYPE *)); +static int _get_tty_settings PARAMS((int, TIOTYPE *)); +static int get_tty_settings PARAMS((int, TIOTYPE *)); +static int _set_tty_settings PARAMS((int, TIOTYPE *)); +static int set_tty_settings PARAMS((int, TIOTYPE *)); + +static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); + #if defined (FLUSHO) # define OUTPUT_BEING_FLUSHED(tp) (tp->c_lflag & FLUSHO) #else # define OUTPUT_BEING_FLUSHED(tp) 0 #endif -#if defined (_AIX) || (defined (FLUSHO) && defined (_AIX41)) +static void +save_tty_chars (tiop) + TIOTYPE *tiop; +{ + _rl_last_tty_chars = _rl_tty_chars; + + _rl_tty_chars.t_eof = tiop->c_cc[VEOF]; + _rl_tty_chars.t_eol = tiop->c_cc[VEOL]; +#ifdef VEOL2 + _rl_tty_chars.t_eol2 = tiop->c_cc[VEOL2]; +#endif + _rl_tty_chars.t_erase = tiop->c_cc[VERASE]; +#ifdef VWERASE + _rl_tty_chars.t_werase = tiop->c_cc[VWERASE]; +#endif + _rl_tty_chars.t_kill = tiop->c_cc[VKILL]; +#ifdef VREPRINT + _rl_tty_chars.t_reprint = tiop->c_cc[VREPRINT]; +#endif + _rl_tty_chars.t_intr = tiop->c_cc[VINTR]; + _rl_tty_chars.t_quit = tiop->c_cc[VQUIT]; +#ifdef VSUSP + _rl_tty_chars.t_susp = tiop->c_cc[VSUSP]; +#endif +#ifdef VDSUSP + _rl_tty_chars.t_dsusp = tiop->c_cc[VDSUSP]; +#endif +#ifdef VSTART + _rl_tty_chars.t_start = tiop->c_cc[VSTART]; +#endif +#ifdef VSTOP + _rl_tty_chars.t_stop = tiop->c_cc[VSTOP]; +#endif +#ifdef VLNEXT + _rl_tty_chars.t_lnext = tiop->c_cc[VLNEXT]; +#endif +#ifdef VDISCARD + _rl_tty_chars.t_flush = tiop->c_cc[VDISCARD]; +#endif +#ifdef VSTATUS + _rl_tty_chars.t_status = tiop->c_cc[VSTATUS]; +#endif +} + +#if defined (_AIX) || defined (_AIX41) +/* Currently this is only used on AIX */ static void rltty_warning (msg) char *msg; @@ -377,7 +460,6 @@ rltty_warning (msg) } #endif - #if defined (_AIX) void setopost(tp) @@ -392,14 +474,12 @@ TIOTYPE *tp; #endif static int -get_tty_settings (tty, tiop) +_get_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { int ioctl_ret; - set_winsize (tty); - while (1) { ioctl_ret = GETATTR (tty, tiop); @@ -423,6 +503,19 @@ get_tty_settings (tty, tiop) break; } + return 0; +} + +static int +get_tty_settings (tty, tiop) + int tty; + TIOTYPE *tiop; +{ + set_winsize (tty); + + if (_get_tty_settings (tty, tiop) < 0) + return -1; + #if defined (_AIX) setopost(tiop); #endif @@ -431,7 +524,7 @@ get_tty_settings (tty, tiop) } static int -set_tty_settings (tty, tiop) +_set_tty_settings (tty, tiop) int tty; TIOTYPE *tiop; { @@ -441,7 +534,17 @@ set_tty_settings (tty, tiop) return -1; errno = 0; } + return 0; +} +static int +set_tty_settings (tty, tiop) + int tty; + TIOTYPE *tiop; +{ + if (_set_tty_settings (tty, tiop) < 0) + return -1; + #if 0 #if defined (TERMIOS_TTY_DRIVER) @@ -458,22 +561,22 @@ set_tty_settings (tty, tiop) ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */ #endif /* !TERMIOS_TTY_DRIVER */ -#endif +#endif /* 0 */ return 0; } static void -prepare_terminal_settings (meta_flag, otio, tiop) +prepare_terminal_settings (meta_flag, oldtio, tiop) int meta_flag; - TIOTYPE otio, *tiop; + TIOTYPE oldtio, *tiop; { - readline_echoing_p = (otio.c_lflag & ECHO); + readline_echoing_p = (oldtio.c_lflag & ECHO); tiop->c_lflag &= ~(ICANON | ECHO); - if ((unsigned char) otio.c_cc[VEOF] != (unsigned char) _POSIX_VDISABLE) - _rl_eof_char = otio.c_cc[VEOF]; + if ((unsigned char) oldtio.c_cc[VEOF] != (unsigned char) _POSIX_VDISABLE) + _rl_eof_char = oldtio.c_cc[VEOF]; #if defined (USE_XON_XOFF) #if defined (IXANY) @@ -504,7 +607,7 @@ prepare_terminal_settings (meta_flag, otio, tiop) if (OUTPUT_BEING_FLUSHED (tiop)) { tiop->c_lflag &= ~FLUSHO; - otio.c_lflag &= ~FLUSHO; + oldtio.c_lflag &= ~FLUSHO; } #endif @@ -530,7 +633,6 @@ void rl_prep_terminal (meta_flag) int meta_flag; { -#if !defined (__GO32__) int tty; TIOTYPE tio; @@ -550,6 +652,8 @@ rl_prep_terminal (meta_flag) otio = tio; + save_tty_chars (&otio); + prepare_terminal_settings (meta_flag, otio, &tio); if (set_tty_settings (tty, &tio) < 0) @@ -563,16 +667,15 @@ rl_prep_terminal (meta_flag) fflush (rl_outstream); terminal_prepped = 1; + RL_SETSTATE(RL_STATE_TERMPREPPED); release_sigint (); -#endif /* !__GO32__ */ } /* Restore the terminal's normal settings and modes. */ void rl_deprep_terminal () { -#if !defined (__GO32__) int tty; if (!terminal_prepped) @@ -595,9 +698,9 @@ rl_deprep_terminal () } terminal_prepped = 0; + RL_UNSETSTATE(RL_STATE_TERMPREPPED); release_sigint (); -#endif /* !__GO32__ */ } /* **************************************************************** */ @@ -607,8 +710,8 @@ rl_deprep_terminal () /* **************************************************************** */ int -rl_restart_output (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_restart_output (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { int fildes = fileno (rl_outstream); #if defined (TIOCSTART) @@ -640,8 +743,8 @@ rl_restart_output (int count __attribute__((unused)), } int -rl_stop_output (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_stop_output (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { int fildes = fileno (rl_instream); @@ -672,6 +775,9 @@ rl_stop_output (int count __attribute__((unused)), /* Default Key Bindings */ /* */ /* **************************************************************** */ + +/* Set the system's default editing characters to their readline equivalents + in KMAP. Should be static, now that we have rl_tty_set_default_bindings. */ void rltty_set_default_bindings (kmap) Keymap kmap; @@ -686,8 +792,8 @@ rltty_set_default_bindings (kmap) { \ int ic; \ ic = sc; \ - if (ic != -1 && kmap[ic].type == ISFUNC) \ - kmap[ic].function = func; \ + if (ic != -1 && kmap[(unsigned char)ic].type == ISFUNC) \ + kmap[(unsigned char)ic].function = func; \ } \ while (0) @@ -735,3 +841,71 @@ rltty_set_default_bindings (kmap) } #endif /* !NEW_TTY_DRIVER */ } + +/* New public way to set the system default editing chars to their readline + equivalents. */ +void +rl_tty_set_default_bindings (kmap) + Keymap kmap; +{ + rltty_set_default_bindings (kmap); +} + +#if defined (HANDLE_SIGNALS) + +#if defined (NEW_TTY_DRIVER) +int +_rl_disable_tty_signals () +{ + return 0; +} + +int +_rl_restore_tty_signals () +{ + return 0; +} +#else + +static TIOTYPE sigstty, nosigstty; +static int tty_sigs_disabled = 0; + +int +_rl_disable_tty_signals () +{ + if (tty_sigs_disabled) + return 0; + + if (_get_tty_settings (fileno (rl_instream), &sigstty) < 0) + return -1; + + nosigstty = sigstty; + + nosigstty.c_lflag &= ~ISIG; + nosigstty.c_iflag &= ~IXON; + + if (_set_tty_settings (fileno (rl_instream), &nosigstty) < 0) + return (_set_tty_settings (fileno (rl_instream), &sigstty)); + + tty_sigs_disabled = 1; + return 0; +} + +int +_rl_restore_tty_signals () +{ + int r; + + if (tty_sigs_disabled == 0) + return 0; + + r = _set_tty_settings (fileno (rl_instream), &sigstty); + + if (r == 0) + tty_sigs_disabled = 0; + + return r; +} +#endif /* !NEW_TTY_DRIVER */ + +#endif /* HANDLE_SIGNALS */ diff --git a/readline/rltty.h b/readline/rltty.h index fe783463f6a..029a3fbc0e1 100644 --- a/readline/rltty.h +++ b/readline/rltty.h @@ -8,7 +8,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -19,10 +19,10 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_RLTTY_H_) -#define _RLTTY_H +#define _RLTTY_H_ /* Posix systems use termios and the Posix signal functions. */ #if defined (TERMIOS_TTY_DRIVER) @@ -60,4 +60,23 @@ # endif /* !_SVR4_DISABLE */ #endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */ +typedef struct _rl_tty_chars { + char t_eof; + char t_eol; + char t_eol2; + char t_erase; + char t_werase; + char t_kill; + char t_reprint; + char t_intr; + char t_quit; + char t_susp; + char t_dsusp; + char t_start; + char t_stop; + char t_lnext; + char t_flush; + char t_status; +} _RL_TTY_CHARS; + #endif /* _RLTTY_H_ */ diff --git a/readline/rltypedefs.h b/readline/rltypedefs.h new file mode 100644 index 00000000000..f3280e9fce0 --- /dev/null +++ b/readline/rltypedefs.h @@ -0,0 +1,88 @@ +/* rltypedefs.h -- Type declarations for readline functions. */ + +/* Copyright (C) 2000 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + +#ifndef _RL_TYPEDEFS_H_ +#define _RL_TYPEDEFS_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Old-style */ + +#if !defined (_FUNCTION_DEF) +# define _FUNCTION_DEF + +typedef int Function (); +typedef void VFunction (); +typedef char *CPFunction (); +typedef char **CPPFunction (); + +#endif /* _FUNCTION_DEF */ + +/* New style. */ + +#if !defined (_RL_FUNCTION_TYPEDEF) +# define _RL_FUNCTION_TYPEDEF + +/* Bindable functions */ +typedef int rl_command_func_t PARAMS((int, int)); + +/* Typedefs for the completion system */ +typedef char *rl_compentry_func_t PARAMS((const char *, int)); +typedef char **rl_completion_func_t PARAMS((const char *, int, int)); + +typedef char *rl_quote_func_t PARAMS((char *, int, char *)); +typedef char *rl_dequote_func_t PARAMS((char *, int)); + +typedef int rl_compignore_func_t PARAMS((char **)); + +typedef void rl_compdisp_func_t PARAMS((char **, int, int)); + +/* Type for input and pre-read hook functions like rl_event_hook */ +typedef int rl_hook_func_t PARAMS((void)); + +/* Input function type */ +typedef int rl_getc_func_t PARAMS((FILE *)); + +/* Generic function that takes a character buffer (which could be the readline + line buffer) and an index into it (which could be rl_point) and returns + an int. */ +typedef int rl_linebuf_func_t PARAMS((char *, int)); + +/* `Generic' function pointer typedefs */ +typedef int rl_intfunc_t PARAMS((int)); +#define rl_ivoidfunc_t rl_hook_func_t +typedef int rl_icpfunc_t PARAMS((char *)); +typedef int rl_icppfunc_t PARAMS((char **)); + +typedef void rl_voidfunc_t PARAMS((void)); +typedef void rl_vintfunc_t PARAMS((int)); +typedef void rl_vcpfunc_t PARAMS((char *)); +typedef void rl_vcppfunc_t PARAMS((char **)); +#endif /* _RL_FUNCTION_TYPEDEF */ + +#ifdef __cplusplus +} +#endif + +#endif /* _RL_TYPEDEFS_H_ */ diff --git a/readline/rlwinsize.h b/readline/rlwinsize.h index 92b3de174bf..7838154d023 100644 --- a/readline/rlwinsize.h +++ b/readline/rlwinsize.h @@ -9,7 +9,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -20,7 +20,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_RLWINSIZE_H_) #define _RLWINSIZE_H_ @@ -55,4 +55,3 @@ #endif /* _RL_WINSIZE_H */ - diff --git a/readline/search.c b/readline/search.c index 0179d8da2f1..ac47596a3f8 100644 --- a/readline/search.c +++ b/readline/search.c @@ -8,7 +8,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -19,7 +19,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -40,33 +40,56 @@ #endif #include "rldefs.h" +#include "rlmbutil.h" + #include "readline.h" #include "history.h" +#include "rlprivate.h" +#include "xmalloc.h" + #ifdef abs # undef abs #endif #define abs(x) (((x) >= 0) ? (x) : -(x)) -extern char *xmalloc (), *xrealloc (); - -/* Variables imported from readline.c */ -extern int rl_point, rl_end, rl_line_buffer_len; -extern int rl_editing_mode; -extern char *rl_prompt; -extern char *rl_line_buffer; -extern HIST_ENTRY *saved_line_for_history; -extern Function *rl_last_func; +extern HIST_ENTRY *_rl_saved_line_for_history; /* Functions imported from the rest of the library. */ -extern int _rl_free_history_entry (); -extern char *_rl_make_prompt_for_search (); -extern void rl_extend_line_buffer (); +extern int _rl_free_history_entry PARAMS((HIST_ENTRY *)); static char *noninc_search_string = (char *) NULL; static int noninc_history_pos; + static char *prev_line_found = (char *) NULL; +static int rl_history_search_len; +static int rl_history_search_pos; +static char *history_search_string; +static int history_string_size; + +static void make_history_line_current PARAMS((HIST_ENTRY *)); +static int noninc_search_from_pos PARAMS((char *, int, int)); +static void noninc_dosearch PARAMS((char *, int)); +static void noninc_search PARAMS((int, int)); +static int rl_history_search_internal PARAMS((int, int)); +static void rl_history_search_reinit PARAMS((void)); + +/* Make the data from the history entry ENTRY be the contents of the + current line. This doesn't do anything with rl_point; the caller + must set it. */ +static void +make_history_line_current (entry) + HIST_ENTRY *entry; +{ + rl_replace_line (entry->line, 0); + rl_undo_list = (UNDO_LIST *)entry->data; + + if (_rl_saved_line_for_history) + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; +} + /* Search the history list for STRING starting at absolute history position POS. If STRING begins with `^', the search must match STRING at the beginning of a history line, otherwise a full substring match is performed @@ -79,13 +102,19 @@ noninc_search_from_pos (string, pos, dir) { int ret, old; - old = where_history (); - history_set_pos (pos); + if (pos < 0) + return -1; + old = where_history (); + if (history_set_pos (pos) == 0) + return -1; + + RL_SETSTATE(RL_STATE_SEARCH); if (*string == '^') ret = history_search_prefix (string + 1, dir); else ret = history_search (string, dir); + RL_UNSETSTATE(RL_STATE_SEARCH); if (ret != -1) ret = where_history (); @@ -102,12 +131,12 @@ noninc_dosearch (string, dir) char *string; int dir; { - int oldpos, pos, line_len; + int oldpos, pos; HIST_ENTRY *entry; if (string == 0 || *string == '\0' || noninc_history_pos < 0) { - ding (); + rl_ding (); return; } @@ -115,10 +144,10 @@ noninc_dosearch (string, dir) if (pos == -1) { /* Search failed, current history position unchanged. */ - maybe_unsave_line (); + rl_maybe_unsave_line (); rl_clear_message (); rl_point = 0; - ding (); + rl_ding (); return; } @@ -132,19 +161,12 @@ noninc_dosearch (string, dir) #endif history_set_pos (oldpos); - line_len = strlen (entry->line); - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - strcpy (rl_line_buffer, entry->line); + make_history_line_current (entry); - rl_undo_list = (UNDO_LIST *)entry->data; - rl_end = strlen (rl_line_buffer); rl_point = 0; - rl_clear_message (); + rl_mark = rl_end; - if (saved_line_for_history) - _rl_free_history_entry (saved_line_for_history); - saved_line_for_history = (HIST_ENTRY *)NULL; + rl_clear_message (); } /* Search non-interactively through the history list. DIR < 0 means to @@ -157,11 +179,15 @@ noninc_search (dir, pchar) int dir; int pchar; { - int saved_point, c; + int saved_point, saved_mark, c; char *p; +#if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; +#endif - maybe_save_line (); + rl_maybe_save_line (); saved_point = rl_point; + saved_mark = rl_mark; /* Use the line buffer to read the search string. */ rl_line_buffer[0] = 0; @@ -171,23 +197,37 @@ noninc_search (dir, pchar) rl_message (p, 0, 0); free (p); -#define SEARCH_RETURN rl_restore_prompt (); return +#define SEARCH_RETURN rl_restore_prompt (); RL_UNSETSTATE(RL_STATE_NSEARCH); return + RL_SETSTATE(RL_STATE_NSEARCH); /* Read the search string. */ - while ((c = rl_read_key ())) + while (1) { + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + c = _rl_read_mbstring (c, mb, MB_LEN_MAX); +#endif + + if (c == 0) + break; + switch (c) { case CTRL('H'): case RUBOUT: if (rl_point == 0) { - maybe_unsave_line (); + rl_maybe_unsave_line (); rl_clear_message (); rl_point = saved_point; + rl_mark = saved_mark; SEARCH_RETURN; } - rl_rubout (1, c); + _rl_rubout_char (1, c); break; case CTRL('W'): @@ -206,20 +246,28 @@ noninc_search (dir, pchar) case CTRL('C'): case CTRL('G'): - maybe_unsave_line (); + rl_maybe_unsave_line (); rl_clear_message (); rl_point = saved_point; - ding (); + rl_mark = saved_mark; + rl_ding (); SEARCH_RETURN; default: - rl_insert (1, c); +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_insert_text (mb); + else +#endif + _rl_insert_char (1, c); break; } (*rl_redisplay_function) (); } dosearch: + rl_mark = saved_mark; + /* If rl_point == 0, we want to re-use the previous search string and start from the saved history position. If there's no previous search string, punt. */ @@ -227,7 +275,7 @@ noninc_search (dir, pchar) { if (!noninc_search_string) { - ding (); + rl_ding (); SEARCH_RETURN; } } @@ -235,19 +283,20 @@ noninc_search (dir, pchar) { /* We want to start the search from the current history position. */ noninc_history_pos = where_history (); - if (noninc_search_string) - free (noninc_search_string); + FREE (noninc_search_string); noninc_search_string = savestring (rl_line_buffer); } rl_restore_prompt (); noninc_dosearch (noninc_search_string, dir); + RL_UNSETSTATE(RL_STATE_NSEARCH); } /* Search forward through the history list for a string. If the vi-mode code calls this, KEY will be `?'. */ int -rl_noninc_forward_search (int count __attribute__((unused)), int key) +rl_noninc_forward_search (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { noninc_search (1, (key == '?') ? '?' : 0); return 0; @@ -256,7 +305,8 @@ rl_noninc_forward_search (int count __attribute__((unused)), int key) /* Reverse search the history list for a string. If the vi-mode code calls this, KEY will be `/'. */ int -rl_noninc_reverse_search (int count __attribute__((unused)), int key) +rl_noninc_reverse_search (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { noninc_search (-1, (key == '/') ? '/' : 0); return 0; @@ -265,12 +315,12 @@ rl_noninc_reverse_search (int count __attribute__((unused)), int key) /* Search forward through the history list for the last string searched for. If there is no saved search string, abort. */ int -rl_noninc_forward_search_again (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_noninc_forward_search_again (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { if (!noninc_search_string) { - ding (); + rl_ding (); return (-1); } noninc_dosearch (noninc_search_string, 1); @@ -280,12 +330,12 @@ rl_noninc_forward_search_again (int count __attribute__((unused)), /* Reverse search in the history list for the last string searched for. If there is no saved search string, abort. */ int -rl_noninc_reverse_search_again (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_noninc_reverse_search_again (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { if (!noninc_search_string) { - ding (); + rl_ding (); return (-1); } noninc_dosearch (noninc_search_string, -1); @@ -293,69 +343,105 @@ rl_noninc_reverse_search_again (int count __attribute__((unused)), } static int -rl_history_search_internal (count, direction) - int count, direction; +rl_history_search_internal (count, dir) + int count, dir; { - HIST_ENTRY *temp, *old_temp; - int line_len; + HIST_ENTRY *temp; + int ret, oldpos; - maybe_save_line (); + rl_maybe_save_line (); + temp = (HIST_ENTRY *)NULL; - temp = old_temp = (HIST_ENTRY *)NULL; + /* Search COUNT times through the history for a line whose prefix + matches history_search_string. When this loop finishes, TEMP, + if non-null, is the history line to copy into the line buffer. */ while (count) { - temp = (direction < 0) ? previous_history () : next_history (); - if (temp == 0) - break; - /* On an empty prefix, make this the same as previous-history. */ - if (rl_point == 0) - { - count--; - continue; - } - if (STREQN (rl_line_buffer, temp->line, rl_point)) - { - /* Don't find multiple instances of the same line. */ - if (prev_line_found && STREQ (prev_line_found, temp->line)) - continue; - if (direction < 0) - old_temp = temp; - prev_line_found = temp->line; - count--; - } + ret = noninc_search_from_pos (history_search_string, rl_history_search_pos + dir, dir); + if (ret == -1) + break; + + /* Get the history entry we found. */ + rl_history_search_pos = ret; + oldpos = where_history (); + history_set_pos (rl_history_search_pos); + temp = current_history (); + history_set_pos (oldpos); + + /* Don't find multiple instances of the same line. */ + if (prev_line_found && STREQ (prev_line_found, temp->line)) + continue; + prev_line_found = temp->line; + count--; } + /* If we didn't find anything at all, return. */ if (temp == 0) { - if (direction < 0 && old_temp) - temp = old_temp; - else - { - maybe_unsave_line (); - ding (); - return 1; - } + rl_maybe_unsave_line (); + rl_ding (); + /* If you don't want the saved history line (last match) to show up + in the line buffer after the search fails, change the #if 0 to + #if 1 */ +#if 0 + if (rl_point > rl_history_search_len) + { + rl_point = rl_end = rl_history_search_len; + rl_line_buffer[rl_end] = '\0'; + rl_mark = 0; + } +#else + rl_point = rl_history_search_len; /* rl_maybe_unsave_line changes it */ + rl_mark = rl_end; +#endif + return 1; } - line_len = strlen (temp->line); - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - strcpy (rl_line_buffer, temp->line); - rl_undo_list = (UNDO_LIST *)temp->data; - rl_end = line_len; + /* Copy the line we found into the current line buffer. */ + make_history_line_current (temp); + + rl_point = rl_history_search_len; + rl_mark = rl_end; + return 0; } +static void +rl_history_search_reinit () +{ + rl_history_search_pos = where_history (); + rl_history_search_len = rl_point; + prev_line_found = (char *)NULL; + if (rl_point) + { + if (rl_history_search_len >= history_string_size - 2) + { + history_string_size = rl_history_search_len + 2; + history_search_string = (char *)xrealloc (history_search_string, history_string_size); + } + history_search_string[0] = '^'; + strncpy (history_search_string + 1, rl_line_buffer, rl_point); + history_search_string[rl_point + 1] = '\0'; + } + _rl_free_saved_history_line (); +} + /* Search forward in the history for the string of characters from the start of the line to rl_point. This is a non-incremental search. */ int -rl_history_search_forward (int count, int ignore __attribute__((unused))) +rl_history_search_forward (count, ignore) + int count, ignore; { if (count == 0) return (0); - if (rl_last_func != rl_history_search_forward) - prev_line_found = (char *)NULL; + + if (rl_last_func != rl_history_search_forward && + rl_last_func != rl_history_search_backward) + rl_history_search_reinit (); + + if (rl_history_search_len == 0) + return (rl_get_next_history (count, ignore)); return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1)); } @@ -363,11 +449,17 @@ rl_history_search_forward (int count, int ignore __attribute__((unused))) from the start of the line to rl_point. This is a non-incremental search. */ int -rl_history_search_backward (int count, int ignore __attribute__((unused))) +rl_history_search_backward (count, ignore) + int count, ignore; { if (count == 0) return (0); - if (rl_last_func != rl_history_search_backward) - prev_line_found = (char *)NULL; + + if (rl_last_func != rl_history_search_forward && + rl_last_func != rl_history_search_backward) + rl_history_search_reinit (); + + if (rl_history_search_len == 0) + return (rl_get_previous_history (count, ignore)); return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1)); } diff --git a/readline/shell.c b/readline/shell.c index becd66e0f9a..ad27cc14884 100644 --- a/readline/shell.c +++ b/readline/shell.c @@ -8,7 +8,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -19,14 +19,13 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) # include #endif -#include #include #if defined (HAVE_UNISTD_H) @@ -39,36 +38,61 @@ # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ -#if defined (HAVE_STDIO_H) -# include -#endif /* HAVE_STDIO_H */ - #if defined (HAVE_STRING_H) # include #else # include #endif /* !HAVE_STRING_H */ +#if defined (HAVE_LIMITS_H) +# include +#endif + +#include #include +#include + +#include "rlstdc.h" +#include "rlshell.h" +#include "xmalloc.h" + #if !defined (HAVE_GETPW_DECLS) -extern struct passwd *getpwuid (); +extern struct passwd *getpwuid PARAMS((uid_t)); #endif /* !HAVE_GETPW_DECLS */ -extern char *xmalloc (); +#ifndef NULL +# define NULL 0 +#endif + +#ifndef CHAR_BIT +# define CHAR_BIT 8 +#endif + +/* Nonzero if the integer type T is signed. */ +#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) + +/* Bound on length of the string representing an integer value of type T. + Subtract one for the sign bit if T is signed; + 302 / 1000 is log10 (2) rounded up; + add one for integer division truncation; + add one more for a minus sign if t is signed. */ +#define INT_STRLEN_BOUND(t) \ + ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \ + + 1 + TYPE_SIGNED (t)) /* All of these functions are resolved from bash if we are linking readline as part of bash. */ /* Does shell-like quoting using single quotes. */ char * -single_quote (string) +sh_single_quote (string) char *string; { register int c; char *result, *r, *s; - result = (char *)xmalloc (3 + (3 * strlen (string))); + result = (char *)xmalloc (3 + (4 * strlen (string))); r = result; *r++ = '\''; @@ -93,24 +117,24 @@ single_quote (string) /* Set the environment variables LINES and COLUMNS to lines and cols, respectively. */ void -set_lines_and_columns (lines, cols) +sh_set_lines_and_columns (lines, cols) int lines, cols; { char *b; #if defined (HAVE_PUTENV) - b = xmalloc (24); + b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1); sprintf (b, "LINES=%d", lines); putenv (b); - b = xmalloc (24); + b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1); sprintf (b, "COLUMNS=%d", cols); putenv (b); #else /* !HAVE_PUTENV */ # if defined (HAVE_SETENV) - b = xmalloc (8); + b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1); sprintf (b, "%d", lines); setenv ("LINES", b, 1); - b = xmalloc (8); + b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1); sprintf (b, "%d", cols); setenv ("COLUMNS", b, 1); # endif /* HAVE_SETENV */ @@ -118,14 +142,14 @@ set_lines_and_columns (lines, cols) } char * -get_env_value (varname) - char *varname; +sh_get_env_value (varname) + const char *varname; { return ((char *)getenv (varname)); } char * -get_home_dir () +sh_get_home_dir () { char *home_dir; struct passwd *entry; @@ -136,3 +160,37 @@ get_home_dir () home_dir = entry->pw_dir; return (home_dir); } + +#if !defined (O_NDELAY) +# if defined (FNDELAY) +# define O_NDELAY FNDELAY +# endif +#endif + +int +sh_unset_nodelay_mode (fd) + int fd; +{ + int flags, bflags; + + if ((flags = fcntl (fd, F_GETFL, 0)) < 0) + return -1; + + bflags = 0; + +#ifdef O_NONBLOCK + bflags |= O_NONBLOCK; +#endif + +#ifdef O_NDELAY + bflags |= O_NDELAY; +#endif + + if (flags & bflags) + { + flags &= ~bflags; + return (fcntl (fd, F_SETFL, flags)); + } + + return 0; +} diff --git a/readline/signals.c b/readline/signals.c index 3a34432f143..0a1468b6b2a 100644 --- a/readline/signals.c +++ b/readline/signals.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -40,15 +40,13 @@ # include #endif /* GWINSZ_IN_SYS_IOCTL */ -#if defined (__GO32__) -# undef HANDLE_SIGNALS -#endif /* __GO32__ */ - #if defined (HANDLE_SIGNALS) /* Some standard library routines. */ #include "readline.h" #include "history.h" +#include "rlprivate.h" + #if !defined (RETSIGTYPE) # if defined (VOID_SIGHANDLER) # define RETSIGTYPE void @@ -63,23 +61,20 @@ # define SIGHANDLER_RETURN return (0) #endif -/* This typedef is equivalant to the one for Function; it allows us +/* This typedef is equivalent to the one for Function; it allows us to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */ typedef RETSIGTYPE SigHandler (); -extern int readline_echoing_p; -extern int rl_pending_input; -extern int _rl_meta_flag; +#if defined (HAVE_POSIX_SIGNALS) +typedef struct sigaction sighandler_cxt; +# define rl_sigaction(s, nh, oh) sigaction(s, nh, oh) +#else +typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt; +# define sigemptyset(m) +#endif /* !HAVE_POSIX_SIGNALS */ -extern void free_undo_list (); -extern void _rl_get_screen_size (); -extern void _rl_redisplay_after_sigwinch (); -extern void _rl_clean_up_for_exit (); -extern void _rl_kill_kbd_macro (); -extern void _rl_init_argument (); -extern void rl_deprep_terminal (), rl_prep_terminal (); - -static SigHandler *rl_set_sighandler (); +static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); +static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); /* Exported variables for use by applications. */ @@ -101,14 +96,6 @@ static int sigwinch_set_flag; /* */ /* **************************************************************** */ -#if defined (HAVE_POSIX_SIGNALS) -typedef struct sigaction sighandler_cxt; -# define rl_sigaction(s, nh, oh) sigaction(s, nh, oh) -#else -typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt; -# define sigemptyset(m) -#endif /* !HAVE_POSIX_SIGNALS */ - static sighandler_cxt old_int, old_term, old_alrm, old_quit; #if defined (SIGTSTP) static sighandler_cxt old_tstp, old_ttou, old_ttin; @@ -133,6 +120,8 @@ rl_signal_handler (sig) # endif /* !HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ + RL_SETSTATE(RL_STATE_SIGHANDLER); + #if !defined (HAVE_BSD_SIGNALS) && !defined (HAVE_POSIX_SIGNALS) /* Since the signal will not be blocked while we are in the signal handler, ignore it until rl_clear_signals resets the catcher. */ @@ -165,6 +154,10 @@ rl_signal_handler (sig) # endif /* HAVE_BSD_SIGNALS */ #endif /* !HAVE_POSIX_SIGNALS */ +#if defined (__EMX__) + signal (sig, SIG_ACK); +#endif + kill (getpid (), sig); /* Let the signal that we just sent through. */ @@ -179,6 +172,7 @@ rl_signal_handler (sig) rl_reset_after_signal (); } + RL_UNSETSTATE(RL_STATE_SIGHANDLER); SIGHANDLER_RETURN; } @@ -199,6 +193,7 @@ rl_sigwinch_handler (sig) rl_set_sighandler (SIGWINCH, rl_sigwinch_handler, &dummy_winch); #endif + RL_SETSTATE(RL_STATE_SIGHANDLER); rl_resize_terminal (); /* If another sigwinch handler has been installed, call it. */ @@ -206,6 +201,7 @@ rl_sigwinch_handler (sig) if (oh && oh != (SigHandler *)SIG_IGN && oh != (SigHandler *)SIG_DFL) (*oh) (sig); + RL_UNSETSTATE(RL_STATE_SIGHANDLER); SIGHANDLER_RETURN; } #endif /* SIGWINCH */ @@ -232,17 +228,25 @@ rl_set_sighandler (sig, handler, ohandler) SigHandler *handler; sighandler_cxt *ohandler; { + sighandler_cxt old_handler; #if defined (HAVE_POSIX_SIGNALS) struct sigaction act; act.sa_handler = handler; - act.sa_flags = 0; + act.sa_flags = 0; /* XXX - should we set SA_RESTART for SIGWINCH? */ sigemptyset (&act.sa_mask); sigemptyset (&ohandler->sa_mask); - sigaction (sig, &act, ohandler); + sigaction (sig, &act, &old_handler); #else - ohandler->sa_handler = (SigHandler *)signal (sig, handler); + old_handler.sa_handler = (SigHandler *)signal (sig, handler); #endif /* !HAVE_POSIX_SIGNALS */ + + /* XXX -- assume we have memcpy */ + /* If rl_set_signals is called twice in a row, don't set the old handler to + rl_signal_handler, because that would cause infinite recursion. */ + if (handler != rl_signal_handler || old_handler.sa_handler != rl_signal_handler) + memcpy (ohandler, &old_handler, sizeof (sighandler_cxt)); + return (ohandler->sa_handler); } @@ -360,7 +364,7 @@ rl_cleanup_after_signal () _rl_clean_up_for_exit (); (*rl_deprep_term_function) (); rl_clear_signals (); - rl_pending_input = 0; + rl_clear_pending_input (); } /* Reset the terminal and readline state after a signal handler returns. */ @@ -380,7 +384,7 @@ rl_free_line_state () { register HIST_ENTRY *entry; - free_undo_list (); + rl_free_undo_list (); entry = current_history (); if (entry) diff --git a/readline/tcap.h b/readline/tcap.h index acb2d76ab48..58ab894d93e 100644 --- a/readline/tcap.h +++ b/readline/tcap.h @@ -8,7 +8,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -19,7 +19,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_RLTCAP_H_) #define _RLTCAP_H_ diff --git a/readline/terminal.c b/readline/terminal.c index 1d2fead7768..c6f53e3a500 100644 --- a/readline/terminal.c +++ b/readline/terminal.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -46,9 +46,7 @@ # include #endif -#include #include -#include /* System-specific feature definitions and include files. */ #include "rldefs.h" @@ -64,18 +62,12 @@ #include "readline.h" #include "history.h" -/* Variables and functions imported from readline.c */ -extern FILE *_rl_in_stream, *_rl_out_stream; -extern int readline_echoing_p; -extern int _rl_bell_preference; -extern Keymap _rl_keymap; +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" -/* Functions imported from bind.c */ -extern void _rl_bind_if_unbound (); - -/* Functions imported from shell.c */ -extern void set_lines_and_columns (); -extern char *get_env_value (); +#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) +#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) /* **************************************************************** */ /* */ @@ -88,9 +80,6 @@ static char *term_string_buffer = (char *)NULL; static int tcap_initialized; -/* Non-zero means this terminal can't really do anything. */ -static int dumb_term; - #if !defined (__linux__) # if defined (__EMX__) || defined (NEED_EXTERN_PC) extern @@ -99,27 +88,36 @@ char PC, *BC, *UP; #endif /* __linux__ */ /* Some strings to control terminal actions. These are output by tputs (). */ -char *term_goto, *term_clreol, *term_clrpag, *term_backspace; -char *term_cr, *term_pc; +char *_rl_term_clreol; +char *_rl_term_clrpag; +char *_rl_term_cr; +char *_rl_term_backspace; +char *_rl_term_goto; +char *_rl_term_pc; /* Non-zero if we determine that the terminal can do character insertion. */ -int terminal_can_insert = 0; +int _rl_terminal_can_insert = 0; /* How to insert characters. */ -char *term_im, *term_ei, *term_ic, *term_ip, *term_IC; +char *_rl_term_im; +char *_rl_term_ei; +char *_rl_term_ic; +char *_rl_term_ip; +char *_rl_term_IC; /* How to delete characters. */ -char *term_dc, *term_DC; +char *_rl_term_dc; +char *_rl_term_DC; #if defined (HACK_TERMCAP_MOTION) -char *term_forward_char; +char *_rl_term_forward_char; #endif /* HACK_TERMCAP_MOTION */ /* How to go up a line. */ -char *term_up; +char *_rl_term_up; -/* A visible bell, if the terminal can be made to flash the screen. */ -static char *visible_bell; +/* A visible bell; char if the terminal can be made to flash the screen. */ +static char *_rl_visible_bell; /* Non-zero means the terminal can auto-wrap lines. */ int _rl_term_autowrap; @@ -128,20 +126,36 @@ int _rl_term_autowrap; static int term_has_meta; /* The sequences to write to turn on and off the meta key, if this - terminal has one. */ -static char *term_mm, *term_mo; + terminal has one. */ +static char *_rl_term_mm; +static char *_rl_term_mo; /* The key sequences output by the arrow keys, if this terminal has any. */ -static char *term_ku, *term_kd, *term_kr, *term_kl; +static char *_rl_term_ku; +static char *_rl_term_kd; +static char *_rl_term_kr; +static char *_rl_term_kl; /* How to initialize and reset the arrow keys, if this terminal has any. */ -static char *term_ks, *term_ke; +static char *_rl_term_ks; +static char *_rl_term_ke; /* The key sequences sent by the Home and End keys, if any. */ -static char *term_kh, *term_kH; +static char *_rl_term_kh; +static char *_rl_term_kH; +static char *_rl_term_at7; /* @7 */ + +/* Insert key */ +static char *_rl_term_kI; + +/* Cursor control */ +static char *_rl_term_vs; /* very visible */ +static char *_rl_term_ve; /* normal */ + +static void bind_termcap_arrow_keys PARAMS((Keymap)); /* Variables that hold the screen dimensions, used by the display code. */ -int screenwidth, screenheight, screenchars; +int _rl_screenwidth, _rl_screenheight, _rl_screenchars; /* Non-zero means the user wants to enable the keypad. */ int _rl_enable_keypad; @@ -149,6 +163,22 @@ int _rl_enable_keypad; /* Non-zero means the user wants to enable a meta key. */ int _rl_enable_meta = 1; +#if defined (__EMX__) +static void +_emx_get_screensize (swp, shp) + int *swp, *shp; +{ + int sz[2]; + + _scrsize (sz); + + if (swp) + *swp = sz[0]; + if (shp) + *shp = sz[1]; +} +#endif + /* Get readline's idea of the screen size. TTY is a file descriptor open to the terminal. If IGNORE_ENV is true, we do not pay attention to the values of $LINES and $COLUMNS. The tests for TERM_STRING_BUFFER being @@ -161,124 +191,148 @@ _rl_get_screen_size (tty, ignore_env) #if defined (TIOCGWINSZ) struct winsize window_size; #endif /* TIOCGWINSZ */ -#if defined (__EMX__) - int sz[2]; -#endif #if defined (TIOCGWINSZ) if (ioctl (tty, TIOCGWINSZ, &window_size) == 0) { - screenwidth = (int) window_size.ws_col; - screenheight = (int) window_size.ws_row; + _rl_screenwidth = (int) window_size.ws_col; + _rl_screenheight = (int) window_size.ws_row; } #endif /* TIOCGWINSZ */ #if defined (__EMX__) - _scrsize (sz); - screenwidth = sz[0]; - screenheight = sz[1]; + _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight); #endif /* Environment variable COLUMNS overrides setting of "co" if IGNORE_ENV is unset. */ - if (screenwidth <= 0) + if (_rl_screenwidth <= 0) { - if (ignore_env == 0 && (ss = get_env_value ("COLUMNS"))) - screenwidth = atoi (ss); + if (ignore_env == 0 && (ss = sh_get_env_value ("COLUMNS"))) + _rl_screenwidth = atoi (ss); - if (screenwidth <= 0 && term_string_buffer) - screenwidth = tgetnum ("co"); +#if !defined (__DJGPP__) + if (_rl_screenwidth <= 0 && term_string_buffer) + _rl_screenwidth = tgetnum ("co"); +#endif } /* Environment variable LINES overrides setting of "li" if IGNORE_ENV is unset. */ - if (screenheight <= 0) + if (_rl_screenheight <= 0) { - if (ignore_env == 0 && (ss = get_env_value ("LINES"))) - screenheight = atoi (ss); + if (ignore_env == 0 && (ss = sh_get_env_value ("LINES"))) + _rl_screenheight = atoi (ss); - if (screenheight <= 0 && term_string_buffer) - screenheight = tgetnum ("li"); +#if !defined (__DJGPP__) + if (_rl_screenheight <= 0 && term_string_buffer) + _rl_screenheight = tgetnum ("li"); +#endif } /* If all else fails, default to 80x24 terminal. */ - if (screenwidth <= 1) - screenwidth = 80; + if (_rl_screenwidth <= 1) + _rl_screenwidth = 80; - if (screenheight <= 0) - screenheight = 24; + if (_rl_screenheight <= 0) + _rl_screenheight = 24; /* If we're being compiled as part of bash, set the environment variables $LINES and $COLUMNS to new values. Otherwise, just do a pair of putenv () or setenv () calls. */ - set_lines_and_columns (screenheight, screenwidth); + sh_set_lines_and_columns (_rl_screenheight, _rl_screenwidth); - if (!_rl_term_autowrap) - screenwidth--; + if (_rl_term_autowrap == 0) + _rl_screenwidth--; - screenchars = screenwidth * screenheight; + _rl_screenchars = _rl_screenwidth * _rl_screenheight; } void _rl_set_screen_size (rows, cols) int rows, cols; { - screenheight = rows; - screenwidth = cols; + if (rows == 0 || cols == 0) + return; + + _rl_screenheight = rows; + _rl_screenwidth = cols; if (_rl_term_autowrap == 0) - screenwidth--; + _rl_screenwidth--; - screenchars = screenwidth * screenheight; + _rl_screenchars = _rl_screenwidth * _rl_screenheight; } -extern void _rl_redisplay_after_sigwinch(); +void +rl_set_screen_size (rows, cols) + int rows, cols; +{ + _rl_set_screen_size (rows, cols); +} +void +rl_get_screen_size (rows, cols) + int *rows, *cols; +{ + if (rows) + *rows = _rl_screenheight; + if (cols) + *cols = _rl_screenwidth; +} + void rl_resize_terminal () { if (readline_echoing_p) { _rl_get_screen_size (fileno (rl_instream), 1); - _rl_redisplay_after_sigwinch (); + if (CUSTOM_REDISPLAY_FUNC ()) + rl_forced_update_display (); + else + _rl_redisplay_after_sigwinch (); } } struct _tc_string { - const char *tc_var; - char **tc_value; + const char *tc_var; + char **tc_value; }; /* This should be kept sorted, just in case we decide to change the search algorithm to something smarter. */ static struct _tc_string tc_strings[] = { - {"DC", &term_DC}, - {"IC", &term_IC}, - {"ce", &term_clreol}, - {"cl", &term_clrpag}, - {"cr", &term_cr}, - {"dc", &term_dc}, - {"ei", &term_ei}, - {"ic", &term_ic}, - {"im", &term_im}, - {"kd", &term_kd}, - {"kh", &term_kh}, /* home */ - {"kH", &term_kH}, /* end */ - {"kl", &term_kl}, - {"kr", &term_kr}, - {"ku", &term_ku}, - {"ks", &term_ks}, - {"ke", &term_ke}, - {"le", &term_backspace}, - {"mm", &term_mm}, - {"mo", &term_mo}, + { "@7", &_rl_term_at7 }, + { "DC", &_rl_term_DC }, + { "IC", &_rl_term_IC }, + { "ce", &_rl_term_clreol }, + { "cl", &_rl_term_clrpag }, + { "cr", &_rl_term_cr }, + { "dc", &_rl_term_dc }, + { "ei", &_rl_term_ei }, + { "ic", &_rl_term_ic }, + { "im", &_rl_term_im }, + { "kH", &_rl_term_kH }, /* home down ?? */ + { "kI", &_rl_term_kI }, /* insert */ + { "kd", &_rl_term_kd }, + { "ke", &_rl_term_ke }, /* end keypad mode */ + { "kh", &_rl_term_kh }, /* home */ + { "kl", &_rl_term_kl }, + { "kr", &_rl_term_kr }, + { "ks", &_rl_term_ks }, /* start keypad mode */ + { "ku", &_rl_term_ku }, + { "le", &_rl_term_backspace }, + { "mm", &_rl_term_mm }, + { "mo", &_rl_term_mo }, #if defined (HACK_TERMCAP_MOTION) - {"nd", &term_forward_char}, + { "nd", &_rl_term_forward_char }, #endif - {"pc", &term_pc}, - {"up", &term_up}, - {"vb", &visible_bell}, + { "pc", &_rl_term_pc }, + { "up", &_rl_term_up }, + { "vb", &_rl_visible_bell }, + { "vs", &_rl_term_vs }, + { "ve", &_rl_term_ve }, }; #define NUM_TC_STRINGS (sizeof (tc_strings) / sizeof (struct _tc_string)) @@ -289,73 +343,99 @@ static void get_term_capabilities (bp) char **bp; { - register int i; +#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */ + register unsigned int i; - for (i = 0; i < (int) NUM_TC_STRINGS; i++) + for (i = 0; i < NUM_TC_STRINGS; i++) +# ifdef __LCC__ + *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp); +# else *(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp); +# endif +#endif tcap_initialized = 1; } int _rl_init_terminal_io (terminal_name) - char *terminal_name; + const char *terminal_name; { -#if defined (__GO32__) - screenwidth = ScreenCols (); - screenheight = ScreenRows (); - screenchars = screenwidth * screenheight; - term_cr = (char*) "\r"; - term_im = term_ei = term_ic = term_IC = (char *)NULL; - term_up = term_dc = term_DC = visible_bell = (char *)NULL; - - /* Does the __GO32__ have a meta key? I don't know. */ - term_has_meta = 0; - term_mm = term_mo = (char *)NULL; - - /* It probably has arrow keys, but I don't know what they are. */ - term_ku = term_kd = term_kr = term_kl = (char *)NULL; - -#if defined (HACK_TERMCAP_MOTION) - term_forward_char = (char *)NULL; -#endif /* HACK_TERMCAP_MOTION */ - terminal_can_insert = _rl_term_autowrap = 0; - return; -#else /* !__GO32__ */ - const char *term; char *buffer; - int tty; - Keymap xkeymap; + int tty, tgetent_ret; - term = terminal_name ? terminal_name : get_env_value ("TERM"); - - if (term_string_buffer == 0) - term_string_buffer = xmalloc (2032); - - if (term_buffer == 0) - term_buffer = xmalloc (4080); - - buffer = term_string_buffer; - - term_clrpag = term_cr = term_clreol = (char *)NULL; + term = terminal_name ? terminal_name : sh_get_env_value ("TERM"); + _rl_term_clrpag = _rl_term_cr = _rl_term_clreol = (char *)NULL; + tty = rl_instream ? fileno (rl_instream) : 0; + _rl_screenwidth = _rl_screenheight = 0; if (term == 0) term = "dumb"; - if (tgetent (term_buffer, term) <= 0) + /* I've separated this out for later work on not calling tgetent at all + if the calling application has supplied a custom redisplay function, + (and possibly if the application has supplied a custom input function). */ + if (CUSTOM_REDISPLAY_FUNC()) { - dumb_term = 1; - screenwidth = 79; - screenheight = 24; - screenchars = 79 * 24; - term_cr = (char*) "\r"; - term_im = term_ei = term_ic = term_IC = (char *)NULL; - term_up = term_dc = term_DC = visible_bell = (char *)NULL; - term_ku = term_kd = term_kl = term_kr = (char *)NULL; + tgetent_ret = -1; + } + else + { + if (term_string_buffer == 0) + term_string_buffer = (char *)xmalloc(2032); + + if (term_buffer == 0) + term_buffer = (char *)xmalloc(4080); + + buffer = term_string_buffer; + + tgetent_ret = tgetent (term_buffer, term); + } + + if (tgetent_ret <= 0) + { + FREE (term_string_buffer); + FREE (term_buffer); + buffer = term_buffer = term_string_buffer = (char *)NULL; + + _rl_term_autowrap = 0; /* used by _rl_get_screen_size */ + +#if defined (__EMX__) + _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight); + _rl_screenwidth--; +#else /* !__EMX__ */ + _rl_get_screen_size (tty, 0); +#endif /* !__EMX__ */ + + /* Defaults. */ + if (_rl_screenwidth <= 0 || _rl_screenheight <= 0) + { + _rl_screenwidth = 79; + _rl_screenheight = 24; + } + + /* Everything below here is used by the redisplay code (tputs). */ + _rl_screenchars = _rl_screenwidth * _rl_screenheight; + _rl_term_cr = (char*)"\r"; + _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL; + _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL; + _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL; + _rl_term_kh = _rl_term_kH = _rl_term_kI = (char *)NULL; + _rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL; + _rl_term_mm = _rl_term_mo = (char *)NULL; + _rl_term_ve = _rl_term_vs = (char *)NULL; #if defined (HACK_TERMCAP_MOTION) term_forward_char = (char *)NULL; #endif - terminal_can_insert = 0; + _rl_terminal_can_insert = term_has_meta = 0; + + /* Reasonable defaults for tgoto(). Readline currently only uses + tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we + change that later... */ + PC = '\0'; + BC = _rl_term_backspace = (char*)"\b"; + UP = _rl_term_up; + return 0; } @@ -363,16 +443,12 @@ _rl_init_terminal_io (terminal_name) /* Set up the variables that the termcap library expects the application to provide. */ - PC = term_pc ? *term_pc : 0; - BC = term_backspace; - UP = term_up; + PC = _rl_term_pc ? *_rl_term_pc : 0; + BC = _rl_term_backspace; + UP = _rl_term_up; - if (!term_cr) - term_cr = (char*) "\r"; - - tty = rl_instream ? fileno (rl_instream) : 0; - - screenwidth = screenheight = 0; + if (!_rl_term_cr) + _rl_term_cr = (char*)"\r"; _rl_term_autowrap = tgetflag ("am") && tgetflag ("xn"); @@ -382,53 +458,57 @@ _rl_init_terminal_io (terminal_name) character insertion if *any one of* the capabilities `IC', `im', `ic' or `ip' is provided." But we can't do anything if only `ip' is provided, so... */ - terminal_can_insert = (term_IC || term_im || term_ic); + _rl_terminal_can_insert = (_rl_term_IC || _rl_term_im || _rl_term_ic); /* Check to see if this terminal has a meta key and clear the capability variables if there is none. */ term_has_meta = (tgetflag ("km") || tgetflag ("MT")); if (!term_has_meta) - term_mm = term_mo = (char *)NULL; + _rl_term_mm = _rl_term_mo = (char *)NULL; /* Attempt to find and bind the arrow keys. Do not override already bound keys in an overzealous attempt, however. */ - xkeymap = _rl_keymap; - _rl_keymap = emacs_standard_keymap; - _rl_bind_if_unbound (term_ku, rl_get_previous_history); - _rl_bind_if_unbound (term_kd, rl_get_next_history); - _rl_bind_if_unbound (term_kr, rl_forward); - _rl_bind_if_unbound (term_kl, rl_backward); - - _rl_bind_if_unbound (term_kh, rl_beg_of_line); /* Home */ - _rl_bind_if_unbound (term_kH, rl_end_of_line); /* End */ + bind_termcap_arrow_keys (emacs_standard_keymap); #if defined (VI_MODE) - _rl_keymap = vi_movement_keymap; - _rl_bind_if_unbound (term_ku, rl_get_previous_history); - _rl_bind_if_unbound (term_kd, rl_get_next_history); - _rl_bind_if_unbound (term_kr, rl_forward); - _rl_bind_if_unbound (term_kl, rl_backward); - - _rl_bind_if_unbound (term_kh, rl_beg_of_line); /* Home */ - _rl_bind_if_unbound (term_kH, rl_end_of_line); /* End */ + bind_termcap_arrow_keys (vi_movement_keymap); + bind_termcap_arrow_keys (vi_insertion_keymap); #endif /* VI_MODE */ - _rl_keymap = xkeymap; - -#endif /* !__GO32__ */ return 0; } +/* Bind the arrow key sequences from the termcap description in MAP. */ +static void +bind_termcap_arrow_keys (map) + Keymap map; +{ + Keymap xkeymap; + + xkeymap = _rl_keymap; + _rl_keymap = map; + + _rl_bind_if_unbound (_rl_term_ku, rl_get_previous_history); + _rl_bind_if_unbound (_rl_term_kd, rl_get_next_history); + _rl_bind_if_unbound (_rl_term_kr, rl_forward); + _rl_bind_if_unbound (_rl_term_kl, rl_backward); + + _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ + _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line); /* End */ + + _rl_keymap = xkeymap; +} + char * rl_get_termcap (cap) - char *cap; + const char *cap; { - register int i; + register unsigned int i; if (tcap_initialized == 0) return ((char *)NULL); - for (i = 0; i < (int) NUM_TC_STRINGS; i++) + for (i = 0; i < NUM_TC_STRINGS; i++) { if (tc_strings[i].tc_var[0] == cap[0] && strcmp (tc_strings[i].tc_var, cap) == 0) return *(tc_strings[i].tc_value); @@ -440,7 +520,7 @@ rl_get_termcap (cap) has changed. */ int rl_reset_terminal (terminal_name) - char *terminal_name; + const char *terminal_name; { _rl_init_terminal_io (terminal_name); return 0; @@ -462,10 +542,11 @@ _rl_output_character_function (c) return putc (c, _rl_out_stream); } #endif /* !_MINIX */ + /* Write COUNT characters from STRING to the output stream. */ void _rl_output_some_chars (string, count) - char *string; + const char *string; int count; { fwrite (string, 1, count, _rl_out_stream); @@ -478,12 +559,10 @@ _rl_backspace (count) { register int i; -#if !defined (__GO32__) - if (term_backspace) + if (_rl_term_backspace) for (i = 0; i < count; i++) - tputs (term_backspace, 1, _rl_output_character_function); + tputs (_rl_term_backspace, 1, _rl_output_character_function); else -#endif /* !__GO32__ */ for (i = 0; i < count; i++) putc ('\b', _rl_out_stream); return 0; @@ -491,11 +570,11 @@ _rl_backspace (count) /* Move to the start of the next line. */ int -crlf () +rl_crlf () { #if defined (NEW_TTY_DRIVER) - if (term_cr) - tputs (term_cr, 1, _rl_output_character_function); + if (_rl_term_cr) + tputs (_rl_term_cr, 1, _rl_output_character_function); #endif /* NEW_TTY_DRIVER */ putc ('\n', _rl_out_stream); return 0; @@ -503,20 +582,19 @@ crlf () /* Ring the terminal bell. */ int -ding () +rl_ding () { if (readline_echoing_p) { -#if !defined (__GO32__) switch (_rl_bell_preference) { case NO_BELL: default: break; case VISIBLE_BELL: - if (visible_bell) + if (_rl_visible_bell) { - tputs (visible_bell, 1, _rl_output_character_function); + tputs (_rl_visible_bell, 1, _rl_output_character_function); break; } /* FALLTHROUGH */ @@ -525,10 +603,6 @@ ding () fflush (stderr); break; } -#else /* __GO32__ */ - fprintf (stderr, "\007"); - fflush (stderr); -#endif /* __GO32__ */ return (0); } return (-1); @@ -543,16 +617,46 @@ ding () void _rl_enable_meta_key () { - if (term_has_meta && term_mm) - tputs (term_mm, 1, _rl_output_character_function); +#if !defined (__DJGPP__) + if (term_has_meta && _rl_term_mm) + tputs (_rl_term_mm, 1, _rl_output_character_function); +#endif } void _rl_control_keypad (on) int on; { - if (on && term_ks) - tputs (term_ks, 1, _rl_output_character_function); - else if (!on && term_ke) - tputs (term_ke, 1, _rl_output_character_function); +#if !defined (__DJGPP__) + if (on && _rl_term_ks) + tputs (_rl_term_ks, 1, _rl_output_character_function); + else if (!on && _rl_term_ke) + tputs (_rl_term_ke, 1, _rl_output_character_function); +#endif +} + +/* **************************************************************** */ +/* */ +/* Controlling the Cursor */ +/* */ +/* **************************************************************** */ + +/* Set the cursor appropriately depending on IM, which is one of the + insert modes (insert or overwrite). Insert mode gets the normal + cursor. Overwrite mode gets a very visible cursor. Only does + anything if we have both capabilities. */ +void +_rl_set_cursor (im, force) + int im, force; +{ + if (_rl_term_ve && _rl_term_vs) + { + if (force || im != rl_insert_mode) + { + if (im == RL_IM_OVERWRITE) + tputs (_rl_term_vs, 1, _rl_output_character_function); + else + tputs (_rl_term_ve, 1, _rl_output_character_function); + } + } } diff --git a/readline/text.c b/readline/text.c new file mode 100644 index 00000000000..f84fd91344f --- /dev/null +++ b/readline/text.c @@ -0,0 +1,1540 @@ +/* text.c -- text handling commands for readline. */ + +/* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ +#define READLINE_LIBRARY + +#if defined (HAVE_CONFIG_H) +# include +#endif + +#if defined (HAVE_UNISTD_H) +# include +#endif /* HAVE_UNISTD_H */ + +#if defined (HAVE_STDLIB_H) +# include +#else +# include "ansi_stdlib.h" +#endif /* HAVE_STDLIB_H */ + +#if defined (HAVE_LOCALE_H) +# include +#endif + +#include + +/* System-specific feature definitions and include files. */ +#include "rldefs.h" +#include "rlmbutil.h" + +#if defined (__EMX__) +# define INCL_DOSPROCESS +# include +#endif /* __EMX__ */ + +/* Some standard library routines. */ +#include "readline.h" +#include "history.h" + +#include "rlprivate.h" +#include "rlshell.h" +#include "xmalloc.h" + +/* Forward declarations. */ +static int rl_change_case PARAMS((int, int)); +static int _rl_char_search PARAMS((int, int, int)); + +/* **************************************************************** */ +/* */ +/* Insert and Delete */ +/* */ +/* **************************************************************** */ + +/* Insert a string of text into the line at point. This is the only + way that you should do insertion. _rl_insert_char () calls this + function. Returns the number of characters inserted. */ +int +rl_insert_text (string) + const char *string; +{ + register int i, l; + + l = (string && *string) ? strlen (string) : 0; + if (l == 0) + return 0; + + if (rl_end + l >= rl_line_buffer_len) + rl_extend_line_buffer (rl_end + l); + + for (i = rl_end; i >= rl_point; i--) + rl_line_buffer[i + l] = rl_line_buffer[i]; + strncpy (rl_line_buffer + rl_point, string, l); + + /* Remember how to undo this if we aren't undoing something. */ + if (_rl_doing_an_undo == 0) + { + /* If possible and desirable, concatenate the undos. */ + if ((l == 1) && + rl_undo_list && + (rl_undo_list->what == UNDO_INSERT) && + (rl_undo_list->end == rl_point) && + (rl_undo_list->end - rl_undo_list->start < 20)) + rl_undo_list->end++; + else + rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL); + } + rl_point += l; + rl_end += l; + rl_line_buffer[rl_end] = '\0'; + return l; +} + +/* Delete the string between FROM and TO. FROM is inclusive, TO is not. + Returns the number of characters deleted. */ +int +rl_delete_text (from, to) + int from, to; +{ + register char *text; + register int diff, i; + + /* Fix it if the caller is confused. */ + if (from > to) + SWAP (from, to); + + /* fix boundaries */ + if (to > rl_end) + { + to = rl_end; + if (from > to) + from = to; + } + if (from < 0) + from = 0; + + text = rl_copy_text (from, to); + + /* Some versions of strncpy() can't handle overlapping arguments. */ + diff = to - from; + for (i = from; i < rl_end - diff; i++) + rl_line_buffer[i] = rl_line_buffer[i + diff]; + + /* Remember how to undo this delete. */ + if (_rl_doing_an_undo == 0) + rl_add_undo (UNDO_DELETE, from, to, text); + else + free (text); + + rl_end -= diff; + rl_line_buffer[rl_end] = '\0'; + return (diff); +} + +/* Fix up point so that it is within the line boundaries after killing + text. If FIX_MARK_TOO is non-zero, the mark is forced within line + boundaries also. */ + +#define _RL_FIX_POINT(x) \ + do { \ + if (x > rl_end) \ + x = rl_end; \ + else if (x < 0) \ + x = 0; \ + } while (0) + +void +_rl_fix_point (fix_mark_too) + int fix_mark_too; +{ + _RL_FIX_POINT (rl_point); + if (fix_mark_too) + _RL_FIX_POINT (rl_mark); +} +#undef _RL_FIX_POINT + +int +_rl_replace_text (text, start, end) + const char *text; + int start, end; +{ + int n; + + rl_begin_undo_group (); + rl_delete_text (start, end + 1); + rl_point = start; + n = rl_insert_text (text); + rl_end_undo_group (); + + return n; +} + +/* Replace the current line buffer contents with TEXT. If CLEAR_UNDO is + non-zero, we free the current undo list. */ +void +rl_replace_line (text, clear_undo) + const char *text; + int clear_undo; +{ + int len; + + len = strlen (text); + if (len >= rl_line_buffer_len) + rl_extend_line_buffer (len); + strcpy (rl_line_buffer, text); + rl_end = len; + + if (clear_undo) + rl_free_undo_list (); + + _rl_fix_point (1); +} + +/* **************************************************************** */ +/* */ +/* Readline character functions */ +/* */ +/* **************************************************************** */ + +/* This is not a gap editor, just a stupid line input routine. No hair + is involved in writing any of the functions, and none should be. */ + +/* Note that: + + rl_end is the place in the string that we would place '\0'; + i.e., it is always safe to place '\0' there. + + rl_point is the place in the string where the cursor is. Sometimes + this is the same as rl_end. + + Any command that is called interactively receives two arguments. + The first is a count: the numeric arg pased to this command. + The second is the key which invoked this command. +*/ + +/* **************************************************************** */ +/* */ +/* Movement Commands */ +/* */ +/* **************************************************************** */ + +/* Note that if you `optimize' the display for these functions, you cannot + use said functions in other functions which do not do optimizing display. + I.e., you will have to update the data base for rl_redisplay, and you + might as well let rl_redisplay do that job. */ + +/* Move forward COUNT bytes. */ +int +rl_forward_byte (count, key) + int count, key; +{ + if (count < 0) + return (rl_backward_byte (-count, key)); + + if (count > 0) + { + int end = rl_point + count; +#if defined (VI_MODE) + int lend = rl_end > 0 ? rl_end - (rl_editing_mode == vi_mode) : rl_end; +#else + int lend = rl_end; +#endif + + if (end > lend) + { + rl_point = lend; + rl_ding (); + } + else + rl_point = end; + } + + if (rl_end < 0) + rl_end = 0; + + return 0; +} + +#if defined (HANDLE_MULTIBYTE) +/* Move forward COUNT characters. */ +int +rl_forward_char (count, key) + int count, key; +{ + int point; + + if (MB_CUR_MAX == 1 || rl_byte_oriented) + return (rl_forward_byte (count, key)); + + if (count < 0) + return (rl_backward_char (-count, key)); + + if (count > 0) + { + point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); + +#if defined (VI_MODE) + if (rl_end <= point && rl_editing_mode == vi_mode) + point = _rl_find_prev_mbchar (rl_line_buffer, rl_end, MB_FIND_NONZERO); +#endif + + if (rl_point == point) + rl_ding (); + + rl_point = point; + + if (rl_end < 0) + rl_end = 0; + } + + return 0; +} +#else /* !HANDLE_MULTIBYTE */ +int +rl_forward_char (count, key) + int count, key; +{ + return (rl_forward_byte (count, key)); +} +#endif /* !HANDLE_MULTIBYTE */ + +/* Backwards compatibility. */ +int +rl_forward (count, key) + int count, key; +{ + return (rl_forward_char (count, key)); +} + +/* Move backward COUNT bytes. */ +int +rl_backward_byte (count, key) + int count, key; +{ + if (count < 0) + return (rl_forward_byte (-count, key)); + + if (count > 0) + { + if (rl_point < count) + { + rl_point = 0; + rl_ding (); + } + else + rl_point -= count; + } + + if (rl_point < 0) + rl_point = 0; + + return 0; +} + +#if defined (HANDLE_MULTIBYTE) +/* Move backward COUNT characters. */ +int +rl_backward_char (count, key) + int count, key; +{ + int point; + + if (MB_CUR_MAX == 1 || rl_byte_oriented) + return (rl_backward_byte (count, key)); + + if (count < 0) + return (rl_forward_char (-count, key)); + + if (count > 0) + { + point = rl_point; + + while (count > 0 && point > 0) + { + point = _rl_find_prev_mbchar (rl_line_buffer, point, MB_FIND_NONZERO); + count--; + } + if (count > 0) + { + rl_point = 0; + rl_ding (); + } + else + rl_point = point; + } + + return 0; +} +#else +int +rl_backward_char (count, key) + int count, key; +{ + return (rl_backward_byte (count, key)); +} +#endif + +/* Backwards compatibility. */ +int +rl_backward (count, key) + int count, key; +{ + return (rl_backward_char (count, key)); +} + +/* Move to the beginning of the line. */ +int +rl_beg_of_line (count, key) + int count __attribute__((unused)), key __attribute__((unused)); +{ + rl_point = 0; + return 0; +} + +/* Move to the end of the line. */ +int +rl_end_of_line (count, key) + int count __attribute__((unused)), key __attribute__((unused)); +{ + rl_point = rl_end; + return 0; +} + +/* XXX - these might need changes for multibyte characters */ +/* Move forward a word. We do what Emacs does. */ +int +rl_forward_word (count, key) + int count, key; +{ + int c; + + if (count < 0) + return (rl_backward_word (-count, key)); + + while (count) + { + if (rl_point == rl_end) + return 0; + + /* If we are not in a word, move forward until we are in one. + Then, move forward until we hit a non-alphabetic character. */ + c = rl_line_buffer[rl_point]; + if (rl_alphabetic (c) == 0) + { + while (++rl_point < rl_end) + { + c = rl_line_buffer[rl_point]; + if (rl_alphabetic (c)) + break; + } + } + + if (rl_point == rl_end) + return 0; + + while (++rl_point < rl_end) + { + c = rl_line_buffer[rl_point]; + if (rl_alphabetic (c) == 0) + break; + } + --count; + } + + return 0; +} + +/* Move backward a word. We do what Emacs does. */ +int +rl_backward_word (count, key) + int count, key; +{ + int c; + + if (count < 0) + return (rl_forward_word (-count, key)); + + while (count) + { + if (!rl_point) + return 0; + + /* Like rl_forward_word (), except that we look at the characters + just before point. */ + + c = rl_line_buffer[rl_point - 1]; + if (rl_alphabetic (c) == 0) + { + while (--rl_point) + { + c = rl_line_buffer[rl_point - 1]; + if (rl_alphabetic (c)) + break; + } + } + + while (rl_point) + { + c = rl_line_buffer[rl_point - 1]; + if (rl_alphabetic (c) == 0) + break; + else + --rl_point; + } + + --count; + } + + return 0; +} + +/* Clear the current line. Numeric argument to C-l does this. */ +int +rl_refresh_line (ignore1, ignore2) + int ignore1 __attribute__((unused)), ignore2 __attribute__((unused)); +{ + int curr_line; + + curr_line = _rl_current_display_line (); + + _rl_move_vert (curr_line); + _rl_move_cursor_relative (0, rl_line_buffer); /* XXX is this right */ + + _rl_clear_to_eol (0); /* arg of 0 means to not use spaces */ + + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; +} + +/* C-l typed to a line without quoting clears the screen, and then reprints + the prompt and the current input line. Given a numeric arg, redraw only + the current line. */ +int +rl_clear_screen (count, key) + int count, key; +{ + if (rl_explicit_arg) + { + rl_refresh_line (count, key); + return 0; + } + + _rl_clear_screen (); /* calls termcap function to clear screen */ + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; +} + +int +rl_arrow_keys (count, c) + int count, c __attribute__((unused)); +{ + int ch; + + RL_SETSTATE(RL_STATE_MOREINPUT); + ch = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + switch (_rl_to_upper (ch)) + { + case 'A': + rl_get_previous_history (count, ch); + break; + + case 'B': + rl_get_next_history (count, ch); + break; + + case 'C': + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_forward_char (count, ch); + else + rl_forward_byte (count, ch); + break; + + case 'D': + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_backward_char (count, ch); + else + rl_backward_byte (count, ch); + break; + + default: + rl_ding (); + } + + return 0; +} + +/* **************************************************************** */ +/* */ +/* Text commands */ +/* */ +/* **************************************************************** */ + +#ifdef HANDLE_MULTIBYTE +static char pending_bytes[MB_LEN_MAX]; +static int pending_bytes_length = 0; +static mbstate_t ps = {0}; +#endif + +/* Insert the character C at the current location, moving point forward. + If C introduces a multibyte sequence, we read the whole sequence and + then insert the multibyte char into the line buffer. */ +int +_rl_insert_char (count, c) + int count, c; +{ + register int i; + char *string; +#ifdef HANDLE_MULTIBYTE + int string_size; + char incoming[MB_LEN_MAX + 1]; + int incoming_length = 0; + mbstate_t ps_back; + static int stored_count = 0; +#endif + + if (count <= 0) + return 0; + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + incoming[0] = c; + incoming[1] = '\0'; + incoming_length = 1; + } + else + { + wchar_t wc; + size_t ret; + + if (stored_count <= 0) + stored_count = count; + else + count = stored_count; + + ps_back = ps; + pending_bytes[pending_bytes_length++] = c; + ret = mbrtowc (&wc, pending_bytes, pending_bytes_length, &ps); + + if (ret == (size_t)-2) + { + /* Bytes too short to compose character, try to wait for next byte. + Restore the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + ps = ps_back; + return 1; + } + else if (ret == (size_t)-1) + { + /* Invalid byte sequence for the current locale. Treat first byte + as a single character. */ + incoming[0] = pending_bytes[0]; + incoming[1] = '\0'; + incoming_length = 1; + pending_bytes_length--; + memmove (pending_bytes, pending_bytes + 1, pending_bytes_length); + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (ret == (size_t)0) + { + incoming[0] = '\0'; + incoming_length = 0; + pending_bytes_length--; + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else + { + /* We successfully read a single multibyte character. */ + memcpy (incoming, pending_bytes, pending_bytes_length); + incoming[pending_bytes_length] = '\0'; + incoming_length = pending_bytes_length; + pending_bytes_length = 0; + } + } +#endif /* HANDLE_MULTIBYTE */ + + /* If we can optimize, then do it. But don't let people crash + readline because of extra large arguments. */ + if (count > 1 && count <= 1024) + { +#if defined (HANDLE_MULTIBYTE) + string_size = count * incoming_length; + string = (char *)xmalloc (1 + string_size); + + i = 0; + while (i < string_size) + { + strncpy (string + i, incoming, incoming_length); + i += incoming_length; + } + incoming_length = 0; + stored_count = 0; +#else /* !HANDLE_MULTIBYTE */ + string = (char *)xmalloc (1 + count); + + for (i = 0; i < count; i++) + string[i] = c; +#endif /* !HANDLE_MULTIBYTE */ + + string[i] = '\0'; + rl_insert_text (string); + free (string); + + return 0; + } + + if (count > 1024) + { + int decreaser; +#if defined (HANDLE_MULTIBYTE) + string_size = incoming_length * 1024; + string = (char *)xmalloc (1 + string_size); + + i = 0; + while (i < string_size) + { + strncpy (string + i, incoming, incoming_length); + i += incoming_length; + } + + while (count) + { + decreaser = (count > 1024) ? 1024 : count; + string[decreaser*incoming_length] = '\0'; + rl_insert_text (string); + count -= decreaser; + } + + free (string); + incoming_length = 0; + stored_count = 0; +#else /* !HANDLE_MULTIBYTE */ + char str[1024+1]; + + for (i = 0; i < 1024; i++) + str[i] = c; + + while (count) + { + decreaser = (count > 1024 ? 1024 : count); + str[decreaser] = '\0'; + rl_insert_text (str); + count -= decreaser; + } +#endif /* !HANDLE_MULTIBYTE */ + + return 0; + } + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { +#endif + /* We are inserting a single character. + If there is pending input, then make a string of all of the + pending characters that are bound to rl_insert, and insert + them all. */ + if (_rl_any_typein ()) + _rl_insert_typein (c); + else + { + /* Inserting a single character. */ + char str[2]; + + str[1] = '\0'; + str[0] = c; + rl_insert_text (str); + } +#if defined (HANDLE_MULTIBYTE) + } + else + { + rl_insert_text (incoming); + stored_count = 0; + } +#endif + + return 0; +} + +/* Overwrite the character at point (or next COUNT characters) with C. + If C introduces a multibyte character sequence, read the entire sequence + before starting the overwrite loop. */ +int +_rl_overwrite_char (count, c) + int count, c; +{ + int i; +#if defined (HANDLE_MULTIBYTE) + char mbkey[MB_LEN_MAX]; + int k; + + /* Read an entire multibyte character sequence to insert COUNT times. */ + if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0) + k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX); +#endif + + for (i = 0; i < count; i++) + { + rl_begin_undo_group (); + + if (rl_point < rl_end) + rl_delete (1, c); + +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_insert_text (mbkey); + else +#endif + _rl_insert_char (1, c); + + rl_end_undo_group (); + } + + return 0; +} + +int +rl_insert (count, c) + int count, c; +{ + return (rl_insert_mode == RL_IM_INSERT ? _rl_insert_char (count, c) + : _rl_overwrite_char (count, c)); +} + +/* Insert the next typed character verbatim. */ +int +rl_quoted_insert (count, key) + int count, key __attribute__((unused)); +{ + int c; + +#if defined (HANDLE_SIGNALS) + _rl_disable_tty_signals (); +#endif + + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + +#if defined (HANDLE_SIGNALS) + _rl_restore_tty_signals (); +#endif + + return (_rl_insert_char (count, c)); +} + +/* Insert a tab character. */ +int +rl_tab_insert (count, key) + int count, key __attribute__((unused)); +{ + return (_rl_insert_char (count, '\t')); +} + +/* What to do when a NEWLINE is pressed. We accept the whole line. + KEY is the key that invoked this command. I guess it could have + meaning in the future. */ +int +rl_newline (count, key) + int count __attribute__((unused)), key __attribute__((unused)); +{ + rl_done = 1; + + if (_rl_history_preserve_point) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + RL_SETSTATE(RL_STATE_DONE); + +#if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + { + _rl_vi_done_inserting (); + _rl_vi_reset_last (); + } +#endif /* VI_MODE */ + + /* If we've been asked to erase empty lines, suppress the final update, + since _rl_update_final calls rl_crlf(). */ + if (rl_erase_empty_line && rl_point == 0 && rl_end == 0) + return 0; + + if (readline_echoing_p) + _rl_update_final (); + return 0; +} + +/* What to do for some uppercase characters, like meta characters, + and some characters appearing in emacs_ctlx_keymap. This function + is just a stub, you bind keys to it and the code in _rl_dispatch () + is special cased. */ +int +rl_do_lowercase_version (ignore1, ignore2) + int ignore1 __attribute__((unused)), ignore2 __attribute__((unused)); +{ + return 0; +} + +/* This is different from what vi does, so the code's not shared. Emacs + rubout in overwrite mode has one oddity: it replaces a control + character that's displayed as two characters (^X) with two spaces. */ +int +_rl_overwrite_rubout (count, key) + int count, key; +{ + int opoint; + int i, l; + + if (rl_point == 0) + { + rl_ding (); + return 1; + } + + opoint = rl_point; + + /* L == number of spaces to insert */ + for (i = l = 0; i < count; i++) + { + rl_backward_char (1, key); + l += rl_character_len (rl_line_buffer[rl_point], rl_point); /* not exactly right */ + } + + rl_begin_undo_group (); + + if (count > 1 || rl_explicit_arg) + rl_kill_text (opoint, rl_point); + else + rl_delete_text (opoint, rl_point); + + /* Emacs puts point at the beginning of the sequence of spaces. */ + opoint = rl_point; + _rl_insert_char (l, ' '); + rl_point = opoint; + + rl_end_undo_group (); + + return 0; +} + +/* Rubout the character behind point. */ +int +rl_rubout (count, key) + int count, key; +{ + if (count < 0) + return (rl_delete (-count, key)); + + if (!rl_point) + { + rl_ding (); + return -1; + } + + if (rl_insert_mode == RL_IM_OVERWRITE) + return (_rl_overwrite_rubout (count, key)); + + return (_rl_rubout_char (count, key)); +} + +int +_rl_rubout_char (count, key) + int count, key; +{ + int orig_point; + unsigned char c; + + /* Duplicated code because this is called from other parts of the library. */ + if (count < 0) + return (rl_delete (-count, key)); + + if (rl_point == 0) + { + rl_ding (); + return -1; + } + + if (count > 1 || rl_explicit_arg) + { + orig_point = rl_point; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_backward_char (count, key); + else +#endif + rl_backward_byte (count, key); + rl_kill_text (orig_point, rl_point); + } + else + { +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { +#endif + c = rl_line_buffer[--rl_point]; + rl_delete_text (rl_point, rl_point + 1); +#if defined (HANDLE_MULTIBYTE) + } + else + { + int orig_point; + + orig_point = rl_point; + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + c = rl_line_buffer[rl_point]; + rl_delete_text (rl_point, orig_point); + } +#endif /* HANDLE_MULTIBYTE */ + + /* I don't think that the hack for end of line is needed for + multibyte chars. */ +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) +#endif + if (rl_point == rl_end && ISPRINT (c) && _rl_last_c_pos) + { + int l; + l = rl_character_len (c, rl_point); + _rl_erase_at_end_of_line (l); + } + } + + return 0; +} + +/* Delete the character under the cursor. Given a numeric argument, + kill that many characters instead. */ +int +rl_delete (count, key) + int count, key; +{ + int r; + + if (count < 0) + return (_rl_rubout_char (-count, key)); + + if (rl_point == rl_end) + { + rl_ding (); + return -1; + } + + if (count > 1 || rl_explicit_arg) + { + int orig_point = rl_point; +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_forward_char (count, key); + else +#endif + rl_forward_byte (count, key); + + r = rl_kill_text (orig_point, rl_point); + rl_point = orig_point; + return r; + } + else + { + int new_point; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + new_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + else + new_point = rl_point + 1; + + return (rl_delete_text (rl_point, new_point)); + } +} + +/* Delete the character under the cursor, unless the insertion + point is at the end of the line, in which case the character + behind the cursor is deleted. COUNT is obeyed and may be used + to delete forward or backward that many characters. */ +int +rl_rubout_or_delete (count, key) + int count, key; +{ + if (rl_end != 0 && rl_point == rl_end) + return (_rl_rubout_char (count, key)); + else + return (rl_delete (count, key)); +} + +/* Delete all spaces and tabs around point. */ +int +rl_delete_horizontal_space (count, ignore) + int count __attribute__((unused)), ignore __attribute__((unused)); +{ + int start = rl_point; + + while (rl_point && whitespace (rl_line_buffer[rl_point - 1])) + rl_point--; + + start = rl_point; + + while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) + rl_point++; + + if (start != rl_point) + { + rl_delete_text (start, rl_point); + rl_point = start; + } + return 0; +} + +/* Like the tcsh editing function delete-char-or-list. The eof character + is caught before this is invoked, so this really does the same thing as + delete-char-or-list-or-eof, as long as it's bound to the eof character. */ +int +rl_delete_or_show_completions (count, key) + int count, key; +{ + if (rl_end != 0 && rl_point == rl_end) + return (rl_possible_completions (count, key)); + else + return (rl_delete (count, key)); +} + +#ifndef RL_COMMENT_BEGIN_DEFAULT +#define RL_COMMENT_BEGIN_DEFAULT "#" +#endif + +/* Turn the current line into a comment in shell history. + A K*rn shell style function. */ +int +rl_insert_comment (count, key) + int count __attribute__((unused)), key; +{ + char *rl_comment_text; + int rl_comment_len; + + rl_beg_of_line (1, key); + rl_comment_text = (char*)(_rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); + + if (rl_explicit_arg == 0) + rl_insert_text (rl_comment_text); + else + { + rl_comment_len = strlen (rl_comment_text); + if (STREQN (rl_comment_text, rl_line_buffer, rl_comment_len)) + rl_delete_text (rl_point, rl_point + rl_comment_len); + else + rl_insert_text (rl_comment_text); + } + + (*rl_redisplay_function) (); + rl_newline (1, '\n'); + + return (0); +} + +/* **************************************************************** */ +/* */ +/* Changing Case */ +/* */ +/* **************************************************************** */ + +/* The three kinds of things that we know how to do. */ +#define UpCase 1 +#define DownCase 2 +#define CapCase 3 + +/* Uppercase the word at point. */ +int +rl_upcase_word (count, key) + int count, key __attribute__((unused)); +{ + return (rl_change_case (count, UpCase)); +} + +/* Lowercase the word at point. */ +int +rl_downcase_word (count, key) + int count, key __attribute__((unused)); +{ + return (rl_change_case (count, DownCase)); +} + +/* Upcase the first letter, downcase the rest. */ +int +rl_capitalize_word (count, key) + int count, key __attribute__((unused)); +{ + return (rl_change_case (count, CapCase)); +} + +/* The meaty function. + Change the case of COUNT words, performing OP on them. + OP is one of UpCase, DownCase, or CapCase. + If a negative argument is given, leave point where it started, + otherwise, leave it where it moves to. */ +static int +rl_change_case (count, op) + int count, op; +{ + register int start, end; + int inword, c; + + start = rl_point; + rl_forward_word (count, 0); + end = rl_point; + + if (count < 0) + SWAP (start, end); + + /* We are going to modify some text, so let's prepare to undo it. */ + rl_modifying (start, end); + + for (inword = 0; start < end; start++) + { + c = rl_line_buffer[start]; + switch (op) + { + case UpCase: + rl_line_buffer[start] = _rl_to_upper (c); + break; + + case DownCase: + rl_line_buffer[start] = _rl_to_lower (c); + break; + + case CapCase: + rl_line_buffer[start] = (inword == 0) ? _rl_to_upper (c) : _rl_to_lower (c); + inword = rl_alphabetic (rl_line_buffer[start]); + break; + + default: + rl_ding (); + return -1; + } + } + rl_point = end; + return 0; +} + +/* **************************************************************** */ +/* */ +/* Transposition */ +/* */ +/* **************************************************************** */ + +/* Transpose the words at point. If point is at the end of the line, + transpose the two words before point. */ +int +rl_transpose_words (count, key) + int count, key; +{ + char *word1, *word2; + int w1_beg, w1_end, w2_beg, w2_end; + int orig_point = rl_point; + + if (!count) + return 0; + + /* Find the two words. */ + rl_forward_word (count, key); + w2_end = rl_point; + rl_backward_word (1, key); + w2_beg = rl_point; + rl_backward_word (count, key); + w1_beg = rl_point; + rl_forward_word (1, key); + w1_end = rl_point; + + /* Do some check to make sure that there really are two words. */ + if ((w1_beg == w2_beg) || (w2_beg < w1_end)) + { + rl_ding (); + rl_point = orig_point; + return -1; + } + + /* Get the text of the words. */ + word1 = rl_copy_text (w1_beg, w1_end); + word2 = rl_copy_text (w2_beg, w2_end); + + /* We are about to do many insertions and deletions. Remember them + as one operation. */ + rl_begin_undo_group (); + + /* Do the stuff at word2 first, so that we don't have to worry + about word1 moving. */ + rl_point = w2_beg; + rl_delete_text (w2_beg, w2_end); + rl_insert_text (word1); + + rl_point = w1_beg; + rl_delete_text (w1_beg, w1_end); + rl_insert_text (word2); + + /* This is exactly correct since the text before this point has not + changed in length. */ + rl_point = w2_end; + + /* I think that does it. */ + rl_end_undo_group (); + free (word1); + free (word2); + + return 0; +} + +/* Transpose the characters at point. If point is at the end of the line, + then transpose the characters before point. */ +int +rl_transpose_chars (count, key) + int count, key __attribute__((unused)); +{ +#if defined (HANDLE_MULTIBYTE) + char *dummy; + int i, prev_point; +#else + char dummy[2]; +#endif + int char_length; + + if (count == 0) + return 0; + + if (!rl_point || rl_end < 2) + { + rl_ding (); + return -1; + } + + rl_begin_undo_group (); + + if (rl_point == rl_end) + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + else + --rl_point; + count = 1; + } + +#if defined (HANDLE_MULTIBYTE) + prev_point = rl_point; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + else +#endif + rl_point--; + +#if defined (HANDLE_MULTIBYTE) + char_length = prev_point - rl_point; + dummy = (char *)xmalloc (char_length + 1); + for (i = 0; i < char_length; i++) + dummy[i] = rl_line_buffer[rl_point + i]; + dummy[i] = '\0'; +#else + dummy[0] = rl_line_buffer[rl_point]; + dummy[char_length = 1] = '\0'; +#endif + + rl_delete_text (rl_point, rl_point + char_length); + + rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); + + _rl_fix_point (0); + rl_insert_text (dummy); + rl_end_undo_group (); + +#if defined (HANDLE_MULTIBYTE) + free (dummy); +#endif + + return 0; +} + +/* **************************************************************** */ +/* */ +/* Character Searching */ +/* */ +/* **************************************************************** */ + +int +#if defined (HANDLE_MULTIBYTE) +_rl_char_search_internal (count, dir, smbchar, len) + int count, dir; + char *smbchar; + int len; +#else +_rl_char_search_internal (count, dir, schar) + int count, dir, schar; +#endif +{ + int pos, inc; +#if defined (HANDLE_MULTIBYTE) + int prepos; +#endif + + pos = rl_point; + inc = (dir < 0) ? -1 : 1; + while (count) + { + if ((dir < 0 && pos <= 0) || (dir > 0 && pos >= rl_end)) + { + rl_ding (); + return -1; + } + +#if defined (HANDLE_MULTIBYTE) + pos = (inc > 0) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY) + : _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); +#else + pos += inc; +#endif + do + { +#if defined (HANDLE_MULTIBYTE) + if (_rl_is_mbchar_matched (rl_line_buffer, pos, rl_end, smbchar, len)) +#else + if (rl_line_buffer[pos] == schar) +#endif + { + count--; + if (dir < 0) + rl_point = (dir == BTO) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY) + : pos; + else + rl_point = (dir == FTO) ? _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY) + : pos; + break; + } +#if defined (HANDLE_MULTIBYTE) + prepos = pos; +#endif + } +#if defined (HANDLE_MULTIBYTE) + while ((dir < 0) ? (pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY)) != prepos + : (pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY)) != prepos); +#else + while ((dir < 0) ? pos-- : ++pos < rl_end); +#endif + } + return (0); +} + +/* Search COUNT times for a character read from the current input stream. + FDIR is the direction to search if COUNT is non-negative; otherwise + the search goes in BDIR. So much is dependent on HANDLE_MULTIBYTE + that there are two separate versions of this function. */ +#if defined (HANDLE_MULTIBYTE) +static int +_rl_char_search (count, fdir, bdir) + int count, fdir, bdir; +{ + char mbchar[MB_LEN_MAX]; + int mb_len; + + mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX); + + if (count < 0) + return (_rl_char_search_internal (-count, bdir, mbchar, mb_len)); + else + return (_rl_char_search_internal (count, fdir, mbchar, mb_len)); +} +#else /* !HANDLE_MULTIBYTE */ +static int +_rl_char_search (count, fdir, bdir) + int count, fdir, bdir; +{ + int c; + + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (count < 0) + return (_rl_char_search_internal (-count, bdir, c)); + else + return (_rl_char_search_internal (count, fdir, c)); +} +#endif /* !HANDLE_MULTIBYTE */ + +int +rl_char_search (count, key) + int count, key __attribute__((unused)); +{ + return (_rl_char_search (count, FFIND, BFIND)); +} + +int +rl_backward_char_search (count, key) + int count, key __attribute__((unused)); +{ + return (_rl_char_search (count, BFIND, FFIND)); +} + +/* **************************************************************** */ +/* */ +/* The Mark and the Region. */ +/* */ +/* **************************************************************** */ + +/* Set the mark at POSITION. */ +int +_rl_set_mark_at_pos (position) + int position; +{ + if (position > rl_end) + return -1; + + rl_mark = position; + return 0; +} + +/* A bindable command to set the mark. */ +int +rl_set_mark (count, key) + int count, key __attribute__((unused)); +{ + return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point)); +} + +/* Exchange the position of mark and point. */ +int +rl_exchange_point_and_mark (count, key) + int count __attribute__((unused)), key __attribute__((unused)); +{ + if (rl_mark > rl_end) + rl_mark = -1; + + if (rl_mark == -1) + { + rl_ding (); + return -1; + } + else + SWAP (rl_point, rl_mark); + + return 0; +} diff --git a/readline/tilde.c b/readline/tilde.c index 05c9ed741ed..11209903cf8 100644 --- a/readline/tilde.c +++ b/readline/tilde.c @@ -7,7 +7,7 @@ Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 1, or (at your option) any + Free Software Foundation; either version 2, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but @@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License along with Readline; see the file COPYING. If not, write to the Free - Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if defined (HAVE_CONFIG_H) # include @@ -47,16 +47,19 @@ #include "tilde.h" +#if defined (TEST) || defined (STATIC_MALLOC) +static void *xmalloc (), *xrealloc (); +#else +# include "xmalloc.h" +#endif /* TEST || STATIC_MALLOC */ + #if !defined (HAVE_GETPW_DECLS) -extern struct passwd *getpwuid (), *getpwnam (); +extern struct passwd *getpwuid PARAMS((uid_t)); +extern struct passwd *getpwnam PARAMS((const char *)); #endif /* !HAVE_GETPW_DECLS */ #if !defined (savestring) -extern char *xmalloc (); -# ifndef strcpy -extern char *strcpy (); -# endif -#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) +#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) #endif /* !savestring */ #if !defined (NULL) @@ -67,62 +70,63 @@ extern char *strcpy (); # endif /* !__STDC__ */ #endif /* !NULL */ -#if defined (TEST) || defined (STATIC_MALLOC) -static char *xmalloc (), *xrealloc (); -#else -extern char *xmalloc (), *xrealloc (); -#endif /* TEST || STATIC_MALLOC */ - /* If being compiled as part of bash, these will be satisfied from variables.o. If being compiled as part of readline, they will be satisfied from shell.o. */ -extern char *get_home_dir (); -extern char *get_env_value (); +extern char *sh_get_home_dir PARAMS((void)); +extern char *sh_get_env_value PARAMS((const char *)); /* The default value of tilde_additional_prefixes. This is set to whitespace preceding a tilde so that simple programs which do not perform any word separation get desired behaviour. */ static const char *default_prefixes[] = - { " ~", "\t~", (char *)NULL }; + { " ~", "\t~", (const char *)NULL }; /* The default value of tilde_additional_suffixes. This is set to whitespace or newline so that simple programs which do not perform any word separation get desired behaviour. */ static const char *default_suffixes[] = - { " ", "\n", (char *)NULL }; + { " ", "\n", (const char *)NULL }; /* If non-null, this contains the address of a function that the application wants called before trying the standard tilde expansions. The function is called with the text sans tilde, and returns a malloc()'ed string which is the expansion, or a NULL pointer if the expansion fails. */ -CPFunction *tilde_expansion_preexpansion_hook = (CPFunction *)NULL; +tilde_hook_func_t *tilde_expansion_preexpansion_hook = (tilde_hook_func_t *)NULL; /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ -CPFunction *tilde_expansion_failure_hook = (CPFunction *)NULL; +tilde_hook_func_t *tilde_expansion_failure_hook = (tilde_hook_func_t *)NULL; /* When non-null, this is a NULL terminated array of strings which are duplicates for a tilde prefix. Bash uses this to expand `=~' and `:~'. */ -const char ** tilde_additional_prefixes = default_prefixes; +char **tilde_additional_prefixes = (char **)default_prefixes; /* When non-null, this is a NULL terminated array of strings which match the end of a username, instead of just "/". Bash sets this to `:' and `=~'. */ -const char **tilde_additional_suffixes = default_suffixes; +char **tilde_additional_suffixes = (char **)default_suffixes; + +static int tilde_find_prefix PARAMS((const char *, int *)); +static int tilde_find_suffix PARAMS((const char *)); +static char *isolate_tilde_prefix PARAMS((const char *, int *)); +static char *glue_prefix_and_suffix PARAMS((char *, const char *, int)); /* Find the start of a tilde expansion in STRING, and return the index of the tilde which starts the expansion. Place the length of the text which identified this tilde starter in LEN, excluding the tilde itself. */ static int tilde_find_prefix (string, len) - char *string; + const char *string; int *len; { register int i, j, string_len; - register const char **prefixes = tilde_additional_prefixes; + register char **prefixes; + + prefixes = tilde_additional_prefixes; string_len = strlen (string); *len = 0; @@ -151,17 +155,21 @@ tilde_find_prefix (string, len) the character which ends the tilde definition. */ static int tilde_find_suffix (string) - char *string; + const char *string; { register int i, j, string_len; - register const char **suffixes; + register char **suffixes; suffixes = tilde_additional_suffixes; string_len = strlen (string); for (i = 0; i < string_len; i++) { +#if defined (__MSDOS__) + if (string[i] == '/' || string[i] == '\\' /* || !string[i] */) +#else if (string[i] == '/' /* || !string[i] */) +#endif break; for (j = 0; suffixes && suffixes[j]; j++) @@ -176,16 +184,16 @@ tilde_find_suffix (string) /* Return a new string which is the result of tilde expanding STRING. */ char * tilde_expand (string) - char *string; + const char *string; { char *result; int result_size, result_index; result_index = result_size = 0; - if ((result = strchr (string, '~'))) - result = xmalloc (result_size = (strlen (string) + 16)); + if ((result = (char*)strchr(string, '~'))) + result = (char *)xmalloc (result_size = (strlen (string) + 16)); else - result = xmalloc (result_size = (strlen (string) + 1)); + result = (char *)xmalloc (result_size = (strlen (string) + 1)); /* Scan through STRING expanding tildes as we come to them. */ while (1) @@ -199,7 +207,7 @@ tilde_expand (string) /* Copy the skipped text into the result. */ if ((result_index + start + 1) > result_size) - result = xrealloc (result, 1 + (result_size += (start + 20))); + result = (char *)xrealloc (result, 1 + (result_size += (start + 20))); strncpy (result + result_index, string, start); result_index += start; @@ -216,7 +224,7 @@ tilde_expand (string) break; /* Expand the entire tilde word, and copy it into RESULT. */ - tilde_word = xmalloc (1 + end); + tilde_word = (char *)xmalloc (1 + end); strncpy (tilde_word, string, end); tilde_word[end] = '\0'; string += end; @@ -225,11 +233,18 @@ tilde_expand (string) free (tilde_word); len = strlen (expansion); - if ((result_index + len + 1) > result_size) - result = xrealloc (result, 1 + (result_size += (len + 20))); +#ifdef __CYGWIN__ + /* Fix for Cygwin to prevent ~user/xxx from expanding to //xxx when + $HOME for `user' is /. On cygwin, // denotes a network drive. */ + if (len > 1 || *expansion != '/' || *string != '/') +#endif + { + if ((result_index + len + 1) > result_size) + result = (char *)xrealloc (result, 1 + (result_size += (len + 20))); - strcpy (result + result_index, expansion); - result_index += len; + strcpy (result + result_index, expansion); + result_index += len; + } free (expansion); } @@ -243,14 +258,18 @@ tilde_expand (string) the location it points to. */ static char * isolate_tilde_prefix (fname, lenp) - char *fname; + const char *fname; int *lenp; { char *ret; int i; - ret = xmalloc (strlen (fname)); + ret = (char *)xmalloc (strlen (fname)); +#if defined (__MSDOS__) + for (i = 1; fname[i] && fname[i] != '/' && fname[i] != '\\'; i++) +#else for (i = 1; fname[i] && fname[i] != '/'; i++) +#endif ret[i - 1] = fname[i]; ret[i - 1] = '\0'; if (lenp) @@ -262,7 +281,8 @@ isolate_tilde_prefix (fname, lenp) SUFFIND. */ static char * glue_prefix_and_suffix (prefix, suffix, suffind) - char *prefix, *suffix; + char *prefix; + const char *suffix; int suffind; { char *ret; @@ -270,8 +290,8 @@ glue_prefix_and_suffix (prefix, suffix, suffind) plen = (prefix && *prefix) ? strlen (prefix) : 0; slen = strlen (suffix + suffind); - ret = xmalloc (plen + slen + 1); - if (prefix && *prefix) + ret = (char *)xmalloc (plen + slen + 1); + if (plen) strcpy (ret, prefix); strcpy (ret + plen, suffix + suffind); return ret; @@ -282,7 +302,7 @@ glue_prefix_and_suffix (prefix, suffix, suffind) This always returns a newly-allocated string, never static storage. */ char * tilde_expand_word (filename) - char *filename; + const char *filename; { char *dirname, *expansion, *username; int user_len; @@ -300,12 +320,12 @@ tilde_expand_word (filename) if (filename[1] == '\0' || filename[1] == '/') { /* Prefix $HOME to the rest of the string. */ - expansion = get_env_value ("HOME"); + expansion = sh_get_env_value ("HOME"); /* If there is no HOME variable, look up the directory in the password database. */ if (expansion == 0) - expansion = get_home_dir (); + expansion = sh_get_home_dir (); return (glue_prefix_and_suffix (expansion, filename, 1)); } @@ -394,28 +414,28 @@ main (argc, argv) static void memory_error_and_abort (); -static char * +static void * xmalloc (bytes) - int bytes; + size_t bytes; { - char *temp = (char *)malloc (bytes); + void *temp = (char *)malloc (bytes); if (!temp) memory_error_and_abort (); return (temp); } -static char * +static void * xrealloc (pointer, bytes) - char *pointer; + void *pointer; int bytes; { - char *temp; + void *temp; if (!pointer) - temp = (char *)malloc (bytes); + temp = malloc (bytes); else - temp = (char *)realloc (pointer, bytes); + temp = realloc (pointer, bytes); if (!temp) memory_error_and_abort (); diff --git a/readline/tilde.h b/readline/tilde.h index 45eea1b66e5..f8182c999d9 100644 --- a/readline/tilde.h +++ b/readline/tilde.h @@ -8,7 +8,7 @@ The Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) + the Free Software Foundation; either version 2, or (at your option) any later version. The Library is distributed in the hope that it will be useful, but @@ -19,47 +19,60 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (_TILDE_H_) # define _TILDE_H_ -/* Function pointers can be declared as (Function *)foo. */ -#if !defined (_FUNCTION_DEF) -# define _FUNCTION_DEF -typedef int Function (); -typedef void VFunction (); -typedef char *CPFunction (); -typedef char **CPPFunction (); -#endif /* _FUNCTION_DEF */ +#ifdef __cplusplus +extern "C" { +#endif + +/* A function can be defined using prototypes and compile on both ANSI C + and traditional C compilers with something like this: + extern char *func PARAMS((char *, char *, int)); */ + +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () +# endif +#endif + +typedef char *tilde_hook_func_t PARAMS((char *)); /* If non-null, this contains the address of a function that the application wants called before trying the standard tilde expansions. The function is called with the text sans tilde, and returns a malloc()'ed string which is the expansion, or a NULL pointer if the expansion fails. */ -extern CPFunction *tilde_expansion_preexpansion_hook; +extern tilde_hook_func_t *tilde_expansion_preexpansion_hook; /* If non-null, this contains the address of a function to call if the standard meaning for expanding a tilde fails. The function is called with the text (sans tilde, as in "foo"), and returns a malloc()'ed string which is the expansion, or a NULL pointer if there is no expansion. */ -extern CPFunction *tilde_expansion_failure_hook; +extern tilde_hook_func_t *tilde_expansion_failure_hook; /* When non-null, this is a NULL terminated array of strings which are duplicates for a tilde prefix. Bash uses this to expand `=~' and `:~'. */ -extern const char **tilde_additional_prefixes; +extern char **tilde_additional_prefixes; /* When non-null, this is a NULL terminated array of strings which match the end of a username, instead of just "/". Bash sets this to `:' and `=~'. */ -extern const char **tilde_additional_suffixes; +extern char **tilde_additional_suffixes; /* Return a new string which is the result of tilde expanding STRING. */ -extern char *tilde_expand (); +extern char *tilde_expand PARAMS((const char *)); /* Do the work of tilde expansion on FILENAME. FILENAME starts with a tilde. If there is no expansion, call tilde_expansion_failure_hook. */ -extern char *tilde_expand_word (); +extern char *tilde_expand_word PARAMS((const char *)); + +#ifdef __cplusplus +} +#endif #endif /* _TILDE_H_ */ diff --git a/readline/undo.c b/readline/undo.c index c8f4892b774..df913195fad 100644 --- a/readline/undo.c +++ b/readline/undo.c @@ -8,7 +8,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -19,7 +19,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -47,7 +47,8 @@ #include "readline.h" #include "history.h" -#define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) +#include "rlprivate.h" +#include "xmalloc.h" /* Non-zero tells rl_delete_text and rl_insert_text to not add to the undo list. */ @@ -84,7 +85,7 @@ rl_add_undo (what, start, end, text) /* Free the existing undo list. */ void -free_undo_list () +rl_free_undo_list () { while (rl_undo_list) { @@ -105,17 +106,18 @@ int rl_do_undo () { UNDO_LIST *release; - int waiting_for_begin = 0; - int start = 0, end = 0; + int waiting_for_begin, start, end; #define TRANS(i) ((i) == -1 ? rl_point : ((i) == -2 ? rl_end : (i))) + start = end = waiting_for_begin = 0; do { if (!rl_undo_list) return (0); _rl_doing_an_undo = 1; + RL_SETSTATE(RL_STATE_UNDOING); /* To better support vi-mode, a start or end value of -1 means rl_point, and a value of -2 means rl_end. */ @@ -150,11 +152,12 @@ rl_do_undo () if (waiting_for_begin) waiting_for_begin--; else - ding (); + rl_ding (); break; } _rl_doing_an_undo = 0; + RL_UNSETSTATE(RL_STATE_UNDOING); release = rl_undo_list; rl_undo_list = rl_undo_list->next; @@ -168,13 +171,14 @@ rl_do_undo () int _rl_fix_last_undo_of_type (type, start, end) - int type, start, end; + unsigned int type; + int start, end; { UNDO_LIST *rl; for (rl = rl_undo_list; rl; rl = rl->next) { - if ((int) rl->what == type) + if (rl->what == type) { rl->start = start; rl->end = end; @@ -225,11 +229,11 @@ rl_modifying (start, end) /* Revert the current line to its previous state. */ int -rl_revert_line (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_revert_line (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { if (!rl_undo_list) - ding (); + rl_ding (); else { while (rl_undo_list) @@ -240,7 +244,8 @@ rl_revert_line (int count __attribute__((unused)), /* Do some undoing of things that were done. */ int -rl_undo_command (int count, int key __attribute__((unused))) +rl_undo_command (count, key) + int count, key __attribute__((unused)); { if (count < 0) return 0; /* Nothing to do. */ @@ -251,7 +256,7 @@ rl_undo_command (int count, int key __attribute__((unused))) count--; else { - ding (); + rl_ding (); break; } } diff --git a/readline/util.c b/readline/util.c index bcd8f3bc5b2..2a6e4e3398a 100644 --- a/readline/util.c +++ b/readline/util.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) @@ -52,24 +52,8 @@ /* Some standard library routines. */ #include "readline.h" -#define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) - -/* Pseudo-globals imported from readline.c */ -extern int readline_echoing_p; -extern procenv_t readline_top_level; -extern int rl_line_buffer_len; -extern Function *rl_last_func; - -extern int _rl_defining_kbd_macro; -extern char *_rl_executing_macro; - -/* Pseudo-global functions imported from other library files. */ -extern void _rl_replace_text (); -extern void _rl_pop_executing_macro (); -extern void _rl_set_the_line (); -extern void _rl_init_argument (); - -extern char *xmalloc (), *xrealloc (); +#include "rlprivate.h" +#include "xmalloc.h" /* **************************************************************** */ /* */ @@ -84,7 +68,7 @@ int _rl_allow_pathname_alphabetic_chars = 0; static const char *pathname_alphabetic_chars = "/-_=~.#$"; int -alphabetic (c) +rl_alphabetic (c) int c; { if (ALPHABETIC (c)) @@ -98,36 +82,36 @@ alphabetic (c) int _rl_abort_internal () { - ding (); + rl_ding (); rl_clear_message (); _rl_init_argument (); - rl_pending_input = 0; + rl_clear_pending_input (); - _rl_defining_kbd_macro = 0; - while (_rl_executing_macro) + RL_UNSETSTATE (RL_STATE_MACRODEF); + while (rl_executing_macro) _rl_pop_executing_macro (); - rl_last_func = (Function *)NULL; + rl_last_func = (rl_command_func_t *)NULL; longjmp (readline_top_level, 1); return (0); } int -rl_abort (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_abort (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { return (_rl_abort_internal ()); } int -rl_tty_status (int count __attribute__((unused)), - int key __attribute__((unused))) +rl_tty_status (count, key) + int count __attribute__((unused)), key __attribute__((unused)); { #if defined (TIOCSTAT) ioctl (1, TIOCSTAT, (char *)0); rl_refresh_line (count, key); #else - ding (); + rl_ding (); #endif return 0; } @@ -146,7 +130,7 @@ rl_copy_text (from, to) SWAP (from, to); length = to - from; - copy = xmalloc (1 + length); + copy = (char *)xmalloc (1 + length); strncpy (copy, rl_line_buffer + from, length); copy[length] = '\0'; return (copy); @@ -161,7 +145,7 @@ rl_extend_line_buffer (len) while (len >= rl_line_buffer_len) { rl_line_buffer_len += DEFAULT_BUFFER_SIZE; - rl_line_buffer = xrealloc (rl_line_buffer, rl_line_buffer_len); + rl_line_buffer = (char *)xrealloc (rl_line_buffer, rl_line_buffer_len); } _rl_set_the_line (); @@ -170,8 +154,8 @@ rl_extend_line_buffer (len) /* A function for simple tilde expansion. */ int -rl_tilde_expand (int ignore __attribute__((unused)), - int key __attribute__((unused))) +rl_tilde_expand (ignore, key) + int ignore __attribute__((unused)), key __attribute__((unused)); { register int start, end; char *homedir, *temp; @@ -207,7 +191,7 @@ rl_tilde_expand (int ignore __attribute__((unused)), if (rl_line_buffer[start] == '~') { len = end - start + 1; - temp = xmalloc (len + 1); + temp = (char *)xmalloc (len + 1); strncpy (temp, rl_line_buffer + start, len); temp[len] = '\0'; homedir = tilde_expand (temp); @@ -229,16 +213,51 @@ rl_tilde_expand (int ignore __attribute__((unused)), match in s1. The compare is case insensitive. */ char * _rl_strindex (s1, s2) - register char *s1, *s2; + register const char *s1, *s2; { register int i, l, len; for (i = 0, l = strlen (s2), len = strlen (s1); (len - i) >= l; i++) if (_rl_strnicmp (s1 + i, s2, l) == 0) - return (s1 + i); + return ((char *) (s1 + i)); return ((char *)NULL); } +#ifndef HAVE_STRPBRK +/* Find the first occurrence in STRING1 of any character from STRING2. + Return a pointer to the character in STRING1. */ +char * +_rl_strpbrk (string1, string2) + const char *string1, *string2; +{ + register const char *scan; +#if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + register int i, v; + + memset (&ps, 0, sizeof (mbstate_t)); +#endif + + for (; *string1; string1++) + { + for (scan = string2; *scan; scan++) + { + if (*string1 == *scan) + return ((char *)string1); + } +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + v = _rl_get_char_len (string1, &ps); + if (v > 1) + string += v - 1; /* -1 to account for auto-increment in loop */ + } +#endif + } + return ((char *)NULL); +} +#endif + #if !defined (HAVE_STRCASECMP) /* Compare at most COUNT characters from string1 to string2. Case doesn't matter. */ @@ -297,69 +316,23 @@ _rl_qsort_string_compare (s1, s2) #endif } -/* Function equivalents for the macros defined in chartypes.h. */ -#undef _rl_uppercase_p -int -_rl_uppercase_p (c) - int c; -{ - return (isupper (c)); -} +/* Function equivalents for the macros defined in chardefs.h. */ +#define FUNCTION_FOR_MACRO(f) int (f) (c) int c; { return f (c); } -#undef _rl_lowercase_p -int -_rl_lowercase_p (c) - int c; -{ - return (islower (c)); -} - -#undef _rl_pure_alphabetic -int -_rl_pure_alphabetic (c) - int c; -{ - return (isupper (c) || islower (c)); -} - -#undef _rl_digit_p -int -_rl_digit_p (c) - int c; -{ - return (isdigit (c)); -} - -#undef _rl_to_lower -int -_rl_to_lower (c) - int c; -{ - return (isupper (c) ? tolower (c) : c); -} - -#undef _rl_to_upper -int -_rl_to_upper (c) - int c; -{ - return (islower (c) ? toupper (c) : c); -} - -#undef _rl_digit_value -int -_rl_digit_value (c) - int c; -{ - return (isdigit (c) ? c - '0' : c); -} +FUNCTION_FOR_MACRO (_rl_digit_p) +FUNCTION_FOR_MACRO (_rl_digit_value) +FUNCTION_FOR_MACRO (_rl_lowercase_p) +FUNCTION_FOR_MACRO (_rl_pure_alphabetic) +FUNCTION_FOR_MACRO (_rl_to_lower) +FUNCTION_FOR_MACRO (_rl_to_upper) +FUNCTION_FOR_MACRO (_rl_uppercase_p) /* Backwards compatibility, now that savestring has been removed from all `public' readline header files. */ #undef _rl_savestring char * _rl_savestring (s) - char *s; + const char *s; { - return ((char *)strcpy (xmalloc (1 + (int)strlen (s)), (s))); + return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s))); } diff --git a/readline/vi_keymap.c b/readline/vi_keymap.c index 14929a31930..53a67c674ce 100644 --- a/readline/vi_keymap.c +++ b/readline/vi_keymap.c @@ -7,7 +7,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -18,7 +18,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if !defined (BUFSIZ) #include @@ -33,429 +33,429 @@ extern KEYMAP_ENTRY_ARRAY vi_escape_keymap; /* The keymap arrays for handling vi mode. */ KEYMAP_ENTRY_ARRAY vi_movement_keymap = { /* The regular control keys come first. */ - { ISFUNC, (Function *)0x0 }, /* Control-@ */ - { ISFUNC, (Function *)0x0 }, /* Control-a */ - { ISFUNC, (Function *)0x0 }, /* Control-b */ - { ISFUNC, (Function *)0x0 }, /* Control-c */ - { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ - { ISFUNC, rl_emacs_editing_mode }, /* Control-e */ - { ISFUNC, (Function *)0x0 }, /* Control-f */ - { ISFUNC, rl_abort }, /* Control-g */ - { ISFUNC, rl_backward }, /* Control-h */ - { ISFUNC, (Function *)0x0 }, /* Control-i */ - { ISFUNC, rl_newline }, /* Control-j */ - { ISFUNC, rl_kill_line }, /* Control-k */ - { ISFUNC, rl_clear_screen }, /* Control-l */ - { ISFUNC, rl_newline }, /* Control-m */ - { ISFUNC, rl_get_next_history }, /* Control-n */ - { ISFUNC, (Function *)0x0 }, /* Control-o */ - { ISFUNC, rl_get_previous_history }, /* Control-p */ - { ISFUNC, rl_quoted_insert }, /* Control-q */ - { ISFUNC, rl_reverse_search_history }, /* Control-r */ - { ISFUNC, rl_forward_search_history }, /* Control-s */ - { ISFUNC, rl_transpose_chars }, /* Control-t */ - { ISFUNC, rl_unix_line_discard }, /* Control-u */ - { ISFUNC, rl_quoted_insert }, /* Control-v */ - { ISFUNC, rl_unix_word_rubout }, /* Control-w */ - { ISFUNC, (Function *)0x0 }, /* Control-x */ - { ISFUNC, rl_yank }, /* Control-y */ - { ISFUNC, (Function *)0x0 }, /* Control-z */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ + { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ + { ISFUNC, rl_emacs_editing_mode }, /* Control-e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ + { ISFUNC, rl_abort }, /* Control-g */ + { ISFUNC, rl_backward_char }, /* Control-h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */ + { ISFUNC, rl_newline }, /* Control-j */ + { ISFUNC, rl_kill_line }, /* Control-k */ + { ISFUNC, rl_clear_screen }, /* Control-l */ + { ISFUNC, rl_newline }, /* Control-m */ + { ISFUNC, rl_get_next_history }, /* Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ + { ISFUNC, rl_get_previous_history }, /* Control-p */ + { ISFUNC, rl_quoted_insert }, /* Control-q */ + { ISFUNC, rl_reverse_search_history }, /* Control-r */ + { ISFUNC, rl_forward_search_history }, /* Control-s */ + { ISFUNC, rl_transpose_chars }, /* Control-t */ + { ISFUNC, rl_unix_line_discard }, /* Control-u */ + { ISFUNC, rl_quoted_insert }, /* Control-v */ + { ISFUNC, rl_unix_word_rubout }, /* Control-w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-x */ + { ISFUNC, rl_yank }, /* Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ - { ISFUNC, (Function *)0x0 }, /* Control-[ */ /* vi_escape_keymap */ - { ISFUNC, (Function *)0x0 }, /* Control-\ */ - { ISFUNC, (Function *)0x0 }, /* Control-] */ - { ISFUNC, (Function *)0x0 }, /* Control-^ */ - { ISFUNC, rl_vi_undo }, /* Control-_ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */ /* vi_escape_keymap */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ + { ISFUNC, rl_vi_undo }, /* Control-_ */ /* The start of printing characters. */ - { ISFUNC, rl_forward }, /* SPACE */ - { ISFUNC, (Function *)0x0 }, /* ! */ - { ISFUNC, (Function *)0x0 }, /* " */ - { ISFUNC, rl_insert_comment }, /* # */ - { ISFUNC, rl_end_of_line }, /* $ */ - { ISFUNC, rl_vi_match }, /* % */ - { ISFUNC, rl_vi_tilde_expand }, /* & */ - { ISFUNC, (Function *)0x0 }, /* ' */ - { ISFUNC, (Function *)0x0 }, /* ( */ - { ISFUNC, (Function *)0x0 }, /* ) */ - { ISFUNC, rl_vi_complete }, /* * */ - { ISFUNC, rl_get_next_history}, /* + */ - { ISFUNC, rl_vi_char_search }, /* , */ - { ISFUNC, rl_get_previous_history }, /* - */ - { ISFUNC, rl_vi_redo }, /* . */ - { ISFUNC, rl_vi_search }, /* / */ + { ISFUNC, rl_forward_char }, /* SPACE */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ + { ISFUNC, rl_insert_comment }, /* # */ + { ISFUNC, rl_end_of_line }, /* $ */ + { ISFUNC, rl_vi_match }, /* % */ + { ISFUNC, rl_vi_tilde_expand }, /* & */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ( */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ) */ + { ISFUNC, rl_vi_complete }, /* * */ + { ISFUNC, rl_get_next_history}, /* + */ + { ISFUNC, rl_vi_char_search }, /* , */ + { ISFUNC, rl_get_previous_history }, /* - */ + { ISFUNC, rl_vi_redo }, /* . */ + { ISFUNC, rl_vi_search }, /* / */ /* Regular digits. */ - { ISFUNC, rl_beg_of_line }, /* 0 */ - { ISFUNC, rl_vi_arg_digit }, /* 1 */ - { ISFUNC, rl_vi_arg_digit }, /* 2 */ - { ISFUNC, rl_vi_arg_digit }, /* 3 */ - { ISFUNC, rl_vi_arg_digit }, /* 4 */ - { ISFUNC, rl_vi_arg_digit }, /* 5 */ - { ISFUNC, rl_vi_arg_digit }, /* 6 */ - { ISFUNC, rl_vi_arg_digit }, /* 7 */ - { ISFUNC, rl_vi_arg_digit }, /* 8 */ - { ISFUNC, rl_vi_arg_digit }, /* 9 */ + { ISFUNC, rl_beg_of_line }, /* 0 */ + { ISFUNC, rl_vi_arg_digit }, /* 1 */ + { ISFUNC, rl_vi_arg_digit }, /* 2 */ + { ISFUNC, rl_vi_arg_digit }, /* 3 */ + { ISFUNC, rl_vi_arg_digit }, /* 4 */ + { ISFUNC, rl_vi_arg_digit }, /* 5 */ + { ISFUNC, rl_vi_arg_digit }, /* 6 */ + { ISFUNC, rl_vi_arg_digit }, /* 7 */ + { ISFUNC, rl_vi_arg_digit }, /* 8 */ + { ISFUNC, rl_vi_arg_digit }, /* 9 */ /* A little more punctuation. */ - { ISFUNC, (Function *)0x0 }, /* : */ - { ISFUNC, rl_vi_char_search }, /* ; */ - { ISFUNC, (Function *)0x0 }, /* < */ - { ISFUNC, rl_vi_complete }, /* = */ - { ISFUNC, (Function *)0x0 }, /* > */ - { ISFUNC, rl_vi_search }, /* ? */ - { ISFUNC, (Function *)0x0 }, /* @ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ + { ISFUNC, rl_vi_char_search }, /* ; */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ + { ISFUNC, rl_vi_complete }, /* = */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ + { ISFUNC, rl_vi_search }, /* ? */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ /* Uppercase alphabet. */ - { ISFUNC, rl_vi_append_eol }, /* A */ - { ISFUNC, rl_vi_prev_word}, /* B */ - { ISFUNC, rl_vi_change_to }, /* C */ - { ISFUNC, rl_vi_delete_to }, /* D */ - { ISFUNC, rl_vi_end_word }, /* E */ - { ISFUNC, rl_vi_char_search }, /* F */ - { ISFUNC, rl_vi_fetch_history }, /* G */ - { ISFUNC, (Function *)0x0 }, /* H */ - { ISFUNC, rl_vi_insert_beg }, /* I */ - { ISFUNC, (Function *)0x0 }, /* J */ - { ISFUNC, (Function *)0x0 }, /* K */ - { ISFUNC, (Function *)0x0 }, /* L */ - { ISFUNC, (Function *)0x0 }, /* M */ - { ISFUNC, rl_vi_search_again }, /* N */ - { ISFUNC, (Function *)0x0 }, /* O */ - { ISFUNC, rl_vi_put }, /* P */ - { ISFUNC, (Function *)0x0 }, /* Q */ - { ISFUNC, rl_vi_replace }, /* R */ - { ISFUNC, rl_vi_subst }, /* S */ - { ISFUNC, rl_vi_char_search }, /* T */ - { ISFUNC, rl_revert_line }, /* U */ - { ISFUNC, (Function *)0x0 }, /* V */ - { ISFUNC, rl_vi_next_word }, /* W */ - { ISFUNC, rl_rubout }, /* X */ - { ISFUNC, rl_vi_yank_to }, /* Y */ - { ISFUNC, (Function *)0x0 }, /* Z */ + { ISFUNC, rl_vi_append_eol }, /* A */ + { ISFUNC, rl_vi_prev_word}, /* B */ + { ISFUNC, rl_vi_change_to }, /* C */ + { ISFUNC, rl_vi_delete_to }, /* D */ + { ISFUNC, rl_vi_end_word }, /* E */ + { ISFUNC, rl_vi_char_search }, /* F */ + { ISFUNC, rl_vi_fetch_history }, /* G */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* H */ + { ISFUNC, rl_vi_insert_beg }, /* I */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* J */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* K */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* L */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* M */ + { ISFUNC, rl_vi_search_again }, /* N */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* O */ + { ISFUNC, rl_vi_put }, /* P */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Q */ + { ISFUNC, rl_vi_replace }, /* R */ + { ISFUNC, rl_vi_subst }, /* S */ + { ISFUNC, rl_vi_char_search }, /* T */ + { ISFUNC, rl_revert_line }, /* U */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* V */ + { ISFUNC, rl_vi_next_word }, /* W */ + { ISFUNC, rl_rubout }, /* X */ + { ISFUNC, rl_vi_yank_to }, /* Y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Z */ /* Some more punctuation. */ - { ISFUNC, (Function *)0x0 }, /* [ */ - { ISFUNC, rl_vi_complete }, /* \ */ - { ISFUNC, (Function *)0x0 }, /* ] */ - { ISFUNC, rl_vi_first_print }, /* ^ */ - { ISFUNC, rl_vi_yank_arg }, /* _ */ - { ISFUNC, rl_vi_goto_mark }, /* ` */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */ + { ISFUNC, rl_vi_complete }, /* \ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ + { ISFUNC, rl_vi_first_print }, /* ^ */ + { ISFUNC, rl_vi_yank_arg }, /* _ */ + { ISFUNC, rl_vi_goto_mark }, /* ` */ /* Lowercase alphabet. */ - { ISFUNC, rl_vi_append_mode }, /* a */ - { ISFUNC, rl_vi_prev_word }, /* b */ - { ISFUNC, rl_vi_change_to }, /* c */ - { ISFUNC, rl_vi_delete_to }, /* d */ - { ISFUNC, rl_vi_end_word }, /* e */ - { ISFUNC, rl_vi_char_search }, /* f */ - { ISFUNC, (Function *)0x0 }, /* g */ - { ISFUNC, rl_backward }, /* h */ - { ISFUNC, rl_vi_insertion_mode }, /* i */ - { ISFUNC, rl_get_next_history }, /* j */ - { ISFUNC, rl_get_previous_history }, /* k */ - { ISFUNC, rl_forward }, /* l */ - { ISFUNC, rl_vi_set_mark }, /* m */ - { ISFUNC, rl_vi_search_again }, /* n */ - { ISFUNC, (Function *)0x0 }, /* o */ - { ISFUNC, rl_vi_put }, /* p */ - { ISFUNC, (Function *)0x0 }, /* q */ - { ISFUNC, rl_vi_change_char }, /* r */ - { ISFUNC, rl_vi_subst }, /* s */ - { ISFUNC, rl_vi_char_search }, /* t */ - { ISFUNC, rl_vi_undo }, /* u */ - { ISFUNC, (Function *)0x0 }, /* v */ - { ISFUNC, rl_vi_next_word }, /* w */ - { ISFUNC, rl_vi_delete }, /* x */ - { ISFUNC, rl_vi_yank_to }, /* y */ - { ISFUNC, (Function *)0x0 }, /* z */ + { ISFUNC, rl_vi_append_mode }, /* a */ + { ISFUNC, rl_vi_prev_word }, /* b */ + { ISFUNC, rl_vi_change_to }, /* c */ + { ISFUNC, rl_vi_delete_to }, /* d */ + { ISFUNC, rl_vi_end_word }, /* e */ + { ISFUNC, rl_vi_char_search }, /* f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ + { ISFUNC, rl_backward_char }, /* h */ + { ISFUNC, rl_vi_insertion_mode }, /* i */ + { ISFUNC, rl_get_next_history }, /* j */ + { ISFUNC, rl_get_previous_history }, /* k */ + { ISFUNC, rl_forward_char }, /* l */ + { ISFUNC, rl_vi_set_mark }, /* m */ + { ISFUNC, rl_vi_search_again }, /* n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* o */ + { ISFUNC, rl_vi_put }, /* p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ + { ISFUNC, rl_vi_change_char }, /* r */ + { ISFUNC, rl_vi_subst }, /* s */ + { ISFUNC, rl_vi_char_search }, /* t */ + { ISFUNC, rl_vi_undo }, /* u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ + { ISFUNC, rl_vi_next_word }, /* w */ + { ISFUNC, rl_vi_delete }, /* x */ + { ISFUNC, rl_vi_yank_to }, /* y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ /* Final punctuation. */ - { ISFUNC, (Function *)0x0 }, /* { */ - { ISFUNC, rl_vi_column }, /* | */ - { ISFUNC, (Function *)0x0 }, /* } */ - { ISFUNC, rl_vi_change_case }, /* ~ */ - { ISFUNC, (Function *)0x0 }, /* RUBOUT */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ + { ISFUNC, rl_vi_column }, /* | */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ + { ISFUNC, rl_vi_change_case }, /* ~ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Undefined keys. */ - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 } + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 } #endif /* KEYMAP_SIZE > 128 */ }; KEYMAP_ENTRY_ARRAY vi_insertion_keymap = { /* The regular control keys come first. */ - { ISFUNC, (Function *)0x0 }, /* Control-@ */ - { ISFUNC, rl_insert }, /* Control-a */ - { ISFUNC, rl_insert }, /* Control-b */ - { ISFUNC, rl_insert }, /* Control-c */ - { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ - { ISFUNC, rl_insert }, /* Control-e */ - { ISFUNC, rl_insert }, /* Control-f */ - { ISFUNC, rl_insert }, /* Control-g */ - { ISFUNC, rl_rubout }, /* Control-h */ - { ISFUNC, rl_complete }, /* Control-i */ - { ISFUNC, rl_newline }, /* Control-j */ - { ISFUNC, rl_insert }, /* Control-k */ - { ISFUNC, rl_insert }, /* Control-l */ - { ISFUNC, rl_newline }, /* Control-m */ - { ISFUNC, rl_insert }, /* Control-n */ - { ISFUNC, rl_insert }, /* Control-o */ - { ISFUNC, rl_insert }, /* Control-p */ - { ISFUNC, rl_insert }, /* Control-q */ - { ISFUNC, rl_reverse_search_history }, /* Control-r */ - { ISFUNC, rl_forward_search_history }, /* Control-s */ - { ISFUNC, rl_transpose_chars }, /* Control-t */ - { ISFUNC, rl_unix_line_discard }, /* Control-u */ - { ISFUNC, rl_quoted_insert }, /* Control-v */ - { ISFUNC, rl_unix_word_rubout }, /* Control-w */ - { ISFUNC, rl_insert }, /* Control-x */ - { ISFUNC, rl_yank }, /* Control-y */ - { ISFUNC, rl_insert }, /* Control-z */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ + { ISFUNC, rl_insert }, /* Control-a */ + { ISFUNC, rl_insert }, /* Control-b */ + { ISFUNC, rl_insert }, /* Control-c */ + { ISFUNC, rl_vi_eof_maybe }, /* Control-d */ + { ISFUNC, rl_insert }, /* Control-e */ + { ISFUNC, rl_insert }, /* Control-f */ + { ISFUNC, rl_insert }, /* Control-g */ + { ISFUNC, rl_rubout }, /* Control-h */ + { ISFUNC, rl_complete }, /* Control-i */ + { ISFUNC, rl_newline }, /* Control-j */ + { ISFUNC, rl_insert }, /* Control-k */ + { ISFUNC, rl_insert }, /* Control-l */ + { ISFUNC, rl_newline }, /* Control-m */ + { ISFUNC, rl_insert }, /* Control-n */ + { ISFUNC, rl_insert }, /* Control-o */ + { ISFUNC, rl_insert }, /* Control-p */ + { ISFUNC, rl_insert }, /* Control-q */ + { ISFUNC, rl_reverse_search_history }, /* Control-r */ + { ISFUNC, rl_forward_search_history }, /* Control-s */ + { ISFUNC, rl_transpose_chars }, /* Control-t */ + { ISFUNC, rl_unix_line_discard }, /* Control-u */ + { ISFUNC, rl_quoted_insert }, /* Control-v */ + { ISFUNC, rl_unix_word_rubout }, /* Control-w */ + { ISFUNC, rl_insert }, /* Control-x */ + { ISFUNC, rl_yank }, /* Control-y */ + { ISFUNC, rl_insert }, /* Control-z */ - { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ - { ISFUNC, rl_insert }, /* Control-\ */ - { ISFUNC, rl_insert }, /* Control-] */ - { ISFUNC, rl_insert }, /* Control-^ */ - { ISFUNC, rl_vi_undo }, /* Control-_ */ + { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ + { ISFUNC, rl_insert }, /* Control-\ */ + { ISFUNC, rl_insert }, /* Control-] */ + { ISFUNC, rl_insert }, /* Control-^ */ + { ISFUNC, rl_vi_undo }, /* Control-_ */ /* The start of printing characters. */ - { ISFUNC, rl_insert }, /* SPACE */ - { ISFUNC, rl_insert }, /* ! */ - { ISFUNC, rl_insert }, /* " */ - { ISFUNC, rl_insert }, /* # */ - { ISFUNC, rl_insert }, /* $ */ - { ISFUNC, rl_insert }, /* % */ - { ISFUNC, rl_insert }, /* & */ - { ISFUNC, rl_insert }, /* ' */ - { ISFUNC, rl_insert }, /* ( */ - { ISFUNC, rl_insert }, /* ) */ - { ISFUNC, rl_insert }, /* * */ - { ISFUNC, rl_insert }, /* + */ - { ISFUNC, rl_insert }, /* , */ - { ISFUNC, rl_insert }, /* - */ - { ISFUNC, rl_insert }, /* . */ - { ISFUNC, rl_insert }, /* / */ + { ISFUNC, rl_insert }, /* SPACE */ + { ISFUNC, rl_insert }, /* ! */ + { ISFUNC, rl_insert }, /* " */ + { ISFUNC, rl_insert }, /* # */ + { ISFUNC, rl_insert }, /* $ */ + { ISFUNC, rl_insert }, /* % */ + { ISFUNC, rl_insert }, /* & */ + { ISFUNC, rl_insert }, /* ' */ + { ISFUNC, rl_insert }, /* ( */ + { ISFUNC, rl_insert }, /* ) */ + { ISFUNC, rl_insert }, /* * */ + { ISFUNC, rl_insert }, /* + */ + { ISFUNC, rl_insert }, /* , */ + { ISFUNC, rl_insert }, /* - */ + { ISFUNC, rl_insert }, /* . */ + { ISFUNC, rl_insert }, /* / */ /* Regular digits. */ - { ISFUNC, rl_insert }, /* 0 */ - { ISFUNC, rl_insert }, /* 1 */ - { ISFUNC, rl_insert }, /* 2 */ - { ISFUNC, rl_insert }, /* 3 */ - { ISFUNC, rl_insert }, /* 4 */ - { ISFUNC, rl_insert }, /* 5 */ - { ISFUNC, rl_insert }, /* 6 */ - { ISFUNC, rl_insert }, /* 7 */ - { ISFUNC, rl_insert }, /* 8 */ - { ISFUNC, rl_insert }, /* 9 */ + { ISFUNC, rl_insert }, /* 0 */ + { ISFUNC, rl_insert }, /* 1 */ + { ISFUNC, rl_insert }, /* 2 */ + { ISFUNC, rl_insert }, /* 3 */ + { ISFUNC, rl_insert }, /* 4 */ + { ISFUNC, rl_insert }, /* 5 */ + { ISFUNC, rl_insert }, /* 6 */ + { ISFUNC, rl_insert }, /* 7 */ + { ISFUNC, rl_insert }, /* 8 */ + { ISFUNC, rl_insert }, /* 9 */ /* A little more punctuation. */ - { ISFUNC, rl_insert }, /* : */ - { ISFUNC, rl_insert }, /* ; */ - { ISFUNC, rl_insert }, /* < */ - { ISFUNC, rl_insert }, /* = */ - { ISFUNC, rl_insert }, /* > */ - { ISFUNC, rl_insert }, /* ? */ - { ISFUNC, rl_insert }, /* @ */ + { ISFUNC, rl_insert }, /* : */ + { ISFUNC, rl_insert }, /* ; */ + { ISFUNC, rl_insert }, /* < */ + { ISFUNC, rl_insert }, /* = */ + { ISFUNC, rl_insert }, /* > */ + { ISFUNC, rl_insert }, /* ? */ + { ISFUNC, rl_insert }, /* @ */ /* Uppercase alphabet. */ - { ISFUNC, rl_insert }, /* A */ - { ISFUNC, rl_insert }, /* B */ - { ISFUNC, rl_insert }, /* C */ - { ISFUNC, rl_insert }, /* D */ - { ISFUNC, rl_insert }, /* E */ - { ISFUNC, rl_insert }, /* F */ - { ISFUNC, rl_insert }, /* G */ - { ISFUNC, rl_insert }, /* H */ - { ISFUNC, rl_insert }, /* I */ - { ISFUNC, rl_insert }, /* J */ - { ISFUNC, rl_insert }, /* K */ - { ISFUNC, rl_insert }, /* L */ - { ISFUNC, rl_insert }, /* M */ - { ISFUNC, rl_insert }, /* N */ - { ISFUNC, rl_insert }, /* O */ - { ISFUNC, rl_insert }, /* P */ - { ISFUNC, rl_insert }, /* Q */ - { ISFUNC, rl_insert }, /* R */ - { ISFUNC, rl_insert }, /* S */ - { ISFUNC, rl_insert }, /* T */ - { ISFUNC, rl_insert }, /* U */ - { ISFUNC, rl_insert }, /* V */ - { ISFUNC, rl_insert }, /* W */ - { ISFUNC, rl_insert }, /* X */ - { ISFUNC, rl_insert }, /* Y */ - { ISFUNC, rl_insert }, /* Z */ + { ISFUNC, rl_insert }, /* A */ + { ISFUNC, rl_insert }, /* B */ + { ISFUNC, rl_insert }, /* C */ + { ISFUNC, rl_insert }, /* D */ + { ISFUNC, rl_insert }, /* E */ + { ISFUNC, rl_insert }, /* F */ + { ISFUNC, rl_insert }, /* G */ + { ISFUNC, rl_insert }, /* H */ + { ISFUNC, rl_insert }, /* I */ + { ISFUNC, rl_insert }, /* J */ + { ISFUNC, rl_insert }, /* K */ + { ISFUNC, rl_insert }, /* L */ + { ISFUNC, rl_insert }, /* M */ + { ISFUNC, rl_insert }, /* N */ + { ISFUNC, rl_insert }, /* O */ + { ISFUNC, rl_insert }, /* P */ + { ISFUNC, rl_insert }, /* Q */ + { ISFUNC, rl_insert }, /* R */ + { ISFUNC, rl_insert }, /* S */ + { ISFUNC, rl_insert }, /* T */ + { ISFUNC, rl_insert }, /* U */ + { ISFUNC, rl_insert }, /* V */ + { ISFUNC, rl_insert }, /* W */ + { ISFUNC, rl_insert }, /* X */ + { ISFUNC, rl_insert }, /* Y */ + { ISFUNC, rl_insert }, /* Z */ /* Some more punctuation. */ - { ISFUNC, rl_insert }, /* [ */ - { ISFUNC, rl_insert }, /* \ */ - { ISFUNC, rl_insert }, /* ] */ - { ISFUNC, rl_insert }, /* ^ */ - { ISFUNC, rl_insert }, /* _ */ - { ISFUNC, rl_insert }, /* ` */ + { ISFUNC, rl_insert }, /* [ */ + { ISFUNC, rl_insert }, /* \ */ + { ISFUNC, rl_insert }, /* ] */ + { ISFUNC, rl_insert }, /* ^ */ + { ISFUNC, rl_insert }, /* _ */ + { ISFUNC, rl_insert }, /* ` */ /* Lowercase alphabet. */ - { ISFUNC, rl_insert }, /* a */ - { ISFUNC, rl_insert }, /* b */ - { ISFUNC, rl_insert }, /* c */ - { ISFUNC, rl_insert }, /* d */ - { ISFUNC, rl_insert }, /* e */ - { ISFUNC, rl_insert }, /* f */ - { ISFUNC, rl_insert }, /* g */ - { ISFUNC, rl_insert }, /* h */ - { ISFUNC, rl_insert }, /* i */ - { ISFUNC, rl_insert }, /* j */ - { ISFUNC, rl_insert }, /* k */ - { ISFUNC, rl_insert }, /* l */ - { ISFUNC, rl_insert }, /* m */ - { ISFUNC, rl_insert }, /* n */ - { ISFUNC, rl_insert }, /* o */ - { ISFUNC, rl_insert }, /* p */ - { ISFUNC, rl_insert }, /* q */ - { ISFUNC, rl_insert }, /* r */ - { ISFUNC, rl_insert }, /* s */ - { ISFUNC, rl_insert }, /* t */ - { ISFUNC, rl_insert }, /* u */ - { ISFUNC, rl_insert }, /* v */ - { ISFUNC, rl_insert }, /* w */ - { ISFUNC, rl_insert }, /* x */ - { ISFUNC, rl_insert }, /* y */ - { ISFUNC, rl_insert }, /* z */ + { ISFUNC, rl_insert }, /* a */ + { ISFUNC, rl_insert }, /* b */ + { ISFUNC, rl_insert }, /* c */ + { ISFUNC, rl_insert }, /* d */ + { ISFUNC, rl_insert }, /* e */ + { ISFUNC, rl_insert }, /* f */ + { ISFUNC, rl_insert }, /* g */ + { ISFUNC, rl_insert }, /* h */ + { ISFUNC, rl_insert }, /* i */ + { ISFUNC, rl_insert }, /* j */ + { ISFUNC, rl_insert }, /* k */ + { ISFUNC, rl_insert }, /* l */ + { ISFUNC, rl_insert }, /* m */ + { ISFUNC, rl_insert }, /* n */ + { ISFUNC, rl_insert }, /* o */ + { ISFUNC, rl_insert }, /* p */ + { ISFUNC, rl_insert }, /* q */ + { ISFUNC, rl_insert }, /* r */ + { ISFUNC, rl_insert }, /* s */ + { ISFUNC, rl_insert }, /* t */ + { ISFUNC, rl_insert }, /* u */ + { ISFUNC, rl_insert }, /* v */ + { ISFUNC, rl_insert }, /* w */ + { ISFUNC, rl_insert }, /* x */ + { ISFUNC, rl_insert }, /* y */ + { ISFUNC, rl_insert }, /* z */ /* Final punctuation. */ - { ISFUNC, rl_insert }, /* { */ - { ISFUNC, rl_insert }, /* | */ - { ISFUNC, rl_insert }, /* } */ - { ISFUNC, rl_insert }, /* ~ */ - { ISFUNC, rl_rubout }, /* RUBOUT */ + { ISFUNC, rl_insert }, /* { */ + { ISFUNC, rl_insert }, /* | */ + { ISFUNC, rl_insert }, /* } */ + { ISFUNC, rl_insert }, /* ~ */ + { ISFUNC, rl_rubout }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Pure 8-bit characters (128 - 159). @@ -598,280 +598,280 @@ KEYMAP_ENTRY_ARRAY vi_insertion_keymap = { #if 0 KEYMAP_ENTRY_ARRAY vi_escape_keymap = { /* The regular control keys come first. */ - { ISFUNC, (Function *)0x0 }, /* Control-@ */ - { ISFUNC, (Function *)0x0 }, /* Control-a */ - { ISFUNC, (Function *)0x0 }, /* Control-b */ - { ISFUNC, (Function *)0x0 }, /* Control-c */ - { ISFUNC, (Function *)0x0 }, /* Control-d */ - { ISFUNC, (Function *)0x0 }, /* Control-e */ - { ISFUNC, (Function *)0x0 }, /* Control-f */ - { ISFUNC, (Function *)0x0 }, /* Control-g */ - { ISFUNC, (Function *)0x0 }, /* Control-h */ - { ISFUNC, rl_tab_insert}, /* Control-i */ - { ISFUNC, rl_emacs_editing_mode}, /* Control-j */ - { ISFUNC, rl_kill_line }, /* Control-k */ - { ISFUNC, (Function *)0x0 }, /* Control-l */ - { ISFUNC, rl_emacs_editing_mode}, /* Control-m */ - { ISFUNC, (Function *)0x0 }, /* Control-n */ - { ISFUNC, (Function *)0x0 }, /* Control-o */ - { ISFUNC, (Function *)0x0 }, /* Control-p */ - { ISFUNC, (Function *)0x0 }, /* Control-q */ - { ISFUNC, (Function *)0x0 }, /* Control-r */ - { ISFUNC, (Function *)0x0 }, /* Control-s */ - { ISFUNC, (Function *)0x0 }, /* Control-t */ - { ISFUNC, (Function *)0x0 }, /* Control-u */ - { ISFUNC, (Function *)0x0 }, /* Control-v */ - { ISFUNC, (Function *)0x0 }, /* Control-w */ - { ISFUNC, (Function *)0x0 }, /* Control-x */ - { ISFUNC, (Function *)0x0 }, /* Control-y */ - { ISFUNC, (Function *)0x0 }, /* Control-z */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */ + { ISFUNC, rl_tab_insert}, /* Control-i */ + { ISFUNC, rl_emacs_editing_mode}, /* Control-j */ + { ISFUNC, rl_kill_line }, /* Control-k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */ + { ISFUNC, rl_emacs_editing_mode}, /* Control-m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-x */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */ - { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ - { ISFUNC, (Function *)0x0 }, /* Control-\ */ - { ISFUNC, (Function *)0x0 }, /* Control-] */ - { ISFUNC, (Function *)0x0 }, /* Control-^ */ - { ISFUNC, rl_vi_undo }, /* Control-_ */ + { ISFUNC, rl_vi_movement_mode }, /* Control-[ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */ + { ISFUNC, rl_vi_undo }, /* Control-_ */ /* The start of printing characters. */ - { ISFUNC, (Function *)0x0 }, /* SPACE */ - { ISFUNC, (Function *)0x0 }, /* ! */ - { ISFUNC, (Function *)0x0 }, /* " */ - { ISFUNC, (Function *)0x0 }, /* # */ - { ISFUNC, (Function *)0x0 }, /* $ */ - { ISFUNC, (Function *)0x0 }, /* % */ - { ISFUNC, (Function *)0x0 }, /* & */ - { ISFUNC, (Function *)0x0 }, /* ' */ - { ISFUNC, (Function *)0x0 }, /* ( */ - { ISFUNC, (Function *)0x0 }, /* ) */ - { ISFUNC, (Function *)0x0 }, /* * */ - { ISFUNC, (Function *)0x0 }, /* + */ - { ISFUNC, (Function *)0x0 }, /* , */ - { ISFUNC, (Function *)0x0 }, /* - */ - { ISFUNC, (Function *)0x0 }, /* . */ - { ISFUNC, (Function *)0x0 }, /* / */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* # */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* % */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* & */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ( */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ) */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* * */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* + */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* , */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* - */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* . */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* / */ /* Regular digits. */ - { ISFUNC, rl_vi_arg_digit }, /* 0 */ - { ISFUNC, rl_vi_arg_digit }, /* 1 */ - { ISFUNC, rl_vi_arg_digit }, /* 2 */ - { ISFUNC, rl_vi_arg_digit }, /* 3 */ - { ISFUNC, rl_vi_arg_digit }, /* 4 */ - { ISFUNC, rl_vi_arg_digit }, /* 5 */ - { ISFUNC, rl_vi_arg_digit }, /* 6 */ - { ISFUNC, rl_vi_arg_digit }, /* 7 */ - { ISFUNC, rl_vi_arg_digit }, /* 8 */ - { ISFUNC, rl_vi_arg_digit }, /* 9 */ + { ISFUNC, rl_vi_arg_digit }, /* 0 */ + { ISFUNC, rl_vi_arg_digit }, /* 1 */ + { ISFUNC, rl_vi_arg_digit }, /* 2 */ + { ISFUNC, rl_vi_arg_digit }, /* 3 */ + { ISFUNC, rl_vi_arg_digit }, /* 4 */ + { ISFUNC, rl_vi_arg_digit }, /* 5 */ + { ISFUNC, rl_vi_arg_digit }, /* 6 */ + { ISFUNC, rl_vi_arg_digit }, /* 7 */ + { ISFUNC, rl_vi_arg_digit }, /* 8 */ + { ISFUNC, rl_vi_arg_digit }, /* 9 */ /* A little more punctuation. */ - { ISFUNC, (Function *)0x0 }, /* : */ - { ISFUNC, (Function *)0x0 }, /* ; */ - { ISFUNC, (Function *)0x0 }, /* < */ - { ISFUNC, (Function *)0x0 }, /* = */ - { ISFUNC, (Function *)0x0 }, /* > */ - { ISFUNC, (Function *)0x0 }, /* ? */ - { ISFUNC, (Function *)0x0 }, /* @ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* : */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* < */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* = */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* > */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */ /* Uppercase alphabet. */ - { ISFUNC, rl_do_lowercase_version }, /* A */ - { ISFUNC, rl_do_lowercase_version }, /* B */ - { ISFUNC, rl_do_lowercase_version }, /* C */ - { ISFUNC, rl_do_lowercase_version }, /* D */ - { ISFUNC, rl_do_lowercase_version }, /* E */ - { ISFUNC, rl_do_lowercase_version }, /* F */ - { ISFUNC, rl_do_lowercase_version }, /* G */ - { ISFUNC, rl_do_lowercase_version }, /* H */ - { ISFUNC, rl_do_lowercase_version }, /* I */ - { ISFUNC, rl_do_lowercase_version }, /* J */ - { ISFUNC, rl_do_lowercase_version }, /* K */ - { ISFUNC, rl_do_lowercase_version }, /* L */ - { ISFUNC, rl_do_lowercase_version }, /* M */ - { ISFUNC, rl_do_lowercase_version }, /* N */ - { ISFUNC, rl_do_lowercase_version }, /* O */ - { ISFUNC, rl_do_lowercase_version }, /* P */ - { ISFUNC, rl_do_lowercase_version }, /* Q */ - { ISFUNC, rl_do_lowercase_version }, /* R */ - { ISFUNC, rl_do_lowercase_version }, /* S */ - { ISFUNC, rl_do_lowercase_version }, /* T */ - { ISFUNC, rl_do_lowercase_version }, /* U */ - { ISFUNC, rl_do_lowercase_version }, /* V */ - { ISFUNC, rl_do_lowercase_version }, /* W */ - { ISFUNC, rl_do_lowercase_version }, /* X */ - { ISFUNC, rl_do_lowercase_version }, /* Y */ - { ISFUNC, rl_do_lowercase_version }, /* Z */ + { ISFUNC, rl_do_lowercase_version }, /* A */ + { ISFUNC, rl_do_lowercase_version }, /* B */ + { ISFUNC, rl_do_lowercase_version }, /* C */ + { ISFUNC, rl_do_lowercase_version }, /* D */ + { ISFUNC, rl_do_lowercase_version }, /* E */ + { ISFUNC, rl_do_lowercase_version }, /* F */ + { ISFUNC, rl_do_lowercase_version }, /* G */ + { ISFUNC, rl_do_lowercase_version }, /* H */ + { ISFUNC, rl_do_lowercase_version }, /* I */ + { ISFUNC, rl_do_lowercase_version }, /* J */ + { ISFUNC, rl_do_lowercase_version }, /* K */ + { ISFUNC, rl_do_lowercase_version }, /* L */ + { ISFUNC, rl_do_lowercase_version }, /* M */ + { ISFUNC, rl_do_lowercase_version }, /* N */ + { ISFUNC, rl_do_lowercase_version }, /* O */ + { ISFUNC, rl_do_lowercase_version }, /* P */ + { ISFUNC, rl_do_lowercase_version }, /* Q */ + { ISFUNC, rl_do_lowercase_version }, /* R */ + { ISFUNC, rl_do_lowercase_version }, /* S */ + { ISFUNC, rl_do_lowercase_version }, /* T */ + { ISFUNC, rl_do_lowercase_version }, /* U */ + { ISFUNC, rl_do_lowercase_version }, /* V */ + { ISFUNC, rl_do_lowercase_version }, /* W */ + { ISFUNC, rl_do_lowercase_version }, /* X */ + { ISFUNC, rl_do_lowercase_version }, /* Y */ + { ISFUNC, rl_do_lowercase_version }, /* Z */ /* Some more punctuation. */ - { ISFUNC, rl_arrow_keys }, /* [ */ - { ISFUNC, (Function *)0x0 }, /* \ */ - { ISFUNC, (Function *)0x0 }, /* ] */ - { ISFUNC, (Function *)0x0 }, /* ^ */ - { ISFUNC, (Function *)0x0 }, /* _ */ - { ISFUNC, (Function *)0x0 }, /* ` */ + { ISFUNC, rl_arrow_keys }, /* [ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */ /* Lowercase alphabet. */ - { ISFUNC, (Function *)0x0 }, /* a */ - { ISFUNC, (Function *)0x0 }, /* b */ - { ISFUNC, (Function *)0x0 }, /* c */ - { ISFUNC, (Function *)0x0 }, /* d */ - { ISFUNC, (Function *)0x0 }, /* e */ - { ISFUNC, (Function *)0x0 }, /* f */ - { ISFUNC, (Function *)0x0 }, /* g */ - { ISFUNC, (Function *)0x0 }, /* h */ - { ISFUNC, (Function *)0x0 }, /* i */ - { ISFUNC, (Function *)0x0 }, /* j */ - { ISFUNC, (Function *)0x0 }, /* k */ - { ISFUNC, (Function *)0x0 }, /* l */ - { ISFUNC, (Function *)0x0 }, /* m */ - { ISFUNC, (Function *)0x0 }, /* n */ - { ISFUNC, rl_arrow_keys }, /* o */ - { ISFUNC, (Function *)0x0 }, /* p */ - { ISFUNC, (Function *)0x0 }, /* q */ - { ISFUNC, (Function *)0x0 }, /* r */ - { ISFUNC, (Function *)0x0 }, /* s */ - { ISFUNC, (Function *)0x0 }, /* t */ - { ISFUNC, (Function *)0x0 }, /* u */ - { ISFUNC, (Function *)0x0 }, /* v */ - { ISFUNC, (Function *)0x0 }, /* w */ - { ISFUNC, (Function *)0x0 }, /* x */ - { ISFUNC, (Function *)0x0 }, /* y */ - { ISFUNC, (Function *)0x0 }, /* z */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* a */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* b */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* c */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* d */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* e */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* f */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* h */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* i */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* j */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* k */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* l */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* m */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* n */ + { ISFUNC, rl_arrow_keys }, /* o */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* p */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* q */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* r */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* s */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* t */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* u */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* v */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* w */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* x */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* y */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* z */ /* Final punctuation. */ - { ISFUNC, (Function *)0x0 }, /* { */ - { ISFUNC, (Function *)0x0 }, /* | */ - { ISFUNC, (Function *)0x0 }, /* } */ - { ISFUNC, (Function *)0x0 }, /* ~ */ - { ISFUNC, rl_backward_kill_word }, /* RUBOUT */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* { */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* | */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* } */ + { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */ + { ISFUNC, rl_backward_kill_word }, /* RUBOUT */ #if KEYMAP_SIZE > 128 /* Undefined keys. */ - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 }, - { ISFUNC, (Function *)0x0 } + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 }, + { ISFUNC, (rl_command_func_t *)0x0 } #endif /* KEYMAP_SIZE > 128 */ }; #endif diff --git a/readline/vi_mode.c b/readline/vi_mode.c index eb392b643ba..01df589f625 100644 --- a/readline/vi_mode.c +++ b/readline/vi_mode.c @@ -8,7 +8,7 @@ The GNU Readline Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 1, or + as published by the Free Software Foundation; either version 2, or (at your option) any later version. The GNU Readline Library is distributed in the hope that it will be @@ -19,7 +19,7 @@ The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, - 675 Mass Ave, Cambridge, MA 02139, USA. */ + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY /* **************************************************************** */ @@ -51,54 +51,23 @@ /* Some standard library routines. */ #include "rldefs.h" +#include "rlmbutil.h" + #include "readline.h" #include "history.h" -#ifndef _rl_digit_p -#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') -#endif - -#ifndef _rl_digit_value -#define _rl_digit_value(c) ((c) - '0') -#endif +#include "rlprivate.h" +#include "xmalloc.h" #ifndef member #define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0) #endif -#ifndef isident -#define isident(c) ((_rl_pure_alphabetic (c) || _rl_digit_p (c) || c == '_')) -#endif - -#ifndef exchange -#define exchange(x, y) do {int temp = x; x = y; y = temp;} while (0) -#endif - -extern char *xmalloc (), *xrealloc (); - -/* Variables imported from readline.c */ -extern int rl_point, rl_end, rl_mark; -extern FILE *rl_instream; -extern int rl_line_buffer_len, rl_explicit_arg, rl_numeric_arg; -extern Keymap _rl_keymap; -extern char *rl_prompt; -extern char *rl_line_buffer; -extern int rl_arg_sign; - -extern int _rl_doing_an_undo; -extern int _rl_undo_group_level; - -extern void _rl_dispatch (); -extern int _rl_char_search_internal (); - -extern void rl_extend_line_buffer (); -extern int rl_vi_check (); - /* Non-zero means enter insertion mode. */ static int _rl_vi_doing_insert; /* Command keys which do movement for xxx_to commands. */ -static const char *vi_motion = " hl^$0ftFt;,%wbeWBE|"; +static const char *vi_motion = " hl^$0ftFT;,%wbeWBE|"; /* Keymap used for vi replace characters. Created dynamically since rarely used. */ @@ -118,7 +87,11 @@ static int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */ static int _rl_vi_last_repeat = 1; static int _rl_vi_last_arg_sign = 1; static int _rl_vi_last_motion; +#if defined (HANDLE_MULTIBYTE) +static char _rl_vi_last_search_mbchar[MB_LEN_MAX]; +#else static int _rl_vi_last_search_char; +#endif static int _rl_vi_last_replacement; static int _rl_vi_last_key_before_insert; @@ -129,20 +102,18 @@ static int vi_redoing; static const char *vi_textmod = "_*\\AaIiCcDdPpYyRrSsXx~"; /* Arrays for the saved marks. */ -static int vi_mark_chars[27]; +static int vi_mark_chars['z' - 'a' + 1]; -static int rl_digit_loop1 (); +static void _rl_vi_stuff_insert PARAMS((int)); +static void _rl_vi_save_insert PARAMS((UNDO_LIST *)); +static int rl_digit_loop1 PARAMS((void)); void _rl_vi_initialize_line () { -#ifndef __QNXNTO__ - register uint i; -#else register unsigned int i; -#endif - for (i = 0; i < (int) sizeof (vi_mark_chars) / sizeof (int); i++) + for (i = 0; i < sizeof (vi_mark_chars) / sizeof (int); i++) vi_mark_chars[i] = -1; } @@ -189,12 +160,15 @@ int rl_vi_redo (count, c) int count, c __attribute__((unused)); { + int r; + if (!rl_explicit_arg) { rl_numeric_arg = _rl_vi_last_repeat; rl_arg_sign = _rl_vi_last_arg_sign; } + r = 0; vi_redoing = 1; /* If we're redoing an insert with `i', stuff in the inserted text and do not go into insertion mode. */ @@ -206,10 +180,10 @@ rl_vi_redo (count, c) rl_point--; } else - _rl_dispatch (_rl_vi_last_command, _rl_keymap); + r = _rl_dispatch (_rl_vi_last_command, _rl_keymap); vi_redoing = 0; - return (0); + return (r); } /* A placeholder for further expansion. */ @@ -219,10 +193,10 @@ rl_vi_undo (count, key) { return (rl_undo_command (count, key)); } - + /* Yank the nth arg from the previous line into this line at point. */ int -rl_vi_yank_arg (count, key) +rl_vi_yank_arg (count, key) int count, key __attribute__((unused)); { /* Readline thinks that the first word on a line is the 0th, while vi @@ -295,7 +269,7 @@ rl_vi_search (count, key) break; default: - ding (); + rl_ding (); break; } return (0); @@ -351,7 +325,7 @@ rl_vi_prev_word (count, key) if (rl_point == 0) { - ding (); + rl_ding (); return (0); } @@ -373,7 +347,7 @@ rl_vi_next_word (count, key) if (rl_point >= (rl_end - 1)) { - ding (); + rl_ding (); return (0); } @@ -391,7 +365,7 @@ rl_vi_end_word (count, key) { if (count < 0) { - ding (); + rl_ding (); return -1; } @@ -481,14 +455,14 @@ rl_vi_fword (count, ignore) while (count-- && rl_point < (rl_end - 1)) { /* Move to white space (really non-identifer). */ - if (isident (rl_line_buffer[rl_point])) + if (_rl_isident (rl_line_buffer[rl_point])) { - while (isident (rl_line_buffer[rl_point]) && rl_point < rl_end) + while (_rl_isident (rl_line_buffer[rl_point]) && rl_point < rl_end) rl_point++; } else /* if (!whitespace (rl_line_buffer[rl_point])) */ { - while (!isident (rl_line_buffer[rl_point]) && + while (!_rl_isident (rl_line_buffer[rl_point]) && !whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end) rl_point++; } @@ -518,9 +492,9 @@ rl_vi_bword (count, ignore) back so we don't get messed up by the rl_point++ down there in the while loop. Without this code, words like `l;' screw up the function. */ - last_is_ident = isident (rl_line_buffer[rl_point - 1]); - if ((isident (rl_line_buffer[rl_point]) && !last_is_ident) || - (!isident (rl_line_buffer[rl_point]) && last_is_ident)) + last_is_ident = _rl_isident (rl_line_buffer[rl_point - 1]); + if ((_rl_isident (rl_line_buffer[rl_point]) && !last_is_ident) || + (!_rl_isident (rl_line_buffer[rl_point]) && last_is_ident)) rl_point--; while (rl_point > 0 && whitespace (rl_line_buffer[rl_point])) @@ -528,10 +502,10 @@ rl_vi_bword (count, ignore) if (rl_point > 0) { - if (isident (rl_line_buffer[rl_point])) - while (--rl_point >= 0 && isident (rl_line_buffer[rl_point])); + if (_rl_isident (rl_line_buffer[rl_point])) + while (--rl_point >= 0 && _rl_isident (rl_line_buffer[rl_point])); else - while (--rl_point >= 0 && !isident (rl_line_buffer[rl_point]) && + while (--rl_point >= 0 && !_rl_isident (rl_line_buffer[rl_point]) && !whitespace (rl_line_buffer[rl_point])); rl_point++; } @@ -553,10 +527,10 @@ rl_vi_eword (count, ignore) if (rl_point < rl_end) { - if (isident (rl_line_buffer[rl_point])) - while (++rl_point < rl_end && isident (rl_line_buffer[rl_point])); + if (_rl_isident (rl_line_buffer[rl_point])) + while (++rl_point < rl_end && _rl_isident (rl_line_buffer[rl_point])); else - while (++rl_point < rl_end && !isident (rl_line_buffer[rl_point]) + while (++rl_point < rl_end && !_rl_isident (rl_line_buffer[rl_point]) && !whitespace (rl_line_buffer[rl_point])); } rl_point--; @@ -578,7 +552,17 @@ rl_vi_append_mode (count, key) int count __attribute__((unused)), key; { if (rl_point < rl_end) - rl_point++; + { + if (MB_CUR_MAX == 1 || rl_byte_oriented) + rl_point++; + else + { + int point = rl_point; + rl_forward_char (1, key); + if (point == rl_point) + rl_point = rl_end; + } + } rl_vi_insertion_mode (1, key); return (0); } @@ -632,17 +616,18 @@ _rl_vi_save_insert (up) if (len >= vi_insert_buffer_size) { vi_insert_buffer_size += (len + 32) - (len % 32); - vi_insert_buffer = xrealloc (vi_insert_buffer, vi_insert_buffer_size); + vi_insert_buffer = (char *)xrealloc (vi_insert_buffer, vi_insert_buffer_size); } strncpy (vi_insert_buffer, rl_line_buffer + start, len - 1); vi_insert_buffer[len-1] = '\0'; } - + void _rl_vi_done_inserting () { if (_rl_vi_doing_insert) { + /* The `C', `s', and `S' commands set this. */ rl_end_undo_group (); /* Now, the text between rl_undo_list->next->start and rl_undo_list->next->end is what was inserted while in insert @@ -671,7 +656,7 @@ rl_vi_movement_mode (count, key) int count __attribute__((unused)), key; { if (rl_point > 0) - rl_backward (1, key); + rl_backward_char (1, key); _rl_keymap = vi_movement_keymap; _rl_vi_done_inserting (); @@ -688,6 +673,51 @@ rl_vi_arg_digit (count, c) return (rl_digit_argument (count, c)); } +/* Change the case of the next COUNT characters. */ +#if defined (HANDLE_MULTIBYTE) +static int +_rl_vi_change_mbchar_case (count) + int count; +{ + wchar_t wc; + char mb[MB_LEN_MAX]; + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_adjust_point (rl_line_buffer, rl_point, &ps) > 0) + count--; + while (count-- && rl_point < rl_end) + { + mbrtowc (&wc, rl_line_buffer + rl_point, rl_end - rl_point, &ps); + if (iswupper (wc)) + wc = towlower (wc); + else if (iswlower (wc)) + wc = towupper (wc); + else + { + /* Just skip over chars neither upper nor lower case */ + rl_forward_char (1, 0); + continue; + } + + /* Vi is kind of strange here. */ + if (wc) + { + wctomb (mb, wc); + rl_begin_undo_group (); + rl_delete (1, 0); + rl_insert_text (mb); + rl_end_undo_group (); + rl_vi_check (); + } + else + rl_forward_char (1, 0); + } + + return 0; +} +#endif + int rl_vi_change_case (count, ignore) int count, ignore __attribute__((unused)); @@ -698,6 +728,11 @@ rl_vi_change_case (count, ignore) if (rl_point >= rl_end) return (0); +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + return (_rl_vi_change_mbchar_case (count)); +#endif + while (count-- && rl_point < rl_end) { if (_rl_uppercase_p (rl_line_buffer[rl_point])) @@ -707,7 +742,7 @@ rl_vi_change_case (count, ignore) else { /* Just skip over characters neither upper nor lower case. */ - rl_forward (1, c); + rl_forward_char (1, c); continue; } @@ -716,12 +751,12 @@ rl_vi_change_case (count, ignore) { rl_begin_undo_group (); rl_delete (1, c); - rl_insert (1, c); + _rl_insert_char (1, c); rl_end_undo_group (); rl_vi_check (); } else - rl_forward (1, c); + rl_forward_char (1, c); } return (0); } @@ -731,10 +766,10 @@ rl_vi_put (count, key) int count __attribute__((unused)), key; { if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end)) - rl_point++; + rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); rl_yank (1, key); - rl_backward (1, key); + rl_backward_char (1, key); return (0); } @@ -742,7 +777,12 @@ int rl_vi_check () { if (rl_point && rl_point == rl_end) - rl_point--; + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + else + rl_point--; + } return (0); } @@ -765,7 +805,9 @@ rl_vi_domove (key, nextkey) int old_end; rl_mark = rl_point; + RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); *nextkey = c; if (!member (c, vi_motion)) @@ -776,7 +818,9 @@ rl_vi_domove (key, nextkey) rl_numeric_arg = _rl_digit_value (c); rl_digit_loop1 (); rl_numeric_arg *= save; + RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); /* real command */ + RL_UNSETSTATE(RL_STATE_MOREINPUT); *nextkey = c; } else if (key == c && (key == 'd' || key == 'y' || key == 'c')) @@ -840,24 +884,36 @@ rl_vi_domove (key, nextkey) } if (rl_mark < rl_point) - exchange (rl_point, rl_mark); + SWAP (rl_point, rl_mark); return (0); } /* A simplified loop for vi. Don't dispatch key at end. - Don't recognize minus sign? */ + Don't recognize minus sign? + Should this do rl_save_prompt/rl_restore_prompt? */ static int rl_digit_loop1 () { int key, c; + RL_SETSTATE(RL_STATE_NUMERICARG); while (1) { - rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg, 0); + if (rl_numeric_arg > 1000000) + { + rl_explicit_arg = rl_numeric_arg = 0; + rl_ding (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return 1; + } + rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); + RL_SETSTATE(RL_STATE_MOREINPUT); key = c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); - if (_rl_keymap[c].type == ISFUNC && + if (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument) { rl_numeric_arg *= 4; @@ -880,6 +936,8 @@ rl_digit_loop1 () break; } } + + RL_UNSETSTATE(RL_STATE_NUMERICARG); return (0); } @@ -896,7 +954,7 @@ rl_vi_delete_to (count, key) if (rl_vi_domove (key, &c)) { - ding (); + rl_ding (); return -1; } @@ -924,7 +982,7 @@ rl_vi_change_to (count, key) if (rl_vi_domove (key, &c)) { - ding (); + rl_ding (); return -1; } @@ -974,7 +1032,7 @@ rl_vi_yank_to (count, key) if (rl_vi_domove (key, &c)) { - ding (); + rl_ding (); return -1; } @@ -1000,19 +1058,22 @@ rl_vi_delete (count, key) if (rl_end == 0) { - ding (); + rl_ding (); return -1; } - end = rl_point + count; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + end = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); + else + end = rl_point + count; if (end >= rl_end) end = rl_end; rl_kill_text (rl_point, end); - + if (rl_point > 0 && rl_point == rl_end) - rl_backward (1, key); + rl_backward_char (1, key); return (0); } @@ -1037,7 +1098,12 @@ int rl_vi_char_search (count, key) int count, key; { +#if defined (HANDLE_MULTIBYTE) + static char *target; + static int mb_len; +#else static char target; +#endif static int orig_dir, dir; if (key == ';' || key == ',') @@ -1045,9 +1111,22 @@ rl_vi_char_search (count, key) else { if (vi_redoing) +#if defined (HANDLE_MULTIBYTE) + target = _rl_vi_last_search_mbchar; +#else target = _rl_vi_last_search_char; +#endif else - _rl_vi_last_search_char = target = rl_getc (rl_instream); + { +#if defined (HANDLE_MULTIBYTE) + mb_len = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); + target = _rl_vi_last_search_mbchar; +#else + RL_SETSTATE(RL_STATE_MOREINPUT); + _rl_vi_last_search_char = target = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); +#endif + } switch (key) { @@ -1069,7 +1148,11 @@ rl_vi_char_search (count, key) } } +#if defined (HANDLE_MULTIBYTE) + return (_rl_char_search_internal (count, dir, target, mb_len)); +#else return (_rl_char_search_internal (count, dir, target)); +#endif } /* Match brackets */ @@ -1077,19 +1160,30 @@ int rl_vi_match (ignore, key) int ignore __attribute__((unused)), key; { - int count = 1, brack, pos; + int count = 1, brack, pos, tmp, pre; pos = rl_point; if ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) { - while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 && - rl_point < rl_end - 1) - rl_forward (1, key); + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) + { + pre = rl_point; + rl_forward_char (1, key); + if (pre == rl_point) + break; + } + } + else + while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 && + rl_point < rl_end - 1) + rl_forward_char (1, key); if (brack <= 0) { rl_point = pos; - ding (); + rl_ding (); return -1; } } @@ -1100,7 +1194,16 @@ rl_vi_match (ignore, key) { while (count) { - if (--pos >= 0) + tmp = pos; + if (MB_CUR_MAX == 1 || rl_byte_oriented) + pos--; + else + { + pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); + if (tmp == pos) + pos--; + } + if (pos >= 0) { int b = rl_vi_bracktype (rl_line_buffer[pos]); if (b == -brack) @@ -1110,7 +1213,7 @@ rl_vi_match (ignore, key) } else { - ding (); + rl_ding (); return -1; } } @@ -1119,7 +1222,12 @@ rl_vi_match (ignore, key) { /* brack > 0 */ while (count) { - if (++pos < rl_end) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + pos++; + else + pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY); + + if (pos < rl_end) { int b = rl_vi_bracktype (rl_line_buffer[pos]); if (b == -brack) @@ -1129,7 +1237,7 @@ rl_vi_match (ignore, key) } else { - ding (); + rl_ding (); return -1; } } @@ -1154,6 +1262,11 @@ rl_vi_bracktype (c) } } +/* XXX - think about reading an entire mbchar with _rl_read_mbchar and + inserting it in one bunch instead of the loop below (like in + rl_vi_char_search or _rl_vi_change_mbchar_case. Set c to mbchar[0] + for test against 033 or ^C. Make sure that _rl_read_mbchar does + this right. */ int rl_vi_change_char (count, key) int count, key __attribute__((unused)); @@ -1163,7 +1276,11 @@ rl_vi_change_char (count, key) if (vi_redoing) c = _rl_vi_last_replacement; else - _rl_vi_last_replacement = c = rl_getc (rl_instream); + { + RL_SETSTATE(RL_STATE_MOREINPUT); + _rl_vi_last_replacement = c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + } if (c == '\033' || c == CTRL ('C')) return -1; @@ -1173,9 +1290,19 @@ rl_vi_change_char (count, key) rl_begin_undo_group (); rl_delete (1, c); - rl_insert (1, c); +#if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + while (_rl_insert_char (1, c)) + { + RL_SETSTATE (RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE (RL_STATE_MOREINPUT); + } + else +#endif + _rl_insert_char (1, c); if (count == 0) - rl_backward (1, c); + rl_backward_char (1, c); rl_end_undo_group (); } @@ -1186,66 +1313,29 @@ int rl_vi_subst (count, key) int count, key; { - rl_begin_undo_group (); + /* If we are redoing, rl_vi_change_to will stuff the last motion char */ + if (vi_redoing == 0) + rl_stuff_char ((key == 'S') ? 'c' : ' '); /* `S' == `cc', `s' == `c ' */ - if (_rl_uppercase_p (key)) - { - rl_beg_of_line (1, key); - rl_kill_line (1, key); - } - else - rl_delete_text (rl_point, rl_point+count); - - rl_end_undo_group (); - - _rl_vi_set_last (key, count, rl_arg_sign); - - if (vi_redoing) - { - int o = _rl_doing_an_undo; - - _rl_doing_an_undo = 1; - if (vi_insert_buffer && *vi_insert_buffer) - rl_insert_text (vi_insert_buffer); - _rl_doing_an_undo = o; - } - else - { - rl_begin_undo_group (); - _rl_vi_doing_insert = 1; - rl_vi_insertion_mode (1, key); - } - - return (0); + return (rl_vi_change_to (count, 'c')); } int rl_vi_overstrike (count, key) int count, key; { - int i; - if (_rl_vi_doing_insert == 0) { _rl_vi_doing_insert = 1; rl_begin_undo_group (); } - for (i = 0; i < count; i++) + if (count > 0) { - vi_replace_count++; - rl_begin_undo_group (); - - if (rl_point < rl_end) - { - rl_delete (1, key); - rl_insert (1, key); - } - else - rl_insert (1, key); - - rl_end_undo_group (); + _rl_overwrite_char (count, key); + vi_replace_count += count; } + return (0); } @@ -1259,7 +1349,7 @@ rl_vi_overstrike_delete (count, key) { if (vi_replace_count == 0) { - ding (); + rl_ding (); break; } s = rl_point; @@ -1268,7 +1358,7 @@ rl_vi_overstrike_delete (count, key) vi_replace_count--; if (rl_point == s) - rl_backward (1, key); + rl_backward_char (1, key); } if (vi_replace_count == 0 && _rl_vi_doing_insert) @@ -1329,7 +1419,7 @@ rl_vi_possible_completions() } else if (rl_line_buffer[rl_point - 1] == ';') { - ding (); + rl_ding (); return (0); } @@ -1347,10 +1437,13 @@ rl_vi_set_mark (count, key) { int ch; + RL_SETSTATE(RL_STATE_MOREINPUT); ch = rl_read_key (); - if (_rl_lowercase_p (ch) == 0) + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (ch < 'a' || ch > 'z') { - ding (); + rl_ding (); return -1; } ch -= 'a'; @@ -1364,22 +1457,25 @@ rl_vi_goto_mark (count, key) { int ch; + RL_SETSTATE(RL_STATE_MOREINPUT); ch = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + if (ch == '`') { rl_point = rl_mark; return 0; } - else if (_rl_lowercase_p (ch) == 0) + else if (ch < 'a' || ch > 'z') { - ding (); + rl_ding (); return -1; } ch -= 'a'; if (vi_mark_chars[ch] == -1) { - ding (); + rl_ding (); return -1; } rl_point = vi_mark_chars[ch]; diff --git a/readline/xmalloc.c b/readline/xmalloc.c index 4160651191b..8985d340d39 100644 --- a/readline/xmalloc.c +++ b/readline/xmalloc.c @@ -7,7 +7,7 @@ Readline is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 1, or (at your option) any + Free Software Foundation; either version 2, or (at your option) any later version. Readline is distributed in the hope that it will be useful, but @@ -17,7 +17,8 @@ You should have received a copy of the GNU General Public License along with Readline; see the file COPYING. If not, write to the Free - Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ +#define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) #include @@ -31,7 +32,7 @@ # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ -static void memory_error_and_abort (); +#include "xmalloc.h" /* **************************************************************** */ /* */ @@ -39,35 +40,6 @@ static void memory_error_and_abort (); /* */ /* **************************************************************** */ -/* Return a pointer to free()able block of memory large enough - to hold BYTES number of bytes. If the memory cannot be allocated, - print an error message and abort. */ -char * -xmalloc (bytes) - int bytes; -{ - char *temp; - - temp = (char *)malloc (bytes); - if (temp == 0) - memory_error_and_abort ("xmalloc"); - return (temp); -} - -char * -xrealloc (pointer, bytes) - char *pointer; - int bytes; -{ - char *temp; - - temp = pointer ? (char *)realloc (pointer, bytes) : (char *)malloc (bytes); - - if (temp == 0) - memory_error_and_abort ("xrealloc"); - return (temp); -} - static void memory_error_and_abort (fname) char *fname; @@ -76,11 +48,40 @@ memory_error_and_abort (fname) exit (2); } +/* Return a pointer to free()able block of memory large enough + to hold BYTES number of bytes. If the memory cannot be allocated, + print an error message and abort. */ +PTR_T +xmalloc (bytes) + size_t bytes; +{ + PTR_T temp; + + temp = malloc (bytes); + if (temp == 0) + memory_error_and_abort ("xmalloc"); + return (temp); +} + +PTR_T +xrealloc (pointer, bytes) + PTR_T pointer; + size_t bytes; +{ + PTR_T temp; + + temp = pointer ? realloc (pointer, bytes) : malloc (bytes); + + if (temp == 0) + memory_error_and_abort ("xrealloc"); + return (temp); +} + /* Use this as the function to call when adding unwind protects so we don't need to know what free() returns. */ void xfree (string) - char *string; + PTR_T string; { if (string) free (string); diff --git a/readline/xmalloc.h b/readline/xmalloc.h new file mode 100644 index 00000000000..9cb08ba21f1 --- /dev/null +++ b/readline/xmalloc.h @@ -0,0 +1,46 @@ +/* xmalloc.h -- memory allocation that aborts on errors. */ + +/* Copyright (C) 1999 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + +#if !defined (_XMALLOC_H_) +#define _XMALLOC_H_ + +#if defined (READLINE_LIBRARY) +# include "rlstdc.h" +#else +# include +#endif + +#ifndef PTR_T + +#ifdef __STDC__ +# define PTR_T void * +#else +# define PTR_T char * +#endif + +#endif /* !PTR_T */ + +extern PTR_T xmalloc PARAMS((size_t)); +extern PTR_T xrealloc PARAMS((void *, size_t)); +extern void xfree PARAMS((void *)); + +#endif /* _XMALLOC_H_ */ From d050750f1fbcdf3d85413e95d77ee117db2d2571 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 16:27:26 +0200 Subject: [PATCH 178/246] row0mysql.c, row0mysql.h, ha_innodb.cc, sql_table.cc, handler.h: Fix crash when InnoDB temp table is truncated + fix bug: do not X-lock rows under LOCK TABLES except if the table is temp sql/handler.h: Fix crash when InnoDB temp table is truncated + fix bug: do not X-lock rows under LOCK TABLES except if the table is temp sql/sql_table.cc: Fix crash when InnoDB temp table is truncated + fix bug: do not X-lock rows under LOCK TABLES except if the table is temp sql/ha_innodb.cc: Fix crash when InnoDB temp table is truncated + fix bug: do not X-lock rows under LOCK TABLES except if the table is temp innobase/include/row0mysql.h: Fix crash when InnoDB temp table is truncated + fix bug: do not X-lock rows under LOCK TABLES except if the table is temp innobase/row/row0mysql.c: Fix crash when InnoDB temp table is truncated + fix bug: do not X-lock rows under LOCK TABLES except if the table is temp --- innobase/include/row0mysql.h | 4 ++++ innobase/row/row0mysql.c | 2 ++ sql/ha_innodb.cc | 23 ++++++++++++++--------- sql/handler.h | 1 - sql/sql_table.cc | 1 - 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h index c72c905edf5..44b470fe7ea 100644 --- a/innobase/include/row0mysql.h +++ b/innobase/include/row0mysql.h @@ -408,6 +408,10 @@ struct row_prebuilt_struct { an SQL statement: we may have to set an intention lock on the table, create a consistent read view etc. */ + ibool mysql_has_locked; /* this is set TRUE when MySQL + calls external_lock on this handle + with a lock flag, and set FALSE when + with the F_UNLOCK flag */ ibool clust_index_was_generated; /* if the user did not define a primary key in MySQL, then Innobase diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index f228a75ad3a..9ce86b5d487 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -320,6 +320,8 @@ row_create_prebuilt( prebuilt->sql_stat_start = TRUE; + prebuilt->mysql_has_locked = FALSE; + prebuilt->index = NULL; prebuilt->n_template = 0; prebuilt->mysql_template = NULL; diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 58b99a5329f..95bf8e8eb75 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3077,19 +3077,22 @@ ha_innobase::create( } } - error = row_table_add_foreign_constraints(trx, - create_info->create_statement, norm_name); + if (current_thd->query != NULL) { + + error = row_table_add_foreign_constraints(trx, + current_thd->query, norm_name); - error = convert_error_code_to_mysql(error, NULL); + error = convert_error_code_to_mysql(error, NULL); - if (error) { - innobase_commit_low(trx); + if (error) { + innobase_commit_low(trx); - row_mysql_unlock_data_dictionary(trx); + row_mysql_unlock_data_dictionary(trx); - trx_free_for_mysql(trx); + trx_free_for_mysql(trx); - DBUG_RETURN(error); + DBUG_RETURN(error); + } } innobase_commit_low(trx); @@ -3751,7 +3754,7 @@ ha_innobase::start_stmt( prebuilt->hint_no_need_to_fetch_extra_cols = TRUE; prebuilt->read_just_key = 0; - if (prebuilt->select_lock_type == LOCK_NONE) { + if (!prebuilt->mysql_has_locked) { /* This handle is for a temporary table created inside this same LOCK TABLES; since MySQL does NOT call external_lock in this case, we must use x-row locks inside InnoDB to be @@ -3829,6 +3832,7 @@ ha_innobase::external_lock( thd->transaction.all.innodb_active_trans = 1; trx->n_mysql_tables_in_use++; + prebuilt->mysql_has_locked = TRUE; if (thd->variables.tx_isolation != ISO_REPEATABLE_READ) { trx->isolation_level = innobase_map_isolation_level( @@ -3852,6 +3856,7 @@ ha_innobase::external_lock( } } else { trx->n_mysql_tables_in_use--; + prebuilt->mysql_has_locked = FALSE; auto_inc_counter_for_this_stat = 0; if (trx->n_mysql_tables_in_use == 0) { diff --git a/sql/handler.h b/sql/handler.h index a018af29806..b9209d087a0 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -157,7 +157,6 @@ typedef struct st_ha_create_information ulonglong auto_increment_value; char *comment,*password; char *data_file_name, *index_file_name; - char *create_statement; uint options; /* OR of HA_CREATE_ options */ uint raid_type,raid_chunks; ulong raid_chunksize; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 1e7614ccc95..aa0946113c9 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -695,7 +695,6 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, thd->proc_info="creating table"; - create_info->create_statement = thd->query; create_info->table_options=db_options; if (rea_create_table(path, create_info, fields, key_count, key_info_buffer)) From 951669f048155a6366a5cecc9cfe3f03ce77a141 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 18:48:22 +0400 Subject: [PATCH 179/246] fix for byte ordering bug in HEAP rb-tree --- heap/hp_create.c | 16 ++++++++++++++++ heap/hp_hash.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/heap/hp_create.c b/heap/hp_create.c index 6c38d54cb12..40b8202d94f 100644 --- a/heap/hp_create.c +++ b/heap/hp_create.c @@ -55,6 +55,22 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, if (keyinfo->algorithm == HA_KEY_ALG_BTREE) keyinfo->rb_tree.size_of_element++; } + switch (keyinfo->seg[j].type) { + case HA_KEYTYPE_SHORT_INT: + case HA_KEYTYPE_LONG_INT: + case HA_KEYTYPE_FLOAT: + case HA_KEYTYPE_DOUBLE: + case HA_KEYTYPE_USHORT_INT: + case HA_KEYTYPE_ULONG_INT: + case HA_KEYTYPE_LONGLONG: + case HA_KEYTYPE_ULONGLONG: + case HA_KEYTYPE_INT24: + case HA_KEYTYPE_UINT24: + case HA_KEYTYPE_INT8: + keyinfo->seg[j].flag|= HA_SWAP_KEY; + default: + break; + } } keyinfo->length= length; length+= keyinfo->rb_tree.size_of_element + diff --git a/heap/hp_hash.c b/heap/hp_hash.c index 946659621fe..cd70d2ab532 100644 --- a/heap/hp_hash.c +++ b/heap/hp_hash.c @@ -443,6 +443,43 @@ uint hp_rb_make_key(HP_KEYDEF *keydef, byte *key, if (!(*key++= 1 - test(rec[seg->null_pos] & seg->null_bit))) continue; } + if (seg->flag & HA_SWAP_KEY) + { + uint length= seg->length; + byte *pos= (byte*) rec + seg->start; + +#ifdef HAVE_ISNAN + if (seg->type == HA_KEYTYPE_FLOAT) + { + float nr; + float4get(nr, pos); + if (isnan(nr)) + { + /* Replace NAN with zero */ + bzero(key, length); + key+= length; + continue; + } + } + else if (seg->type == HA_KEYTYPE_DOUBLE) + { + double nr; + float8get(nr, pos); + if (isnan(nr)) + { + bzero(key, length); + key+= length; + continue; + } + } +#endif + pos+= length; + while (length--) + { + *key++= *--pos; + } + continue; + } memcpy(key, rec + seg->start, (size_t) seg->length); key+= seg->length; } @@ -467,6 +504,18 @@ uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old, uint k_len) continue; } } + if (seg->flag & HA_SWAP_KEY) + { + uint length= seg->length; + byte *pos= (byte*) old + length; + + k_len-= length; + while (length--) + { + *key++= *--pos; + } + continue; + } memcpy((byte*) key, old, seg->length); key+= seg->length; k_len-= seg->length; From 0fb06a68cedeefd92ac49907e52fb47047ccc9c0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 16:54:52 +0200 Subject: [PATCH 180/246] row0mysql.c, row0mysql.h: Backport of bug fix in 4.0: do not x-lock rows under LOCK TABLES READ unless the table is a temp table innobase/include/row0mysql.h: Backport of bug fix in 4.0: do not x-lock rows under LOCK TABLES READ unless the table is a temp table innobase/row/row0mysql.c: Backport of bug fix in 4.0: do not x-lock rows under LOCK TABLES READ unless the table is a temp table --- innobase/include/row0mysql.h | 1 + innobase/row/row0mysql.c | 1 + 2 files changed, 2 insertions(+) diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h index 8152c534f48..75c16384458 100644 --- a/innobase/include/row0mysql.h +++ b/innobase/include/row0mysql.h @@ -393,6 +393,7 @@ struct row_prebuilt_struct { an SQL statement: we may have to set an intention lock on the table, create a consistent read view etc. */ + ibool mysql_has_locked; ibool clust_index_was_generated; /* if the user did not define a primary key in MySQL, then Innobase diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index ebb3cbe8dc8..705ded785fc 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -320,6 +320,7 @@ row_create_prebuilt( prebuilt->trx = NULL; prebuilt->sql_stat_start = TRUE; + prebuilt->mysql_has_locked = FALSE; prebuilt->index = NULL; prebuilt->n_template = 0; From 9b891cee5576e2d1b2aa6bf36ad1416d0eec3f9f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 17:08:07 +0200 Subject: [PATCH 181/246] ha_innobase.cc: Backport of bug fix in 4.0: do not x-lock rows under LOCK TABLES READ unless the table is a temp table sql/ha_innobase.cc: Backport of bug fix in 4.0: do not x-lock rows under LOCK TABLES READ unless the table is a temp table --- sql/ha_innobase.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 6b5ba7d841e..2f79f8d6ba9 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -3453,7 +3453,7 @@ ha_innobase::start_stmt( prebuilt->hint_no_need_to_fetch_extra_cols = TRUE; prebuilt->read_just_key = 0; - if (prebuilt->select_lock_type == LOCK_NONE) { + if (!prebuilt->mysql_has_locked) { /* This handle is for a temporary table created inside this same LOCK TABLES; since MySQL does NOT call external_lock in this case, we must use x-row locks inside InnoDB to be @@ -3510,6 +3510,7 @@ ha_innobase::external_lock( thd->transaction.all.innodb_active_trans = 1; trx->n_mysql_tables_in_use++; + prebuilt->mysql_has_locked = TRUE; if (thd->tx_isolation == ISO_SERIALIZABLE && prebuilt->select_lock_type == LOCK_NONE) { @@ -3527,6 +3528,7 @@ ha_innobase::external_lock( } } else { trx->n_mysql_tables_in_use--; + prebuilt->mysql_has_locked = FALSE; auto_inc_counter_for_this_stat = 0; if (trx->n_mysql_tables_in_use == 0) { From 9705257270b28757eec9aac63f664a93dd5ac601 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 17:20:57 +0200 Subject: [PATCH 182/246] Makng sure that LIMIT 0 works in this case to: select sql_calc_found_rows * from table limit 0; It does ... --- mysql-test/r/select_found.result | 5 +++++ mysql-test/t/select_found.test | 2 ++ 2 files changed, 7 insertions(+) diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index bbf0a8ba09f..a48e1e16d37 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -178,4 +178,9 @@ titre numeropost maxnumrep SELECT FOUND_ROWS(); FOUND_ROWS() 2 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0; +titre numeropost maxnumrep +SELECT FOUND_ROWS(); +FOUND_ROWS() +3 drop table t1; diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index c8458dd3aea..b380c86d2db 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -88,4 +88,6 @@ SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0; SELECT FOUND_ROWS(); SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE numeropost > 1 LIMIT 0; SELECT FOUND_ROWS(); +SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0; +SELECT FOUND_ROWS(); drop table t1; From f6da2b2460917b7bd43af343b00e2c04d7b7a692 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 19:58:46 +0400 Subject: [PATCH 183/246] added 'USING BTREE' for 'show create table' for HEAP --- sql/sql_show.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index bd8abda5e87..c039f84dc77 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1140,6 +1140,10 @@ store_create_info(THD *thd, TABLE *table, String *packet) if (!found_primary) append_identifier(thd,packet,key_info->name); + if (table->db_type == DB_TYPE_HEAP && + key_info->algorithm == HA_KEY_ALG_BTREE) + packet->append(" USING BTREE", 12); + // +BAR: send USING only in non-default case: non-spatial rtree if((key_info->algorithm == HA_KEY_ALG_RTREE) && !(key_info->flags & HA_SPATIAL)) From e96234aa6bc24fa5f82d323f9f348c404916edc4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 19:43:45 +0200 Subject: [PATCH 184/246] fixed another small bug with LIMIT ) --- mysql-test/r/select_found.result | 5 +++++ mysql-test/t/select_found.test | 2 ++ sql/sql_select.cc | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index a48e1e16d37..8500e244d08 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -183,4 +183,9 @@ titre numeropost maxnumrep SELECT FOUND_ROWS(); FOUND_ROWS() 3 +SELECT SQL_CALC_FOUND_ROWS * FROM t1 ORDER BY numeropost LIMIT 0; +titre numeropost maxnumrep +SELECT FOUND_ROWS(); +FOUND_ROWS() +3 drop table t1; diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index b380c86d2db..316e7894344 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -90,4 +90,6 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE numeropost > 1 LIMIT 0; SELECT FOUND_ROWS(); SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0; SELECT FOUND_ROWS(); +SELECT SQL_CALC_FOUND_ROWS * FROM t1 ORDER BY numeropost LIMIT 0; +SELECT FOUND_ROWS(); drop table t1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b596d27b5af..05551980309 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -324,7 +324,7 @@ JOIN::prepare(TABLE_LIST *tables_init, this->group= group_list != 0; row_limit= ((select_distinct || order || group_list) ? HA_POS_ERROR : unit->select_limit_cnt); - do_send_rows = (row_limit) ? 1 : 0; + do_send_rows = (unit->select_limit_cnt) ? 1 : 0; this->unit= unit; #ifdef RESTRICTED_GROUP From 4813f049904c5f1e0d27dd280a1a214112a48e97 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Nov 2002 22:59:01 +0200 Subject: [PATCH 185/246] set_var.cc: Fix potential bus error in 64-bit computers in SHOW VARIABLES, if int is only 32-bit in them sql/set_var.cc: Fix potential bus error in 64-bit computers in SHOW VARIABLES, if int is only 32-bit in them --- sql/set_var.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/set_var.cc b/sql/set_var.cc index 8e12f98b09b..0675f7b4286 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -431,7 +431,7 @@ struct show_var_st init_vars[]= { {"innodb_file_io_threads", (char*) &innobase_file_io_threads, SHOW_LONG }, {"innodb_force_recovery", (char*) &innobase_force_recovery, SHOW_LONG }, {"innodb_thread_concurrency", (char*) &innobase_thread_concurrency, SHOW_LONG }, - {"innodb_flush_log_at_trx_commit", (char*) &innobase_flush_log_at_trx_commit, SHOW_LONG}, + {"innodb_flush_log_at_trx_commit", (char*) &innobase_flush_log_at_trx_commit, SHOW_INT}, {"innodb_fast_shutdown", (char*) &innobase_fast_shutdown, SHOW_MY_BOOL}, {"innodb_flush_method", (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR}, {"innodb_lock_wait_timeout", (char*) &innobase_lock_wait_timeout, SHOW_LONG }, From 666dd7ba7f020aca156b16be7922dcce66039bf4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Nov 2002 13:30:48 +0400 Subject: [PATCH 186/246] discard warnings in readline 4.3 --- readline/display.c | 4 ++-- readline/mbutil.c | 4 ++-- readline/rlmbutil.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/readline/display.c b/readline/display.c index 180061b29ae..82899d04f0c 100644 --- a/readline/display.c +++ b/readline/display.c @@ -70,7 +70,7 @@ static void insert_some_chars PARAMS((char *, int, int)); static void cr PARAMS((void)); #if defined (HANDLE_MULTIBYTE) -static int _rl_col_width PARAMS((char *, int, int)); +static int _rl_col_width PARAMS((const char *, int, int)); static int *_rl_wrapped_line; #else # define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s)) @@ -2118,7 +2118,7 @@ _rl_current_display_line () scan from the beginning of the string to take the state into account. */ static int _rl_col_width (str, start, end) - char *str; + const char *str; int start, end; { wchar_t wc; diff --git a/readline/mbutil.c b/readline/mbutil.c index 1b7342bfc0b..debad6320ce 100644 --- a/readline/mbutil.c +++ b/readline/mbutil.c @@ -196,7 +196,7 @@ _rl_find_prev_mbchar_internal (string, seed, find_non_zero) if it couldn't parse a complete multibyte character. */ int _rl_get_char_len (src, ps) - char *src; + const char *src; mbstate_t *ps; { size_t tmp; @@ -251,7 +251,7 @@ _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2) it returns -1 */ int _rl_adjust_point(string, point, ps) - char *string; + const char *string; int point; mbstate_t *ps; { diff --git a/readline/rlmbutil.h b/readline/rlmbutil.h index 27ca32bfc7d..4660a72fce5 100644 --- a/readline/rlmbutil.h +++ b/readline/rlmbutil.h @@ -82,8 +82,8 @@ extern int _rl_find_next_mbchar PARAMS((char *, int, int, int)); #ifdef HANDLE_MULTIBYTE extern int _rl_compare_chars PARAMS((char *, int, mbstate_t *, char *, int, mbstate_t *)); -extern int _rl_get_char_len PARAMS((char *, mbstate_t *)); -extern int _rl_adjust_point PARAMS((char *, int, mbstate_t *)); +extern int _rl_get_char_len PARAMS((const char *, mbstate_t *)); +extern int _rl_adjust_point PARAMS((const char *, int, mbstate_t *)); extern int _rl_read_mbchar PARAMS((char *, int)); extern int _rl_read_mbstring PARAMS((int, char *, int)); From da6fc2821016a3e4dbba997af4b5a8fa4bb6fcb4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Nov 2002 15:17:17 +0100 Subject: [PATCH 187/246] bug in _ftb_strstr fixed :) --- myisam/ft_boolean_search.c | 6 +++--- mysql-test/r/fulltext.result | 3 +++ mysql-test/t/fulltext.test | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index a8fa011edf6..97c55c1d937 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -348,9 +348,9 @@ static int _ftb_strstr(const byte *s0, const byte *e0, if (s0 >= e0) return 0; p=s1+1; - while (s0 < e0 && p < e1 && cs->to_upper[(uint) (uchar) *s0++] == - cs->to_upper[(uint) (uchar) *p++]) - /* no-op */; + while (s0 < e0 && p < e1 && cs->to_upper[(uint) (uchar) *s0] == + cs->to_upper[(uint) (uchar) *p]) + s0++, p++; if (p >= e1) return 1; } diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index ab227687265..edf109fcc93 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -85,6 +85,9 @@ Full-text search in MySQL implements vector space model select * from t1 where MATCH a,b AGAINST ('"text search" +"now support"' IN BOOLEAN MODE); a b MySQL has now support for full-text search +select * from t1 where MATCH a,b AGAINST ('"text i"' IN BOOLEAN MODE); +a b +Full-text indexes are called collections select * from t1 where MATCH a AGAINST ("search" IN BOOLEAN MODE); a b Full-text search in MySQL implements vector space model diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 6483045f4ed..5a64f2614aa 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -40,6 +40,7 @@ select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE); select * from t1 where MATCH a,b AGAINST ('"text search" "now support"' IN BOOLEAN MODE); select * from t1 where MATCH a,b AGAINST ('"text search" -"now support"' IN BOOLEAN MODE); select * from t1 where MATCH a,b AGAINST ('"text search" +"now support"' IN BOOLEAN MODE); +select * from t1 where MATCH a,b AGAINST ('"text i"' IN BOOLEAN MODE); # boolean w/o index: From 548e59c685ecf65823747f45e2ae422485377d7b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Nov 2002 21:44:32 +0200 Subject: [PATCH 188/246] Added some compatibility modes (for the future) libmysql/libmysql.c: Removed ^M from source libmysqld/libmysqld.c: Added handling of protocol options (to get source to compile) sql/lex.h: Added compabitlity keywords sql/mysql_priv.h: Added compatibility modes sql/mysqld.cc: Added compatibility modes sql/sql_delete.cc: Cleaned up SAFE_UPDATES handling sql/sql_yacc.yy: Added compatibility modes --- libmysql/libmysql.c | 2 +- libmysqld/libmysqld.c | 47 ++++++++++++++++++++++++++++++++++++------- sql/lex.h | 3 +++ sql/mysql_priv.h | 5 +++++ sql/mysqld.cc | 12 +++++++---- sql/sql_delete.cc | 20 +++++++++--------- sql/sql_yacc.yy | 23 +++++++++++++++++++-- 7 files changed, 89 insertions(+), 23 deletions(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 0bb6b54bee5..535a79e0557 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -927,7 +927,7 @@ static const char *default_options[]= "character-sets-dir", "default-character-set", "interactive-timeout", "connect-timeout", "local-infile", "disable-local-infile", "replication-probe", "enable-reads-from-master", "repl-parse-query", - "ssl-cipher","protocol", "shared_memory_base_name", + "ssl-cipher","protocol", "shared_memory_base_name", NullS }; diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 6328a205a7b..059ed184f13 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -49,6 +49,10 @@ static my_bool mysql_client_init=0; uint mysql_port=0; my_string mysql_unix_port=0; +const char *sql_protocol_names_lib[] = +{ "TCP", "SOCKET", "PIPE", "MEMORY",NullS }; +TYPELIB sql_protocol_typelib = {array_elements(sql_protocol_names_lib)-1,"", + sql_protocol_names_lib}; #define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_TRANSACTIONS | CLIENT_PROTOCOL_41) @@ -433,11 +437,15 @@ mysql_free_result(MYSQL_RES *result) ****************************************************************************/ static const char *default_options[]= -{"port","socket","compress","password","pipe", "timeout", "user", - "init-command", "host", "database", "debug", "return-found-rows", - "ssl_key" ,"ssl_cert" ,"ssl_ca" ,"ssl_capath", - "character-set-dir", "default-character-set", - NullS +{ + "port","socket","compress","password","pipe", "timeout", "user", + "init-command", "host", "database", "debug", "return-found-rows", + "ssl-key" ,"ssl-cert" ,"ssl-ca" ,"ssl-capath", + "character-sets-dir", "default-character-set", "interactive-timeout", + "connect-timeout", "local-infile", "disable-local-infile", + "replication-probe", "enable-reads-from-master", "repl-parse-query", + "ssl-cipher","protocol", "shared_memory_base_name", + NullS }; static TYPELIB option_types={array_elements(default_options)-1, @@ -471,6 +479,9 @@ static void mysql_read_default_options(struct st_mysql_options *options, opt_arg=end+1; *end=0; /* Remove '=' */ } + /* Change all '_' in variable name to '-' */ + for (end= *option ; *(end= strcend(end,'_')) ; ) + *end= '-'; switch (find_type(*option+2,&option_types,2)) { case 1: /* port */ if (opt_arg) @@ -494,8 +505,9 @@ static void mysql_read_default_options(struct st_mysql_options *options, } break; case 5: /* pipe */ - options->named_pipe=1; /* Force named pipe */ + options->protocol = MYSQL_PROTOCOL_PIPE; break; + case 20: /* connect_timeout */ case 6: /* timeout */ if (opt_arg) options->connect_timeout=atoi(opt_arg); @@ -538,6 +550,7 @@ static void mysql_read_default_options(struct st_mysql_options *options, case 14: case 15: case 16: + case 26: break; case 17: /* charset-lib */ my_free(options->charset_dir,MYF(MY_ALLOW_ZERO_PTR)); @@ -547,6 +560,15 @@ static void mysql_read_default_options(struct st_mysql_options *options, my_free(options->charset_name,MYF(MY_ALLOW_ZERO_PTR)); options->charset_name = my_strdup(opt_arg, MYF(MY_WME)); break; + case 19: /* Interactive-timeout */ + case 21: /* client_local_files */ + case 22: + case 23: /* Replication options */ + case 24: + case 25: + case 27: /* Protocol */ + case 28: /* Shared memory */ + break; default: DBUG_PRINT("warning",("unknown option: %s",option[0])); } @@ -1789,7 +1811,13 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) mysql->options.compress=1; /* Remember for connect */ break; case MYSQL_OPT_NAMED_PIPE: - mysql->options.named_pipe=1; /* Force named pipe */ + mysql->options.protocol=MYSQL_PROTOCOL_PIPE; /* Force named pipe */ + break; + case MYSQL_OPT_LOCAL_INFILE: /* Allow LOAD DATA LOCAL ?*/ + if (!arg || test(*(uint*) arg)) + mysql->options.client_flag|= CLIENT_LOCAL_FILES; + else + mysql->options.client_flag&= ~CLIENT_LOCAL_FILES; break; case MYSQL_INIT_COMMAND: my_free(mysql->options.init_command,MYF(MY_ALLOW_ZERO_PTR)); @@ -1811,6 +1839,11 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) my_free(mysql->options.charset_name,MYF(MY_ALLOW_ZERO_PTR)); mysql->options.charset_name=my_strdup(arg,MYF(MY_WME)); break; + case MYSQL_OPT_PROTOCOL: + mysql->options.protocol= *(uint*) arg; + break; + case MYSQL_SHARED_MEMORY_BASE_NAME: + break; default: DBUG_RETURN(-1); } diff --git a/sql/lex.h b/sql/lex.h index 4b56eb4b5d8..aec7b86b8c9 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -76,6 +76,7 @@ static SYMBOL symbols[] = { { "BOTH", SYM(BOTH),0,0}, { "BTREE", SYM(BTREE_SYM),0,0}, { "BY", SYM(BY),0,0}, + { "BYTE", SYM(BYTE_SYM), 0, 0}, { "CACHE", SYM(CACHE_SYM),0,0}, { "CASCADE", SYM(CASCADE),0,0}, { "CASE", SYM(CASE_SYM),0,0}, @@ -313,6 +314,7 @@ static SYMBOL symbols[] = { { "RTREE", SYM(RTREE_SYM),0,0}, { "SECOND", SYM(SECOND_SYM),0,0}, { "SELECT", SYM(SELECT_SYM),0,0}, + { "SERIAL", SYM(SERIAL_SYM),0,0}, { "SERIALIZABLE", SYM(SERIALIZABLE_SYM),0,0}, { "SESSION", SYM(SESSION_SYM),0,0}, { "SET", SYM(SET),0,0}, @@ -369,6 +371,7 @@ static SYMBOL symbols[] = { { "USING", SYM(USING),0,0}, { "UPDATE", SYM(UPDATE_SYM),0,0}, { "USAGE", SYM(USAGE),0,0}, + { "VALUE", SYM(VALUE_SYM),0,0}, { "VALUES", SYM(VALUES),0,0}, { "VARCHAR", SYM(VARCHAR),0,0}, { "VARIABLES", SYM(VARIABLES),0,0}, diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index c9b95963c32..392333a4971 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -201,6 +201,11 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); #define MODE_SERIALIZABLE 16 #define MODE_ONLY_FULL_GROUP_BY 32 #define MODE_NO_UNSIGNED_SUBTRACTION 64 +#define MODE_POSTGRESQL 128 +#define MODE_ORACLE 256 +#define MODE_MSSQL 512 +#define MODE_DB2 1024 +#define MODE_SAPDB 2048 #define RAID_BLOCK_SIZE 1024 diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 95132ed0afa..755998bb8ba 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -414,8 +414,12 @@ time_t start_time; ulong opt_sql_mode = 0L; const char *sql_mode_names[] = -{ "REAL_AS_FLOAT", "PIPES_AS_CONCAT", "ANSI_QUOTES", "IGNORE_SPACE", - "SERIALIZE","ONLY_FULL_GROUP_BY", "NO_UNSIGNED_SUBTRACTION",NullS }; +{ + "REAL_AS_FLOAT", "PIPES_AS_CONCAT", "ANSI_QUOTES", "IGNORE_SPACE", + "SERIALIZE", "ONLY_FULL_GROUP_BY", "NO_UNSIGNED_SUBTRACTION", + "POSTGRESQL", "ORACLE", "MSSQL", "SAPDB", + NullS +}; TYPELIB sql_mode_typelib= {array_elements(sql_mode_names)-1,"", sql_mode_names}; @@ -4185,8 +4189,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case 'a': opt_sql_mode = (MODE_REAL_AS_FLOAT | MODE_PIPES_AS_CONCAT | - MODE_ANSI_QUOTES | MODE_IGNORE_SPACE | MODE_SERIALIZABLE - | MODE_ONLY_FULL_GROUP_BY); + MODE_ANSI_QUOTES | MODE_IGNORE_SPACE | MODE_SERIALIZABLE | + MODE_ONLY_FULL_GROUP_BY); global_system_variables.tx_isolation= ISO_SERIALIZABLE; break; case 'b': diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 2d869fdda49..811cc7c5f5e 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -35,18 +35,12 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, SQL_SELECT *select=0; READ_RECORD info; bool using_limit=limit != HA_POS_ERROR; - bool using_transactions, safe_update; + bool using_transactions, safe_update, const_cond; ha_rows deleted; DBUG_ENTER("mysql_delete"); if (!table_list->db) table_list->db=thd->db; - if (((safe_update=thd->options & OPTION_SAFE_UPDATES)) && !conds) - { - send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); - DBUG_RETURN(1); - } - if (!(table = open_ltable(thd,table_list, lock_type))) DBUG_RETURN(-1); table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); @@ -56,9 +50,17 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, setup_ftfuncs(&thd->lex.select_lex)) DBUG_RETURN(-1); + const_cond= (!conds || conds->const_item()); + safe_update=test(thd->options & OPTION_SAFE_UPDATES); + if (safe_update && const_cond) + { + send_error(thd,ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE); + DBUG_RETURN(1); + } + /* Test if the user wants to delete all rows */ - if (!using_limit && (!conds || conds->const_item()) && - !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) && !safe_update) + if (!using_limit && const_cond && + !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE))) { deleted= table->file->records; if (!(error=table->file->delete_all_rows())) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index d432a76770d..076daa07262 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -167,6 +167,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token BOTH %token BTREE_SYM %token BY +%token BYTE_SYM %token CACHE_SYM %token CASCADE %token CAST_SYM @@ -314,6 +315,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token ROW_SYM %token RTREE_SYM %token SET +%token SERIAL_SYM %token SERIALIZABLE_SYM %token SESSION_SYM %token SIMPLE_SYM @@ -349,6 +351,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token USE_FRM %token USE_SYM %token USING +%token VALUE_SYM %token VALUES %token VARIABLES %token WHERE @@ -1058,7 +1061,13 @@ type: | YEAR_SYM opt_len field_options { $$=FIELD_TYPE_YEAR; Lex->length=$2; } | DATE_SYM { $$=FIELD_TYPE_DATE; } | TIME_SYM { $$=FIELD_TYPE_TIME; } - | TIMESTAMP { $$=FIELD_TYPE_TIMESTAMP; } + | TIMESTAMP + { + if (current_thd->sql_mode & MODE_SAPDB) + $$=FIELD_TYPE_DATETIME; + else + $$=FIELD_TYPE_TIMESTAMP; + } | TIMESTAMP '(' NUM ')' { Lex->length=$3.str; $$=FIELD_TYPE_TIMESTAMP; } | DATETIME { $$=FIELD_TYPE_DATETIME; } @@ -1094,7 +1103,11 @@ type: LEX *lex=Lex; lex->interval=typelib(lex->interval_list); $$=FIELD_TYPE_SET; - }; + } + | LONG_SYM { $$=FIELD_TYPE_MEDIUM_BLOB; } + | LONG_SYM BINARY { Lex->charset=my_charset_bin; + $$=FIELD_TYPE_MEDIUM_BLOB; } + ; char: CHAR_SYM {} @@ -1167,6 +1180,8 @@ attribute: | NOT NULL_SYM { Lex->type|= NOT_NULL_FLAG; } | DEFAULT literal { Lex->default_value=$2; } | AUTO_INC { Lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; } + | SERIAL_SYM DEFAULT VALUE_SYM + { Lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; } | PRIMARY_SYM KEY_SYM { Lex->type|= PRI_KEY_FLAG | NOT_NULL_FLAG; } | UNIQUE_SYM { Lex->type|= UNIQUE_FLAG; } | UNIQUE_SYM KEY_SYM { Lex->type|= UNIQUE_KEY_FLAG; } @@ -1205,6 +1220,7 @@ opt_db_default_character_set: opt_binary: /* empty */ { Lex->charset=NULL; } + | BYTE_SYM { Lex->charset=my_charset_bin; } | BINARY { Lex->charset=my_charset_bin; } | CHAR_SYM SET charset_name { Lex->charset=$3; } ; @@ -3493,6 +3509,7 @@ keyword: | BIT_SYM {} | BOOL_SYM {} | BOOLEAN_SYM {} + | BYTE_SYM {} | CACHE_SYM {} | CHANGED {} | CHARSET {} @@ -3605,6 +3622,7 @@ keyword: | ROW_FORMAT_SYM {} | ROW_SYM {} | SECOND_SYM {} + | SERIAL_SYM {} | SERIALIZABLE_SYM {} | SESSION_SYM {} | SIGNED_SYM {} @@ -3633,6 +3651,7 @@ keyword: | UNCOMMITTED_SYM {} | USE_FRM {} | VARIABLES {} + | VALUE_SYM {} | WORK_SYM {} | YEAR_SYM {} ; From 9b9546edbc095e061167588f672549103627bf98 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Nov 2002 22:56:57 +0200 Subject: [PATCH 189/246] Try to optimize the cache buffer size needed for bulk_insert Fix for shutdown on Mac OS X include/my_tree.h: Try to optimize the cache buffer size needed for bulk_insert myisam/mi_write.c: Try to optimize the cache buffer size needed for bulk_insert mysql-test/r/bdb.result: Make test repeatable mysql-test/t/bdb.test: Make test repeatable mysys/tree.c: Try to optimize the cache buffer size needed for bulk_insert sql/mysql_priv.h: Small optimization sql/mysqld.cc: Fix for shutdown on Mac OS X sql/sql_insert.cc: Try to optimize the cache buffer size needed for bulk_insert sql/sql_yacc.yy: Call thd->strmake() instead of sql_strmake() sql/table.cc: Try to optimize the cache buffer size needed for bulk_insert sql/table.h: Try to optimize the cache buffer size needed for bulk_insert --- include/my_tree.h | 2 ++ myisam/mi_write.c | 3 ++- mysql-test/r/bdb.result | 4 ++-- mysql-test/t/bdb.test | 2 +- mysys/tree.c | 8 +++++--- sql/mysql_priv.h | 3 ++- sql/mysqld.cc | 21 +++++++++++++++++++-- sql/sql_insert.cc | 10 +++++++--- sql/sql_yacc.yy | 9 +++++---- sql/table.cc | 3 ++- sql/table.h | 1 + 11 files changed, 48 insertions(+), 18 deletions(-) diff --git a/include/my_tree.h b/include/my_tree.h index 8b326a19518..7cc7c615ba6 100644 --- a/include/my_tree.h +++ b/include/my_tree.h @@ -76,6 +76,8 @@ int tree_walk(TREE *tree,tree_walk_action action, void *argument, TREE_WALK visit); int tree_delete(TREE *tree,void *key); +#define TREE_ELEMENT_EXTRA_SIZE (sizeof(TREE_ELEMENT) + sizeof(void*)) + #ifdef __cplusplus } #endif diff --git a/myisam/mi_write.c b/myisam/mi_write.c index cfacd0bc4d5..70a1bea26bb 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -842,8 +842,9 @@ int _mi_init_bulk_insert(MI_INFO *info, ulong cache_size) { params->info=info; params->keynr=i; + /* Only allocate a 16'th of the buffer at a time */ init_tree(&info->bulk_insert[i], - cache_size / num_keys / 4 + 10, + cache_size / num_keys / 16 + 10, cache_size / num_keys, 0, (qsort_cmp2)keys_compare, 0, (tree_element_free) keys_free, (void *)params++); diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index a815f2f8fab..eb97d19136d 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -133,11 +133,11 @@ id parent_id level 1202 107 2 1204 107 2 update ignore t1 set id=1023 where id=1010; -select * from t1 where parent_id=102; +select * from t1 where parent_id=102 order by parent_id,id; id parent_id level 1008 102 2 -1015 102 2 1010 102 2 +1015 102 2 explain select level from t1 where level=1; table type possible_keys key key_len ref rows Extra t1 ref level level 1 const 1 Using where; Using index diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index 0df93b5f220..608d4bf5042 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -39,7 +39,7 @@ select * from t1; update ignore t1 set id=id+1; # This will change all rows select * from t1; update ignore t1 set id=1023 where id=1010; -select * from t1 where parent_id=102; +select * from t1 where parent_id=102 order by parent_id,id; explain select level from t1 where level=1; explain select level,id from t1 where level=1; explain select level,id,parent_id from t1 where level=1; diff --git a/mysys/tree.c b/mysys/tree.c index 2ac2c88fd66..ea5cf79f084 100644 --- a/mysys/tree.c +++ b/mysys/tree.c @@ -45,7 +45,8 @@ #define BLACK 1 #define RED 0 -#define DEFAULT_ALLOC_SIZE (8192-MALLOC_OVERHEAD) +#define DEFAULT_ALLOC_SIZE 8192 +#define DEFAULT_ALIGN_SIZE 8192 static void delete_tree_element(TREE *,TREE_ELEMENT *); static int tree_walk_left_root_right(TREE *,TREE_ELEMENT *, @@ -72,8 +73,9 @@ void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit, DBUG_ENTER("init_tree"); DBUG_PRINT("enter",("tree: %lx size: %d",tree,size)); - if (!default_alloc_size) - default_alloc_size= DEFAULT_ALLOC_SIZE; + if (default_alloc_size < DEFAULT_ALLOC_SIZE) + default_alloc_size= DEFAULT_ALLOC_SIZE; + default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE); bzero((gptr) &tree->null_element,sizeof(tree->null_element)); tree->root= &tree->null_element; tree->compare=compare; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index db457aa0aa7..43de81cae00 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -83,6 +83,7 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); */ #define MIN_FILE_LENGTH_TO_USE_ROW_CACHE (16L*1024*1024) #define MIN_ROWS_TO_USE_TABLE_CACHE 100 +#define MIN_ROWS_TO_USE_BULK_INSERT 100 /* The following is used to decide if MySQL should use table scanning @@ -707,7 +708,7 @@ bool wait_for_locked_table_names(THD *thd, TABLE_LIST *table_list); /* old unireg functions */ void unireg_init(ulong options); -void unireg_end(int signal); +void unireg_end(void); int rea_create_table(my_string file_name,HA_CREATE_INFO *create_info, List &create_field, uint key_count,KEY *key_info); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 2404b35b00f..ffe3d1be47c 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -764,7 +764,7 @@ static void __cdecl kill_server(int sig_ptr) if (sig != MYSQL_KILL_SIGNAL && sig != 0) unireg_abort(1); /* purecov: inspected */ else - unireg_end(0); + unireg_end(); pthread_exit(0); /* purecov: deadcode */ RETURN_FROM_KILL_SERVER; } @@ -803,12 +803,29 @@ extern "C" sig_handler print_signal_warning(int sig) #endif } +/* + cleanup all memory and end program nicely -void unireg_end(int signal_number __attribute__((unused))) + SYNOPSIS + unireg_end() + + NOTES + This function never returns. + + If SIGNALS_DONT_BREAK_READ is defined, this function is called + by the main thread. To get MySQL to shut down nicely in this case + (Mac OS X) we have to call exit() instead if pthread_exit(). +*/ + +void unireg_end(void) { clean_up(); my_thread_end(); +#ifdef SIGNALS_DONT_BREAK_READ + exit(0); +#else pthread_exit(0); // Exit is in main thread +#endif } diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 71f570e4798..2508314c469 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -194,15 +194,19 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, thd->proc_info="update"; if (duplic == DUP_IGNORE || duplic == DUP_REPLACE) table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); - if ((bulk_insert= (values_list.elements > 1 && + if ((bulk_insert= (values_list.elements >= MIN_ROWS_TO_USE_BULK_INSERT && lock_type != TL_WRITE_DELAYED && !(specialflag & SPECIAL_SAFE_MODE)))) { table->file->extra_opt(HA_EXTRA_WRITE_CACHE, - thd->variables.read_buff_size); + min(thd->variables.read_buff_size, + table->avg_row_length*values_list.elements)); if (thd->variables.bulk_insert_buff_size) table->file->extra_opt(HA_EXTRA_BULK_INSERT_BEGIN, - thd->variables.bulk_insert_buff_size); + min(thd->variables.bulk_insert_buff_size, + (table->total_key_length + + table->keys * TREE_ELEMENT_EXTRA_SIZE)* + values_list.elements)); table->bulk_insert= 1; } diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 92b49549a06..f6a0c483bb9 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3107,12 +3107,13 @@ ident: IDENT { $$=$1; } | keyword { - LEX *lex; - $$.str=sql_strmake($1.str,$1.length); + LEX *lex= Lex; + $$.str= lex->thd->strmake($1.str,$1.length); $$.length=$1.length; - if ((lex=Lex)->next_state != STATE_END) + if (lex->next_state != STATE_END) lex->next_state=STATE_OPERATOR_OR_IDENT; - }; + } + ; ident_or_text: ident { $$=$1;} diff --git a/sql/table.cc b/sql/table.cc index b68edac5fc2..62163819599 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -143,7 +143,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, goto err_not_open; /* purecov: inspected */ bzero((char*) keyinfo,n_length); outparam->key_info=keyinfo; - outparam->max_key_length=0; + outparam->max_key_length= outparam->total_key_length= 0; key_part= (KEY_PART_INFO*) (keyinfo+keys); strpos=disk_buff+6; @@ -201,6 +201,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag, } set_if_bigger(outparam->max_key_length,keyinfo->key_length+ keyinfo->key_parts); + outparam->total_key_length+= keyinfo->key_length; if (keyinfo->flags & HA_NOSAME) set_if_bigger(outparam->max_unique_length,keyinfo->key_length); } diff --git a/sql/table.h b/sql/table.h index ca86269b625..f998a0fd4e6 100644 --- a/sql/table.h +++ b/sql/table.h @@ -58,6 +58,7 @@ struct st_table { uint reclength; /* Recordlength */ uint rec_buff_length; uint keys,key_parts,primary_key,max_key_length,max_unique_length; + uint total_key_length; uint uniques; uint null_fields; /* number of null fields */ uint blob_fields; /* number of blob fields */ From 0b19cb1e2dcf180ced44403f3ce8d78437468348 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Nov 2002 22:16:29 +0100 Subject: [PATCH 190/246] Do-compile: - applied some changes from the 4.0 tree (enable multiple --conf-environment options, add --with-debug, don't add "-max" prefix just because BDB is enabled) Build-tools/Do-compile: - applied some changes from the 4.0 tree (enable multiple --conf-environment options, add --with-debug, don't add "-max" prefix just because BDB is enabled) --- Build-tools/Do-compile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 067b88888ac..dd082181200 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -14,7 +14,7 @@ $opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=0; GetOptions( "bdb", "build-thread=i", - "config-env=s", + "config-env=s" => \@config_env, "config-options=s" => \@config_options, "dbd-options=s", "debug", @@ -45,6 +45,7 @@ GetOptions( "use-old-distribution", "user=s", "version-suffix=s", + "with-debug", "with-low-memory", "with-other-libc=s", "with-small-disk", @@ -53,11 +54,6 @@ GetOptions( usage() if ($opt_help); usage() if (!$opt_distribution); -if ($opt_bdb && $opt_version_suffix eq "") -{ - $opt_version_suffix="-max"; -} - if (@make_options > 0) { chomp(@make_options); @@ -70,6 +66,12 @@ if (@config_options > 0) $opt_config_options= join(" ", @config_options); } +if (@config_env > 0) +{ + chomp(@config_env); + $opt_config_env= join(" ", @config_env); +} + chomp($host=`hostname`); $full_host_name=$host; $connect_option= ($opt_tcpip ? "--host=$host" : ""); @@ -208,6 +210,7 @@ if ($opt_stage <= 1) $opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions $opt_config_options.= " --with-berkeley-db" if ($opt_bdb); $opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client); + $opt_config_options.= " --with-debug" if ($opt_with_debug); $opt_config_options.= " --with-libwrap" if ($opt_libwrap); $opt_config_options.= " --with-low-memory" if ($opt_with_low_memory); $opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server); @@ -258,7 +261,7 @@ if ($opt_stage <= 3) log_system("rm -fr mysql-3* mysql-4* $pwd/$host/*.tar.gz"); log_system("nm -n sql/mysqld | gzip -9 -v 2>&1 > sql/mysqld.sym.gz | cat"); - $flags.= "--no-strip" if ($opt_no_strip); + $flags.= "--no-strip" if ($opt_no_strip || $opt_with_debug); check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created"); safe_system("mv mysql*.tar.gz $pwd/$host"); if (-f "client/.libs/mysqladmin") @@ -500,6 +503,9 @@ If user is empty then no mail is sent. --version-suffix suffix Set name suffix (e.g. 'com' or '-max') for a distribution +--with-debug +Build binaries with debug information (implies "--no-strip") + --with-low-memory Use less memory when compiling. @@ -530,7 +536,7 @@ sub abort print TMP "To: $email\n"; print TMP "Subject: $ver$opt_version_suffix compilation failed\n\n"; close TMP; - system("tail -40 $log > $log.mail"); + system("tail -n 40 $log > $log.mail"); system("cat $mail_header_file $log.mail | $sendmail -t -f $email"); unlink($mail_header_file); unlink("$log.mail"); @@ -606,7 +612,7 @@ sub which my(@progs)=@_; foreach $prog (@progs) { - chomp($found=`which $prog | head -1`); + chomp($found=`which $prog | head -n 1`); if ($? == 0 && $found ne "" && index($found," ") == -1) { $found =~ s|/+|/|g; # Make nicer output From 2723dbdb5e2c60162ca464f65f68fdd13b7c9cef Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 02:07:14 +0200 Subject: [PATCH 191/246] Automatic conversion from CHAR(length) to BLOB when length > 255 New operators MOD and DIV SELECT ... FROM DUAL TRUE = 1 and FALSE = 0 include/mysqld_error.h: New warning message mysql-test/r/func_system.result: Added testing of new functions mysql-test/r/func_test.result: Added testing of new functions mysql-test/r/type_blob.result: Added testing of new functions mysql-test/t/func_system.test: Added testing of new functions mysql-test/t/func_test.test: Added testing of new functions mysql-test/t/type_blob.test: Added testing of new functions sql/item_func.cc: Added function DIV sql/item_func.h: Added function DIV sql/lex.h: New keywords sql/share/czech/errmsg.txt: New warning message sql/share/danish/errmsg.txt: New warning message sql/share/dutch/errmsg.txt: New warning message sql/share/english/errmsg.txt: New warning message sql/share/estonian/errmsg.txt: New warning message sql/share/french/errmsg.txt: New warning message sql/share/german/errmsg.txt: New warning message sql/share/greek/errmsg.txt: New warning message sql/share/hungarian/errmsg.txt: New warning message sql/share/italian/errmsg.txt: New warning message sql/share/japanese/errmsg.txt: New warning message sql/share/korean/errmsg.txt: New warning message sql/share/norwegian-ny/errmsg.txt: New warning message sql/share/norwegian/errmsg.txt: New warning message sql/share/polish/errmsg.txt: New warning message sql/share/portuguese/errmsg.txt: New warning message sql/share/romanian/errmsg.txt: New warning message sql/share/russian/errmsg.txt: New warning message sql/share/serbian/errmsg.txt: New warning message sql/share/slovak/errmsg.txt: New warning message sql/share/spanish/errmsg.txt: New warning message sql/share/swedish/errmsg.txt: New warning message Translated a lot of error messages sql/share/ukrainian/errmsg.txt: New warning message sql/sql_class.cc: Added support for warnings during parsing sql/sql_class.h: Added support for warnings during parsing sql/sql_error.cc: Added support for warnings during parsing sql/sql_lex.cc: Fixed comment sql/sql_parse.cc: Added automatic conversion from CHAR(length) to BLOB when length > 255 Added support for BLOB(length) sql/sql_yacc.yy: New operators MOD and DIV SELECT ... FROM DUAL TRUE = 1 and FALSE = 0 --- include/mysqld_error.h | 3 +- mysql-test/r/func_system.result | 3 ++ mysql-test/r/func_test.result | 3 ++ mysql-test/r/type_blob.result | 32 +++++++++++++++++++++ mysql-test/t/func_system.test | 1 + mysql-test/t/func_test.test | 1 + mysql-test/t/type_blob.test | 28 ++++++++++++++++++- sql/item_func.cc | 19 +++++++++++++ sql/item_func.h | 12 ++++++++ sql/lex.h | 7 ++++- sql/share/czech/errmsg.txt | 1 + sql/share/danish/errmsg.txt | 1 + sql/share/dutch/errmsg.txt | 1 + sql/share/english/errmsg.txt | 1 + sql/share/estonian/errmsg.txt | 1 + sql/share/french/errmsg.txt | 1 + sql/share/german/errmsg.txt | 1 + sql/share/greek/errmsg.txt | 1 + sql/share/hungarian/errmsg.txt | 1 + sql/share/italian/errmsg.txt | 1 + sql/share/japanese/errmsg.txt | 1 + sql/share/korean/errmsg.txt | 1 + sql/share/norwegian-ny/errmsg.txt | 1 + sql/share/norwegian/errmsg.txt | 1 + sql/share/polish/errmsg.txt | 1 + sql/share/portuguese/errmsg.txt | 1 + sql/share/romanian/errmsg.txt | 1 + sql/share/russian/errmsg.txt | 1 + sql/share/serbian/errmsg.txt | 1 + sql/share/slovak/errmsg.txt | 1 + sql/share/spanish/errmsg.txt | 1 + sql/share/swedish/errmsg.txt | 33 +++++++++++----------- sql/share/ukrainian/errmsg.txt | 1 + sql/sql_class.cc | 1 + sql/sql_class.h | 2 +- sql/sql_error.cc | 18 ++++++++++-- sql/sql_lex.cc | 5 ++-- sql/sql_parse.cc | 28 +++++++++++++++++-- sql/sql_yacc.yy | 46 ++++++++++++++++++++++--------- 39 files changed, 223 insertions(+), 41 deletions(-) diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 456d675a045..105a5a2c406 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -260,4 +260,5 @@ #define ER_UNKNOWN_STMT_HANDLER 1241 #define ER_CORRUPT_HELP_DB 1242 #define ER_CYCLIC_REFERENCE 1243 -#define ER_ERROR_MESSAGES 244 +#define ER_AUTO_CONVERT 1244 +#define ER_ERROR_MESSAGES 245 diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result index 5ea4ed5e4e0..83c2ad6e020 100644 --- a/mysql-test/r/func_system.result +++ b/mysql-test/r/func_system.result @@ -4,3 +4,6 @@ test 1 select version()>="3.23.29"; version()>="3.23.29" 1 +select TRUE,FALSE,NULL; +TRUE FALSE NULL +1 0 NULL diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 8cfae44b9dd..9fcf03db838 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -46,6 +46,9 @@ select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; 1 XOR 1 1 XOR 0 0 XOR 1 0 XOR 0 NULL XOR 1 1 XOR NULL 0 XOR NULL 0 1 1 0 NULL NULL NULL +select 10 % 7, 10 mod 7, 10 div 3; +10 % 7 10 mod 7 10 div 3 +3 3 3 select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; 5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1 0 1 diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index c99d22c2889..ba8d4f770f6 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -1,4 +1,36 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7; +CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000)); +show columns from t1; +Field Type Null Key Default Extra +a blob YES NULL +b text character set latin1 YES NULL +c blob YES NULL +d mediumtext character set latin1 YES NULL +e longtext character set latin1 YES NULL +CREATE TABLE t2 (a char(257), b varchar(70000) binary, c varchar(70000000)); +Warnings: +Warning 1244 Converting column 'a' from CHAR to TEXT +Warning 1244 Converting column 'b' from CHAR to BLOB +Warning 1244 Converting column 'c' from CHAR to TEXT +show columns from t2; +Field Type Null Key Default Extra +a text character set latin1 YES NULL +b mediumblob YES NULL +c longtext character set latin1 YES NULL +create table t3 (a long, b long byte); +show create TABLE t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `a` mediumtext character set latin1, + `b` mediumblob +) TYPE=MyISAM CHARSET=latin1 +drop table t1,t2,t3 +#; +CREATE TABLE t1 (a char(257) default "hello"); +Too big column length for column 'a' (max = 255). Use BLOB instead +CREATE TABLE t2 (a blob default "hello"); +BLOB column 'a' can't have a default value +drop table if exists t1,t2; create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr)); insert into t1 values (null,"a","A"); insert into t1 values (null,"bbb","BBB"); diff --git a/mysql-test/t/func_system.test b/mysql-test/t/func_system.test index 052e0530cf6..c69526644f4 100644 --- a/mysql-test/t/func_system.test +++ b/mysql-test/t/func_system.test @@ -4,3 +4,4 @@ select database(),user() like "%@%"; select version()>="3.23.29"; +select TRUE,FALSE,NULL; diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index f5ad2e21c73..8810aefc20f 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -17,6 +17,7 @@ select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2, select -1.49 or -1.49,0.6 or 0.6; select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; +select 10 % 7, 10 mod 7, 10 div 3; # # Wrong usage of functions diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test index 2b23617ec8b..234daeabc2b 100644 --- a/mysql-test/t/type_blob.test +++ b/mysql-test/t/type_blob.test @@ -1,8 +1,34 @@ +# +# Basic cleanup +# +drop table if exists t1,t2,t3,t4,t5,t6,t7; + +# +# Check syntax for creating BLOB/TEXT +# + +CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000)); +show columns from t1; +CREATE TABLE t2 (a char(257), b varchar(70000) binary, c varchar(70000000)); +show columns from t2; +create table t3 (a long, b long byte); +show create TABLE t3; +drop table t1,t2,t3 + +# +# Check errors with blob +# + +--error 1074 +CREATE TABLE t1 (a char(257) default "hello"); +--error 1101 +CREATE TABLE t2 (a blob default "hello"); +drop table if exists t1,t2; + # # test of full join with blob # -drop table if exists t1,t2,t3,t4,t5,t6,t7; create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary key (nr)); insert into t1 values (null,"a","A"); insert into t1 values (null,"bbb","BBB"); diff --git a/sql/item_func.cc b/sql/item_func.cc index aa39b3cc857..4c7985cd1bf 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -455,6 +455,25 @@ void Item_func_div::fix_length_and_dec() maybe_null=1; } + +/* Integer division */ +longlong Item_func_int_div::val_int() +{ + longlong value=args[0]->val_int(); + longlong val2=args[1]->val_int(); + if ((null_value= val2 == 0 || args[0]->null_value || args[1]->null_value)) + return 0; + return value/val2; +} + + +void Item_func_int_div::fix_length_and_dec() +{ + max_length=args[0]->max_length - args[0]->decimals; + maybe_null=1; +} + + double Item_func_mod::val() { double value= floor(args[0]->val()+0.5); diff --git a/sql/item_func.h b/sql/item_func.h index 581809fc9cb..8996919e284 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -254,6 +254,18 @@ public: }; +class Item_func_int_div :public Item_num_op +{ +public: + Item_func_int_div(Item *a,Item *b) :Item_num_op(a,b) + { hybrid_type=INT_RESULT; } + double val() { return (double) val_int(); } + longlong val_int(); + const char *func_name() const { return "DIV"; } + void fix_length_and_dec(); +}; + + class Item_func_mod :public Item_num_op { public: diff --git a/sql/lex.h b/sql/lex.h index aec7b86b8c9..d4c64d08da4 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -127,8 +127,10 @@ static SYMBOL symbols[] = { { "DISABLE", SYM(DISABLE_SYM),0,0}, { "DISTINCT", SYM(DISTINCT),0,0}, { "DISTINCTROW", SYM(DISTINCT),0,0}, /* Access likes this */ + { "DIV", SYM(DIV_SYM),0,0}, { "DO", SYM(DO_SYM),0,0}, { "DOUBLE", SYM(DOUBLE_SYM),0,0}, + { "DUAL", SYM(DUAL_SYM),0,0}, { "DROP", SYM(DROP),0,0}, { "DUMPFILE", SYM(DUMPFILE),0,0}, { "DYNAMIC", SYM(DYNAMIC_SYM),0,0}, @@ -154,6 +156,7 @@ static SYMBOL symbols[] = { { "FLOAT4", SYM(FLOAT_SYM),0,0}, { "FLOAT8", SYM(DOUBLE_SYM),0,0}, { "FLUSH", SYM(FLUSH_SYM),0,0}, + { "FALSE", SYM(FALSE_SYM),0,0}, { "FOREIGN", SYM(FOREIGN),0,0}, { "RAID_TYPE", SYM(RAID_TYPE),0,0}, { "RAID_CHUNKS", SYM(RAID_CHUNKS),0,0}, @@ -248,6 +251,7 @@ static SYMBOL symbols[] = { { "MIN_ROWS", SYM(MIN_ROWS),0,0}, { "MINUTE", SYM(MINUTE_SYM),0,0}, { "MINUTE_SECOND", SYM(MINUTE_SECOND_SYM),0,0}, + { "MOD", SYM(MOD_SYM),0,0}, { "MODE", SYM(MODE_SYM),0,0}, { "MODIFY", SYM(MODIFY_SYM),0,0}, { "MONTH", SYM(MONTH_SYM),0,0}, @@ -358,6 +362,7 @@ static SYMBOL symbols[] = { { "TRAILING", SYM(TRAILING),0,0}, { "TRANSACTION", SYM(TRANSACTION_SYM),0,0}, { "TRUNCATE", SYM(TRUNCATE_SYM),0,0}, + { "TRUE", SYM(TRUE_SYM),0,0}, { "TO", SYM(TO_SYM),0,0}, { "TYPE", SYM(TYPE_SYM),0,0}, { "TYPES", SYM(TYPES_SYM),0,0}, @@ -374,6 +379,7 @@ static SYMBOL symbols[] = { { "VALUE", SYM(VALUE_SYM),0,0}, { "VALUES", SYM(VALUES),0,0}, { "VARCHAR", SYM(VARCHAR),0,0}, + { "VARCHARACTER", SYM(VARCHAR),0,0}, { "VARIABLES", SYM(VARIABLES),0,0}, { "VARYING", SYM(VARYING),0,0}, { "VARBINARY", SYM(VARBINARY),0,0}, @@ -502,7 +508,6 @@ static SYMBOL sql_functions[] = { { "MD5", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_md5)}, { "MID", SYM(SUBSTRING),0,0}, /* unireg function */ { "MIN", SYM(MIN_SYM),0,0}, - { "MOD", SYM(FUNC_ARG2),0,CREATE_FUNC(create_func_mod)}, { "MLINEFROMTEXT", SYM(MLINEFROMTEXT),0,0}, { "MPOINTFROMTEXT", SYM(MPOINTFROMTEXT),0,0}, { "MPOLYFROMTEXT", SYM(MPOLYFROMTEXT),0,0}, diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index d43a433da06..0eef4ae9cad 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -254,3 +254,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 3a947bcbe38..c2e0ddb064f 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -248,3 +248,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 1cb81849be1..7a3f7b787b2 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -256,3 +256,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 6e96fdb393e..e746b461a6d 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 394c40c5778..ee20b9890c4 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -250,3 +250,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index b18d3f8fb38..89b82b3851b 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 49ea31dd05b..3b354ee3298 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -248,3 +248,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index b203c63949b..38ce4217888 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 07081e689ad..f2fd63765d9 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -247,3 +247,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 0a380e2b48f..2b24a123e25 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 2e0a083ca06..7b428cae703 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -247,3 +247,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 19fcf98e3c7..8fbc33bf690 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 810aaf38f74..1c3cf11e10c 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -247,3 +247,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index a74a0a910b8..1db0068685c 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -247,3 +247,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index efde31ff4c9..bda25b01065 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -249,3 +249,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index e90d5844b9b..947f935fd33 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 18f0bf7f79d..71baf4ca098 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -249,3 +249,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 790d738031c..03ea8b74ce5 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -248,3 +248,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "ãÉËÌÉÞÅÓËÁÑ ÓÓÙÌËÁ ÎÁ ÐÏÄÚÁÐÒÏÓ", +"Converting column '%s' from %s to %s" diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index e8186d38a5b..0ee69010aca 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -241,3 +241,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 216d46fcd3a..36f5e421561 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -253,3 +253,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 5076b1b6679..5a087d6fa17 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -246,3 +246,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Converting column '%s' from %s to %s" diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index a3bb40fb4f5..42f2e72ec45 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -229,19 +229,20 @@ "Option '%s' användes två gånger", "Användare '%-.64s' har överskridit '%s' (nuvarande värde: %ld)", "Du har inte privlegiet '%-.128s' som behövs för denna operation", -"Variable '%-.64s' is a LOCAL variable and can't be used with SET GLOBAL", -"Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", -"Variable '%-.64s' doesn't have a default value", -"Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", -"Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", -"This version of MySQL doesn't yet support '%s'", -"Got fatal error %d: '%-.128s' from master when reading data from binary log", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", -"Subselect returns more than 1 field", -"Subselect returns more than 1 record", -"Unknown prepared statement handler (%ld) given to %s", -"Help database is corrupt or does not exist", -"Cyclic reference on subqueries", +"Variable '%-.64s' är en LOCAL variabel och kan inte ändrad med SET GLOBAL", +"Variable '%-.64s' är en GLOBAL variabel och bör sättas med SET GLOBAL", +"Variable '%-.64s' har inte ett DEFAULT värde", +"Variable '%-.64s' kan inte be satt till '%-.64s'", +"Fel typ av argument till variabel '%-.64s'", +"Variabeln '%-.64s' kan endast sättas, inte läsas", +"Fel använding/placering av '%s'", +"Denna version av MySQL kan inte utföra '%s'", +"Fick fatalt fel %d: '%-.128s' från master vid läsning av binär loggen", +"Felaktig FOREIGN KEY definition för '%-.64s': %s", +"Nyckel referensen och table referensen stämmer inte överens", +"Subselect returnerade mer än 1 fält", +"Subselect returnerade mer än 1 rad", +"Okänd PREPARED STATEMENT id (%ld) var given till %s", +"Hjälp databasen finns inte eller är skadad", +"Syklisk referens i subselect", +"Konvertar kolumn '%s' från %s till %s" diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 426c2a14e3b..f41041de2bb 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -250,3 +250,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "ãÉËÌiÞÎÅ ÐÏÓÉÌÁÎÎÑ ÎÁ ÐiÄÚÁÐÉÔ", +"Converting column '%s' from %s to %s" diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 996c70a0305..b7cca50ffb5 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -107,6 +107,7 @@ THD::THD():user_time(0), fatal_error(0), slave_proxy_id = 0; file_id = 0; cond_count=0; + warn_id= 0; db_charset=default_charset_info; thd_charset=default_charset_info; mysys_var=0; diff --git a/sql/sql_class.h b/sql/sql_class.h index a619e8e3aff..9a7ee4556e8 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -486,7 +486,7 @@ public: List warn_list; uint warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_END]; uint total_warn_count, old_total_warn_count; - ulong query_id, version, options, thread_id, col_access; + ulong query_id, warn_id, version, options, thread_id, col_access; ulong current_stmt_id; long dbug_thread_id; pthread_t real_id; diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 3d6a0fa24aa..0740dc428f0 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -51,13 +51,22 @@ This file contains the implementation of error and warnings related SYNOPSIS mysql_reset_errors() thd Thread handle + + IMPLEMENTATION + Don't reset warnings if this has already been called for this query. + This may happen if one gets a warning during the parsing stage, + in which case push_warnings() has already called this function. */ void mysql_reset_errors(THD *thd) { - free_root(&thd->warn_root,MYF(0)); - bzero((char*) thd->warn_count, sizeof(thd->warn_count)); - thd->warn_list.empty(); + if (thd->query_id != thd->warn_id) + { + thd->warn_id= thd->query_id; + free_root(&thd->warn_root,MYF(0)); + bzero((char*) thd->warn_count, sizeof(thd->warn_count)); + thd->warn_list.empty(); + } } @@ -75,6 +84,9 @@ void mysql_reset_errors(THD *thd) void push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level, uint code, const char *msg) { + if (thd->query_id != thd->warn_id) + mysql_reset_errors(thd); + if (thd->warn_list.elements < thd->variables.max_error_count) { /* diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 0865e6da05f..975c3cfcf2b 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -855,9 +855,8 @@ int yylex(void *arg) case STATE_END: lex->next_state=STATE_END; return(0); // We found end of input last time - - // Actually real shouldn't start - // with . but allow them anyhow + + /* Actually real shouldn't start with . but allow them anyhow */ case STATE_REAL_OR_POINT: if (my_isdigit(system_charset_info,yyPeek())) state = STATE_REAL; // Real diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 4d6fad17144..aebccf7a39e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3026,6 +3026,7 @@ bool add_field_to_list(char *field_name, enum_field_types type, THD *thd=current_thd; LEX *lex= &thd->lex; uint allowed_type_modifier=0; + char warn_buff[MYSQL_ERRMSG_SIZE]; DBUG_ENTER("add_field_to_list"); if (strlen(field_name) > NAME_LEN) @@ -3117,8 +3118,6 @@ bool add_field_to_list(char *field_name, enum_field_types type, if (!length) new_field->length=20; allowed_type_modifier= AUTO_INCREMENT_FLAG; break; - case FIELD_TYPE_STRING: - case FIELD_TYPE_VAR_STRING: case FIELD_TYPE_NULL: case FIELD_TYPE_GEOMETRY: break; @@ -3129,10 +3128,35 @@ bool add_field_to_list(char *field_name, enum_field_types type, if (new_field->decimals) new_field->length++; break; + case FIELD_TYPE_STRING: + case FIELD_TYPE_VAR_STRING: + if (new_field->length < MAX_FIELD_WIDTH || default_value) + break; + /* Convert long CHAR() and VARCHAR columns to TEXT or BLOB */ + new_field->sql_type= FIELD_TYPE_BLOB; + sprintf(warn_buff, ER(ER_AUTO_CONVERT), field_name, "CHAR", + (cs == my_charset_bin) ? "BLOB" : "TEXT"); + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_AUTO_CONVERT, + warn_buff); + /* fall through */ case FIELD_TYPE_BLOB: case FIELD_TYPE_TINY_BLOB: case FIELD_TYPE_LONG_BLOB: case FIELD_TYPE_MEDIUM_BLOB: + if (new_field->length) + { + /* The user has given a length to the blob column */ + if (new_field->length < 256) + type= FIELD_TYPE_TINY_BLOB; + if (new_field->length < 65536) + type= FIELD_TYPE_BLOB; + else if (new_field->length < 256L*256L*256L) + type= FIELD_TYPE_MEDIUM_BLOB; + else + type= FIELD_TYPE_LONG_BLOB; + new_field->length= 0; + } + new_field->sql_type= type; if (default_value) // Allow empty as default value { String str,*res; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 076daa07262..04aeddfc384 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -86,6 +86,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token NEXT_SYM %token PREV_SYM +%token DIV_SYM %token EQ %token EQUAL_SYM %token GE @@ -94,6 +95,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token LT %token NE %token IS +%token MOD_SYM %token SHIFT_LEFT %token SHIFT_RIGHT %token SET_VAR @@ -115,6 +117,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token CROSS %token CUBE_SYM %token DELETE_SYM +%token DUAL_SYM %token DO_SYM %token DROP %token EVENTS_SYM @@ -200,6 +203,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token ESCAPE_SYM %token EXISTS %token EXTENDED_SYM +%token FALSE_SYM %token FILE_SYM %token FIRST_SYM %token FIXED_SYM @@ -334,6 +338,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token TO_SYM %token TRAILING %token TRANSACTION_SYM +%token TRUE_SYM %token TYPE_SYM %token TYPES_SYM %token FUNC_ARG0 @@ -519,7 +524,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %left '&' %left SHIFT_LEFT SHIFT_RIGHT %left '-' '+' -%left '*' '/' '%' +%left '*' '/' '%' DIV_SYM MOD_SYM %left NEG '~' %left XOR %left '^' @@ -542,7 +547,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); table_ident references %type - remember_name remember_end opt_len opt_ident opt_db text_or_password + remember_name remember_end opt_ident opt_db text_or_password opt_escape %type @@ -642,12 +647,13 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); handler_rkey_function handler_read_or_scan single_multi table_wild_list table_wild_one opt_wild union union_list precision union_option opt_on_delete_item subselect_start opt_and - subselect_end select_var_list select_var_list_init help + subselect_end select_var_list select_var_list_init help opt_len END_OF_INPUT %type '-' '+' '*' '/' '%' '(' ')' - ',' '!' '{' '}' '&' '|' AND OR OR_OR_CONCAT BETWEEN_SYM CASE_SYM THEN_SYM WHEN_SYM + ',' '!' '{' '}' '&' '|' AND OR OR_OR_CONCAT BETWEEN_SYM CASE_SYM + THEN_SYM WHEN_SYM DIV_SYM MOD_SYM %% @@ -1039,7 +1045,7 @@ field_spec: }; type: - int_type opt_len field_options { Lex->length=$2; $$=$1; } + int_type opt_len field_options { $$=$1; } | real_type opt_precision field_options { $$=$1; } | FLOAT_SYM float_options field_options { $$=FIELD_TYPE_FLOAT; } | BIT_SYM opt_len { Lex->length=(char*) "1"; @@ -1058,7 +1064,7 @@ type: | VARBINARY '(' NUM ')' { Lex->length=$3.str; Lex->charset=my_charset_bin; $$=FIELD_TYPE_VAR_STRING; } - | YEAR_SYM opt_len field_options { $$=FIELD_TYPE_YEAR; Lex->length=$2; } + | YEAR_SYM opt_len field_options { $$=FIELD_TYPE_YEAR; } | DATE_SYM { $$=FIELD_TYPE_DATE; } | TIME_SYM { $$=FIELD_TYPE_TIME; } | TIMESTAMP @@ -1073,7 +1079,7 @@ type: | DATETIME { $$=FIELD_TYPE_DATETIME; } | TINYBLOB { Lex->charset=my_charset_bin; $$=FIELD_TYPE_TINY_BLOB; } - | BLOB_SYM { Lex->charset=my_charset_bin; + | BLOB_SYM opt_len { Lex->charset=my_charset_bin; $$=FIELD_TYPE_BLOB; } | GEOMETRY_SYM { Lex->charset=my_charset_bin; $$=FIELD_TYPE_GEOMETRY; } @@ -1085,13 +1091,15 @@ type: $$=FIELD_TYPE_MEDIUM_BLOB; } | LONG_SYM varchar opt_binary { $$=FIELD_TYPE_MEDIUM_BLOB; } | TINYTEXT opt_binary { $$=FIELD_TYPE_TINY_BLOB; } - | TEXT_SYM opt_binary { $$=FIELD_TYPE_BLOB; } + | TEXT_SYM opt_len opt_binary { $$=FIELD_TYPE_BLOB; } | MEDIUMTEXT opt_binary { $$=FIELD_TYPE_MEDIUM_BLOB; } | LONGTEXT opt_binary { $$=FIELD_TYPE_LONG_BLOB; } | DECIMAL_SYM float_options field_options { $$=FIELD_TYPE_DECIMAL;} | NUMERIC_SYM float_options field_options { $$=FIELD_TYPE_DECIMAL;} + | FIXED_SYM float_options field_options + { $$=FIELD_TYPE_DECIMAL;} | ENUM {Lex->interval_list.empty();} '(' string_list ')' opt_binary { LEX *lex=Lex; @@ -1104,9 +1112,7 @@ type: lex->interval=typelib(lex->interval_list); $$=FIELD_TYPE_SET; } - | LONG_SYM { $$=FIELD_TYPE_MEDIUM_BLOB; } - | LONG_SYM BINARY { Lex->charset=my_charset_bin; - $$=FIELD_TYPE_MEDIUM_BLOB; } + | LONG_SYM opt_binary { $$=FIELD_TYPE_MEDIUM_BLOB; } ; char: @@ -1160,8 +1166,8 @@ field_option: | ZEROFILL { Lex->type|= UNSIGNED_FLAG | ZEROFILL_FLAG; }; opt_len: - /* empty */ { $$=(char*) 0; } /* use default length */ - | '(' NUM ')' { $$=$2.str; }; + /* empty */ { Lex->length=(char*) 0; } /* use default length */ + | '(' NUM ')' { Lex->length= $2.str; }; opt_precision: /* empty */ {} @@ -1629,6 +1635,7 @@ select_part2: select_into: limit_clause {} | select_from + | FROM DUAL_SYM | opt_into | opt_into select_from | select_from opt_into; @@ -1772,6 +1779,8 @@ expr_expr: | expr '-' expr { $$= new Item_func_minus($1,$3); } | expr '*' expr { $$= new Item_func_mul($1,$3); } | expr '/' expr { $$= new Item_func_div($1,$3); } + | expr DIV_SYM expr { $$= new Item_func_int_div($1,$3); } + | expr MOD_SYM expr { $$= new Item_func_mod($1,$3); } | expr '|' expr { $$= new Item_func_bit_or($1,$3); } | expr '^' expr { $$= new Item_func_bit_xor($1,$3); } | expr '&' expr { $$= new Item_func_bit_and($1,$3); } @@ -1812,10 +1821,12 @@ no_in_expr: | no_in_expr '-' expr { $$= new Item_func_minus($1,$3); } | no_in_expr '*' expr { $$= new Item_func_mul($1,$3); } | no_in_expr '/' expr { $$= new Item_func_div($1,$3); } + | no_in_expr DIV_SYM expr { $$= new Item_func_int_div($1,$3); } | no_in_expr '|' expr { $$= new Item_func_bit_or($1,$3); } | no_in_expr '^' expr { $$= new Item_func_bit_xor($1,$3); } | no_in_expr '&' expr { $$= new Item_func_bit_and($1,$3); } | no_in_expr '%' expr { $$= new Item_func_mod($1,$3); } + | no_in_expr MOD_SYM expr { $$= new Item_func_mod($1,$3); } | no_in_expr '+' INTERVAL_SYM expr interval { $$= new Item_date_add_interval($1,$4,$5,0); } | no_in_expr '-' INTERVAL_SYM expr interval @@ -1854,10 +1865,12 @@ no_and_expr: | no_and_expr '-' expr { $$= new Item_func_minus($1,$3); } | no_and_expr '*' expr { $$= new Item_func_mul($1,$3); } | no_and_expr '/' expr { $$= new Item_func_div($1,$3); } + | no_and_expr DIV_SYM expr { $$= new Item_func_int_div($1,$3); } | no_and_expr '|' expr { $$= new Item_func_bit_or($1,$3); } | no_and_expr '^' expr { $$= new Item_func_bit_xor($1,$3); } | no_and_expr '&' expr { $$= new Item_func_bit_and($1,$3); } | no_and_expr '%' expr { $$= new Item_func_mod($1,$3); } + | no_and_expr MOD_SYM expr { $$= new Item_func_mod($1,$3); } | no_and_expr '+' INTERVAL_SYM expr interval { $$= new Item_date_add_interval($1,$4,$5,0); } | no_and_expr '-' INTERVAL_SYM expr interval @@ -1975,6 +1988,8 @@ simple_expr: { $$= new Item_func_export_set($3, $5, $7, $9); } | EXPORT_SET '(' expr ',' expr ',' expr ',' expr ',' expr ')' { $$= new Item_func_export_set($3, $5, $7, $9, $11); } + | FALSE_SYM + { $$= new Item_int((char*) "FALSE",0,1); } | FORMAT_SYM '(' expr ',' NUM ')' { $$= new Item_func_format($3,atoi($5.str)); } | FROM_UNIXTIME '(' expr ')' @@ -2041,6 +2056,8 @@ simple_expr: { $$= new Item_func_geometry_from_text($3); } | MINUTE_SYM '(' expr ')' { $$= new Item_func_minute($3); } + | MOD_SYM '(' expr ',' expr ')' + { $$ = new Item_func_mod( $3, $5); } | MONTH_SYM '(' expr ')' { $$= new Item_func_month($3); } | MULTILINESTRING '(' expr_list ')' @@ -2120,6 +2137,8 @@ simple_expr: { $$= new Item_func_trim($5,$3); } | TRUNCATE_SYM '(' expr ',' expr ')' { $$= new Item_func_round($3,$5,1); } + | TRUE_SYM + { $$= new Item_int((char*) "TRUE",1,1); } | UDA_CHAR_SUM '(' udf_expr_list ')' { if ($3 != NULL) @@ -3533,6 +3552,7 @@ keyword: | DIRECTORY_SYM {} | DO_SYM {} | DUMPFILE {} + | DUAL_SYM {} | DYNAMIC_SYM {} | END {} | ENUM {} From a407ebd3e8f3b7d5dfccd9c94775ad47b05a0771 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 02:13:37 +0200 Subject: [PATCH 192/246] Added 'table lock' state while MySQL is waiting to get locks for tables. --- sql/lock.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/lock.cc b/sql/lock.cc index 15878fe7d15..4c84bbb6e69 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -117,7 +117,7 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd,TABLE **tables,uint count) thd->proc_info=0; break; } - thd->proc_info=0; + thd->proc_info="Table lock"; thd->locked=1; if (thr_multi_lock(sql_lock->locks,sql_lock->lock_count)) { @@ -136,6 +136,7 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd,TABLE **tables,uint count) thd->locked=0; break; } + thd->proc_info=0; /* some table was altered or deleted. reopen tables marked deleted */ mysql_unlock_tables(thd,sql_lock); @@ -145,6 +146,7 @@ retry: if (wait_for_tables(thd)) break; // Couldn't open tables } + thd->proc_info=0; if (thd->killed) { my_error(ER_SERVER_SHUTDOWN,MYF(0)); From 2da4d13569049ff2951a4c59764fcc07d9fca320 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 11:01:33 +0200 Subject: [PATCH 193/246] prevent using references on sum function (except HAVING clouse of current select) and forward references include/mysqld_error.h: new error message mysql-test/r/subselect.result: new error message mysql-test/t/subselect.test: new error message sql/item.cc: fix_fields indicator test on incorrect references sql/item.h: fix_fields indicator sql/item_cmpfunc.cc: fix_fields indicator sql/item_func.cc: fix_fields indicator sql/item_func.h: fix_fields indicator sql/item_strfunc.cc: fix_fields indicator sql/item_subselect.cc: fix_fields indicator sql/item_sum.cc: fix_fields indicator sql/item_sum.h: fix_fields indicator sql/item_uniq.h: fix_fields indicator sql/share/czech/errmsg.txt: new error message sql/share/danish/errmsg.txt: new error message sql/share/dutch/errmsg.txt: new error message sql/share/english/errmsg.txt: new error message sql/share/estonian/errmsg.txt: new error message sql/share/french/errmsg.txt: new error message sql/share/german/errmsg.txt: new error message sql/share/greek/errmsg.txt: new error message sql/share/hungarian/errmsg.txt: new error message sql/share/italian/errmsg.txt: new error message sql/share/japanese/errmsg.txt: new error message sql/share/korean/errmsg.txt: new error message sql/share/norwegian-ny/errmsg.txt: new error message sql/share/norwegian/errmsg.txt: new error message sql/share/polish/errmsg.txt: new error message sql/share/portuguese/errmsg.txt: new error message sql/share/romanian/errmsg.txt: new error message sql/share/russian/errmsg.txt: new error message sql/share/serbian/errmsg.txt: new error message sql/share/slovak/errmsg.txt: new error message sql/share/spanish/errmsg.txt: new error message sql/share/swedish/errmsg.txt: new error message sql/share/ukrainian/errmsg.txt: new error message --- include/mysqld_error.h | 3 +- mysql-test/r/subselect.result | 12 ++++++-- mysql-test/t/subselect.test | 11 ++++++-- sql/item.cc | 46 +++++++++++++++++++++++++++++-- sql/item.h | 1 + sql/item_cmpfunc.cc | 2 ++ sql/item_func.cc | 1 + sql/item_func.h | 1 + sql/item_strfunc.cc | 2 ++ sql/item_subselect.cc | 1 + sql/item_sum.cc | 2 ++ sql/item_sum.h | 1 + sql/item_uniq.h | 6 +++- sql/share/czech/errmsg.txt | 1 + sql/share/danish/errmsg.txt | 1 + sql/share/dutch/errmsg.txt | 1 + sql/share/english/errmsg.txt | 1 + sql/share/estonian/errmsg.txt | 1 + sql/share/french/errmsg.txt | 1 + sql/share/german/errmsg.txt | 1 + sql/share/greek/errmsg.txt | 1 + sql/share/hungarian/errmsg.txt | 1 + sql/share/italian/errmsg.txt | 1 + sql/share/japanese/errmsg.txt | 1 + sql/share/korean/errmsg.txt | 1 + sql/share/norwegian-ny/errmsg.txt | 1 + sql/share/norwegian/errmsg.txt | 1 + sql/share/polish/errmsg.txt | 1 + sql/share/portuguese/errmsg.txt | 1 + sql/share/romanian/errmsg.txt | 1 + sql/share/russian/errmsg.txt | 1 + sql/share/serbian/errmsg.txt | 1 + sql/share/slovak/errmsg.txt | 1 + sql/share/spanish/errmsg.txt | 1 + sql/share/swedish/errmsg.txt | 1 + sql/share/ukrainian/errmsg.txt | 1 + 36 files changed, 104 insertions(+), 8 deletions(-) diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 456d675a045..82d08cef0d4 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -260,4 +260,5 @@ #define ER_UNKNOWN_STMT_HANDLER 1241 #define ER_CORRUPT_HELP_DB 1242 #define ER_CYCLIC_REFERENCE 1243 -#define ER_ERROR_MESSAGES 244 +#define ER_ILLEGAL_REFERENCE 1244 +#define ER_ERROR_MESSAGES 245 diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index e54e1fb0fef..df56a43e5ba 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -9,9 +9,9 @@ SELECT (SELECT (SELECT 0 UNION SELECT 0)); (SELECT (SELECT 0 UNION SELECT 0)) 0 SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; -Cyclic reference on subqueries +Reference 'a' not supported (forward reference in item list) SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b; -Cyclic reference on subqueries +Reference 'b' not supported (forward reference in item list) drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); @@ -20,6 +20,8 @@ create table t4 (a int, b int); insert into t1 values (2); insert into t2 values (1,7),(2,7); insert into t4 values (4,8),(3,8),(5,9); +select (select a from t1 where t1.a = a1) as a2, (select b from t2 where t2.b=a2) as a1; +Reference 'a1' not supported (forward reference in item list) select (select a from t1 where t1.a=t2.a), a from t2; (select a from t1 where t1.a=t2.a) a NULL 1 @@ -278,6 +280,12 @@ PRIMARY KEY (`numeropost`,`numreponse`), UNIQUE KEY `numreponse` (`numreponse`), KEY `pseudo` (`pseudo`,`numeropost`) ) TYPE=MyISAM; +SELECT (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a),numreponse FROM (SELECT * FROM threadhardwarefr7) as a; +Reference 'numreponse' not supported (forward reference in item list) +SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a) FROM (SELECT * FROM threadhardwarefr7) as a; +Unknown column 'a' in 'having clause' +SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=1) FROM (SELECT * FROM threadhardwarefr7) as a; +numreponse (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=1) INSERT INTO threadhardwarefr7 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM threadhardwarefr7 WHERE numeropost='1'); Subselect returns more than 1 record diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 7a507be4ed2..68deebd2177 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -1,9 +1,9 @@ select (select 2); SELECT (SELECT 1) UNION SELECT (SELECT 2); SELECT (SELECT (SELECT 0 UNION SELECT 0)); --- error 1243 +-- error 1244 SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; --- error 1243 +-- error 1244 SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b; drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); @@ -13,6 +13,8 @@ create table t4 (a int, b int); insert into t1 values (2); insert into t2 values (1,7),(2,7); insert into t4 values (4,8),(3,8),(5,9); +-- error 1244 +select (select a from t1 where t1.a = a1) as a2, (select b from t2 where t2.b=a2) as a1; select (select a from t1 where t1.a=t2.a), a from t2; select (select a from t1 where t1.a=t2.b), a from t2; select (select a from t1), a from t2; @@ -176,6 +178,11 @@ CREATE TABLE `threadhardwarefr7` ( UNIQUE KEY `numreponse` (`numreponse`), KEY `pseudo` (`pseudo`,`numeropost`) ) TYPE=MyISAM; +-- error 1244 +SELECT (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a),numreponse FROM (SELECT * FROM threadhardwarefr7) as a; +-- error 1054 +SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a) FROM (SELECT * FROM threadhardwarefr7) as a; +SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=1) FROM (SELECT * FROM threadhardwarefr7) as a; INSERT INTO threadhardwarefr7 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); -- error 1240 EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM threadhardwarefr7 WHERE numeropost='1'); diff --git a/sql/item.cc b/sql/item.cc index 48ec11d02c2..b56486c5027 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -34,7 +34,8 @@ void item_init(void) item_user_lock_init(); } -Item::Item() +Item::Item(): + fixed(0) { marker=0; maybe_null=null_value=with_sum_func=unsigned_flag=0; @@ -139,6 +140,7 @@ CHARSET_INFO * Item::thd_charset() const Item_field::Item_field(Field *f) :Item_ident(NullS,f->table_name,f->field_name) { set_field(f); + fixed= 1; // This item is not needed in fix_fields } @@ -438,6 +440,7 @@ bool Item::fix_fields(THD *thd, struct st_table_list *list, Item ** ref) { + fixed= 1; return 0; } @@ -459,23 +462,48 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) */ SELECT_LEX *last= 0; + Item **refer= (Item **)not_found_item; // Prevent using outer fields in subselects, that is not supported now if (thd->lex.current_select->linkage != DERIVED_TABLE_TYPE) for (SELECT_LEX *sl= thd->lex.current_select->outer_select(); sl; sl= sl->outer_select()) + { if ((tmp= find_field_in_tables(thd, this, (last= sl)->get_table_list(), 0)) != not_found_field) break; + if((refer= find_item_in_list(this, (last= sl)->item_list, + REPORT_EXCEPT_NOT_FOUND)) != + (Item **)not_found_item) + break; + + } if (!tmp) return -1; - else if (tmp == not_found_field) + else if (!refer) + return 1; + else if (tmp == not_found_field && refer == (Item **)not_found_item) { // call to return error code find_field_in_tables(thd, this, tables, 1); return -1; } + else if (refer != (Item **)not_found_item) + { + Item_ref *r; + *ref= r= new Item_ref((char *)db_name, (char *)table_name, + (char *)field_name); + if (!r) + return 1; + int res; + if ((res= r->fix_fields(thd, tables, ref))) + return res; + r->depended_from= last; + thd->lex.current_select->mark_as_dependent(last); + thd->add_possible_loop(r); + return 0; + } else { depended_from= last; @@ -507,6 +535,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) return 1; return (*ref)->fix_fields(thd, tables, ref); } + fixed= 1; return 0; } @@ -885,6 +914,19 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) maybe_null= (*ref)->maybe_null; decimals= (*ref)->decimals; } + if (((*ref)->with_sum_func && + (depended_from || + !(thd->lex.current_select->linkage != GLOBAL_OPTIONS_TYPE && + thd->lex.current_select->select_lex()->having_fix_field))) || + !(*ref)->fixed) + { + my_error(ER_ILLEGAL_REFERENCE, MYF(0), name, + ((*ref)->with_sum_func? + "reference on group function": + "forward reference in item list")); + return 1; + } + fixed= 1; return 0; } diff --git a/sql/item.h b/sql/item.h index c67c16c50ad..7228b5dc785 100644 --- a/sql/item.h +++ b/sql/item.h @@ -46,6 +46,7 @@ public: my_bool null_value; /* if item is null */ my_bool unsigned_flag; my_bool with_sum_func; + my_bool fixed; /* If item fixed with fix_fields */ // alloc & destruct is done as start of select using sql_alloc Item(); diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 74eb5734ecf..a3c8328bb06 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1152,6 +1152,7 @@ Item_cond::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) if (thd) thd->cond_count+=list.elements; fix_length_and_dec(); + fixed= 1; return 0; } @@ -1425,6 +1426,7 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) } else maybe_null=1; + fixed= 1; return 0; } diff --git a/sql/item_func.cc b/sql/item_func.cc index aa39b3cc857..140d432b794 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -123,6 +123,7 @@ Item_func::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) } } fix_length_and_dec(); + fixed= 1; return 0; } diff --git a/sql/item_func.h b/sql/item_func.h index 581809fc9cb..4dd9088c5c8 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -742,6 +742,7 @@ public: bool res= udf.fix_fields(thd, tables, this, arg_count, args); used_tables_cache= udf.used_tables_cache; const_item_cache= udf.const_item_cache; + fixed= 1; return res; } Item_result result_type () const { return udf.result_type(); } diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 1a561c9eb34..6a0aaa3b032 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2065,6 +2065,7 @@ bool Item_func_conv_charset::fix_fields(THD *thd,struct st_table_list *tables, I const_item_cache=args[0]->const_item(); set_charset(conv_charset); fix_length_and_dec(); + fixed= 1; return 0; } @@ -2099,6 +2100,7 @@ bool Item_func_set_collation::fix_fields(THD *thd,struct st_table_list *tables, used_tables_cache=args[0]->used_tables(); const_item_cache=args[0]->const_item(); fix_length_and_dec(); + fixed= 1; return 0; } diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 1f1944026ef..01ce5fad4a6 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -92,6 +92,7 @@ bool Item_subselect::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) } fix_length_and_dec(); } + fixed= 1; return res; } diff --git a/sql/item_sum.cc b/sql/item_sum.cc index db4c45fc412..9c7a73a6904 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -135,6 +135,7 @@ Item_sum_num::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) null_value=1; fix_length_and_dec(); thd->allow_sum_func=1; // Allow group functions + fixed= 1; return 0; } @@ -165,6 +166,7 @@ Item_sum_hybrid::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) null_value=1; fix_length_and_dec(); thd->allow_sum_func=1; // Allow group functions + fixed= 1; return 0; } diff --git a/sql/item_sum.h b/sql/item_sum.h index 3e67f1e3624..cc49ac8578f 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -384,6 +384,7 @@ public: const char *func_name() const { return udf.name(); } bool fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) { + fixed= 1; return udf.fix_fields(thd,tables,this,this->arg_count,this->args); } enum Sumfunctype sum_func () const { return UDF_SUM_FUNC; } diff --git a/sql/item_uniq.h b/sql/item_uniq.h index f0d1d353cfb..2004be63de2 100644 --- a/sql/item_uniq.h +++ b/sql/item_uniq.h @@ -43,5 +43,9 @@ public: bool add() { return 0; } void reset_field() {} void update_field(int offset) {} - bool fix_fields(THD *thd, TABLE_LIST *tlist, Item **ref) { return 0;} + bool fix_fields(THD *thd, TABLE_LIST *tlist, Item **ref) + { + fixed= 1; + return 0; + } }; diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index d43a433da06..14414326c06 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -254,3 +254,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 3a947bcbe38..8bc6cec83ee 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -248,3 +248,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 1cb81849be1..9b4865ffdf3 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -256,3 +256,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 6e96fdb393e..8057e218be6 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 394c40c5778..206d9c69568 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -250,3 +250,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index b18d3f8fb38..b675985c310 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index 49ea31dd05b..6fb265df3e4 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -248,3 +248,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index b203c63949b..f72bf188140 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 07081e689ad..7fb896a5632 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -247,3 +247,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 0a380e2b48f..93e4bee9b11 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 2e0a083ca06..62d3c249e8d 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -247,3 +247,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 19fcf98e3c7..f74b159dd64 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 810aaf38f74..82ab76821f7 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -247,3 +247,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index a74a0a910b8..ab1a1833011 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -247,3 +247,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index efde31ff4c9..111261bbe84 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -249,3 +249,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index e90d5844b9b..03dab8ebe5c 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 18f0bf7f79d..93e25ef637a 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -249,3 +249,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 790d738031c..4427104f2ef 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -248,3 +248,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "ãÉËÌÉÞÅÓËÁÑ ÓÓÙÌËÁ ÎÁ ÐÏÄÚÁÐÒÏÓ", +"óÓÙÌËÁ '%-.64s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ (%s)", diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index e8186d38a5b..ad6bfe90129 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -241,3 +241,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 216d46fcd3a..55837225b60 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -253,3 +253,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 5076b1b6679..ed26f8b9e98 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -246,3 +246,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index a3bb40fb4f5..dd836493ca8 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -245,3 +245,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", +"Reference '%-.64s' not supported (%s)", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 426c2a14e3b..801e8ff4112 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -250,3 +250,4 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "ãÉËÌiÞÎÅ ÐÏÓÉÌÁÎÎÑ ÎÁ ÐiÄÚÁÐÉÔ", +"ðÏÓÉÌÁÎÎÑ '%-.64s' ÎÅ ÐiÄÔÒÉÍÕÅÔÓÑ (%s)", From 32658672d681a95bc3b636783532fce231af44ab Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 16:04:59 +0200 Subject: [PATCH 194/246] after merging fix --- include/mysqld_error.h | 2 +- mysql-test/t/subselect.test | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/mysqld_error.h b/include/mysqld_error.h index 11d831fe85a..ed83c5e57a8 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -261,5 +261,5 @@ #define ER_CORRUPT_HELP_DB 1242 #define ER_CYCLIC_REFERENCE 1243 #define ER_AUTO_CONVERT 1244 -#define ER_ILLEGAL_REFERENCE 1246 +#define ER_ILLEGAL_REFERENCE 1245 #define ER_ERROR_MESSAGES 246 diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 68deebd2177..b9edd0e3396 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -1,9 +1,9 @@ select (select 2); SELECT (SELECT 1) UNION SELECT (SELECT 2); SELECT (SELECT (SELECT 0 UNION SELECT 0)); --- error 1244 +-- error 1245 SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; --- error 1244 +-- error 1245 SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b; drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); @@ -13,7 +13,7 @@ create table t4 (a int, b int); insert into t1 values (2); insert into t2 values (1,7),(2,7); insert into t4 values (4,8),(3,8),(5,9); --- error 1244 +-- error 1245 select (select a from t1 where t1.a = a1) as a2, (select b from t2 where t2.b=a2) as a1; select (select a from t1 where t1.a=t2.a), a from t2; select (select a from t1 where t1.a=t2.b), a from t2; @@ -178,7 +178,7 @@ CREATE TABLE `threadhardwarefr7` ( UNIQUE KEY `numreponse` (`numreponse`), KEY `pseudo` (`pseudo`,`numeropost`) ) TYPE=MyISAM; --- error 1244 +-- error 1245 SELECT (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a),numreponse FROM (SELECT * FROM threadhardwarefr7) as a; -- error 1054 SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a) FROM (SELECT * FROM threadhardwarefr7) as a; From d0236e30a4c878ff352e4f6ee1f4c1ff74de9e26 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 17:55:49 +0200 Subject: [PATCH 195/246] A fix for --bind-address=hostname --- sql/mysqld.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 71b832f24f4..8d6a1a8a700 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3543,7 +3543,6 @@ static void set_options(void) #endif my_bind_addr = htonl( INADDR_ANY ); } - /* Initiates DEBUG - but no debugging here ! */ static void get_options(int argc,char **argv) @@ -3893,7 +3892,7 @@ static void get_options(int argc,char **argv) else { struct hostent *ent; - if (!optarg || !optarg[0]) + if (optarg && optarg[0]) ent=gethostbyname(optarg); else { From 6f5b38b9dd0841e1841af1243dd19b5a12b59e34 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 18:14:27 +0200 Subject: [PATCH 196/246] fix error in result mysql-test/r/func_test.result: Fixing the error in result --- mysql-test/r/func_test.result | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index da82567db4d..2f40740d4aa 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -27,7 +27,6 @@ -1.49 or -1.49 0.6 or 0.6 1 1 start ctime1 ctime2 -2002-11-04 00:00:00 20021029165106 20021105164731 start ctime1 ctime2 2002-11-04 00:00:00 20021029165106 20021105164731 5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1 From aec3e3e910b914f3cce5e94b83c14d04baaddeab Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 21:36:16 +0500 Subject: [PATCH 197/246] add sapdb section to server-cfg (benchmarks) sql-bench/server-cfg.sh: Add sapdb section --- sql-bench/server-cfg.sh | 213 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 211 insertions(+), 2 deletions(-) diff --git a/sql-bench/server-cfg.sh b/sql-bench/server-cfg.sh index ea1697fb4c3..3a348b76f43 100644 --- a/sql-bench/server-cfg.sh +++ b/sql-bench/server-cfg.sh @@ -69,11 +69,13 @@ sub get_server { $server= new db_db2($host,$database); } elsif ($name =~ /Mimer/i) { $server= new db_Mimer($host,$database); } + elsif ($name =~ /Sapdb/i) + { $server= new db_sapdb($host,$database); } elsif ($name =~ /interBase/i) { $server= new db_interbase($host,$database); } else { - die "Unknown sql server name used: $name\nUse one of: Access, Adabas, AdabasD, Empress, FrontBase, Oracle, Informix, InterBase, DB2, mSQL, Mimer, MS-SQL, MySQL, Pg, Solid or Sybase.\nIf the connection is done trough ODBC the name must end with _ODBC\n"; + die "Unknown sql server name used: $name\nUse one of: Access, Adabas, AdabasD, Empress, FrontBase, Oracle, Informix, InterBase, DB2, mSQL, Mimer, MS-SQL, MySQL, Pg, Solid, SAPDB or Sybase.\nIf the connection is done trough ODBC the name must end with _ODBC\n"; } if ($name =~ /_ODBC$/i || defined($odbc) && $odbc) { @@ -94,7 +96,7 @@ sub get_server sub all_servers { return ["Access", "Adabas", "DB2", "Empress", "FrontBase", "Oracle", - "Informix", "InterBase", "Mimer", "mSQL", "MS-SQL", "MySQL", "Pg", + "Informix", "InterBase", "Mimer", "mSQL", "MS-SQL", "MySQL", "Pg","SAPDB", "Solid", "Sybase"]; } @@ -3358,4 +3360,211 @@ sub fix_for_insert return $cmd; } +############################################################################# +# Configuration for SAPDB +############################################################################# + +package db_Sapdb; + +sub new +{ + my ($type,$host,$database)= @_; + my $self= {}; + my %limits; + bless $self; + + $self->{'cmp_name'} = "sapdb"; + $self->{'data_source'} = "DBI:SAP_DB:$database"; + $self->{'limits'} = \%limits; + $self->{'blob'} = "LONG"; # * + $self->{'text'} = "LONG"; # * + $self->{'double_quotes'} = 1; # Can handle: 'Walker''s' + $self->{'drop_attr'} = ""; + $self->{'transactions'} = 1; # Transactions enabled * + $self->{'char_null'} = ""; + $self->{'numeric_null'} = ""; + + $limits{'max_conditions'} = 9999; # (Actually not a limit) * + $limits{'max_columns'} = 1023; # Max number of columns in table * + $limits{'max_tables'} = 65000; # Should be big enough * unlimited actually + $limits{'max_text_size'} = 15000; # Max size with default buffers. + $limits{'query_size'} = 64*1024; # Max size with default buffers. *64 kb by default. May be set by system variable + $limits{'max_index'} = 510; # Max number of keys * + $limits{'max_index_parts'} = 16; # Max segments/key * + $limits{'max_column_name'} = 32; # max table and column name * + + $limits{'join_optimizer'} = 1; # Can optimize FROM tables * + $limits{'load_data_infile'} = 0; # Has load data infile * + $limits{'lock_tables'} = 1; # Has lock tables + $limits{'functions'} = 1; # Has simple functions (+/-) * + $limits{'group_functions'} = 1; # Have group functions * + $limits{'group_func_sql_min_str'} = 1; # Can execute MIN() and MAX() on strings * + $limits{'group_distinct_functions'}= 1; # Have count(distinct) * + $limits{'select_without_from'}= 0; # Cannot do 'select 1'; * + $limits{'multi_drop'} = 0; # Drop table cannot take many tables * + $limits{'subqueries'} = 1; # Supports sub-queries. * + $limits{'left_outer_join'} = 1; # Supports left outer joins * + $limits{'table_wildcard'} = 1; # Has SELECT table_name.* + $limits{'having_with_alias'} = 0; # Can use aliases in HAVING * + $limits{'having_with_group'} = 1; # Can use group functions in HAVING * + $limits{'like_with_column'} = 1; # Can use column1 LIKE column2 * + $limits{'order_by_position'} = 1; # Can use 'ORDER BY 1' * + $limits{'group_by_position'} = 0; # Cannot use 'GROUP BY 1' * + $limits{'alter_table'} = 1; # Have ALTER TABLE * + $limits{'alter_add_multi_col'}= 1; # Have ALTER TABLE t add a int,add b int; * + $limits{'alter_table_dropcol'}= 1; # Have ALTER TABLE DROP column * + $limits{'insert_multi_value'} = 0; # INSERT ... values (1,2),(3,4) * + + $limits{'group_func_extra_std'} = 0; # Does not have group function std(). + + $limits{'func_odbc_mod'} = 0; # Have function mod. * + $limits{'func_extra_%'} = 0; # Does not have % as alias for mod() * + $limits{'func_odbc_floor'} = 1; # Has func_odbc_floor function * + $limits{'func_extra_if'} = 0; # Does not have function if. * + $limits{'column_alias'} = 1; # Alias for fields in select statement. * + $limits{'NEG'} = 1; # Supports -id * + $limits{'func_extra_in_num'} = 0; # Has function in * + $limits{'limit'} = 0; # Does not support the limit attribute * + $limits{'working_blobs'} = 1; # If big varchar/blobs works * + $limits{'order_by_unused'} = 1; # + $limits{'working_all_fields'} = 1; # + + + return $self; +} + +# +# Get the version number of the database +# + +sub version +{ + my ($self)=@_; + my ($dbh,$sth,$version,@row); + + $dbh=$self->connect(); + $sth = $dbh->prepare("SELECT KERNEL FROM VERSIONS") or die $DBI::errstr; + $version="SAP DB (unknown)"; + if ($sth->execute && (@row = $sth->fetchrow_array) + && $row[0] =~ /([\d\.]+)/) + { + $version="sap-db $1"; + } + $sth->finish; + $dbh->disconnect; + return $version; +} + +# +# Connection with optional disabling of logging +# + +sub connect +{ + my ($self)=@_; + my ($dbh); + $dbh=DBI->connect($self->{'data_source'}, $main::opt_user, + $main::opt_password,{ PrintError => 0, AutoCommit => 1}) || + die "Got error: '$DBI::errstr' when connecting to " . $self->{'data_source'} ." with user: '$main::opt_user' password: '$main::opt_password'\n"; + + return $dbh; +} + +# +# Returns a list of statements to create a table +# The field types are in ANSI SQL format. +# + +sub create +{ + my($self,$table_name,$fields,$index,$options) = @_; + my($query,@queries,$nr); + my @index; + my @keys; + + $query="create table $table_name ("; + foreach $field (@$fields) + { + $field =~ s/\bmediumint\b/int/i; + $field =~ s/\btinyint\b/int/i; + $field =~ s/ int\(\d\)/ int/i; + $field =~ s/BLOB/LONG/i; + $field =~ s/INTEGER\s*\(\d+\)/INTEGER/i; + $field =~ s/SMALLINT\s*\(\d+\)/SMALLINT/i; + $field =~ s/FLOAT\s*\((\d+),\d+\)/FLOAT\($1\)/i; + $field =~ s/DOUBLE/FLOAT\(38\)/i; + $field =~ s/DOUBLE\s+PRECISION/FLOAT\(38\)/i; + $query.= $field . ','; + } + $nr=0; + foreach $ind (@$index) + { + if ( $ind =~ /\bKEY\b/i ){ + push(@keys,"ALTER TABLE $table_name ADD $ind"); + } elsif ($ind =~ /^unique.*\(([^\(]*)\)$/i) { + $nr++; + my $query="create unique index ${table_name}_$nr on $table_name ($1)"; + push(@index,$query); + }else{ + my @fields = split(' ',$ind); + my $query="CREATE INDEX $fields[1] ON $table_name $fields[2]"; + print "$query \n"; + push(@index,$query); + } + } + substr($query,-1)=")"; # Remove last ','; + $query.=" $options" if (defined($options)); + push(@queries,$query); + push(@queries,@keys); + push(@queries,@index); + return @queries; +} + +sub insert_file { + my($self,$dbname, $file) = @_; + print "insert of an ascii file isn't supported by SAPDB\n"; + return 0; +} + +# +# Do any conversions to the ANSI SQL query so that the database can handle it +# + +sub query { + my($self,$sql) = @_; + return $sql; +} + +sub drop_index { + my ($self,$table,$index) = @_; + return "DROP INDEX $index"; +} + +# +# Abort if the server has crashed +# return: 0 if ok +# 1 question should be retried +# + +sub abort_if_fatal_error +{ + return 0; +} + +sub small_rollback_segment +{ + return 0; +} + +sub reconnect_on_errors +{ + return 0; +} + +sub fix_for_insert +{ + my ($self,$cmd) = @_; + return $cmd; +} + 1; From 55ad244535ec92997c1ca2f783329b5787514e77 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 22:21:14 +0400 Subject: [PATCH 198/246] fix for wrong index number bug --- sql/opt_range.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 13c2f6333b1..8aa13ac245b 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -932,7 +932,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, String tmp(buff1,sizeof(buff1),default_charset_info),*res; uint length,offset,min_length,max_length; - if (!field->optimize_range((uint) key_part->key)) + if (!field->optimize_range(param->real_keynr[key_part->key])) DBUG_RETURN(0); // Can't optimize this if (!(res= value->val_str(&tmp))) DBUG_RETURN(&null_element); @@ -1002,7 +1002,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, DBUG_RETURN(tree); } - if (!field->optimize_range((uint) key_part->key) && + if (!field->optimize_range(param->real_keynr[key_part->key]) && type != Item_func::EQ_FUNC && type != Item_func::EQUAL_FUNC) DBUG_RETURN(0); // Can't optimize this From a3a99fc7cadc43a5efc071d33dc90ed7f7799034 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 22:13:23 +0200 Subject: [PATCH 199/246] A fix for the bug with: delete from table where column<=>NULL on indexed columns --- mysql-test/r/delete.result | 6 ++++++ mysql-test/t/delete.test | 5 +++++ sql/opt_range.cc | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index c2230722aa6..e3e95c79fb7 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -24,3 +24,9 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a)); insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27); delete from t1 where a=27; drop table t1; +create table t1 (id int, index(id)); +insert into t1 values(NULL); +delete from t1 where id <=> NULL; +select * from t1; +id +drop table if exists t1; diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index 953e22cdd55..fc57fdabcd5 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -35,3 +35,8 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a)); insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27); delete from t1 where a=27; drop table t1; +create table t1 (id int, index(id)); +insert into t1 values(NULL); +delete from t1 where id <=> NULL; +select * from t1; +drop table if exists t1; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index f33a2d312b4..14999097c62 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1024,7 +1024,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, field->cmp_type() != value->result_type()) DBUG_RETURN(0); - if (value->save_in_field(field)) + if (value->save_in_field(field) || value->is_null()) { // TODO; Check if we can we remove the following block. if (type == Item_func::EQUAL_FUNC) From c58d9d9a9dda3037db574bbf97b22e7c1c274e02 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 22:25:53 +0200 Subject: [PATCH 200/246] Fixes after merge with 4.0 mysql-test/r/heap_btree.result: Updated results mysql-test/r/heap_hash.result: Updated results mysql-test/r/merge.result: Updated results mysql-test/r/rpl_log.result: Updated results mysql-test/r/select.result: Updated results mysql-test/r/subselect.result: Updated results sql/item_cmpfunc.h: Fix after merge sql/log_event.cc: Fix after merge sql/mysql_priv.h: Fix after merge sql/sql_acl.cc: Fix after merge sql/sql_class.cc: Fix after merge sql/sql_db.cc: Fix after merge sql/sql_delete.cc: Fix after merge sql/sql_lex.cc: Fix after merge sql/sql_lex.h: Fix after merge sql/sql_parse.cc: Fix after merge sql/sql_update.cc: Fix after merge sql/sql_yacc.yy: Fix after merge --- mysql-test/r/heap_btree.result | 20 ++++++++++---------- mysql-test/r/heap_hash.result | 12 ++++++------ mysql-test/r/merge.result | 20 ++++++++++---------- mysql-test/r/rpl_log.result | 2 +- mysql-test/r/select.result | 4 ++-- mysql-test/r/subselect.result | 18 +++++++++--------- sql/item_cmpfunc.h | 4 ++-- sql/log_event.cc | 11 ++++++----- sql/mysql_priv.h | 1 - sql/sql_acl.cc | 8 ++++---- sql/sql_class.cc | 6 +++--- sql/sql_db.cc | 2 +- sql/sql_delete.cc | 2 +- sql/sql_lex.cc | 1 - sql/sql_lex.h | 3 ++- sql/sql_parse.cc | 8 ++++---- sql/sql_update.cc | 3 ++- sql/sql_yacc.yy | 23 +++++++++++++---------- 18 files changed, 76 insertions(+), 72 deletions(-) diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result index a33f237a312..bf24f78321f 100644 --- a/mysql-test/r/heap_btree.result +++ b/mysql-test/r/heap_btree.result @@ -66,14 +66,14 @@ a alter table t1 type=myisam; explain select * from t1 where a in (869751,736494,226312,802616); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 where used; Using index +1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index drop table t1; create table t1 (x int not null, y int not null, key x using BTREE (x,y), unique y using BTREE (y)) type=heap; insert into t1 values (1,1),(2,2),(1,3),(2,4),(2,5),(2,6); explain select * from t1 where x=1; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref x x 4 const 1 where used +1 SIMPLE t1 ref x x 4 const 1 Using where select * from t1 where x=1; x y 1 1 @@ -124,17 +124,17 @@ a b 1 6 explain select * from tx where a=x order by a,b; id select_type table type possible_keys key key_len ref rows Extra -x SIMPLE tx ref a a x const x where used +x SIMPLE tx ref a a x const x Using where explain select * from tx where a=x order by b; id select_type table type possible_keys key key_len ref rows Extra -x SIMPLE tx ref a a x const x where used +x SIMPLE tx ref a a x const x Using where select * from t1 where b=1; a b 1 1 1 1 explain select * from tx where b=x; id select_type table type possible_keys key key_len ref rows Extra -x SIMPLE tx ref b b x const x where used +x SIMPLE tx ref b b x const x Using where drop table t1; create table t1 (id int unsigned not null, primary key using BTREE (id)) type=HEAP; insert into t1 values(1); @@ -175,17 +175,17 @@ create table t1 (btn char(10) not null, key using BTREE (btn)) type=heap; insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i"); explain select * from t1 where btn like "q%"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL btn NULL NULL NULL 14 where used +1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where select * from t1 where btn like "q%"; btn alter table t1 add column new_col char(1) not null, add key using BTREE (btn,new_col), drop key btn; update t1 set new_col=btn; explain select * from t1 where btn="a"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 10 const 1 where used +1 SIMPLE t1 ref btn btn 10 const 1 Using where explain select * from t1 where btn="a" and new_col="a"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 11 const,const 1 where used +1 SIMPLE t1 ref btn btn 11 const,const 1 Using where drop table t1; CREATE TABLE t1 ( a int default NULL, @@ -198,7 +198,7 @@ SELECT * FROM t1 WHERE a=NULL; a b explain SELECT * FROM t1 WHERE a IS NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 1 where used +1 SIMPLE t1 ref a a 5 const 1 Using where SELECT * FROM t1 WHERE a<=>NULL; a b NULL 99 @@ -206,7 +206,7 @@ SELECT * FROM t1 WHERE b=NULL; a b explain SELECT * FROM t1 WHERE b IS NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref b b 5 const 1 where used +1 SIMPLE t1 ref b b 5 const 1 Using where SELECT * FROM t1 WHERE b<=>NULL; a b 99 NULL diff --git a/mysql-test/r/heap_hash.result b/mysql-test/r/heap_hash.result index 43a86069d3d..3c2baa645f7 100644 --- a/mysql-test/r/heap_hash.result +++ b/mysql-test/r/heap_hash.result @@ -66,7 +66,7 @@ a alter table t1 type=myisam; explain select * from t1 where a in (869751,736494,226312,802616); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 where used; Using index +1 SIMPLE t1 range uniq_id uniq_id 4 NULL 4 Using where; Using index drop table t1; create table t1 (x int not null, y int not null, key x using HASH (x), unique y using HASH (y)) type=heap; @@ -159,17 +159,17 @@ create table t1 (btn char(10) not null, key using HASH (btn)) type=heap; insert into t1 values ("hello"),("hello"),("hello"),("hello"),("hello"),("a"),("b"),("c"),("d"),("e"),("f"),("g"),("h"),("i"); explain select * from t1 where btn like "q%"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL btn NULL NULL NULL 14 where used +1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where select * from t1 where btn like "q%"; btn alter table t1 add column new_col char(1) not null, add key using HASH (btn,new_col), drop key btn; update t1 set new_col=btn; explain select * from t1 where btn="a"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL btn NULL NULL NULL 14 where used +1 SIMPLE t1 ALL btn NULL NULL NULL 14 Using where explain select * from t1 where btn="a" and new_col="a"; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref btn btn 11 const,const 10 where used +1 SIMPLE t1 ref btn btn 11 const,const 10 Using where drop table t1; CREATE TABLE t1 ( a int default NULL, @@ -182,7 +182,7 @@ SELECT * FROM t1 WHERE a=NULL; a b explain SELECT * FROM t1 WHERE a IS NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref a a 5 const 10 where used +1 SIMPLE t1 ref a a 5 const 10 Using where SELECT * FROM t1 WHERE a<=>NULL; a b NULL 99 @@ -190,7 +190,7 @@ SELECT * FROM t1 WHERE b=NULL; a b explain SELECT * FROM t1 WHERE b IS NULL; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref b b 5 const 1 where used +1 SIMPLE t1 ref b b 5 const 1 Using where SELECT * FROM t1 WHERE b<=>NULL; a b 99 NULL diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 45b5bd9ddb7..cd78ac791c4 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -35,10 +35,10 @@ insert into t1 select NULL,message from t2; create table t3 (a int not null, b char(20), key(a)) type=MERGE UNION=(test.t1,test.t2); explain select * from t3 where a < 10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range a a 4 NULL 10 Using where +1 SIMPLE t3 range a a 4 NULL 18 Using where explain select * from t3 where a > 10 and a < 20; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 range a a 4 NULL 10 Using where +1 SIMPLE t3 range a a 4 NULL 16 Using where select * from t3 where a = 10; a b 10 Testing @@ -581,18 +581,18 @@ KEY files (fileset_id,fileset_root_id) ) TYPE=MRG_MyISAM UNION=(t1); EXPLAIN SELECT * FROM t2 IGNORE INDEX (files) WHERE fileset_id = 2 AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; -table type possible_keys key key_len ref rows Extra -t2 range PRIMARY PRIMARY 33 NULL 5 Using where +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range PRIMARY PRIMARY 33 NULL 5 Using where EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2 AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; -table type possible_keys key key_len ref rows Extra -t2 range PRIMARY,files PRIMARY 33 NULL 5 Using where +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range PRIMARY,files PRIMARY 33 NULL 5 Using where EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2 AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1; -table type possible_keys key key_len ref rows Extra -t1 range PRIMARY,files PRIMARY 33 NULL 5 Using where +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY,files PRIMARY 33 NULL 5 Using where EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2 AND file_code = '0000000115' LIMIT 1; -table type possible_keys key key_len ref rows Extra -t2 const PRIMARY,files PRIMARY 33 const,const 1 +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 const PRIMARY,files PRIMARY 33 const,const 1 DROP TABLE IF EXISTS t1, t2; diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index a5850cbd181..ed54eb75f4b 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -72,7 +72,7 @@ show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id Orig_log_pos Info slave-bin.000001 4 Start 2 4 Server ver: VERSION, Binlog ver: 3 slave-bin.000001 79 Query 1 79 use `test`; create table t1(n int not null auto_increment primary key) -slave-bin.000001 172 Intvar 1 200 INSERT_ID=1 +slave-bin.000001 172 Intvar 1 172 INSERT_ID=1 slave-bin.000001 200 Query 1 200 use `test`; insert into t1 values (NULL) slave-bin.000001 263 Query 1 263 use `test`; drop table t1 slave-bin.000001 311 Query 1 311 use `test`; create table t1 (word char(20) not null) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 2615ee542e3..94c93dbc3dc 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -1331,10 +1331,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index explain select fld3 from t2 ignore index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fld3 30 NULL 1199 Using where; Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where explain select fld3 from t2 use index (fld1) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t2 index NULL fld3 30 NULL 1199 Using where; Using index +1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where explain select fld3 from t2 use index (fld3) where fld3 = 'honeysuckle'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref fld3 fld3 30 const 1 Using where; Using index diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index e54e1fb0fef..c7862440bf1 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -60,9 +60,9 @@ a b explain select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1) union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL 2 where used +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where 2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 Using filesort -3 UNION t4 ALL NULL NULL NULL NULL 3 where used; Using filesort +3 UNION t4 ALL NULL NULL NULL NULL 3 Using where; Using filesort 4 SUBSELECT t2 ALL NULL NULL NULL NULL 2 select (select a from t3 where a1) as tt; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY system NULL NULL NULL NULL 1 -3 DERIVED t2 ALL NULL NULL NULL NULL 2 where used -2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 where used; Using filesort +3 DERIVED t2 ALL NULL NULL NULL NULL 2 Using where +2 SUBSELECT t3 ALL NULL NULL NULL NULL 3 Using where; Using filesort select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1); a 2 @@ -95,7 +95,7 @@ explain select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t4 ALL NULL NULL NULL NULL 3 2 DEPENDENT SUBSELECT t2 ALL NULL NULL NULL NULL 2 -3 DEPENDENT SUBSELECT t3 ALL NULL NULL NULL NULL 3 where used +3 DEPENDENT SUBSELECT t3 ALL NULL NULL NULL NULL 3 Using where select * from t3 where exists (select * from t2 where t2.b=t3.a); a 7 @@ -129,8 +129,8 @@ NULL 1 explain select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 -2 DEPENDENT SUBSELECT t1 system NULL NULL NULL NULL 1 where used -3 DEPENDENT UNION t5 ALL NULL NULL NULL NULL 2 where used +2 DEPENDENT SUBSELECT t1 system NULL NULL NULL NULL 1 Using where +3 DEPENDENT UNION t5 ALL NULL NULL NULL NULL 2 Using where select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; Subselect returns more than 1 record create table attend (patient_uq int, clinic_uq int, index i1 (clinic_uq)); @@ -200,11 +200,11 @@ INSERT INTO searchconthardwarefr3 (topic,date,pseudo) VALUES ('43506','2002-10-02','joce'),('40143','2002-08-03','joce'); EXPLAIN SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 where used; Using index +1 SIMPLE searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 Using where; Using index EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY No tables used -2 SUBSELECT searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 where used; Using index +2 SUBSELECT searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 Using where; Using index SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; date 2002-08-03 diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a9dc6c87f95..f94c520cc15 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -213,10 +213,10 @@ public: longlong val_int(); String *val_str(String *str); enum Item_result result_type () const { return cached_result_type; } - bool fix_fields(THD *thd,struct st_table_list *tlist) + bool fix_fields(THD *thd,struct st_table_list *tlist, Item **ref) { args[0]->top_level_item(); - return Item_func::fix_fields(thd,tlist); + return Item_func::fix_fields(thd, tlist, ref); } void fix_length_and_dec(); const char *func_name() const { return "if"; } diff --git a/sql/log_event.cc b/sql/log_event.cc index 3747af22922..d9ee832f7d3 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1159,11 +1159,12 @@ int Load_log_event::write_data_body(IO_CACHE* file) Load_log_event::Load_log_event(THD *thd_arg, sql_exchange *ex, const char *db_arg, const char *table_name_arg, List &fields_arg, - enum enum_duplicates handle_dup) - :Log_event(thd_arg),thread_id(thd_arg->thread_id), num_fields(0),fields(0), - field_lens(0),field_block_len(0), - table_name(table_name_arg ? table_name_arg : ""), - db(db_arg), fname(ex->file_name) + enum enum_duplicates handle_dup, + bool using_trans) + :Log_event(thd_arg, 0, using_trans), thread_id(thd_arg->thread_id), + num_fields(0), fields(0), field_lens(0),field_block_len(0), + table_name(table_name_arg ? table_name_arg : ""), + db(db_arg), fname(ex->file_name) { time_t end_time; time(&end_time); diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 4317ea05041..058e6b4ee95 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -541,7 +541,6 @@ bool add_field_to_list(char *field_name, enum enum_field_types type, char *change, TYPELIB *interval,CHARSET_INFO *cs); void store_position_for_column(const char *name); bool add_to_list(SQL_LIST &list,Item *group,bool asc=0); -void set_lock_for_tables(thr_lock_type lock_type); void add_join_on(TABLE_LIST *b,Item *expr); void add_join_natural(TABLE_LIST *a,TABLE_LIST *b); bool add_proc_to_list(Item *item); diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 8ccd7dbde68..d741c53d127 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1359,10 +1359,10 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo, case SSL_TYPE_NOT_SPECIFIED: break; case SSL_TYPE_NONE: - table->field[24]->store("",0); - table->field[25]->store("",0); - table->field[26]->store("",0); - table->field[27]->store("",0); + table->field[24]->store("", 0, system_charset_info); + table->field[25]->store("", 0, system_charset_info); + table->field[26]->store("", 0, system_charset_info); + table->field[27]->store("", 0, system_charset_info); break; } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index e3ee0fb9f72..4141211ad92 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -214,11 +214,11 @@ void THD::init(void) void THD::change_user(void) { cleanup(); - cleanup_done=0; + cleanup_done= 0; init(); - hash_init(&user_vars, USER_VARS_HASH_SIZE, 0, 0, + hash_init(&user_vars, system_charset_info, USER_VARS_HASH_SIZE, 0, 0, (hash_get_key) get_var_key, - (hash_free_key) free_user_var,0); + (hash_free_key) free_user_var, 0); } diff --git a/sql/sql_db.cc b/sql/sql_db.cc index cefad6a0805..c3e183de0ac 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -282,7 +282,7 @@ int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) mysql_update_log.write(thd,thd->query, thd->query_length); if (mysql_bin_log.is_open()) { - Query_log_event qinfo(thd, thd->query, thd->query_length); + Query_log_event qinfo(thd, thd->query, thd->query_length, 0); mysql_bin_log.write(&qinfo); } send_ok(thd, result); diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index cc60ebfb58d..c9e10b5b0b5 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -35,7 +35,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, SQL_SELECT *select=0; READ_RECORD info; bool using_limit=limit != HA_POS_ERROR; - bool using_transactions, log_delayed, safe_update, const_cond; + bool transactional_table, log_delayed, safe_update, const_cond; ha_rows deleted; DBUG_ENTER("mysql_delete"); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 975c3cfcf2b..9ed66aede6f 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1180,7 +1180,6 @@ bool st_select_lex_unit::create_total_list_n_last_return(THD *thd, st_lex *lex, if (!cursor) { /* Add not used table to the total table list */ - aux->lock_type= lex->lock_option; if (!(cursor= (TABLE_LIST *) thd->memdup((char*) aux, sizeof(*aux)))) { diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 9f8e3200246..dd41af4b250 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -239,7 +239,7 @@ public: thr_lock_type flags= TL_UNLOCK, List *use_index= 0, List *ignore_index= 0); - + virtual void set_lock_for_tables(thr_lock_type lock_type) {} void mark_as_dependent(st_select_lex *last); private: void fast_exclude(); @@ -364,6 +364,7 @@ public: thr_lock_type flags= TL_UNLOCK, List *use_index= 0, List *ignore_index= 0); + void set_lock_for_tables(thr_lock_type lock_type); inline void init_order() { order_list.elements= 0; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 4816a0539f3..263ac50120d 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3409,7 +3409,8 @@ TABLE_LIST *st_select_lex::add_table_to_list(Table_ident *table, DBUG_RETURN(0); // End of memory alias_str= alias ? alias->str : table->table.str; if (table->table.length > NAME_LEN || - (table->table.length && check_table_name(table->table.str,table->table.length)) || + (table->table.length && + check_table_name(table->table.str,table->table.length)) || table->db.str && check_db_name(table->db.str)) { net_printf(thd,ER_WRONG_TABLE_NAME,table->table.str); @@ -3489,15 +3490,14 @@ TABLE_LIST *st_select_lex::add_table_to_list(Table_ident *table, query */ -void set_lock_for_tables(thr_lock_type lock_type) +void st_select_lex::set_lock_for_tables(thr_lock_type lock_type) { - THD *thd=current_thd; bool for_update= lock_type >= TL_READ_NO_INSERT; DBUG_ENTER("set_lock_for_tables"); DBUG_PRINT("enter", ("lock_type: %d for_update: %d", lock_type, for_update)); - for (TABLE_LIST *tables= (TABLE_LIST*) thd->lex.select->table_list.first ; + for (TABLE_LIST *tables= (TABLE_LIST*) table_list.first ; tables ; tables=tables->next) { diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 73343ab1a50..e3e0bca9856 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -52,7 +52,8 @@ int mysql_update(THD *thd, ha_rows limit, enum enum_duplicates handle_duplicates) { - bool using_limit=limit != HA_POS_ERROR, safe_update= thd->options & OPTION_SAFE_UPDATES; + bool using_limit=limit != HA_POS_ERROR; + bool safe_update= thd->options & OPTION_SAFE_UPDATES; bool used_key_is_modified, transactional_table, log_delayed; int error=0; uint save_time_stamp, used_index, want_privilege; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index a994a2539f7..eaae24d0310 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -646,7 +646,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); table_to_table_list table_to_table opt_table_list opt_as handler_rkey_function handler_read_or_scan single_multi table_wild_list table_wild_one opt_wild - union opt_union union_list union_option + union union_list union_option precision opt_on_delete_item subselect_start opt_and subselect_end select_var_list select_var_list_init help opt_len END_OF_INPUT @@ -2817,7 +2817,7 @@ insert: INSERT { Lex->sql_command = SQLCOM_INSERT; } insert_lock_option opt_ignore insert2 { - set_lock_for_tables($3); + Select->set_lock_for_tables($3); } insert_field_spec ; @@ -2831,7 +2831,7 @@ replace: } replace_lock_option insert2 { - set_lock_for_tables($3); + Select->set_lock_for_tables($3); } insert_field_spec ; @@ -2891,7 +2891,8 @@ insert_values: mysql_init_select(lex); } select_options select_item_list select_from select_lock_type - opt_union {}; + union {} + ; values_list: values_list ',' no_braces @@ -2958,7 +2959,7 @@ expr_or_default: /* Update rows in a table */ update: - UPDATE_SYM + UPDATE_SYM { LEX *lex= Lex; lex->sql_command= SQLCOM_UPDATE; @@ -2967,7 +2968,7 @@ update: opt_low_priority opt_ignore join_table_list SET update_list where_clause opt_order_clause delete_limit_clause { - set_lock_for_tables($3); + Select->set_lock_for_tables($3); } ; @@ -3004,7 +3005,7 @@ delete: single_multi: FROM table_ident { - if (!add_table_to_list($2, NULL, 1, Lex->lock_option)) + if (!Select->add_table_to_list($2, NULL, 1, Lex->lock_option)) YYABORT; } where_clause opt_order_clause @@ -4239,9 +4240,10 @@ rollback: */ -opt_union: +union: /* empty */ {} - | union_list; + | union_list + ; union_list: UNION_SYM union_option @@ -4267,7 +4269,8 @@ union_list: union_opt: union_list {} - | optional_order_or_limit {}; + | optional_order_or_limit {} + ; optional_order_or_limit: /* empty From 9a2ac08bac0de5e0e42edb1e45ed28da4a7f1b1c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 21:42:44 +0100 Subject: [PATCH 201/246] configure.in: - fix MYSQL_NO_DASH_VERSION if version number ends on one digit only ("comment" test failed when MySQL version was changed from 4.0.5 to 4.0.5a) configure.in: - fix MYSQL_NO_DASH_VERSION if version number ends on one digit only ("comment" test failed when MySQL version was changed from 4.0.5 to 4.0.5a) --- configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.in b/configure.in index cc9e9f772b4..4dfee69f1c0 100644 --- a/configure.in +++ b/configure.in @@ -15,6 +15,7 @@ SHARED_LIB_VERSION=11:0:0 # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"` +MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[a-z]*-.*$||"` MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"` F_PART=`echo $MYSQL_BASE_VERSION | sed -e "s|\.||g"| sed -e "s|[a-zA-Z]\+||"|sed -e "s|^\(..\)$|\\10|"` L_PART=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|^[[0-9]]\.[[0-9]]*\.||" | sed -e "s|^\(.\)$|0\\1|" | sed -e "s|[[a-z]]||"` From b473d7d6405e9ab2d65baff3e7a79faae0229c09 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Nov 2002 22:14:57 +0100 Subject: [PATCH 202/246] configure.in: - actually follow the hints in the comment above and "Remember that regexps needs to quote [ and ] since this is run through m4"... configure.in: - actually follow the hints in the comment above and "Remember that regexps needs to quote [ and ] since this is run through m4"... --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 4dfee69f1c0..9b70e81d088 100644 --- a/configure.in +++ b/configure.in @@ -15,7 +15,7 @@ SHARED_LIB_VERSION=11:0:0 # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"` -MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[a-z]*-.*$||"` +MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"` F_PART=`echo $MYSQL_BASE_VERSION | sed -e "s|\.||g"| sed -e "s|[a-zA-Z]\+||"|sed -e "s|^\(..\)$|\\10|"` L_PART=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|^[[0-9]]\.[[0-9]]*\.||" | sed -e "s|^\(.\)$|0\\1|" | sed -e "s|[[a-z]]||"` From 03ac294cceb5619557fffacbf95901f4c5b1997f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 00:33:15 +0200 Subject: [PATCH 203/246] fixed invalidation of query cache excluded double call of 'invalidate()' mysql-test/r/innodb_cache.result: test of invalidation mysql-test/t/innodb_cache.test: test of invalidation sql/handler.cc: excluded double call of 'invalidate()' sql/sql_delete.cc: fixed invalidation of query cache sql/sql_insert.cc: fixed invalidation of query cache sql/sql_update.cc: fixed invalidation of query cache --- mysql-test/r/innodb_cache.result | 10 ++++++++++ mysql-test/t/innodb_cache.test | 9 ++++++++- sql/handler.cc | 2 +- sql/sql_delete.cc | 10 ++++------ sql/sql_insert.cc | 9 +++------ sql/sql_update.cc | 10 ++++------ 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/mysql-test/r/innodb_cache.result b/mysql-test/r/innodb_cache.result index eaa030046da..47abcb45fe5 100644 --- a/mysql-test/r/innodb_cache.result +++ b/mysql-test/r/innodb_cache.result @@ -98,3 +98,13 @@ commit; show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 +drop table if exists t1; +CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id)) TYPE=InnoDB; +select count(*) from t1; +count(*) +0 +insert into t1 (id) values (0); +select count(*) from t1; +count(*) +1 +drop table t1; diff --git a/mysql-test/t/innodb_cache.test b/mysql-test/t/innodb_cache.test index 21d30420eaf..9066a5f19ba 100644 --- a/mysql-test/t/innodb_cache.test +++ b/mysql-test/t/innodb_cache.test @@ -47,4 +47,11 @@ select * from t3; show status like "Qcache_queries_in_cache"; show status like "Qcache_hits"; commit; -show status like "Qcache_queries_in_cache"; \ No newline at end of file +show status like "Qcache_queries_in_cache"; + +drop table if exists t1; +CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id)) TYPE=InnoDB; +select count(*) from t1; +insert into t1 (id) values (0); +select count(*) from t1; +drop table t1; diff --git a/sql/handler.cc b/sql/handler.cc index f07e90d2eb9..c4e742ef519 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -314,7 +314,7 @@ int ha_commit_trans(THD *thd, THD_TRANS* trans) } #endif #ifdef HAVE_QUERY_CACHE - if (transaction_commited) + if (transaction_commited && thd->transaction.changed_tables) query_cache.invalidate(thd->transaction.changed_tables); #endif /*HAVE_QUERY_CACHE*/ if (error && trans == &thd->transaction.all && mysql_bin_log.is_open()) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 5f2d7e36a04..1361ff39388 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -179,14 +179,12 @@ cleanup: if (ha_autocommit_or_rollback(thd,error >= 0)) error=1; } + /* - Only invalidate the query cache if something changed or if we - didn't commit the transacion (query cache is automaticly - invalidated on commit) + Store table for future invalidation or invalidate it in + the query cache if something changed */ - if (deleted && - (!transactional_table || - thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) + if (deleted) { query_cache_invalidate3(thd, table_list, 1); } diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2508314c469..6ce2b50fc36 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -319,13 +319,10 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, error=ha_autocommit_or_rollback(thd,error); /* - Only invalidate the query cache if something changed or if we - didn't commit the transacion (query cache is automaticly - invalidated on commit) + Store table for future invalidation or invalidate it in + the query cache if something changed */ - if ((info.copied || info.deleted) && - (!transactional_table || - thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) + if (info.copied || info.deleted) { query_cache_invalidate3(thd, table_list, 1); } diff --git a/sql/sql_update.cc b/sql/sql_update.cc index b5263322301..97e6ea43bfd 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -318,14 +318,12 @@ int mysql_update(THD *thd, if (ha_autocommit_or_rollback(thd, error >= 0)) error=1; } + /* - Only invalidate the query cache if something changed or if we - didn't commit the transacion (query cache is automaticly - invalidated on commit) + Store table for future invalidation or invalidate it in + the query cache if something changed */ - if (updated && - (!transactional_table || - thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) + if (updated) { query_cache_invalidate3(thd, table_list, 1); } From cb5a2b2fd5541bf019dd0fe1012e687ce1e68eaa Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 13:35:43 +0200 Subject: [PATCH 204/246] Fixed bug with indexed NULL column <=> NULL Fix for Mac OS X shutdown mysql-test/mysql-test-run.sh: Log client error messages mysql-test/r/null_key.result: Test for bug in <=> NULL mysql-test/t/null_key.test: Test for bug in <=> NULL sql/mysqld.cc: Fix for Mac OS X shutdown sql/opt_range.cc: Fixed bug with indexed NULL column <=> NULL --- mysql-test/mysql-test-run.sh | 3 ++- mysql-test/r/null_key.result | 17 +++++++++++++++++ mysql-test/t/null_key.test | 21 +++++++++++++++++++++ sql/mysqld.cc | 4 ++++ sql/opt_range.cc | 18 ++++++++++++------ 5 files changed, 56 insertions(+), 7 deletions(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 514ef9e704a..fcddf52c66b 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -249,6 +249,7 @@ SLAVE_MYPID="$MYRUN_DIR/mysqld-slave.pid" SLAVE_MYLOG="$MYSQL_TEST_DIR/var/log/mysqld-slave.log" SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/mysqld-slave.err" +CLIENT_MYLOG="$MYSQL_TEST_DIR/var/log/client.log" SMALL_SERVER="-O key_buffer_size=1M -O sort_buffer=256K -O max_heap_table_size=1M" export MASTER_MYPORT @@ -344,7 +345,7 @@ SLAVE_MYSQLD=$MYSQLD #this can be changed later if we are doing gcov #-- wait_for_server_start () { - $MYSQLADMIN --no-defaults -u $DBUSER --silent -O connect_timeout=10 -w3 --host=$hostname --port=$1 ping >/dev/null 2>&1 + $MYSQLADMIN --no-defaults -u $DBUSER --silent -O connect_timeout=10 -w3 --host=$hostname --port=$1 ping >> $CLIENT_MYLOG 2>&1 exit_code=$? if [ $exit_code != 0 ]; then echo "Error: Could not start $2, exit code $exit_code"; diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index a0f88b804aa..46bcbebe170 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -126,3 +126,20 @@ order_id product_id product_type 3d7ce39b5d4b3e3d22aaafe9b633de51 5880836 3 id id id id +id id2 +NULL 0 +1 1 +id id2 +NULL 0 +id id2 +NULL 0 +1 1 +id id2 +NULL 0 +1 1 +id id2 +1 1 +id id2 +1 1 +id id2 +1 1 diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test index 3ab8b993f43..b1cbd5cdfb0 100644 --- a/mysql-test/t/null_key.test +++ b/mysql-test/t/null_key.test @@ -135,3 +135,24 @@ select * from t1, t2 where t1.id = t2.id; alter table t1 add key id (id); select * from t1, t2 where t1.id = t2.id; drop table t1,t2; + +# +# Check bug when doing <=> NULL on an indexed null field +# + +create table t1 ( + id integer, + id2 integer not null, + index (id), + index (id2) +); +insert into t1 values(null,null),(1,1); +select * from t1; +select * from t1 where id <=> null; +select * from t1 where id <=> null or id > 0; +select * from t1 where id is null or id > 0; +select * from t1 where id2 <=> null or id2 > 0; +select * from t1 where id2 is null or id2 > 0; +delete from t1 where id <=> NULL; +select * from t1; +drop table t1; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 71b832f24f4..7a33a3cfc49 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -739,7 +739,11 @@ static sig_handler print_signal_warning(int sig) void unireg_end(int signal_number __attribute__((unused))) { clean_up(); +#ifdef SIGNALS_DONT_BREAK_READ + exit(0); +#else pthread_exit(0); // Exit is in main thread +#endif } diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 42f20c0f767..0645fe15df3 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -931,8 +931,11 @@ get_mm_leaf(Field *field,KEY_PART *key_part, if (!(res= value->val_str(&tmp))) DBUG_RETURN(&null_element); - // Check if this was a function. This should have be optimized away - // in the sql_select.cc + /* + TODO: + Check if this was a function. This should have be optimized away + in the sql_select.cc + */ if (res != &tmp) { tmp.copy(*res); // Get own copy @@ -1011,8 +1014,10 @@ get_mm_leaf(Field *field,KEY_PART *key_part, type != Item_func::EQUAL_FUNC) DBUG_RETURN(0); // Can't optimize this - /* We can't always use indexes when comparing a string index to a number */ - /* cmp_type() is checked to allow compare of dates to numbers */ + /* + We can't always use indexes when comparing a string index to a number + cmp_type() is checked to allow compare of dates to numbers + */ if (field->result_type() == STRING_RESULT && value->result_type() != STRING_RESULT && field->cmp_type() != value->result_type()) @@ -1020,6 +1025,7 @@ get_mm_leaf(Field *field,KEY_PART *key_part, if (value->save_in_field(field)) { + /* This happens when we try to insert a NULL field in a not null column */ if (type == Item_func::EQUAL_FUNC) { /* convert column_name <=> NULL -> column_name IS NULL */ @@ -1029,14 +1035,14 @@ get_mm_leaf(Field *field,KEY_PART *key_part, *str = 1; DBUG_RETURN(new SEL_ARG(field,str,str)); } - DBUG_RETURN(&null_element); // NULL is never true + DBUG_RETURN(&null_element); // cmp with NULL is never true } // Get local copy of key char *str= (char*) sql_alloc(key_part->part_length+maybe_null); if (!str) DBUG_RETURN(0); if (maybe_null) - *str=0; // Not NULL + *str= (char) field->is_real_null(); // Set to 1 if null field->get_key_image(str+maybe_null,key_part->part_length); if (!(tree=new SEL_ARG(field,str,str))) DBUG_RETURN(0); From 89083f2d6d078eb25f1fe013d8cd5bc46b9a631c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 13:47:01 +0200 Subject: [PATCH 205/246] reverting a change --- sql/opt_range.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 14999097c62..f33a2d312b4 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -1024,7 +1024,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, field->cmp_type() != value->result_type()) DBUG_RETURN(0); - if (value->save_in_field(field) || value->is_null()) + if (value->save_in_field(field)) { // TODO; Check if we can we remove the following block. if (type == Item_func::EQUAL_FUNC) From 001446d97134edad95b3235082256c0202f51cd9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 13:52:40 +0200 Subject: [PATCH 206/246] Moved test to correct file --- mysql-test/r/func_test.result | 3 --- mysql-test/r/func_time.result | 5 +++++ mysql-test/t/func_test.test | 10 ---------- mysql-test/t/func_time.test | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 2f40740d4aa..586e345ea10 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -26,9 +26,6 @@ 1 1 1 -1.49 or -1.49 0.6 or 0.6 1 1 -start ctime1 ctime2 -start ctime1 ctime2 -2002-11-04 00:00:00 20021029165106 20021105164731 5 between 0 and 10 between 0 and 1 (5 between 0 and 10) between 0 and 1 0 1 1 and 2 between 2 and 10 2 between 2 and 10 and 1 diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 71fc7e4b90b..a77d9b2cdff 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -220,3 +220,8 @@ to_days("0000-00-00") to_days(d) to_days(dt) to_days(t) to_days(c) NULL NULL NULL NULL NULL extract(MONTH FROM "0000-00-00") extract(MONTH FROM d) extract(MONTH FROM dt) extract(MONTH FROM t) extract(MONTH FROM c) 0 0 0 0 0 +start ctime1 ctime2 +start ctime1 ctime2 +2002-11-04 00:00:00 20021029165106 20021105164731 +start ctime1 ctime2 +2002-11-04 00:00:00 2002-10-29 16:51:06 2002-11-05 16:47:31 diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test index ccbb531e2e6..ec44009b1a6 100644 --- a/mysql-test/t/func_test.test +++ b/mysql-test/t/func_test.test @@ -15,16 +15,6 @@ select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between select 'b' between 'a' and 'c', 'B' between 'a' and 'c'; select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,1.0); select -1.49 or -1.49,0.6 or 0.6; -drop table if exists t1,t2; -CREATE TABLE t1 ( start datetime default NULL) TYPE=MyISAM; -INSERT INTO t1 VALUES ('2002-10-21 00:00:00'); -INSERT INTO t1 VALUES ('2002-10-28 00:00:00'); -INSERT INTO t1 VALUES ('2002-11-04 00:00:00'); -CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL) TYPE=MyISAM; -INSERT INTO t2 VALUES (20021029165106,20021105164731); -select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; -select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; -drop table if exists t1,t2; # # Wrong usage of functions diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index ffb0f8bbf1e..e267339d64c 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -150,3 +150,21 @@ select yearweek("0000-00-00"),yearweek(d),yearweek(dt),yearweek(t),yearweek(c) f select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(t),to_days(c) from t1; select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM dt),extract(MONTH FROM t),extract(MONTH FROM c) from t1; drop table t1; + + +# +# Test problem with TIMESTAMP and BETWEEN +# + +CREATE TABLE t1 ( start datetime default NULL); +INSERT INTO t1 VALUES ('2002-10-21 00:00:00'),('2002-10-28 00:00:00'),('2002-11-04 00:00:00'); +CREATE TABLE t2 ( ctime1 timestamp(14) NOT NULL, ctime2 timestamp(14) NOT NULL); +INSERT INTO t2 VALUES (20021029165106,20021105164731); +CREATE TABLE t3 (ctime1 char(19) NOT NULL, ctime2 char(19) NOT NULL); +INSERT INTO t3 VALUES ("2002-10-29 16:51:06","2002-11-05 16:47:31"); + +# The following statement should be fixed to return a row in 4.1 +select * from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; +select * from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; +select * from t1, t3 where t1.start between t3.ctime1 and t3.ctime2; +drop table t1,t2,t3; From fa76afe6edbc6572f179d1dcf859f013e85ef7dd Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 13:59:06 +0200 Subject: [PATCH 207/246] ut0mem.c: Flush stderr if we run out of memory, so that the error message more probably finds its way to the error log innobase/ut/ut0mem.c: Flush stderr if we run out of memory, so that the error message more probably finds its way to the error log --- innobase/ut/ut0mem.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/innobase/ut/ut0mem.c b/innobase/ut/ut0mem.c index 2a7643551ad..03f15031fdf 100644 --- a/innobase/ut/ut0mem.c +++ b/innobase/ut/ut0mem.c @@ -90,6 +90,12 @@ ut_malloc_low( "InnoDB: on Linux we get a stack trace.\n", n, ut_total_allocated_memory, errno); + /* Flush stderr to make more probable that the error + message gets in the error file before we generate a seg + fault */ + + fflush(stderr); + os_fast_mutex_unlock(&ut_list_mutex); /* Make an intentional seg fault so that we get a stack From 0e9a75a4f7151ea7930a5eaddfc91fd210873f16 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 14:50:53 +0100 Subject: [PATCH 208/246] Moved safe_to_cache_query from thd to lex. This is required for prepared statements and stored procedures. BitKeeper/etc/ignore: Added bkpull.log bkpull.log.2 bkpull.log.3 build.log sql/safe_to_cache_query.txt to the ignore list sql/item_create.cc: Moved safe_to_cache_query from thd to lex. sql/item_func.cc: Moved safe_to_cache_query from thd to lex. sql/sql_cache.cc: Moved safe_to_cache_query from thd to lex. Note: Query_cache::is_cacheable() has both a thd and lex argument. We assumed that it's the lex->safe_to_cache_query we should test. sql/sql_class.cc: Moved safe_to_cache_query from thd to lex. sql/sql_class.h: Moved safe_to_cache_query from thd to lex. sql/sql_lex.cc: Moved safe_to_cache_query from thd to lex. We set it to 1 initially. It's then set to 0 in cases where it's know not to be safe. (Before this change, it was set to 0 in thd, and then set to 1 before parsing.) sql/sql_lex.h: Moved safe_to_cache_query from thd to lex. sql/sql_parse.cc: Moved safe_to_cache_query from thd to lex. No point in setting it here now, it's set in lex_start() later. sql/sql_prepare.cc: Moved safe_to_cache_query from thd to lex. Must set it after lex_start() has been called. sql/sql_yacc.yy: Moved safe_to_cache_query from thd to lex. --- .bzrignore | 5 +++++ sql/item_create.cc | 14 +++++++------- sql/item_func.cc | 4 ++-- sql/sql_cache.cc | 10 +++++----- sql/sql_class.cc | 2 +- sql/sql_class.h | 1 - sql/sql_lex.cc | 3 ++- sql/sql_lex.h | 1 + sql/sql_parse.cc | 1 - sql/sql_prepare.cc | 2 +- sql/sql_yacc.yy | 40 ++++++++++++++++++++-------------------- 11 files changed, 44 insertions(+), 39 deletions(-) diff --git a/.bzrignore b/.bzrignore index 278c3de2ee5..978926c8c37 100644 --- a/.bzrignore +++ b/.bzrignore @@ -557,3 +557,8 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl +bkpull.log +bkpull.log.2 +bkpull.log.3 +build.log +sql/safe_to_cache_query.txt diff --git a/sql/item_create.cc b/sql/item_create.cc index e4c9a160686..ad9058c1691 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -76,7 +76,7 @@ Item *create_func_ceiling(Item* a) Item *create_func_connection_id(void) { THD *thd=current_thd; - thd->safe_to_cache_query=0; + thd->lex.safe_to_cache_query=0; return new Item_int("CONNECTION_ID()",(longlong) thd->thread_id,10); } @@ -149,7 +149,7 @@ Item *create_func_floor(Item* a) Item *create_func_found_rows(void) { THD *thd=current_thd; - thd->safe_to_cache_query=0; + thd->lex.safe_to_cache_query=0; return new Item_int("FOUND_ROWS()",(longlong) thd->found_rows(),21); } @@ -160,7 +160,7 @@ Item *create_func_from_days(Item* a) Item *create_func_get_lock(Item* a, Item *b) { - current_thd->safe_to_cache_query=0; + current_thd->lex.safe_to_cache_query=0; return new Item_func_get_lock(a, b); } @@ -308,7 +308,7 @@ Item *create_func_radians(Item *a) Item *create_func_release_lock(Item* a) { - current_thd->safe_to_cache_query=0; + current_thd->lex.safe_to_cache_query=0; return new Item_func_release_lock(a); } @@ -416,13 +416,13 @@ Item *create_func_year(Item* a) Item *create_load_file(Item* a) { - current_thd->safe_to_cache_query=0; + current_thd->lex.safe_to_cache_query=0; return new Item_load_file(a); } Item *create_wait_for_master_pos(Item* a, Item* b) { - current_thd->safe_to_cache_query=0; + current_thd->lex.safe_to_cache_query=0; return new Item_master_pos_wait(a, b); } @@ -443,7 +443,7 @@ Item *create_func_cast(Item *a, Item_cast cast_type) Item *create_func_is_free_lock(Item* a) { - current_thd->safe_to_cache_query=0; + current_thd->lex.safe_to_cache_query=0; return new Item_func_is_free_lock(a); } diff --git a/sql/item_func.cc b/sql/item_func.cc index 75260065be6..e28fda0340e 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -2470,7 +2470,7 @@ Item *get_system_var(enum_var_type var_type, LEX_STRING name) } if (!(item=var->item(thd, var_type))) return 0; // Impossible - thd->safe_to_cache_query=0; + thd->lex.safe_to_cache_query=0; buff[0]='@'; buff[1]='@'; pos=buff+2; @@ -2496,7 +2496,7 @@ Item *get_system_var(enum_var_type var_type, const char *var_name, uint length, DBUG_ASSERT(var != 0); if (!(item=var->item(thd, var_type))) return 0; // Impossible - thd->safe_to_cache_query=0; + thd->lex.safe_to_cache_query=0; item->set_name(item_name); // Will use original name return item; } diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index ef584f4364e..aa0f5824b4e 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -289,7 +289,7 @@ TODO list: if (thd->temp_tables || global_merge_table_count) - - Another option would be to set thd->safe_to_cache_query to 0 + - Another option would be to set thd->lex.safe_to_cache_query to 0 in 'get_lock_data' if any of the tables was a tmp table or a MRG_ISAM table. (This could be done with almost no speed penalty) @@ -900,7 +900,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) /* Check that we haven't forgot to reset the query cache variables */ DBUG_ASSERT(thd->net.query_cache_query == 0); - if (!thd->safe_to_cache_query) + if (!thd->lex.safe_to_cache_query) { DBUG_PRINT("qcache", ("SELECT is non-cacheable")); goto err; @@ -994,7 +994,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) table_list.db, table_list.alias)); refused++; // This is actually a hit STRUCT_UNLOCK(&structure_guard_mutex); - thd->safe_to_cache_query=0; // Don't try to cache this + thd->lex.safe_to_cache_query=0; // Don't try to cache this BLOCK_UNLOCK_RD(query_block); DBUG_RETURN(-1); // Privilege error } @@ -1003,7 +1003,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) DBUG_PRINT("qcache", ("Need to check column privileges for %s.%s", table_list.db, table_list.alias)); BLOCK_UNLOCK_RD(query_block); - thd->safe_to_cache_query=0; // Don't try to cache this + thd->lex.safe_to_cache_query=0; // Don't try to cache this goto err_unlock; // Parse query } } @@ -2457,7 +2457,7 @@ TABLE_COUNTER_TYPE Query_cache::is_cacheable(THD *thd, uint32 query_len, (thd->variables.query_cache_type == 1 || (thd->variables.query_cache_type == 2 && (lex->select_lex.options & OPTION_TO_QUERY_CACHE))) && - thd->safe_to_cache_query) + lex->safe_to_cache_query) { my_bool has_transactions = 0; DBUG_PRINT("qcache", ("options %lx %lx, type %u", diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 4141211ad92..9bca7245cba 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -87,7 +87,7 @@ THD::THD():user_time(0), fatal_error(0), host=user=priv_user=db=query=ip=0; host_or_ip="unknown ip"; locked=killed=count_cuted_fields=some_tables_deleted=no_errors=password= - query_start_used=safe_to_cache_query=prepare_command=0; + query_start_used=prepare_command=0; db_length=query_length=col_access=0; query_error=0; next_insert_id=last_insert_id=0; diff --git a/sql/sql_class.h b/sql/sql_class.h index acdf2471ba8..e64cfbc198a 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -507,7 +507,6 @@ public: bool query_start_used,last_insert_id_used,insert_id_used,rand_used; bool system_thread,in_lock_tables,global_read_lock; bool query_error, bootstrap, cleanup_done; - bool safe_to_cache_query; bool volatile killed; bool prepare_command; Item_param *params; // Pointer to array of params diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 9ed66aede6f..e3ffe2a8120 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -154,6 +154,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length) lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE); lex->slave_thd_opt=0; lex->sql_command=SQLCOM_END; + lex->safe_to_cache_query= 1; bzero(&lex->mi,sizeof(lex->mi)); return lex; } @@ -182,7 +183,7 @@ static int find_keyword(LEX *lex, uint len, bool function) udf_func *udf; if (function && using_udf_functions && (udf=find_udf((char*) tok, len))) { - lex->thd->safe_to_cache_query=0; + lex->safe_to_cache_query=0; lex->yylval->udf=udf; switch (udf->returns) { case STRING_RESULT: diff --git a/sql/sql_lex.h b/sql/sql_lex.h index dd41af4b250..fa4eca80ee2 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -440,6 +440,7 @@ typedef struct st_lex bool drop_primary, drop_if_exists, drop_temporary, local_file; bool in_comment, ignore_space, verbose, simple_alter; bool derived_tables, describe, olap; + bool safe_to_cache_query; uint slave_thd_opt; CHARSET_INFO *charset; char *help_arg; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 263ac50120d..4e5f0019ad6 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2875,7 +2875,6 @@ mysql_init_query(THD *thd) thd->last_insert_id_used= thd->query_start_used= thd->insert_id_used=0; thd->sent_row_count= thd->examined_row_count= 0; thd->fatal_error= thd->rand_used= 0; - thd->safe_to_cache_query= 1; thd->possible_loops= 0; DBUG_VOID_RETURN; } diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 08377a10501..527878596f4 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -606,9 +606,9 @@ static bool parse_prepare_query(PREP_STMT *stmt, mysql_log.write(thd,COM_PREPARE,"%s",packet); mysql_init_query(thd); thd->prepare_command=true; - thd->safe_to_cache_query= 0; LEX *lex=lex_start(thd, (uchar*) packet, length); + lex->safe_to_cache_query= 0; if (!yyparse() && !thd->fatal_error) error= send_prepare_results(stmt); lex_end(lex); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index eaae24d0310..5dcb4f09951 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1676,7 +1676,7 @@ select_option: YYABORT; Select->options|= OPTION_FOUND_ROWS; } - | SQL_NO_CACHE_SYM { current_thd->safe_to_cache_query=0; } + | SQL_NO_CACHE_SYM { Lex->safe_to_cache_query=0; } | SQL_CACHE_SYM { Select->options|= OPTION_TO_QUERY_CACHE; } | ALL {} ; @@ -1689,7 +1689,7 @@ select_lock_type: if (check_simple_select()) YYABORT; lex->lock_option= TL_WRITE; - lex->thd->safe_to_cache_query=0; + lex->safe_to_cache_query=0; } | LOCK_SYM IN_SYM SHARE_SYM MODE_SYM { @@ -1697,7 +1697,7 @@ select_lock_type: if (check_simple_select()) YYABORT; lex->lock_option= TL_READ_WITH_SHARED_LOCKS; - lex->thd->safe_to_cache_query=0; + lex->safe_to_cache_query=0; } ; @@ -1885,12 +1885,12 @@ simple_expr: | '@' ident_or_text SET_VAR expr { $$= new Item_func_set_user_var($2,$4); - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } | '@' ident_or_text { $$= new Item_func_get_user_var($2); - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } | '@' '@' opt_var_ident_type ident_or_text { @@ -1944,13 +1944,13 @@ simple_expr: | CONCAT_WS '(' expr ',' expr_list ')' { $$= new Item_func_concat_ws($3, *$5); } | CURDATE optional_braces - { $$= new Item_func_curdate(); current_thd->safe_to_cache_query=0; } + { $$= new Item_func_curdate(); Lex->safe_to_cache_query=0; } | CURTIME optional_braces - { $$= new Item_func_curtime(); current_thd->safe_to_cache_query=0; } + { $$= new Item_func_curtime(); Lex->safe_to_cache_query=0; } | CURTIME '(' expr ')' { $$= new Item_func_curtime($3); - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } | DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' { $$= new Item_date_add_interval($3,$6,$7,0); } @@ -1959,7 +1959,7 @@ simple_expr: | DATABASE '(' ')' { $$= new Item_func_database(); - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } | ELT_FUNC '(' expr ',' expr_list ')' { $$= new Item_func_elt($3, *$5); } @@ -1968,7 +1968,7 @@ simple_expr: | ENCRYPT '(' expr ')' { $$= new Item_func_encrypt($3); - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } | ENCRYPT '(' expr ',' expr ')' { $$= new Item_func_encrypt($3,$5); } | DECODE_SYM '(' expr ',' TEXT_STRING ')' @@ -2028,7 +2028,7 @@ simple_expr: | LAST_INSERT_ID '(' expr ')' { $$= new Item_func_set_last_insert_id($3); - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } | LEFT '(' expr ',' expr ')' { $$= new Item_func_left($3,$5); } @@ -2083,9 +2083,9 @@ simple_expr: { $$= new Item_func_spatial_collection(* $3, Geometry::wkbMultiPolygon, Geometry::wkbPolygon ); } | NOW_SYM optional_braces - { $$= new Item_func_now(); current_thd->safe_to_cache_query=0;} + { $$= new Item_func_now(); Lex->safe_to_cache_query=0;} | NOW_SYM '(' expr ')' - { $$= new Item_func_now($3); current_thd->safe_to_cache_query=0;} + { $$= new Item_func_now($3); Lex->safe_to_cache_query=0;} | PASSWORD '(' expr ')' { $$= new Item_func_password($3); @@ -2104,9 +2104,9 @@ simple_expr: | POSITION_SYM '(' no_in_expr IN_SYM expr ')' { $$ = new Item_func_locate($5,$3); } | RAND '(' expr ')' - { $$= new Item_func_rand($3); current_thd->safe_to_cache_query=0;} + { $$= new Item_func_rand($3); Lex->safe_to_cache_query=0;} | RAND '(' ')' - { $$= new Item_func_rand(); current_thd->safe_to_cache_query=0;} + { $$= new Item_func_rand(); Lex->safe_to_cache_query=0;} | REPLACE '(' expr ',' expr ',' expr ')' { $$= new Item_func_replace($3,$5,$7); } | RIGHT '(' expr ',' expr ')' @@ -2189,12 +2189,12 @@ simple_expr: | UNIX_TIMESTAMP '(' ')' { $$= new Item_func_unix_timestamp(); - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } | UNIX_TIMESTAMP '(' expr ')' { $$= new Item_func_unix_timestamp($3); } | USER '(' ')' - { $$= new Item_func_user(); current_thd->safe_to_cache_query=0; } + { $$= new Item_func_user(); Lex->safe_to_cache_query=0; } | WEEK_SYM '(' expr ')' { $$= new Item_func_week($3,new Item_int((char*) "0",0,1)); } | WEEK_SYM '(' expr ',' expr ')' @@ -2208,7 +2208,7 @@ simple_expr: | BENCHMARK_SYM '(' ULONG_NUM ',' expr ')' { $$=new Item_func_benchmark($3,$5); - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } | EXTRACT_SYM '(' interval FROM expr ')' { $$=new Item_extract( $3, $5); }; @@ -2667,7 +2667,7 @@ procedure_clause: lex->proc_list.next= (byte**) &lex->proc_list.first; if (add_proc_to_list(new Item_field(NULL,NULL,$2.str))) YYABORT; - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } '(' procedure_list ')'; @@ -2739,7 +2739,7 @@ opt_into: } | INTO select_var_list_init { - current_thd->safe_to_cache_query=0; + Lex->safe_to_cache_query=0; } ; From d34945703d7f0d8e59ea4fd4acbb72016b7a4b69 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 15:22:22 +0100 Subject: [PATCH 209/246] autogenerated files removed scripts we don't need commented out s_dir script for creating directories bdb build process requires BitKeeper/deleted/.del-BerkeleyDB.wpj~a2a0abe09f33bb61: Delete: bdb/build_vxworks/BerkeleyDB.wpj BitKeeper/deleted/.del-Makefile.custom~2b8f324317bef7ad: Delete: bdb/build_vxworks/BerkeleyDB/Makefile.custom BitKeeper/deleted/.del-Makefile.custom~683fd022553cf846: Delete: bdb/build_vxworks/db_archive/db_archive/Makefile.custom BitKeeper/deleted/.del-component.cdf~42d5e09d10a4debd: Delete: bdb/build_vxworks/BerkeleyDB/component.cdf BitKeeper/deleted/.del-component.cdf~7713d5d32b01239: Delete: bdb/build_vxworks/db_archive/db_archive/component.cdf BitKeeper/deleted/.del-component.wpj~13c8b25bc88a79a5: Delete: bdb/build_vxworks/BerkeleyDB/component.wpj BitKeeper/deleted/.del-component.wpj~8f2eae1d43fc8a33: Delete: bdb/build_vxworks/db_archive/db_archive/component.wpj BitKeeper/deleted/.del-db_archive.c~aa2f07eacf30fed: Delete: bdb/build_vxworks/db_archive/db_archive.c BitKeeper/deleted/.del-db_archive.wpj~9b2944550502e15: Delete: bdb/build_vxworks/db_archive/db_archive.wpj BitKeeper/deleted/.del-db_checkpoint.c~9a0937113e3c2aaa: Delete: bdb/build_vxworks/db_checkpoint/db_checkpoint.c BitKeeper/deleted/.del-Makefile.custom~1cc8c2668b709944: Delete: bdb/build_vxworks/db_load/db_load/Makefile.custom BitKeeper/deleted/.del-Makefile.custom~37a5b23498b0cb1b: Delete: bdb/build_vxworks/db_deadlock/db_deadlock/Makefile.custom BitKeeper/deleted/.del-Makefile.custom~6698b0966cb9896e: Delete: bdb/build_vxworks/db_dump/db_dump/Makefile.custom BitKeeper/deleted/.del-Makefile.custom~e2919df8b5a5d18: Delete: bdb/build_vxworks/db_checkpoint/db_checkpoint/Makefile.custom BitKeeper/deleted/.del-component.cdf~88d94c29a18784f3: Delete: bdb/build_vxworks/db_deadlock/db_deadlock/component.cdf BitKeeper/deleted/.del-component.cdf~acf828ccb25f2e7a: Delete: bdb/build_vxworks/db_checkpoint/db_checkpoint/component.cdf BitKeeper/deleted/.del-component.cdf~cbedb82f353d0922: Delete: bdb/build_vxworks/db_load/db_load/component.cdf BitKeeper/deleted/.del-component.cdf~d2507fbdc31adf16: Delete: bdb/build_vxworks/db_dump/db_dump/component.cdf BitKeeper/deleted/.del-component.wpj~5f1cc866f2597c5b: Delete: bdb/build_vxworks/db_dump/db_dump/component.wpj BitKeeper/deleted/.del-component.wpj~7bbc0dcd2221ac89: Delete: bdb/build_vxworks/db_checkpoint/db_checkpoint/component.wpj BitKeeper/deleted/.del-component.wpj~dda5a2a73736e0f9: Delete: bdb/build_vxworks/db_deadlock/db_deadlock/component.wpj BitKeeper/deleted/.del-db_checkpoint.wpj~c11939cdaad080: Delete: bdb/build_vxworks/db_checkpoint/db_checkpoint.wpj BitKeeper/deleted/.del-db_config.h~f0ffd61a4c4dcc10: Delete: bdb/build_vxworks/db_config.h BitKeeper/deleted/.del-db_deadlock.c~b110945da1356bd3: Delete: bdb/build_vxworks/db_deadlock/db_deadlock.c BitKeeper/deleted/.del-db_deadlock.wpj~b8617495863e87b3: Delete: bdb/build_vxworks/db_deadlock/db_deadlock.wpj BitKeeper/deleted/.del-db_dump.c~aa0bdb027bcc79: Delete: bdb/build_vxworks/db_dump/db_dump.c BitKeeper/deleted/.del-db_dump.wpj~7e28dd5799ef9d7: Delete: bdb/build_vxworks/db_dump/db_dump.wpj BitKeeper/deleted/.del-db_load.c~1dd647c9c5863378: Delete: bdb/build_vxworks/db_load/db_load.c BitKeeper/deleted/.del-db_load.wpj~67c6c653a9bea870: Delete: bdb/build_vxworks/db_load/db_load.wpj BitKeeper/deleted/.del-Makefile.custom~1a5a0a49a86a3f28: Delete: bdb/build_vxworks/db_upgrade/db_upgrade/Makefile.custom BitKeeper/deleted/.del-Makefile.custom~afc05029de4bf10: Delete: bdb/build_vxworks/db_printlog/db_printlog/Makefile.custom BitKeeper/deleted/.del-Makefile.custom~b56acb71917c4d78: Delete: bdb/build_vxworks/db_recover/db_recover/Makefile.custom BitKeeper/deleted/.del-Makefile.custom~ead532061f2a01a7: Delete: bdb/build_vxworks/db_stat/db_stat/Makefile.custom BitKeeper/deleted/.del-component.cdf~169be941a9ccfe77: Delete: bdb/build_vxworks/db_printlog/db_printlog/component.cdf BitKeeper/deleted/.del-component.cdf~41e8ac6e554a2c0a: Delete: bdb/build_vxworks/db_upgrade/db_upgrade/component.cdf BitKeeper/deleted/.del-component.cdf~8dfd6cea1eb16ffb: Delete: bdb/build_vxworks/db_recover/db_recover/component.cdf BitKeeper/deleted/.del-component.cdf~c6f1a7b0c99c5a: Delete: bdb/build_vxworks/db_stat/db_stat/component.cdf BitKeeper/deleted/.del-component.wpj~2b0236f9e7d93c0e: Delete: bdb/build_vxworks/db_load/db_load/component.wpj BitKeeper/deleted/.del-component.wpj~65b35a15fb66fbf4: Delete: bdb/build_vxworks/db_recover/db_recover/component.wpj BitKeeper/deleted/.del-component.wpj~ab56c607b6f675f0: Delete: bdb/build_vxworks/db_printlog/db_printlog/component.wpj BitKeeper/deleted/.del-component.wpj~b569f98cbb9764e4: Delete: bdb/build_vxworks/db_stat/db_stat/component.wpj BitKeeper/deleted/.del-db_printlog.c~577c296df84c5d5e: Delete: bdb/build_vxworks/db_printlog/db_printlog.c BitKeeper/deleted/.del-db_printlog.wpj~a3d309da1bcfd90d: Delete: bdb/build_vxworks/db_printlog/db_printlog.wpj BitKeeper/deleted/.del-db_recover.c~91a305ab726bdd8: Delete: bdb/build_vxworks/db_recover/db_recover.c BitKeeper/deleted/.del-db_recover.wpj~8ad42e5de67901e2: Delete: bdb/build_vxworks/db_recover/db_recover.wpj BitKeeper/deleted/.del-db_stat.c~4dcfe3213db403f7: Delete: bdb/build_vxworks/db_stat/db_stat.c BitKeeper/deleted/.del-db_stat.wpj~77f17910b9a94f85: Delete: bdb/build_vxworks/db_stat/db_stat.wpj BitKeeper/deleted/.del-db_upgrade.c~e7cda8f222da34a7: Delete: bdb/build_vxworks/db_upgrade/db_upgrade.c BitKeeper/deleted/.del-db_upgrade.wpj~d36d961b31f59dda: Delete: bdb/build_vxworks/db_upgrade/db_upgrade.wpj BitKeeper/deleted/.del-Makefile.custom~885ead3079a0a779: Delete: bdb/build_vxworks/db_verify/db_verify/Makefile.custom BitKeeper/deleted/.del-Makefile.custom~a1a4e96924c2bc16: Delete: bdb/build_vxworks/dbdemo/dbdemo/Makefile.custom BitKeeper/deleted/.del-component.cdf~4e48fb1399b97382: Delete: bdb/build_vxworks/dbdemo/dbdemo/component.cdf BitKeeper/deleted/.del-component.cdf~7949208c42787c23: Delete: bdb/build_vxworks/db_verify/db_verify/component.cdf BitKeeper/deleted/.del-component.wpj~33b7238376fc4675: Delete: bdb/build_vxworks/db_verify/db_verify/component.wpj BitKeeper/deleted/.del-component.wpj~94039e6651ac117: Delete: bdb/build_vxworks/db_upgrade/db_upgrade/component.wpj BitKeeper/deleted/.del-component.wpj~b4f7a191ebb2b1e7: Delete: bdb/build_vxworks/dbdemo/dbdemo/component.wpj BitKeeper/deleted/.del-db_verify.c~1b3e9cc5c17323eb: Delete: bdb/build_vxworks/db_verify/db_verify.c BitKeeper/deleted/.del-db_verify.wpj~1fa472e1eeecb396: Delete: bdb/build_vxworks/db_verify/db_verify.wpj BitKeeper/deleted/.del-dbdemo.c~e754acbbacde488: Delete: bdb/build_vxworks/dbdemo/dbdemo.c BitKeeper/deleted/.del-dbdemo.wpj~c8d2fa5d14674437: Delete: bdb/build_vxworks/dbdemo/dbdemo.wpj bdb/dist/s_all: move mkdir stuff to a separate file comment out scripts we don't need --- bdb/build_vxworks/BerkeleyDB.wpj | 3506 --------- bdb/build_vxworks/BerkeleyDB/Makefile.custom | 51 - bdb/build_vxworks/BerkeleyDB/component.cdf | 1220 --- bdb/build_vxworks/BerkeleyDB/component.wpj | 6764 ----------------- bdb/build_vxworks/db_archive/db_archive.c | 195 - bdb/build_vxworks/db_archive/db_archive.wpj | 160 - .../db_archive/db_archive/Makefile.custom | 51 - .../db_archive/db_archive/component.cdf | 30 - .../db_archive/db_archive/component.wpj | 475 -- .../db_checkpoint/db_checkpoint.c | 258 - .../db_checkpoint/db_checkpoint.wpj | 160 - .../db_checkpoint/Makefile.custom | 51 - .../db_checkpoint/db_checkpoint/component.cdf | 30 - .../db_checkpoint/db_checkpoint/component.wpj | 475 -- bdb/build_vxworks/db_config.h | 382 - bdb/build_vxworks/db_deadlock/db_deadlock.c | 249 - bdb/build_vxworks/db_deadlock/db_deadlock.wpj | 160 - .../db_deadlock/db_deadlock/Makefile.custom | 51 - .../db_deadlock/db_deadlock/component.cdf | 30 - .../db_deadlock/db_deadlock/component.wpj | 475 -- bdb/build_vxworks/db_dump/db_dump.c | 626 -- bdb/build_vxworks/db_dump/db_dump.wpj | 160 - .../db_dump/db_dump/Makefile.custom | 51 - .../db_dump/db_dump/component.cdf | 30 - .../db_dump/db_dump/component.wpj | 475 -- bdb/build_vxworks/db_load/db_load.c | 1247 --- bdb/build_vxworks/db_load/db_load.wpj | 160 - .../db_load/db_load/Makefile.custom | 51 - .../db_load/db_load/component.cdf | 30 - .../db_load/db_load/component.wpj | 475 -- bdb/build_vxworks/db_printlog/db_printlog.c | 375 - bdb/build_vxworks/db_printlog/db_printlog.wpj | 160 - .../db_printlog/db_printlog/Makefile.custom | 51 - .../db_printlog/db_printlog/component.cdf | 30 - .../db_printlog/db_printlog/component.wpj | 475 -- bdb/build_vxworks/db_recover/db_recover.c | 328 - bdb/build_vxworks/db_recover/db_recover.wpj | 160 - .../db_recover/db_recover/Makefile.custom | 51 - .../db_recover/db_recover/component.cdf | 30 - .../db_recover/db_recover/component.wpj | 475 -- bdb/build_vxworks/db_stat/db_stat.c | 1282 ---- bdb/build_vxworks/db_stat/db_stat.wpj | 160 - .../db_stat/db_stat/Makefile.custom | 51 - .../db_stat/db_stat/component.cdf | 30 - .../db_stat/db_stat/component.wpj | 475 -- bdb/build_vxworks/db_upgrade/db_upgrade.c | 205 - bdb/build_vxworks/db_upgrade/db_upgrade.wpj | 160 - .../db_upgrade/db_upgrade/Makefile.custom | 51 - .../db_upgrade/db_upgrade/component.cdf | 30 - .../db_upgrade/db_upgrade/component.wpj | 475 -- bdb/build_vxworks/db_verify/db_verify.c | 263 - bdb/build_vxworks/db_verify/db_verify.wpj | 160 - .../db_verify/db_verify/Makefile.custom | 51 - .../db_verify/db_verify/component.cdf | 30 - .../db_verify/db_verify/component.wpj | 475 -- bdb/build_vxworks/dbdemo/dbdemo.c | 178 - bdb/build_vxworks/dbdemo/dbdemo.wpj | 160 - .../dbdemo/dbdemo/Makefile.custom | 51 - bdb/build_vxworks/dbdemo/dbdemo/component.cdf | 30 - bdb/build_vxworks/dbdemo/dbdemo/component.wpj | 475 -- bdb/dist/s_all | 23 +- bdb/dist/s_dir | 42 + 62 files changed, 47 insertions(+), 25023 deletions(-) delete mode 100644 bdb/build_vxworks/BerkeleyDB.wpj delete mode 100644 bdb/build_vxworks/BerkeleyDB/Makefile.custom delete mode 100755 bdb/build_vxworks/BerkeleyDB/component.cdf delete mode 100755 bdb/build_vxworks/BerkeleyDB/component.wpj delete mode 100644 bdb/build_vxworks/db_archive/db_archive.c delete mode 100755 bdb/build_vxworks/db_archive/db_archive.wpj delete mode 100644 bdb/build_vxworks/db_archive/db_archive/Makefile.custom delete mode 100755 bdb/build_vxworks/db_archive/db_archive/component.cdf delete mode 100755 bdb/build_vxworks/db_archive/db_archive/component.wpj delete mode 100644 bdb/build_vxworks/db_checkpoint/db_checkpoint.c delete mode 100755 bdb/build_vxworks/db_checkpoint/db_checkpoint.wpj delete mode 100644 bdb/build_vxworks/db_checkpoint/db_checkpoint/Makefile.custom delete mode 100755 bdb/build_vxworks/db_checkpoint/db_checkpoint/component.cdf delete mode 100755 bdb/build_vxworks/db_checkpoint/db_checkpoint/component.wpj delete mode 100644 bdb/build_vxworks/db_config.h delete mode 100644 bdb/build_vxworks/db_deadlock/db_deadlock.c delete mode 100755 bdb/build_vxworks/db_deadlock/db_deadlock.wpj delete mode 100644 bdb/build_vxworks/db_deadlock/db_deadlock/Makefile.custom delete mode 100755 bdb/build_vxworks/db_deadlock/db_deadlock/component.cdf delete mode 100755 bdb/build_vxworks/db_deadlock/db_deadlock/component.wpj delete mode 100644 bdb/build_vxworks/db_dump/db_dump.c delete mode 100755 bdb/build_vxworks/db_dump/db_dump.wpj delete mode 100644 bdb/build_vxworks/db_dump/db_dump/Makefile.custom delete mode 100755 bdb/build_vxworks/db_dump/db_dump/component.cdf delete mode 100755 bdb/build_vxworks/db_dump/db_dump/component.wpj delete mode 100644 bdb/build_vxworks/db_load/db_load.c delete mode 100755 bdb/build_vxworks/db_load/db_load.wpj delete mode 100644 bdb/build_vxworks/db_load/db_load/Makefile.custom delete mode 100755 bdb/build_vxworks/db_load/db_load/component.cdf delete mode 100755 bdb/build_vxworks/db_load/db_load/component.wpj delete mode 100644 bdb/build_vxworks/db_printlog/db_printlog.c delete mode 100755 bdb/build_vxworks/db_printlog/db_printlog.wpj delete mode 100644 bdb/build_vxworks/db_printlog/db_printlog/Makefile.custom delete mode 100755 bdb/build_vxworks/db_printlog/db_printlog/component.cdf delete mode 100755 bdb/build_vxworks/db_printlog/db_printlog/component.wpj delete mode 100644 bdb/build_vxworks/db_recover/db_recover.c delete mode 100755 bdb/build_vxworks/db_recover/db_recover.wpj delete mode 100644 bdb/build_vxworks/db_recover/db_recover/Makefile.custom delete mode 100755 bdb/build_vxworks/db_recover/db_recover/component.cdf delete mode 100755 bdb/build_vxworks/db_recover/db_recover/component.wpj delete mode 100644 bdb/build_vxworks/db_stat/db_stat.c delete mode 100755 bdb/build_vxworks/db_stat/db_stat.wpj delete mode 100644 bdb/build_vxworks/db_stat/db_stat/Makefile.custom delete mode 100755 bdb/build_vxworks/db_stat/db_stat/component.cdf delete mode 100755 bdb/build_vxworks/db_stat/db_stat/component.wpj delete mode 100644 bdb/build_vxworks/db_upgrade/db_upgrade.c delete mode 100755 bdb/build_vxworks/db_upgrade/db_upgrade.wpj delete mode 100644 bdb/build_vxworks/db_upgrade/db_upgrade/Makefile.custom delete mode 100755 bdb/build_vxworks/db_upgrade/db_upgrade/component.cdf delete mode 100755 bdb/build_vxworks/db_upgrade/db_upgrade/component.wpj delete mode 100644 bdb/build_vxworks/db_verify/db_verify.c delete mode 100755 bdb/build_vxworks/db_verify/db_verify.wpj delete mode 100644 bdb/build_vxworks/db_verify/db_verify/Makefile.custom delete mode 100755 bdb/build_vxworks/db_verify/db_verify/component.cdf delete mode 100755 bdb/build_vxworks/db_verify/db_verify/component.wpj delete mode 100644 bdb/build_vxworks/dbdemo/dbdemo.c delete mode 100755 bdb/build_vxworks/dbdemo/dbdemo.wpj delete mode 100644 bdb/build_vxworks/dbdemo/dbdemo/Makefile.custom delete mode 100755 bdb/build_vxworks/dbdemo/dbdemo/component.cdf delete mode 100755 bdb/build_vxworks/dbdemo/dbdemo/component.wpj create mode 100644 bdb/dist/s_dir diff --git a/bdb/build_vxworks/BerkeleyDB.wpj b/bdb/build_vxworks/BerkeleyDB.wpj deleted file mode 100644 index 45b15a62687..00000000000 --- a/bdb/build_vxworks/BerkeleyDB.wpj +++ /dev/null @@ -1,3506 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUM_debug_BUILDRULE -BerkeleyDB.out - - - BUILD_PENTIUM_debug_MACRO_AR -ar386 - - - BUILD_PENTIUM_debug_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/BerkeleyDB_sim.a - - - BUILD_PENTIUM_debug_MACRO_AS -cc386 - - - BUILD_PENTIUM_debug_MACRO_CC -cc386 - - - BUILD_PENTIUM_debug_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM \ - -O0 \ - -I$(PRJ_DIR) \ - -I$(PRJ_DIR)/.. \ - -DDIAGNOSTIC \ - -DDEBUG - - - BUILD_PENTIUM_debug_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUM_debug_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUM_debug_MACRO_LD -ld386 - - - BUILD_PENTIUM_debug_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUM_debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM_debug_MACRO_NM -nm386 -g - - - BUILD_PENTIUM_debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM_debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM_debug_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUM_debug_MACRO_PRJ_LIBS - - - - BUILD_PENTIUM_debug_MACRO_SIZE -size386 - - - BUILD_PENTIUM_debug_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUM_debug_TC -::tc_PENTIUMgnu - - - BUILD_PENTIUM_release_BUILDRULE -BerkeleyDB.out - - - BUILD_PENTIUM_release_MACRO_AR -ar386 - - - BUILD_PENTIUM_release_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/BerkeleyDB_sim.a - - - BUILD_PENTIUM_release_MACRO_AS -cc386 - - - BUILD_PENTIUM_release_MACRO_CC -cc386 - - - BUILD_PENTIUM_release_MACRO_CFLAGS --mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM \ - -O2 \ - -I$(PRJ_DIR) \ - -I$(PRJ_DIR)/.. - - - BUILD_PENTIUM_release_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUM_release_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUM_release_MACRO_LD -ld386 - - - BUILD_PENTIUM_release_MACRO_LDDEPS - - - - BUILD_PENTIUM_release_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUM_release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM_release_MACRO_NM -nm386 -g - - - BUILD_PENTIUM_release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM_release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM_release_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUM_release_MACRO_PRJ_LIBS - - - - BUILD_PENTIUM_release_MACRO_SIZE -size386 - - - BUILD_PENTIUM_release_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUM_release_TC -::tc_PENTIUMgnu - - - BUILD_RULE_BerkeleyDB.out - - - - BUILD_RULE_BerkeleyDB_sim.out - - - - BUILD_RULE_archive - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUM_debug - - - BUILD__LIST -PENTIUM_release PENTIUM_debug - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_$(PRJ_DIR)/../btree/bt_compare.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_compare.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_compare.c_objects -bt_compare.o - - - FILE_$(PRJ_DIR)/../btree/bt_compare.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_conv.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_conv.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_conv.c_objects -bt_conv.o - - - FILE_$(PRJ_DIR)/../btree/bt_conv.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_curadj.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_curadj.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_curadj.c_objects -bt_curadj.o - - - FILE_$(PRJ_DIR)/../btree/bt_curadj.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_cursor.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_cursor.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_cursor.c_objects -bt_cursor.o - - - FILE_$(PRJ_DIR)/../btree/bt_cursor.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_delete.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_delete.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_delete.c_objects -bt_delete.o - - - FILE_$(PRJ_DIR)/../btree/bt_delete.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_method.c_objects -bt_method.o - - - FILE_$(PRJ_DIR)/../btree/bt_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_open.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_open.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_open.c_objects -bt_open.o - - - FILE_$(PRJ_DIR)/../btree/bt_open.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_put.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_put.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_put.c_objects -bt_put.o - - - FILE_$(PRJ_DIR)/../btree/bt_put.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_rec.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_rec.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_rec.c_objects -bt_rec.o - - - FILE_$(PRJ_DIR)/../btree/bt_rec.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_reclaim.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_reclaim.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_reclaim.c_objects -bt_reclaim.o - - - FILE_$(PRJ_DIR)/../btree/bt_reclaim.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_recno.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_recno.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_recno.c_objects -bt_recno.o - - - FILE_$(PRJ_DIR)/../btree/bt_recno.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_rsearch.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_rsearch.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_rsearch.c_objects -bt_rsearch.o - - - FILE_$(PRJ_DIR)/../btree/bt_rsearch.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_search.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_search.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_search.c_objects -bt_search.o - - - FILE_$(PRJ_DIR)/../btree/bt_search.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_split.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_split.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_split.c_objects -bt_split.o - - - FILE_$(PRJ_DIR)/../btree/bt_split.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_stat.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_stat.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_stat.c_objects -bt_stat.o - - - FILE_$(PRJ_DIR)/../btree/bt_stat.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_upgrade.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_upgrade.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_upgrade.c_objects -bt_upgrade.o - - - FILE_$(PRJ_DIR)/../btree/bt_upgrade.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/bt_verify.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/bt_verify.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/bt_verify.c_objects -bt_verify.o - - - FILE_$(PRJ_DIR)/../btree/bt_verify.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../btree/btree_auto.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../btree/btree_auto.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../btree/btree_auto.c_objects -btree_auto.o - - - FILE_$(PRJ_DIR)/../btree/btree_auto.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../clib/getopt.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../clib/getopt.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../clib/getopt.c_objects -getopt.o - - - FILE_$(PRJ_DIR)/../clib/getopt.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../clib/snprintf.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../clib/snprintf.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../clib/snprintf.c_objects -snprintf.o - - - FILE_$(PRJ_DIR)/../clib/snprintf.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../clib/strcasecmp.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../clib/strcasecmp.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../clib/strcasecmp.c_objects -strcasecmp.o - - - FILE_$(PRJ_DIR)/../clib/strcasecmp.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../clib/strdup.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../clib/strdup.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../clib/strdup.c_objects -strdup.o - - - FILE_$(PRJ_DIR)/../clib/strdup.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../clib/vsnprintf.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../clib/vsnprintf.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../clib/vsnprintf.c_objects -vsnprintf.o - - - FILE_$(PRJ_DIR)/../clib/vsnprintf.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/db_byteorder.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/db_byteorder.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/db_byteorder.c_objects -db_byteorder.o - - - FILE_$(PRJ_DIR)/../common/db_byteorder.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/db_err.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/db_err.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/db_err.c_objects -db_err.o - - - FILE_$(PRJ_DIR)/../common/db_err.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/db_getlong.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/db_getlong.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/db_getlong.c_objects -db_getlong.o - - - FILE_$(PRJ_DIR)/../common/db_getlong.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/db_idspace.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/db_idspace.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/db_idspace.c_objects -db_idspace.o - - - FILE_$(PRJ_DIR)/../common/db_idspace.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/db_log2.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/db_log2.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/db_log2.c_objects -db_log2.o - - - FILE_$(PRJ_DIR)/../common/db_log2.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/util_arg.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/util_arg.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/util_arg.c_objects -util_arg.o - - - FILE_$(PRJ_DIR)/../common/util_arg.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/util_cache.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/util_cache.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/util_cache.c_objects -util_cache.o - - - FILE_$(PRJ_DIR)/../common/util_cache.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/util_log.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/util_log.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/util_log.c_objects -util_log.o - - - FILE_$(PRJ_DIR)/../common/util_log.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../common/util_sig.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../common/util_sig.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../common/util_sig.c_objects -util_sig.o - - - FILE_$(PRJ_DIR)/../common/util_sig.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/crdel_auto.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/crdel_auto.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/crdel_auto.c_objects -crdel_auto.o - - - FILE_$(PRJ_DIR)/../db/crdel_auto.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/crdel_rec.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/crdel_rec.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/crdel_rec.c_objects -crdel_rec.o - - - FILE_$(PRJ_DIR)/../db/crdel_rec.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db.c_objects -db.o - - - FILE_$(PRJ_DIR)/../db/db.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_am.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_am.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_am.c_objects -db_am.o - - - FILE_$(PRJ_DIR)/../db/db_am.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_auto.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_auto.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_auto.c_objects -db_auto.o - - - FILE_$(PRJ_DIR)/../db/db_auto.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_cam.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_cam.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_cam.c_objects -db_cam.o - - - FILE_$(PRJ_DIR)/../db/db_cam.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_conv.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_conv.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_conv.c_objects -db_conv.o - - - FILE_$(PRJ_DIR)/../db/db_conv.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_dispatch.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_dispatch.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_dispatch.c_objects -db_dispatch.o - - - FILE_$(PRJ_DIR)/../db/db_dispatch.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_dup.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_dup.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_dup.c_objects -db_dup.o - - - FILE_$(PRJ_DIR)/../db/db_dup.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_iface.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_iface.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_iface.c_objects -db_iface.o - - - FILE_$(PRJ_DIR)/../db/db_iface.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_join.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_join.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_join.c_objects -db_join.o - - - FILE_$(PRJ_DIR)/../db/db_join.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_meta.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_meta.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_meta.c_objects -db_meta.o - - - FILE_$(PRJ_DIR)/../db/db_meta.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_method.c_objects -db_method.o - - - FILE_$(PRJ_DIR)/../db/db_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_open.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_open.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_open.c_objects -db_open.o - - - FILE_$(PRJ_DIR)/../db/db_open.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_overflow.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_overflow.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_overflow.c_objects -db_overflow.o - - - FILE_$(PRJ_DIR)/../db/db_overflow.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_pr.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_pr.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_pr.c_objects -db_pr.o - - - FILE_$(PRJ_DIR)/../db/db_pr.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_rec.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_rec.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_rec.c_objects -db_rec.o - - - FILE_$(PRJ_DIR)/../db/db_rec.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_reclaim.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_reclaim.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_reclaim.c_objects -db_reclaim.o - - - FILE_$(PRJ_DIR)/../db/db_reclaim.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_remove.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_remove.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_remove.c_objects -db_remove.o - - - FILE_$(PRJ_DIR)/../db/db_remove.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_rename.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_rename.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_rename.c_objects -db_rename.o - - - FILE_$(PRJ_DIR)/../db/db_rename.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_ret.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_ret.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_ret.c_objects -db_ret.o - - - FILE_$(PRJ_DIR)/../db/db_ret.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_truncate.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_truncate.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_truncate.c_objects -db_truncate.o - - - FILE_$(PRJ_DIR)/../db/db_truncate.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_upg.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_upg.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_upg.c_objects -db_upg.o - - - FILE_$(PRJ_DIR)/../db/db_upg.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_upg_opd.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_upg_opd.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_upg_opd.c_objects -db_upg_opd.o - - - FILE_$(PRJ_DIR)/../db/db_upg_opd.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_vrfy.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_vrfy.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_vrfy.c_objects -db_vrfy.o - - - FILE_$(PRJ_DIR)/../db/db_vrfy.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../db/db_vrfyutil.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../db/db_vrfyutil.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../db/db_vrfyutil.c_objects -db_vrfyutil.o - - - FILE_$(PRJ_DIR)/../db/db_vrfyutil.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../dbreg/dbreg.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../dbreg/dbreg.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../dbreg/dbreg.c_objects -dbreg.o - - - FILE_$(PRJ_DIR)/../dbreg/dbreg.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_auto.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_auto.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_auto.c_objects -dbreg_auto.o - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_auto.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_rec.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_rec.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_rec.c_objects -dbreg_rec.o - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_rec.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_util.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_util.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_util.c_objects -dbreg_util.o - - - FILE_$(PRJ_DIR)/../dbreg/dbreg_util.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../env/db_salloc.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../env/db_salloc.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../env/db_salloc.c_objects -db_salloc.o - - - FILE_$(PRJ_DIR)/../env/db_salloc.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../env/db_shash.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../env/db_shash.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../env/db_shash.c_objects -db_shash.o - - - FILE_$(PRJ_DIR)/../env/db_shash.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../env/env_file.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../env/env_file.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../env/env_file.c_objects -env_file.o - - - FILE_$(PRJ_DIR)/../env/env_file.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../env/env_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../env/env_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../env/env_method.c_objects -env_method.o - - - FILE_$(PRJ_DIR)/../env/env_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../env/env_open.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../env/env_open.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../env/env_open.c_objects -env_open.o - - - FILE_$(PRJ_DIR)/../env/env_open.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../env/env_recover.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../env/env_recover.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../env/env_recover.c_objects -env_recover.o - - - FILE_$(PRJ_DIR)/../env/env_recover.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../env/env_region.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../env/env_region.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../env/env_region.c_objects -env_region.o - - - FILE_$(PRJ_DIR)/../env/env_region.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../fileops/fileops_auto.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../fileops/fileops_auto.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../fileops/fileops_auto.c_objects -fileops_auto.o - - - FILE_$(PRJ_DIR)/../fileops/fileops_auto.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../fileops/fop_basic.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../fileops/fop_basic.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../fileops/fop_basic.c_objects -fop_basic.o - - - FILE_$(PRJ_DIR)/../fileops/fop_basic.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../fileops/fop_rec.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../fileops/fop_rec.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../fileops/fop_rec.c_objects -fop_rec.o - - - FILE_$(PRJ_DIR)/../fileops/fop_rec.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../fileops/fop_util.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../fileops/fop_util.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../fileops/fop_util.c_objects -fop_util.o - - - FILE_$(PRJ_DIR)/../fileops/fop_util.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash.c_objects -hash.o - - - FILE_$(PRJ_DIR)/../hash/hash.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_auto.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_auto.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_auto.c_objects -hash_auto.o - - - FILE_$(PRJ_DIR)/../hash/hash_auto.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_conv.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_conv.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_conv.c_objects -hash_conv.o - - - FILE_$(PRJ_DIR)/../hash/hash_conv.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_dup.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_dup.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_dup.c_objects -hash_dup.o - - - FILE_$(PRJ_DIR)/../hash/hash_dup.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_func.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_func.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_func.c_objects -hash_func.o - - - FILE_$(PRJ_DIR)/../hash/hash_func.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_meta.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_meta.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_meta.c_objects -hash_meta.o - - - FILE_$(PRJ_DIR)/../hash/hash_meta.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_method.c_objects -hash_method.o - - - FILE_$(PRJ_DIR)/../hash/hash_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_open.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_open.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_open.c_objects -hash_open.o - - - FILE_$(PRJ_DIR)/../hash/hash_open.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_page.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_page.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_page.c_objects -hash_page.o - - - FILE_$(PRJ_DIR)/../hash/hash_page.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_rec.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_rec.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_rec.c_objects -hash_rec.o - - - FILE_$(PRJ_DIR)/../hash/hash_rec.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_reclaim.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_reclaim.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_reclaim.c_objects -hash_reclaim.o - - - FILE_$(PRJ_DIR)/../hash/hash_reclaim.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_stat.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_stat.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_stat.c_objects -hash_stat.o - - - FILE_$(PRJ_DIR)/../hash/hash_stat.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_upgrade.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_upgrade.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_upgrade.c_objects -hash_upgrade.o - - - FILE_$(PRJ_DIR)/../hash/hash_upgrade.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hash/hash_verify.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hash/hash_verify.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hash/hash_verify.c_objects -hash_verify.o - - - FILE_$(PRJ_DIR)/../hash/hash_verify.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hmac/hmac.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hmac/hmac.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hmac/hmac.c_objects -hmac.o - - - FILE_$(PRJ_DIR)/../hmac/hmac.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hmac/sha1.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hmac/sha1.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hmac/sha1.c_objects -sha1.o - - - FILE_$(PRJ_DIR)/../hmac/sha1.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../hsearch/hsearch.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../hsearch/hsearch.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../hsearch/hsearch.c_objects -hsearch.o - - - FILE_$(PRJ_DIR)/../hsearch/hsearch.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../lock/lock.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../lock/lock.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../lock/lock.c_objects -lock.o - - - FILE_$(PRJ_DIR)/../lock/lock.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../lock/lock_deadlock.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../lock/lock_deadlock.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../lock/lock_deadlock.c_objects -lock_deadlock.o - - - FILE_$(PRJ_DIR)/../lock/lock_deadlock.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../lock/lock_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../lock/lock_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../lock/lock_method.c_objects -lock_method.o - - - FILE_$(PRJ_DIR)/../lock/lock_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../lock/lock_region.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../lock/lock_region.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../lock/lock_region.c_objects -lock_region.o - - - FILE_$(PRJ_DIR)/../lock/lock_region.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../lock/lock_stat.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../lock/lock_stat.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../lock/lock_stat.c_objects -lock_stat.o - - - FILE_$(PRJ_DIR)/../lock/lock_stat.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../lock/lock_util.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../lock/lock_util.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../lock/lock_util.c_objects -lock_util.o - - - FILE_$(PRJ_DIR)/../lock/lock_util.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../log/log.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../log/log.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../log/log.c_objects -log.o - - - FILE_$(PRJ_DIR)/../log/log.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../log/log_archive.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../log/log_archive.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../log/log_archive.c_objects -log_archive.o - - - FILE_$(PRJ_DIR)/../log/log_archive.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../log/log_compare.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../log/log_compare.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../log/log_compare.c_objects -log_compare.o - - - FILE_$(PRJ_DIR)/../log/log_compare.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../log/log_get.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../log/log_get.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../log/log_get.c_objects -log_get.o - - - FILE_$(PRJ_DIR)/../log/log_get.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../log/log_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../log/log_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../log/log_method.c_objects -log_method.o - - - FILE_$(PRJ_DIR)/../log/log_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../log/log_put.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../log/log_put.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../log/log_put.c_objects -log_put.o - - - FILE_$(PRJ_DIR)/../log/log_put.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_alloc.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_alloc.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_alloc.c_objects -mp_alloc.o - - - FILE_$(PRJ_DIR)/../mp/mp_alloc.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_bh.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_bh.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_bh.c_objects -mp_bh.o - - - FILE_$(PRJ_DIR)/../mp/mp_bh.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_fget.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_fget.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_fget.c_objects -mp_fget.o - - - FILE_$(PRJ_DIR)/../mp/mp_fget.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_fopen.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_fopen.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_fopen.c_objects -mp_fopen.o - - - FILE_$(PRJ_DIR)/../mp/mp_fopen.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_fput.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_fput.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_fput.c_objects -mp_fput.o - - - FILE_$(PRJ_DIR)/../mp/mp_fput.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_fset.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_fset.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_fset.c_objects -mp_fset.o - - - FILE_$(PRJ_DIR)/../mp/mp_fset.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_method.c_objects -mp_method.o - - - FILE_$(PRJ_DIR)/../mp/mp_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_region.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_region.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_region.c_objects -mp_region.o - - - FILE_$(PRJ_DIR)/../mp/mp_region.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_register.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_register.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_register.c_objects -mp_register.o - - - FILE_$(PRJ_DIR)/../mp/mp_register.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_stat.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_stat.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_stat.c_objects -mp_stat.o - - - FILE_$(PRJ_DIR)/../mp/mp_stat.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_sync.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_sync.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_sync.c_objects -mp_sync.o - - - FILE_$(PRJ_DIR)/../mp/mp_sync.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mp/mp_trickle.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mp/mp_trickle.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mp/mp_trickle.c_objects -mp_trickle.o - - - FILE_$(PRJ_DIR)/../mp/mp_trickle.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mutex/mut_tas.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mutex/mut_tas.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mutex/mut_tas.c_objects -mut_tas.o - - - FILE_$(PRJ_DIR)/../mutex/mut_tas.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../mutex/mutex.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../mutex/mutex.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../mutex/mutex.c_objects -mutex.o - - - FILE_$(PRJ_DIR)/../mutex/mutex.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_alloc.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_alloc.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_alloc.c_objects -os_alloc.o - - - FILE_$(PRJ_DIR)/../os/os_alloc.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_clock.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_clock.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_clock.c_objects -os_clock.o - - - FILE_$(PRJ_DIR)/../os/os_clock.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_dir.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_dir.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_dir.c_objects -os_dir.o - - - FILE_$(PRJ_DIR)/../os/os_dir.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_errno.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_errno.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_errno.c_objects -os_errno.o - - - FILE_$(PRJ_DIR)/../os/os_errno.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_fid.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_fid.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_fid.c_objects -os_fid.o - - - FILE_$(PRJ_DIR)/../os/os_fid.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_fsync.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_fsync.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_fsync.c_objects -os_fsync.o - - - FILE_$(PRJ_DIR)/../os/os_fsync.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_handle.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_handle.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_handle.c_objects -os_handle.o - - - FILE_$(PRJ_DIR)/../os/os_handle.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_id.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_id.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_id.c_objects -os_id.o - - - FILE_$(PRJ_DIR)/../os/os_id.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_method.c_objects -os_method.o - - - FILE_$(PRJ_DIR)/../os/os_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_oflags.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_oflags.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_oflags.c_objects -os_oflags.o - - - FILE_$(PRJ_DIR)/../os/os_oflags.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_open.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_open.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_open.c_objects -os_open.o - - - FILE_$(PRJ_DIR)/../os/os_open.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_region.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_region.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_region.c_objects -os_region.o - - - FILE_$(PRJ_DIR)/../os/os_region.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_rename.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_rename.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_rename.c_objects -os_rename.o - - - FILE_$(PRJ_DIR)/../os/os_rename.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_root.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_root.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_root.c_objects -os_root.o - - - FILE_$(PRJ_DIR)/../os/os_root.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_rpath.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_rpath.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_rpath.c_objects -os_rpath.o - - - FILE_$(PRJ_DIR)/../os/os_rpath.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_rw.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_rw.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_rw.c_objects -os_rw.o - - - FILE_$(PRJ_DIR)/../os/os_rw.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_seek.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_seek.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_seek.c_objects -os_seek.o - - - FILE_$(PRJ_DIR)/../os/os_seek.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_sleep.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_sleep.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_sleep.c_objects -os_sleep.o - - - FILE_$(PRJ_DIR)/../os/os_sleep.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_spin.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_spin.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_spin.c_objects -os_spin.o - - - FILE_$(PRJ_DIR)/../os/os_spin.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_stat.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_stat.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_stat.c_objects -os_stat.o - - - FILE_$(PRJ_DIR)/../os/os_stat.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_tmpdir.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_tmpdir.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_tmpdir.c_objects -os_tmpdir.o - - - FILE_$(PRJ_DIR)/../os/os_tmpdir.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os/os_unlink.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os/os_unlink.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os/os_unlink.c_objects -os_unlink.o - - - FILE_$(PRJ_DIR)/../os/os_unlink.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_abs.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_abs.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_abs.c_objects -os_vx_abs.o - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_abs.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_config.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_config.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_config.c_objects -os_vx_config.o - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_config.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_map.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_map.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_map.c_objects -os_vx_map.o - - - FILE_$(PRJ_DIR)/../os_vxworks/os_vx_map.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam.c_objects -qam.o - - - FILE_$(PRJ_DIR)/../qam/qam.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_auto.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_auto.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_auto.c_objects -qam_auto.o - - - FILE_$(PRJ_DIR)/../qam/qam_auto.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_conv.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_conv.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_conv.c_objects -qam_conv.o - - - FILE_$(PRJ_DIR)/../qam/qam_conv.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_files.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_files.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_files.c_objects -qam_files.o - - - FILE_$(PRJ_DIR)/../qam/qam_files.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_method.c_objects -qam_method.o - - - FILE_$(PRJ_DIR)/../qam/qam_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_open.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_open.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_open.c_objects -qam_open.o - - - FILE_$(PRJ_DIR)/../qam/qam_open.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_rec.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_rec.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_rec.c_objects -qam_rec.o - - - FILE_$(PRJ_DIR)/../qam/qam_rec.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_stat.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_stat.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_stat.c_objects -qam_stat.o - - - FILE_$(PRJ_DIR)/../qam/qam_stat.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_upgrade.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_upgrade.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_upgrade.c_objects -qam_upgrade.o - - - FILE_$(PRJ_DIR)/../qam/qam_upgrade.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../qam/qam_verify.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../qam/qam_verify.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../qam/qam_verify.c_objects -qam_verify.o - - - FILE_$(PRJ_DIR)/../qam/qam_verify.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rep/rep_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rep/rep_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rep/rep_method.c_objects -rep_method.o - - - FILE_$(PRJ_DIR)/../rep/rep_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rep/rep_record.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rep/rep_record.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rep/rep_record.c_objects -rep_record.o - - - FILE_$(PRJ_DIR)/../rep/rep_record.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rep/rep_region.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rep/rep_region.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rep/rep_region.c_objects -rep_region.o - - - FILE_$(PRJ_DIR)/../rep/rep_region.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rep/rep_util.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rep/rep_util.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rep/rep_util.c_objects -rep_util.o - - - FILE_$(PRJ_DIR)/../rep/rep_util.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rpc_client/client.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rpc_client/client.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rpc_client/client.c_objects -client.o - - - FILE_$(PRJ_DIR)/../rpc_client/client.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rpc_client/db_server_clnt.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rpc_client/db_server_clnt.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rpc_client/db_server_clnt.c_objects -db_server_clnt.o - - - FILE_$(PRJ_DIR)/../rpc_client/db_server_clnt.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rpc_client/gen_client.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rpc_client/gen_client.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rpc_client/gen_client.c_objects -gen_client.o - - - FILE_$(PRJ_DIR)/../rpc_client/gen_client.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rpc_client/gen_client_ret.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rpc_client/gen_client_ret.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rpc_client/gen_client_ret.c_objects -gen_client_ret.o - - - FILE_$(PRJ_DIR)/../rpc_client/gen_client_ret.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../rpc_server/c/db_server_xdr.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../rpc_server/c/db_server_xdr.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../rpc_server/c/db_server_xdr.c_objects -db_server_xdr.o - - - FILE_$(PRJ_DIR)/../rpc_server/c/db_server_xdr.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../txn/txn.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../txn/txn.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../txn/txn.c_objects -txn.o - - - FILE_$(PRJ_DIR)/../txn/txn.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../txn/txn_auto.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../txn/txn_auto.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../txn/txn_auto.c_objects -txn_auto.o - - - FILE_$(PRJ_DIR)/../txn/txn_auto.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../txn/txn_method.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../txn/txn_method.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../txn/txn_method.c_objects -txn_method.o - - - FILE_$(PRJ_DIR)/../txn/txn_method.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../txn/txn_rec.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../txn/txn_rec.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../txn/txn_rec.c_objects -txn_rec.o - - - FILE_$(PRJ_DIR)/../txn/txn_rec.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../txn/txn_recover.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../txn/txn_recover.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../txn/txn_recover.c_objects -txn_recover.o - - - FILE_$(PRJ_DIR)/../txn/txn_recover.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../txn/txn_region.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../txn/txn_region.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../txn/txn_region.c_objects -txn_region.o - - - FILE_$(PRJ_DIR)/../txn/txn_region.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../txn/txn_stat.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../txn/txn_stat.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../txn/txn_stat.c_objects -txn_stat.o - - - FILE_$(PRJ_DIR)/../txn/txn_stat.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../txn/txn_util.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../txn/txn_util.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../txn/txn_util.c_objects -txn_util.o - - - FILE_$(PRJ_DIR)/../txn/txn_util.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../xa/xa.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../xa/xa.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../xa/xa.c_objects -xa.o - - - FILE_$(PRJ_DIR)/../xa/xa.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../xa/xa_db.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../xa/xa_db.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../xa/xa_db.c_objects -xa_db.o - - - FILE_$(PRJ_DIR)/../xa/xa_db.c_tool -C/C++ compiler - - - FILE_$(PRJ_DIR)/../xa/xa_map.c_dependDone -TRUE - - - FILE_$(PRJ_DIR)/../xa/xa_map.c_dependencies -$(PRJ_DIR)/db_config.h \ - $(PRJ_DIR)/db_int.h \ - $(PRJ_DIR)/db.h - - - FILE_$(PRJ_DIR)/../xa/xa_map.c_objects -xa_map.o - - - FILE_$(PRJ_DIR)/../xa/xa_map.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/../btree/bt_compare.c \ - $(PRJ_DIR)/../btree/bt_conv.c \ - $(PRJ_DIR)/../btree/bt_curadj.c \ - $(PRJ_DIR)/../btree/bt_cursor.c \ - $(PRJ_DIR)/../btree/bt_delete.c \ - $(PRJ_DIR)/../btree/bt_method.c \ - $(PRJ_DIR)/../btree/bt_open.c \ - $(PRJ_DIR)/../btree/bt_put.c \ - $(PRJ_DIR)/../btree/bt_rec.c \ - $(PRJ_DIR)/../btree/bt_reclaim.c \ - $(PRJ_DIR)/../btree/bt_recno.c \ - $(PRJ_DIR)/../btree/bt_rsearch.c \ - $(PRJ_DIR)/../btree/bt_search.c \ - $(PRJ_DIR)/../btree/bt_split.c \ - $(PRJ_DIR)/../btree/bt_stat.c \ - $(PRJ_DIR)/../btree/bt_upgrade.c \ - $(PRJ_DIR)/../btree/bt_verify.c \ - $(PRJ_DIR)/../btree/btree_auto.c \ - $(PRJ_DIR)/../clib/getopt.c \ - $(PRJ_DIR)/../clib/snprintf.c \ - $(PRJ_DIR)/../clib/strcasecmp.c \ - $(PRJ_DIR)/../clib/strdup.c \ - $(PRJ_DIR)/../clib/vsnprintf.c \ - $(PRJ_DIR)/../common/db_byteorder.c \ - $(PRJ_DIR)/../common/db_err.c \ - $(PRJ_DIR)/../common/db_getlong.c \ - $(PRJ_DIR)/../common/db_idspace.c \ - $(PRJ_DIR)/../common/db_log2.c \ - $(PRJ_DIR)/../common/util_arg.c \ - $(PRJ_DIR)/../common/util_cache.c \ - $(PRJ_DIR)/../common/util_log.c \ - $(PRJ_DIR)/../common/util_sig.c \ - $(PRJ_DIR)/../db/crdel_auto.c \ - $(PRJ_DIR)/../db/crdel_rec.c \ - $(PRJ_DIR)/../db/db.c \ - $(PRJ_DIR)/../db/db_am.c \ - $(PRJ_DIR)/../db/db_auto.c \ - $(PRJ_DIR)/../db/db_cam.c \ - $(PRJ_DIR)/../db/db_conv.c \ - $(PRJ_DIR)/../db/db_dispatch.c \ - $(PRJ_DIR)/../db/db_dup.c \ - $(PRJ_DIR)/../db/db_iface.c \ - $(PRJ_DIR)/../db/db_join.c \ - $(PRJ_DIR)/../db/db_meta.c \ - $(PRJ_DIR)/../db/db_method.c \ - $(PRJ_DIR)/../db/db_open.c \ - $(PRJ_DIR)/../db/db_overflow.c \ - $(PRJ_DIR)/../db/db_pr.c \ - $(PRJ_DIR)/../db/db_rec.c \ - $(PRJ_DIR)/../db/db_reclaim.c \ - $(PRJ_DIR)/../db/db_remove.c \ - $(PRJ_DIR)/../db/db_rename.c \ - $(PRJ_DIR)/../db/db_ret.c \ - $(PRJ_DIR)/../db/db_truncate.c \ - $(PRJ_DIR)/../db/db_upg.c \ - $(PRJ_DIR)/../db/db_upg_opd.c \ - $(PRJ_DIR)/../db/db_vrfy.c \ - $(PRJ_DIR)/../db/db_vrfyutil.c \ - $(PRJ_DIR)/../dbreg/dbreg.c \ - $(PRJ_DIR)/../dbreg/dbreg_auto.c \ - $(PRJ_DIR)/../dbreg/dbreg_rec.c \ - $(PRJ_DIR)/../dbreg/dbreg_util.c \ - $(PRJ_DIR)/../env/db_salloc.c \ - $(PRJ_DIR)/../env/db_shash.c \ - $(PRJ_DIR)/../env/env_file.c \ - $(PRJ_DIR)/../env/env_method.c \ - $(PRJ_DIR)/../env/env_open.c \ - $(PRJ_DIR)/../env/env_recover.c \ - $(PRJ_DIR)/../env/env_region.c \ - $(PRJ_DIR)/../fileops/fileops_auto.c \ - $(PRJ_DIR)/../fileops/fop_basic.c \ - $(PRJ_DIR)/../fileops/fop_rec.c \ - $(PRJ_DIR)/../fileops/fop_util.c \ - $(PRJ_DIR)/../hash/hash.c \ - $(PRJ_DIR)/../hash/hash_auto.c \ - $(PRJ_DIR)/../hash/hash_conv.c \ - $(PRJ_DIR)/../hash/hash_dup.c \ - $(PRJ_DIR)/../hash/hash_func.c \ - $(PRJ_DIR)/../hash/hash_meta.c \ - $(PRJ_DIR)/../hash/hash_method.c \ - $(PRJ_DIR)/../hash/hash_open.c \ - $(PRJ_DIR)/../hash/hash_page.c \ - $(PRJ_DIR)/../hash/hash_rec.c \ - $(PRJ_DIR)/../hash/hash_reclaim.c \ - $(PRJ_DIR)/../hash/hash_stat.c \ - $(PRJ_DIR)/../hash/hash_upgrade.c \ - $(PRJ_DIR)/../hash/hash_verify.c \ - $(PRJ_DIR)/../hmac/hmac.c \ - $(PRJ_DIR)/../hmac/sha1.c \ - $(PRJ_DIR)/../hsearch/hsearch.c \ - $(PRJ_DIR)/../lock/lock.c \ - $(PRJ_DIR)/../lock/lock_deadlock.c \ - $(PRJ_DIR)/../lock/lock_method.c \ - $(PRJ_DIR)/../lock/lock_region.c \ - $(PRJ_DIR)/../lock/lock_stat.c \ - $(PRJ_DIR)/../lock/lock_util.c \ - $(PRJ_DIR)/../log/log.c \ - $(PRJ_DIR)/../log/log_archive.c \ - $(PRJ_DIR)/../log/log_compare.c \ - $(PRJ_DIR)/../log/log_get.c \ - $(PRJ_DIR)/../log/log_method.c \ - $(PRJ_DIR)/../log/log_put.c \ - $(PRJ_DIR)/../mp/mp_alloc.c \ - $(PRJ_DIR)/../mp/mp_bh.c \ - $(PRJ_DIR)/../mp/mp_fget.c \ - $(PRJ_DIR)/../mp/mp_fopen.c \ - $(PRJ_DIR)/../mp/mp_fput.c \ - $(PRJ_DIR)/../mp/mp_fset.c \ - $(PRJ_DIR)/../mp/mp_method.c \ - $(PRJ_DIR)/../mp/mp_region.c \ - $(PRJ_DIR)/../mp/mp_register.c \ - $(PRJ_DIR)/../mp/mp_stat.c \ - $(PRJ_DIR)/../mp/mp_sync.c \ - $(PRJ_DIR)/../mp/mp_trickle.c \ - $(PRJ_DIR)/../mutex/mut_tas.c \ - $(PRJ_DIR)/../mutex/mutex.c \ - $(PRJ_DIR)/../os/os_alloc.c \ - $(PRJ_DIR)/../os/os_clock.c \ - $(PRJ_DIR)/../os/os_dir.c \ - $(PRJ_DIR)/../os/os_errno.c \ - $(PRJ_DIR)/../os/os_fid.c \ - $(PRJ_DIR)/../os/os_fsync.c \ - $(PRJ_DIR)/../os/os_handle.c \ - $(PRJ_DIR)/../os/os_id.c \ - $(PRJ_DIR)/../os/os_method.c \ - $(PRJ_DIR)/../os/os_oflags.c \ - $(PRJ_DIR)/../os/os_open.c \ - $(PRJ_DIR)/../os/os_region.c \ - $(PRJ_DIR)/../os/os_rename.c \ - $(PRJ_DIR)/../os/os_root.c \ - $(PRJ_DIR)/../os/os_rpath.c \ - $(PRJ_DIR)/../os/os_rw.c \ - $(PRJ_DIR)/../os/os_seek.c \ - $(PRJ_DIR)/../os/os_sleep.c \ - $(PRJ_DIR)/../os/os_spin.c \ - $(PRJ_DIR)/../os/os_stat.c \ - $(PRJ_DIR)/../os/os_tmpdir.c \ - $(PRJ_DIR)/../os/os_unlink.c \ - $(PRJ_DIR)/../os_vxworks/os_vx_abs.c \ - $(PRJ_DIR)/../os_vxworks/os_vx_config.c \ - $(PRJ_DIR)/../os_vxworks/os_vx_map.c \ - $(PRJ_DIR)/../qam/qam.c \ - $(PRJ_DIR)/../qam/qam_auto.c \ - $(PRJ_DIR)/../qam/qam_conv.c \ - $(PRJ_DIR)/../qam/qam_files.c \ - $(PRJ_DIR)/../qam/qam_method.c \ - $(PRJ_DIR)/../qam/qam_open.c \ - $(PRJ_DIR)/../qam/qam_rec.c \ - $(PRJ_DIR)/../qam/qam_stat.c \ - $(PRJ_DIR)/../qam/qam_upgrade.c \ - $(PRJ_DIR)/../qam/qam_verify.c \ - $(PRJ_DIR)/../rep/rep_method.c \ - $(PRJ_DIR)/../rep/rep_record.c \ - $(PRJ_DIR)/../rep/rep_region.c \ - $(PRJ_DIR)/../rep/rep_util.c \ - $(PRJ_DIR)/../rpc_client/client.c \ - $(PRJ_DIR)/../rpc_client/db_server_clnt.c \ - $(PRJ_DIR)/../rpc_client/gen_client.c \ - $(PRJ_DIR)/../rpc_client/gen_client_ret.c \ - $(PRJ_DIR)/../rpc_server/c/db_server_xdr.c \ - $(PRJ_DIR)/../txn/txn.c \ - $(PRJ_DIR)/../txn/txn_auto.c \ - $(PRJ_DIR)/../txn/txn_method.c \ - $(PRJ_DIR)/../txn/txn_rec.c \ - $(PRJ_DIR)/../txn/txn_recover.c \ - $(PRJ_DIR)/../txn/txn_region.c \ - $(PRJ_DIR)/../txn/txn_stat.c \ - $(PRJ_DIR)/../txn/txn_util.c \ - $(PRJ_DIR)/../xa/xa.c \ - $(PRJ_DIR)/../xa/xa_db.c \ - $(PRJ_DIR)/../xa/xa_map.c - - - userComments -BerkeleyDB - diff --git a/bdb/build_vxworks/BerkeleyDB/Makefile.custom b/bdb/build_vxworks/BerkeleyDB/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/BerkeleyDB/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/BerkeleyDB/component.cdf b/bdb/build_vxworks/BerkeleyDB/component.cdf deleted file mode 100755 index 4b3e6f101c3..00000000000 --- a/bdb/build_vxworks/BerkeleyDB/component.cdf +++ /dev/null @@ -1,1220 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_BERKELEYDB { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES bt_compare.o \ - bt_conv.o \ - bt_curadj.o \ - bt_cursor.o \ - bt_delete.o \ - bt_method.o \ - bt_open.o \ - bt_put.o \ - bt_rec.o \ - bt_reclaim.o \ - bt_recno.o \ - bt_rsearch.o \ - bt_search.o \ - bt_split.o \ - bt_stat.o \ - bt_upgrade.o \ - bt_verify.o \ - btree_auto.o \ - client.o \ - crdel_auto.o \ - crdel_rec.o \ - db.o \ - db_am.o \ - db_auto.o \ - db_byteorder.o \ - db_cam.o \ - db_conv.o \ - db_dispatch.o \ - db_dup.o \ - db_err.o \ - db_getlong.o \ - db_idspace.o \ - db_iface.o \ - db_join.o \ - db_log2.o \ - db_meta.o \ - db_method.o \ - db_open.o \ - db_overflow.o \ - db_pr.o \ - db_rec.o \ - db_reclaim.o \ - db_remove.o \ - db_rename.o \ - db_ret.o \ - db_salloc.o \ - db_server_clnt.o \ - db_server_xdr.o \ - db_shash.o \ - db_truncate.o \ - db_upg.o \ - db_upg_opd.o \ - db_vrfy.o \ - db_vrfyutil.o \ - dbreg.o \ - dbreg_auto.o \ - dbreg_rec.o \ - dbreg_util.o \ - env_file.o \ - env_method.o \ - env_open.o \ - env_recover.o \ - env_region.o \ - fileops_auto.o \ - fop_basic.o \ - fop_rec.o \ - fop_util.o \ - gen_client.o \ - gen_client_ret.o \ - getopt.o \ - hash.o \ - hash_auto.o \ - hash_conv.o \ - hash_dup.o \ - hash_func.o \ - hash_meta.o \ - hash_method.o \ - hash_open.o \ - hash_page.o \ - hash_rec.o \ - hash_reclaim.o \ - hash_stat.o \ - hash_upgrade.o \ - hash_verify.o \ - hmac.o \ - hsearch.o \ - lock.o \ - lock_deadlock.o \ - lock_method.o \ - lock_region.o \ - lock_stat.o \ - lock_util.o \ - log.o \ - log_archive.o \ - log_compare.o \ - log_get.o \ - log_method.o \ - log_put.o \ - mp_alloc.o \ - mp_bh.o \ - mp_fget.o \ - mp_fopen.o \ - mp_fput.o \ - mp_fset.o \ - mp_method.o \ - mp_region.o \ - mp_register.o \ - mp_stat.o \ - mp_sync.o \ - mp_trickle.o \ - mut_tas.o \ - mutex.o \ - os_alloc.o \ - os_clock.o \ - os_dir.o \ - os_errno.o \ - os_fid.o \ - os_fsync.o \ - os_handle.o \ - os_id.o \ - os_method.o \ - os_oflags.o \ - os_open.o \ - os_region.o \ - os_rename.o \ - os_root.o \ - os_rpath.o \ - os_rw.o \ - os_seek.o \ - os_sleep.o \ - os_spin.o \ - os_stat.o \ - os_tmpdir.o \ - os_unlink.o \ - os_vx_abs.o \ - os_vx_config.o \ - os_vx_map.o \ - qam.o \ - qam_auto.o \ - qam_conv.o \ - qam_files.o \ - qam_method.o \ - qam_open.o \ - qam_rec.o \ - qam_stat.o \ - qam_upgrade.o \ - qam_verify.o \ - rep_method.o \ - rep_record.o \ - rep_region.o \ - rep_util.o \ - sha1.o \ - snprintf.o \ - strcasecmp.o \ - strdup.o \ - txn.o \ - txn_auto.o \ - txn_method.o \ - txn_rec.o \ - txn_recover.o \ - txn_region.o \ - txn_stat.o \ - txn_util.o \ - util_arg.o \ - util_cache.o \ - util_log.o \ - util_sig.o \ - vsnprintf.o \ - xa.o \ - xa_db.o \ - xa_map.o - NAME BerkeleyDB - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module bt_compare.o { - - NAME bt_compare.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_compare.c -} - -Module bt_conv.o { - - NAME bt_conv.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_conv.c -} - -Module bt_curadj.o { - - NAME bt_curadj.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_curadj.c -} - -Module bt_cursor.o { - - NAME bt_cursor.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_cursor.c -} - -Module bt_delete.o { - - NAME bt_delete.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_delete.c -} - -Module bt_method.o { - - NAME bt_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_method.c -} - -Module bt_open.o { - - NAME bt_open.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_open.c -} - -Module bt_put.o { - - NAME bt_put.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_put.c -} - -Module bt_rec.o { - - NAME bt_rec.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_rec.c -} - -Module bt_reclaim.o { - - NAME bt_reclaim.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_reclaim.c -} - -Module bt_recno.o { - - NAME bt_recno.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_recno.c -} - -Module bt_rsearch.o { - - NAME bt_rsearch.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_rsearch.c -} - -Module bt_search.o { - - NAME bt_search.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_search.c -} - -Module bt_split.o { - - NAME bt_split.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_split.c -} - -Module bt_stat.o { - - NAME bt_stat.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_stat.c -} - -Module bt_upgrade.o { - - NAME bt_upgrade.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_upgrade.c -} - -Module bt_verify.o { - - NAME bt_verify.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/bt_verify.c -} - -Module btree_auto.o { - - NAME btree_auto.o - SRC_PATH_NAME $(PRJ_DIR)/../../btree/btree_auto.c -} - -Module getopt.o { - - NAME getopt.o - SRC_PATH_NAME $(PRJ_DIR)/../../clib/getopt.c -} - -Module snprintf.o { - - NAME snprintf.o - SRC_PATH_NAME $(PRJ_DIR)/../../clib/snprintf.c -} - -Module strcasecmp.o { - - NAME strcasecmp.o - SRC_PATH_NAME $(PRJ_DIR)/../../clib/strcasecmp.c -} - -Module strdup.o { - - NAME strdup.o - SRC_PATH_NAME $(PRJ_DIR)/../../clib/strdup.c -} - -Module vsnprintf.o { - - NAME vsnprintf.o - SRC_PATH_NAME $(PRJ_DIR)/../../clib/vsnprintf.c -} - -Module db_byteorder.o { - - NAME db_byteorder.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/db_byteorder.c -} - -Module db_err.o { - - NAME db_err.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/db_err.c -} - -Module db_getlong.o { - - NAME db_getlong.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/db_getlong.c -} - -Module db_idspace.o { - - NAME db_idspace.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/db_idspace.c -} - -Module db_log2.o { - - NAME db_log2.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/db_log2.c -} - -Module util_arg.o { - - NAME util_arg.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/util_arg.c -} - -Module util_cache.o { - - NAME util_cache.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/util_cache.c -} - -Module util_log.o { - - NAME util_log.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/util_log.c -} - -Module util_sig.o { - - NAME util_sig.o - SRC_PATH_NAME $(PRJ_DIR)/../../common/util_sig.c -} - -Module crdel_auto.o { - - NAME crdel_auto.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/crdel_auto.c -} - -Module crdel_rec.o { - - NAME crdel_rec.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/crdel_rec.c -} - -Module db.o { - - NAME db.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db.c -} - -Module db_am.o { - - NAME db_am.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_am.c -} - -Module db_auto.o { - - NAME db_auto.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_auto.c -} - -Module db_cam.o { - - NAME db_cam.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_cam.c -} - -Module db_conv.o { - - NAME db_conv.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_conv.c -} - -Module db_dispatch.o { - - NAME db_dispatch.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_dispatch.c -} - -Module db_dup.o { - - NAME db_dup.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_dup.c -} - -Module db_iface.o { - - NAME db_iface.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_iface.c -} - -Module db_join.o { - - NAME db_join.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_join.c -} - -Module db_meta.o { - - NAME db_meta.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_meta.c -} - -Module db_method.o { - - NAME db_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_method.c -} - -Module db_open.o { - - NAME db_open.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_open.c -} - -Module db_overflow.o { - - NAME db_overflow.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_overflow.c -} - -Module db_pr.o { - - NAME db_pr.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_pr.c -} - -Module db_rec.o { - - NAME db_rec.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_rec.c -} - -Module db_reclaim.o { - - NAME db_reclaim.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_reclaim.c -} - -Module db_remove.o { - - NAME db_remove.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_remove.c -} - -Module db_rename.o { - - NAME db_rename.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_rename.c -} - -Module db_ret.o { - - NAME db_ret.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_ret.c -} - -Module db_truncate.o { - - NAME db_truncate.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_truncate.c -} - -Module db_upg.o { - - NAME db_upg.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_upg.c -} - -Module db_upg_opd.o { - - NAME db_upg_opd.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_upg_opd.c -} - -Module db_vrfy.o { - - NAME db_vrfy.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_vrfy.c -} - -Module db_vrfyutil.o { - - NAME db_vrfyutil.o - SRC_PATH_NAME $(PRJ_DIR)/../../db/db_vrfyutil.c -} - -Module dbreg.o { - - NAME dbreg.o - SRC_PATH_NAME $(PRJ_DIR)/../../dbreg/dbreg.c -} - -Module dbreg_auto.o { - - NAME dbreg_auto.o - SRC_PATH_NAME $(PRJ_DIR)/../../dbreg/dbreg_auto.c -} - -Module dbreg_rec.o { - - NAME dbreg_rec.o - SRC_PATH_NAME $(PRJ_DIR)/../../dbreg/dbreg_rec.c -} - -Module dbreg_util.o { - - NAME dbreg_util.o - SRC_PATH_NAME $(PRJ_DIR)/../../dbreg/dbreg_util.c -} - -Module db_salloc.o { - - NAME db_salloc.o - SRC_PATH_NAME $(PRJ_DIR)/../../env/db_salloc.c -} - -Module db_shash.o { - - NAME db_shash.o - SRC_PATH_NAME $(PRJ_DIR)/../../env/db_shash.c -} - -Module env_file.o { - - NAME env_file.o - SRC_PATH_NAME $(PRJ_DIR)/../../env/env_file.c -} - -Module env_method.o { - - NAME env_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../env/env_method.c -} - -Module env_open.o { - - NAME env_open.o - SRC_PATH_NAME $(PRJ_DIR)/../../env/env_open.c -} - -Module env_recover.o { - - NAME env_recover.o - SRC_PATH_NAME $(PRJ_DIR)/../../env/env_recover.c -} - -Module env_region.o { - - NAME env_region.o - SRC_PATH_NAME $(PRJ_DIR)/../../env/env_region.c -} - -Module fileops_auto.o { - - NAME fileops_auto.o - SRC_PATH_NAME $(PRJ_DIR)/../../fileops/fileops_auto.c -} - -Module fop_basic.o { - - NAME fop_basic.o - SRC_PATH_NAME $(PRJ_DIR)/../../fileops/fop_basic.c -} - -Module fop_rec.o { - - NAME fop_rec.o - SRC_PATH_NAME $(PRJ_DIR)/../../fileops/fop_rec.c -} - -Module fop_util.o { - - NAME fop_util.o - SRC_PATH_NAME $(PRJ_DIR)/../../fileops/fop_util.c -} - -Module hash.o { - - NAME hash.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash.c -} - -Module hash_auto.o { - - NAME hash_auto.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_auto.c -} - -Module hash_conv.o { - - NAME hash_conv.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_conv.c -} - -Module hash_dup.o { - - NAME hash_dup.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_dup.c -} - -Module hash_func.o { - - NAME hash_func.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_func.c -} - -Module hash_meta.o { - - NAME hash_meta.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_meta.c -} - -Module hash_method.o { - - NAME hash_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_method.c -} - -Module hash_open.o { - - NAME hash_open.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_open.c -} - -Module hash_page.o { - - NAME hash_page.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_page.c -} - -Module hash_rec.o { - - NAME hash_rec.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_rec.c -} - -Module hash_reclaim.o { - - NAME hash_reclaim.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_reclaim.c -} - -Module hash_stat.o { - - NAME hash_stat.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_stat.c -} - -Module hash_upgrade.o { - - NAME hash_upgrade.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_upgrade.c -} - -Module hash_verify.o { - - NAME hash_verify.o - SRC_PATH_NAME $(PRJ_DIR)/../../hash/hash_verify.c -} - -Module hmac.o { - - NAME hmac.o - SRC_PATH_NAME $(PRJ_DIR)/../../hmac/hmac.c -} - -Module sha1.o { - - NAME sha1.o - SRC_PATH_NAME $(PRJ_DIR)/../../hmac/sha1.c -} - -Module hsearch.o { - - NAME hsearch.o - SRC_PATH_NAME $(PRJ_DIR)/../../hsearch/hsearch.c -} - -Module lock.o { - - NAME lock.o - SRC_PATH_NAME $(PRJ_DIR)/../../lock/lock.c -} - -Module lock_deadlock.o { - - NAME lock_deadlock.o - SRC_PATH_NAME $(PRJ_DIR)/../../lock/lock_deadlock.c -} - -Module lock_method.o { - - NAME lock_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../lock/lock_method.c -} - -Module lock_region.o { - - NAME lock_region.o - SRC_PATH_NAME $(PRJ_DIR)/../../lock/lock_region.c -} - -Module lock_stat.o { - - NAME lock_stat.o - SRC_PATH_NAME $(PRJ_DIR)/../../lock/lock_stat.c -} - -Module lock_util.o { - - NAME lock_util.o - SRC_PATH_NAME $(PRJ_DIR)/../../lock/lock_util.c -} - -Module log.o { - - NAME log.o - SRC_PATH_NAME $(PRJ_DIR)/../../log/log.c -} - -Module log_archive.o { - - NAME log_archive.o - SRC_PATH_NAME $(PRJ_DIR)/../../log/log_archive.c -} - -Module log_compare.o { - - NAME log_compare.o - SRC_PATH_NAME $(PRJ_DIR)/../../log/log_compare.c -} - -Module log_get.o { - - NAME log_get.o - SRC_PATH_NAME $(PRJ_DIR)/../../log/log_get.c -} - -Module log_method.o { - - NAME log_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../log/log_method.c -} - -Module log_put.o { - - NAME log_put.o - SRC_PATH_NAME $(PRJ_DIR)/../../log/log_put.c -} - -Module mp_alloc.o { - - NAME mp_alloc.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_alloc.c -} - -Module mp_bh.o { - - NAME mp_bh.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_bh.c -} - -Module mp_fget.o { - - NAME mp_fget.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_fget.c -} - -Module mp_fopen.o { - - NAME mp_fopen.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_fopen.c -} - -Module mp_fput.o { - - NAME mp_fput.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_fput.c -} - -Module mp_fset.o { - - NAME mp_fset.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_fset.c -} - -Module mp_method.o { - - NAME mp_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_method.c -} - -Module mp_region.o { - - NAME mp_region.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_region.c -} - -Module mp_register.o { - - NAME mp_register.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_register.c -} - -Module mp_stat.o { - - NAME mp_stat.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_stat.c -} - -Module mp_sync.o { - - NAME mp_sync.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_sync.c -} - -Module mp_trickle.o { - - NAME mp_trickle.o - SRC_PATH_NAME $(PRJ_DIR)/../../mp/mp_trickle.c -} - -Module mut_tas.o { - - NAME mut_tas.o - SRC_PATH_NAME $(PRJ_DIR)/../../mutex/mut_tas.c -} - -Module mutex.o { - - NAME mutex.o - SRC_PATH_NAME $(PRJ_DIR)/../../mutex/mutex.c -} - -Module os_alloc.o { - - NAME os_alloc.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_alloc.c -} - -Module os_clock.o { - - NAME os_clock.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_clock.c -} - -Module os_dir.o { - - NAME os_dir.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_dir.c -} - -Module os_errno.o { - - NAME os_errno.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_errno.c -} - -Module os_fid.o { - - NAME os_fid.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_fid.c -} - -Module os_fsync.o { - - NAME os_fsync.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_fsync.c -} - -Module os_handle.o { - - NAME os_handle.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_handle.c -} - -Module os_id.o { - - NAME os_id.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_id.c -} - -Module os_method.o { - - NAME os_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_method.c -} - -Module os_oflags.o { - - NAME os_oflags.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_oflags.c -} - -Module os_open.o { - - NAME os_open.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_open.c -} - -Module os_region.o { - - NAME os_region.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_region.c -} - -Module os_rename.o { - - NAME os_rename.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_rename.c -} - -Module os_root.o { - - NAME os_root.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_root.c -} - -Module os_rpath.o { - - NAME os_rpath.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_rpath.c -} - -Module os_rw.o { - - NAME os_rw.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_rw.c -} - -Module os_seek.o { - - NAME os_seek.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_seek.c -} - -Module os_sleep.o { - - NAME os_sleep.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_sleep.c -} - -Module os_spin.o { - - NAME os_spin.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_spin.c -} - -Module os_stat.o { - - NAME os_stat.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_stat.c -} - -Module os_tmpdir.o { - - NAME os_tmpdir.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_tmpdir.c -} - -Module os_unlink.o { - - NAME os_unlink.o - SRC_PATH_NAME $(PRJ_DIR)/../../os/os_unlink.c -} - -Module os_vx_abs.o { - - NAME os_vx_abs.o - SRC_PATH_NAME $(PRJ_DIR)/../../os_vxworks/os_vx_abs.c -} - -Module os_vx_config.o { - - NAME os_vx_config.o - SRC_PATH_NAME $(PRJ_DIR)/../../os_vxworks/os_vx_config.c -} - -Module os_vx_map.o { - - NAME os_vx_map.o - SRC_PATH_NAME $(PRJ_DIR)/../../os_vxworks/os_vx_map.c -} - -Module qam.o { - - NAME qam.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam.c -} - -Module qam_auto.o { - - NAME qam_auto.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_auto.c -} - -Module qam_conv.o { - - NAME qam_conv.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_conv.c -} - -Module qam_files.o { - - NAME qam_files.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_files.c -} - -Module qam_method.o { - - NAME qam_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_method.c -} - -Module qam_open.o { - - NAME qam_open.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_open.c -} - -Module qam_rec.o { - - NAME qam_rec.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_rec.c -} - -Module qam_stat.o { - - NAME qam_stat.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_stat.c -} - -Module qam_upgrade.o { - - NAME qam_upgrade.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_upgrade.c -} - -Module qam_verify.o { - - NAME qam_verify.o - SRC_PATH_NAME $(PRJ_DIR)/../../qam/qam_verify.c -} - -Module rep_method.o { - - NAME rep_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../rep/rep_method.c -} - -Module rep_record.o { - - NAME rep_record.o - SRC_PATH_NAME $(PRJ_DIR)/../../rep/rep_record.c -} - -Module rep_region.o { - - NAME rep_region.o - SRC_PATH_NAME $(PRJ_DIR)/../../rep/rep_region.c -} - -Module rep_util.o { - - NAME rep_util.o - SRC_PATH_NAME $(PRJ_DIR)/../../rep/rep_util.c -} - -Module client.o { - - NAME client.o - SRC_PATH_NAME $(PRJ_DIR)/../../rpc_client/client.c -} - -Module db_server_clnt.o { - - NAME db_server_clnt.o - SRC_PATH_NAME $(PRJ_DIR)/../../rpc_client/db_server_clnt.c -} - -Module gen_client.o { - - NAME gen_client.o - SRC_PATH_NAME $(PRJ_DIR)/../../rpc_client/gen_client.c -} - -Module gen_client_ret.o { - - NAME gen_client_ret.o - SRC_PATH_NAME $(PRJ_DIR)/../../rpc_client/gen_client_ret.c -} - -Module db_server_xdr.o { - - NAME db_server_xdr.o - SRC_PATH_NAME $(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c -} - -Module txn.o { - - NAME txn.o - SRC_PATH_NAME $(PRJ_DIR)/../../txn/txn.c -} - -Module txn_auto.o { - - NAME txn_auto.o - SRC_PATH_NAME $(PRJ_DIR)/../../txn/txn_auto.c -} - -Module txn_method.o { - - NAME txn_method.o - SRC_PATH_NAME $(PRJ_DIR)/../../txn/txn_method.c -} - -Module txn_rec.o { - - NAME txn_rec.o - SRC_PATH_NAME $(PRJ_DIR)/../../txn/txn_rec.c -} - -Module txn_recover.o { - - NAME txn_recover.o - SRC_PATH_NAME $(PRJ_DIR)/../../txn/txn_recover.c -} - -Module txn_region.o { - - NAME txn_region.o - SRC_PATH_NAME $(PRJ_DIR)/../../txn/txn_region.c -} - -Module txn_stat.o { - - NAME txn_stat.o - SRC_PATH_NAME $(PRJ_DIR)/../../txn/txn_stat.c -} - -Module txn_util.o { - - NAME txn_util.o - SRC_PATH_NAME $(PRJ_DIR)/../../txn/txn_util.c -} - -Module xa.o { - - NAME xa.o - SRC_PATH_NAME $(PRJ_DIR)/../../xa/xa.c -} - -Module xa_db.o { - - NAME xa_db.o - SRC_PATH_NAME $(PRJ_DIR)/../../xa/xa_db.c -} - -Module xa_map.o { - - NAME xa_map.o - SRC_PATH_NAME $(PRJ_DIR)/../../xa/xa_map.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/BerkeleyDB/component.wpj b/bdb/build_vxworks/BerkeleyDB/component.wpj deleted file mode 100755 index 3207bb293e8..00000000000 --- a/bdb/build_vxworks/BerkeleyDB/component.wpj +++ /dev/null @@ -1,6764 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.0 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_objects -bt_compare.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_objects -bt_conv.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_objects -bt_curadj.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_objects -bt_cursor.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_objects -bt_delete.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_method.c_objects -bt_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_open.c_objects -bt_open.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_put.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_put.c_objects -bt_put.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_put.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_objects -bt_rec.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_objects -bt_reclaim.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_objects -bt_recno.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_objects -bt_rsearch.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_search.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_search.c_objects -bt_search.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_search.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_split.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_split.c_objects -bt_split.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_split.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_objects -bt_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_objects -bt_upgrade.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_objects -bt_verify.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_objects -btree_auto.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/getopt.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/getopt.c_objects -getopt.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/getopt.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/snprintf.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/snprintf.c_objects -snprintf.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/snprintf.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_objects -strcasecmp.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/strdup.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/strdup.c_objects -strdup.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/strdup.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_objects -vsnprintf.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_objects -db_byteorder.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_err.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_err.c_objects -db_err.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_err.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_getlong.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_getlong.c_objects -db_getlong.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_getlong.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_idspace.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_idspace.c_objects -db_idspace.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_idspace.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_log2.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_log2.c_objects -db_log2.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/db_log2.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_arg.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_arg.c_objects -util_arg.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_arg.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_cache.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_cache.c_objects -util_cache.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_cache.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_log.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_log.c_objects -util_log.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_log.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_sig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_sig.c_objects -util_sig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../common/util_sig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_objects -crdel_auto.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_objects -crdel_rec.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db.c_objects -db.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_am.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_am.c_objects -db_am.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_am.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_auto.c_objects -db_auto.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_cam.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_cam.c_objects -db_cam.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_cam.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_conv.c_objects -db_conv.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_conv.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_objects -db_dispatch.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_dup.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_dup.c_objects -db_dup.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_dup.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_iface.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_iface.c_objects -db_iface.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_iface.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_join.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_join.c_objects -db_join.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_join.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_meta.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_meta.c_objects -db_meta.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_meta.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_method.c_objects -db_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_open.c_objects -db_open.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_overflow.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_overflow.c_objects -db_overflow.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_overflow.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_pr.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_pr.c_objects -db_pr.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_pr.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_rec.c_objects -db_rec.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_objects -db_reclaim.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_remove.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_remove.c_objects -db_remove.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_remove.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_rename.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_rename.c_objects -db_rename.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_rename.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_ret.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_ret.c_objects -db_ret.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_ret.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_truncate.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_truncate.c_objects -db_truncate.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_truncate.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg.c_objects -db_upg.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_objects -db_upg_opd.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_objects -db_vrfy.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_objects -db_vrfyutil.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_objects -dbreg.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_objects -dbreg_auto.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_objects -dbreg_rec.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_objects -dbreg_util.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/db_salloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/db_salloc.c_objects -db_salloc.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/db_salloc.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/db_shash.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/db_shash.c_objects -db_shash.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/db_shash.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_file.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_file.c_objects -env_file.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_file.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_method.c_objects -env_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_open.c_objects -env_open.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_recover.c_objects -env_recover.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_recover.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_region.c_objects -env_region.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../env/env_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_objects -fileops_auto.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_objects -fop_basic.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_objects -fop_rec.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_objects -fop_util.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash.c_objects -hash.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_objects -hash_auto.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_objects -hash_conv.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_objects -hash_dup.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_func.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_func.c_objects -hash_func.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_func.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_objects -hash_meta.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_method.c_objects -hash_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_open.c_objects -hash_open.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_page.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_page.c_objects -hash_page.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_page.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_objects -hash_rec.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_objects -hash_reclaim.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_objects -hash_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_objects -hash_upgrade.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_objects -hash_verify.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hmac/hmac.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hmac/hmac.c_objects -hmac.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hmac/hmac.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hmac/sha1.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hmac/sha1.c_objects -sha1.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hmac/sha1.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_objects -hsearch.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock.c_objects -lock.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_objects -lock_deadlock.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_method.c_objects -lock_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_region.c_objects -lock_region.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_objects -lock_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_util.c_objects -lock_util.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log.c_objects -log.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_archive.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_archive.c_objects -log_archive.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_archive.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_compare.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_compare.c_objects -log_compare.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_compare.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_get.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_get.c_objects -log_get.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_get.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_method.c_objects -log_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_put.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_put.c_objects -log_put.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../log/log_put.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_objects -mp_alloc.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_objects -mp_bh.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_objects -mp_fget.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_objects -mp_fopen.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_objects -mp_fput.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_objects -mp_fset.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_method.c_objects -mp_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_region.c_objects -mp_region.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_register.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_register.c_objects -mp_register.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_register.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_objects -mp_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_objects -mp_sync.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_objects -mp_trickle.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_objects -mut_tas.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mutex/mutex.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mutex/mutex.c_objects -mutex.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../mutex/mutex.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_alloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_alloc.c_objects -os_alloc.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_alloc.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_clock.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_clock.c_objects -os_clock.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_clock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_dir.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_dir.c_objects -os_dir.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_dir.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_errno.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_errno.c_objects -os_errno.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_errno.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_fid.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_fid.c_objects -os_fid.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_fid.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_fsync.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_fsync.c_objects -os_fsync.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_fsync.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_handle.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_handle.c_objects -os_handle.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_handle.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_id.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_id.c_objects -os_id.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_id.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_method.c_objects -os_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_oflags.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_oflags.c_objects -os_oflags.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_oflags.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_open.c_objects -os_open.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_region.c_objects -os_region.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rename.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rename.c_objects -os_rename.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rename.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_root.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_root.c_objects -os_root.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_root.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rpath.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rpath.c_objects -os_rpath.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rpath.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rw.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rw.c_objects -os_rw.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_rw.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_seek.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_seek.c_objects -os_seek.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_seek.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_sleep.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_sleep.c_objects -os_sleep.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_sleep.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_spin.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_spin.c_objects -os_spin.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_spin.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_stat.c_objects -os_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_objects -os_tmpdir.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_unlink.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_unlink.c_objects -os_unlink.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os/os_unlink.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_objects -os_vx_abs.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_objects -os_vx_config.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_objects -os_vx_map.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam.c_objects -qam.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_objects -qam_auto.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_objects -qam_conv.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_files.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_files.c_objects -qam_files.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_files.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_method.c_objects -qam_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_open.c_objects -qam_open.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_objects -qam_rec.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_objects -qam_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_objects -qam_upgrade.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_objects -qam_verify.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_method.c_objects -rep_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_record.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_record.c_objects -rep_record.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_record.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_region.c_objects -rep_region.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_util.c_objects -rep_util.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/client.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/client.c_objects -client.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/client.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_objects -db_server_clnt.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_objects -gen_client.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_objects -gen_client_ret.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_objects -db_server_xdr.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn.c_objects -txn.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_objects -txn_auto.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_method.c_objects -txn_method.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_objects -txn_rec.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_objects -txn_recover.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_region.c_objects -txn_region.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_objects -txn_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_util.c_objects -txn_util.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa.c_objects -xa.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_db.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_db.c_objects -xa_db.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_db.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_map.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_map.c_objects -xa_map.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_map.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -DDEBUG \ - -DDIAGNOSTIC - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_objects -bt_compare.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_objects -bt_conv.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_objects -bt_curadj.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_objects -bt_cursor.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_objects -bt_delete.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_method.c_objects -bt_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_open.c_objects -bt_open.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_put.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_put.c_objects -bt_put.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_put.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_objects -bt_rec.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_objects -bt_reclaim.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_objects -bt_recno.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_objects -bt_rsearch.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_search.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_search.c_objects -bt_search.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_search.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_split.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_split.c_objects -bt_split.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_split.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_objects -bt_stat.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_objects -bt_upgrade.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_objects -bt_verify.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_objects -btree_auto.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/getopt.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/getopt.c_objects -getopt.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/getopt.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/snprintf.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/snprintf.c_objects -snprintf.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/snprintf.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_objects -strcasecmp.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/strdup.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/strdup.c_objects -strdup.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/strdup.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_objects -vsnprintf.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_objects -db_byteorder.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_err.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_err.c_objects -db_err.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_err.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_getlong.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_getlong.c_objects -db_getlong.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_getlong.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_idspace.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_idspace.c_objects -db_idspace.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_idspace.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_log2.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_log2.c_objects -db_log2.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/db_log2.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_arg.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_arg.c_objects -util_arg.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_arg.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_cache.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_cache.c_objects -util_cache.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_cache.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_log.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_log.c_objects -util_log.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_log.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_sig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_sig.c_objects -util_sig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../common/util_sig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_objects -crdel_auto.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_objects -crdel_rec.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db.c_objects -db.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_am.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_am.c_objects -db_am.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_am.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_auto.c_objects -db_auto.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_cam.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_cam.c_objects -db_cam.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_cam.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_conv.c_objects -db_conv.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_conv.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_objects -db_dispatch.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_dup.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_dup.c_objects -db_dup.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_dup.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_iface.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_iface.c_objects -db_iface.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_iface.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_join.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_join.c_objects -db_join.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_join.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_meta.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_meta.c_objects -db_meta.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_meta.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_method.c_objects -db_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_open.c_objects -db_open.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_overflow.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_overflow.c_objects -db_overflow.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_overflow.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_pr.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_pr.c_objects -db_pr.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_pr.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_rec.c_objects -db_rec.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_objects -db_reclaim.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_remove.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_remove.c_objects -db_remove.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_remove.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_rename.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_rename.c_objects -db_rename.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_rename.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_ret.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_ret.c_objects -db_ret.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_ret.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_truncate.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_truncate.c_objects -db_truncate.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_truncate.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_upg.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_upg.c_objects -db_upg.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_upg.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_objects -db_upg_opd.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_objects -db_vrfy.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_objects -db_vrfyutil.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_objects -dbreg.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_objects -dbreg_auto.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_objects -dbreg_rec.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_objects -dbreg_util.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/db_salloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/db_salloc.c_objects -db_salloc.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/db_salloc.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/db_shash.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/db_shash.c_objects -db_shash.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/db_shash.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_file.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_file.c_objects -env_file.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_file.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_method.c_objects -env_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_open.c_objects -env_open.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_recover.c_objects -env_recover.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_recover.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_region.c_objects -env_region.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../env/env_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_objects -fileops_auto.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_objects -fop_basic.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_objects -fop_rec.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_objects -fop_util.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash.c_objects -hash.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_objects -hash_auto.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_objects -hash_conv.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_objects -hash_dup.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_func.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_func.c_objects -hash_func.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_func.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_objects -hash_meta.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_method.c_objects -hash_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_open.c_objects -hash_open.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_page.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_page.c_objects -hash_page.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_page.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_objects -hash_rec.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_objects -hash_reclaim.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_objects -hash_stat.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_objects -hash_upgrade.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_objects -hash_verify.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hmac/hmac.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hmac/hmac.c_objects -hmac.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hmac/hmac.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hmac/sha1.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hmac/sha1.c_objects -sha1.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hmac/sha1.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_objects -hsearch.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock.c_objects -lock.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_objects -lock_deadlock.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_method.c_objects -lock_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_region.c_objects -lock_region.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_objects -lock_stat.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_util.c_objects -lock_util.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../lock/lock_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log.c_objects -log.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_archive.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_archive.c_objects -log_archive.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_archive.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_compare.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_compare.c_objects -log_compare.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_compare.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_get.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_get.c_objects -log_get.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_get.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_method.c_objects -log_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_put.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_put.c_objects -log_put.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../log/log_put.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_objects -mp_alloc.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_objects -mp_bh.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_objects -mp_fget.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_objects -mp_fopen.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_objects -mp_fput.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_objects -mp_fset.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_method.c_objects -mp_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_region.c_objects -mp_region.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_register.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_register.c_objects -mp_register.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_register.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_objects -mp_stat.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_objects -mp_sync.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_objects -mp_trickle.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_objects -mut_tas.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mutex/mutex.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mutex/mutex.c_objects -mutex.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../mutex/mutex.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_alloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_alloc.c_objects -os_alloc.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_alloc.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_clock.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_clock.c_objects -os_clock.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_clock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_dir.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_dir.c_objects -os_dir.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_dir.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_errno.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_errno.c_objects -os_errno.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_errno.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_fid.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_fid.c_objects -os_fid.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_fid.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_fsync.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_fsync.c_objects -os_fsync.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_fsync.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_handle.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_handle.c_objects -os_handle.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_handle.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_id.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_id.c_objects -os_id.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_id.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_method.c_objects -os_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_oflags.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_oflags.c_objects -os_oflags.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_oflags.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_open.c_objects -os_open.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_region.c_objects -os_region.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rename.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rename.c_objects -os_rename.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rename.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_root.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_root.c_objects -os_root.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_root.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rpath.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rpath.c_objects -os_rpath.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rpath.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rw.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rw.c_objects -os_rw.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_rw.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_seek.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_seek.c_objects -os_seek.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_seek.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_sleep.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_sleep.c_objects -os_sleep.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_sleep.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_spin.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_spin.c_objects -os_spin.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_spin.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_stat.c_objects -os_stat.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_objects -os_tmpdir.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_unlink.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_unlink.c_objects -os_unlink.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os/os_unlink.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_objects -os_vx_abs.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_objects -os_vx_config.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_objects -os_vx_map.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam.c_objects -qam.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_objects -qam_auto.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_objects -qam_conv.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_files.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_files.c_objects -qam_files.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_files.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_method.c_objects -qam_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_open.c_objects -qam_open.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_open.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_objects -qam_rec.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_objects -qam_stat.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_objects -qam_upgrade.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_objects -qam_verify.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_method.c_objects -rep_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_record.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_record.c_objects -rep_record.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_record.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_region.c_objects -rep_region.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_util.c_objects -rep_util.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rep/rep_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/client.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/client.c_objects -client.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/client.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_objects -db_server_clnt.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_objects -gen_client.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_objects -gen_client_ret.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_objects -db_server_xdr.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn.c_objects -txn.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_objects -txn_auto.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_method.c_objects -txn_method.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_method.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_objects -txn_rec.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_objects -txn_recover.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_region.c_objects -txn_region.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_region.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_objects -txn_stat.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_util.c_objects -txn_util.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../txn/txn_util.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa.c_objects -xa.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa_db.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa_db.c_objects -xa_db.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa_db.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa_map.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa_map.c_objects -xa_map.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../../xa/xa_map.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_objects -bt_compare.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_compare.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_objects -bt_conv.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_conv.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_objects -bt_curadj.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_curadj.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_objects -bt_cursor.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_cursor.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_objects -bt_delete.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_delete.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_method.c_objects -bt_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_open.c_objects -bt_open.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_open.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_put.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_put.c_objects -bt_put.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_put.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_objects -bt_rec.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rec.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_objects -bt_reclaim.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_reclaim.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_objects -bt_recno.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_recno.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_objects -bt_rsearch.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_rsearch.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_search.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_search.c_objects -bt_search.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_search.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_split.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_split.c_objects -bt_split.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_split.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_objects -bt_stat.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_stat.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_objects -bt_upgrade.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_upgrade.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_objects -bt_verify.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/bt_verify.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_objects -btree_auto.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../btree/btree_auto.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/getopt.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/getopt.c_objects -getopt.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/getopt.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/snprintf.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/snprintf.c_objects -snprintf.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/snprintf.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_objects -strcasecmp.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/strcasecmp.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/strdup.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/strdup.c_objects -strdup.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/strdup.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_objects -vsnprintf.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../clib/vsnprintf.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_objects -db_byteorder.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_byteorder.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_err.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_err.c_objects -db_err.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_err.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_getlong.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_getlong.c_objects -db_getlong.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_getlong.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_idspace.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_idspace.c_objects -db_idspace.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_idspace.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_log2.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_log2.c_objects -db_log2.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/db_log2.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_arg.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_arg.c_objects -util_arg.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_arg.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_cache.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_cache.c_objects -util_cache.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_cache.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_log.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_log.c_objects -util_log.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_log.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_sig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_sig.c_objects -util_sig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../common/util_sig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_objects -crdel_auto.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_auto.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_objects -crdel_rec.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/crdel_rec.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db.c_objects -db.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_am.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_am.c_objects -db_am.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_am.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_auto.c_objects -db_auto.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_auto.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_cam.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_cam.c_objects -db_cam.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_cam.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_conv.c_objects -db_conv.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_conv.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_objects -db_dispatch.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_dispatch.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_dup.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_dup.c_objects -db_dup.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_dup.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_iface.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_iface.c_objects -db_iface.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_iface.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_join.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_join.c_objects -db_join.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_join.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_meta.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_meta.c_objects -db_meta.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_meta.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_method.c_objects -db_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_open.c_objects -db_open.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_open.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_overflow.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_overflow.c_objects -db_overflow.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_overflow.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_pr.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_pr.c_objects -db_pr.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_pr.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_rec.c_objects -db_rec.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_rec.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_objects -db_reclaim.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_reclaim.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_remove.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_remove.c_objects -db_remove.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_remove.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_rename.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_rename.c_objects -db_rename.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_rename.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_ret.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_ret.c_objects -db_ret.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_ret.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_truncate.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_truncate.c_objects -db_truncate.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_truncate.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg.c_objects -db_upg.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_objects -db_upg_opd.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_upg_opd.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_objects -db_vrfy.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfy.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_objects -db_vrfyutil.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../db/db_vrfyutil.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_objects -dbreg.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_objects -dbreg_auto.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_auto.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_objects -dbreg_rec.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_rec.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_objects -dbreg_util.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../dbreg/dbreg_util.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/db_salloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/db_salloc.c_objects -db_salloc.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/db_salloc.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/db_shash.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/db_shash.c_objects -db_shash.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/db_shash.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_file.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_file.c_objects -env_file.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_file.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_method.c_objects -env_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_open.c_objects -env_open.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_open.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_recover.c_objects -env_recover.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_recover.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_region.c_objects -env_region.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../env/env_region.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_objects -fileops_auto.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fileops_auto.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_objects -fop_basic.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_basic.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_objects -fop_rec.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_rec.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_objects -fop_util.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../fileops/fop_util.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash.c_objects -hash.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_objects -hash_auto.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_auto.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_objects -hash_conv.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_conv.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_objects -hash_dup.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_dup.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_func.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_func.c_objects -hash_func.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_func.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_objects -hash_meta.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_meta.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_method.c_objects -hash_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_open.c_objects -hash_open.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_open.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_page.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_page.c_objects -hash_page.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_page.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_objects -hash_rec.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_rec.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_objects -hash_reclaim.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_reclaim.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_objects -hash_stat.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_stat.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_objects -hash_upgrade.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_upgrade.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_objects -hash_verify.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hash/hash_verify.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hmac/hmac.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hmac/hmac.c_objects -hmac.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hmac/hmac.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hmac/sha1.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hmac/sha1.c_objects -sha1.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hmac/sha1.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_objects -hsearch.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../hsearch/hsearch.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock.c_objects -lock.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_objects -lock_deadlock.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_deadlock.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_method.c_objects -lock_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_region.c_objects -lock_region.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_region.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_objects -lock_stat.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_stat.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_util.c_objects -lock_util.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../lock/lock_util.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log.c_objects -log.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_archive.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_archive.c_objects -log_archive.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_archive.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_compare.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_compare.c_objects -log_compare.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_compare.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_get.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_get.c_objects -log_get.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_get.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_method.c_objects -log_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_put.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_put.c_objects -log_put.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../log/log_put.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_objects -mp_alloc.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_alloc.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_objects -mp_bh.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_bh.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_objects -mp_fget.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fget.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_objects -mp_fopen.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fopen.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_objects -mp_fput.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fput.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_objects -mp_fset.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_fset.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_method.c_objects -mp_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_region.c_objects -mp_region.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_region.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_register.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_register.c_objects -mp_register.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_register.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_objects -mp_stat.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_stat.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_objects -mp_sync.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_sync.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_objects -mp_trickle.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mp/mp_trickle.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_objects -mut_tas.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mutex/mut_tas.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mutex/mutex.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mutex/mutex.c_objects -mutex.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../mutex/mutex.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_alloc.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_alloc.c_objects -os_alloc.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_alloc.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_clock.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_clock.c_objects -os_clock.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_clock.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_dir.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_dir.c_objects -os_dir.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_dir.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_errno.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_errno.c_objects -os_errno.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_errno.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_fid.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_fid.c_objects -os_fid.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_fid.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_fsync.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_fsync.c_objects -os_fsync.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_fsync.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_handle.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_handle.c_objects -os_handle.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_handle.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_id.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_id.c_objects -os_id.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_id.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_method.c_objects -os_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_oflags.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_oflags.c_objects -os_oflags.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_oflags.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_open.c_objects -os_open.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_open.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_region.c_objects -os_region.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_region.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rename.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rename.c_objects -os_rename.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rename.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_root.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_root.c_objects -os_root.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_root.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rpath.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rpath.c_objects -os_rpath.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rpath.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rw.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rw.c_objects -os_rw.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_rw.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_seek.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_seek.c_objects -os_seek.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_seek.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_sleep.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_sleep.c_objects -os_sleep.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_sleep.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_spin.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_spin.c_objects -os_spin.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_spin.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_stat.c_objects -os_stat.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_stat.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_objects -os_tmpdir.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_tmpdir.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_unlink.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_unlink.c_objects -os_unlink.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os/os_unlink.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_objects -os_vx_abs.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_abs.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_objects -os_vx_config.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_config.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_objects -os_vx_map.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../os_vxworks/os_vx_map.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam.c_objects -qam.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_objects -qam_auto.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_auto.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_objects -qam_conv.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_conv.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_files.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_files.c_objects -qam_files.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_files.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_method.c_objects -qam_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_open.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_open.c_objects -qam_open.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_open.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_objects -qam_rec.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_rec.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_objects -qam_stat.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_stat.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_objects -qam_upgrade.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_upgrade.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_objects -qam_verify.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../qam/qam_verify.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_method.c_objects -rep_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_record.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_record.c_objects -rep_record.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_record.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_region.c_objects -rep_region.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_region.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_util.c_objects -rep_util.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rep/rep_util.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/client.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/client.c_objects -client.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/client.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_objects -db_server_clnt.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/db_server_clnt.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_objects -gen_client.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_objects -gen_client_ret.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_client/gen_client_ret.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_objects -db_server_xdr.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn.c_objects -txn.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_objects -txn_auto.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_auto.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_method.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_method.c_objects -txn_method.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_method.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_objects -txn_rec.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_rec.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_objects -txn_recover.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_recover.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_region.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_region.c_objects -txn_region.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_region.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_objects -txn_stat.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_stat.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_util.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_util.c_objects -txn_util.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../txn/txn_util.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa.c_objects -xa.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_db.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_db.c_objects -xa_db.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_db.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_map.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_map.c_objects -xa_map.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../../xa/xa_map.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -DDEBUG \ - -DDIAGNOSTIC - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUMgnu.debug PENTIUM2gnu.debug PENTIUM2gnu.release - - - COMPONENT_COM_TYPE - - - - PROJECT_FILES -$(PRJ_DIR)/../../btree/bt_compare.c \ - $(PRJ_DIR)/../../btree/bt_conv.c \ - $(PRJ_DIR)/../../btree/bt_curadj.c \ - $(PRJ_DIR)/../../btree/bt_cursor.c \ - $(PRJ_DIR)/../../btree/bt_delete.c \ - $(PRJ_DIR)/../../btree/bt_method.c \ - $(PRJ_DIR)/../../btree/bt_open.c \ - $(PRJ_DIR)/../../btree/bt_put.c \ - $(PRJ_DIR)/../../btree/bt_rec.c \ - $(PRJ_DIR)/../../btree/bt_reclaim.c \ - $(PRJ_DIR)/../../btree/bt_recno.c \ - $(PRJ_DIR)/../../btree/bt_rsearch.c \ - $(PRJ_DIR)/../../btree/bt_search.c \ - $(PRJ_DIR)/../../btree/bt_split.c \ - $(PRJ_DIR)/../../btree/bt_stat.c \ - $(PRJ_DIR)/../../btree/bt_upgrade.c \ - $(PRJ_DIR)/../../btree/bt_verify.c \ - $(PRJ_DIR)/../../btree/btree_auto.c \ - $(PRJ_DIR)/../../clib/getopt.c \ - $(PRJ_DIR)/../../clib/snprintf.c \ - $(PRJ_DIR)/../../clib/strcasecmp.c \ - $(PRJ_DIR)/../../clib/strdup.c \ - $(PRJ_DIR)/../../clib/vsnprintf.c \ - $(PRJ_DIR)/../../common/db_byteorder.c \ - $(PRJ_DIR)/../../common/db_err.c \ - $(PRJ_DIR)/../../common/db_getlong.c \ - $(PRJ_DIR)/../../common/db_idspace.c \ - $(PRJ_DIR)/../../common/db_log2.c \ - $(PRJ_DIR)/../../common/util_arg.c \ - $(PRJ_DIR)/../../common/util_cache.c \ - $(PRJ_DIR)/../../common/util_log.c \ - $(PRJ_DIR)/../../common/util_sig.c \ - $(PRJ_DIR)/../../db/crdel_auto.c \ - $(PRJ_DIR)/../../db/crdel_rec.c \ - $(PRJ_DIR)/../../db/db.c \ - $(PRJ_DIR)/../../db/db_am.c \ - $(PRJ_DIR)/../../db/db_auto.c \ - $(PRJ_DIR)/../../db/db_cam.c \ - $(PRJ_DIR)/../../db/db_conv.c \ - $(PRJ_DIR)/../../db/db_dispatch.c \ - $(PRJ_DIR)/../../db/db_dup.c \ - $(PRJ_DIR)/../../db/db_iface.c \ - $(PRJ_DIR)/../../db/db_join.c \ - $(PRJ_DIR)/../../db/db_meta.c \ - $(PRJ_DIR)/../../db/db_method.c \ - $(PRJ_DIR)/../../db/db_open.c \ - $(PRJ_DIR)/../../db/db_overflow.c \ - $(PRJ_DIR)/../../db/db_pr.c \ - $(PRJ_DIR)/../../db/db_rec.c \ - $(PRJ_DIR)/../../db/db_reclaim.c \ - $(PRJ_DIR)/../../db/db_remove.c \ - $(PRJ_DIR)/../../db/db_rename.c \ - $(PRJ_DIR)/../../db/db_ret.c \ - $(PRJ_DIR)/../../db/db_truncate.c \ - $(PRJ_DIR)/../../db/db_upg.c \ - $(PRJ_DIR)/../../db/db_upg_opd.c \ - $(PRJ_DIR)/../../db/db_vrfy.c \ - $(PRJ_DIR)/../../db/db_vrfyutil.c \ - $(PRJ_DIR)/../../dbreg/dbreg.c \ - $(PRJ_DIR)/../../dbreg/dbreg_auto.c \ - $(PRJ_DIR)/../../dbreg/dbreg_rec.c \ - $(PRJ_DIR)/../../dbreg/dbreg_util.c \ - $(PRJ_DIR)/../../env/db_salloc.c \ - $(PRJ_DIR)/../../env/db_shash.c \ - $(PRJ_DIR)/../../env/env_file.c \ - $(PRJ_DIR)/../../env/env_method.c \ - $(PRJ_DIR)/../../env/env_open.c \ - $(PRJ_DIR)/../../env/env_recover.c \ - $(PRJ_DIR)/../../env/env_region.c \ - $(PRJ_DIR)/../../fileops/fileops_auto.c \ - $(PRJ_DIR)/../../fileops/fop_basic.c \ - $(PRJ_DIR)/../../fileops/fop_rec.c \ - $(PRJ_DIR)/../../fileops/fop_util.c \ - $(PRJ_DIR)/../../hash/hash.c \ - $(PRJ_DIR)/../../hash/hash_auto.c \ - $(PRJ_DIR)/../../hash/hash_conv.c \ - $(PRJ_DIR)/../../hash/hash_dup.c \ - $(PRJ_DIR)/../../hash/hash_func.c \ - $(PRJ_DIR)/../../hash/hash_meta.c \ - $(PRJ_DIR)/../../hash/hash_method.c \ - $(PRJ_DIR)/../../hash/hash_open.c \ - $(PRJ_DIR)/../../hash/hash_page.c \ - $(PRJ_DIR)/../../hash/hash_rec.c \ - $(PRJ_DIR)/../../hash/hash_reclaim.c \ - $(PRJ_DIR)/../../hash/hash_stat.c \ - $(PRJ_DIR)/../../hash/hash_upgrade.c \ - $(PRJ_DIR)/../../hash/hash_verify.c \ - $(PRJ_DIR)/../../hmac/hmac.c \ - $(PRJ_DIR)/../../hmac/sha1.c \ - $(PRJ_DIR)/../../hsearch/hsearch.c \ - $(PRJ_DIR)/../../lock/lock.c \ - $(PRJ_DIR)/../../lock/lock_deadlock.c \ - $(PRJ_DIR)/../../lock/lock_method.c \ - $(PRJ_DIR)/../../lock/lock_region.c \ - $(PRJ_DIR)/../../lock/lock_stat.c \ - $(PRJ_DIR)/../../lock/lock_util.c \ - $(PRJ_DIR)/../../log/log.c \ - $(PRJ_DIR)/../../log/log_archive.c \ - $(PRJ_DIR)/../../log/log_compare.c \ - $(PRJ_DIR)/../../log/log_get.c \ - $(PRJ_DIR)/../../log/log_method.c \ - $(PRJ_DIR)/../../log/log_put.c \ - $(PRJ_DIR)/../../mp/mp_alloc.c \ - $(PRJ_DIR)/../../mp/mp_bh.c \ - $(PRJ_DIR)/../../mp/mp_fget.c \ - $(PRJ_DIR)/../../mp/mp_fopen.c \ - $(PRJ_DIR)/../../mp/mp_fput.c \ - $(PRJ_DIR)/../../mp/mp_fset.c \ - $(PRJ_DIR)/../../mp/mp_method.c \ - $(PRJ_DIR)/../../mp/mp_region.c \ - $(PRJ_DIR)/../../mp/mp_register.c \ - $(PRJ_DIR)/../../mp/mp_stat.c \ - $(PRJ_DIR)/../../mp/mp_sync.c \ - $(PRJ_DIR)/../../mp/mp_trickle.c \ - $(PRJ_DIR)/../../mutex/mut_tas.c \ - $(PRJ_DIR)/../../mutex/mutex.c \ - $(PRJ_DIR)/../../os/os_alloc.c \ - $(PRJ_DIR)/../../os/os_clock.c \ - $(PRJ_DIR)/../../os/os_dir.c \ - $(PRJ_DIR)/../../os/os_errno.c \ - $(PRJ_DIR)/../../os/os_fid.c \ - $(PRJ_DIR)/../../os/os_fsync.c \ - $(PRJ_DIR)/../../os/os_handle.c \ - $(PRJ_DIR)/../../os/os_id.c \ - $(PRJ_DIR)/../../os/os_method.c \ - $(PRJ_DIR)/../../os/os_oflags.c \ - $(PRJ_DIR)/../../os/os_open.c \ - $(PRJ_DIR)/../../os/os_region.c \ - $(PRJ_DIR)/../../os/os_rename.c \ - $(PRJ_DIR)/../../os/os_root.c \ - $(PRJ_DIR)/../../os/os_rpath.c \ - $(PRJ_DIR)/../../os/os_rw.c \ - $(PRJ_DIR)/../../os/os_seek.c \ - $(PRJ_DIR)/../../os/os_sleep.c \ - $(PRJ_DIR)/../../os/os_spin.c \ - $(PRJ_DIR)/../../os/os_stat.c \ - $(PRJ_DIR)/../../os/os_tmpdir.c \ - $(PRJ_DIR)/../../os/os_unlink.c \ - $(PRJ_DIR)/../../os_vxworks/os_vx_abs.c \ - $(PRJ_DIR)/../../os_vxworks/os_vx_config.c \ - $(PRJ_DIR)/../../os_vxworks/os_vx_map.c \ - $(PRJ_DIR)/../../qam/qam.c \ - $(PRJ_DIR)/../../qam/qam_auto.c \ - $(PRJ_DIR)/../../qam/qam_conv.c \ - $(PRJ_DIR)/../../qam/qam_files.c \ - $(PRJ_DIR)/../../qam/qam_method.c \ - $(PRJ_DIR)/../../qam/qam_open.c \ - $(PRJ_DIR)/../../qam/qam_rec.c \ - $(PRJ_DIR)/../../qam/qam_stat.c \ - $(PRJ_DIR)/../../qam/qam_upgrade.c \ - $(PRJ_DIR)/../../qam/qam_verify.c \ - $(PRJ_DIR)/../../rep/rep_method.c \ - $(PRJ_DIR)/../../rep/rep_record.c \ - $(PRJ_DIR)/../../rep/rep_region.c \ - $(PRJ_DIR)/../../rep/rep_util.c \ - $(PRJ_DIR)/../../rpc_client/client.c \ - $(PRJ_DIR)/../../rpc_client/db_server_clnt.c \ - $(PRJ_DIR)/../../rpc_client/gen_client.c \ - $(PRJ_DIR)/../../rpc_client/gen_client_ret.c \ - $(PRJ_DIR)/../../rpc_server/c/db_server_xdr.c \ - $(PRJ_DIR)/../../txn/txn.c \ - $(PRJ_DIR)/../../txn/txn_auto.c \ - $(PRJ_DIR)/../../txn/txn_method.c \ - $(PRJ_DIR)/../../txn/txn_rec.c \ - $(PRJ_DIR)/../../txn/txn_recover.c \ - $(PRJ_DIR)/../../txn/txn_region.c \ - $(PRJ_DIR)/../../txn/txn_stat.c \ - $(PRJ_DIR)/../../txn/txn_util.c \ - $(PRJ_DIR)/../../xa/xa.c \ - $(PRJ_DIR)/../../xa/xa_db.c \ - $(PRJ_DIR)/../../xa/xa_map.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUMgnu.debug - - - WCC__LIST -PENTIUMgnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_archive/db_archive.c b/bdb/build_vxworks/db_archive/db_archive.c deleted file mode 100644 index 5e43f32cd8e..00000000000 --- a/bdb/build_vxworks/db_archive/db_archive.c +++ /dev/null @@ -1,195 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_archive.c,v 11.36 2002/03/28 20:13:34 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include -#include -#include -#endif - -#include "db_int.h" - -int db_archive_main __P((int, char *[])); -int db_archive_usage __P((void)); -int db_archive_version_check __P((const char *)); - -int -db_archive(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_archive", args, &argc, &argv); - return (db_archive_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_archive_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - const char *progname = "db_archive"; - DB_ENV *dbenv; - u_int32_t flags; - int ch, e_close, exitval, ret, verbose; - char **file, *home, **list, *passwd; - - if ((ret = db_archive_version_check(progname)) != 0) - return (ret); - - flags = 0; - e_close = exitval = verbose = 0; - home = passwd = NULL; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "ah:lP:sVv")) != EOF) - switch (ch) { - case 'a': - LF_SET(DB_ARCH_ABS); - break; - case 'h': - home = optarg; - break; - case 'l': - LF_SET(DB_ARCH_LOG); - break; - case 'P': - passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - progname, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 's': - LF_SET(DB_ARCH_DATA); - break; - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case 'v': - verbose = 1; - break; - case '?': - default: - return (db_archive_usage()); - } - argc -= optind; - argv += optind; - - if (argc != 0) - return (db_archive_usage()); - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* - * Create an environment object and initialize it for error - * reporting. - */ - if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", progname, db_strerror(ret)); - goto shutdown; - } - e_close = 1; - - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - - if (verbose) - (void)dbenv->set_verbose(dbenv, DB_VERB_CHKPOINT, 1); - - if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv, - passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - goto shutdown; - } - /* - * If attaching to a pre-existing environment fails, create a - * private one and try again. - */ - if ((ret = dbenv->open(dbenv, - home, DB_JOINENV | DB_USE_ENVIRON, 0)) != 0 && - (ret = dbenv->open(dbenv, home, DB_CREATE | - DB_INIT_LOG | DB_INIT_TXN | DB_PRIVATE | DB_USE_ENVIRON, 0)) != 0) { - dbenv->err(dbenv, ret, "open"); - goto shutdown; - } - - /* Get the list of names. */ - if ((ret = dbenv->log_archive(dbenv, &list, flags)) != 0) { - dbenv->err(dbenv, ret, "DB_ENV->log_archive"); - goto shutdown; - } - - /* Print the list of names. */ - if (list != NULL) { - for (file = list; *file != NULL; ++file) - printf("%s\n", *file); - free(list); - } - - if (0) { -shutdown: exitval = 1; - } - if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -int -db_archive_usage() -{ - (void)fprintf(stderr, - "usage: db_archive [-alsVv] [-h home] [-P password]\n"); - return (EXIT_FAILURE); -} - -int -db_archive_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} diff --git a/bdb/build_vxworks/db_archive/db_archive.wpj b/bdb/build_vxworks/db_archive/db_archive.wpj deleted file mode 100755 index 06091bb6b5f..00000000000 --- a/bdb/build_vxworks/db_archive/db_archive.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_archive.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_archive.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_archive.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_archive.c_dependDone -FALSE - - - FILE_db_archive.c_dependencies - - - - FILE_db_archive.c_objects -db_archive.o - - - FILE_db_archive.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_archive.c - - - userComments -db_archive - diff --git a/bdb/build_vxworks/db_archive/db_archive/Makefile.custom b/bdb/build_vxworks/db_archive/db_archive/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_archive/db_archive/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_archive/db_archive/component.cdf b/bdb/build_vxworks/db_archive/db_archive/component.cdf deleted file mode 100755 index cf88762cbc5..00000000000 --- a/bdb/build_vxworks/db_archive/db_archive/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_ARCHIVE { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_archive.o - NAME db_archive - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_archive.o { - - NAME db_archive.o - SRC_PATH_NAME $PRJ_DIR/../db_archive.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_archive/db_archive/component.wpj b/bdb/build_vxworks/db_archive/db_archive/component.wpj deleted file mode 100755 index e50d91592e6..00000000000 --- a/bdb/build_vxworks/db_archive/db_archive/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_objects -db_archive.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_objects -db_archive.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_archive.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_archive.c_objects -db_archive.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_archive.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_objects -db_archive.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_archive.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_checkpoint/db_checkpoint.c b/bdb/build_vxworks/db_checkpoint/db_checkpoint.c deleted file mode 100644 index 1e5a45a6fe5..00000000000 --- a/bdb/build_vxworks/db_checkpoint/db_checkpoint.c +++ /dev/null @@ -1,258 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_checkpoint.c,v 11.46 2002/08/08 03:50:31 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#if TIME_WITH_SYS_TIME -#include -#include -#else -#if HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - -#include -#include -#include -#include -#include -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/db_am.h" - -int db_checkpoint_main __P((int, char *[])); -int db_checkpoint_usage __P((void)); -int db_checkpoint_version_check __P((const char *)); - -int -db_checkpoint(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_checkpoint", args, &argc, &argv); - return (db_checkpoint_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_checkpoint_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - DB_ENV *dbenv; - const char *progname = "db_checkpoint"; - time_t now; - long argval; - u_int32_t flags, kbytes, minutes, seconds; - int ch, e_close, exitval, once, ret, verbose; - char *home, *logfile, *passwd; - - if ((ret = db_checkpoint_version_check(progname)) != 0) - return (ret); - - /* - * !!! - * Don't allow a fully unsigned 32-bit number, some compilers get - * upset and require it to be specified in hexadecimal and so on. - */ -#define MAX_UINT32_T 2147483647 - - kbytes = minutes = 0; - e_close = exitval = once = verbose = 0; - flags = 0; - home = logfile = passwd = NULL; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "1h:k:L:P:p:Vv")) != EOF) - switch (ch) { - case '1': - once = 1; - flags = DB_FORCE; - break; - case 'h': - home = optarg; - break; - case 'k': - if (__db_getlong(NULL, progname, - optarg, 1, (long)MAX_UINT32_T, &argval)) - return (EXIT_FAILURE); - kbytes = argval; - break; - case 'L': - logfile = optarg; - break; - case 'P': - passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - progname, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 'p': - if (__db_getlong(NULL, progname, - optarg, 1, (long)MAX_UINT32_T, &argval)) - return (EXIT_FAILURE); - minutes = argval; - break; - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case 'v': - verbose = 1; - break; - case '?': - default: - return (db_checkpoint_usage()); - } - argc -= optind; - argv += optind; - - if (argc != 0) - return (db_checkpoint_usage()); - - if (once == 0 && kbytes == 0 && minutes == 0) { - (void)fprintf(stderr, - "%s: at least one of -1, -k and -p must be specified\n", - progname); - return (EXIT_FAILURE); - } - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* Log our process ID. */ - if (logfile != NULL && __db_util_logset(progname, logfile)) - goto shutdown; - - /* - * Create an environment object and initialize it for error - * reporting. - */ - if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", progname, db_strerror(ret)); - goto shutdown; - } - e_close = 1; - - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - - if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv, - passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - goto shutdown; - } - /* Initialize the environment. */ - if ((ret = dbenv->open(dbenv, - home, DB_JOINENV | DB_USE_ENVIRON, 0)) != 0) { - dbenv->err(dbenv, ret, "open"); - goto shutdown; - } - - /* Register the standard pgin/pgout functions, in case we do I/O. */ - if ((ret = dbenv->memp_register( - dbenv, DB_FTYPE_SET, __db_pgin, __db_pgout)) != 0) { - dbenv->err(dbenv, ret, - "DB_ENV->memp_register: failed to register access method functions"); - goto shutdown; - } - - /* - * If we have only a time delay, then we'll sleep the right amount - * to wake up when a checkpoint is necessary. If we have a "kbytes" - * field set, then we'll check every 30 seconds. - */ - seconds = kbytes != 0 ? 30 : minutes * 60; - while (!__db_util_interrupted()) { - if (verbose) { - (void)time(&now); - dbenv->errx(dbenv, "checkpoint: %s", ctime(&now)); - } - - if ((ret = dbenv->txn_checkpoint(dbenv, - kbytes, minutes, flags)) != 0) { - dbenv->err(dbenv, ret, "txn_checkpoint"); - goto shutdown; - } - - if (once) - break; - - (void)__os_sleep(dbenv, seconds, 0); - } - - if (0) { -shutdown: exitval = 1; - } - - /* Clean up the logfile. */ - if (logfile != NULL) - remove(logfile); - - /* Clean up the environment. */ - if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -int -db_checkpoint_usage() -{ - (void)fprintf(stderr, "%s\n\t%s\n", - "usage: db_checkpoint [-1Vv]", - "[-h home] [-k kbytes] [-L file] [-P password] [-p min]"); - return (EXIT_FAILURE); -} - -int -db_checkpoint_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} diff --git a/bdb/build_vxworks/db_checkpoint/db_checkpoint.wpj b/bdb/build_vxworks/db_checkpoint/db_checkpoint.wpj deleted file mode 100755 index cae4317821b..00000000000 --- a/bdb/build_vxworks/db_checkpoint/db_checkpoint.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_checkpoint.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_checkpoint.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_checkpoint.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_checkpoint.c_dependDone -FALSE - - - FILE_db_checkpoint.c_dependencies - - - - FILE_db_checkpoint.c_objects -db_checkpoint.o - - - FILE_db_checkpoint.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_checkpoint.c - - - userComments -db_checkpoint - diff --git a/bdb/build_vxworks/db_checkpoint/db_checkpoint/Makefile.custom b/bdb/build_vxworks/db_checkpoint/db_checkpoint/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_checkpoint/db_checkpoint/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_checkpoint/db_checkpoint/component.cdf b/bdb/build_vxworks/db_checkpoint/db_checkpoint/component.cdf deleted file mode 100755 index ea05c3a6182..00000000000 --- a/bdb/build_vxworks/db_checkpoint/db_checkpoint/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_CHECKPOINT { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_checkpoint.o - NAME db_checkpoint - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_checkpoint.o { - - NAME db_checkpoint.o - SRC_PATH_NAME $PRJ_DIR/../db_checkpoint.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_checkpoint/db_checkpoint/component.wpj b/bdb/build_vxworks/db_checkpoint/db_checkpoint/component.wpj deleted file mode 100755 index 3b5daa113e1..00000000000 --- a/bdb/build_vxworks/db_checkpoint/db_checkpoint/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_checkpoint.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_checkpoint.c_objects -db_checkpoint.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_checkpoint.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_checkpoint.c_objects -db_checkpoint.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_checkpoint.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_checkpoint.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_checkpoint.c_objects -db_checkpoint.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_checkpoint.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_checkpoint.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_checkpoint.c_objects -db_checkpoint.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_checkpoint.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_checkpoint.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_config.h b/bdb/build_vxworks/db_config.h deleted file mode 100644 index 642d9927f67..00000000000 --- a/bdb/build_vxworks/db_config.h +++ /dev/null @@ -1,382 +0,0 @@ -/* DO NOT EDIT: automatically built by dist/s_vxworks. */ -/* !!! - * The CONFIG_TEST option may be added using the Tornado project build. - * DO NOT modify it here. - */ -/* Define to 1 if you want to build a version for running the test suite. */ -/* #undef CONFIG_TEST */ - -/* !!! - * The DEBUG option may be added using the Tornado project build. - * DO NOT modify it here. - */ -/* Define to 1 if you want a debugging version. */ -/* #undef DEBUG */ - -/* Define to 1 if you want a version that logs read operations. */ -/* #undef DEBUG_ROP */ - -/* Define to 1 if you want a version that logs write operations. */ -/* #undef DEBUG_WOP */ - -/* !!! - * The DIAGNOSTIC option may be added using the Tornado project build. - * DO NOT modify it here. - */ -/* Define to 1 if you want a version with run-time diagnostic checking. */ -/* #undef DIAGNOSTIC */ - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if Berkeley DB release includes strong cryptography. */ -/* #undef HAVE_CRYPTO */ - -/* Define to 1 if you have the `directio' function. */ -/* #undef HAVE_DIRECTIO */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -#define HAVE_DIRENT_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_DLFCN_H */ - -/* Define to 1 if you have EXIT_SUCCESS/EXIT_FAILURE #defines. */ -#define HAVE_EXIT_SUCCESS 1 - -/* Define to 1 if fcntl/F_SETFD denies child access to file descriptors. */ -/* #undef HAVE_FCNTL_F_SETFD */ - -/* Define to 1 if allocated filesystem blocks are not zeroed. */ -#define HAVE_FILESYSTEM_NOTZERO 1 - -/* Define to 1 if you have the `getcwd' function. */ -#define HAVE_GETCWD 1 - -/* Define to 1 if you have the `getopt' function. */ -/* #undef HAVE_GETOPT */ - -/* Define to 1 if you have the `gettimeofday' function. */ -/* #undef HAVE_GETTIMEOFDAY */ - -/* Define to 1 if you have the `getuid' function. */ -/* #undef HAVE_GETUID */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Define to 1 if you have the `nsl' library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define to 1 if you have the `memcmp' function. */ -#define HAVE_MEMCMP 1 - -/* Define to 1 if you have the `memcpy' function. */ -#define HAVE_MEMCPY 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `mlock' function. */ -/* #undef HAVE_MLOCK */ - -/* Define to 1 if you have the `mmap' function. */ -/* #undef HAVE_MMAP */ - -/* Define to 1 if you have the `munlock' function. */ -/* #undef HAVE_MUNLOCK */ - -/* Define to 1 if you have the `munmap' function. */ -/* #undef HAVE_MUNMAP */ - -/* Define to 1 to use the GCC compiler and 68K assembly language mutexes. */ -/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */ - -/* Define to 1 to use the AIX _check_lock mutexes. */ -/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */ - -/* Define to 1 to use the GCC compiler and Alpha assembly language mutexes. */ -/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and ARM assembly language mutexes. */ -/* #undef HAVE_MUTEX_ARM_GCC_ASSEMBLY */ - -/* Define to 1 to use the UNIX fcntl system call mutexes. */ -/* #undef HAVE_MUTEX_FCNTL */ - -/* Define to 1 to use the GCC compiler and PaRisc assembly language mutexes. - */ -/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */ - -/* Define to 1 to use the msem_XXX mutexes on HP-UX. */ -/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */ - -/* Define to 1 to use the GCC compiler and IA64 assembly language mutexes. */ -/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */ - -/* Define to 1 to use the msem_XXX mutexes on systems other than HP-UX. */ -/* #undef HAVE_MUTEX_MSEM_INIT */ - -/* Define to 1 to use the GCC compiler and Apple PowerPC assembly language. */ -/* #undef HAVE_MUTEX_PPC_APPLE_GCC_ASSEMBLY */ - -/* Define to 1 to use the GCC compiler and generic PowerPC assembly language. - */ -/* #undef HAVE_MUTEX_PPC_GENERIC_GCC_ASSEMBLY */ - -/* Define to 1 to use POSIX 1003.1 pthread_XXX mutexes. */ -/* #undef HAVE_MUTEX_PTHREADS */ - -/* Define to 1 to use Reliant UNIX initspin mutexes. */ -/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */ - -/* Define to 1 to use the GCC compiler and S/390 assembly language mutexes. */ -/* #undef HAVE_MUTEX_S390_GCC_ASSEMBLY */ - -/* Define to 1 to use the SCO compiler and x86 assembly language mutexes. */ -/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */ - -/* Define to 1 to use the obsolete POSIX 1003.1 sema_XXX mutexes. */ -/* #undef HAVE_MUTEX_SEMA_INIT */ - -/* Define to 1 to use the SGI XXX_lock mutexes. */ -/* #undef HAVE_MUTEX_SGI_INIT_LOCK */ - -/* Define to 1 to use the Solaris _lock_XXX mutexes. */ -/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */ - -/* Define to 1 to use the Solaris lwp threads mutexes. */ -/* #undef HAVE_MUTEX_SOLARIS_LWP */ - -/* Define to 1 to use the GCC compiler and Sparc assembly language mutexes. */ -/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */ - -/* Define to 1 if mutexes hold system resources. */ -#define HAVE_MUTEX_SYSTEM_RESOURCES 1 - -/* Define to 1 if fast mutexes are available. */ -#define HAVE_MUTEX_THREADS 1 - -/* Define to 1 to configure mutexes intra-process only. */ -/* #undef HAVE_MUTEX_THREAD_ONLY */ - -/* Define to 1 to use the UNIX International mutexes. */ -/* #undef HAVE_MUTEX_UI_THREADS */ - -/* Define to 1 to use the UTS compiler and assembly language mutexes. */ -/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */ - -/* Define to 1 to use VMS mutexes. */ -/* #undef HAVE_MUTEX_VMS */ - -/* Define to 1 to use VxWorks mutexes. */ -#define HAVE_MUTEX_VXWORKS 1 - -/* Define to 1 to use Windows mutexes. */ -/* #undef HAVE_MUTEX_WIN32 */ - -/* Define to 1 to use the GCC compiler and x86 assembly language mutexes. */ -/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */ - -/* Define to 1 if you have the header file, and it defines `DIR'. */ -/* #undef HAVE_NDIR_H */ - -/* Define to 1 if you have the O_DIRECT flag. */ -/* #undef HAVE_O_DIRECT */ - -/* Define to 1 if you have the `pread' function. */ -/* #undef HAVE_PREAD */ - -/* Define to 1 if you have the `pstat_getdynamic' function. */ -/* #undef HAVE_PSTAT_GETDYNAMIC */ - -/* Define to 1 if you have the `pwrite' function. */ -/* #undef HAVE_PWRITE */ - -/* Define to 1 if building on QNX. */ -/* #undef HAVE_QNX */ - -/* Define to 1 if you have the `qsort' function. */ -#define HAVE_QSORT 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if building RPC client/server. */ -/* #undef HAVE_RPC */ - -/* Define to 1 if you have the `sched_yield' function. */ -#define HAVE_SCHED_YIELD 1 - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the `shmget' function. */ -/* #undef HAVE_SHMGET */ - -/* Define to 1 if you have the `snprintf' function. */ -/* #undef HAVE_SNPRINTF */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_STDINT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strcasecmp' function. */ -/* #undef HAVE_STRCASECMP */ - -/* Define to 1 if you have the `strdup' function. */ -/* #undef HAVE_STRDUP */ - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if `st_blksize' is member of `struct stat'. */ -#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 - -/* Define to 1 if you have the `sysconf' function. */ -/* #undef HAVE_SYSCONF */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define to 1 if you have the header file, and it defines `DIR'. - */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SELECT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_STAT_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TYPES_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if unlink of file with open file descriptors will fail. */ -#define HAVE_UNLINK_WITH_OPEN_FAILURE 1 - -/* Define to 1 if you have the `vsnprintf' function. */ -/* #undef HAVE_VSNPRINTF */ - -/* Define to 1 if building VxWorks. */ -#define HAVE_VXWORKS 1 - -/* Define to 1 if you have the `yield' function. */ -/* #undef HAVE_YIELD */ - -/* Define to 1 if you have the `_fstati64' function. */ -/* #undef HAVE__FSTATI64 */ - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "support@sleepycat.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "Berkeley DB" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Berkeley DB 4.1.24" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "db-4.1.24" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "4.1.24" - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -/* #undef STAT_MACROS_BROKEN */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -/* #undef TIME_WITH_SYS_TIME */ - -/* Define to 1 to mask harmless unitialized memory read/writes. */ -/* #undef UMRW */ - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files, on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* - * Exit success/failure macros. - */ -#ifndef HAVE_EXIT_SUCCESS -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 -#endif - -/* - * Don't step on the namespace. Other libraries may have their own - * implementations of these functions, we don't want to use their - * implementations or force them to use ours based on the load order. - */ -#ifndef HAVE_GETCWD -#define getcwd __db_Cgetcwd -#endif -#ifndef HAVE_GETOPT -#define getopt __db_Cgetopt -#define optarg __db_Coptarg -#define opterr __db_Copterr -#define optind __db_Coptind -#define optopt __db_Coptopt -#endif -#ifndef HAVE_MEMCMP -#define memcmp __db_Cmemcmp -#endif -#ifndef HAVE_MEMCPY -#define memcpy __db_Cmemcpy -#endif -#ifndef HAVE_MEMMOVE -#define memmove __db_Cmemmove -#endif -#ifndef HAVE_RAISE -#define raise __db_Craise -#endif -#ifndef HAVE_SNPRINTF -#define snprintf __db_Csnprintf -#endif -#ifndef HAVE_STRCASECMP -#define strcasecmp __db_Cstrcasecmp -#define strncasecmp __db_Cstrncasecmp -#endif -#ifndef HAVE_STRERROR -#define strerror __db_Cstrerror -#endif -#ifndef HAVE_VSNPRINTF -#define vsnprintf __db_Cvsnprintf -#endif - -/* - * !!! - * The following is not part of the automatic configuration setup, but - * provides the information necessary to build Berkeley DB on VxWorks. - */ -#include "vxWorks.h" diff --git a/bdb/build_vxworks/db_deadlock/db_deadlock.c b/bdb/build_vxworks/db_deadlock/db_deadlock.c deleted file mode 100644 index 3e9f4ba7b02..00000000000 --- a/bdb/build_vxworks/db_deadlock/db_deadlock.c +++ /dev/null @@ -1,249 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_deadlock.c,v 11.38 2002/08/08 03:50:32 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#if TIME_WITH_SYS_TIME -#include -#include -#else -#if HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - -#include -#include -#include -#include -#include -#endif - -#include "db_int.h" - -int db_deadlock_main __P((int, char *[])); -int db_deadlock_usage __P((void)); -int db_deadlock_version_check __P((const char *)); - -int -db_deadlock(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_deadlock", args, &argc, &argv); - return (db_deadlock_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_deadlock_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - const char *progname = "db_deadlock"; - DB_ENV *dbenv; - u_int32_t atype; - time_t now; - long secs, usecs; - int ch, e_close, exitval, ret, verbose; - char *home, *logfile, *str; - - if ((ret = db_deadlock_version_check(progname)) != 0) - return (ret); - - atype = DB_LOCK_DEFAULT; - home = logfile = NULL; - secs = usecs = 0; - e_close = exitval = verbose = 0; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "a:h:L:t:Vvw")) != EOF) - switch (ch) { - case 'a': - switch (optarg[0]) { - case 'e': - atype = DB_LOCK_EXPIRE; - break; - case 'm': - atype = DB_LOCK_MAXLOCKS; - break; - case 'n': - atype = DB_LOCK_MINLOCKS; - break; - case 'o': - atype = DB_LOCK_OLDEST; - break; - case 'w': - atype = DB_LOCK_MINWRITE; - break; - case 'y': - atype = DB_LOCK_YOUNGEST; - break; - default: - return (db_deadlock_usage()); - /* NOTREACHED */ - } - if (optarg[1] != '\0') - return (db_deadlock_usage()); - break; - case 'h': - home = optarg; - break; - case 'L': - logfile = optarg; - break; - case 't': - if ((str = strchr(optarg, '.')) != NULL) { - *str++ = '\0'; - if (*str != '\0' && __db_getlong( - NULL, progname, str, 0, LONG_MAX, &usecs)) - return (EXIT_FAILURE); - } - if (*optarg != '\0' && __db_getlong( - NULL, progname, optarg, 0, LONG_MAX, &secs)) - return (EXIT_FAILURE); - if (secs == 0 && usecs == 0) - return (db_deadlock_usage()); - - break; - - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case 'v': - verbose = 1; - break; - case 'w': /* Undocumented. */ - /* Detect every 100ms (100000 us) when polling. */ - secs = 0; - usecs = 100000; - break; - case '?': - default: - return (db_deadlock_usage()); - } - argc -= optind; - argv += optind; - - if (argc != 0) - return (db_deadlock_usage()); - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* Log our process ID. */ - if (logfile != NULL && __db_util_logset(progname, logfile)) - goto shutdown; - - /* - * Create an environment object and initialize it for error - * reporting. - */ - if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", progname, db_strerror(ret)); - goto shutdown; - } - e_close = 1; - - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - - if (verbose) { - (void)dbenv->set_verbose(dbenv, DB_VERB_DEADLOCK, 1); - (void)dbenv->set_verbose(dbenv, DB_VERB_WAITSFOR, 1); - } - - /* An environment is required. */ - if ((ret = dbenv->open(dbenv, home, - DB_JOINENV | DB_USE_ENVIRON, 0)) != 0) { - dbenv->err(dbenv, ret, "open"); - goto shutdown; - } - - while (!__db_util_interrupted()) { - if (verbose) { - (void)time(&now); - dbenv->errx(dbenv, "running at %.24s", ctime(&now)); - } - - if ((ret = dbenv->lock_detect(dbenv, 0, atype, NULL)) != 0) { - dbenv->err(dbenv, ret, "DB_ENV->lock_detect"); - goto shutdown; - } - - /* Make a pass every "secs" secs and "usecs" usecs. */ - if (secs == 0 && usecs == 0) - break; - (void)__os_sleep(dbenv, secs, usecs); - } - - if (0) { -shutdown: exitval = 1; - } - - /* Clean up the logfile. */ - if (logfile != NULL) - remove(logfile); - - /* Clean up the environment. */ - if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -int -db_deadlock_usage() -{ - (void)fprintf(stderr, "%s\n\t%s\n", - "usage: db_deadlock [-Vv]", - "[-a e | m | n | o | w | y] [-h home] [-L file] [-t sec.usec]"); - return (EXIT_FAILURE); -} - -int -db_deadlock_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} diff --git a/bdb/build_vxworks/db_deadlock/db_deadlock.wpj b/bdb/build_vxworks/db_deadlock/db_deadlock.wpj deleted file mode 100755 index 10cc2dc6cb6..00000000000 --- a/bdb/build_vxworks/db_deadlock/db_deadlock.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_deadlock.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_deadlock.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_deadlock.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_deadlock.c_dependDone -FALSE - - - FILE_db_deadlock.c_dependencies - - - - FILE_db_deadlock.c_objects -db_deadlock.o - - - FILE_db_deadlock.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_deadlock.c - - - userComments -db_deadlock - diff --git a/bdb/build_vxworks/db_deadlock/db_deadlock/Makefile.custom b/bdb/build_vxworks/db_deadlock/db_deadlock/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_deadlock/db_deadlock/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_deadlock/db_deadlock/component.cdf b/bdb/build_vxworks/db_deadlock/db_deadlock/component.cdf deleted file mode 100755 index efc498475bf..00000000000 --- a/bdb/build_vxworks/db_deadlock/db_deadlock/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_DEADLOCK { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_deadlock.o - NAME db_deadlock - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_deadlock.o { - - NAME db_deadlock.o - SRC_PATH_NAME $PRJ_DIR/../db_deadlock.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_deadlock/db_deadlock/component.wpj b/bdb/build_vxworks/db_deadlock/db_deadlock/component.wpj deleted file mode 100755 index f9a1b82cd9c..00000000000 --- a/bdb/build_vxworks/db_deadlock/db_deadlock/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_deadlock.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_deadlock.c_objects -db_deadlock.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_deadlock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_deadlock.c_objects -db_deadlock.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_deadlock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_deadlock.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_deadlock.c_objects -db_deadlock.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_deadlock.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_deadlock.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_deadlock.c_objects -db_deadlock.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_deadlock.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_deadlock.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_dump/db_dump.c b/bdb/build_vxworks/db_dump/db_dump.c deleted file mode 100644 index 60e987c48b9..00000000000 --- a/bdb/build_vxworks/db_dump/db_dump.c +++ /dev/null @@ -1,626 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_dump.c,v 11.80 2002/08/08 03:50:34 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include -#include -#include -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/db_am.h" - -int db_dump_db_init __P((DB_ENV *, char *, int, u_int32_t, int *)); -int db_dump_dump __P((DB *, int, int)); -int db_dump_dump_sub __P((DB_ENV *, DB *, char *, int, int)); -int db_dump_is_sub __P((DB *, int *)); -int db_dump_main __P((int, char *[])); -int db_dump_show_subs __P((DB *)); -int db_dump_usage __P((void)); -int db_dump_version_check __P((const char *)); - -int -db_dump(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_dump", args, &argc, &argv); - return (db_dump_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_dump_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - const char *progname = "db_dump"; - DB_ENV *dbenv; - DB *dbp; - u_int32_t cache; - int ch, d_close; - int e_close, exitval, keyflag, lflag, nflag, pflag, private; - int ret, Rflag, rflag, resize, subs; - char *dopt, *home, *passwd, *subname; - - if ((ret = db_dump_version_check(progname)) != 0) - return (ret); - - dbp = NULL; - d_close = e_close = exitval = lflag = nflag = pflag = rflag = Rflag = 0; - keyflag = 0; - cache = MEGABYTE; - private = 0; - dopt = home = passwd = subname = NULL; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "d:f:h:klNpP:rRs:V")) != EOF) - switch (ch) { - case 'd': - dopt = optarg; - break; - case 'f': - if (freopen(optarg, "w", stdout) == NULL) { - fprintf(stderr, "%s: %s: reopen: %s\n", - progname, optarg, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 'h': - home = optarg; - break; - case 'k': - keyflag = 1; - break; - case 'l': - lflag = 1; - break; - case 'N': - nflag = 1; - break; - case 'P': - passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - progname, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 'p': - pflag = 1; - break; - case 's': - subname = optarg; - break; - case 'R': - Rflag = 1; - /* DB_AGGRESSIVE requires DB_SALVAGE */ - /* FALLTHROUGH */ - case 'r': - rflag = 1; - break; - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case '?': - default: - return (db_dump_usage()); - } - argc -= optind; - argv += optind; - - if (argc != 1) - return (db_dump_usage()); - - if (dopt != NULL && pflag) { - fprintf(stderr, - "%s: the -d and -p options may not both be specified\n", - progname); - return (EXIT_FAILURE); - } - if (lflag && subname != NULL) { - fprintf(stderr, - "%s: the -l and -s options may not both be specified\n", - progname); - return (EXIT_FAILURE); - } - - if (keyflag && rflag) { - fprintf(stderr, "%s: %s", - "the -k and -r or -R options may not both be specified\n", - progname); - return (EXIT_FAILURE); - } - - if (subname != NULL && rflag) { - fprintf(stderr, "%s: %s", - "the -s and -r or R options may not both be specified\n", - progname); - return (EXIT_FAILURE); - } - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* - * Create an environment object and initialize it for error - * reporting. - */ -retry: if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", progname, db_strerror(ret)); - goto err; - } - e_close = 1; - - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - if (nflag) { - if ((ret = dbenv->set_flags(dbenv, DB_NOLOCKING, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOLOCKING"); - goto err; - } - if ((ret = dbenv->set_flags(dbenv, DB_NOPANIC, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOPANIC"); - goto err; - } - } - if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv, - passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - goto err; - } - - /* Initialize the environment. */ - if (db_dump_db_init(dbenv, home, rflag, cache, &private) != 0) - goto err; - - /* Create the DB object and open the file. */ - if ((ret = db_create(&dbp, dbenv, 0)) != 0) { - dbenv->err(dbenv, ret, "db_create"); - goto err; - } - d_close = 1; - - /* - * If we're salvaging, don't do an open; it might not be safe. - * Dispatch now into the salvager. - */ - if (rflag) { - if ((ret = dbp->verify(dbp, argv[0], NULL, stdout, - DB_SALVAGE | - (Rflag ? DB_AGGRESSIVE : 0) | - (pflag ? DB_PRINTABLE : 0))) != 0) - goto err; - exitval = 0; - goto done; - } - - if ((ret = dbp->open(dbp, NULL, - argv[0], subname, DB_UNKNOWN, DB_RDONLY, 0)) != 0) { - dbp->err(dbp, ret, "open: %s", argv[0]); - goto err; - } - if (private != 0) { - if ((ret = __db_util_cache(dbenv, dbp, &cache, &resize)) != 0) - goto err; - if (resize) { - (void)dbp->close(dbp, 0); - d_close = 0; - - (void)dbenv->close(dbenv, 0); - e_close = 0; - goto retry; - } - } - - if (dopt != NULL) { - if (__db_dump(dbp, dopt, NULL)) { - dbp->err(dbp, ret, "__db_dump: %s", argv[0]); - goto err; - } - } else if (lflag) { - if (db_dump_is_sub(dbp, &subs)) - goto err; - if (subs == 0) { - dbp->errx(dbp, - "%s: does not contain multiple databases", argv[0]); - goto err; - } - if (db_dump_show_subs(dbp)) - goto err; - } else { - subs = 0; - if (subname == NULL && db_dump_is_sub(dbp, &subs)) - goto err; - if (subs) { - if (db_dump_dump_sub(dbenv, dbp, argv[0], pflag, keyflag)) - goto err; - } else - if (__db_prheader(dbp, NULL, pflag, keyflag, stdout, - __db_verify_callback, NULL, 0) || - db_dump_dump(dbp, pflag, keyflag)) - goto err; - } - - if (0) { -err: exitval = 1; - } -done: if (d_close && (ret = dbp->close(dbp, 0)) != 0) { - exitval = 1; - dbenv->err(dbenv, ret, "close"); - } - if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -/* - * db_init -- - * Initialize the environment. - */ -int -db_dump_db_init(dbenv, home, is_salvage, cache, is_privatep) - DB_ENV *dbenv; - char *home; - int is_salvage; - u_int32_t cache; - int *is_privatep; -{ - int ret; - - /* - * Try and use the underlying environment when opening a database. - * We wish to use the buffer pool so our information is as up-to-date - * as possible, even if the mpool cache hasn't been flushed. - * - * If we are not doing a salvage, we wish to use the DB_JOINENV flag; - * if a locking system is present, this will let us use it and be - * safe to run concurrently with other threads of control. (We never - * need to use transactions explicitly, as we're read-only.) Note - * that in CDB, too, this will configure our environment - * appropriately, and our cursors will (correctly) do locking as CDB - * read cursors. - * - * If we are doing a salvage, the verification code will protest - * if we initialize transactions, logging, or locking; do an - * explicit DB_INIT_MPOOL to try to join any existing environment - * before we create our own. - */ - *is_privatep = 0; - if (dbenv->open(dbenv, home, - DB_USE_ENVIRON | (is_salvage ? DB_INIT_MPOOL : DB_JOINENV), 0) == 0) - return (0); - - /* - * An environment is required because we may be trying to look at - * databases in directories other than the current one. We could - * avoid using an environment iff the -h option wasn't specified, - * but that seems like more work than it's worth. - * - * No environment exists (or, at least no environment that includes - * an mpool region exists). Create one, but make it private so that - * no files are actually created. - */ - *is_privatep = 1; - if ((ret = dbenv->set_cachesize(dbenv, 0, cache, 1)) == 0 && - (ret = dbenv->open(dbenv, home, - DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_USE_ENVIRON, 0)) == 0) - return (0); - - /* An environment is required. */ - dbenv->err(dbenv, ret, "open"); - return (1); -} - -/* - * is_sub -- - * Return if the database contains subdatabases. - */ -int -db_dump_is_sub(dbp, yesno) - DB *dbp; - int *yesno; -{ - DB_BTREE_STAT *btsp; - DB_HASH_STAT *hsp; - int ret; - - switch (dbp->type) { - case DB_BTREE: - case DB_RECNO: - if ((ret = dbp->stat(dbp, &btsp, DB_FAST_STAT)) != 0) { - dbp->err(dbp, ret, "DB->stat"); - return (ret); - } - *yesno = btsp->bt_metaflags & BTM_SUBDB ? 1 : 0; - free(btsp); - break; - case DB_HASH: - if ((ret = dbp->stat(dbp, &hsp, DB_FAST_STAT)) != 0) { - dbp->err(dbp, ret, "DB->stat"); - return (ret); - } - *yesno = hsp->hash_metaflags & DB_HASH_SUBDB ? 1 : 0; - free(hsp); - break; - case DB_QUEUE: - break; - default: - dbp->errx(dbp, "unknown database type"); - return (1); - } - return (0); -} - -/* - * dump_sub -- - * Dump out the records for a DB containing subdatabases. - */ -int -db_dump_dump_sub(dbenv, parent_dbp, parent_name, pflag, keyflag) - DB_ENV *dbenv; - DB *parent_dbp; - char *parent_name; - int pflag, keyflag; -{ - DB *dbp; - DBC *dbcp; - DBT key, data; - int ret; - char *subdb; - - /* - * Get a cursor and step through the database, dumping out each - * subdatabase. - */ - if ((ret = parent_dbp->cursor(parent_dbp, NULL, &dbcp, 0)) != 0) { - dbenv->err(dbenv, ret, "DB->cursor"); - return (1); - } - - memset(&key, 0, sizeof(key)); - memset(&data, 0, sizeof(data)); - while ((ret = dbcp->c_get(dbcp, &key, &data, DB_NEXT)) == 0) { - /* Nul terminate the subdatabase name. */ - if ((subdb = malloc(key.size + 1)) == NULL) { - dbenv->err(dbenv, ENOMEM, NULL); - return (1); - } - memcpy(subdb, key.data, key.size); - subdb[key.size] = '\0'; - - /* Create the DB object and open the file. */ - if ((ret = db_create(&dbp, dbenv, 0)) != 0) { - dbenv->err(dbenv, ret, "db_create"); - free(subdb); - return (1); - } - if ((ret = dbp->open(dbp, NULL, - parent_name, subdb, DB_UNKNOWN, DB_RDONLY, 0)) != 0) - dbp->err(dbp, ret, - "DB->open: %s:%s", parent_name, subdb); - if (ret == 0 && - (__db_prheader(dbp, subdb, pflag, keyflag, stdout, - __db_verify_callback, NULL, 0) || - db_dump_dump(dbp, pflag, keyflag))) - ret = 1; - (void)dbp->close(dbp, 0); - free(subdb); - if (ret != 0) - return (1); - } - if (ret != DB_NOTFOUND) { - dbp->err(dbp, ret, "DBcursor->get"); - return (1); - } - - if ((ret = dbcp->c_close(dbcp)) != 0) { - dbp->err(dbp, ret, "DBcursor->close"); - return (1); - } - - return (0); -} - -/* - * show_subs -- - * Display the subdatabases for a database. - */ -int -db_dump_show_subs(dbp) - DB *dbp; -{ - DBC *dbcp; - DBT key, data; - int ret; - - /* - * Get a cursor and step through the database, printing out the key - * of each key/data pair. - */ - if ((ret = dbp->cursor(dbp, NULL, &dbcp, 0)) != 0) { - dbp->err(dbp, ret, "DB->cursor"); - return (1); - } - - memset(&key, 0, sizeof(key)); - memset(&data, 0, sizeof(data)); - while ((ret = dbcp->c_get(dbcp, &key, &data, DB_NEXT)) == 0) { - if ((ret = __db_prdbt(&key, 1, NULL, stdout, - __db_verify_callback, 0, NULL)) != 0) { - dbp->errx(dbp, NULL); - return (1); - } - } - if (ret != DB_NOTFOUND) { - dbp->err(dbp, ret, "DBcursor->get"); - return (1); - } - - if ((ret = dbcp->c_close(dbcp)) != 0) { - dbp->err(dbp, ret, "DBcursor->close"); - return (1); - } - return (0); -} - -/* - * dump -- - * Dump out the records for a DB. - */ -int -db_dump_dump(dbp, pflag, keyflag) - DB *dbp; - int pflag, keyflag; -{ - DBC *dbcp; - DBT key, data; - DBT keyret, dataret; - db_recno_t recno; - int is_recno, failed, ret; - void *pointer; - - /* - * Get a cursor and step through the database, printing out each - * key/data pair. - */ - if ((ret = dbp->cursor(dbp, NULL, &dbcp, 0)) != 0) { - dbp->err(dbp, ret, "DB->cursor"); - return (1); - } - - failed = 0; - memset(&key, 0, sizeof(key)); - memset(&data, 0, sizeof(data)); - data.data = malloc(1024 * 1024); - if (data.data == NULL) { - dbp->err(dbp, ENOMEM, "bulk get buffer"); - failed = 1; - goto err; - } - data.ulen = 1024 * 1024; - data.flags = DB_DBT_USERMEM; - is_recno = (dbp->type == DB_RECNO || dbp->type == DB_QUEUE); - keyflag = is_recno ? keyflag : 1; - if (is_recno) { - keyret.data = &recno; - keyret.size = sizeof(recno); - } - -retry: - while ((ret = - dbcp->c_get(dbcp, &key, &data, DB_NEXT | DB_MULTIPLE_KEY)) == 0) { - DB_MULTIPLE_INIT(pointer, &data); - for (;;) { - if (is_recno) - DB_MULTIPLE_RECNO_NEXT(pointer, &data, - recno, dataret.data, dataret.size); - else - DB_MULTIPLE_KEY_NEXT(pointer, - &data, keyret.data, - keyret.size, dataret.data, dataret.size); - - if (dataret.data == NULL) - break; - - if ((keyflag && (ret = __db_prdbt(&keyret, - pflag, " ", stdout, __db_verify_callback, - is_recno, NULL)) != 0) || (ret = - __db_prdbt(&dataret, pflag, " ", stdout, - __db_verify_callback, 0, NULL)) != 0) { - dbp->errx(dbp, NULL); - failed = 1; - goto err; - } - } - } - if (ret == ENOMEM) { - data.data = realloc(data.data, data.size); - if (data.data == NULL) { - dbp->err(dbp, ENOMEM, "bulk get buffer"); - failed = 1; - goto err; - } - data.ulen = data.size; - goto retry; - } - - if (ret != DB_NOTFOUND) { - dbp->err(dbp, ret, "DBcursor->get"); - failed = 1; - } - -err: if (data.data != NULL) - free(data.data); - - if ((ret = dbcp->c_close(dbcp)) != 0) { - dbp->err(dbp, ret, "DBcursor->close"); - failed = 1; - } - - (void)__db_prfooter(stdout, __db_verify_callback); - return (failed); -} - -/* - * usage -- - * Display the usage message. - */ -int -db_dump_usage() -{ - (void)fprintf(stderr, "%s\n\t%s\n", - "usage: db_dump [-klNprRV]", - "[-d ahr] [-f output] [-h home] [-P password] [-s database] db_file"); - return (EXIT_FAILURE); -} - -int -db_dump_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} diff --git a/bdb/build_vxworks/db_dump/db_dump.wpj b/bdb/build_vxworks/db_dump/db_dump.wpj deleted file mode 100755 index 6813766e5f1..00000000000 --- a/bdb/build_vxworks/db_dump/db_dump.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_dump.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_dump.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_dump.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_dump.c_dependDone -FALSE - - - FILE_db_dump.c_dependencies - - - - FILE_db_dump.c_objects -db_dump.o - - - FILE_db_dump.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_dump.c - - - userComments -db_dump - diff --git a/bdb/build_vxworks/db_dump/db_dump/Makefile.custom b/bdb/build_vxworks/db_dump/db_dump/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_dump/db_dump/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_dump/db_dump/component.cdf b/bdb/build_vxworks/db_dump/db_dump/component.cdf deleted file mode 100755 index 5c1d4ccf308..00000000000 --- a/bdb/build_vxworks/db_dump/db_dump/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_DUMP { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_dump.o - NAME db_dump - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_dump.o { - - NAME db_dump.o - SRC_PATH_NAME $PRJ_DIR/../db_dump.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_dump/db_dump/component.wpj b/bdb/build_vxworks/db_dump/db_dump/component.wpj deleted file mode 100755 index e234641f498..00000000000 --- a/bdb/build_vxworks/db_dump/db_dump/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_dump.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_dump.c_objects -db_dump.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_dump.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_dump.c_objects -db_dump.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_dump.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_dump.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_dump.c_objects -db_dump.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_dump.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_dump.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_dump.c_objects -db_dump.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_dump.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_dump.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_load/db_load.c b/bdb/build_vxworks/db_load/db_load.c deleted file mode 100644 index 6eedae590b1..00000000000 --- a/bdb/build_vxworks/db_load/db_load.c +++ /dev/null @@ -1,1247 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_load.c,v 11.71 2002/08/08 03:50:36 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include -#include -#include -#include -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/db_am.h" - -typedef struct { /* XXX: Globals. */ - const char *progname; /* Program name. */ - char *hdrbuf; /* Input file header. */ - u_long lineno; /* Input file line number. */ - u_long origline; /* Original file line number. */ - int endodata; /* Reached the end of a database. */ - int endofile; /* Reached the end of the input. */ - int version; /* Input version. */ - char *home; /* Env home. */ - char *passwd; /* Env passwd. */ - int private; /* Private env. */ - u_int32_t cache; /* Env cache size. */ -} LDG; - -void db_load_badend __P((DB_ENV *)); -void db_load_badnum __P((DB_ENV *)); -int db_load_configure __P((DB_ENV *, DB *, char **, char **, int *)); -int db_load_convprintable __P((DB_ENV *, char *, char **)); -int db_load_db_init __P((DB_ENV *, char *, u_int32_t, int *)); -int db_load_dbt_rdump __P((DB_ENV *, DBT *)); -int db_load_dbt_rprint __P((DB_ENV *, DBT *)); -int db_load_dbt_rrecno __P((DB_ENV *, DBT *, int)); -int db_load_digitize __P((DB_ENV *, int, int *)); -int db_load_env_create __P((DB_ENV **, LDG *)); -int db_load_load __P((DB_ENV *, char *, DBTYPE, char **, u_int, LDG *, int *)); -int db_load_main __P((int, char *[])); -int db_load_rheader __P((DB_ENV *, DB *, DBTYPE *, char **, int *, int *)); -int db_load_usage __P((void)); -int db_load_version_check __P((const char *)); - -#define G(f) ((LDG *)dbenv->app_private)->f - - /* Flags to the load function. */ -#define LDF_NOHEADER 0x01 /* No dump header. */ -#define LDF_NOOVERWRITE 0x02 /* Don't overwrite existing rows. */ -#define LDF_PASSWORD 0x04 /* Encrypt created databases. */ - -int -db_load(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_load", args, &argc, &argv); - return (db_load_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_load_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - DBTYPE dbtype; - DB_ENV *dbenv; - LDG ldg; - u_int32_t ldf; - int ch, existed, exitval, ret; - char **clist, **clp; - - ldg.progname = "db_load"; - ldg.lineno = 0; - ldg.endodata = ldg.endofile = 0; - ldg.version = 1; - ldg.cache = MEGABYTE; - ldg.hdrbuf = NULL; - ldg.home = NULL; - ldg.passwd = NULL; - - if ((ret = db_load_version_check(ldg.progname)) != 0) - return (ret); - - ldf = 0; - exitval = 0; - dbtype = DB_UNKNOWN; - - /* Allocate enough room for configuration arguments. */ - if ((clp = clist = (char **)calloc(argc + 1, sizeof(char *))) == NULL) { - fprintf(stderr, "%s: %s\n", ldg.progname, strerror(ENOMEM)); - return (EXIT_FAILURE); - } - - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "c:f:h:nP:Tt:V")) != EOF) - switch (ch) { - case 'c': - *clp++ = optarg; - break; - case 'f': - if (freopen(optarg, "r", stdin) == NULL) { - fprintf(stderr, "%s: %s: reopen: %s\n", - ldg.progname, optarg, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 'h': - ldg.home = optarg; - break; - case 'n': - ldf |= LDF_NOOVERWRITE; - break; - case 'P': - ldg.passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (ldg.passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - ldg.progname, strerror(errno)); - return (EXIT_FAILURE); - } - ldf |= LDF_PASSWORD; - break; - case 'T': - ldf |= LDF_NOHEADER; - break; - case 't': - if (strcmp(optarg, "btree") == 0) { - dbtype = DB_BTREE; - break; - } - if (strcmp(optarg, "hash") == 0) { - dbtype = DB_HASH; - break; - } - if (strcmp(optarg, "recno") == 0) { - dbtype = DB_RECNO; - break; - } - if (strcmp(optarg, "queue") == 0) { - dbtype = DB_QUEUE; - break; - } - return (db_load_usage()); - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case '?': - default: - return (db_load_usage()); - } - argc -= optind; - argv += optind; - - if (argc != 1) - return (db_load_usage()); - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* - * Create an environment object initialized for error reporting, and - * then open it. - */ - if (db_load_env_create(&dbenv, &ldg) != 0) - goto shutdown; - - while (!ldg.endofile) - if (db_load_load(dbenv, argv[0], dbtype, clist, ldf, - &ldg, &existed) != 0) - goto shutdown; - - if (0) { -shutdown: exitval = 1; - } - if ((ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", ldg.progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - free(clist); - - /* - * Return 0 on success, 1 if keys existed already, and 2 on failure. - * - * Technically, this is wrong, because exit of anything other than - * 0 is implementation-defined by the ANSI C standard. I don't see - * any good solutions that don't involve API changes. - */ - return (exitval == 0 ? (existed == 0 ? 0 : 1) : 2); -} - -/* - * load -- - * Load a database. - */ -int -db_load_load(dbenv, name, argtype, clist, flags, ldg, existedp) - DB_ENV *dbenv; - char *name, **clist; - DBTYPE argtype; - u_int flags; - LDG *ldg; - int *existedp; -{ - DB *dbp; - DBT key, rkey, data, *readp, *writep; - DBTYPE dbtype; - DB_TXN *ctxn, *txn; - db_recno_t recno, datarecno; - u_int32_t put_flags; - int ascii_recno, checkprint, hexkeys, keyflag, keys, resize, ret, rval; - char *subdb; - - *existedp = 0; - - put_flags = LF_ISSET(LDF_NOOVERWRITE) ? DB_NOOVERWRITE : 0; - G(endodata) = 0; - - subdb = NULL; - ctxn = txn = NULL; - memset(&key, 0, sizeof(DBT)); - memset(&data, 0, sizeof(DBT)); - memset(&rkey, 0, sizeof(DBT)); - -retry_db: - /* Create the DB object. */ - if ((ret = db_create(&dbp, dbenv, 0)) != 0) { - dbenv->err(dbenv, ret, "db_create"); - goto err; - } - - dbtype = DB_UNKNOWN; - keys = -1; - hexkeys = -1; - keyflag = -1; - /* Read the header -- if there's no header, we expect flat text. */ - if (LF_ISSET(LDF_NOHEADER)) { - checkprint = 1; - dbtype = argtype; - } else { - if (db_load_rheader(dbenv, - dbp, &dbtype, &subdb, &checkprint, &keys) != 0) - goto err; - if (G(endofile)) - goto done; - } - - /* - * Apply command-line configuration changes. (We apply command-line - * configuration changes to all databases that are loaded, e.g., all - * subdatabases.) - */ - if (db_load_configure(dbenv, dbp, clist, &subdb, &keyflag)) - goto err; - - if (keys != 1) { - if (keyflag == 1) { - dbp->err(dbp, EINVAL, "No keys specified in file"); - goto err; - } - } - else if (keyflag == 0) { - dbp->err(dbp, EINVAL, "Keys specified in file"); - goto err; - } - else - keyflag = 1; - - if (dbtype == DB_BTREE || dbtype == DB_HASH) { - if (keyflag == 0) - dbp->err(dbp, - EINVAL, "Btree and Hash must specify keys"); - else - keyflag = 1; - } - - if (argtype != DB_UNKNOWN) { - - if (dbtype == DB_RECNO || dbtype == DB_QUEUE) - if (keyflag != 1 && argtype != DB_RECNO && - argtype != DB_QUEUE) { - dbenv->errx(dbenv, - "improper database type conversion specified"); - goto err; - } - dbtype = argtype; - } - - if (dbtype == DB_UNKNOWN) { - dbenv->errx(dbenv, "no database type specified"); - goto err; - } - - if (keyflag == -1) - keyflag = 0; - - /* - * Recno keys have only been printed in hexadecimal starting - * with db_dump format version 3 (DB 3.2). - * - * !!! - * Note that version is set in db_load_rheader(), which must be called before - * this assignment. - */ - hexkeys = (G(version) >= 3 && keyflag == 1 && checkprint == 0); - - if (keyflag == 1 && (dbtype == DB_RECNO || dbtype == DB_QUEUE)) - ascii_recno = 1; - else - ascii_recno = 0; - - /* If configured with a password, encrypt databases we create. */ - if (LF_ISSET(LDF_PASSWORD) && - (ret = dbp->set_flags(dbp, DB_ENCRYPT)) != 0) { - dbp->err(dbp, ret, "DB->set_flags: DB_ENCRYPT"); - goto err; - } - - /* Open the DB file. */ - if ((ret = dbp->open(dbp, NULL, name, subdb, dbtype, - DB_CREATE | (TXN_ON(dbenv) ? DB_AUTO_COMMIT : 0), - __db_omode("rwrwrw"))) != 0) { - dbp->err(dbp, ret, "DB->open: %s", name); - goto err; - } - if (ldg->private != 0) { - if ((ret = - __db_util_cache(dbenv, dbp, &ldg->cache, &resize)) != 0) - goto err; - if (resize) { - dbp->close(dbp, 0); - dbp = NULL; - dbenv->close(dbenv, 0); - if ((ret = db_load_env_create(&dbenv, ldg)) != 0) - goto err; - goto retry_db; - } - } - - /* Initialize the key/data pair. */ - readp = &key; - writep = &key; - if (dbtype == DB_RECNO || dbtype == DB_QUEUE) { - key.size = sizeof(recno); - if (keyflag) { - key.data = &datarecno; - if (checkprint) { - readp = &rkey; - goto key_data; - } - } - else - key.data = &recno; - } else -key_data: if ((readp->data = - (void *)malloc(readp->ulen = 1024)) == NULL) { - dbenv->err(dbenv, ENOMEM, NULL); - goto err; - } - if ((data.data = (void *)malloc(data.ulen = 1024)) == NULL) { - dbenv->err(dbenv, ENOMEM, NULL); - goto err; - } - - if (TXN_ON(dbenv) && - (ret = dbenv->txn_begin(dbenv, NULL, &txn, 0)) != 0) - goto err; - - /* Get each key/data pair and add them to the database. */ - for (recno = 1; !__db_util_interrupted(); ++recno) { - if (!keyflag) - if (checkprint) { - if (db_load_dbt_rprint(dbenv, &data)) - goto err; - } else { - if (db_load_dbt_rdump(dbenv, &data)) - goto err; - } - else - if (checkprint) { - if (db_load_dbt_rprint(dbenv, readp)) - goto err; - if (!G(endodata) && db_load_dbt_rprint(dbenv, &data)) - goto fmt; - } else { - if (ascii_recno) { - if (db_load_dbt_rrecno(dbenv, readp, hexkeys)) - goto err; - } else - if (db_load_dbt_rdump(dbenv, readp)) - goto err; - if (!G(endodata) && db_load_dbt_rdump(dbenv, &data)) { -fmt: dbenv->errx(dbenv, - "odd number of key/data pairs"); - goto err; - } - } - if (G(endodata)) - break; - if (readp != writep) { - if (sscanf(readp->data, "%ud", &datarecno) != 1) - dbenv->errx(dbenv, - "%s: non-integer key at line: %d", - name, !keyflag ? recno : recno * 2 - 1); - if (datarecno == 0) - dbenv->errx(dbenv, "%s: zero key at line: %d", - name, - !keyflag ? recno : recno * 2 - 1); - } -retry: if (txn != NULL) - if ((ret = dbenv->txn_begin(dbenv, txn, &ctxn, 0)) != 0) - goto err; - switch (ret = dbp->put(dbp, ctxn, writep, &data, put_flags)) { - case 0: - if (ctxn != NULL) { - if ((ret = - ctxn->commit(ctxn, DB_TXN_NOSYNC)) != 0) - goto err; - ctxn = NULL; - } - break; - case DB_KEYEXIST: - *existedp = 1; - dbenv->errx(dbenv, - "%s: line %d: key already exists, not loaded:", - name, - !keyflag ? recno : recno * 2 - 1); - - (void)__db_prdbt(&key, checkprint, 0, stderr, - __db_verify_callback, 0, NULL); - break; - case DB_LOCK_DEADLOCK: - /* If we have a child txn, retry--else it's fatal. */ - if (ctxn != NULL) { - if ((ret = ctxn->abort(ctxn)) != 0) - goto err; - ctxn = NULL; - goto retry; - } - /* FALLTHROUGH */ - default: - dbenv->err(dbenv, ret, NULL); - if (ctxn != NULL) { - (void)ctxn->abort(ctxn); - ctxn = NULL; - } - goto err; - } - if (ctxn != NULL) { - if ((ret = ctxn->abort(ctxn)) != 0) - goto err; - ctxn = NULL; - } - } -done: rval = 0; - DB_ASSERT(ctxn == NULL); - if (txn != NULL && (ret = txn->commit(txn, 0)) != 0) { - txn = NULL; - goto err; - } - - if (0) { -err: rval = 1; - DB_ASSERT(ctxn == NULL); - if (txn != NULL) - (void)txn->abort(txn); - } - - /* Close the database. */ - if (dbp != NULL && (ret = dbp->close(dbp, 0)) != 0) { - dbenv->err(dbenv, ret, "DB->close"); - rval = 1; - } - - if (G(hdrbuf) != NULL) - free(G(hdrbuf)); - G(hdrbuf) = NULL; - /* Free allocated memory. */ - if (subdb != NULL) - free(subdb); - if (dbtype != DB_RECNO && dbtype != DB_QUEUE) - free(key.data); - if (rkey.data != NULL) - free(rkey.data); - free(data.data); - - return (rval); -} - -/* - * db_init -- - * Initialize the environment. - */ -int -db_load_db_init(dbenv, home, cache, is_private) - DB_ENV *dbenv; - char *home; - u_int32_t cache; - int *is_private; -{ - u_int32_t flags; - int ret; - - *is_private = 0; - /* We may be loading into a live environment. Try and join. */ - flags = DB_USE_ENVIRON | - DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_INIT_TXN; - if (dbenv->open(dbenv, home, flags, 0) == 0) - return (0); - - /* - * We're trying to load a database. - * - * An environment is required because we may be trying to look at - * databases in directories other than the current one. We could - * avoid using an environment iff the -h option wasn't specified, - * but that seems like more work than it's worth. - * - * No environment exists (or, at least no environment that includes - * an mpool region exists). Create one, but make it private so that - * no files are actually created. - */ - LF_CLR(DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_TXN); - LF_SET(DB_CREATE | DB_PRIVATE); - *is_private = 1; - if ((ret = dbenv->set_cachesize(dbenv, 0, cache, 1)) != 0) { - dbenv->err(dbenv, ret, "set_cachesize"); - return (1); - } - if ((ret = dbenv->open(dbenv, home, flags, 0)) == 0) - return (0); - - /* An environment is required. */ - dbenv->err(dbenv, ret, "DB_ENV->open"); - return (1); -} - -#define FLAG(name, value, keyword, flag) \ - if (strcmp(name, keyword) == 0) { \ - switch (*value) { \ - case '1': \ - if ((ret = dbp->set_flags(dbp, flag)) != 0) { \ - dbp->err(dbp, ret, "%s: set_flags: %s", \ - G(progname), name); \ - return (1); \ - } \ - break; \ - case '0': \ - break; \ - default: \ - db_load_badnum(dbenv); \ - return (1); \ - } \ - continue; \ - } -#define NUMBER(name, value, keyword, func) \ - if (strcmp(name, keyword) == 0) { \ - if (__db_getlong(dbp, \ - NULL, value, 1, LONG_MAX, &val) != 0) \ - return (1); \ - if ((ret = dbp->func(dbp, val)) != 0) \ - goto nameerr; \ - continue; \ - } -#define STRING(name, value, keyword, func) \ - if (strcmp(name, keyword) == 0) { \ - if ((ret = dbp->func(dbp, value[0])) != 0) \ - goto nameerr; \ - continue; \ - } - -/* - * configure -- - * Handle command-line configuration options. - */ -int -db_load_configure(dbenv, dbp, clp, subdbp, keysp) - DB_ENV *dbenv; - DB *dbp; - char **clp, **subdbp; - int *keysp; -{ - long val; - int ret, savech; - char *name, *value; - - for (; (name = *clp) != NULL; *--value = savech, ++clp) { - if ((value = strchr(name, '=')) == NULL) { - dbp->errx(dbp, - "command-line configuration uses name=value format"); - return (1); - } - savech = *value; - *value++ = '\0'; - - if (strcmp(name, "database") == 0 || - strcmp(name, "subdatabase") == 0) { - if (*subdbp != NULL) - free(*subdbp); - if ((*subdbp = strdup(value)) == NULL) { - dbp->err(dbp, ENOMEM, NULL); - return (1); - } - continue; - } - if (strcmp(name, "keys") == 0) { - if (strcmp(value, "1") == 0) - *keysp = 1; - else if (strcmp(value, "0") == 0) - *keysp = 0; - else { - db_load_badnum(dbenv); - return (1); - } - continue; - } - -#ifdef notyet - NUMBER(name, value, "bt_maxkey", set_bt_maxkey); -#endif - NUMBER(name, value, "bt_minkey", set_bt_minkey); - NUMBER(name, value, "db_lorder", set_lorder); - NUMBER(name, value, "db_pagesize", set_pagesize); - FLAG(name, value, "chksum", DB_CHKSUM_SHA1); - FLAG(name, value, "duplicates", DB_DUP); - FLAG(name, value, "dupsort", DB_DUPSORT); - NUMBER(name, value, "h_ffactor", set_h_ffactor); - NUMBER(name, value, "h_nelem", set_h_nelem); - NUMBER(name, value, "re_len", set_re_len); - STRING(name, value, "re_pad", set_re_pad); - FLAG(name, value, "recnum", DB_RECNUM); - FLAG(name, value, "renumber", DB_RENUMBER); - - dbp->errx(dbp, - "unknown command-line configuration keyword \"%s\"", name); - return (1); - } - return (0); - -nameerr: - dbp->err(dbp, ret, "%s: %s=%s", G(progname), name, value); - return (1); -} - -/* - * rheader -- - * Read the header message. - */ -int -db_load_rheader(dbenv, dbp, dbtypep, subdbp, checkprintp, keysp) - DB_ENV *dbenv; - DB *dbp; - DBTYPE *dbtypep; - char **subdbp; - int *checkprintp, *keysp; -{ - long val; - int ch, first, hdr, linelen, buflen, ret, start; - char *buf, *name, *p, *value; - - *dbtypep = DB_UNKNOWN; - *checkprintp = 0; - name = p = NULL; - - /* - * We start with a smallish buffer; most headers are small. - * We may need to realloc it for a large subdatabase name. - */ - buflen = 4096; - if (G(hdrbuf) == NULL) { - hdr = 0; - if ((buf = (char *)malloc(buflen)) == NULL) { -memerr: dbp->errx(dbp, "could not allocate buffer %d", buflen); - return (1); - } - G(hdrbuf) = buf; - G(origline) = G(lineno); - } else { - hdr = 1; - buf = G(hdrbuf); - G(lineno) = G(origline); - } - - start = 0; - for (first = 1;; first = 0) { - ++G(lineno); - - /* Read a line, which may be of arbitrary length, into buf. */ - linelen = 0; - buf = &G(hdrbuf)[start]; - if (hdr == 0) { - for (;;) { - if ((ch = getchar()) == EOF) { - if (!first || ferror(stdin)) - goto badfmt; - G(endofile) = 1; - break; - } - - if (ch == '\n') - break; - - buf[linelen++] = ch; - - /* If the buffer is too small, double it. */ - if (linelen + start == buflen) { - G(hdrbuf) = (char *)realloc(G(hdrbuf), - buflen *= 2); - if (G(hdrbuf) == NULL) - goto memerr; - buf = &G(hdrbuf)[start]; - } - } - if (G(endofile) == 1) - break; - buf[linelen++] = '\0'; - } else - linelen = strlen(buf) + 1; - start += linelen; - - if (name != NULL) { - *p = '='; - free(name); - name = NULL; - } - /* If we don't see the expected information, it's an error. */ - if ((name = strdup(buf)) == NULL) - goto memerr; - if ((p = strchr(name, '=')) == NULL) - goto badfmt; - *p++ = '\0'; - - value = p--; - - if (name[0] == '\0' || value[0] == '\0') - goto badfmt; - - if (strcmp(name, "HEADER") == 0) - break; - if (strcmp(name, "VERSION") == 0) { - /* - * Version 1 didn't have a "VERSION" header line. We - * only support versions 1, 2, and 3 of the dump format. - */ - G(version) = atoi(value); - - if (G(version) > 3) { - dbp->errx(dbp, - "line %lu: VERSION %d is unsupported", - G(lineno), G(version)); - goto err; - } - continue; - } - if (strcmp(name, "format") == 0) { - if (strcmp(value, "bytevalue") == 0) { - *checkprintp = 0; - continue; - } - if (strcmp(value, "print") == 0) { - *checkprintp = 1; - continue; - } - goto badfmt; - } - if (strcmp(name, "type") == 0) { - if (strcmp(value, "btree") == 0) { - *dbtypep = DB_BTREE; - continue; - } - if (strcmp(value, "hash") == 0) { - *dbtypep = DB_HASH; - continue; - } - if (strcmp(value, "recno") == 0) { - *dbtypep = DB_RECNO; - continue; - } - if (strcmp(value, "queue") == 0) { - *dbtypep = DB_QUEUE; - continue; - } - dbp->errx(dbp, "line %lu: unknown type", G(lineno)); - goto err; - } - if (strcmp(name, "database") == 0 || - strcmp(name, "subdatabase") == 0) { - if ((ret = db_load_convprintable(dbenv, value, subdbp)) != 0) { - dbp->err(dbp, ret, "error reading db name"); - goto err; - } - continue; - } - if (strcmp(name, "keys") == 0) { - if (strcmp(value, "1") == 0) - *keysp = 1; - else if (strcmp(value, "0") == 0) - *keysp = 0; - else { - db_load_badnum(dbenv); - goto err; - } - continue; - } - -#ifdef notyet - NUMBER(name, value, "bt_maxkey", set_bt_maxkey); -#endif - NUMBER(name, value, "bt_minkey", set_bt_minkey); - NUMBER(name, value, "db_lorder", set_lorder); - NUMBER(name, value, "db_pagesize", set_pagesize); - NUMBER(name, value, "extentsize", set_q_extentsize); - FLAG(name, value, "chksum", DB_CHKSUM_SHA1); - FLAG(name, value, "duplicates", DB_DUP); - FLAG(name, value, "dupsort", DB_DUPSORT); - NUMBER(name, value, "h_ffactor", set_h_ffactor); - NUMBER(name, value, "h_nelem", set_h_nelem); - NUMBER(name, value, "re_len", set_re_len); - STRING(name, value, "re_pad", set_re_pad); - FLAG(name, value, "recnum", DB_RECNUM); - FLAG(name, value, "renumber", DB_RENUMBER); - - dbp->errx(dbp, - "unknown input-file header configuration keyword \"%s\"", - name); - goto err; - } - ret = 0; - if (0) { -nameerr: - dbp->err(dbp, ret, "%s: %s=%s", G(progname), name, value); - ret = 1; - } - if (0) -err: ret = 1; - if (0) { -badfmt: - dbp->errx(dbp, "line %lu: unexpected format", G(lineno)); - ret = 1; - } - if (name != NULL) { - *p = '='; - free(name); - } - return (ret); -} - -/* - * convprintable -- - * Convert a printable-encoded string into a newly allocated string. - * - * In an ideal world, this would probably share code with dbt_rprint, but - * that's set up to read character-by-character (to avoid large memory - * allocations that aren't likely to be a problem here), and this has fewer - * special cases to deal with. - * - * Note that despite the printable encoding, the char * interface to this - * function (which is, not coincidentally, also used for database naming) - * means that outstr cannot contain any nuls. - */ -int -db_load_convprintable(dbenv, instr, outstrp) - DB_ENV *dbenv; - char *instr, **outstrp; -{ - char c, *outstr; - int e1, e2; - - /* - * Just malloc a string big enough for the whole input string; - * the output string will be smaller (or of equal length). - */ - if ((outstr = (char *)malloc(strlen(instr))) == NULL) - return (ENOMEM); - - *outstrp = outstr; - - e1 = e2 = 0; - for ( ; *instr != '\0'; instr++) - if (*instr == '\\') { - if (*++instr == '\\') { - *outstr++ = '\\'; - continue; - } - c = db_load_digitize(dbenv, *instr, &e1) << 4; - c |= db_load_digitize(dbenv, *++instr, &e2); - if (e1 || e2) { - db_load_badend(dbenv); - return (EINVAL); - } - - *outstr++ = c; - } else - *outstr++ = *instr; - - *outstr = '\0'; - - return (0); -} - -/* - * dbt_rprint -- - * Read a printable line into a DBT structure. - */ -int -db_load_dbt_rprint(dbenv, dbtp) - DB_ENV *dbenv; - DBT *dbtp; -{ - u_int32_t len; - u_int8_t *p; - int c1, c2, e, escape, first; - char buf[32]; - - ++G(lineno); - - first = 1; - e = escape = 0; - for (p = dbtp->data, len = 0; (c1 = getchar()) != '\n';) { - if (c1 == EOF) { - if (len == 0) { - G(endofile) = G(endodata) = 1; - return (0); - } - db_load_badend(dbenv); - return (1); - } - if (first) { - first = 0; - if (G(version) > 1) { - if (c1 != ' ') { - buf[0] = c1; - if (fgets(buf + 1, - sizeof(buf) - 1, stdin) == NULL || - strcmp(buf, "DATA=END\n") != 0) { - db_load_badend(dbenv); - return (1); - } - G(endodata) = 1; - return (0); - } - continue; - } - } - if (escape) { - if (c1 != '\\') { - if ((c2 = getchar()) == EOF) { - db_load_badend(dbenv); - return (1); - } - c1 = db_load_digitize(dbenv, - c1, &e) << 4 | db_load_digitize(dbenv, c2, &e); - if (e) - return (1); - } - escape = 0; - } else - if (c1 == '\\') { - escape = 1; - continue; - } - if (len >= dbtp->ulen - 10) { - dbtp->ulen *= 2; - if ((dbtp->data = - (void *)realloc(dbtp->data, dbtp->ulen)) == NULL) { - dbenv->err(dbenv, ENOMEM, NULL); - return (1); - } - p = (u_int8_t *)dbtp->data + len; - } - ++len; - *p++ = c1; - } - dbtp->size = len; - - return (0); -} - -/* - * dbt_rdump -- - * Read a byte dump line into a DBT structure. - */ -int -db_load_dbt_rdump(dbenv, dbtp) - DB_ENV *dbenv; - DBT *dbtp; -{ - u_int32_t len; - u_int8_t *p; - int c1, c2, e, first; - char buf[32]; - - ++G(lineno); - - first = 1; - e = 0; - for (p = dbtp->data, len = 0; (c1 = getchar()) != '\n';) { - if (c1 == EOF) { - if (len == 0) { - G(endofile) = G(endodata) = 1; - return (0); - } - db_load_badend(dbenv); - return (1); - } - if (first) { - first = 0; - if (G(version) > 1) { - if (c1 != ' ') { - buf[0] = c1; - if (fgets(buf + 1, - sizeof(buf) - 1, stdin) == NULL || - strcmp(buf, "DATA=END\n") != 0) { - db_load_badend(dbenv); - return (1); - } - G(endodata) = 1; - return (0); - } - continue; - } - } - if ((c2 = getchar()) == EOF) { - db_load_badend(dbenv); - return (1); - } - if (len >= dbtp->ulen - 10) { - dbtp->ulen *= 2; - if ((dbtp->data = - (void *)realloc(dbtp->data, dbtp->ulen)) == NULL) { - dbenv->err(dbenv, ENOMEM, NULL); - return (1); - } - p = (u_int8_t *)dbtp->data + len; - } - ++len; - *p++ = db_load_digitize(dbenv, c1, &e) << 4 | db_load_digitize(dbenv, c2, &e); - if (e) - return (1); - } - dbtp->size = len; - - return (0); -} - -/* - * dbt_rrecno -- - * Read a record number dump line into a DBT structure. - */ -int -db_load_dbt_rrecno(dbenv, dbtp, ishex) - DB_ENV *dbenv; - DBT *dbtp; - int ishex; -{ - char buf[32], *p, *q; - - ++G(lineno); - - if (fgets(buf, sizeof(buf), stdin) == NULL) { - G(endofile) = G(endodata) = 1; - return (0); - } - - if (strcmp(buf, "DATA=END\n") == 0) { - G(endodata) = 1; - return (0); - } - - if (buf[0] != ' ') - goto bad; - - /* - * If we're expecting a hex key, do an in-place conversion - * of hex to straight ASCII before calling __db_getulong(). - */ - if (ishex) { - for (p = q = buf + 1; *q != '\0' && *q != '\n';) { - /* - * 0-9 in hex are 0x30-0x39, so this is easy. - * We should alternate between 3's and [0-9], and - * if the [0-9] are something unexpected, - * __db_getulong will fail, so we only need to catch - * end-of-string conditions. - */ - if (*q++ != '3') - goto bad; - if (*q == '\n' || *q == '\0') - goto bad; - *p++ = *q++; - } - *p = '\0'; - } - - if (__db_getulong(NULL, - G(progname), buf + 1, 0, 0, (u_long *)dbtp->data)) { -bad: db_load_badend(dbenv); - return (1); - } - - dbtp->size = sizeof(db_recno_t); - return (0); -} - -/* - * digitize -- - * Convert a character to an integer. - */ -int -db_load_digitize(dbenv, c, errorp) - DB_ENV *dbenv; - int c, *errorp; -{ - switch (c) { /* Don't depend on ASCII ordering. */ - case '0': return (0); - case '1': return (1); - case '2': return (2); - case '3': return (3); - case '4': return (4); - case '5': return (5); - case '6': return (6); - case '7': return (7); - case '8': return (8); - case '9': return (9); - case 'a': return (10); - case 'b': return (11); - case 'c': return (12); - case 'd': return (13); - case 'e': return (14); - case 'f': return (15); - } - - dbenv->errx(dbenv, "unexpected hexadecimal value"); - *errorp = 1; - - return (0); -} - -/* - * badnum -- - * Display the bad number message. - */ -void -db_load_badnum(dbenv) - DB_ENV *dbenv; -{ - dbenv->errx(dbenv, - "boolean name=value pairs require a value of 0 or 1"); -} - -/* - * badend -- - * Display the bad end to input message. - */ -void -db_load_badend(dbenv) - DB_ENV *dbenv; -{ - dbenv->errx(dbenv, "unexpected end of input data or key/data pair"); -} - -/* - * usage -- - * Display the usage message. - */ -int -db_load_usage() -{ - (void)fprintf(stderr, "%s\n\t%s\n", - "usage: db_load [-nTV] [-c name=value] [-f file]", - "[-h home] [-P password] [-t btree | hash | recno | queue] db_file"); - return (EXIT_FAILURE); -} - -int -db_load_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} - -int -db_load_env_create(dbenvp, ldg) - DB_ENV **dbenvp; - LDG *ldg; -{ - DB_ENV *dbenv; - int ret; - - if ((ret = db_env_create(dbenvp, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", ldg->progname, db_strerror(ret)); - return (ret); - } - dbenv = *dbenvp; - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, ldg->progname); - if (ldg->passwd != NULL && (ret = dbenv->set_encrypt(dbenv, - ldg->passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - return (ret); - } - if ((ret = db_load_db_init(dbenv, ldg->home, ldg->cache, &ldg->private)) != 0) - return (ret); - dbenv->app_private = ldg; - - return (0); -} diff --git a/bdb/build_vxworks/db_load/db_load.wpj b/bdb/build_vxworks/db_load/db_load.wpj deleted file mode 100755 index 59e194ae386..00000000000 --- a/bdb/build_vxworks/db_load/db_load.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_load.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_load.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_load.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_load.c_dependDone -FALSE - - - FILE_db_load.c_dependencies - - - - FILE_db_load.c_objects -db_load.o - - - FILE_db_load.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_load.c - - - userComments -db_load - diff --git a/bdb/build_vxworks/db_load/db_load/Makefile.custom b/bdb/build_vxworks/db_load/db_load/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_load/db_load/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_load/db_load/component.cdf b/bdb/build_vxworks/db_load/db_load/component.cdf deleted file mode 100755 index 7d1d2bc9586..00000000000 --- a/bdb/build_vxworks/db_load/db_load/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_LOAD { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_load.o - NAME db_load - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_load.o { - - NAME db_load.o - SRC_PATH_NAME $PRJ_DIR/../db_load.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_load/db_load/component.wpj b/bdb/build_vxworks/db_load/db_load/component.wpj deleted file mode 100755 index 216e7d9786c..00000000000 --- a/bdb/build_vxworks/db_load/db_load/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_load.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_load.c_objects -db_load.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_load.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_load.c_objects -db_load.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_load.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_load.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_load.c_objects -db_load.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_load.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_load.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_load.c_objects -db_load.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_load.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_load.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_printlog/db_printlog.c b/bdb/build_vxworks/db_printlog/db_printlog.c deleted file mode 100644 index 380e29021f5..00000000000 --- a/bdb/build_vxworks/db_printlog/db_printlog.c +++ /dev/null @@ -1,375 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_printlog.c,v 11.52 2002/08/08 03:50:38 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include -#include -#include -#include -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" -#include "dbinc/btree.h" -#include "dbinc/fop.h" -#include "dbinc/hash.h" -#include "dbinc/log.h" -#include "dbinc/qam.h" -#include "dbinc/rep.h" -#include "dbinc/txn.h" - -int db_printlog_main __P((int, char *[])); -int db_printlog_usage __P((void)); -int db_printlog_version_check __P((const char *)); -int db_printlog_print_app_record __P((DB_ENV *, DBT *, DB_LSN *, db_recops)); -int db_printlog_open_rep_db __P((DB_ENV *, DB **, DBC **)); - -int -db_printlog(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_printlog", args, &argc, &argv); - return (db_printlog_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_printlog_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - const char *progname = "db_printlog"; - DB *dbp; - DBC *dbc; - DB_ENV *dbenv; - DB_LOGC *logc; - int (**dtab) __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); - size_t dtabsize; - DBT data, keydbt; - DB_LSN key; - int ch, e_close, exitval, nflag, rflag, ret, repflag; - char *home, *passwd; - - if ((ret = db_printlog_version_check(progname)) != 0) - return (ret); - - dbp = NULL; - dbc = NULL; - logc = NULL; - e_close = exitval = nflag = rflag = repflag = 0; - home = passwd = NULL; - dtabsize = 0; - dtab = NULL; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "h:NP:rRV")) != EOF) - switch (ch) { - case 'h': - home = optarg; - break; - case 'N': - nflag = 1; - break; - case 'P': - passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - progname, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 'r': - rflag = 1; - break; - case 'R': - repflag = 1; - break; - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case '?': - default: - return (db_printlog_usage()); - } - argc -= optind; - argv += optind; - - if (argc > 0) - return (db_printlog_usage()); - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* - * Create an environment object and initialize it for error - * reporting. - */ - if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", progname, db_strerror(ret)); - goto shutdown; - } - e_close = 1; - - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - - if (nflag) { - if ((ret = dbenv->set_flags(dbenv, DB_NOLOCKING, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOLOCKING"); - goto shutdown; - } - if ((ret = dbenv->set_flags(dbenv, DB_NOPANIC, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOPANIC"); - goto shutdown; - } - } - - if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv, - passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - goto shutdown; - } - - /* - * Set up an app-specific dispatch function so that we can gracefully - * handle app-specific log records. - */ - if ((ret = dbenv->set_app_dispatch(dbenv, db_printlog_print_app_record)) != 0) { - dbenv->err(dbenv, ret, "app_dispatch"); - goto shutdown; - } - - /* - * An environment is required, but as all we're doing is reading log - * files, we create one if it doesn't already exist. If we create - * it, create it private so it automatically goes away when we're done. - * If we are reading the replication database, do not open the env - * with logging, because we don't want to log the opens. - */ - if (repflag) { - if ((ret = dbenv->open(dbenv, home, - DB_INIT_MPOOL | DB_USE_ENVIRON, 0)) != 0 && - (ret = dbenv->open(dbenv, home, - DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_USE_ENVIRON, 0)) - != 0) { - dbenv->err(dbenv, ret, "open"); - goto shutdown; - } - } else if ((ret = dbenv->open(dbenv, home, - DB_JOINENV | DB_USE_ENVIRON, 0)) != 0 && - (ret = dbenv->open(dbenv, home, - DB_CREATE | DB_INIT_LOG | DB_PRIVATE | DB_USE_ENVIRON, 0)) != 0) { - dbenv->err(dbenv, ret, "open"); - goto shutdown; - } - - /* Initialize print callbacks. */ - if ((ret = __bam_init_print(dbenv, &dtab, &dtabsize)) != 0 || - (ret = __dbreg_init_print(dbenv, &dtab, &dtabsize)) != 0 || - (ret = __crdel_init_print(dbenv, &dtab, &dtabsize)) != 0 || - (ret = __db_init_print(dbenv, &dtab, &dtabsize)) != 0 || - (ret = __fop_init_print(dbenv, &dtab, &dtabsize)) != 0 || - (ret = __qam_init_print(dbenv, &dtab, &dtabsize)) != 0 || - (ret = __ham_init_print(dbenv, &dtab, &dtabsize)) != 0 || - (ret = __txn_init_print(dbenv, &dtab, &dtabsize)) != 0) { - dbenv->err(dbenv, ret, "callback: initialization"); - goto shutdown; - } - - /* Allocate a log cursor. */ - if (repflag) { - if ((ret = db_printlog_open_rep_db(dbenv, &dbp, &dbc)) != 0) - goto shutdown; - } else if ((ret = dbenv->log_cursor(dbenv, &logc, 0)) != 0) { - dbenv->err(dbenv, ret, "DB_ENV->log_cursor"); - goto shutdown; - } - - memset(&data, 0, sizeof(data)); - memset(&keydbt, 0, sizeof(keydbt)); - while (!__db_util_interrupted()) { - if (repflag) { - ret = dbc->c_get(dbc, - &keydbt, &data, rflag ? DB_PREV : DB_NEXT); - if (ret == 0) - key = ((REP_CONTROL *)keydbt.data)->lsn; - } else - ret = logc->get(logc, - &key, &data, rflag ? DB_PREV : DB_NEXT); - if (ret != 0) { - if (ret == DB_NOTFOUND) - break; - dbenv->err(dbenv, - ret, repflag ? "DB_LOGC->get" : "DBC->get"); - goto shutdown; - } - - ret = __db_dispatch(dbenv, - dtab, dtabsize, &data, &key, DB_TXN_PRINT, NULL); - - /* - * XXX - * Just in case the underlying routines don't flush. - */ - (void)fflush(stdout); - - if (ret != 0) { - dbenv->err(dbenv, ret, "tx: dispatch"); - goto shutdown; - } - } - - if (0) { -shutdown: exitval = 1; - } - if (logc != NULL && (ret = logc->close(logc, 0)) != 0) - exitval = 1; - - if (dbc != NULL && (ret = dbc->c_close(dbc)) != 0) - exitval = 1; - - if (dbp != NULL && (ret = dbp->close(dbp, 0)) != 0) - exitval = 1; - - /* - * The dtab is allocated by __db_add_recovery (called by *_init_print) - * using the library malloc function (__os_malloc). It thus needs to be - * freed using the corresponding free (__os_free). - */ - if (dtab != NULL) - __os_free(dbenv, dtab); - if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -int -db_printlog_usage() -{ - fprintf(stderr, "%s\n", - "usage: db_printlog [-NrV] [-h home] [-P password]"); - return (EXIT_FAILURE); -} - -int -db_printlog_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} - -/* Print an unknown, application-specific log record as best we can. */ -int -db_printlog_print_app_record(dbenv, dbt, lsnp, op) - DB_ENV *dbenv; - DBT *dbt; - DB_LSN *lsnp; - db_recops op; -{ - int ch; - u_int32_t i, rectype; - - DB_ASSERT(op == DB_TXN_PRINT); - COMPQUIET(dbenv, NULL); - - /* - * Fetch the rectype, which always must be at the beginning of the - * record (if dispatching is to work at all). - */ - memcpy(&rectype, dbt->data, sizeof(rectype)); - - /* - * Applications may wish to customize the output here based on the - * rectype. We just print the entire log record in the generic - * mixed-hex-and-printable format we use for binary data. - */ - printf("[%lu][%lu]application specific record: rec: %lu\n", - (u_long)lsnp->file, (u_long)lsnp->offset, (u_long)rectype); - printf("\tdata: "); - for (i = 0; i < dbt->size; i++) { - ch = ((u_int8_t *)dbt->data)[i]; - printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); - } - printf("\n\n"); - - return (0); -} - -int -db_printlog_open_rep_db(dbenv, dbpp, dbcp) - DB_ENV *dbenv; - DB **dbpp; - DBC **dbcp; -{ - int ret; - - DB *dbp; - *dbpp = NULL; - *dbcp = NULL; - - if ((ret = db_create(dbpp, dbenv, 0)) != 0) { - dbenv->err(dbenv, ret, "db_create"); - return (ret); - } - - dbp = *dbpp; - if ((ret = - dbp->open(dbp, NULL, "__db.rep.db", NULL, DB_BTREE, 0, 0)) != 0) { - dbenv->err(dbenv, ret, "DB->open"); - goto err; - } - - if ((ret = dbp->cursor(dbp, NULL, dbcp, 0)) != 0) { - dbenv->err(dbenv, ret, "DB->cursor"); - goto err; - } - - return (0); - -err: if (*dbpp != NULL) - (void)(*dbpp)->close(*dbpp, 0); - return (ret); -} diff --git a/bdb/build_vxworks/db_printlog/db_printlog.wpj b/bdb/build_vxworks/db_printlog/db_printlog.wpj deleted file mode 100755 index 514122e6125..00000000000 --- a/bdb/build_vxworks/db_printlog/db_printlog.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_printlog.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_printlog.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_printlog.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_printlog.c_dependDone -FALSE - - - FILE_db_printlog.c_dependencies - - - - FILE_db_printlog.c_objects -db_printlog.o - - - FILE_db_printlog.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_printlog.c - - - userComments -db_printlog - diff --git a/bdb/build_vxworks/db_printlog/db_printlog/Makefile.custom b/bdb/build_vxworks/db_printlog/db_printlog/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_printlog/db_printlog/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_printlog/db_printlog/component.cdf b/bdb/build_vxworks/db_printlog/db_printlog/component.cdf deleted file mode 100755 index 57c645259a4..00000000000 --- a/bdb/build_vxworks/db_printlog/db_printlog/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_PRINTLOG { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_printlog.o - NAME db_printlog - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_printlog.o { - - NAME db_printlog.o - SRC_PATH_NAME $PRJ_DIR/../db_printlog.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_printlog/db_printlog/component.wpj b/bdb/build_vxworks/db_printlog/db_printlog/component.wpj deleted file mode 100755 index 81d2447459d..00000000000 --- a/bdb/build_vxworks/db_printlog/db_printlog/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_printlog.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_printlog.c_objects -db_printlog.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_printlog.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_printlog.c_objects -db_printlog.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_printlog.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_printlog.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_printlog.c_objects -db_printlog.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_printlog.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_printlog.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_printlog.c_objects -db_printlog.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_printlog.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_printlog.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_recover/db_recover.c b/bdb/build_vxworks/db_recover/db_recover.c deleted file mode 100644 index 055964c8508..00000000000 --- a/bdb/build_vxworks/db_recover/db_recover.c +++ /dev/null @@ -1,328 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_recover.c,v 11.33 2002/03/28 20:13:42 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#if TIME_WITH_SYS_TIME -#include -#include -#else -#if HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - -#include -#include -#include -#endif - -#include "db_int.h" -#include "dbinc/txn.h" - -int db_recover_main __P((int, char *[])); -int db_recover_read_timestamp __P((const char *, char *, time_t *)); -int db_recover_usage __P((void)); -int db_recover_version_check __P((const char *)); - -int -db_recover(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_recover", args, &argc, &argv); - return (db_recover_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_recover_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - const char *progname = "db_recover"; - DB_ENV *dbenv; - DB_TXNREGION *region; - time_t now, timestamp; - u_int32_t flags; - int ch, exitval, fatal_recover, ret, retain_env, verbose; - char *home, *passwd; - - if ((ret = db_recover_version_check(progname)) != 0) - return (ret); - - home = passwd = NULL; - timestamp = 0; - exitval = fatal_recover = retain_env = verbose = 0; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "ceh:P:t:Vv")) != EOF) - switch (ch) { - case 'c': - fatal_recover = 1; - break; - case 'e': - retain_env = 1; - break; - case 'h': - home = optarg; - break; - case 'P': - passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - progname, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 't': - if ((ret = - db_recover_read_timestamp(progname, optarg, ×tamp)) != 0) - return (ret); - break; - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case 'v': - verbose = 1; - break; - case '?': - default: - return (db_recover_usage()); - } - argc -= optind; - argv += optind; - - if (argc != 0) - return (db_recover_usage()); - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* - * Create an environment object and initialize it for error - * reporting. - */ - if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", progname, db_strerror(ret)); - return (EXIT_FAILURE); - } - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - if (verbose) { - (void)dbenv->set_verbose(dbenv, DB_VERB_RECOVERY, 1); - (void)dbenv->set_verbose(dbenv, DB_VERB_CHKPOINT, 1); - } - if (timestamp && - (ret = dbenv->set_tx_timestamp(dbenv, ×tamp)) != 0) { - dbenv->err(dbenv, ret, "DB_ENV->set_timestamp"); - goto shutdown; - } - - if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv, - passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - goto shutdown; - } - - /* - * Initialize the environment -- we don't actually do anything - * else, that all that's needed to run recovery. - * - * Note that unless the caller specified the -e option, we use a - * private environment, as we're about to create a region, and we - * don't want to to leave it around. If we leave the region around, - * the application that should create it will simply join it instead, - * and will then be running with incorrectly sized (and probably - * terribly small) caches. Applications that use -e should almost - * certainly use DB_CONFIG files in the directory. - */ - flags = 0; - LF_SET(DB_CREATE | DB_INIT_LOCK | DB_INIT_LOG | - DB_INIT_MPOOL | DB_INIT_TXN | DB_USE_ENVIRON); - LF_SET(fatal_recover ? DB_RECOVER_FATAL : DB_RECOVER); - LF_SET(retain_env ? 0 : DB_PRIVATE); - if ((ret = dbenv->open(dbenv, home, flags, 0)) != 0) { - dbenv->err(dbenv, ret, "DB_ENV->open"); - goto shutdown; - } - - if (verbose) { - (void)time(&now); - region = ((DB_TXNMGR *)dbenv->tx_handle)->reginfo.primary; - dbenv->errx(dbenv, "Recovery complete at %.24s", ctime(&now)); - dbenv->errx(dbenv, "%s %lx %s [%lu][%lu]", - "Maximum transaction id", (u_long)region->last_txnid, - "Recovery checkpoint", (u_long)region->last_ckp.file, - (u_long)region->last_ckp.offset); - } - - if (0) { -shutdown: exitval = 1; - } - - /* Clean up the environment. */ - if ((ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -#define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; - -/* - * read_timestamp -- - * Convert a time argument to Epoch seconds. - * - * Copyright (c) 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -int -db_recover_read_timestamp(progname, arg, timep) - const char *progname; - char *arg; - time_t *timep; -{ - struct tm *t; - time_t now; - int yearset; - char *p; - /* Start with the current time. */ - (void)time(&now); - if ((t = localtime(&now)) == NULL) { - fprintf(stderr, - "%s: localtime: %s\n", progname, strerror(errno)); - return (EXIT_FAILURE); - } - /* [[CC]YY]MMDDhhmm[.SS] */ - if ((p = strchr(arg, '.')) == NULL) - t->tm_sec = 0; /* Seconds defaults to 0. */ - else { - if (strlen(p + 1) != 2) - goto terr; - *p++ = '\0'; - t->tm_sec = ATOI2(p); - } - - yearset = 0; - switch(strlen(arg)) { - case 12: /* CCYYMMDDhhmm */ - t->tm_year = ATOI2(arg); - t->tm_year *= 100; - yearset = 1; - /* FALLTHROUGH */ - case 10: /* YYMMDDhhmm */ - if (yearset) { - yearset = ATOI2(arg); - t->tm_year += yearset; - } else { - yearset = ATOI2(arg); - if (yearset < 69) - t->tm_year = yearset + 2000; - else - t->tm_year = yearset + 1900; - } - t->tm_year -= 1900; /* Convert to UNIX time. */ - /* FALLTHROUGH */ - case 8: /* MMDDhhmm */ - t->tm_mon = ATOI2(arg); - --t->tm_mon; /* Convert from 01-12 to 00-11 */ - t->tm_mday = ATOI2(arg); - t->tm_hour = ATOI2(arg); - t->tm_min = ATOI2(arg); - break; - default: - goto terr; - } - - t->tm_isdst = -1; /* Figure out DST. */ - - *timep = mktime(t); - if (*timep == -1) { -terr: fprintf(stderr, - "%s: out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]", - progname); - return (EXIT_FAILURE); - } - return (0); -} - -int -db_recover_usage() -{ - (void)fprintf(stderr, "%s\n", -"usage: db_recover [-ceVv] [-h home] [-P password] [-t [[CC]YY]MMDDhhmm[.SS]]"); - return (EXIT_FAILURE); -} - -int -db_recover_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} diff --git a/bdb/build_vxworks/db_recover/db_recover.wpj b/bdb/build_vxworks/db_recover/db_recover.wpj deleted file mode 100755 index 2df7234233a..00000000000 --- a/bdb/build_vxworks/db_recover/db_recover.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_recover.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_recover.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_recover.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_recover.c_dependDone -FALSE - - - FILE_db_recover.c_dependencies - - - - FILE_db_recover.c_objects -db_recover.o - - - FILE_db_recover.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_recover.c - - - userComments -db_recover - diff --git a/bdb/build_vxworks/db_recover/db_recover/Makefile.custom b/bdb/build_vxworks/db_recover/db_recover/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_recover/db_recover/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_recover/db_recover/component.cdf b/bdb/build_vxworks/db_recover/db_recover/component.cdf deleted file mode 100755 index d322bf4a8fd..00000000000 --- a/bdb/build_vxworks/db_recover/db_recover/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_RECOVER { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_recover.o - NAME db_recover - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_recover.o { - - NAME db_recover.o - SRC_PATH_NAME $PRJ_DIR/../db_recover.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_recover/db_recover/component.wpj b/bdb/build_vxworks/db_recover/db_recover/component.wpj deleted file mode 100755 index 0daf9f6ca1e..00000000000 --- a/bdb/build_vxworks/db_recover/db_recover/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_recover.c_objects -db_recover.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_recover.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_recover.c_objects -db_recover.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_recover.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_recover.c_objects -db_recover.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_recover.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_recover.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_recover.c_objects -db_recover.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_recover.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_recover.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_stat/db_stat.c b/bdb/build_vxworks/db_stat/db_stat.c deleted file mode 100644 index 5e9348fa04a..00000000000 --- a/bdb/build_vxworks/db_stat/db_stat.c +++ /dev/null @@ -1,1282 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_stat.c,v 11.125 2002/08/08 15:26:15 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#if TIME_WITH_SYS_TIME -#include -#include -#else -#if HAVE_SYS_TIME_H -#include -#else -#include -#endif -#endif - -#include -#include -#include -#include -#endif - -#include "db_int.h" -#include "dbinc/db_page.h" - -#define PCT(f, t, pgsize) \ - ((t) == 0 ? 0 : \ - (((double)(((t) * (pgsize)) - (f)) / ((t) * (pgsize))) * 100)) - -typedef enum { T_NOTSET, - T_DB, T_ENV, T_LOCK, T_LOG, T_MPOOL, T_REP, T_TXN } test_t; - -int db_stat_argcheck __P((char *, const char *)); -int db_stat_btree_stats __P((DB_ENV *, DB *, DB_BTREE_STAT *, int)); -int db_stat_db_init __P((DB_ENV *, char *, test_t, u_int32_t, int *)); -void db_stat_dl __P((const char *, u_long)); -void db_stat_dl_bytes __P((const char *, u_long, u_long, u_long)); -int db_stat_env_stats __P((DB_ENV *, u_int32_t)); -int db_stat_hash_stats __P((DB_ENV *, DB *, int)); -int db_stat_lock_stats __P((DB_ENV *, char *, u_int32_t)); -int db_stat_log_stats __P((DB_ENV *, u_int32_t)); -int db_stat_main __P((int, char *[])); -int db_stat_mpool_stats __P((DB_ENV *, char *, u_int32_t)); -void db_stat_prflags __P((u_int32_t, const FN *)); -int db_stat_queue_stats __P((DB_ENV *, DB *, int)); -int db_stat_rep_stats __P((DB_ENV *, u_int32_t)); -int db_stat_txn_compare __P((const void *, const void *)); -int db_stat_txn_stats __P((DB_ENV *, u_int32_t)); -int db_stat_usage __P((void)); -int db_stat_version_check __P((const char *)); - -int -db_stat(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_stat", args, &argc, &argv); - return (db_stat_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_stat_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - const char *progname = "db_stat"; - DB_ENV *dbenv; - DB_BTREE_STAT *sp; - DB *alt_dbp, *dbp; - test_t ttype; - u_int32_t cache; - int ch, checked, d_close, e_close, exitval, fast, flags; - int nflag, private, resize, ret; - char *db, *home, *internal, *passwd, *subdb; - - if ((ret = db_stat_version_check(progname)) != 0) - return (ret); - - dbp = NULL; - ttype = T_NOTSET; - cache = MEGABYTE; - d_close = e_close = exitval = fast = flags = nflag = private = 0; - db = home = internal = passwd = subdb = NULL; - - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "C:cd:efh:lM:mNP:rs:tVZ")) != EOF) - switch (ch) { - case 'C': - if (ttype != T_NOTSET) - goto argcombo; - ttype = T_LOCK; - if (!db_stat_argcheck(internal = optarg, "Aclmop")) - return (db_stat_usage()); - break; - case 'c': - if (ttype != T_NOTSET) - goto argcombo; - ttype = T_LOCK; - break; - case 'd': - if (ttype != T_DB && ttype != T_NOTSET) - goto argcombo; - ttype = T_DB; - db = optarg; - break; - case 'e': - if (ttype != T_NOTSET) - goto argcombo; - ttype = T_ENV; - break; - case 'f': - fast = DB_FAST_STAT; - break; - case 'h': - home = optarg; - break; - case 'l': - if (ttype != T_NOTSET) - goto argcombo; - ttype = T_LOG; - break; - case 'M': - if (ttype != T_NOTSET) - goto argcombo; - ttype = T_MPOOL; - if (!db_stat_argcheck(internal = optarg, "Ahm")) - return (db_stat_usage()); - break; - case 'm': - if (ttype != T_NOTSET) - goto argcombo; - ttype = T_MPOOL; - break; - case 'N': - nflag = 1; - break; - case 'P': - passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - progname, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 'r': - if (ttype != T_NOTSET) - goto argcombo; - ttype = T_REP; - break; - case 's': - if (ttype != T_DB && ttype != T_NOTSET) - goto argcombo; - ttype = T_DB; - subdb = optarg; - break; - case 't': - if (ttype != T_NOTSET) { -argcombo: fprintf(stderr, - "%s: illegal option combination\n", - progname); - return (EXIT_FAILURE); - } - ttype = T_TXN; - break; - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case 'Z': - flags |= DB_STAT_CLEAR; - break; - case '?': - default: - return (db_stat_usage()); - } - argc -= optind; - argv += optind; - - switch (ttype) { - case T_DB: - if (db == NULL) - return (db_stat_usage()); - break; - case T_NOTSET: - return (db_stat_usage()); - /* NOTREACHED */ - default: - if (fast != 0) - return (db_stat_usage()); - break; - } - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* - * Create an environment object and initialize it for error - * reporting. - */ -retry: if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", progname, db_strerror(ret)); - goto shutdown; - } - e_close = 1; - - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - - if (nflag) { - if ((ret = dbenv->set_flags(dbenv, DB_NOLOCKING, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOLOCKING"); - goto shutdown; - } - if ((ret = dbenv->set_flags(dbenv, DB_NOPANIC, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOPANIC"); - goto shutdown; - } - } - - if (passwd != NULL && - (ret = dbenv->set_encrypt(dbenv, passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - goto shutdown; - } - - /* Initialize the environment. */ - if (db_stat_db_init(dbenv, home, ttype, cache, &private) != 0) - goto shutdown; - - switch (ttype) { - case T_DB: - /* Create the DB object and open the file. */ - if (flags != 0) - return (db_stat_usage()); - if ((ret = db_create(&dbp, dbenv, 0)) != 0) { - dbenv->err(dbenv, ret, "db_create"); - goto shutdown; - } - d_close = 1; - - if ((ret = dbp->open(dbp, - NULL, db, subdb, DB_UNKNOWN, DB_RDONLY, 0)) != 0) { - dbp->err(dbp, ret, "DB->open: %s", db); - goto shutdown; - } - - /* Check if cache is too small for this DB's pagesize. */ - if (private) { - if ((ret = - __db_util_cache(dbenv, dbp, &cache, &resize)) != 0) - goto shutdown; - if (resize) { - (void)dbp->close(dbp, 0); - d_close = 0; - - (void)dbenv->close(dbenv, 0); - e_close = 0; - goto retry; - } - } - - /* - * See if we can open this db read/write to update counts. - * If its a master-db then we cannot. So check to see, - * if its btree then it might be. - */ - checked = 0; - if (subdb == NULL && dbp->type == DB_BTREE) { - if ((ret = dbp->stat(dbp, &sp, DB_FAST_STAT)) != 0) { - dbp->err(dbp, ret, "DB->stat"); - goto shutdown; - } - checked = 1; - } - - if (subdb != NULL || - dbp->type != DB_BTREE || - (sp->bt_metaflags & BTM_SUBDB) == 0) { - if ((ret = db_create(&alt_dbp, dbenv, 0)) != 0) { - dbenv->err(dbenv, ret, "db_create"); - goto shutdown; - } - if ((ret = dbp->open(alt_dbp, NULL, - db, subdb, DB_UNKNOWN, 0, 0)) != 0) { - dbenv->err(dbenv, - ret, "DB->open: %s:%s", db, subdb); - (void)alt_dbp->close(alt_dbp, 0); - goto shutdown; - } - - (void)dbp->close(dbp, 0); - dbp = alt_dbp; - - /* Need to run again to update counts */ - checked = 0; - } - - switch (dbp->type) { - case DB_BTREE: - case DB_RECNO: - if (db_stat_btree_stats( - dbenv, dbp, checked == 1 ? sp : NULL, fast)) - goto shutdown; - break; - case DB_HASH: - if (db_stat_hash_stats(dbenv, dbp, fast)) - goto shutdown; - break; - case DB_QUEUE: - if (db_stat_queue_stats(dbenv, dbp, fast)) - goto shutdown; - break; - case DB_UNKNOWN: - dbenv->errx(dbenv, "Unknown database type."); - goto shutdown; - } - break; - case T_ENV: - if (db_stat_env_stats(dbenv, flags)) - goto shutdown; - break; - case T_LOCK: - if (db_stat_lock_stats(dbenv, internal, flags)) - goto shutdown; - break; - case T_LOG: - if (db_stat_log_stats(dbenv, flags)) - goto shutdown; - break; - case T_MPOOL: - if (db_stat_mpool_stats(dbenv, internal, flags)) - goto shutdown; - break; - case T_REP: - if (db_stat_rep_stats(dbenv, flags)) - goto shutdown; - break; - case T_TXN: - if (db_stat_txn_stats(dbenv, flags)) - goto shutdown; - break; - case T_NOTSET: - dbenv->errx(dbenv, "Unknown statistics flag."); - goto shutdown; - } - - if (0) { -shutdown: exitval = 1; - } - if (d_close && (ret = dbp->close(dbp, 0)) != 0) { - exitval = 1; - dbenv->err(dbenv, ret, "close"); - } - if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -/* - * env_stats -- - * Display environment statistics. - */ -int -db_stat_env_stats(dbenv, flags) - DB_ENV *dbenv; - u_int32_t flags; -{ - REGENV renv; - REGION *rp, regs[1024]; - int n, ret; - const char *lable; - - n = sizeof(regs) / sizeof(regs[0]); - if ((ret = __db_e_stat(dbenv, &renv, regs, &n, flags)) != 0) { - dbenv->err(dbenv, ret, "__db_e_stat"); - return (1); - } - - printf("%d.%d.%d\tEnvironment version.\n", - renv.majver, renv.minver, renv.patch); - printf("%lx\tMagic number.\n", (u_long)renv.magic); - printf("%d\tPanic value.\n", renv.envpanic); - - /* Adjust the reference count for us... */ - printf("%d\tReferences.\n", renv.refcnt - 1); - - db_stat_dl("Locks granted without waiting.\n", - (u_long)renv.mutex.mutex_set_nowait); - db_stat_dl("Locks granted after waiting.\n", - (u_long)renv.mutex.mutex_set_wait); - - while (n > 0) { - printf("%s\n", DB_LINE); - rp = ®s[--n]; - switch (rp->type) { - case REGION_TYPE_ENV: - lable = "Environment"; - break; - case REGION_TYPE_LOCK: - lable = "Lock"; - break; - case REGION_TYPE_LOG: - lable = "Log"; - break; - case REGION_TYPE_MPOOL: - lable = "Mpool"; - break; - case REGION_TYPE_MUTEX: - lable = "Mutex"; - break; - case REGION_TYPE_TXN: - lable = "Txn"; - break; - case INVALID_REGION_TYPE: - default: - lable = "Invalid"; - break; - } - printf("%s Region: %d.\n", lable, rp->id); - db_stat_dl_bytes("Size", (u_long)0, (u_long)0, (u_long)rp->size); - printf("%ld\tSegment ID.\n", rp->segid); - db_stat_dl("Locks granted without waiting.\n", - (u_long)rp->mutex.mutex_set_nowait); - db_stat_dl("Locks granted after waiting.\n", - (u_long)rp->mutex.mutex_set_wait); - } - - return (0); -} - -/* - * btree_stats -- - * Display btree/recno statistics. - */ -int -db_stat_btree_stats(dbenv, dbp, msp, fast) - DB_ENV *dbenv; - DB *dbp; - DB_BTREE_STAT *msp; - int fast; -{ - static const FN fn[] = { - { BTM_DUP, "duplicates" }, - { BTM_FIXEDLEN, "fixed-length" }, - { BTM_RECNO, "recno" }, - { BTM_RECNUM, "record-numbers" }, - { BTM_RENUMBER, "renumber" }, - { BTM_SUBDB, "multiple-databases" }, - { 0, NULL } - }; - DB_BTREE_STAT *sp; - int ret; - - COMPQUIET(dbenv, NULL); - - if (msp != NULL) - sp = msp; - else if ((ret = dbp->stat(dbp, &sp, fast)) != 0) { - dbp->err(dbp, ret, "DB->stat"); - return (1); - } - - printf("%lx\tBtree magic number.\n", (u_long)sp->bt_magic); - printf("%lu\tBtree version number.\n", (u_long)sp->bt_version); - db_stat_prflags(sp->bt_metaflags, fn); - if (dbp->type == DB_BTREE) { -#ifdef NOT_IMPLEMENTED - db_stat_dl("Maximum keys per-page.\n", (u_long)sp->bt_maxkey); -#endif - db_stat_dl("Minimum keys per-page.\n", (u_long)sp->bt_minkey); - } - if (dbp->type == DB_RECNO) { - db_stat_dl("Fixed-length record size.\n", (u_long)sp->bt_re_len); - if (isprint(sp->bt_re_pad) && !isspace(sp->bt_re_pad)) - printf("%c\tFixed-length record pad.\n", - (int)sp->bt_re_pad); - else - printf("0x%x\tFixed-length record pad.\n", - (int)sp->bt_re_pad); - } - db_stat_dl("Underlying database page size.\n", (u_long)sp->bt_pagesize); - db_stat_dl("Number of levels in the tree.\n", (u_long)sp->bt_levels); - db_stat_dl(dbp->type == DB_BTREE ? - "Number of unique keys in the tree.\n" : - "Number of records in the tree.\n", (u_long)sp->bt_nkeys); - db_stat_dl("Number of data items in the tree.\n", (u_long)sp->bt_ndata); - - db_stat_dl("Number of tree internal pages.\n", (u_long)sp->bt_int_pg); - db_stat_dl("Number of bytes free in tree internal pages", - (u_long)sp->bt_int_pgfree); - printf(" (%.0f%% ff).\n", - PCT(sp->bt_int_pgfree, sp->bt_int_pg, sp->bt_pagesize)); - - db_stat_dl("Number of tree leaf pages.\n", (u_long)sp->bt_leaf_pg); - db_stat_dl("Number of bytes free in tree leaf pages", - (u_long)sp->bt_leaf_pgfree); - printf(" (%.0f%% ff).\n", - PCT(sp->bt_leaf_pgfree, sp->bt_leaf_pg, sp->bt_pagesize)); - - db_stat_dl("Number of tree duplicate pages.\n", (u_long)sp->bt_dup_pg); - db_stat_dl("Number of bytes free in tree duplicate pages", - (u_long)sp->bt_dup_pgfree); - printf(" (%.0f%% ff).\n", - PCT(sp->bt_dup_pgfree, sp->bt_dup_pg, sp->bt_pagesize)); - - db_stat_dl("Number of tree overflow pages.\n", (u_long)sp->bt_over_pg); - db_stat_dl("Number of bytes free in tree overflow pages", - (u_long)sp->bt_over_pgfree); - printf(" (%.0f%% ff).\n", - PCT(sp->bt_over_pgfree, sp->bt_over_pg, sp->bt_pagesize)); - - db_stat_dl("Number of pages on the free list.\n", (u_long)sp->bt_free); - - free(sp); - - return (0); -} - -/* - * hash_stats -- - * Display hash statistics. - */ -int -db_stat_hash_stats(dbenv, dbp, fast) - DB_ENV *dbenv; - DB *dbp; - int fast; -{ - static const FN fn[] = { - { DB_HASH_DUP, "duplicates" }, - { DB_HASH_SUBDB,"multiple-databases" }, - { 0, NULL } - }; - DB_HASH_STAT *sp; - int ret; - - COMPQUIET(dbenv, NULL); - - if ((ret = dbp->stat(dbp, &sp, fast)) != 0) { - dbp->err(dbp, ret, "DB->stat"); - return (1); - } - - printf("%lx\tHash magic number.\n", (u_long)sp->hash_magic); - printf("%lu\tHash version number.\n", (u_long)sp->hash_version); - db_stat_prflags(sp->hash_metaflags, fn); - db_stat_dl("Underlying database page size.\n", (u_long)sp->hash_pagesize); - db_stat_dl("Specified fill factor.\n", (u_long)sp->hash_ffactor); - db_stat_dl("Number of keys in the database.\n", (u_long)sp->hash_nkeys); - db_stat_dl("Number of data items in the database.\n", (u_long)sp->hash_ndata); - - db_stat_dl("Number of hash buckets.\n", (u_long)sp->hash_buckets); - db_stat_dl("Number of bytes free on bucket pages", (u_long)sp->hash_bfree); - printf(" (%.0f%% ff).\n", - PCT(sp->hash_bfree, sp->hash_buckets, sp->hash_pagesize)); - - db_stat_dl("Number of overflow pages.\n", (u_long)sp->hash_bigpages); - db_stat_dl("Number of bytes free in overflow pages", - (u_long)sp->hash_big_bfree); - printf(" (%.0f%% ff).\n", - PCT(sp->hash_big_bfree, sp->hash_bigpages, sp->hash_pagesize)); - - db_stat_dl("Number of bucket overflow pages.\n", (u_long)sp->hash_overflows); - db_stat_dl("Number of bytes free in bucket overflow pages", - (u_long)sp->hash_ovfl_free); - printf(" (%.0f%% ff).\n", - PCT(sp->hash_ovfl_free, sp->hash_overflows, sp->hash_pagesize)); - - db_stat_dl("Number of duplicate pages.\n", (u_long)sp->hash_dup); - db_stat_dl("Number of bytes free in duplicate pages", - (u_long)sp->hash_dup_free); - printf(" (%.0f%% ff).\n", - PCT(sp->hash_dup_free, sp->hash_dup, sp->hash_pagesize)); - - db_stat_dl("Number of pages on the free list.\n", (u_long)sp->hash_free); - - free(sp); - - return (0); -} - -/* - * queue_stats -- - * Display queue statistics. - */ -int -db_stat_queue_stats(dbenv, dbp, fast) - DB_ENV *dbenv; - DB *dbp; - int fast; -{ - DB_QUEUE_STAT *sp; - int ret; - - COMPQUIET(dbenv, NULL); - - if ((ret = dbp->stat(dbp, &sp, fast)) != 0) { - dbp->err(dbp, ret, "DB->stat"); - return (1); - } - - printf("%lx\tQueue magic number.\n", (u_long)sp->qs_magic); - printf("%lu\tQueue version number.\n", (u_long)sp->qs_version); - db_stat_dl("Fixed-length record size.\n", (u_long)sp->qs_re_len); - if (isprint(sp->qs_re_pad) && !isspace(sp->qs_re_pad)) - printf("%c\tFixed-length record pad.\n", (int)sp->qs_re_pad); - else - printf("0x%x\tFixed-length record pad.\n", (int)sp->qs_re_pad); - db_stat_dl("Underlying database page size.\n", (u_long)sp->qs_pagesize); - if (sp->qs_extentsize != 0) - db_stat_dl("Underlying database extent size.\n", - (u_long)sp->qs_extentsize); - db_stat_dl("Number of records in the database.\n", (u_long)sp->qs_nkeys); - db_stat_dl("Number of database pages.\n", (u_long)sp->qs_pages); - db_stat_dl("Number of bytes free in database pages", (u_long)sp->qs_pgfree); - printf(" (%.0f%% ff).\n", - PCT(sp->qs_pgfree, sp->qs_pages, sp->qs_pagesize)); - printf("%lu\tFirst undeleted record.\n", (u_long)sp->qs_first_recno); - printf( - "%lu\tNext available record number.\n", (u_long)sp->qs_cur_recno); - - free(sp); - - return (0); -} - -/* - * lock_stats -- - * Display lock statistics. - */ -int -db_stat_lock_stats(dbenv, internal, flags) - DB_ENV *dbenv; - char *internal; - u_int32_t flags; -{ - DB_LOCK_STAT *sp; - int ret; - - if (internal != NULL) { - if ((ret = - dbenv->lock_dump_region(dbenv, internal, stdout)) != 0) { - dbenv->err(dbenv, ret, NULL); - return (1); - } - return (0); - } - - if ((ret = dbenv->lock_stat(dbenv, &sp, flags)) != 0) { - dbenv->err(dbenv, ret, NULL); - return (1); - } - - db_stat_dl("Last allocated locker ID.\n", (u_long)sp->st_id); - db_stat_dl("Current maximum unused locker ID.\n", (u_long)sp->st_cur_maxid); - db_stat_dl("Number of lock modes.\n", (u_long)sp->st_nmodes); - db_stat_dl("Maximum number of locks possible.\n", (u_long)sp->st_maxlocks); - db_stat_dl("Maximum number of lockers possible.\n", (u_long)sp->st_maxlockers); - db_stat_dl("Maximum number of lock objects possible.\n", - (u_long)sp->st_maxobjects); - db_stat_dl("Number of current locks.\n", (u_long)sp->st_nlocks); - db_stat_dl("Maximum number of locks at any one time.\n", - (u_long)sp->st_maxnlocks); - db_stat_dl("Number of current lockers.\n", (u_long)sp->st_nlockers); - db_stat_dl("Maximum number of lockers at any one time.\n", - (u_long)sp->st_maxnlockers); - db_stat_dl("Number of current lock objects.\n", (u_long)sp->st_nobjects); - db_stat_dl("Maximum number of lock objects at any one time.\n", - (u_long)sp->st_maxnobjects); - db_stat_dl("Total number of locks requested.\n", (u_long)sp->st_nrequests); - db_stat_dl("Total number of locks released.\n", (u_long)sp->st_nreleases); - db_stat_dl( - "Total number of lock requests failing because DB_LOCK_NOWAIT was set.\n", - (u_long)sp->st_nnowaits); - db_stat_dl( - "Total number of locks not immediately available due to conflicts.\n", - (u_long)sp->st_nconflicts); - db_stat_dl("Number of deadlocks.\n", (u_long)sp->st_ndeadlocks); - db_stat_dl("Lock timeout value.\n", (u_long)sp->st_locktimeout); - db_stat_dl("Number of locks that have timed out.\n", - (u_long)sp->st_nlocktimeouts); - db_stat_dl("Transaction timeout value.\n", (u_long)sp->st_txntimeout); - db_stat_dl("Number of transactions that have timed out.\n", - (u_long)sp->st_ntxntimeouts); - - db_stat_dl_bytes("The size of the lock region.", - (u_long)0, (u_long)0, (u_long)sp->st_regsize); - db_stat_dl("The number of region locks granted after waiting.\n", - (u_long)sp->st_region_wait); - db_stat_dl("The number of region locks granted without waiting.\n", - (u_long)sp->st_region_nowait); - - free(sp); - - return (0); -} - -/* - * log_stats -- - * Display log statistics. - */ -int -db_stat_log_stats(dbenv, flags) - DB_ENV *dbenv; - u_int32_t flags; -{ - DB_LOG_STAT *sp; - int ret; - - if ((ret = dbenv->log_stat(dbenv, &sp, flags)) != 0) { - dbenv->err(dbenv, ret, NULL); - return (1); - } - - printf("%lx\tLog magic number.\n", (u_long)sp->st_magic); - printf("%lu\tLog version number.\n", (u_long)sp->st_version); - db_stat_dl_bytes("Log record cache size", - (u_long)0, (u_long)0, (u_long)sp->st_lg_bsize); - printf("%#o\tLog file mode.\n", sp->st_mode); - if (sp->st_lg_size % MEGABYTE == 0) - printf("%luMb\tCurrent log file size.\n", - (u_long)sp->st_lg_size / MEGABYTE); - else if (sp->st_lg_size % 1024 == 0) - printf("%luKb\tCurrent log file size.\n", - (u_long)sp->st_lg_size / 1024); - else - printf("%lu\tCurrent log file size.\n", - (u_long)sp->st_lg_size); - db_stat_dl_bytes("Log bytes written", - (u_long)0, (u_long)sp->st_w_mbytes, (u_long)sp->st_w_bytes); - db_stat_dl_bytes("Log bytes written since last checkpoint", - (u_long)0, (u_long)sp->st_wc_mbytes, (u_long)sp->st_wc_bytes); - db_stat_dl("Total log file writes.\n", (u_long)sp->st_wcount); - db_stat_dl("Total log file write due to overflow.\n", - (u_long)sp->st_wcount_fill); - db_stat_dl("Total log file flushes.\n", (u_long)sp->st_scount); - printf("%lu\tCurrent log file number.\n", (u_long)sp->st_cur_file); - printf("%lu\tCurrent log file offset.\n", (u_long)sp->st_cur_offset); - printf("%lu\tOn-disk log file number.\n", (u_long)sp->st_disk_file); - printf("%lu\tOn-disk log file offset.\n", (u_long)sp->st_disk_offset); - - db_stat_dl("Max commits in a log flush.\n", (u_long)sp->st_maxcommitperflush); - db_stat_dl("Min commits in a log flush.\n", (u_long)sp->st_mincommitperflush); - - db_stat_dl_bytes("Log region size", - (u_long)0, (u_long)0, (u_long)sp->st_regsize); - db_stat_dl("The number of region locks granted after waiting.\n", - (u_long)sp->st_region_wait); - db_stat_dl("The number of region locks granted without waiting.\n", - (u_long)sp->st_region_nowait); - - free(sp); - - return (0); -} - -/* - * mpool_stats -- - * Display mpool statistics. - */ -int -db_stat_mpool_stats(dbenv, internal, flags) - DB_ENV *dbenv; - char *internal; - u_int32_t flags; -{ - DB_MPOOL_FSTAT **fsp; - DB_MPOOL_STAT *gsp; - int ret; - - if (internal != NULL) { - if ((ret = - dbenv->memp_dump_region(dbenv, internal, stdout)) != 0) { - dbenv->err(dbenv, ret, NULL); - return (1); - } - return (0); - } - - if ((ret = dbenv->memp_stat(dbenv, &gsp, &fsp, flags)) != 0) { - dbenv->err(dbenv, ret, NULL); - return (1); - } - - db_stat_dl_bytes("Total cache size", - (u_long)gsp->st_gbytes, (u_long)0, (u_long)gsp->st_bytes); - db_stat_dl("Number of caches.\n", (u_long)gsp->st_ncache); - db_stat_dl_bytes("Pool individual cache size", - (u_long)0, (u_long)0, (u_long)gsp->st_regsize); - db_stat_dl("Requested pages mapped into the process' address space.\n", - (u_long)gsp->st_map); - db_stat_dl("Requested pages found in the cache", (u_long)gsp->st_cache_hit); - if (gsp->st_cache_hit + gsp->st_cache_miss != 0) - printf(" (%.0f%%)", ((double)gsp->st_cache_hit / - (gsp->st_cache_hit + gsp->st_cache_miss)) * 100); - printf(".\n"); - db_stat_dl("Requested pages not found in the cache.\n", - (u_long)gsp->st_cache_miss); - db_stat_dl("Pages created in the cache.\n", (u_long)gsp->st_page_create); - db_stat_dl("Pages read into the cache.\n", (u_long)gsp->st_page_in); - db_stat_dl("Pages written from the cache to the backing file.\n", - (u_long)gsp->st_page_out); - db_stat_dl("Clean pages forced from the cache.\n", - (u_long)gsp->st_ro_evict); - db_stat_dl("Dirty pages forced from the cache.\n", - (u_long)gsp->st_rw_evict); - db_stat_dl("Dirty pages written by trickle-sync thread.\n", - (u_long)gsp->st_page_trickle); - db_stat_dl("Current total page count.\n", - (u_long)gsp->st_pages); - db_stat_dl("Current clean page count.\n", - (u_long)gsp->st_page_clean); - db_stat_dl("Current dirty page count.\n", - (u_long)gsp->st_page_dirty); - db_stat_dl("Number of hash buckets used for page location.\n", - (u_long)gsp->st_hash_buckets); - db_stat_dl("Total number of times hash chains searched for a page.\n", - (u_long)gsp->st_hash_searches); - db_stat_dl("The longest hash chain searched for a page.\n", - (u_long)gsp->st_hash_longest); - db_stat_dl("Total number of hash buckets examined for page location.\n", - (u_long)gsp->st_hash_examined); - db_stat_dl("The number of hash bucket locks granted without waiting.\n", - (u_long)gsp->st_hash_nowait); - db_stat_dl("The number of hash bucket locks granted after waiting.\n", - (u_long)gsp->st_hash_wait); - db_stat_dl("The maximum number of times any hash bucket lock was waited for.\n", - (u_long)gsp->st_hash_max_wait); - db_stat_dl("The number of region locks granted without waiting.\n", - (u_long)gsp->st_region_nowait); - db_stat_dl("The number of region locks granted after waiting.\n", - (u_long)gsp->st_region_wait); - db_stat_dl("The number of page allocations.\n", - (u_long)gsp->st_alloc); - db_stat_dl("The number of hash buckets examined during allocations\n", - (u_long)gsp->st_alloc_buckets); - db_stat_dl("The max number of hash buckets examined for an allocation\n", - (u_long)gsp->st_alloc_max_buckets); - db_stat_dl("The number of pages examined during allocations\n", - (u_long)gsp->st_alloc_pages); - db_stat_dl("The max number of pages examined for an allocation\n", - (u_long)gsp->st_alloc_max_pages); - - for (; fsp != NULL && *fsp != NULL; ++fsp) { - printf("%s\n", DB_LINE); - printf("Pool File: %s\n", (*fsp)->file_name); - db_stat_dl("Page size.\n", (u_long)(*fsp)->st_pagesize); - db_stat_dl("Requested pages mapped into the process' address space.\n", - (u_long)(*fsp)->st_map); - db_stat_dl("Requested pages found in the cache", - (u_long)(*fsp)->st_cache_hit); - if ((*fsp)->st_cache_hit + (*fsp)->st_cache_miss != 0) - printf(" (%.0f%%)", ((double)(*fsp)->st_cache_hit / - ((*fsp)->st_cache_hit + (*fsp)->st_cache_miss)) * - 100); - printf(".\n"); - db_stat_dl("Requested pages not found in the cache.\n", - (u_long)(*fsp)->st_cache_miss); - db_stat_dl("Pages created in the cache.\n", - (u_long)(*fsp)->st_page_create); - db_stat_dl("Pages read into the cache.\n", - (u_long)(*fsp)->st_page_in); - db_stat_dl("Pages written from the cache to the backing file.\n", - (u_long)(*fsp)->st_page_out); - } - - free(gsp); - - return (0); -} - -/* - * rep_stats -- - * Display replication statistics. - */ -int -db_stat_rep_stats(dbenv, flags) - DB_ENV *dbenv; - u_int32_t flags; -{ - DB_REP_STAT *sp; - int is_client, ret; - const char *p; - - if ((ret = dbenv->rep_stat(dbenv, &sp, flags)) != 0) { - dbenv->err(dbenv, ret, NULL); - return (1); - } - - is_client = 0; - switch (sp->st_status) { - case DB_REP_MASTER: - printf("Environment configured as a replication master.\n"); - break; - case DB_REP_CLIENT: - printf("Environment configured as a replication client.\n"); - is_client = 1; - break; - case DB_REP_LOGSONLY: - printf("Environment configured as a logs-only replica.\n"); - is_client = 1; - break; - default: - printf("Environment not configured for replication.\n"); - break; - } - - printf("%lu/%lu\t%s\n", - (u_long)sp->st_next_lsn.file, (u_long)sp->st_next_lsn.offset, - is_client ? "Next LSN expected." : "Next LSN to be used."); - p = sp->st_waiting_lsn.file == 0 ? - "Not waiting for any missed log records." : - "LSN of first missed log record being waited for."; - printf("%lu/%lu\t%s\n", - (u_long)sp->st_waiting_lsn.file, (u_long)sp->st_waiting_lsn.offset, - p); - - db_stat_dl("Number of duplicate master conditions detected.\n", - (u_long)sp->st_dupmasters); - if (sp->st_env_id != DB_EID_INVALID) - db_stat_dl("Current environment ID.\n", (u_long)sp->st_env_id); - else - printf("No current environment ID.\n"); - db_stat_dl("Current environment priority.\n", (u_long)sp->st_env_priority); - db_stat_dl("Current generation number.\n", (u_long)sp->st_gen); - db_stat_dl("Number of duplicate log records received.\n", - (u_long)sp->st_log_duplicated); - db_stat_dl("Number of log records currently queued.\n", - (u_long)sp->st_log_queued); - db_stat_dl("Maximum number of log records ever queued at once.\n", - (u_long)sp->st_log_queued_max); - db_stat_dl("Total number of log records queued.\n", - (u_long)sp->st_log_queued_total); - db_stat_dl("Number of log records received and appended to the log.\n", - (u_long)sp->st_log_records); - db_stat_dl("Number of log records missed and requested.\n", - (u_long)sp->st_log_requested); - if (sp->st_master != DB_EID_INVALID) - db_stat_dl("Current master ID.\n", (u_long)sp->st_master); - else - printf("No current master ID.\n"); - db_stat_dl("Number of times the master has changed.\n", - (u_long)sp->st_master_changes); - db_stat_dl("Number of messages received with a bad generation number.\n", - (u_long)sp->st_msgs_badgen); - db_stat_dl("Number of messages received and processed.\n", - (u_long)sp->st_msgs_processed); - db_stat_dl("Number of messages ignored due to pending recovery.\n", - (u_long)sp->st_msgs_recover); - db_stat_dl("Number of failed message sends.\n", - (u_long)sp->st_msgs_send_failures); - db_stat_dl("Number of messages sent.\n", (u_long)sp->st_msgs_sent); - db_stat_dl("Number of new site messages received.\n", (u_long)sp->st_newsites); - db_stat_dl("Transmission limited.\n", (u_long)sp->st_nthrottles); - db_stat_dl("Number of outdated conditions detected.\n", - (u_long)sp->st_outdated); - db_stat_dl("Number of transactions applied.\n", (u_long)sp->st_txns_applied); - - db_stat_dl("Number of elections held.\n", (u_long)sp->st_elections); - db_stat_dl("Number of elections won.\n", (u_long)sp->st_elections_won); - - if (sp->st_election_status == 0) - printf("No election in progress.\n"); - else { - db_stat_dl("Current election phase.\n", (u_long)sp->st_election_status); - db_stat_dl("Election winner.\n", - (u_long)sp->st_election_cur_winner); - db_stat_dl("Election generation number.\n", - (u_long)sp->st_election_gen); - printf("%lu/%lu\tMaximum LSN of election winner.\n", - (u_long)sp->st_election_lsn.file, - (u_long)sp->st_election_lsn.offset); - db_stat_dl("Number of sites expected to participate in elections.\n", - (u_long)sp->st_election_nsites); - db_stat_dl("Election priority.\n", (u_long)sp->st_election_priority); - db_stat_dl("Election tiebreaker value.\n", - (u_long)sp->st_election_tiebreaker); - db_stat_dl("Votes received this election round.\n", - (u_long)sp->st_election_votes); - } - - free(sp); - - return (0); -} - -/* - * txn_stats -- - * Display transaction statistics. - */ -int -db_stat_txn_stats(dbenv, flags) - DB_ENV *dbenv; - u_int32_t flags; -{ - DB_TXN_STAT *sp; - u_int32_t i; - int ret; - const char *p; - - if ((ret = dbenv->txn_stat(dbenv, &sp, flags)) != 0) { - dbenv->err(dbenv, ret, NULL); - return (1); - } - - p = sp->st_last_ckp.file == 0 ? - "No checkpoint LSN." : "File/offset for last checkpoint LSN."; - printf("%lu/%lu\t%s\n", - (u_long)sp->st_last_ckp.file, (u_long)sp->st_last_ckp.offset, p); - if (sp->st_time_ckp == 0) - printf("0\tNo checkpoint timestamp.\n"); - else - printf("%.24s\tCheckpoint timestamp.\n", - ctime(&sp->st_time_ckp)); - printf("%lx\tLast transaction ID allocated.\n", - (u_long)sp->st_last_txnid); - db_stat_dl("Maximum number of active transactions possible.\n", - (u_long)sp->st_maxtxns); - db_stat_dl("Active transactions.\n", (u_long)sp->st_nactive); - db_stat_dl("Maximum active transactions.\n", (u_long)sp->st_maxnactive); - db_stat_dl("Number of transactions begun.\n", (u_long)sp->st_nbegins); - db_stat_dl("Number of transactions aborted.\n", (u_long)sp->st_naborts); - db_stat_dl("Number of transactions committed.\n", (u_long)sp->st_ncommits); - db_stat_dl("Number of transactions restored.\n", (u_long)sp->st_nrestores); - - db_stat_dl_bytes("Transaction region size", - (u_long)0, (u_long)0, (u_long)sp->st_regsize); - db_stat_dl("The number of region locks granted after waiting.\n", - (u_long)sp->st_region_wait); - db_stat_dl("The number of region locks granted without waiting.\n", - (u_long)sp->st_region_nowait); - - qsort(sp->st_txnarray, - sp->st_nactive, sizeof(sp->st_txnarray[0]), db_stat_txn_compare); - for (i = 0; i < sp->st_nactive; ++i) { - printf("\tid: %lx; begin LSN: file/offset %lu/%lu", - (u_long)sp->st_txnarray[i].txnid, - (u_long)sp->st_txnarray[i].lsn.file, - (u_long)sp->st_txnarray[i].lsn.offset); - if (sp->st_txnarray[i].parentid == 0) - printf("\n"); - else - printf(" parent: %lx\n", - (u_long)sp->st_txnarray[i].parentid); - } - - free(sp); - - return (0); -} - -int -db_stat_txn_compare(a1, b1) - const void *a1, *b1; -{ - const DB_TXN_ACTIVE *a, *b; - - a = a1; - b = b1; - - if (a->txnid > b->txnid) - return (1); - if (a->txnid < b->txnid) - return (-1); - return (0); -} - -/* - * dl -- - * Display a big value. - */ -void -db_stat_dl(msg, value) - const char *msg; - u_long value; -{ - /* - * Two formats: if less than 10 million, display as the number, if - * greater than 10 million display as ###M. - */ - if (value < 10000000) - printf("%lu\t%s", value, msg); - else - printf("%luM\t%s", value / 1000000, msg); -} - -/* - * dl_bytes -- - * Display a big number of bytes. - */ -void -db_stat_dl_bytes(msg, gbytes, mbytes, bytes) - const char *msg; - u_long gbytes, mbytes, bytes; -{ - const char *sep; - - /* Normalize the values. */ - while (bytes >= MEGABYTE) { - ++mbytes; - bytes -= MEGABYTE; - } - while (mbytes >= GIGABYTE / MEGABYTE) { - ++gbytes; - mbytes -= GIGABYTE / MEGABYTE; - } - - sep = ""; - if (gbytes > 0) { - printf("%luGB", gbytes); - sep = " "; - } - if (mbytes > 0) { - printf("%s%luMB", sep, mbytes); - sep = " "; - } - if (bytes >= 1024) { - printf("%s%luKB", sep, bytes / 1024); - bytes %= 1024; - sep = " "; - } - if (bytes > 0) - printf("%s%luB", sep, bytes); - - printf("\t%s.\n", msg); -} - -/* - * prflags -- - * Print out flag values. - */ -void -db_stat_prflags(flags, fnp) - u_int32_t flags; - const FN *fnp; -{ - const char *sep; - - sep = "\t"; - printf("Flags:"); - for (; fnp->mask != 0; ++fnp) - if (fnp->mask & flags) { - printf("%s%s", sep, fnp->name); - sep = ", "; - } - printf("\n"); -} - -/* - * db_init -- - * Initialize the environment. - */ -int -db_stat_db_init(dbenv, home, ttype, cache, is_private) - DB_ENV *dbenv; - char *home; - test_t ttype; - u_int32_t cache; - int *is_private; -{ - u_int32_t oflags; - int ret; - - /* - * If our environment open fails, and we're trying to look at a - * shared region, it's a hard failure. - * - * We will probably just drop core if the environment we join does - * not include a memory pool. This is probably acceptable; trying - * to use an existing environment that does not contain a memory - * pool to look at a database can be safely construed as operator - * error, I think. - */ - *is_private = 0; - if ((ret = - dbenv->open(dbenv, home, DB_JOINENV | DB_USE_ENVIRON, 0)) == 0) - return (0); - if (ttype != T_DB && ttype != T_LOG) { - dbenv->err(dbenv, ret, "DB_ENV->open%s%s", - home == NULL ? "" : ": ", home == NULL ? "" : home); - return (1); - } - - /* - * We're looking at a database or set of log files and no environment - * exists. Create one, but make it private so no files are actually - * created. Declare a reasonably large cache so that we don't fail - * when reporting statistics on large databases. - * - * An environment is required to look at databases because we may be - * trying to look at databases in directories other than the current - * one. - */ - if ((ret = dbenv->set_cachesize(dbenv, 0, cache, 1)) != 0) { - dbenv->err(dbenv, ret, "set_cachesize"); - return (1); - } - *is_private = 1; - oflags = DB_CREATE | DB_PRIVATE | DB_USE_ENVIRON; - if (ttype == T_DB) - oflags |= DB_INIT_MPOOL; - if (ttype == T_LOG) - oflags |= DB_INIT_LOG; - if ((ret = dbenv->open(dbenv, home, oflags, 0)) == 0) - return (0); - - /* An environment is required. */ - dbenv->err(dbenv, ret, "open"); - return (1); -} - -/* - * argcheck -- - * Return if argument flags are okay. - */ -int -db_stat_argcheck(arg, ok_args) - char *arg; - const char *ok_args; -{ - for (; *arg != '\0'; ++arg) - if (strchr(ok_args, *arg) == NULL) - return (0); - return (1); -} - -int -db_stat_usage() -{ - fprintf(stderr, "%s\n\t%s\n", - "usage: db_stat [-celmNrtVZ] [-C Aclmop]", - "[-d file [-f] [-s database]] [-h home] [-M Ahlm] [-P password]"); - return (EXIT_FAILURE); -} - -int -db_stat_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} diff --git a/bdb/build_vxworks/db_stat/db_stat.wpj b/bdb/build_vxworks/db_stat/db_stat.wpj deleted file mode 100755 index ba78c4cc3fd..00000000000 --- a/bdb/build_vxworks/db_stat/db_stat.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_stat.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_stat.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_stat.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_stat.c_dependDone -FALSE - - - FILE_db_stat.c_dependencies - - - - FILE_db_stat.c_objects -db_stat.o - - - FILE_db_stat.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_stat.c - - - userComments -db_stat - diff --git a/bdb/build_vxworks/db_stat/db_stat/Makefile.custom b/bdb/build_vxworks/db_stat/db_stat/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_stat/db_stat/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_stat/db_stat/component.cdf b/bdb/build_vxworks/db_stat/db_stat/component.cdf deleted file mode 100755 index 728544eabff..00000000000 --- a/bdb/build_vxworks/db_stat/db_stat/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_STAT { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_stat.o - NAME db_stat - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_stat.o { - - NAME db_stat.o - SRC_PATH_NAME $PRJ_DIR/../db_stat.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_stat/db_stat/component.wpj b/bdb/build_vxworks/db_stat/db_stat/component.wpj deleted file mode 100755 index 2020d712dee..00000000000 --- a/bdb/build_vxworks/db_stat/db_stat/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_stat.c_objects -db_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_stat.c_objects -db_stat.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_stat.c_objects -db_stat.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_stat.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_stat.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_stat.c_objects -db_stat.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_stat.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_stat.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_upgrade/db_upgrade.c b/bdb/build_vxworks/db_upgrade/db_upgrade.c deleted file mode 100644 index 6f9138b59b9..00000000000 --- a/bdb/build_vxworks/db_upgrade/db_upgrade.c +++ /dev/null @@ -1,205 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_upgrade.c,v 1.31 2002/03/28 20:13:47 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include -#include -#include -#endif - -#include "db_int.h" - -int db_upgrade_main __P((int, char *[])); -int db_upgrade_usage __P((void)); -int db_upgrade_version_check __P((const char *)); - -int -db_upgrade(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_upgrade", args, &argc, &argv); - return (db_upgrade_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_upgrade_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - const char *progname = "db_upgrade"; - DB *dbp; - DB_ENV *dbenv; - u_int32_t flags; - int ch, e_close, exitval, nflag, ret, t_ret; - char *home, *passwd; - - if ((ret = db_upgrade_version_check(progname)) != 0) - return (ret); - - dbenv = NULL; - flags = nflag = 0; - e_close = exitval = 0; - home = passwd = NULL; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "h:NP:sV")) != EOF) - switch (ch) { - case 'h': - home = optarg; - break; - case 'N': - nflag = 1; - break; - case 'P': - passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - progname, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 's': - LF_SET(DB_DUPSORT); - break; - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case '?': - default: - return (db_upgrade_usage()); - } - argc -= optind; - argv += optind; - - if (argc <= 0) - return (db_upgrade_usage()); - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* - * Create an environment object and initialize it for error - * reporting. - */ - if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, "%s: db_env_create: %s\n", - progname, db_strerror(ret)); - goto shutdown; - } - e_close = 1; - - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - - if (nflag) { - if ((ret = dbenv->set_flags(dbenv, DB_NOLOCKING, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOLOCKING"); - goto shutdown; - } - if ((ret = dbenv->set_flags(dbenv, DB_NOPANIC, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOPANIC"); - goto shutdown; - } - } - - if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv, - passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - goto shutdown; - } - - /* - * If attaching to a pre-existing environment fails, create a - * private one and try again. - */ - if ((ret = dbenv->open(dbenv, - home, DB_JOINENV | DB_USE_ENVIRON, 0)) != 0 && - (ret = dbenv->open(dbenv, home, - DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_USE_ENVIRON, 0)) != 0) { - dbenv->err(dbenv, ret, "open"); - goto shutdown; - } - - for (; !__db_util_interrupted() && argv[0] != NULL; ++argv) { - if ((ret = db_create(&dbp, dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_create: %s\n", progname, db_strerror(ret)); - goto shutdown; - } - dbp->set_errfile(dbp, stderr); - dbp->set_errpfx(dbp, progname); - if ((ret = dbp->upgrade(dbp, argv[0], flags)) != 0) - dbp->err(dbp, ret, "DB->upgrade: %s", argv[0]); - if ((t_ret = dbp->close(dbp, 0)) != 0 && ret == 0) { - dbenv->err(dbenv, ret, "DB->close: %s", argv[0]); - ret = t_ret; - } - if (ret != 0) - goto shutdown; - } - - if (0) { -shutdown: exitval = 1; - } - if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -int -db_upgrade_usage() -{ - fprintf(stderr, "%s\n", - "usage: db_upgrade [-NsV] [-h home] [-P password] db_file ..."); - return (EXIT_FAILURE); -} - -int -db_upgrade_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} diff --git a/bdb/build_vxworks/db_upgrade/db_upgrade.wpj b/bdb/build_vxworks/db_upgrade/db_upgrade.wpj deleted file mode 100755 index 65f834d62d7..00000000000 --- a/bdb/build_vxworks/db_upgrade/db_upgrade.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_upgrade.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_upgrade.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_upgrade.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_upgrade.c_dependDone -FALSE - - - FILE_db_upgrade.c_dependencies - - - - FILE_db_upgrade.c_objects -db_upgrade.o - - - FILE_db_upgrade.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_upgrade.c - - - userComments -db_upgrade - diff --git a/bdb/build_vxworks/db_upgrade/db_upgrade/Makefile.custom b/bdb/build_vxworks/db_upgrade/db_upgrade/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_upgrade/db_upgrade/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_upgrade/db_upgrade/component.cdf b/bdb/build_vxworks/db_upgrade/db_upgrade/component.cdf deleted file mode 100755 index 7bbdebd4999..00000000000 --- a/bdb/build_vxworks/db_upgrade/db_upgrade/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_UPGRADE { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_upgrade.o - NAME db_upgrade - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_upgrade.o { - - NAME db_upgrade.o - SRC_PATH_NAME $PRJ_DIR/../db_upgrade.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_upgrade/db_upgrade/component.wpj b/bdb/build_vxworks/db_upgrade/db_upgrade/component.wpj deleted file mode 100755 index 1cc5f303e5d..00000000000 --- a/bdb/build_vxworks/db_upgrade/db_upgrade/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_upgrade.c_objects -db_upgrade.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_upgrade.c_objects -db_upgrade.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_upgrade.c_objects -db_upgrade.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_upgrade.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_upgrade.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_upgrade.c_objects -db_upgrade.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_upgrade.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_upgrade.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/db_verify/db_verify.c b/bdb/build_vxworks/db_verify/db_verify.c deleted file mode 100644 index cfa31195a85..00000000000 --- a/bdb/build_vxworks/db_verify/db_verify.c +++ /dev/null @@ -1,263 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1996-2002 - * Sleepycat Software. All rights reserved. - */ - -#include "db_config.h" - -#ifndef lint -static const char copyright[] = - "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n"; -static const char revid[] = - "$Id: db_verify.c,v 1.38 2002/08/08 03:51:38 bostic Exp $"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include - -#include -#include -#include -#include -#endif - -#include "db_int.h" - -int db_verify_main __P((int, char *[])); -int db_verify_usage __P((void)); -int db_verify_version_check __P((const char *)); - -int -db_verify(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("db_verify", args, &argc, &argv); - return (db_verify_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -db_verify_main(argc, argv) - int argc; - char *argv[]; -{ - extern char *optarg; - extern int optind, __db_getopt_reset; - const char *progname = "db_verify"; - DB *dbp, *dbp1; - DB_ENV *dbenv; - u_int32_t cache; - int ch, d_close, e_close, exitval, nflag, oflag, private; - int quiet, resize, ret, t_ret; - char *home, *passwd; - - if ((ret = db_verify_version_check(progname)) != 0) - return (ret); - - dbenv = NULL; - cache = MEGABYTE; - d_close = e_close = exitval = nflag = oflag = quiet = 0; - home = passwd = NULL; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "h:NoP:qV")) != EOF) - switch (ch) { - case 'h': - home = optarg; - break; - case 'N': - nflag = 1; - break; - case 'P': - passwd = strdup(optarg); - memset(optarg, 0, strlen(optarg)); - if (passwd == NULL) { - fprintf(stderr, "%s: strdup: %s\n", - progname, strerror(errno)); - return (EXIT_FAILURE); - } - break; - case 'o': - oflag = 1; - break; - case 'q': - quiet = 1; - break; - case 'V': - printf("%s\n", db_version(NULL, NULL, NULL)); - return (EXIT_SUCCESS); - case '?': - default: - return (db_verify_usage()); - } - argc -= optind; - argv += optind; - - if (argc <= 0) - return (db_verify_usage()); - - /* Handle possible interruptions. */ - __db_util_siginit(); - - /* - * Create an environment object and initialize it for error - * reporting. - */ -retry: if ((ret = db_env_create(&dbenv, 0)) != 0) { - fprintf(stderr, - "%s: db_env_create: %s\n", progname, db_strerror(ret)); - goto shutdown; - } - e_close = 1; - - if (!quiet) { - dbenv->set_errfile(dbenv, stderr); - dbenv->set_errpfx(dbenv, progname); - } - - if (nflag) { - if ((ret = dbenv->set_flags(dbenv, DB_NOLOCKING, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOLOCKING"); - goto shutdown; - } - if ((ret = dbenv->set_flags(dbenv, DB_NOPANIC, 1)) != 0) { - dbenv->err(dbenv, ret, "set_flags: DB_NOPANIC"); - goto shutdown; - } - } - - if (passwd != NULL && - (ret = dbenv->set_encrypt(dbenv, passwd, DB_ENCRYPT_AES)) != 0) { - dbenv->err(dbenv, ret, "set_passwd"); - goto shutdown; - } - /* - * Attach to an mpool if it exists, but if that fails, attach to a - * private region. In the latter case, declare a reasonably large - * cache so that we don't fail when verifying large databases. - */ - private = 0; - if ((ret = - dbenv->open(dbenv, home, DB_INIT_MPOOL | DB_USE_ENVIRON, 0)) != 0) { - if ((ret = dbenv->set_cachesize(dbenv, 0, cache, 1)) != 0) { - dbenv->err(dbenv, ret, "set_cachesize"); - goto shutdown; - } - private = 1; - if ((ret = dbenv->open(dbenv, home, - DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_USE_ENVIRON, 0)) != 0) { - dbenv->err(dbenv, ret, "open"); - goto shutdown; - } - } - - for (; !__db_util_interrupted() && argv[0] != NULL; ++argv) { - if ((ret = db_create(&dbp, dbenv, 0)) != 0) { - dbenv->err(dbenv, ret, "%s: db_create", progname); - goto shutdown; - } - d_close = 1; - - /* - * We create a 2nd dbp to this database to get its pagesize - * because the dbp we're using for verify cannot be opened. - */ - if (private) { - if ((ret = db_create(&dbp1, dbenv, 0)) != 0) { - dbenv->err( - dbenv, ret, "%s: db_create", progname); - goto shutdown; - } - - if ((ret = dbp1->open(dbp1, NULL, - argv[0], NULL, DB_UNKNOWN, DB_RDONLY, 0)) != 0) { - dbenv->err(dbenv, ret, "DB->open: %s", argv[0]); - (void)dbp1->close(dbp1, 0); - goto shutdown; - } - /* - * If we get here, we can check the cache/page. - * !!! - * If we have to retry with an env with a larger - * cache, we jump out of this loop. However, we - * will still be working on the same argv when we - * get back into the for-loop. - */ - ret = __db_util_cache(dbenv, dbp1, &cache, &resize); - (void)dbp1->close(dbp1, 0); - if (ret != 0) - goto shutdown; - - if (resize) { - (void)dbp->close(dbp, 0); - d_close = 0; - - (void)dbenv->close(dbenv, 0); - e_close = 0; - goto retry; - } - } - if ((ret = dbp->verify(dbp, - argv[0], NULL, NULL, oflag ? DB_NOORDERCHK : 0)) != 0) - dbp->err(dbp, ret, "DB->verify: %s", argv[0]); - if ((t_ret = dbp->close(dbp, 0)) != 0 && ret == 0) { - dbenv->err(dbenv, ret, "DB->close: %s", argv[0]); - ret = t_ret; - } - d_close = 0; - if (ret != 0) - goto shutdown; - } - - if (0) { -shutdown: exitval = 1; - } - - if (d_close && (ret = dbp->close(dbp, 0)) != 0) { - exitval = 1; - dbenv->err(dbenv, ret, "close"); - } - if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) { - exitval = 1; - fprintf(stderr, - "%s: dbenv->close: %s\n", progname, db_strerror(ret)); - } - - /* Resend any caught signal. */ - __db_util_sigresend(); - - return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -} - -int -db_verify_usage() -{ - fprintf(stderr, "%s\n", - "usage: db_verify [-NoqV] [-h home] [-P password] db_file ..."); - return (EXIT_FAILURE); -} - -int -db_verify_version_check(progname) - const char *progname; -{ - int v_major, v_minor, v_patch; - - /* Make sure we're loaded with the right version of the DB library. */ - (void)db_version(&v_major, &v_minor, &v_patch); - if (v_major != DB_VERSION_MAJOR || - v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) { - fprintf(stderr, - "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n", - progname, DB_VERSION_MAJOR, DB_VERSION_MINOR, - DB_VERSION_PATCH, v_major, v_minor, v_patch); - return (EXIT_FAILURE); - } - return (0); -} diff --git a/bdb/build_vxworks/db_verify/db_verify.wpj b/bdb/build_vxworks/db_verify/db_verify.wpj deleted file mode 100755 index d807c9853bf..00000000000 --- a/bdb/build_vxworks/db_verify/db_verify.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -db_verify.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/db_verify.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_db_verify.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_db_verify.c_dependDone -FALSE - - - FILE_db_verify.c_dependencies - - - - FILE_db_verify.c_objects -db_verify.o - - - FILE_db_verify.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/db_verify.c - - - userComments -db_verify - diff --git a/bdb/build_vxworks/db_verify/db_verify/Makefile.custom b/bdb/build_vxworks/db_verify/db_verify/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/db_verify/db_verify/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/db_verify/db_verify/component.cdf b/bdb/build_vxworks/db_verify/db_verify/component.cdf deleted file mode 100755 index f29f8246b57..00000000000 --- a/bdb/build_vxworks/db_verify/db_verify/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DB_VERIFY { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES db_verify.o - NAME db_verify - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module db_verify.o { - - NAME db_verify.o - SRC_PATH_NAME $PRJ_DIR/../db_verify.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/db_verify/db_verify/component.wpj b/bdb/build_vxworks/db_verify/db_verify/component.wpj deleted file mode 100755 index aca3ae8cb75..00000000000 --- a/bdb/build_vxworks/db_verify/db_verify/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_verify.c_objects -db_verify.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_verify.c_objects -db_verify.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_verify.c_objects -db_verify.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_verify.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_verify.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_verify.c_objects -db_verify.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_verify.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../db_verify.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/build_vxworks/dbdemo/dbdemo.c b/bdb/build_vxworks/dbdemo/dbdemo.c deleted file mode 100644 index 6dd2a25c54e..00000000000 --- a/bdb/build_vxworks/dbdemo/dbdemo.c +++ /dev/null @@ -1,178 +0,0 @@ -/*- - * See the file LICENSE for redistribution information. - * - * Copyright (c) 1997-2002 - * Sleepycat Software. All rights reserved. - * - * $Id: ex_access.c,v 11.22 2002/09/03 12:54:26 bostic Exp $ - */ - -#include - -#include -#include -#include - -#ifdef _WIN32 -extern int getopt(int, char * const *, const char *); -#else -#include -#endif - -#include -#include - -#define DATABASE "access.db" -int dbdemo_main __P((int, char *[])); -int dbdemo_usage __P((void)); - -int -dbdemo(args) - char *args; -{ - int argc; - char **argv; - - __db_util_arg("dbdemo", args, &argc, &argv); - return (dbdemo_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS); -} - -#include -#define ERROR_RETURN ERROR - -int -dbdemo_main(argc, argv) - int argc; - char *argv[]; -{ - extern int optind, __db_getopt_reset; - DB *dbp; - DBC *dbcp; - DBT key, data; - u_int32_t len; - int ch, ret, rflag; - char *database, *p, *t, buf[1024], rbuf[1024]; - const char *progname = "dbdemo"; /* Program name. */ - - rflag = 0; - __db_getopt_reset = 1; - while ((ch = getopt(argc, argv, "r")) != EOF) - switch (ch) { - case 'r': - rflag = 1; - break; - case '?': - default: - return (dbdemo_usage()); - } - argc -= optind; - argv += optind; - - /* Accept optional database name. */ - database = *argv == NULL ? DATABASE : argv[0]; - - /* Optionally discard the database. */ - if (rflag) - (void)remove(database); - - /* Create and initialize database object, open the database. */ - if ((ret = db_create(&dbp, NULL, 0)) != 0) { - fprintf(stderr, - "%s: db_create: %s\n", progname, db_strerror(ret)); - return (EXIT_FAILURE); - } - dbp->set_errfile(dbp, stderr); - dbp->set_errpfx(dbp, progname); - if ((ret = dbp->set_pagesize(dbp, 1024)) != 0) { - dbp->err(dbp, ret, "set_pagesize"); - goto err1; - } - if ((ret = dbp->set_cachesize(dbp, 0, 32 * 1024, 0)) != 0) { - dbp->err(dbp, ret, "set_cachesize"); - goto err1; - } - if ((ret = dbp->open(dbp, - NULL, database, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { - dbp->err(dbp, ret, "%s: open", database); - goto err1; - } - - /* - * Insert records into the database, where the key is the user - * input and the data is the user input in reverse order. - */ - memset(&key, 0, sizeof(DBT)); - memset(&data, 0, sizeof(DBT)); - for (;;) { - printf("input> "); - fflush(stdout); - if (fgets(buf, sizeof(buf), stdin) == NULL) - break; - if (strcmp(buf, "exit\n") == 0 || strcmp(buf, "quit\n") == 0) - break; - if ((len = strlen(buf)) <= 1) - continue; - for (t = rbuf, p = buf + (len - 2); p >= buf;) - *t++ = *p--; - *t++ = '\0'; - - key.data = buf; - data.data = rbuf; - data.size = key.size = len - 1; - - switch (ret = - dbp->put(dbp, NULL, &key, &data, DB_NOOVERWRITE)) { - case 0: - break; - default: - dbp->err(dbp, ret, "DB->put"); - if (ret != DB_KEYEXIST) - goto err1; - break; - } - } - printf("\n"); - - /* Acquire a cursor for the database. */ - if ((ret = dbp->cursor(dbp, NULL, &dbcp, 0)) != 0) { - dbp->err(dbp, ret, "DB->cursor"); - goto err1; - } - - /* Initialize the key/data pair so the flags aren't set. */ - memset(&key, 0, sizeof(key)); - memset(&data, 0, sizeof(data)); - - /* Walk through the database and print out the key/data pairs. */ - while ((ret = dbcp->c_get(dbcp, &key, &data, DB_NEXT)) == 0) - printf("%.*s : %.*s\n", - (int)key.size, (char *)key.data, - (int)data.size, (char *)data.data); - if (ret != DB_NOTFOUND) { - dbp->err(dbp, ret, "DBcursor->get"); - goto err2; - } - - /* Close everything down. */ - if ((ret = dbcp->c_close(dbcp)) != 0) { - dbp->err(dbp, ret, "DBcursor->close"); - goto err1; - } - if ((ret = dbp->close(dbp, 0)) != 0) { - fprintf(stderr, - "%s: DB->close: %s\n", progname, db_strerror(ret)); - return (EXIT_FAILURE); - } - return (EXIT_SUCCESS); - -err2: (void)dbcp->c_close(dbcp); -err1: (void)dbp->close(dbp, 0); - return (EXIT_FAILURE); -} - -int -dbdemo_usage() -{ - (void)fprintf(stderr, "usage: ex_access [-r] [database]\n"); - return (EXIT_FAILURE); -} diff --git a/bdb/build_vxworks/dbdemo/dbdemo.wpj b/bdb/build_vxworks/dbdemo/dbdemo.wpj deleted file mode 100755 index 52eec5ed945..00000000000 --- a/bdb/build_vxworks/dbdemo/dbdemo.wpj +++ /dev/null @@ -1,160 +0,0 @@ -Document file - DO NOT EDIT - - BUILD_PENTIUMgnu_BUILDRULE -dbdemo.out - - - BUILD_PENTIUMgnu_MACRO_AR -ar386 - - - BUILD_PENTIUMgnu_MACRO_ARCHIVE -$(PRJ_DIR)/PENTIUMgnu/dbdemo.a - - - BUILD_PENTIUMgnu_MACRO_AS -cc386 - - - BUILD_PENTIUMgnu_MACRO_CC -cc386 - - - BUILD_PENTIUMgnu_MACRO_CFLAGS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -I$(PRJ_DIR)/.. \ - -I$(PRJ_DIR)/../.. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CFLAGS_AS --g \ - -mpentium \ - -ansi \ - -nostdinc \ - -fvolatile \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu_MACRO_CPP -cc386 -E -P -xc - - - BUILD_PENTIUMgnu_MACRO_LD -ld386 - - - BUILD_PENTIUMgnu_MACRO_LDDEPS - - - - BUILD_PENTIUMgnu_MACRO_LDFLAGS --X -N - - - BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu_MACRO_NM -nm386 -g - - - BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE - - - - BUILD_PENTIUMgnu_MACRO_PRJ_LIBS - - - - BUILD_PENTIUMgnu_MACRO_SIZE -size386 - - - BUILD_PENTIUMgnu_RO_DEPEND_PATH -{$(WIND_BASE)/target/h/} \ - {$(WIND_BASE)/target/src/} \ - {$(WIND_BASE)/target/config/} - - - BUILD_PENTIUMgnu_TC -::tc_PENTIUMgnu - - - BUILD_RULE_archive - - - - BUILD_RULE_dbdemo.out - - - - BUILD_RULE_objects - - - - BUILD__CURRENT -PENTIUMgnu - - - BUILD__LIST -PENTIUMgnu - - - CORE_INFO_TYPE -::prj_vxApp - - - CORE_INFO_VERSION -2.0 - - - FILE_dbdemo.c_dependDone -FALSE - - - FILE_dbdemo.c_dependencies - - - - FILE_dbdemo.c_objects -dbdemo.o - - - FILE_dbdemo.c_tool -C/C++ compiler - - - PROJECT_FILES -$(PRJ_DIR)/dbdemo.c - - - userComments -dbdemo - diff --git a/bdb/build_vxworks/dbdemo/dbdemo/Makefile.custom b/bdb/build_vxworks/dbdemo/dbdemo/Makefile.custom deleted file mode 100644 index ca781f7b251..00000000000 --- a/bdb/build_vxworks/dbdemo/dbdemo/Makefile.custom +++ /dev/null @@ -1,51 +0,0 @@ -# -# Custom Makefile shell -# -# This file may be edited freely, since it will not be regenerated -# by the project manager. -# -# Use this makefile to define rules to make external binaries -# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory. -# -# If you have specified external modules during your component -# creation, you will find make rules already in place below. -# You will likely have to edit these to suit your individual -# build setup. -# -# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in -# your Makefile to support builds for different architectures. Use -# the FORCE_EXTERNAL_MAKE phony target to ensure that your external -# make always runs. -# -# The example below assumes that your custom makefile is in the -# mySourceTree directory, and that the binary file it produces -# is placed into the $(BUILD_SPEC) sub-directory. -# -# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree -# EXTERNAL_MODULE = myLibrary.o -# EXTERNAL_MAKE = make -# -# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE -# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \ -# -f $(EXTERNAL_SOURCE_BASE)/Makefile \ -# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F) -# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@) -# -# If you are not adding your external modules from the component wizard, -# you will have to include them in your component yourself: -# -# From the GUI, you can do this with the Component's 'Add external module' -# dialog. -# -# If you are using the command line, add the module(s) by editing the -# MODULES line in component.cdf file, e.g. -# -# Component INCLUDE_MYCOMPONENT { -# -# MODULES foo.o goo.o \ -# myLibrary.o -# - - -# rules to build custom libraries - diff --git a/bdb/build_vxworks/dbdemo/dbdemo/component.cdf b/bdb/build_vxworks/dbdemo/dbdemo/component.cdf deleted file mode 100755 index 188b63bfa4a..00000000000 --- a/bdb/build_vxworks/dbdemo/dbdemo/component.cdf +++ /dev/null @@ -1,30 +0,0 @@ -/* component.cdf - dynamically updated configuration */ - -/* - * NOTE: you may edit this file to alter the configuration - * But all non-configuration information, including comments, - * will be lost upon rebuilding this project. - */ - -/* Component information */ - -Component INCLUDE_DBDEMO { - ENTRY_POINTS ALL_GLOBAL_SYMBOLS - MODULES dbdemo.o - NAME dbdemo - PREF_DOMAIN ANY - _INIT_ORDER usrComponentsInit -} - -/* EntryPoint information */ - -/* Module information */ - -Module dbdemo.o { - - NAME dbdemo.o - SRC_PATH_NAME $PRJ_DIR/../dbdemo.c -} - -/* Parameter information */ - diff --git a/bdb/build_vxworks/dbdemo/dbdemo/component.wpj b/bdb/build_vxworks/dbdemo/dbdemo/component.wpj deleted file mode 100755 index b51ebce106e..00000000000 --- a/bdb/build_vxworks/dbdemo/dbdemo/component.wpj +++ /dev/null @@ -1,475 +0,0 @@ -Document file - DO NOT EDIT - - CORE_INFO_TYPE -::prj_component - - - CORE_INFO_VERSION -AE1.1 - - - BUILD__CURRENT -PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.debug_CURRENT_TARGET -default - - - BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../dbdemo.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../dbdemo.c_objects -dbdemo.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../dbdemo.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../dbdemo.c_objects -dbdemo.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../dbdemo.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.debug_RELEASE -0 - - - BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.debug_TC -::tc_PENTIUM2gnu.debug - - - BUILD_PENTIUM2gnu.release_DEFAULTFORCPU -0 - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../dbdemo.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../dbdemo.c_objects -dbdemo.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../dbdemo.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUM2gnu.release_MACRO_AR -arpentium - - - BUILD_PENTIUM2gnu.release_MACRO_AS -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CC -ccpentium - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS --mcpu=pentiumpro \ - -march=pentiumpro \ - -ansi \ - -O2 \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM2 - - - BUILD_PENTIUM2gnu.release_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUM2gnu.release_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUM2gnu.release_MACRO_LD -ldpentium - - - BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS --X - - - BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUM2gnu.release_MACRO_NM -nmpentium -g - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUM2gnu.release_MACRO_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_MACRO_SIZE -sizepentium - - - BUILD_PENTIUM2gnu.release_RELEASE -1 - - - BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUM2gnu.release_TC -::tc_PENTIUM2gnu.release - - - BUILD_PENTIUMgnu.debug_DEFAULTFORCPU -1 - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../dbdemo.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../dbdemo.c_objects -dbdemo.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../dbdemo.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags -toolMacro objects - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects -compConfig.o - - - BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro -CC - - - BUILD_PENTIUMgnu.debug_MACRO_AR -arpentium - - - BUILD_PENTIUMgnu.debug_MACRO_AS -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CC -ccpentium - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -DRW_MULTI_THREAD \ - -D_REENTRANT \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -MD \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -I$(PRJ_DIR)/../.. \ - -I$(PRJ_DIR)/../../.. \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS --mcpu=pentium \ - -march=pentium \ - -ansi \ - -g \ - -nostdlib \ - -fno-builtin \ - -fno-defer-pop \ - -P \ - -x \ - assembler-with-cpp \ - -Wall \ - -I. \ - -I$(WIND_BASE)/target/h \ - -DCPU=PENTIUM - - - BUILD_PENTIUMgnu.debug_MACRO_CPP -ccpentium -E -P - - - BUILD_PENTIUMgnu.debug_MACRO_CPPFILT -c++filtpentium --strip-underscores - - - BUILD_PENTIUMgnu.debug_MACRO_LD -ldpentium - - - BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS --X - - - BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL -ccpentium \ - -B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \ - -nostdlib \ - -r \ - -Wl,-X - - - BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS --X -r - - - BUILD_PENTIUMgnu.debug_MACRO_NM -nmpentium -g - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO --D - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE --MD - - - BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR --I - - - BUILD_PENTIUMgnu.debug_MACRO_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_MACRO_SIZE -sizepentium - - - BUILD_PENTIUMgnu.debug_RELEASE -0 - - - BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH -$(WIND_BASE)/target/h/ - - - BUILD_PENTIUMgnu.debug_TC -::tc_PENTIUMgnu.debug - - - BUILD__LIST -PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug - - - PROJECT_FILES -$(PRJ_DIR)/../dbdemo.c \ - $(PRJ_DIR)/compConfig.c - - - WCC__CDF_PATH -$(PRJ_DIR) - - - WCC__CURRENT -PENTIUM2gnu.debug - - - WCC__LIST -PENTIUM2gnu.debug - - - WCC__MXR_LIBS -lib$(CPU)$(TOOL)vx.a - - - WCC__OBJS_PATH -$(WIND_BASE)/target/lib/obj$CPU$TOOLvx - - diff --git a/bdb/dist/s_all b/bdb/dist/s_all index 51c9afabcae..65a19f271e7 100644 --- a/bdb/dist/s_all +++ b/bdb/dist/s_all @@ -1,20 +1,7 @@ #!/bin/sh - # $Id: s_all,v 1.10 2001/08/04 14:01:44 bostic Exp $ -make_dir() -{ - if test ! -d $1; then - echo "mkdir $1" - mkdir $1 - status=$? - if test $status -ne 0 && test ! -d $1; then - echo "error: $status" - fi - fi -} - -make_dir ../test_server -make_dir ../dbinc_auto +sh s_dir #sh s_perm # permissions. sh s_symlink # symbolic links. @@ -30,7 +17,7 @@ sh s_include # standard include files. sh s_win32 # Win32 include files. sh s_win32_dsp # Win32 build environment. -sh s_vxworks # VxWorks include files. -sh s_java # Java support. -sh s_test # Test suite support. -sh s_tags # Tags files. +#sh s_vxworks # VxWorks include files. +#sh s_java # Java support. +#sh s_test # Test suite support. +#sh s_tags # Tags files. diff --git a/bdb/dist/s_dir b/bdb/dist/s_dir new file mode 100644 index 00000000000..58513a8321d --- /dev/null +++ b/bdb/dist/s_dir @@ -0,0 +1,42 @@ +#!/bin/sh - + +make_dir() +{ + if test ! -d $1; then + echo "mkdir $1" + mkdir $1 + status=$? + if test $status -ne 0 && test ! -d $1; then + echo "error: $status" + fi + fi +} + +echo "Creating directories..." + +make_dir ../test_server +make_dir ../dbinc_auto +make_dir ../build_vxworks/BerkeleyDB +make_dir ../build_vxworks/db_archive +make_dir ../build_vxworks/db_archive/db_archive +make_dir ../build_vxworks/db_checkpoint +make_dir ../build_vxworks/db_checkpoint/db_checkpoint +make_dir ../build_vxworks/db_deadlock +make_dir ../build_vxworks/db_deadlock/db_deadlock +make_dir ../build_vxworks/db_dump +make_dir ../build_vxworks/db_dump/db_dump +make_dir ../build_vxworks/db_load +make_dir ../build_vxworks/db_load/db_load +make_dir ../build_vxworks/db_printlog +make_dir ../build_vxworks/db_printlog/db_printlog +make_dir ../build_vxworks/db_recover +make_dir ../build_vxworks/db_recover/db_recover +make_dir ../build_vxworks/db_stat +make_dir ../build_vxworks/db_stat/db_stat +make_dir ../build_vxworks/db_upgrade +make_dir ../build_vxworks/db_upgrade/db_upgrade +make_dir ../build_vxworks/db_verify +make_dir ../build_vxworks/db_verify/db_verify +make_dir ../build_vxworks/dbdemo/dbdemo +make_dir ../dbinc_auto + From ed4a4b89cdebaa31560fcbfd0f677e4b59a54123 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 18:35:58 +0400 Subject: [PATCH 210/246] correct some warnings with const char* --- readline/bind.c | 8 ++--- readline/display.c | 11 ++++--- readline/histexpand.c | 4 +-- readline/history.h | 4 +-- readline/isearch.c | 4 +-- readline/readline.h | 4 +-- readline/rlprivate.h | 22 ++++++------- readline/tcap.h | 2 +- readline/terminal.c | 77 ++++++++++++++++++++++--------------------- readline/text.c | 4 +-- readline/tilde.c | 2 +- 11 files changed, 72 insertions(+), 70 deletions(-) diff --git a/readline/bind.c b/readline/bind.c index 324499acf8f..7e8ca04e0d6 100644 --- a/readline/bind.c +++ b/readline/bind.c @@ -1629,17 +1629,17 @@ rl_set_keymap_from_edit_mode () } -char * +const char * rl_get_keymap_name_from_edit_mode () { if (rl_editing_mode == emacs_mode) - return (char*)"emacs"; + return "emacs"; #if defined (VI_MODE) else if (rl_editing_mode == vi_mode) - return (char*)"vi"; + return "vi"; #endif /* VI_MODE */ else - return (char*)"nope"; + return "nope"; } /* **************************************************************** */ diff --git a/readline/display.c b/readline/display.c index 82899d04f0c..f393e7e8516 100644 --- a/readline/display.c +++ b/readline/display.c @@ -121,7 +121,7 @@ int _rl_suppress_redisplay = 0; /* The stuff that gets printed out before the actual text of the line. This is usually pointing to rl_prompt. */ -char *rl_display_prompt = (char *)NULL; +const char *rl_display_prompt = (char *)NULL; /* Pseudo-global variables declared here. */ /* The visible cursor position. If you print some text, adjust this. */ @@ -382,7 +382,7 @@ rl_redisplay () register char *line; int c_pos, inv_botlin, lb_botlin, lb_linenum; int newlines, lpos, temp; - char *prompt_this_line; + const char *prompt_this_line; #if defined (HANDLE_MULTIBYTE) wchar_t wc; size_t wc_bytes; @@ -395,7 +395,7 @@ rl_redisplay () return; if (!rl_display_prompt) - rl_display_prompt = (char*)""; + rl_display_prompt = ""; if (invisible_line == 0) { @@ -1760,7 +1760,7 @@ rl_reset_line_state () { rl_on_new_line (); - rl_display_prompt = (char*)(rl_prompt ? rl_prompt : ""); + rl_display_prompt = rl_prompt ? rl_prompt : ""; forced_display = 1; return 0; } @@ -1999,7 +1999,8 @@ static void redraw_prompt (t) char *t; { - char *oldp, *oldl, *oldlprefix; + const char *oldp; + char *oldl, *oldlprefix; int oldlen, oldlast, oldplen, oldninvis; /* Geez, I should make this a struct. */ diff --git a/readline/histexpand.c b/readline/histexpand.c index a98067956c2..f01d54c5b1d 100644 --- a/readline/histexpand.c +++ b/readline/histexpand.c @@ -85,14 +85,14 @@ char history_comment_char = '\0'; /* The list of characters which inhibit the expansion of text if found immediately following history_expansion_char. */ -char *history_no_expand_chars = (char*)" \t\n\r="; +const char *history_no_expand_chars = " \t\n\r="; /* If set to a non-zero value, single quotes inhibit history expansion. The default is 0. */ int history_quotes_inhibit_expansion = 0; /* Used to split words by history_tokenize_internal. */ -char *history_word_delimiters = (char*)HISTORY_WORD_DELIMITERS; +const char *history_word_delimiters = HISTORY_WORD_DELIMITERS; /* If set, this points to a function that is called to verify that a particular history expansion should be performed. */ diff --git a/readline/history.h b/readline/history.h index 58b5de4655f..afd85104554 100644 --- a/readline/history.h +++ b/readline/history.h @@ -225,9 +225,9 @@ extern int history_length; extern int history_max_entries; extern char history_expansion_char; extern char history_subst_char; -extern char *history_word_delimiters; +extern const char *history_word_delimiters; extern char history_comment_char; -extern char *history_no_expand_chars; +extern const char *history_no_expand_chars; extern char *history_search_delimiter_chars; extern int history_quotes_inhibit_expansion; diff --git a/readline/isearch.c b/readline/isearch.c index c0604ce703c..137842a841f 100644 --- a/readline/isearch.c +++ b/readline/isearch.c @@ -70,7 +70,7 @@ static char *prev_line_found; static char *last_isearch_string; static int last_isearch_string_len; -static char default_isearch_terminators[] = "\033\012"; +static const char *default_isearch_terminators = "\033\012"; /* Search backwards through the history looking for a string which is typed interactively. Start with the current line. */ @@ -186,7 +186,7 @@ rl_search_history (direction, invoking_key) /* The list of characters which terminate the search, but are not subsequently executed. If the variable isearch-terminators has been set, we use that value, otherwise we use ESC and C-J. */ - char *isearch_terminators; + const char *isearch_terminators; RL_SETSTATE(RL_STATE_ISEARCH); orig_point = rl_point; diff --git a/readline/readline.h b/readline/readline.h index f11b3d0357c..9425de50aef 100644 --- a/readline/readline.h +++ b/readline/readline.h @@ -329,7 +329,7 @@ extern void rl_set_keymap PARAMS((Keymap)); extern Keymap rl_get_keymap PARAMS((void)); /* Undocumented; used internally only. */ extern void rl_set_keymap_from_edit_mode PARAMS((void)); -extern char *rl_get_keymap_name_from_edit_mode PARAMS((void)); +extern const char *rl_get_keymap_name_from_edit_mode PARAMS((void)); /* Functions for manipulating the funmap, which maps command names to functions. */ extern int rl_add_funmap_entry PARAMS((const char *, rl_command_func_t *)); @@ -390,7 +390,7 @@ extern void rl_resize_terminal PARAMS((void)); extern void rl_set_screen_size PARAMS((int, int)); extern void rl_get_screen_size PARAMS((int *, int *)); -extern char *rl_get_termcap PARAMS((const char *)); +extern const char *rl_get_termcap PARAMS((const char *)); /* Functions for character input. */ extern int rl_stuff_char PARAMS((int)); diff --git a/readline/rlprivate.h b/readline/rlprivate.h index 78bee107dcd..36645fb4a65 100644 --- a/readline/rlprivate.h +++ b/readline/rlprivate.h @@ -230,7 +230,7 @@ extern int _rl_page_completions; extern int _rl_vis_botlin; extern int _rl_last_c_pos; extern int _rl_suppress_redisplay; -extern char *rl_display_prompt; +extern const char *rl_display_prompt; /* isearch.c */ extern char *_rl_isearch_terminators; @@ -261,16 +261,16 @@ extern procenv_t readline_top_level; /* terminal.c */ extern int _rl_enable_keypad; extern int _rl_enable_meta; -extern char *_rl_term_clreol; -extern char *_rl_term_clrpag; -extern char *_rl_term_im; -extern char *_rl_term_ic; -extern char *_rl_term_ei; -extern char *_rl_term_DC; -extern char *_rl_term_up; -extern char *_rl_term_dc; -extern char *_rl_term_cr; -extern char *_rl_term_IC; +extern const char *_rl_term_clreol; +extern const char *_rl_term_clrpag; +extern const char *_rl_term_im; +extern const char *_rl_term_ic; +extern const char *_rl_term_ei; +extern const char *_rl_term_DC; +extern const char *_rl_term_up; +extern const char *_rl_term_dc; +extern const char *_rl_term_cr; +extern const char *_rl_term_IC; extern int _rl_screenheight; extern int _rl_screenwidth; extern int _rl_screenchars; diff --git a/readline/tcap.h b/readline/tcap.h index 58ab894d93e..4606520bf87 100644 --- a/readline/tcap.h +++ b/readline/tcap.h @@ -42,7 +42,7 @@ #endif extern char PC; -extern char *UP, *BC; +extern const char *UP, *BC; extern short ospeed; diff --git a/readline/terminal.c b/readline/terminal.c index c6f53e3a500..9ca4d6e43c5 100644 --- a/readline/terminal.c +++ b/readline/terminal.c @@ -84,40 +84,41 @@ static int tcap_initialized; # if defined (__EMX__) || defined (NEED_EXTERN_PC) extern # endif /* __EMX__ || NEED_EXTERN_PC */ -char PC, *BC, *UP; +const char PC; +const char *BC, *UP; #endif /* __linux__ */ /* Some strings to control terminal actions. These are output by tputs (). */ -char *_rl_term_clreol; -char *_rl_term_clrpag; -char *_rl_term_cr; -char *_rl_term_backspace; -char *_rl_term_goto; -char *_rl_term_pc; +const char *_rl_term_clreol; +const char *_rl_term_clrpag; +const char *_rl_term_cr; +const char *_rl_term_backspace; +const char *_rl_term_goto; +const char *_rl_term_pc; /* Non-zero if we determine that the terminal can do character insertion. */ int _rl_terminal_can_insert = 0; /* How to insert characters. */ -char *_rl_term_im; -char *_rl_term_ei; -char *_rl_term_ic; -char *_rl_term_ip; -char *_rl_term_IC; +const char *_rl_term_im; +const char *_rl_term_ei; +const char *_rl_term_ic; +const char *_rl_term_ip; +const char *_rl_term_IC; /* How to delete characters. */ -char *_rl_term_dc; -char *_rl_term_DC; +const char *_rl_term_dc; +const char *_rl_term_DC; #if defined (HACK_TERMCAP_MOTION) char *_rl_term_forward_char; #endif /* HACK_TERMCAP_MOTION */ /* How to go up a line. */ -char *_rl_term_up; +const char *_rl_term_up; /* A visible bell; char if the terminal can be made to flash the screen. */ -static char *_rl_visible_bell; +static const char *_rl_visible_bell; /* Non-zero means the terminal can auto-wrap lines. */ int _rl_term_autowrap; @@ -127,30 +128,30 @@ static int term_has_meta; /* The sequences to write to turn on and off the meta key, if this terminal has one. */ -static char *_rl_term_mm; -static char *_rl_term_mo; +static const char *_rl_term_mm; +static const char *_rl_term_mo; /* The key sequences output by the arrow keys, if this terminal has any. */ -static char *_rl_term_ku; -static char *_rl_term_kd; -static char *_rl_term_kr; -static char *_rl_term_kl; +static const char *_rl_term_ku; +static const char *_rl_term_kd; +static const char *_rl_term_kr; +static const char *_rl_term_kl; /* How to initialize and reset the arrow keys, if this terminal has any. */ -static char *_rl_term_ks; -static char *_rl_term_ke; +static const char *_rl_term_ks; +static const char *_rl_term_ke; /* The key sequences sent by the Home and End keys, if any. */ -static char *_rl_term_kh; -static char *_rl_term_kH; -static char *_rl_term_at7; /* @7 */ +static const char *_rl_term_kh; +static const char *_rl_term_kH; +static const char *_rl_term_at7; /* @7 */ /* Insert key */ -static char *_rl_term_kI; +static const char *_rl_term_kI; /* Cursor control */ -static char *_rl_term_vs; /* very visible */ -static char *_rl_term_ve; /* normal */ +static const char *_rl_term_vs; /* very visible */ +static const char *_rl_term_ve; /* normal */ static void bind_termcap_arrow_keys PARAMS((Keymap)); @@ -296,7 +297,7 @@ rl_resize_terminal () struct _tc_string { const char *tc_var; - char **tc_value; + const char **tc_value; }; /* This should be kept sorted, just in case we decide to change the @@ -416,7 +417,7 @@ _rl_init_terminal_io (terminal_name) /* Everything below here is used by the redisplay code (tputs). */ _rl_screenchars = _rl_screenwidth * _rl_screenheight; - _rl_term_cr = (char*)"\r"; + _rl_term_cr = "\r"; _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL; _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL; _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL; @@ -433,8 +434,8 @@ _rl_init_terminal_io (terminal_name) tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we change that later... */ PC = '\0'; - BC = _rl_term_backspace = (char*)"\b"; - UP = _rl_term_up; + BC = (char*)(_rl_term_backspace = "\b"); + UP = (char*)_rl_term_up; return 0; } @@ -444,11 +445,11 @@ _rl_init_terminal_io (terminal_name) /* Set up the variables that the termcap library expects the application to provide. */ PC = _rl_term_pc ? *_rl_term_pc : 0; - BC = _rl_term_backspace; - UP = _rl_term_up; + BC = (char*)_rl_term_backspace; + UP = (char*)_rl_term_up; if (!_rl_term_cr) - _rl_term_cr = (char*)"\r"; + _rl_term_cr = "\r"; _rl_term_autowrap = tgetflag ("am") && tgetflag ("xn"); @@ -500,7 +501,7 @@ bind_termcap_arrow_keys (map) _rl_keymap = xkeymap; } -char * +const char * rl_get_termcap (cap) const char *cap; { diff --git a/readline/text.c b/readline/text.c index f84fd91344f..81a468fdbda 100644 --- a/readline/text.c +++ b/readline/text.c @@ -1132,11 +1132,11 @@ int rl_insert_comment (count, key) int count __attribute__((unused)), key; { - char *rl_comment_text; + const char *rl_comment_text; int rl_comment_len; rl_beg_of_line (1, key); - rl_comment_text = (char*)(_rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); + rl_comment_text = _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT; if (rl_explicit_arg == 0) rl_insert_text (rl_comment_text); diff --git a/readline/tilde.c b/readline/tilde.c index 11209903cf8..fab4aab65ad 100644 --- a/readline/tilde.c +++ b/readline/tilde.c @@ -190,7 +190,7 @@ tilde_expand (string) int result_size, result_index; result_index = result_size = 0; - if ((result = (char*)strchr(string, '~'))) + if ((result = strchr(string, '~'))) result = (char *)xmalloc (result_size = (strlen (string) + 16)); else result = (char *)xmalloc (result_size = (strlen (string) + 1)); From 1049175831a4aa145f64e912388cc6079d7f5789 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 16:04:24 +0100 Subject: [PATCH 211/246] bdb build process requires s_test --- bdb/dist/s_all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bdb/dist/s_all b/bdb/dist/s_all index 65a19f271e7..ee0041032d8 100644 --- a/bdb/dist/s_all +++ b/bdb/dist/s_all @@ -19,5 +19,5 @@ sh s_win32 # Win32 include files. sh s_win32_dsp # Win32 build environment. #sh s_vxworks # VxWorks include files. #sh s_java # Java support. -#sh s_test # Test suite support. +sh s_test # Test suite support. #sh s_tags # Tags files. From 3853ff4de26c9e7d3dee8b3b14292311a7ff85ab Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 18:26:45 +0100 Subject: [PATCH 212/246] scripts/safe_mysqld.sh - fix setting of niceness level support-files/mysql.server.sh - applied some fixes from 4.0 mysql.server script - fix my.cnf parsing scripts/safe_mysqld.sh: - fix setting of niceness level, if one adds "renice -20 $$" to safe_mysqld as hinted in the manual (which could result in NOHUP_NICENESS having a value of "-15" and hence there would be one dash too much) support-files/mysql.server.sh: - applied some fixes from 4.0 mysql.server script - fix to actually parse the documented section ([mysql.server] not [mysql_server]) in my.cnf on startup --- scripts/safe_mysqld.sh | 2 +- support-files/mysql.server.sh | 40 +++++++++++++++++++++++------------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/scripts/safe_mysqld.sh b/scripts/safe_mysqld.sh index 2b625dbdfa3..2272443c972 100644 --- a/scripts/safe_mysqld.sh +++ b/scripts/safe_mysqld.sh @@ -159,7 +159,7 @@ then NOHUP_NICENESS=`nohup nice 2>&1` if test $? -eq 0 && test x"$NOHUP_NICENESS" != x0 && nice --1 echo foo > /dev/null 2>&1 then - NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup" + NOHUP_NICENESS="nice -n $NOHUP_NICENESS nohup" else NOHUP_NICENESS="nohup" fi diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index ecc49106c91..91821fd09e5 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -2,7 +2,7 @@ # Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB # This file is public domain and comes with NO WARRANTY of any kind -# Mysql daemon start/stop script. +# MySQL daemon start/stop script. # Usually this is put in /etc/init.d (at least on machines SYSV R4 based # systems) and linked to /etc/rc3.d/S99mysql and /etc/rc0.d/K01mysql. @@ -20,21 +20,31 @@ # Required-Stop: $local_fs $network $remote_fs # Default-Start: 3 5 # Default-Stop: 3 5 -# Short-Description: start and stop MySLQ +# Short-Description: start and stop MySQL # Description: MySQL is a very fast and reliable SQL database engine. ### END INIT INFO +# If you install MySQL on some other places than @prefix@, then you +# have to do one of the following things for this script to work: +# +# - Run this script from within the MySQL installation directory +# - Create a /etc/my.cnf file with the following information: +# [mysqld] +# basedir= +# - Add the above to any other configuration file (for example ~/.my.ini) +# and copy my_print_defaults to /usr/bin +# - Add the path to the mysql-installation-directory to the basedir variable +# below. +# +# If you want to affect other MySQL variables, you should make your changes +# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files. + +basedir= # The following variables are only set for letting mysql.server find things. -# If you want to affect other MySQL variables, you should make your changes -# in the /etc/my.cnf or other configuration files. - -PATH=/sbin:/usr/sbin:/bin:/usr/bin -export PATH # Set some defaults datadir=@localstatedir@ -basedir= pid_file= if test -z "$basedir" then @@ -43,6 +53,10 @@ then else bindir="$basedir/bin" fi + +PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin +export PATH + if test -z "$pid_file" then pid_file=$datadir/`@HOSTNAME@`.pid @@ -65,7 +79,7 @@ parse_arguments() { done } -# Get arguments from the my.cnf file, groups [mysqld] and [mysql_server] +# Get arguments from the my.cnf file, groups [mysqld] and [mysql.server] if test -x ./bin/my_print_defaults then print_defaults="./bin/my_print_defaults" @@ -103,7 +117,7 @@ else test -z "$print_defaults" && print_defaults="my_print_defaults" fi -parse_arguments `$print_defaults $defaults mysqld mysql_server` +parse_arguments `$print_defaults $defaults mysqld mysql.server` # Safeguard (relative paths, core dumps..) cd $basedir @@ -123,14 +137,14 @@ case "$mode" in touch /var/lock/subsys/mysql fi else - echo "Can't execute $bindir/safe_mysqld" + echo "Can't execute $bindir/safe_mysqld from dir $basedir" fi ;; 'stop') # Stop daemon. We use a signal here to avoid having to know the # root password. - if test -f "$pid_file" + if test -s "$pid_file" then mysqld_pid=`cat $pid_file` echo "Killing mysqld with pid $mysqld_pid" @@ -140,7 +154,7 @@ case "$mode" in sleep 1 while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ] do - [ -z "$flags" ] && echo "Wait for mysqld to exit\c" || echo ".\c" + [ -z "$flags" ] && echo -n "Wait for mysqld to exit" || echo -n "." flags=a$flags sleep 1 done From 7eafe60b3641e3d1c9067181bce7f465cfc742e8 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 10:04:42 -0800 Subject: [PATCH 213/246] protocol fixups --- libmysql/errmsg.c | 6 +- libmysql/libmysql.c | 291 ++++++++++++++++++++++++-------------- libmysql/libmysql.def | 20 ++- sql/item.cc | 17 +-- sql/item.h | 13 +- sql/mysql_priv.h | 2 +- sql/sql_class.h | 3 +- sql/sql_error.cc | 2 +- sql/sql_prepare.cc | 317 +++++++++++++++++++++++------------------- 9 files changed, 398 insertions(+), 273 deletions(-) diff --git a/libmysql/errmsg.c b/libmysql/errmsg.c index 0945aed6772..4b8613f460d 100644 --- a/libmysql/errmsg.c +++ b/libmysql/errmsg.c @@ -58,7 +58,7 @@ const char *client_errors[]= "No parameters exists in the statement", "Invalid parameter number", "Can't send long data for non string or binary data types (parameter: %d)", - "Using not supported parameter type: %d (parameter: %d)" + "Using un supported parameter type: %d (parameter: %d)" "Shared memory (%lu)", "Can't open shared memory. Request event don't create (%lu)", "Can't open shared memory. Answer event don't create (%lu)", @@ -111,7 +111,7 @@ const char *client_errors[]= "No parameters exists in the statement", "Invalid parameter number", "Can't send long data for non string or binary data types (parameter: %d)", - "Using not supported parameter type: %d (parameter: %d)" + "Using un supported parameter type: %d (parameter: %d)" "Shared memory (%lu)", "Can't open shared memory. Request event don't create (%lu)", "Can't open shared memory. Answer event don't create (%lu)", @@ -162,7 +162,7 @@ const char *client_errors[]= "No parameters exists in the statement", "Invalid parameter number", "Can't send long data for non string or binary data types (parameter: %d)", - "Using not supported parameter type: %d (parameter: %d)" + "Using un supported parameter type: %d (parameter: %d)" "Shared memory (%lu)", "Can't open shared memory. Request event don't create (%lu)", "Can't open shared memory. Answer event don't create (%lu)", diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 0bb6b54bee5..0912f8997f9 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -927,7 +927,8 @@ static const char *default_options[]= "character-sets-dir", "default-character-set", "interactive-timeout", "connect-timeout", "local-infile", "disable-local-infile", "replication-probe", "enable-reads-from-master", "repl-parse-query", - "ssl-cipher","protocol", "shared_memory_base_name", + "ssl-cipher","protocol", + "shared_memory_base_name", NullS }; @@ -1736,11 +1737,10 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) , Free strings in the SSL structure and clear 'use_ssl' flag. NB! Errors are not reported until you do mysql_real_connect. **************************************************************************/ - static void mysql_ssl_free(MYSQL *mysql __attribute__((unused))) { -#ifdef HAVE_OPENSSL +#ifdef HAVE_OPENSLL my_free(mysql->options.ssl_key, MYF(MY_ALLOW_ZERO_PTR)); my_free(mysql->options.ssl_cert, MYF(MY_ALLOW_ZERO_PTR)); my_free(mysql->options.ssl_ca, MYF(MY_ALLOW_ZERO_PTR)); @@ -1754,7 +1754,7 @@ mysql_ssl_free(MYSQL *mysql __attribute__((unused))) mysql->options.ssl_cipher= 0; mysql->options.use_ssl = FALSE; mysql->connector_fd = 0; -#endif /* HAVE_OPENSSL */ +#endif /* HAVE_OPENSLL */ } /************************************************************************** @@ -2567,7 +2567,7 @@ get_info: { mysql->affected_rows= net_field_length_ll(&pos); mysql->insert_id= net_field_length_ll(&pos); - if (mysql->server_capabilities & CLIENT_PROTOCOL_41) + if (protocol_41(mysql)) { mysql->server_status=uint2korr(pos); pos+=2; mysql->warning_count=uint2korr(pos); pos+=2; @@ -3650,10 +3650,10 @@ MYSQL_STMT *STDCALL mysql_prepare(MYSQL *mysql, const char *query, ulong length) { MYSQL_STMT *stmt; - DBUG_ENTER("mysql_real_prepare"); + DBUG_ENTER("mysql_prepare"); DBUG_ASSERT(mysql != 0); -#ifdef EXTRA_CHECK_ARGUMENTS +#ifdef CHECK_EXTRA_ARGUMENTS if (!query) { set_mysql_error(mysql, CR_NULL_POINTER); @@ -3674,7 +3674,6 @@ mysql_prepare(MYSQL *mysql, const char *query, ulong length) mysql_stmt_close(stmt); DBUG_RETURN(0); } - stmt->state= MY_ST_PREPARE; init_alloc_root(&stmt->mem_root,8192,0); if (read_prepare_result(mysql, stmt)) @@ -3682,8 +3681,8 @@ mysql_prepare(MYSQL *mysql, const char *query, ulong length) mysql_stmt_close(stmt); DBUG_RETURN(0); } - - stmt->mysql= mysql; + stmt->state= MY_ST_PREPARE; + stmt->mysql= mysql; DBUG_PRINT("info", ("Parameter count: %ld", stmt->param_count)); DBUG_RETURN(stmt); } @@ -3819,7 +3818,7 @@ static void store_param_str(NET *net, MYSQL_BIND *param) ulong length= *param->length; char *to= (char *) net_store_length((char *) net->write_pos, length); memcpy(to, param->buffer, length); - net->write_pos+= length; + net->write_pos= to+length; } @@ -3853,17 +3852,19 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param) MYSQL *mysql= stmt->mysql; NET *net = &mysql->net; DBUG_ENTER("store_param"); - DBUG_PRINT("enter",("type : %d, buffer :%lx", param->buffer_type, - param->buffer)); - - /* Allocate for worst case (long string) */ - if ((my_realloc_str(net, 9 + *param->length))) - return 1; - if (!param->buffer) + DBUG_PRINT("enter",("type: %d, buffer:%lx, length: %d", param->buffer_type, + param->buffer ? param->buffer : "0", *param->length)); + + if (param->is_null || param->buffer_type == MYSQL_TYPE_NULL) store_param_null(net, param); else + { + /* Allocate for worst case (long string) */ + if ((my_realloc_str(net, 9 + *param->length))) + DBUG_RETURN(1); (*param->store_param_func)(net, param); - DBUG_RETURN(1); + } + DBUG_RETURN(0); } @@ -3875,13 +3876,13 @@ static my_bool execute(MYSQL_STMT * stmt, char *packet, ulong length) { MYSQL *mysql= stmt->mysql; NET *net= &mysql->net; - char buff[4]; + char buff[MYSQL_STMT_HEADER]; DBUG_ENTER("execute"); DBUG_PRINT("enter",("packet: %s, length :%d",packet ? packet :" ", length)); mysql->last_used_con= mysql; int4store(buff, stmt->stmt_id); /* Send stmt id to server */ - if (advanced_command(mysql, COM_EXECUTE, buff, sizeof(buff), packet, + if (advanced_command(mysql, COM_EXECUTE, buff, MYSQL_STMT_HEADER, packet, length, 1) || mysql_read_query_result(mysql)) { @@ -3889,12 +3890,14 @@ static my_bool execute(MYSQL_STMT * stmt, char *packet, ulong length) DBUG_RETURN(1); } stmt->state= MY_ST_EXECUTE; - - if (stmt->bind) + mysql_free_result(stmt->result); +#if USED_IN_FETCH + if (stmt->res_buffers) /* Result buffers exists, cache results */ { mysql_free_result(stmt->result); stmt->result= mysql_store_result(mysql); } + #endif DBUG_RETURN(0); } @@ -3905,8 +3908,6 @@ static my_bool execute(MYSQL_STMT * stmt, char *packet, ulong length) int STDCALL mysql_execute(MYSQL_STMT *stmt) { - ulong length; - uint null_count; DBUG_ENTER("mysql_execute"); if (stmt->state == MY_ST_UNKNOWN) @@ -3920,14 +3921,18 @@ int STDCALL mysql_execute(MYSQL_STMT *stmt) NET *net= &stmt->mysql->net; MYSQL_BIND *param, *param_end; char *param_data; - my_bool result; + ulong length; + uint null_count; + my_bool result; - if (!stmt->params) +#ifdef CHECK_EXTRA_ARGUMENTS + if (!stmt->param_buffers) { /* Parameters exists, but no bound buffers */ set_stmt_error(stmt, CR_NOT_ALL_PARAMS_BOUND); DBUG_RETURN(1); } +#endif net_clear(net); /* Sets net->write_pos */ /* Reserve place for null-marker bytes */ null_count= (stmt->param_count+7) /8; @@ -3936,10 +3941,9 @@ int STDCALL mysql_execute(MYSQL_STMT *stmt) param_end= stmt->params + stmt->param_count; /* In case if buffers (type) altered, indicate to server */ - *(net->write_pos)++= (uchar) stmt->types_supplied; - if (!stmt->types_supplied) + *(net->write_pos)++= (uchar) stmt->send_types_to_server; + if (stmt->send_types_to_server) { - stmt->types_supplied=1; /* Store types of parameters in first in first package that is sent to the server. @@ -3953,21 +3957,22 @@ int STDCALL mysql_execute(MYSQL_STMT *stmt) /* Check for long data which has not been propery given/terminated */ if (param->is_long_data) { - if (!param->long_ended) - DBUG_RETURN(MYSQL_NEED_DATA); + if (!param->long_ended) + DBUG_RETURN(MYSQL_NEED_DATA); } else if (store_param(stmt, param)) - DBUG_RETURN(1); + DBUG_RETURN(1); } length= (ulong) (net->write_pos - net->buff); /* TODO: Look into avoding the following memdup */ - if (!(param_data= my_memdup((byte *) net->buff, length, MYF(0)))) + if (!(param_data= my_memdup( net->buff, length, MYF(0)))) { set_stmt_error(stmt, CR_OUT_OF_MEMORY); DBUG_RETURN(1); } net->write_pos= net->buff; /* Reset for net_write() */ result= execute(stmt, param_data, length); + stmt->send_types_to_server=0; my_free(param_data, MYF(MY_WME)); DBUG_RETURN(result); } @@ -4030,15 +4035,19 @@ my_bool STDCALL mysql_bind_param(MYSQL_STMT *stmt, MYSQL_BIND * bind) param->param_number); DBUG_RETURN(1); } + /* If param->length is not given, change it to point to bind_length. This way we can always use *param->length to get the length of data */ if (!param->length) param->length= ¶m->bind_length; - + /* Setup data copy functions for the different supported types */ switch (param->buffer_type) { + case MYSQL_TYPE_NULL: + param->is_null=1; + break; case MYSQL_TYPE_TINY: param->bind_length= 1; param->store_param_func= store_param_tinyint; @@ -4060,12 +4069,13 @@ my_bool STDCALL mysql_bind_param(MYSQL_STMT *stmt, MYSQL_BIND * bind) param->store_param_func= store_param_float; break; case MYSQL_TYPE_DOUBLE: - param->bind_length= 4; + param->bind_length= 8; param->store_param_func= store_param_double; break; case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_BLOB: + case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: param->bind_length= param->buffer_length; @@ -4078,7 +4088,8 @@ my_bool STDCALL mysql_bind_param(MYSQL_STMT *stmt, MYSQL_BIND * bind) } } /* We have to send/resendtype information to MySQL */ - stmt->types_supplied= 0; + stmt->send_types_to_server= 1; + stmt->param_buffers= 1; DBUG_RETURN(0); } @@ -4152,6 +4163,73 @@ mysql_send_long_data(MYSQL_STMT *stmt, uint param_number, Fetch-bind related implementations *********************************************************************/ +/**************************************************************************** + Functions to fetch data to application buffers + + All functions has the following characteristics: + + SYNOPSIS + fetch_result_xxx() + param MySQL bind param + row Row value + + RETURN VALUES + 0 ok + 1 Error (Can't alloc net->buffer) +****************************************************************************/ + + +static void fetch_result_tinyint(MYSQL_BIND *param, uchar **row) +{ + *param->buffer= (uchar) **row; + *row++; +} + +static void fetch_result_short(MYSQL_BIND *param, uchar **row) +{ + short value= *(short *)row; + int2store(param->buffer, value); + *row+=2; +} + +static void fetch_result_int32(MYSQL_BIND *param, uchar **row) +{ + int32 value= *(int32 *)row; + int4store(param->buffer, value); + *row+=4; +} + +static void fetch_result_int64(MYSQL_BIND *param, uchar **row) +{ + longlong value= *(longlong *)row; + int8store(param->buffer, value); + *row+=8; +} + +static void fetch_result_float(MYSQL_BIND *param, uchar **row) +{ + float value; + float4get(value,*row); + float4store(param->buffer, *row); + *row+=4; +} + +static void fetch_result_double(MYSQL_BIND *param, uchar **row) +{ + double value; + float8get(value,*row); + float8store(param->buffer, value); + *row+=8; +} + +static void fetch_result_str(MYSQL_BIND *param, uchar **row) +{ + ulong length= net_field_length(row); + memcpy(param->buffer, (char *)*row, length); + *param->length= length; + *row+=length; +} + /* Setup the bind buffers for resultset processing */ @@ -4163,21 +4241,62 @@ my_bool STDCALL mysql_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind) DBUG_ENTER("mysql_bind_result"); DBUG_ASSERT(stmt != 0); -#ifdef EXTRA_CHECK_ARGUMENTS +#ifdef CHECK_EXTRA_ARGUMENTS if (!bind) { set_stmt_error(stmt, CR_NULL_POINTER); DBUG_RETURN(1); } #endif - bind_count= stmt->result->field_count; + bind_count= stmt->field_count; memcpy((char*) stmt->bind, (char*) bind, sizeof(MYSQL_BIND)*bind_count); for (param= stmt->bind, end= param+bind_count; param < end ; param++) { - /* TODO: Set up convert functions like in mysql_bind_param */ + /* Setup data copy functions for the different supported types */ + switch (param->buffer_type) { + case MYSQL_TYPE_TINY: + param->bind_length= 1; + param->fetch_result= fetch_result_tinyint; + break; + case MYSQL_TYPE_SHORT: + param->bind_length= 2; + param->fetch_result= fetch_result_short; + break; + case MYSQL_TYPE_LONG: + param->bind_length= 4; + param->fetch_result= fetch_result_int32; + break; + case MYSQL_TYPE_LONGLONG: + param->bind_length= 8; + param->fetch_result= fetch_result_int64; + break; + case MYSQL_TYPE_FLOAT: + param->bind_length= 4; + param->fetch_result= fetch_result_float; + break; + case MYSQL_TYPE_DOUBLE: + param->bind_length= 8; + param->fetch_result= fetch_result_double; + break; + case MYSQL_TYPE_TINY_BLOB: + case MYSQL_TYPE_MEDIUM_BLOB: + case MYSQL_TYPE_LONG_BLOB: + case MYSQL_TYPE_VAR_STRING: + case MYSQL_TYPE_STRING: + param->length= ¶m->buffer_length; + param->fetch_result= fetch_result_str; + break; + default: + sprintf(stmt->last_error, ER(stmt->last_errno= CR_UNSUPPORTED_PARAM_TYPE), + param->buffer_type, param->param_number); + DBUG_RETURN(1); + } + if (!param->length) + param->length= ¶m->bind_length; } + stmt->res_buffers= 1; DBUG_RETURN(0); } @@ -4187,16 +4306,16 @@ my_bool STDCALL mysql_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind) */ static my_bool -my_fetch_row(MYSQL_STMT *stmt, MYSQL_RES *result, const byte *row) +stmt_fetch_row(MYSQL_STMT *stmt, uchar **row) { MYSQL_BIND *bind, *end; - uchar *null_ptr= (uchar*) row, bit; - - result->row_count++; - row+= (result->field_count+7)/8; - /* Copy complete row to application buffers */ + uchar *null_ptr= (uchar*) *row, bit; + + *row+= (stmt->field_count+7)/8; bit=1; - for (bind= stmt->bind, end= (MYSQL_BIND *) bind + result->field_count; + + /* Copy complete row to application buffers */ + for (bind= stmt->bind, end= (MYSQL_BIND *) bind + stmt->field_count; bind < end; bind++) { @@ -4205,7 +4324,7 @@ my_fetch_row(MYSQL_STMT *stmt, MYSQL_RES *result, const byte *row) else { bind->is_null= 0; - row= (byte*) (*bind->fetch_result)(bind, (char*) row); + (*bind->fetch_result)(bind, row); } if (! (bit<<=1) & 255) { @@ -4216,12 +4335,9 @@ my_fetch_row(MYSQL_STMT *stmt, MYSQL_RES *result, const byte *row) return 0; } - -static int -read_binary_data(MYSQL *mysql) -{ - ulong pkt_len; - if ((pkt_len= net_safe_read(mysql)) == packet_error) +static int read_binary_data(MYSQL *mysql) +{ + if (packet_error == net_safe_read(mysql)) return -1; if (mysql->net.read_pos[0]) return 1; /* End of data */ @@ -4235,57 +4351,30 @@ read_binary_data(MYSQL *mysql) int STDCALL mysql_fetch(MYSQL_STMT *stmt) { - MYSQL_RES *result; + MYSQL *mysql= stmt->mysql; DBUG_ENTER("mysql_fetch"); - result= stmt->result; - if (!result) - DBUG_RETURN(MYSQL_NO_DATA); - - if (!result->data) + if (stmt->res_buffers) { - MYSQL *mysql= stmt->mysql; - if (!result->eof) + int res; + if (!(res= read_binary_data(mysql))) { - int res; - if (!(res= read_binary_data(result->handle))) - DBUG_RETURN((int) my_fetch_row(stmt, result, - (byte*) mysql->net.read_pos+1)); - DBUG_PRINT("info", ("end of data")); - result->eof= 1; - result->handle->status= MYSQL_STATUS_READY; - - /* Don't clear handle in mysql_free_results */ - result->handle= 0; - if (res < 0) /* Network error */ - { - set_stmt_errmsg(stmt,(char *)mysql->net.last_error, - mysql->net.last_errno); - DBUG_RETURN(MYSQL_STATUS_ERROR); - } + if (stmt->res_buffers) + DBUG_RETURN((int) stmt_fetch_row(stmt,(uchar **) &mysql->net.read_pos+1)); + DBUG_RETURN(0); + } + DBUG_PRINT("info", ("end of data")); + mysql->status= MYSQL_STATUS_READY; + + if (res < 0) /* Network error */ + { + set_stmt_errmsg(stmt,(char *)mysql->net.last_error, + mysql->net.last_errno); + DBUG_RETURN(MYSQL_STATUS_ERROR); } DBUG_RETURN(MYSQL_NO_DATA); /* no more data */ } - { - /* - For prepared statements, the row data is a string of binary bytes, - not a set of string pointers as for normal statements - It's however convenient to use the data pointer also for prepared - statements. - */ - MYSQL_ROW values; - if (!result->data_cursor) - { - DBUG_PRINT("info", ("end of data")); - result->current_row= (MYSQL_ROW) NULL; - DBUG_RETURN(MYSQL_NO_DATA); - } - values= result->data_cursor->data; - result->data_cursor= result->data_cursor->next; - - DBUG_RETURN((int) my_fetch_row(stmt,result, (byte*) values)); - } - DBUG_RETURN(0); + DBUG_RETURN(0); //?? do we need to set MYSQL_STATUS_READY ? } @@ -4302,17 +4391,15 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) my_bool error=0; DBUG_ENTER("mysql_stmt_close"); - if (stmt->state) + if (stmt->state != MY_ST_UNKNOWN) { char buff[4]; int4store(buff, stmt->stmt_id); error= simple_command(stmt->mysql, COM_CLOSE_STMT, buff, 4, 0); } - + mysql_free_result(stmt->result); free_root(&stmt->mem_root, MYF(0)); my_free((gptr) stmt->query, MYF(MY_WME | MY_ALLOW_ZERO_PTR)); - my_free((gptr) stmt->bind, MY_ALLOW_ZERO_PTR); - my_free((gptr) stmt->params, MY_ALLOW_ZERO_PTR); my_free((gptr) stmt, MYF(MY_WME)); DBUG_RETURN(error); } diff --git a/libmysql/libmysql.def b/libmysql/libmysql.def index a7fb4d378e5..0d650467665 100644 --- a/libmysql/libmysql.def +++ b/libmysql/libmysql.def @@ -102,8 +102,24 @@ EXPORTS mysql_add_slave mysql_warning_count mysql_warnings - - + mysql_prepare + mysql_execute + mysql_param_count + mysql_bind_param + mysql_bind_result + mysql_prepare_result + mysql_stmt_close + mysql_stmt_error + mysql_stmt_errno + mysql_fetch + mysql_send_long_data + mysql_multi_query + mysql_next_result + mysql_commit + mysql_rollback + mysql_autocommit + + diff --git a/sql/item.cc b/sql/item.cc index 48ec11d02c2..cd321488548 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -315,32 +315,27 @@ void Item_param::set_null() void Item_param::set_int(longlong i) { int_value=(longlong)i; - item_result_type = INT_RESULT; item_type = INT_ITEM; } void Item_param::set_double(double value) { real_value=value; - item_result_type = REAL_RESULT; item_type = REAL_ITEM; } -void Item_param::set_value(const char *str, uint length, CHARSET_INFO *cs) +void Item_param::set_value(const char *str, uint length) { - str_value.set(str,length,cs); - item_result_type = STRING_RESULT; + str_value.set(str,length,thd_charset()); item_type = STRING_ITEM; } -void Item_param::set_longdata(const char *str, ulong length, CHARSET_INFO *cs) -{ - /* TODO: Fix this for binary handling by making use of - buffer_type.. - */ - str_value.append(str,length); +void Item_param::set_longdata(const char *str, ulong length) +{ + str_value.append(str,length); + long_data_supplied= 1; } diff --git a/sql/item.h b/sql/item.h index c67c16c50ad..490317f9bc9 100644 --- a/sql/item.h +++ b/sql/item.h @@ -186,8 +186,8 @@ public: Item_param(char *name_par=0) { name= name_par ? name_par : (char*) "?"; - long_data_supplied = false; - item_type = STRING_ITEM; + long_data_supplied= false; + item_type= STRING_ITEM; item_result_type = STRING_RESULT; } enum Type type() const { return item_type; } @@ -199,12 +199,13 @@ public: void set_null(); void set_int(longlong i); void set_double(double i); - void set_value(const char *str, uint length, CHARSET_INFO *cs); - void set_long_str(const char *str, ulong length, CHARSET_INFO *cs); - void set_long_binary(const char *str, ulong length, CHARSET_INFO *cs); - void set_longdata(const char *str, ulong length, CHARSET_INFO *cs); + void set_value(const char *str, uint length); + void set_long_str(const char *str, ulong length); + void set_long_binary(const char *str, ulong length); + void set_longdata(const char *str, ulong length); void set_long_end(); void reset() {} + void (*setup_param_func)(Item_param *param, uchar **pos); enum Item_result result_type () const { return item_result_type; } Item *new_item() { return new Item_param(name); } diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index c9b95963c32..98afe2681df 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -509,7 +509,7 @@ int mysqld_show_column_types(THD *thd); int mysqld_help (THD *thd, const char *text); /* sql_prepare.cc */ -int compare_prep_stmt(PREP_STMT *a, PREP_STMT *b, void *not_used); +int compare_prep_stmt(void *not_used, PREP_STMT *stmt, ulong *key); void free_prep_stmt(PREP_STMT *stmt, TREE_FREE mode, void *not_used); bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length); void mysql_stmt_execute(THD *thd, char *packet); diff --git a/sql/sql_class.h b/sql/sql_class.h index a619e8e3aff..20abfe64fe0 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -325,7 +325,7 @@ typedef struct st_prep_stmt uint param_count; uint last_errno; char last_error[MYSQL_ERRMSG_SIZE]; - bool error_in_prepare, long_data_used; + bool error_in_prepare, long_data_used, param_inited; } PREP_STMT; @@ -510,7 +510,6 @@ public: bool safe_to_cache_query; bool volatile killed; bool prepare_command; - Item_param *params; // Pointer to array of params /* If we do a purge of binary logs, log index info of the threads diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 3d6a0fa24aa..768c54c202e 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -115,7 +115,7 @@ static const char *warning_level_names[]= {"Note", "Warning", "Error", "?"}; my_bool mysqld_show_warnings(THD *thd, ulong levels_to_show) { List field_list; - DBUG_ENTER("mysqld_show_errors"); + DBUG_ENTER("mysqld_show_warnings"); field_list.push_back(new Item_empty_string("Level", 7)); field_list.push_back(new Item_int("Code",0,4)); diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 08377a10501..4bc66778ffb 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -30,10 +30,11 @@ Prepare: Prepare-execute: - Server gets the command 'COM_EXECUTE' to execute the - previously prepared query. - - If there is are any parameters, then replace the markers with the - data supplied by client with the following format: - [types_specified(0/1)][type][length][data] .. [type][length].. + previously prepared query. If there is any param markers; then client + will send the data in the following format: + [null_bits][types_specified(0/1)][[length][data]][[length][data] .. [length][data]. + - Replace the param items with this new data. If it is a first execute + or types altered by client; then setup the conversion routines. - Execute the query without re-parsing and send back the results to client @@ -53,33 +54,9 @@ Long data handling: #include // for DEBUG_ASSERT() #include // for isspace() -extern int yyparse(void); -static ulong get_param_length(uchar **packet); -static uint get_buffer_type(uchar **packet); -static bool param_is_null(uchar **packet); -static bool setup_param_fields(THD *thd,List ¶ms); -static uchar* setup_param_field(Item_param *item_param, uchar *pos, - uint buffer_type); -static void setup_longdata_field(Item_param *item_param, uchar *pos); -static bool setup_longdata(THD *thd,List ¶ms); -static bool send_prepare_results(PREP_STMT *stmt); -static bool parse_prepare_query(PREP_STMT *stmt, char *packet, uint length); -static bool mysql_send_insert_fields(PREP_STMT *stmt, TABLE_LIST *table_list, - List &fields, - List &values_list, - thr_lock_type lock_type); -static bool mysql_test_insert_fields(PREP_STMT *stmt, TABLE_LIST *table_list, - List &fields, - List &values_list, - thr_lock_type lock_type); -static bool mysql_test_upd_fields(PREP_STMT *stmt, TABLE_LIST *table_list, - List &fields, List &values, - COND *conds,thr_lock_type lock_type); -static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables, - List &fields, List &values, - COND *conds, ORDER *order, ORDER *group, - Item *having,thr_lock_type lock_type); +#define IS_PARAM_NULL(pos, param_no) pos[param_no/8] & (1 << param_no & 7) +extern int yyparse(void); /* Find prepared statement in thd @@ -114,9 +91,9 @@ static PREP_STMT *find_prepared_statement(THD *thd, ulong stmt_id, Compare two prepared statements; Used to find a prepared statement */ -int compare_prep_stmt(PREP_STMT *a, PREP_STMT *b, void *not_used) +int compare_prep_stmt(void *not_used, PREP_STMT *stmt, ulong *key) { - return (a->stmt_id < b->stmt_id) ? -1 : (a->stmt_id == b->stmt_id) ? 0 : 1; + return (stmt->stmt_id == *key) ? 0 : (stmt->stmt_id < *key) ? -1 : 1; } @@ -132,22 +109,23 @@ int compare_prep_stmt(PREP_STMT *a, PREP_STMT *b, void *not_used) */ void free_prep_stmt(PREP_STMT *stmt, TREE_FREE mode, void *not_used) -{ - free_root(&stmt->mem_root, MYF(0)); +{ free_items(stmt->free_list); + free_root(&stmt->mem_root, MYF(0)); } /* Send prepared stmt info to client after prepare */ -bool send_prep_stmt(PREP_STMT *stmt, uint columns) +static bool send_prep_stmt(PREP_STMT *stmt, uint columns) { + NET *net=&stmt->thd->net; char buff[8]; int4store(buff, stmt->stmt_id); int2store(buff+4, columns); int2store(buff+6, stmt->param_count); - return my_net_write(&stmt->thd->net, buff, sizeof(buff)); + return (my_net_write(net, buff, sizeof(buff)) || net_flush(net)); } /* @@ -156,43 +134,15 @@ bool send_prep_stmt(PREP_STMT *stmt, uint columns) TODO: Not yet ready */ -bool send_item_params(PREP_STMT *stmt) +static bool send_item_params(PREP_STMT *stmt) { +#if 0 char buff[1]; buff[0]=0; - return my_net_write(&stmt->thd->net, buff, sizeof(buff)); -} - - - -/* - Read the buffer type, this happens only first time -*/ - -static uint get_buffer_type(uchar **packet) -{ - reg1 uchar *pos= *packet; - (*packet)+= 2; - return (uint) uint2korr(pos); -} - - -/* - Check for NULL param data - - RETURN VALUES - 0 Value was not NULL - 1 Value was NULL -*/ - -static bool param_is_null(uchar **packet) -{ - reg1 uchar *pos= *packet; - if (*pos == 251) - { - (*packet)++; + if (my_net_write(&stmt->thd->net, buff, sizeof(buff))) return 1; - } + send_eof(stmt->thd); +#endif return 0; } @@ -222,60 +172,103 @@ static ulong get_param_length(uchar **packet) (*packet)+=9; // Must be 254 when here return (ulong) uint4korr(pos+1); } + /* + Setup param conversion routines -/* - Read and return the data for parameters supplied by client + setup_param_xx() + param Parameter Item + pos Input data buffer + + All these functions reads the data from pos and sets up that data + through 'param' and advances the buffer position to predifined + length position. + + Make a note that the NULL handling is examined at first execution + (i.e. when input types altered) and for all subsequent executions + we don't read any values for this. + + RETURN VALUES + */ -static uchar* setup_param_field(Item_param *item_param, - uchar *pos, uint buffer_type) +static void setup_param_tiny(Item_param *param, uchar **pos) { - if (param_is_null(&pos)) - { - item_param->set_null(); - return(pos); - } - switch (buffer_type) { + param->set_int((longlong)(**pos)); + *pos+= 1; +} + +static void setup_param_short(Item_param *param, uchar **pos) +{ + param->set_int((longlong)sint2korr(*pos)); + *pos+= 2; +} + +static void setup_param_int32(Item_param *param, uchar **pos) +{ + param->set_int((longlong)sint4korr(*pos)); + *pos+= 4; +} + +static void setup_param_int64(Item_param *param, uchar **pos) +{ + param->set_int((longlong)sint8korr(*pos)); + *pos+= 8; +} + +static void setup_param_float(Item_param *param, uchar **pos) +{ + float data; + float4get(data,*pos); + param->set_double((double) data); + *pos+= 4; +} + +static void setup_param_double(Item_param *param, uchar **pos) +{ + double data; + float8get(data,*pos); + param->set_double((double) data); + *pos+= 8; +} + +static void setup_param_str(Item_param *param, uchar **pos) +{ + ulong len=get_param_length(pos); + param->set_value((const char *)*pos, len); + *pos+=len; +} + +static void setup_param_functions(Item_param *param, uchar read_pos) +{ + switch (read_pos) { case FIELD_TYPE_TINY: - item_param->set_int((longlong)(*pos)); - pos += 1; + param->setup_param_func= setup_param_tiny; + param->item_result_type = INT_RESULT; break; case FIELD_TYPE_SHORT: - item_param->set_int((longlong)sint2korr(pos)); - pos += 2; - break; - case FIELD_TYPE_INT24: - item_param->set_int((longlong)sint4korr(pos)); - pos += 3; + param->setup_param_func= setup_param_short; + param->item_result_type = INT_RESULT; break; case FIELD_TYPE_LONG: - item_param->set_int((longlong)sint4korr(pos)); - pos += 4; + param->setup_param_func= setup_param_int32; + param->item_result_type = INT_RESULT; break; case FIELD_TYPE_LONGLONG: - item_param->set_int((longlong)sint8korr(pos)); - pos += 8; + param->setup_param_func= setup_param_int64; + param->item_result_type = INT_RESULT; break; case FIELD_TYPE_FLOAT: - float data; - float4get(data,pos); - item_param->set_double((double) data); - pos += 4; + param->setup_param_func= setup_param_float; + param->item_result_type = REAL_RESULT; break; case FIELD_TYPE_DOUBLE: - double j; - float8get(j,pos) - item_param->set_double(j); - pos += 8; + param->setup_param_func= setup_param_double; + param->item_result_type = REAL_RESULT; break; default: - { - ulong len=get_param_length(&pos); - item_param->set_value((const char*)pos,len,current_thd->thd_charset); - pos+=len; - } + param->setup_param_func= setup_param_str; + param->item_result_type = STRING_RESULT; } - return(pos); } /* @@ -283,42 +276,45 @@ static uchar* setup_param_field(Item_param *item_param, from client .. */ -static bool setup_param_fields(THD *thd, PREP_STMT *stmt) -{ - DBUG_ENTER("setup_param_fields"); -#ifdef READY_TO_BE_USED - Item_param *item_param; - ulong param_count=0; - uchar *pos=(uchar*) thd->net.read_pos+1;// skip command type +static bool setup_params_data(THD *thd, PREP_STMT *stmt) +{ + List ¶ms= thd->lex.param_list; + List_iterator param_iterator(params); + Item_param *param; + DBUG_ENTER("setup_params_data"); - - if (*pos++) // No types supplied, read only param data - { - while ((item_param=(Item_param *)it++) && - (param_count++ < stmt->param_count)) - { - if (item_param->long_data_supplied) - continue; + uchar *pos=(uchar*) thd->net.read_pos+1+MYSQL_STMT_HEADER; //skip header + uchar *read_pos= pos+(stmt->param_count+7) / 8; //skip null bits + ulong param_no; - if (!(pos=setup_param_field(item_param,pos,item_param->buffer_type))) - DBUG_RETURN(1); + if (*read_pos++) //types supplied / first execute + { + /* + First execute or types altered by the client, setup the + conversion routines for all parameters (one time) + */ + while ((param= (Item_param *)param_iterator++)) + { + if (!param->long_data_supplied) + { + setup_param_functions(param,*read_pos); + read_pos+= 2; + } } - } - else // Types supplied, read and store it along with param data + param_iterator.rewind(); + } + param_no= 0; + while ((param= (Item_param *)param_iterator++)) { - while ((item_param=(Item_param *)it++) && - (param_count++ < thd->param_count)) + if (!param->long_data_supplied) { - if (item_param->long_data_supplied) - continue; - - if (!(pos=setup_param_field(item_param,pos, - item_param->buffer_type= - (enum_field_types) get_buffer_type(&pos)))) - DBUG_RETURN(1); + if (IS_PARAM_NULL(pos,param_no)) + param->maybe_null=param->null_value=1; + else + param->setup_param_func(param,&read_pos); } + param_no++; } -#endif DBUG_RETURN(0); } @@ -583,6 +579,8 @@ static bool send_prepare_results(PREP_STMT *stmt) Rest fall through to default category, no parsing for non-DML statements */ + if (send_prep_stmt(stmt, 0)) + goto abort; } } DBUG_RETURN(0); @@ -597,7 +595,7 @@ abort: */ static bool parse_prepare_query(PREP_STMT *stmt, - char *packet, uint length) + char *packet, uint length) { bool error= 1; THD *thd= stmt->thd; @@ -607,6 +605,7 @@ static bool parse_prepare_query(PREP_STMT *stmt, mysql_init_query(thd); thd->prepare_command=true; thd->safe_to_cache_query= 0; + thd->lex.param_count=0; LEX *lex=lex_start(thd, (uchar*) packet, length); if (!yyparse() && !thd->fatal_error) @@ -615,6 +614,25 @@ static bool parse_prepare_query(PREP_STMT *stmt, DBUG_RETURN(error); } +/* + Initialize parameter items in statement +*/ +static bool init_param_items(THD *thd, PREP_STMT *stmt) +{ +#if TO_BE_TESTED + Item_param **to; + if (!(to= (Item_param *) + my_malloc(sizeof(Item_param*) * stmt->param_count, MYF(MY_WME)))) + return 1; + List ¶ms= thd->lex.param_list; + List_iterator param_iterator(params); + while ((to++ = (Item_param *)param_iterator++)) + { + DBUG_PRINT("info",("param: %lx", to)); + } + return 0; +#endif +} /* Parse the query and send the total number of parameters @@ -648,10 +666,15 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length) goto err; if (!(specialflag & SPECIAL_NO_PRIOR)) - my_pthread_setprio(pthread_self(),WAIT_PRIOR); - - stmt.mem_root= thd->mem_root; + my_pthread_setprio(pthread_self(),WAIT_PRIOR); +#if 0 + if (init_param_items(thd, &stmt)) + goto err; +#endif + stmt.mem_root= thd->mem_root; + tree_insert(&thd->prepared_statements, (void *)&stmt, 0, (void *)0); thd->mem_root= thd_root; // restore main mem_root + thd->last_prepared_stmt= &stmt; DBUG_RETURN(0); err: @@ -685,11 +708,11 @@ void mysql_stmt_execute(THD *thd, char *packet) /* Check if we got an error when sending long data */ if (stmt->error_in_prepare) { - send_error(thd); + send_error(thd, stmt->last_errno, stmt->last_error); DBUG_VOID_RETURN; } - if (stmt->param_count && setup_param_fields(thd, stmt)) + if (stmt->param_count && setup_params_data(thd, stmt)) DBUG_VOID_RETURN; MEM_ROOT thd_root= thd->mem_root; @@ -705,6 +728,8 @@ void mysql_stmt_execute(THD *thd, char *packet) */ mysql_execute_command(thd); + thd->last_prepared_stmt= stmt; + if (!(specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(), WAIT_PRIOR); @@ -768,8 +793,10 @@ void mysql_stmt_close(THD *thd, char *packet) send_error(thd); DBUG_VOID_RETURN; } + stmt->param= 0; + my_free((char *)stmt->param, MYF(MY_ALLOW_ZERO_PTR)); /* Will call free_prep_stmt() */ - tree_delete(&thd->prepared_statements, (void*) stmt, NULL); + tree_delete(&thd->prepared_statements, (void*) &stmt, (void *)0); thd->last_prepared_stmt=0; DBUG_VOID_RETURN; } @@ -800,17 +827,16 @@ void mysql_stmt_get_longdata(THD *thd, char *pos, ulong packet_length) DBUG_ENTER("mysql_stmt_get_longdata"); /* The following should never happen */ - if (packet_length < 9) + if (packet_length < MYSQL_LONG_DATA_HEADER+1) { my_error(ER_WRONG_ARGUMENTS, MYF(0), "get_longdata"); DBUG_VOID_RETURN; } - pos++; // skip command type at first position ulong stmt_id= uint4korr(pos); uint param_number= uint2korr(pos+4); uint param_type= uint2korr(pos+6); - pos+=8; // Point to data + pos+=MYSQL_LONG_DATA_HEADER; // Point to data if (!(stmt=find_prepared_statement(thd, stmt_id, "get_longdata"))) { @@ -829,7 +855,8 @@ void mysql_stmt_get_longdata(THD *thd, char *pos, ulong packet_length) sprintf(stmt->last_error, ER(ER_WRONG_ARGUMENTS), "get_longdata"); DBUG_VOID_RETURN; } - stmt->param[param_number].set_longdata(pos, packet_length-9, current_thd->thd_charset); + stmt->param[param_number].set_longdata(pos, packet_length-9); stmt->long_data_used= 1; DBUG_VOID_RETURN; } + From 9f51a0e6ca2ce276215ea6afe186cde0919d7762 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 10:21:29 -0800 Subject: [PATCH 214/246] merge libmysql/libmysql.c: merge . --- libmysql/libmysql.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 0912f8997f9..47df7acb0b1 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -242,7 +242,7 @@ my_bool my_connect(my_socket s, const struct sockaddr *name, { tv.tv_sec = (long) timeout; tv.tv_usec = 0; -#if defined(HPUX) && defined(THREAD) +#if defined(HPUX10) && defined(THREAD) if ((res = select(s+1, NULL, (int*) &sfds, NULL, &tv)) >= 0) break; #else @@ -928,7 +928,9 @@ static const char *default_options[]= "connect-timeout", "local-infile", "disable-local-infile", "replication-probe", "enable-reads-from-master", "repl-parse-query", "ssl-cipher","protocol", - "shared_memory_base_name", +red_memory_base_name", + + NullS }; @@ -1737,6 +1739,7 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) , Free strings in the SSL structure and clear 'use_ssl' flag. NB! Errors are not reported until you do mysql_real_connect. **************************************************************************/ + static void mysql_ssl_free(MYSQL *mysql __attribute__((unused))) { @@ -1807,6 +1810,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, #endif init_sigpipe_variables DBUG_ENTER("mysql_real_connect"); + LINT_INIT(host_info); DBUG_PRINT("enter",("host: %s db: %s user: %s", host ? host : "(Null)", @@ -2188,15 +2192,18 @@ Try also with PIPE or TCP/IP options->ssl_capath, options->ssl_cipher))) { - /* TODO: Change to SSL error */ - net->last_errno= CR_SERVER_LOST; + net->last_errno= CR_SSL_CONNECTION_ERROR; strmov(net->last_error,ER(net->last_errno)); goto error; } DBUG_PRINT("info", ("IO layer change in progress...")); - /* TODO: Add proper error checking here, with return error message */ - sslconnect((struct st_VioSSLConnectorFd*)(mysql->connector_fd), - mysql->net.vio, (long) (mysql->options.connect_timeout)); + if(sslconnect((struct st_VioSSLConnectorFd*)(mysql->connector_fd), + mysql->net.vio, (long) (mysql->options.connect_timeout))) + { + net->last_errno= CR_SSL_CONNECTION_ERROR; + strmov(net->last_error,ER(net->last_errno)); + goto error; + } DBUG_PRINT("info", ("IO layer change done!")); } #endif /* HAVE_OPENSSL */ From 7ba94c67ca680cd36aa8b79011e3c6577318fec6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 10:52:52 -0800 Subject: [PATCH 215/246] libmysql.c: fix merge conflict libmysql/libmysql.c: fix merge conflict --- libmysql/libmysql.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 47df7acb0b1..410be65660f 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -927,11 +927,8 @@ static const char *default_options[]= "character-sets-dir", "default-character-set", "interactive-timeout", "connect-timeout", "local-infile", "disable-local-infile", "replication-probe", "enable-reads-from-master", "repl-parse-query", - "ssl-cipher","protocol", -red_memory_base_name", - - - NullS + "ssl-cipher","protocol", "shared_memory_base_name", + NullS }; static TYPELIB option_types={array_elements(default_options)-1, From 671ed6ac8bd180a10e6129890261c4cdb5c36858 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 11:58:20 -0800 Subject: [PATCH 216/246] Missed include/ files --- include/mysql.h | 13 +++++++++---- include/mysql_com.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/mysql.h b/include/mysql.h index ad369988084..230c0aad9df 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -57,6 +57,9 @@ typedef int my_socket; #include "mysql_com.h" #include "mysql_version.h" #include "typelib.h" +#ifndef DBUG_OFF +#define CHECK_EXTRA_ARGUMENTS +#endif extern unsigned int mysql_port; extern char *mysql_unix_port; @@ -424,7 +427,7 @@ int STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con, */ /* statement state */ -enum MY_STMT_STATE { MY_ST_UNKNOWN, MY_ST_PREPARE, MY_ST_EXECUTE }; +enum PREP_STMT_STATE { MY_ST_UNKNOWN, MY_ST_PREPARE, MY_ST_EXECUTE }; /* bind structure */ typedef struct st_mysql_bind @@ -442,7 +445,7 @@ typedef struct st_mysql_bind my_bool long_ended; /* All data supplied for long */ unsigned int param_number; /* For null count and error messages */ void (*store_param_func)(NET *net, struct st_mysql_bind *param); - char *(*fetch_result)(struct st_mysql_bind *, const char *row); + void (*fetch_result)(struct st_mysql_bind *, unsigned char **row); } MYSQL_BIND; @@ -462,10 +465,12 @@ typedef struct st_mysql_stmt unsigned long long_length; /* long buffer alloced length */ unsigned long stmt_id; /* Id for prepared statement */ unsigned int last_errno; /* error code */ - enum MY_STMT_STATE state; /* statement state */ + enum PREP_STMT_STATE state; /* statement state */ char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ my_bool long_alloced; /* flag to indicate long alloced */ - my_bool types_supplied; /* to indicate types supply */ + my_bool send_types_to_server; /* to indicate types supply to server */ + my_bool param_buffers; /* to indicate the param bound buffers */ + my_bool res_buffers; /* to indicate the result bound buffers */ } MYSQL_STMT; diff --git a/include/mysql_com.h b/include/mysql_com.h index 5bf0394c7b0..ebb0522e9be 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -302,6 +302,7 @@ void my_thread_end(void); #endif #define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */ +#define MYSQL_STMT_HEADER 4 #define MYSQL_LONG_DATA_HEADER 8 #endif From 84d0efec5ed5b0754697be6137892a0c9e42f79e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Nov 2002 18:30:55 -0800 Subject: [PATCH 217/246] client_test.c: Modification to new API test sql_prepare.cc: Fix for lock_types sql/sql_prepare.cc: Fix for lock_types tests/client_test.c: Modification to new API test --- sql/sql_prepare.cc | 35 +- tests/client_test.c | 1358 ++++++++++++++++++++++--------------------- 2 files changed, 713 insertions(+), 680 deletions(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 4bc66778ffb..3ec12177778 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -276,8 +276,9 @@ static void setup_param_functions(Item_param *param, uchar read_pos) from client .. */ -static bool setup_params_data(THD *thd, PREP_STMT *stmt) +static bool setup_params_data(PREP_STMT *stmt) { + THD *thd= stmt->thd; List ¶ms= thd->lex.param_list; List_iterator param_iterator(params); Item_param *param; @@ -375,8 +376,7 @@ static int check_prepare_fields(THD *thd,TABLE *table, List &fields, static bool mysql_test_insert_fields(PREP_STMT *stmt, TABLE_LIST *table_list, List &fields, - List &values_list, - thr_lock_type lock_type) + List &values_list) { THD *thd= stmt->thd; TABLE *table; @@ -384,7 +384,7 @@ static bool mysql_test_insert_fields(PREP_STMT *stmt, List_item *values; DBUG_ENTER("mysql_test_insert_fields"); - if (!(table = open_ltable(thd,table_list,lock_type))) + if (!(table = open_ltable(thd,table_list,table_list->lock_type))) DBUG_RETURN(1); if ((values= its++)) @@ -427,13 +427,13 @@ static bool mysql_test_insert_fields(PREP_STMT *stmt, static bool mysql_test_upd_fields(PREP_STMT *stmt, TABLE_LIST *table_list, List &fields, List &values, - COND *conds, thr_lock_type lock_type) + COND *conds) { THD *thd= stmt->thd; TABLE *table; DBUG_ENTER("mysql_test_upd_fields"); - if (!(table = open_ltable(thd,table_list,lock_type))) + if (!(table = open_ltable(thd,table_list,table_list->lock_type))) DBUG_RETURN(1); if (setup_tables(table_list) || setup_fields(thd,table_list,fields,1,0,0) || @@ -465,7 +465,7 @@ static bool mysql_test_upd_fields(PREP_STMT *stmt, TABLE_LIST *table_list, static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables, List &fields, List &values, COND *conds, ORDER *order, ORDER *group, - Item *having, thr_lock_type lock_type) + Item *having) { TABLE *table; bool hidden_group_fields; @@ -473,7 +473,7 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables, List all_fields(fields); DBUG_ENTER("mysql_test_select_fields"); - if (!(table = open_ltable(thd,tables,lock_type))) + if (!(table = open_ltable(thd,tables,tables->lock_type))) DBUG_RETURN(1); thd->used_tables=0; // Updated by setup_fields @@ -546,21 +546,19 @@ static bool send_prepare_results(PREP_STMT *stmt) case SQLCOM_INSERT: if (mysql_test_insert_fields(stmt, tables, lex->field_list, - lex->many_values, lex->lock_option)) + lex->many_values)) goto abort; break; case SQLCOM_UPDATE: if (mysql_test_upd_fields(stmt, tables, select_lex->item_list, - lex->value_list, select_lex->where, - lex->lock_option)) + lex->value_list, select_lex->where)) goto abort; break; case SQLCOM_DELETE: if (mysql_test_upd_fields(stmt, tables, select_lex->item_list, - lex->value_list, select_lex->where, - lex->lock_option)) + lex->value_list, select_lex->where)) goto abort; break; @@ -568,8 +566,7 @@ static bool send_prepare_results(PREP_STMT *stmt) if (mysql_test_select_fields(stmt, tables, select_lex->item_list, lex->value_list, select_lex->where, (ORDER*) select_lex->order_list.first, - (ORDER*) select_lex->group_list.first, - select_lex->having, lex->lock_option)) + (ORDER*) select_lex->group_list.first, select_lex->having)) goto abort; break; @@ -712,11 +709,9 @@ void mysql_stmt_execute(THD *thd, char *packet) DBUG_VOID_RETURN; } - if (stmt->param_count && setup_params_data(thd, stmt)) + if (stmt->param_count && setup_params_data(stmt)) DBUG_VOID_RETURN; - MEM_ROOT thd_root= thd->mem_root; - thd->mem_root = thd->con_root; if (!(specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(),QUERY_PRIOR); @@ -726,14 +721,12 @@ void mysql_stmt_execute(THD *thd, char *packet) mysql_delete(), mysql_update() and mysql_select() to not to have re-check on setup_* and other things .. */ - mysql_execute_command(thd); - + mysql_execute_command(stmt->thd); thd->last_prepared_stmt= stmt; if (!(specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(), WAIT_PRIOR); - thd->mem_root= thd_root; DBUG_VOID_RETURN; } diff --git a/tests/client_test.c b/tests/client_test.c index a00c475129d..280df2bf717 100644 --- a/tests/client_test.c +++ b/tests/client_test.c @@ -48,15 +48,22 @@ #define false 0 #endif +#ifndef bzero +#define bzero(A,B) memset(A,0,B) +#endif + /* set default options */ -static char *opt_db=(char *)"test"; -static char *opt_user=(char *)"root"; -static char *opt_password=(char *)""; +static char *opt_db=0; +static char *opt_user=0; +static char *opt_password=0; static char *opt_host=0; static char *opt_unix_socket=0; static uint opt_port; static my_bool tty_password=0; +static MYSQL *mysql=0; +static char query[255]; + #define myheader(str) { printf("\n\n#######################\n"); \ printf("%s",str); \ printf("\n#######################\n"); \ @@ -64,9 +71,9 @@ static my_bool tty_password=0; #define init_bind(x) (bzero(x,sizeof(x))) -void print_error(MYSQL *mysql, const char *msg) +void print_error(const char *msg) { - if(mysql) + if (mysql) { fprintf(stderr,"\n [MySQL]%s \n",mysql_error(mysql)); } @@ -75,14 +82,14 @@ void print_error(MYSQL *mysql, const char *msg) void print_st_error(MYSQL_STMT *stmt, const char *msg) { - if(stmt) + if (stmt) { fprintf(stderr,"\n [MySQL]%s \n",mysql_stmt_error(stmt)); } else if(msg) fprintf(stderr, "%s\n", msg); } -#define myerror(mysql, msg) print_error(mysql, msg) +#define myerror(msg) print_error(msg) #define mysterror(stmt, msg) print_st_error(stmt, msg) #define myassert(x) if(x) {\ @@ -94,17 +101,17 @@ void print_st_error(MYSQL_STMT *stmt, const char *msg) exit(1);\ } -#define myquery(mysql,r) \ +#define myquery(r) \ if( r != 0) \ { \ - myerror(mysql,NULL); \ + myerror(NULL); \ myassert(true);\ } -#define myquery_r(mysql,r) \ +#define myquery_r(r) \ if( r != 0) \ { \ - myerror(mysql,NULL); \ + myerror(NULL); \ myassert_r(true);\ } @@ -115,17 +122,17 @@ if( r != 0) \ myassert(true);\ } -#define myxquery(mysql,stmt) \ +#define myxquery(stmt) \ if( stmt == 0) \ { \ - myerror(mysql,NULL); \ + myerror(NULL); \ myassert(true);\ } -#define myxquery_r(mysql,stmt) \ +#define myxquery_r(stmt) \ if( stmt == 0) \ { \ - myerror(mysql,NULL); \ + myerror(NULL); \ myassert_r(true);\ } \ else myassert(true); @@ -137,40 +144,37 @@ if( r != 0) \ myassert_r(true);\ } -#define mytest(mysql,x) if(!x) {myerror(mysql,NULL);myassert(true);} -#define mytest_r(mysql,x) if(x) {myerror(mysql,NULL);myassert(true);} +#define mytest(x) if(!x) {myerror(NULL);myassert(true);} +#define mytest_r(x) if(x) {myerror(NULL);myassert(true);} /******************************************************** * connect to the server * *********************************************************/ -MYSQL *client_connect() +static void client_connect() { - MYSQL *mysql; - myheader("client_connect"); if(!(mysql = mysql_init(NULL))) { - myerror(NULL, "mysql_init() failed"); + myerror("mysql_init() failed"); exit(0); } if (!(mysql_real_connect(mysql,opt_host,opt_user, - opt_password, opt_db, opt_port, + opt_password, opt_db ? opt_db:"test", opt_port, opt_unix_socket, 0))) { - myerror(mysql, "connection failed"); + myerror("connection failed"); exit(0); } /* set AUTOCOMMIT to ON*/ mysql_autocommit(mysql, true); - return(mysql); } /******************************************************** * close the connection * *********************************************************/ -void client_disconnect(MYSQL *mysql) +void client_disconnect() { myheader("client_disconnect"); @@ -180,39 +184,39 @@ void client_disconnect(MYSQL *mysql) /******************************************************** * query processing * *********************************************************/ -void client_query(MYSQL *mysql) +void client_query() { int rc; myheader("client_query"); rc = mysql_query(mysql,"DROP TABLE IF EXISTS myclient_test"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE myclient_test(id int primary key auto_increment,\ name varchar(20))"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE myclient_test(id int, name varchar(20))"); - myquery_r(mysql,rc); + myquery_r(rc); rc = mysql_query(mysql,"INSERT INTO myclient_test(name) VALUES('mysql')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"INSERT INTO myclient_test(name) VALUES('monty')"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_query(mysql,"INSERT INTO myclient_test(name) VALUES('venu')"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_query(mysql,"INSERT INTO myclient_test(name) VALUES('deleted')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"UPDATE myclient_test SET name='updated' WHERE name='deleted'"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_query(mysql,"UPDATE myclient_test SET id=3 WHERE name='updated'"); - myquery_r(mysql,rc); + myquery_r(rc); } /******************************************************** @@ -226,12 +230,12 @@ void my_print_dashes(MYSQL_RES *result) mysql_field_seek(result,0); fputc('\t',stdout); fputc('+', stdout); - + for(i=0; i< mysql_num_fields(result); i++) { field = mysql_fetch_field(result); for(j=0; j < field->max_length+2; j++) - fputc('-',stdout); + fputc('-',stdout); fputc('+',stdout); } fputc('\n',stdout); @@ -247,7 +251,7 @@ void my_print_result_metadata(MYSQL_RES *result) unsigned int field_count; mysql_field_seek(result,0); - fputc('\n', stdout); + fputc('\n', stdout); field_count = mysql_num_fields(result); for(i=0; i< field_count; i++) @@ -263,7 +267,7 @@ void my_print_result_metadata(MYSQL_RES *result) my_print_dashes(result); fputc('\t',stdout); fputc('|', stdout); - + mysql_field_seek(result,0); for(i=0; i< field_count; i++) { @@ -277,7 +281,7 @@ void my_print_result_metadata(MYSQL_RES *result) /******************************************************** * process the result set * *********************************************************/ -int my_process_result_set(MYSQL *mysql, MYSQL_RES *result) +int my_process_result_set(MYSQL_RES *result) { MYSQL_ROW row; MYSQL_FIELD *field; @@ -287,7 +291,7 @@ int my_process_result_set(MYSQL *mysql, MYSQL_RES *result) my_print_result_metadata(result); while((row = mysql_fetch_row(result)) != NULL) - { + { mysql_field_seek(result,0); fputc('\t',stdout); fputc('|',stdout); @@ -310,49 +314,83 @@ int my_process_result_set(MYSQL *mysql, MYSQL_RES *result) if (mysql_errno(mysql) != 0) fprintf(stderr, "\n\tmysql_fetch_row() failed\n"); - else + else fprintf(stdout,"\n\t%d rows returned\n", row_count); return(row_count); } +static void verify_col_data(const char *table, const char *col, const char *exp_data) +{ + MYSQL_STMT *stmt; + MYSQL_BIND bind[1]; + char data[255]; + int rc; + + init_bind(bind); + + bind[0].buffer_type=FIELD_TYPE_STRING; + bind[0].buffer= (char *)data; + bind[0].buffer_length= sizeof(data); + + sprintf(query, "SELECT `%s` FROM `%s`", col, table); + + printf("\n %s", query); + stmt = mysql_prepare(mysql, query, strlen(query)); + myxquery(stmt); + + rc = mysql_bind_result(stmt,bind); + mystmt(stmt, rc); + + rc = mysql_execute(stmt); + mystmt(stmt, rc); + + rc = mysql_fetch(stmt); + mystmt(stmt,rc); + + printf("\n data : %s (expected: %s)",data, exp_data); + assert(strcmp(data,exp_data)==0); + + mysql_stmt_close(stmt); +} + /******************************************************** * store result processing * *********************************************************/ -void client_store_result(MYSQL *mysql) +void client_store_result() { MYSQL_RES *result; int rc; - + myheader("client_store_result"); rc = mysql_query(mysql, "SELECT * FROM myclient_test"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - my_process_result_set(mysql,result); + my_process_result_set(result); mysql_free_result(result); } /******************************************************** * use result processing * *********************************************************/ -void client_use_result(MYSQL *mysql) +void client_use_result() { MYSQL_RES *result; int rc; myheader("client_use_result"); - rc = mysql_query(mysql, "SELECT * FROM myclient_test"); - myquery(mysql,rc); + rc = mysql_query(mysql, "SELECT * FROM myclient_test"); + myquery(rc); /* get the result */ result = mysql_use_result(mysql); - mytest(mysql,result); + mytest(result); - my_process_result_set(mysql,result); + my_process_result_set(result); mysql_free_result(result); } @@ -360,7 +398,7 @@ void client_use_result(MYSQL *mysql) /******************************************************** * query processing * *********************************************************/ -void test_debug_example(MYSQL *mysql) +void test_debug_example() { int rc; MYSQL_RES *result; @@ -368,35 +406,35 @@ void test_debug_example(MYSQL *mysql) myheader("test_debug_example"); rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_debug_example"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_debug_example(id int primary key auto_increment,\ name varchar(20),xxx int)"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_query(mysql,"INSERT INTO test_debug_example(name) VALUES('mysql')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"UPDATE test_debug_example SET name='updated' WHERE name='deleted'"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"SELECT * FROM test_debug_example"); - myquery(mysql,rc); - - result = mysql_use_result(mysql); - mytest(mysql,result); + myquery(rc); - my_process_result_set(mysql,result); + result = mysql_use_result(mysql); + mytest(result); + + my_process_result_set(result); mysql_free_result(result); rc = mysql_query(mysql,"DROP TABLE test_debug_example"); - myquery(mysql,rc); + myquery(rc); } /******************************************************** * to test autocommit feature * *********************************************************/ -void test_tran_bdb(MYSQL *mysql) +void test_tran_bdb() { MYSQL_RES *result; MYSQL_ROW row; @@ -406,75 +444,75 @@ void test_tran_bdb(MYSQL *mysql) /* set AUTOCOMMIT to OFF */ rc = mysql_autocommit(mysql, false); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS my_demo_transaction"); + myquery(rc); + - rc = mysql_query(mysql,"DROP TABLE IF EXISTS my_demo_transaction"); - myquery(mysql,rc); - - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* create the table 'mytran_demo' of type BDB' or 'InnoDB' */ rc = mysql_query(mysql,"CREATE TABLE my_demo_transaction(col1 int ,col2 varchar(30)) TYPE = BDB"); - myquery(mysql,rc); + myquery(rc); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* insert a row and commit the transaction */ rc = mysql_query(mysql,"INSERT INTO my_demo_transaction VALUES(10,'venu')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* now insert the second row, and rollback the transaction */ rc = mysql_query(mysql,"INSERT INTO my_demo_transaction VALUES(20,'mysql')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_rollback(mysql); - myquery(mysql,rc); + myquery(rc); /* delete first row, and rollback it */ rc = mysql_query(mysql,"DELETE FROM my_demo_transaction WHERE col1 = 10"); - myquery(mysql,rc); + myquery(rc); rc = mysql_rollback(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM my_demo_transaction"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - my_process_result_set(mysql,result); + my_process_result_set(result); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM my_demo_transaction"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_use_result(mysql); - mytest(mysql,result); - - row = mysql_fetch_row(result); - mytest(mysql,row); - - row = mysql_fetch_row(result); - mytest_r(mysql,row); + mytest(result); - mysql_free_result(result); + row = mysql_fetch_row(result); + mytest(row); + + row = mysql_fetch_row(result); + mytest_r(row); + + mysql_free_result(result); mysql_autocommit(mysql,true); } /******************************************************** * to test autocommit feature * *********************************************************/ -void test_tran_innodb(MYSQL *mysql) +void test_tran_innodb() { MYSQL_RES *result; MYSQL_ROW row; @@ -484,68 +522,68 @@ void test_tran_innodb(MYSQL *mysql) /* set AUTOCOMMIT to OFF */ rc = mysql_autocommit(mysql, false); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS my_demo_transaction"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS my_demo_transaction"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* create the table 'mytran_demo' of type BDB' or 'InnoDB' */ rc = mysql_query(mysql,"CREATE TABLE my_demo_transaction(col1 int ,col2 varchar(30)) TYPE = InnoDB"); - myquery(mysql,rc); + myquery(rc); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* insert a row and commit the transaction */ rc = mysql_query(mysql,"INSERT INTO my_demo_transaction VALUES(10,'venu')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* now insert the second row, and rollback the transaction */ rc = mysql_query(mysql,"INSERT INTO my_demo_transaction VALUES(20,'mysql')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_rollback(mysql); - myquery(mysql,rc); + myquery(rc); /* delete first row, and rollback it */ rc = mysql_query(mysql,"DELETE FROM my_demo_transaction WHERE col1 = 10"); - myquery(mysql,rc); + myquery(rc); rc = mysql_rollback(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM my_demo_transaction"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - my_process_result_set(mysql,result); + my_process_result_set(result); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM my_demo_transaction"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_use_result(mysql); - mytest(mysql,result); - + mytest(result); + row = mysql_fetch_row(result); - mytest(mysql,row); - + mytest(row); + row = mysql_fetch_row(result); - mytest_r(mysql,row); + mytest_r(row); mysql_free_result(result); - mysql_autocommit(mysql,true); + mysql_autocommit(mysql,true); } @@ -553,27 +591,26 @@ void test_tran_innodb(MYSQL *mysql) To test simple prepares of all DML statements *********************************************************/ -void test_prepare_simple(MYSQL *mysql) +void test_prepare_simple() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; - myheader("test_prepare_simple"); - - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_simple"); - myquery(mysql,rc); - + myheader("test_prepare_simple"); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_simple"); + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_prepare_simple(id int, name varchar(50))"); - myquery(mysql,rc); + myquery(rc); /* alter table */ - query = "ALTER TABLE test_prepare_simple ADD new char(20)"; + strcpy(query,"ALTER TABLE test_prepare_simple ADD new char(20)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout,"\n total parameters in alter:%d\n", param_count); @@ -581,9 +618,9 @@ void test_prepare_simple(MYSQL *mysql) mysql_stmt_close(stmt); /* insert */ - query = "INSERT INTO test_prepare_simple VALUES(?,?)"; + strcpy(query,"INSERT INTO test_prepare_simple VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout,"\n total parameters in insert:%d\n", param_count); @@ -591,9 +628,9 @@ void test_prepare_simple(MYSQL *mysql) mysql_stmt_close(stmt); /* update */ - query = "UPDATE test_prepare_simple SET id=? WHERE id=? AND name= ?"; + strcpy(query,"UPDATE test_prepare_simple SET id=? WHERE id=? AND name= ?"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout,"\n total parameters in update:%d\n", param_count); @@ -601,9 +638,9 @@ void test_prepare_simple(MYSQL *mysql) mysql_stmt_close(stmt); /* delete */ - query = "DELETE FROM test_prepare_simple WHERE id=10"; + strcpy(query,"DELETE FROM test_prepare_simple WHERE id=10"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout,"\n total parameters in delete:%d\n", param_count); @@ -614,9 +651,9 @@ void test_prepare_simple(MYSQL *mysql) mysql_stmt_close(stmt); /* delete */ - query = "DELETE FROM test_prepare_simple WHERE id=?"; + strcpy(query,"DELETE FROM test_prepare_simple WHERE id=?"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout,"\n total parameters in delete:%d\n", param_count); @@ -627,9 +664,9 @@ void test_prepare_simple(MYSQL *mysql) mysql_stmt_close(stmt); /* select */ - query = "SELECT * FROM test_prepare_simple WHERE id=? AND name= ?"; + strcpy(query,"SELECT * FROM test_prepare_simple WHERE id=? AND name= ?"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout,"\n total parameters in select:%d\n", param_count); @@ -639,35 +676,33 @@ void test_prepare_simple(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); } /******************************************************** * to test simple prepare field results * *********************************************************/ -void test_prepare_field_result(MYSQL *mysql) +void test_prepare_field_result() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; - myheader("test_prepare_field_result"); - - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_field_result"); - myquery(mysql,rc); - + myheader("test_prepare_field_result"); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_field_result"); + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_prepare_field_result(id int, name varchar(50), extra int)"); - myquery(mysql,rc); - + myquery(rc); /* insert */ - query = "SELECT id,name FROM test_prepare_field_result WHERE id=?"; + strcpy(query,"SELECT id,name FROM test_prepare_field_result WHERE id=?"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout,"\n total parameters in insert:%d\n", param_count); @@ -676,49 +711,48 @@ void test_prepare_field_result(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); } /******************************************************** * to test simple prepare field results * *********************************************************/ -void test_prepare_syntax(MYSQL *mysql) +void test_prepare_syntax() { MYSQL_STMT *stmt; int rc; - const char *query; - myheader("test_prepare_syntax"); - - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_syntax"); - myquery(mysql,rc); - + myheader("test_prepare_syntax"); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_syntax"); + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_prepare_syntax(id int, name varchar(50), extra int)"); - myquery(mysql,rc); + myquery(rc); - query = "INSERT INTO test_prepare_syntax VALUES(?"; + strcpy(query,"INSERT INTO test_prepare_syntax VALUES(?"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery_r(mysql,stmt); + myxquery_r(stmt); - query = "SELECT id,name FROM test_prepare_syntax WHERE id=? AND WHERE"; + strcpy(query,"SELECT id,name FROM test_prepare_syntax WHERE id=? AND WHERE"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery_r(mysql,stmt); + myxquery_r(stmt); /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); } /******************************************************** * to test simple prepare * *********************************************************/ -void test_prepare(MYSQL *mysql) -{ +void test_prepare() +{ MYSQL_STMT *stmt; int rc,param_count; char query[200]; @@ -730,30 +764,30 @@ void test_prepare(MYSQL *mysql) double real_data; double double_data; MYSQL_RES *result; - MYSQL_BIND bind[8]; + MYSQL_BIND bind[8]; - myheader("test_prepare"); + myheader("test_prepare"); init_bind(bind); rc = mysql_autocommit(mysql, true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS my_prepare"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS my_prepare"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE my_prepare(col1 tinyint,\ col2 varchar(50), col3 int,\ col4 smallint, col5 bigint, \ col6 float, col7 double )"); - myquery(mysql,rc); + myquery(rc); /* insert by prepare */ strcpy(query,"INSERT INTO my_prepare VALUES(?,?,?,?,?,?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); @@ -765,22 +799,23 @@ void test_prepare(MYSQL *mysql) /* string */ bind[1].buffer_type=FIELD_TYPE_STRING; bind[1].buffer=str_data; + bind[1].buffer_length=sizeof(str_data); /* integer */ bind[2].buffer_type=FIELD_TYPE_LONG; - bind[2].buffer= (gptr)&int_data; + bind[2].buffer= (gptr)&int_data; /* short */ bind[3].buffer_type=FIELD_TYPE_SHORT; - bind[3].buffer= (gptr)&small_data; + bind[3].buffer= (gptr)&small_data; /* bigint */ bind[4].buffer_type=FIELD_TYPE_LONGLONG; - bind[4].buffer= (gptr)&big_data; + bind[4].buffer= (gptr)&big_data; /* float */ bind[5].buffer_type=FIELD_TYPE_DOUBLE; - bind[5].buffer= (gptr)&real_data; + bind[5].buffer= (gptr)&real_data; /* double */ bind[6].buffer_type=FIELD_TYPE_DOUBLE; - bind[6].buffer= (gptr)&double_data; - + bind[6].buffer= (gptr)&double_data; + rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); @@ -807,17 +842,17 @@ void test_prepare(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM my_prepare"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert((int)tiny_data == my_process_result_set(mysql,result)); + assert((int)tiny_data == my_process_result_set(result)); mysql_free_result(result); } @@ -825,37 +860,37 @@ void test_prepare(MYSQL *mysql) /******************************************************** * to test double comparision * *********************************************************/ -void test_double_compare(MYSQL *mysql) -{ +void test_double_compare() +{ MYSQL_STMT *stmt; int rc,param_count; char query[200],real_data[10], tiny_data; double double_data; MYSQL_RES *result; - MYSQL_BIND bind[3]; + MYSQL_BIND bind[3]; - myheader("test_double_compare"); + myheader("test_double_compare"); init_bind(bind); rc = mysql_autocommit(mysql, true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_double_compare"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_double_compare"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_double_compare(col1 tinyint,\ col2 float, col3 double )"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"INSERT INTO test_double_compare VALUES(1,10.2,34.5)"); - myquery(mysql,rc); + myquery(rc); strcpy(query, "UPDATE test_double_compare SET col1=100 WHERE col1 = ? AND col2 = ? AND COL3 = ?"); stmt = mysql_prepare(mysql,query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in update:%d\n", param_count); @@ -865,11 +900,12 @@ void test_double_compare(MYSQL *mysql) bind[0].buffer=(gptr)&tiny_data; /* string->float */ bind[1].buffer_type=FIELD_TYPE_STRING; - bind[1].buffer= (gptr)&real_data; + bind[1].buffer= (gptr)&real_data; + bind[1].buffer_length=10; /* double */ bind[2].buffer_type=FIELD_TYPE_DOUBLE; - bind[2].buffer= (gptr)&double_data; - + bind[2].buffer= (gptr)&double_data; + tiny_data = 1; strcpy(real_data,"10.2"); double_data = 34.5; @@ -881,22 +917,22 @@ void test_double_compare(MYSQL *mysql) rc = (int)mysql_affected_rows(mysql); printf("\n total affected rows:%d",rc); - + mysql_stmt_close(stmt); /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM test_double_compare"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert((int)tiny_data == my_process_result_set(mysql,result)); + assert((int)tiny_data == my_process_result_set(result)); mysql_free_result(result); } @@ -907,43 +943,43 @@ void test_double_compare(MYSQL *mysql) /******************************************************** * to test simple null * *********************************************************/ -void test_null(MYSQL *mysql) +void test_null() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; int nData=1; MYSQL_RES *result; - MYSQL_BIND bind[2]; + MYSQL_BIND bind[2]; - myheader("test_null"); + myheader("test_null"); init_bind(bind); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_null"); - myquery(mysql,rc); - + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_null"); + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_null(col1 int,col2 varchar(50))"); - myquery(mysql,rc); + myquery(rc); /* insert by prepare, wrong column name */ - query = "INSERT INTO test_null(col3,col2) VALUES(?,?)"; + strcpy(query,"INSERT INTO test_null(col3,col2) VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery_r(mysql,stmt); + myxquery_r(stmt); - query = "INSERT INTO test_null(col1,col2) VALUES(?,?)"; + strcpy(query,"INSERT INTO test_null(col1,col2) VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); assert(param_count == 2); bind[0].is_null=1; - bind[1].is_null=1; /* string data */ - + bind[0].buffer_type=MYSQL_TYPE_NULL; + bind[1]=bind[0]; /* string data */ + rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); @@ -957,19 +993,18 @@ void test_null(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM test_null"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(nData == my_process_result_set(mysql,result)); + assert(nData == my_process_result_set(result)); mysql_free_result(result); - } @@ -977,20 +1012,19 @@ void test_null(MYSQL *mysql) /******************************************************** * to test simple select * *********************************************************/ -void test_select_simple(MYSQL *mysql) +void test_select_simple() { MYSQL_STMT *stmt; int rc,length; const char query[100]; MYSQL_RES *result; - myheader("test_select_simple"); - + myheader("test_select_simple"); /* insert by prepare */ strcpy((char *)query, "SHOW TABLES FROM mysql"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); length = mysql_param_count(stmt); fprintf(stdout," total parameters in select:%d\n", length); @@ -998,25 +1032,27 @@ void test_select_simple(MYSQL *mysql) rc = mysql_execute(stmt); mystmt(stmt, rc); - + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - my_process_result_set(mysql,result); + my_process_result_set(result); mysql_free_result(result); - + + mysql_stmt_close(stmt); + #if 0 strcpy((char *)query , "SELECT @@ VERSION"); length = strlen(query); rc = mysql_query(mysql,query); - mytest(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - my_process_result_set(mysql,result); + my_process_result_set(result); mysql_free_result(result); #endif } @@ -1025,52 +1061,51 @@ void test_select_simple(MYSQL *mysql) /******************************************************** * to test simple select * *********************************************************/ -void test_select(MYSQL *mysql) +void test_select() { MYSQL_STMT *stmt; int rc,param_count=0; - const char *query; char *szData=(char *)"updated-value"; int nData=1; - MYSQL_BIND bind[2]; + MYSQL_BIND bind[2]; MYSQL_RES *result; - - myheader("test_select"); + + myheader("test_select"); init_bind(bind); rc = mysql_autocommit(mysql,true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_select"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_select"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_select(id int,name varchar(50))"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* insert a row and commit the transaction */ rc = mysql_query(mysql,"INSERT INTO test_select VALUES(10,'venu')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* now insert the second row, and rollback the transaction */ rc = mysql_query(mysql,"INSERT INTO test_select VALUES(20,'mysql')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); - query = "SELECT * FROM test_select WHERE id=? AND name=?"; + strcpy(query,"SELECT * FROM test_select WHERE id=? AND name=?"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in select:%d\n", param_count); @@ -1081,20 +1116,21 @@ void test_select(MYSQL *mysql) szData=(char *)"venu"; bind[1].buffer_type=FIELD_TYPE_STRING; bind[1].buffer=szData; + bind[1].buffer_length=4; bind[0].buffer=(gptr)&nData; bind[0].buffer_type=FIELD_TYPE_LONG; - + rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); rc = mysql_execute(stmt); mystmt(stmt, rc); - + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert( 1 == my_process_result_set(mysql,result)); + assert( 1 == my_process_result_set(result)); mysql_free_result(result); mysql_stmt_close(stmt); @@ -1108,48 +1144,46 @@ void test_select(MYSQL *mysql) /******************************************************** * to test simple update * *********************************************************/ -void test_simple_update(MYSQL *mysql) +void test_simple_update() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; - char *szData=(char *)"updated-value"; + char szData[25]; int nData=1; MYSQL_RES *result; - MYSQL_BIND bind[2]; - + MYSQL_BIND bind[2]; - myheader("test_simple_update"); + myheader("test_simple_update"); init_bind(bind); rc = mysql_autocommit(mysql,true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_update"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_update"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_update(col1 int,\ col2 varchar(50), col3 int )"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"INSERT INTO test_update VALUES(1,'MySQL',100)"); - myquery(mysql,rc); - + myquery(rc); + assert(1 == mysql_affected_rows(mysql)); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* insert by prepare */ - query = "UPDATE test_update SET col2=? WHERE col1=?"; + strcpy(query,"UPDATE test_update SET col2=? WHERE col1=?"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in update:%d\n", param_count); @@ -1158,9 +1192,10 @@ void test_simple_update(MYSQL *mysql) nData=1; bind[0].buffer_type=FIELD_TYPE_STRING; bind[0].buffer=szData; /* string data */ + bind[0].buffer_length=sprintf(szData,"updated-data"); bind[1].buffer=(gptr)&nData; bind[1].buffer_type=FIELD_TYPE_LONG; - + rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); @@ -1172,17 +1207,17 @@ void test_simple_update(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM test_update"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(1 == my_process_result_set(mysql,result)); + assert(1 == my_process_result_set(result)); mysql_free_result(result); } @@ -1190,53 +1225,58 @@ void test_simple_update(MYSQL *mysql) /******************************************************** * to test simple long data handling * *********************************************************/ -void test_long_data(MYSQL *mysql) +void test_long_data() { MYSQL_STMT *stmt; - int rc,param_count; - const char *query; + int rc,param_count, int_data=10; char *data=NullS; MYSQL_RES *result; - MYSQL_BIND bind[2]; - + MYSQL_BIND bind[3]; - myheader("test_long_data"); + + myheader("test_long_data"); init_bind(bind); rc = mysql_autocommit(mysql,true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_long_data"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_long_data"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_long_data(col1 int,\ col2 long varchar, col3 long varbinary)"); - myquery(mysql,rc); - - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); - query = "INSERT INTO test_long_data(col2) VALUES(?)"; + rc = mysql_commit(mysql); + myquery(rc); + + strcpy(query,"INSERT INTO test_long_data(col1,col2) VALUES(?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery_r(stmt); + + strcpy(query,"INSERT INTO test_long_data(col1,col2,col3) VALUES(?,?,?)"); + stmt = mysql_prepare(mysql, query, strlen(query)); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); - assert(param_count == 1); + assert(param_count == 3); - bind[0].buffer=data; /* string data */ - bind[0].is_long_data=1; /* specify long data suppy during run-time */ + bind[0].buffer=(char *)&int_data; + bind[0].buffer_type=FIELD_TYPE_LONG; + bind[1].is_long_data=1; /* specify long data suppy during run-time */ /* Non string or binary type, error */ - bind[0].buffer_type=FIELD_TYPE_LONG; + bind[1].buffer_type=FIELD_TYPE_LONG; rc = mysql_bind_param(stmt,bind); fprintf(stdout,"mysql_bind_param() returned %d\n",rc); mystmt_r(stmt, rc); - - bind[0].buffer_type=FIELD_TYPE_STRING; + + bind[1].buffer_type=FIELD_TYPE_STRING; + bind[2]=bind[1]; rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); @@ -1247,11 +1287,11 @@ void test_long_data(MYSQL *mysql) data = (char *)"Micheal"; /* supply data in pieces */ - rc = mysql_send_long_data(stmt,0,data,7,1); + rc = mysql_send_long_data(stmt,1,data,7,1); mystmt(stmt, rc); - /* try to execute mysql_execute() now, it should return - MYSQL_NEED_DATA as the long data supply is not yet over + /* try to execute mysql_execute() now, it should return + MYSQL_NEED_DATA as the long data supply is not yet over */ rc = mysql_execute(stmt); fprintf(stdout,"mysql_execute() returned %d\n",rc); @@ -1259,13 +1299,12 @@ void test_long_data(MYSQL *mysql) /* append data again ..*/ - /* supply data in pieces */ + /* Indicate end of data */ data = (char *)" 'monty' widenius"; - rc = mysql_send_long_data(stmt,0,data,17,0); + rc = mysql_send_long_data(stmt,1,data,17,1); mystmt(stmt, rc); - /* Indiate end of data supply */ - rc = mysql_send_long_data(stmt,0,0,0,1); + rc = mysql_send_long_data(stmt,2,"Venu (venu@mysql.com",4,1); mystmt(stmt, rc); /* execute */ @@ -1274,55 +1313,54 @@ void test_long_data(MYSQL *mysql) mystmt(stmt,rc); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* now fetch the results ..*/ - rc = mysql_query(mysql,"SELECT col2 FROM test_long_data"); - myquery(mysql,rc); - + rc = mysql_query(mysql,"SELECT * FROM test_long_data"); + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(1 == my_process_result_set(mysql,result)); + assert(1 == my_process_result_set(result)); mysql_free_result(result); } /******************************************************** * to test long data (string) handling * *********************************************************/ -void test_long_data_str(MYSQL *mysql) +void test_long_data_str() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; char data[255]; long length; MYSQL_RES *result; - MYSQL_BIND bind[2]; - + MYSQL_BIND bind[2]; - myheader("test_long_data_str"); + + myheader("test_long_data_str"); init_bind(bind); rc = mysql_autocommit(mysql,true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_long_data_str"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_long_data_str"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_long_data_str(id int, longstr long varchar)"); - myquery(mysql,rc); - - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); - query = "INSERT INTO test_long_data_str VALUES(?,?)"; + rc = mysql_commit(mysql); + myquery(rc); + + strcpy(query,"INSERT INTO test_long_data_str VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); @@ -1354,8 +1392,8 @@ void test_long_data_str(MYSQL *mysql) mystmt(stmt, rc); } - /* try to execute mysql_execute() now, it should return - MYSQL_NEED_DATA as the long data supply is not yet over + /* try to execute mysql_execute() now, it should return + MYSQL_NEED_DATA as the long data supply is not yet over */ rc = mysql_execute(stmt); fprintf(stdout,"mysql_execute() returned %d\n",rc); @@ -1374,17 +1412,17 @@ void test_long_data_str(MYSQL *mysql) mysql_stmt_close(stmt); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* now fetch the results ..*/ rc = mysql_query(mysql,"SELECT LENGTH(longstr), longstr FROM test_long_data_str"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(1 == my_process_result_set(mysql,result)); + assert(1 == my_process_result_set(result)); mysql_free_result(result); } @@ -1392,38 +1430,37 @@ void test_long_data_str(MYSQL *mysql) /******************************************************** * to test long data (string) handling * *********************************************************/ -void test_long_data_str1(MYSQL *mysql) +void test_long_data_str1() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; char *data=(char *)"MySQL AB"; int length; MYSQL_RES *result; - MYSQL_BIND bind[2]; - + MYSQL_BIND bind[2]; - myheader("test_long_data_str1"); + + myheader("test_long_data_str1"); init_bind(bind); rc = mysql_autocommit(mysql,true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_long_data_str"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_long_data_str"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_long_data_str(longstr long varchar,blb long varbinary)"); - myquery(mysql,rc); - - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); - query = "INSERT INTO test_long_data_str VALUES(?,?)"; + rc = mysql_commit(mysql); + myquery(rc); + + strcpy(query,"INSERT INTO test_long_data_str VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); @@ -1457,8 +1494,8 @@ void test_long_data_str1(MYSQL *mysql) rc = mysql_send_long_data(stmt,1,data,2,0); mystmt(stmt, rc); } - /* try to execute mysql_execute() now, it should return - MYSQL_NEED_DATA as the long data supply is not yet over + /* try to execute mysql_execute() now, it should return + MYSQL_NEED_DATA as the long data supply is not yet over */ rc = mysql_execute(stmt); fprintf(stdout,"mysql_execute() returned %d\n",rc); @@ -1468,14 +1505,14 @@ void test_long_data_str1(MYSQL *mysql) /* Indiate end of data supply */ rc = mysql_send_long_data(stmt,1,0,0,1); mystmt(stmt, rc); - + rc = mysql_execute(stmt); fprintf(stdout,"mysql_execute() returned %d\n",rc); assert(rc == MYSQL_NEED_DATA); rc = mysql_send_long_data(stmt,0,0,0,1); mystmt(stmt, rc); - + /* execute */ rc = mysql_execute(stmt); fprintf(stdout,"mysql_execute() returned %d\n",rc); @@ -1484,17 +1521,17 @@ void test_long_data_str1(MYSQL *mysql) mysql_stmt_close(stmt); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* now fetch the results ..*/ rc = mysql_query(mysql,"SELECT LENGTH(longstr),longstr,LENGTH(blb),blb FROM test_long_data_str"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(1 == my_process_result_set(mysql,result)); + assert(1 == my_process_result_set(result)); mysql_free_result(result); } @@ -1502,38 +1539,37 @@ void test_long_data_str1(MYSQL *mysql) /******************************************************** * to test long data (binary) handling * *********************************************************/ -void test_long_data_bin(MYSQL *mysql) +void test_long_data_bin() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; char data[255]; int length; MYSQL_RES *result; - MYSQL_BIND bind[2]; - + MYSQL_BIND bind[2]; - myheader("test_long_data_bin"); + + myheader("test_long_data_bin"); init_bind(bind); rc = mysql_autocommit(mysql,true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_long_data_bin"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_long_data_bin"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_long_data_bin(id int, longbin long varbinary)"); - myquery(mysql,rc); - - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); - query = "INSERT INTO test_long_data_bin VALUES(?,?)"; + rc = mysql_commit(mysql); + myquery(rc); + + strcpy(query,"INSERT INTO test_long_data_bin VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); @@ -1564,8 +1600,8 @@ void test_long_data_bin(MYSQL *mysql) mystmt(stmt, rc); } - /* try to execute mysql_execute() now, it should return - MYSQL_NEED_DATA as the long data supply is not yet over + /* try to execute mysql_execute() now, it should return + MYSQL_NEED_DATA as the long data supply is not yet over */ rc = mysql_execute(stmt); fprintf(stdout,"mysql_execute() returned %d\n",rc); @@ -1584,17 +1620,17 @@ void test_long_data_bin(MYSQL *mysql) mysql_stmt_close(stmt); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* now fetch the results ..*/ rc = mysql_query(mysql,"SELECT LENGTH(longbin), longbin FROM test_long_data_bin"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(1 == my_process_result_set(mysql,result)); + assert(1 == my_process_result_set(result)); mysql_free_result(result); } @@ -1602,65 +1638,63 @@ void test_long_data_bin(MYSQL *mysql) /******************************************************** * to test simple delete * *********************************************************/ -void test_simple_delete(MYSQL *mysql) +void test_simple_delete() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; char szData[30]={0}; int nData=1; MYSQL_RES *result; - MYSQL_BIND bind[2]; - + MYSQL_BIND bind[2]; - myheader("test_simple_delete"); + + myheader("test_simple_delete"); init_bind(bind); rc = mysql_autocommit(mysql,true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_simple_delete"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_simple_delete"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_simple_delete(col1 int,\ col2 varchar(50), col3 int )"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"INSERT INTO test_simple_delete VALUES(1,'MySQL',100)"); - myquery(mysql,rc); - + myquery(rc); + assert(1 == mysql_affected_rows(mysql)); rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* insert by prepare */ - query = "DELETE FROM test_simple_delete WHERE col1=? AND col2=? AND col3=100"; + strcpy(query,"DELETE FROM test_simple_delete WHERE col1=? AND col2=? AND col3=100"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in delete:%d\n", param_count); assert(param_count == 2); nData=1; + strcpy(szData,"MySQL"); + bind[1].buffer_length = 5; bind[1].buffer_type=FIELD_TYPE_STRING; - bind[1].buffer=szData; /* string data */ + bind[1].buffer=szData; /* string data */ bind[0].buffer=(gptr)&nData; bind[0].buffer_type=FIELD_TYPE_LONG; - + rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); - strcpy(szData,"MySQL"); - //bind[1].buffer_length = 5; - nData=1; rc = mysql_execute(stmt); mystmt(stmt, rc); assert(1 == mysql_affected_rows(mysql)); @@ -1669,17 +1703,17 @@ void test_simple_delete(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM test_simple_delete"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(0 == my_process_result_set(mysql,result)); + assert(0 == my_process_result_set(result)); mysql_free_result(result); } @@ -1688,78 +1722,76 @@ void test_simple_delete(MYSQL *mysql) /******************************************************** * to test simple update * *********************************************************/ -void test_update(MYSQL *mysql) +void test_update() { MYSQL_STMT *stmt; int rc,param_count; - const char *query; - char *szData=(char *)"updated-value"; + char szData[25]; int nData=1; MYSQL_RES *result; - MYSQL_BIND bind[2]; - + MYSQL_BIND bind[2]; - myheader("test_update"); + + myheader("test_update"); init_bind(bind); rc = mysql_autocommit(mysql,true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_update"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_update"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_update(col1 int primary key auto_increment,\ col2 varchar(50), col3 int )"); - myquery(mysql,rc); - - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); - query = "INSERT INTO test_update(col2,col3) VALUES(?,?)"; + rc = mysql_commit(mysql); + myquery(rc); + + strcpy(query,"INSERT INTO test_update(col2,col3) VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); assert(param_count == 2); /* string data */ - szData=(char *)"inserted-data"; bind[0].buffer_type=FIELD_TYPE_STRING; bind[0].buffer=szData; + bind[0].buffer_length=sprintf(szData,"inserted-data"); bind[1].buffer=(gptr)&nData; bind[1].buffer_type=FIELD_TYPE_LONG; - + rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); nData=100; rc = mysql_execute(stmt); mystmt(stmt, rc); - + assert(1 == mysql_affected_rows(mysql)); mysql_stmt_close(stmt); - /* insert by prepare */ - query = "UPDATE test_update SET col2=? WHERE col3=?"; + strcpy(query,"UPDATE test_update SET col2=? WHERE col3=?"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in update:%d\n", param_count); assert(param_count == 2); - nData=100;szData=(char *)"updated-data"; + nData=100; + - bind[0].buffer_type=FIELD_TYPE_STRING; bind[0].buffer=szData; + bind[0].buffer_length=sprintf(szData,"updated-data"); bind[1].buffer=(gptr)&nData; bind[1].buffer_type=FIELD_TYPE_LONG; - rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); @@ -1771,17 +1803,17 @@ void test_update(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM test_update"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(1 == my_process_result_set(mysql,result)); + assert(1 == my_process_result_set(result)); mysql_free_result(result); } @@ -1789,29 +1821,28 @@ void test_update(MYSQL *mysql) /******************************************************** * to test simple prepare * *********************************************************/ -void test_init_prepare(MYSQL *mysql) +void test_init_prepare() { MYSQL_STMT *stmt; int param_count, rc; - const char *query; MYSQL_RES *result; - myheader("test_init_prepare"); - - rc = mysql_query(mysql,"DROP TABLE IF EXISTS my_prepare"); - myquery(mysql,rc); - + myheader("test_init_prepare"); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS my_prepare"); + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE my_prepare(col1 int ,col2 varchar(50))"); - myquery(mysql,rc); - - + myquery(rc); + + /* insert by prepare */ - query = "INSERT INTO my_prepare VALUES(10,'venu')"; + strcpy(query,"INSERT INTO my_prepare VALUES(10,'venu')"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); @@ -1824,17 +1855,17 @@ void test_init_prepare(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM my_prepare"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(1 == my_process_result_set(mysql,result)); + assert(1 == my_process_result_set(result)); mysql_free_result(result); } @@ -1842,55 +1873,56 @@ void test_init_prepare(MYSQL *mysql) /******************************************************** * to test simple bind result * *********************************************************/ -void test_bind_result(MYSQL *mysql) +void test_bind_result() { MYSQL_STMT *stmt; int rc; const char query[100]; int nData; char szData[100]; - MYSQL_BIND bind[2]; + MYSQL_BIND bind[2]; myheader("test_bind_result"); init_bind(bind); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_bind_result"); - myquery(mysql,rc); - + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_bind_result"); + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_bind_result(col1 int ,col2 varchar(50))"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"INSERT INTO test_bind_result VALUES(10,'venu')"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"INSERT INTO test_bind_result VALUES(20,'MySQL')"); - myquery(mysql,rc); - - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); - /* fetch */ + rc = mysql_commit(mysql); + myquery(rc); + + /* fetch */ bind[0].buffer_type=FIELD_TYPE_LONG; bind[0].buffer= (gptr) &nData; /* integer data */ bind[1].buffer_type=FIELD_TYPE_STRING; bind[1].buffer=szData; /* string data */ - + bind[1].buffer_length=sizeof(szData); + strcpy((char *)query , "SELECT * FROM test_bind_result"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); - + myxquery(stmt); + rc = mysql_bind_result(stmt,bind); - mystmt(stmt, rc); + mystmt(stmt, rc); rc = mysql_execute(stmt); - mystmt(stmt, rc); + mystmt(stmt, rc); rc = mysql_fetch(stmt); mystmt(stmt,rc); @@ -1915,30 +1947,29 @@ void test_bind_result(MYSQL *mysql) /******************************************************** * to test simple prepare with all possible types * *********************************************************/ -void test_prepare_ext(MYSQL *mysql) +void test_prepare_ext() { MYSQL_STMT *stmt; int rc,param_count; - char *query; + char *sql; int nData=1; MYSQL_RES *result; char tData=1; short sData=10; longlong bData=20; - MYSQL_BIND bind_int[6]; + MYSQL_BIND bind_int[6]; + myheader("test_prepare_ext"); - myheader("test_prepare_ext"); - init_bind(bind_int); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_ext"); - myquery(mysql,rc); - - rc = mysql_commit(mysql); - myquery(mysql,rc); + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_ext"); + myquery(rc); - query = (char *)"CREATE TABLE test_prepare_ext\ + rc = mysql_commit(mysql); + myquery(rc); + + sql = (char *)"CREATE TABLE test_prepare_ext\ (\ c1 tinyint,\ c2 smallint,\ @@ -1973,13 +2004,13 @@ void test_prepare_ext(MYSQL *mysql) c31 enum('one','two','three'),\ c32 set('monday','tuesday','wednesday'))"; - rc = mysql_query(mysql,query); - myquery(mysql,rc); + rc = mysql_query(mysql,sql); + myquery(rc); /* insert by prepare - all integers */ - query = (char *)"INSERT INTO test_prepare_ext(c1,c2,c3,c4,c5,c6) VALUES(?,?,?,?,?,?)"; + strcpy(query,(char *)"INSERT INTO test_prepare_ext(c1,c2,c3,c4,c5,c6) VALUES(?,?,?,?,?,?)"); stmt = mysql_prepare(mysql,query, strlen(query)); - myquery(mysql,rc); + myquery(rc); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); @@ -2008,7 +2039,7 @@ void test_prepare_ext(MYSQL *mysql) /*bigint*/ bind_int[5].buffer_type=FIELD_TYPE_LONGLONG; bind_int[5].buffer= (void *)&bData; - + rc = mysql_bind_param(stmt,bind_int); mystmt(stmt, rc); @@ -2024,17 +2055,17 @@ void test_prepare_ext(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT c1,c2,c3,c4,c5,c6 FROM test_prepare_ext"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(nData == my_process_result_set(mysql,result)); + assert(nData == my_process_result_set(result)); mysql_free_result(result); } @@ -2044,93 +2075,93 @@ void test_prepare_ext(MYSQL *mysql) /******************************************************** * to test real and alias names * *********************************************************/ -void test_field_names(MYSQL *mysql) +void test_field_names() { int rc; MYSQL_RES *result; - - myheader("test_field_names"); + + myheader("test_field_names"); printf("\n%d,%d,%d",MYSQL_TYPE_DECIMAL,MYSQL_TYPE_NEWDATE,MYSQL_TYPE_ENUM); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_field_names1"); - myquery(mysql,rc); + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_field_names1"); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_field_names2"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_field_names2"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_field_names1(id int,name varchar(50))"); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_field_names2(id int,name varchar(50))"); - myquery(mysql,rc); - + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); - + myquery(rc); + /* with table name included with true column name */ rc = mysql_query(mysql,"SELECT id as 'id-alias' FROM test_field_names1"); - myquery(mysql,rc); - - result = mysql_use_result(mysql); - mytest(mysql,result); + myquery(rc); - assert(0 == my_process_result_set(mysql,result)); - mysql_free_result(result); + result = mysql_use_result(mysql); + mytest(result); + + assert(0 == my_process_result_set(result)); + mysql_free_result(result); /* with table name included with true column name */ rc = mysql_query(mysql,"SELECT t1.id as 'id-alias',test_field_names2.name FROM test_field_names1 t1,test_field_names2"); - myquery(mysql,rc); - - result = mysql_use_result(mysql); - mytest(mysql,result); + myquery(rc); - assert(0 == my_process_result_set(mysql,result)); + result = mysql_use_result(mysql); + mytest(result); + + assert(0 == my_process_result_set(result)); mysql_free_result(result); } /******************************************************** * to test warnings * *********************************************************/ -void test_warnings(MYSQL *mysql) +void test_warnings() { int rc; MYSQL_RES *result; - - myheader("test_warnings"); - rc = mysql_query(mysql,"USE test"); - myquery(mysql,rc); - - rc = mysql_query(mysql,"SHOW WARNINGS"); - myquery(mysql,rc); - + myheader("test_warnings"); + + rc = mysql_query(mysql,"USE test"); + myquery(rc); + + rc = mysql_query(mysql,"SHOW WARNINGS"); + myquery(rc); + result = mysql_use_result(mysql); - mytest(mysql,result); + mytest(result); - my_process_result_set(mysql,result); + my_process_result_set(result); mysql_free_result(result); } /******************************************************** * to test errors * *********************************************************/ -void test_errors(MYSQL *mysql) +void test_errors() { int rc; MYSQL_RES *result; - - myheader("test_errors"); - - rc = mysql_query(mysql,"SHOW ERRORS"); - myquery(mysql,rc); - - result = mysql_use_result(mysql); - mytest(mysql,result); - my_process_result_set(mysql,result); + myheader("test_errors"); + + rc = mysql_query(mysql,"SHOW ERRORS"); + myquery(rc); + + result = mysql_use_result(mysql); + mytest(result); + + my_process_result_set(result); mysql_free_result(result); } @@ -2139,36 +2170,36 @@ void test_errors(MYSQL *mysql) /******************************************************** * to test simple prepare-insert * *********************************************************/ -void test_insert(MYSQL *mysql) -{ +void test_insert() +{ MYSQL_STMT *stmt; - int rc,param_count; + int rc,param_count, length; char query[200]; char str_data[50]; char tiny_data; MYSQL_RES *result; - MYSQL_BIND bind[2]; + MYSQL_BIND bind[2]; - myheader("test_insert"); + myheader("test_insert"); rc = mysql_autocommit(mysql, true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prep_insert"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prep_insert"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_prep_insert(col1 tinyint,\ col2 varchar(50))"); - myquery(mysql,rc); + myquery(rc); /* insert by prepare */ bzero(bind, sizeof(bind)); strcpy(query,"INSERT INTO test_prep_insert VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); @@ -2180,14 +2211,15 @@ void test_insert(MYSQL *mysql) /* string */ bind[1].buffer_type=FIELD_TYPE_STRING; bind[1].buffer=str_data; - + bind[1].length=(long *)&length; + rc = mysql_bind_param(stmt,bind); mystmt(stmt, rc); /* now, execute the prepared statement to insert 10 records.. */ for (tiny_data=0; tiny_data < 3; tiny_data++) { - bind[1].buffer_length = sprintf(str_data,"MySQL%d",tiny_data); + length = sprintf(str_data,"MySQL%d",tiny_data); rc = mysql_execute(stmt); mystmt(stmt, rc); } @@ -2196,17 +2228,17 @@ void test_insert(MYSQL *mysql) /* now fetch the results ..*/ rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); /* test the results now, only one row should exists */ rc = mysql_query(mysql,"SELECT * FROM test_prep_insert"); - myquery(mysql,rc); - + myquery(rc); + /* get the result */ result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert((int)tiny_data == my_process_result_set(mysql,result)); + assert((int)tiny_data == my_process_result_set(result)); mysql_free_result(result); } @@ -2214,60 +2246,60 @@ void test_insert(MYSQL *mysql) /******************************************************** * to test simple prepare-resultset info * *********************************************************/ -void test_prepare_resultset(MYSQL *mysql) -{ +void test_prepare_resultset() +{ MYSQL_STMT *stmt; int rc,param_count; char query[200]; MYSQL_RES *result; - myheader("test_prepare_resultset"); + myheader("test_prepare_resultset"); rc = mysql_autocommit(mysql, true); - myquery(mysql,rc); + myquery(rc); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_resultset"); + myquery(rc); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_prepare_resultset"); - myquery(mysql,rc); - rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_prepare_resultset(id int,\ name varchar(50),extra double)"); - myquery(mysql,rc); + myquery(rc); /* insert by prepare */ strcpy(query,"INSERT INTO test_prepare_resultset(id,name) VALUES(?,?)"); stmt = mysql_prepare(mysql, query, strlen(query)); - myxquery(mysql,stmt); + myxquery(stmt); param_count = mysql_param_count(stmt); fprintf(stdout," total parameters in insert:%d\n", param_count); assert(param_count == 2); rc = mysql_query(mysql,"SELECT * FROM test_prepare_resultset"); - myquery(mysql,rc); + myquery(rc); /* get the prepared-result */ result = mysql_prepare_result(stmt); assert( result != 0); - my_print_result_metadata(result); + my_print_result_metadata(result); mysql_free_result(result); result = mysql_store_result(mysql); - mytest(mysql,result); + mytest(result); - assert(0 == my_process_result_set(mysql,result)); + assert(0 == my_process_result_set(result)); mysql_free_result(result); /* get the prepared-result */ result = mysql_prepare_result(stmt); assert( result != 0); - my_print_result_metadata(result); + my_print_result_metadata(result); mysql_free_result(result); - + mysql_stmt_close(stmt); } @@ -2275,21 +2307,21 @@ void test_prepare_resultset(MYSQL *mysql) * to test field flags (verify .NET provider) * *********************************************************/ -void test_field_flags(MYSQL *mysql) +void test_field_flags() { int rc; MYSQL_RES *result; MYSQL_FIELD *field; unsigned int i; - - myheader("test_field_flags"); - rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_field_flags"); - myquery(mysql,rc); - + myheader("test_field_flags"); + + rc = mysql_query(mysql,"DROP TABLE IF EXISTS test_field_flags"); + myquery(rc); + rc = mysql_commit(mysql); - myquery(mysql,rc); + myquery(rc); rc = mysql_query(mysql,"CREATE TABLE test_field_flags(id int NOT NULL AUTO_INCREMENT PRIMARY KEY,\ id1 int NOT NULL,\ @@ -2298,17 +2330,17 @@ void test_field_flags(MYSQL *mysql) id4 int NOT NULL,\ id5 int,\ KEY(id3,id4))"); - myquery(mysql,rc); + myquery(rc); rc = mysql_commit(mysql); - myquery(mysql,rc); - + myquery(rc); + /* with table name included with true column name */ rc = mysql_query(mysql,"SELECT * FROM test_field_flags"); - myquery(mysql,rc); - + myquery(rc); + result = mysql_use_result(mysql); - mytest(mysql,result); + mytest(result); mysql_field_seek(result,0); fputc('\n', stdout); @@ -2338,17 +2370,19 @@ static struct my_option myctest_long_options[] = 0, 0, 0, 0, 0}, {"database", 'D', "Database to use", (gptr*) &opt_db, (gptr*) &opt_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"host", 'h', "Connect to host", (gptr*) &opt_host, (gptr*) &opt_host, 0, GET_STR, + {"host", 'h', "Connect to host", (gptr*) &opt_host, (gptr*) &opt_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"password", 'p', "Password to use when connecting to server. If password is not given it's asked from the tty.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, +#ifndef DONT_ALLOW_USER_CHANGE {"user", 'u', "User for login if not current user", (gptr*) &opt_user, - (gptr*) &opt_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + (gptr*) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, +#endif {"port", 'P', "Port number to use for connection", (gptr*) &opt_port, (gptr*) &opt_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"socket", 'S', "Socket file to use for connection", (gptr*) &opt_unix_socket, - (gptr*) &opt_unix_socket, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + (gptr*) &opt_unix_socket, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} }; @@ -2392,9 +2426,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 'p': if (argument) { + char *start=argument; my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR)); opt_password= my_strdup(argument, MYF(MY_FAE)); while (*argument) *argument++= 'x'; /* Destroy argument */ + if (*start) + start[1]=0; } else tty_password= 1; @@ -2402,7 +2439,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case '?': case 'I': /* Info */ usage(); - exit(1); + exit(0); break; } return 0; @@ -2416,11 +2453,11 @@ static void get_options(int argc, char **argv) load_defaults("my",load_default_groups,&argc,&argv); - if ((ho_error=handle_options(&argc, &argv, myctest_long_options, + if ((ho_error=handle_options(&argc,&argv, myctest_long_options, get_one_option))) exit(ho_error); - free_defaults(argv); + /*free_defaults(argv);*/ if (tty_password) opt_password=get_tty_password(NullS); return; @@ -2430,47 +2467,50 @@ static void get_options(int argc, char **argv) * main routine * *********************************************************/ int main(int argc, char **argv) -{ - MYSQL *mysql; - - +{ MY_INIT(argv[0]); - get_options(argc,argv); /* don't work -- options : TODO */ + get_options(argc,argv); - mysql = client_connect(); /* connect to server */ + client_connect(); /* connect to server */ + + test_null(); /* test null data handling */ + test_simple_update(); + //test_select_simple(); + //test_prepare_resultset(); + //test_select(); /* simple prepare-select */ + test_insert(); /* prepare with insert */ + //test_bind_result(); /* result bind test */ + //test_long_data(); /* long data handling in pieces */ + test_prepare_simple();/* simple prepare */ + test_prepare(); /* prepare test */ + test_prepare_simple();/* simple prepare */ + test_null(); /* test null data handling */ + test_debug_example(); /* some debugging case */ + test_update(); /* prepare-update test */ + test_simple_update(); /* simple prepare with update */ + //test_long_data(); /* long data handling in pieces */ + test_simple_delete(); /* prepare with delete */ + test_field_names(); /* test for field names */ + test_double_compare();/* float comparision */ + client_query(); /* simple client query test */ + client_store_result();/* usage of mysql_store_result() */ + client_use_result(); /* usage of mysql_use_result() */ + test_tran_bdb(); /* transaction test on BDB table type */ + test_tran_innodb(); /* transaction test on InnoDB table type */ + test_prepare_ext(); /* test prepare with all types conversion -- TODO */ + test_prepare_syntax();/* syntax check for prepares */ + //test_prepare_field_result(); /* prepare meta info */ + test_field_names(); /* test for field names */ + test_field_flags(); /* test to help .NET provider team */ + //test_long_data_str(); /* long data handling */ + //test_long_data_str1();/* yet another long data handling */ + //test_long_data_bin(); /* long binary insertion */ + test_warnings(); /* show warnings test */ + test_errors(); /* show errors test */ + //test_select_simple(); /* simple select prepare */ + //test_prepare_resultset();/* prepare meta info test */ - test_select(mysql); /* simple prepare-select */ - test_insert(mysql); /* prepare with insert */ - test_bind_result(mysql); /* result bind test */ - test_prepare(mysql); /* prepare test */ - test_prepare_simple(mysql);/* simple prepare */ - test_null(mysql); /* test null data handling */ - test_debug_example(mysql); /* some debugging case */ - test_update(mysql); /* prepare-update test */ - test_simple_update(mysql); /* simple prepare with update */ - test_long_data(mysql); /* long data handling in pieces */ - test_simple_delete(mysql); /* prepare with delete */ - test_field_names(mysql); /* test for field names */ - test_double_compare(mysql);/* float comparision */ - client_query(mysql); /* simple client query test */ - client_store_result(mysql);/* usage of mysql_store_result() */ - client_use_result(mysql); /* usage of mysql_use_result() */ - test_tran_bdb(mysql); /* transaction test on BDB table type */ - test_tran_innodb(mysql); /* transaction test on InnoDB table type */ - test_prepare_ext(mysql); /* test prepare with all types conversion -- TODO */ - test_prepare_syntax(mysql);/* syntax check for prepares */ - test_prepare_field_result(mysql); /* prepare meta info */ - test_field_names(mysql); /* test for field names */ - test_field_flags(mysql); /* test to help .NET provider team */ - test_long_data_str(mysql); /* long data handling */ - test_long_data_str1(mysql);/* yet another long data handling */ - test_long_data_bin(mysql); /* long binary insertion */ - test_warnings(mysql); /* show warnings test */ - test_errors(mysql); /* show errors test */ - test_select_simple(mysql); /* simple select prepare */ - test_prepare_resultset(mysql);/* prepare meta info test */ - - client_disconnect(mysql); /* disconnect from server */ + client_disconnect(); /* disconnect from server */ fprintf(stdout,"\ndone !!!\n"); return(0); From fe9bbec4c0c48a680dbfeecd4d334679bc7bd5d4 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 23 Nov 2002 15:49:12 +0200 Subject: [PATCH 218/246] reverting a test that belongs to 3.23 --- mysql-test/r/delete.result | 6 ------ mysql-test/t/delete.test | 5 ----- 2 files changed, 11 deletions(-) diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result index e3e95c79fb7..c2230722aa6 100644 --- a/mysql-test/r/delete.result +++ b/mysql-test/r/delete.result @@ -24,9 +24,3 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a)); insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27); delete from t1 where a=27; drop table t1; -create table t1 (id int, index(id)); -insert into t1 values(NULL); -delete from t1 where id <=> NULL; -select * from t1; -id -drop table if exists t1; diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test index fc57fdabcd5..953e22cdd55 100644 --- a/mysql-test/t/delete.test +++ b/mysql-test/t/delete.test @@ -35,8 +35,3 @@ create table t1 (a bigint not null, primary key (a,a,a,a,a,a,a,a,a,a)); insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27); delete from t1 where a=27; drop table t1; -create table t1 (id int, index(id)); -insert into t1 values(NULL); -delete from t1 where id <=> NULL; -select * from t1; -drop table if exists t1; From b7bcb96508604ca639103279d0de749bc6f4afa9 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 23 Nov 2002 18:54:15 +0200 Subject: [PATCH 219/246] lock option in table list sql/sql_lex.cc: note about methods location --- sql/sql_lex.cc | 5 ++++- sql/sql_parse.cc | 24 +----------------------- sql/sql_yacc.yy | 13 +++++++++---- 3 files changed, 14 insertions(+), 28 deletions(-) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 9ed66aede6f..286cec87424 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1282,4 +1282,7 @@ List* st_select_lex::get_ignore_index() return ignore_index_ptr; } -// There are st_select_lex::add_table_to_list in sql_parse.cc +/* + There are st_select_lex::add_table_to_list & + st_select_lex::set_lock_for_tables in sql_parse.cc +*/ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 263ac50120d..9199b496dac 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1426,20 +1426,7 @@ mysql_execute_command(THD *thd) { if (!result) { - if ((result=new select_send())) - { - /* - Normal select: - Change lock if we are using SELECT HIGH PRIORITY, - FOR UPDATE or IN SHARE MODE - - TODO: Delete the following loop when locks is set by sql_yacc - */ - TABLE_LIST *table; - for (table = tables ; table ; table=table->next) - table->lock_type= lex->lock_option; - } - else + if (!(result=new select_send())) { res= -1; #ifdef DELETE_ITEMS @@ -1663,9 +1650,6 @@ mysql_execute_command(THD *thd) TABLE_LIST *table; if (check_table_access(thd, SELECT_ACL, tables->next)) goto error; // Error message is given - /* TODO: Delete the following loop when locks is set by sql_yacc */ - for (table = tables->next ; table ; table=table->next) - table->lock_type= lex->lock_option; } unit->offset_limit_cnt= select_lex->offset_limit; unit->select_limit_cnt= select_lex->select_limit+ @@ -2023,12 +2007,6 @@ mysql_execute_command(THD *thd) net_printf(thd,ER_INSERT_TABLE_USED,tables->real_name); DBUG_VOID_RETURN; } - { - /* TODO: Delete the following loop when locks is set by sql_yacc */ - TABLE_LIST *table; - for (table = tables->next ; table ; table=table->next) - table->lock_type= lex->lock_option; - } /* Skip first table, which is the table we are inserting in */ lex->select_lex.table_list.first= diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index eaae24d0310..f2c8869b1af 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -798,7 +798,10 @@ create: ($2 & HA_LEX_CREATE_TMP_TABLE ? &tmp_table_alias : - (LEX_STRING*) 0),1)) + (LEX_STRING*) 0),1, + ((using_update_log)? + TL_READ_NO_INSERT: + TL_READ))) YYABORT; lex->create_list.empty(); lex->key_list.empty(); @@ -2374,8 +2377,9 @@ join_table: } table_ident opt_table_alias opt_key_definition { - SELECT_LEX_NODE *sel=Select; - if (!($$= sel->add_table_to_list($2, $3, 0, TL_UNLOCK, + LEX *lex= Lex; + SELECT_LEX_NODE *sel= lex->current_select; + if (!($$= sel->add_table_to_list($2, $3, 0, lex->lock_option, sel->get_use_index(), sel->get_ignore_index()))) YYABORT; @@ -2388,7 +2392,8 @@ join_table: SELECT_LEX_UNIT *unit= lex->current_select->master_unit(); lex->current_select= unit->outer_select(); if (!($$= lex->current_select-> - add_table_to_list(new Table_ident(unit), $5, 0, TL_UNLOCK))) + add_table_to_list(new Table_ident(unit), $5, 0, + lex->lock_option))) YYABORT; }; From b99dec07b08cc6c54d91b7ee6b0607abc62b9a8c Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 23 Nov 2002 20:40:16 +0200 Subject: [PATCH 220/246] after merging fix (update SCRUM?) mysql-test/t/subselect.test: after merging fix sql/sql_lex.cc: after merging fix sql/sql_update.cc: after merging fix sql/sql_yacc.yy: after merging fix --- mysql-test/t/subselect.test | 2 +- sql/sql_lex.cc | 2 +- sql/sql_update.cc | 1 - sql/sql_yacc.yy | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 75ae1a74125..c86a6e58b1a 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -114,6 +114,7 @@ EXPLAIN SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); +SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1; -- error 1240 SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; EXPLAIN SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1); @@ -181,7 +182,6 @@ EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numrep EXPLAIN SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'; EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'); drop table if exists threadhardwarefrtest7; -drop table searchconthardwarefr3; #update with subselects create table t1 (a int NOT NULL, b int, primary key (a)); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 5adc1bec539..cf7d866915e 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -149,7 +149,7 @@ LEX *lex_start(THD *thd, uchar *buf,uint length) lex->select_lex.expr_list.empty(); lex->select_lex.ftfunc_list_alloc.empty(); lex->select_lex.ftfunc_list= &lex->select_lex.ftfunc_list_alloc; - lex->select= &lex->select_lex; + lex->current_select= &lex->select_lex; lex->convert_set= (lex->thd= thd)->variables.convert_set; lex->yacc_yyss=lex->yacc_yyvs=0; lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index ece2ed3df41..d4dc394ec9b 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -68,7 +68,6 @@ int mysql_update(THD *thd, LINT_INIT(used_index); LINT_INIT(timestamp_query_id); - table_list->lock_type= lock_type; if ((open_and_lock_tables(thd, table_list))) DBUG_RETURN(-1); fix_tables_pointers(&thd->lex.select_lex); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index e5ec86e6658..df343714e55 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1631,7 +1631,7 @@ select_init: select_part2: { LEX *lex=Lex; - if (lex->select == &lex->select_lex) + if (lex->current_select == &lex->select_lex) lex->lock_option= TL_READ; /* Only for global SELECT */ mysql_init_select(lex); } From 9a6182e4e4be8da3d06dfc95c02056b2170bd4d2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 23 Nov 2002 21:55:39 +0200 Subject: [PATCH 221/246] fixed bug with thd->allow_sum_func value in subselect mysql-test/r/subselect.result: test of sum function with subselect mysql-test/t/subselect.test: test of sum function with subselect --- mysql-test/r/subselect.result | 3 +++ mysql-test/t/subselect.test | 1 + sql/sql_base.cc | 7 +++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 91118c1e664..b6699729532 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -12,6 +12,9 @@ SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; Reference 'a' not supported (forward reference in item list) SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b; Reference 'b' not supported (forward reference in item list) +SELECT (SELECT 1),MAX(1) FROM (SELECT 1); +(SELECT 1) MAX(1) +1 1 drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index b9edd0e3396..02d85dd60a1 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -5,6 +5,7 @@ SELECT (SELECT (SELECT 0 UNION SELECT 0)); SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; -- error 1245 SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b; +SELECT (SELECT 1),MAX(1) FROM (SELECT 1); drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 59310fb00de..7b434eb0bfb 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2225,8 +2225,10 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds) { DBUG_ENTER("setup_conds"); thd->set_query_id=1; - thd->cond_count=0; - thd->allow_sum_func=0; + + thd->cond_count= 0; + bool save_allow_sum_func= thd->allow_sum_func; + thd->allow_sum_func= 0; if (*conds) { thd->where="where clause"; @@ -2299,6 +2301,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds) table->on_expr=and_conds(table->on_expr,cond_and); } } + thd->allow_sum_func= save_allow_sum_func; DBUG_RETURN(test(thd->fatal_error)); } From fc528393d9252717b1d804339d12aa73c7c55555 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 23 Nov 2002 22:11:53 +0200 Subject: [PATCH 222/246] error messages fix --- sql/share/czech/errmsg.txt | 2 +- sql/share/danish/errmsg.txt | 2 +- sql/share/dutch/errmsg.txt | 2 +- sql/share/english/errmsg.txt | 2 +- sql/share/estonian/errmsg.txt | 2 +- sql/share/french/errmsg.txt | 2 +- sql/share/german/errmsg.txt | 2 +- sql/share/greek/errmsg.txt | 2 +- sql/share/hungarian/errmsg.txt | 2 +- sql/share/italian/errmsg.txt | 2 +- sql/share/japanese/errmsg.txt | 2 +- sql/share/korean/errmsg.txt | 2 +- sql/share/norwegian-ny/errmsg.txt | 2 +- sql/share/norwegian/errmsg.txt | 2 +- sql/share/polish/errmsg.txt | 2 +- sql/share/portuguese/errmsg.txt | 2 +- sql/share/russian/errmsg.txt | 2 +- sql/share/serbian/errmsg.txt | 2 +- sql/share/slovak/errmsg.txt | 2 +- sql/share/spanish/errmsg.txt | 2 +- sql/share/swedish/errmsg.txt | 2 +- sql/share/ukrainian/errmsg.txt | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 9478bcdef0d..4838de12ed6 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -254,5 +254,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index b699ec7f87c..91fa06f184f 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -248,5 +248,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index 9e962fdb9de..50c70ce0d2c 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -256,5 +256,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 04a3b09ce52..1c5564b9ad5 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -245,5 +245,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 5a980b441a4..8a49cc7fb69 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -250,5 +250,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index dfb4e1774d0..a8b602ee295 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -245,5 +245,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index c1ae3bb501f..cb449738d61 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -248,5 +248,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index f533d0d4d67..f6c650468b1 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -245,5 +245,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 58cce8c974e..fe47d79a101 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -247,5 +247,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 6836f318fd8..0d951857392 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -245,5 +245,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index a7ae09b9f00..df78901a6e9 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -247,5 +247,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 6e3dc5920c8..c20110e1aa5 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -245,5 +245,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index f897235e26d..c75c3ed6140 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -247,5 +247,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 3f9c6e92e12..b5a660773ab 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -247,5 +247,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 705e4c20616..c65a16bf1e4 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -249,5 +249,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 1ee15fb577e..355ae90c157 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -245,5 +245,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 19ded0473bd..35134e6d9d5 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -248,5 +248,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "ãÉËÌÉÞÅÓËÁÑ ÓÓÙÌËÁ ÎÁ ÐÏÄÚÁÐÒÏÓ", -"Converting column '%s' from %s to %s" +"ðÒÅÏÂÒÁÚÏ×ÁÎÉÅ ÐÏÌÑ '%s' ÉÚ %s × %s", "óÓÙÌËÁ '%-.64s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ (%s)", diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index 0951cd14db6..354c0bdfac4 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -241,5 +241,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index d7cf0b62c5e..4f49aeb2f6e 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -253,5 +253,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 0a7367c7200..1bd4aed6897 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -246,5 +246,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "Cyclic reference on subqueries", -"Converting column '%s' from %s to %s" +"Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index afd5c559403..af3f7ca33dd 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -245,5 +245,5 @@ "Okänd PREPARED STATEMENT id (%ld) var given till %s", "Hjälp databasen finns inte eller är skadad", "Syklisk referens i subselect", -"Konvertar kolumn '%s' från %s till %s" +"Konvertar kolumn '%s' från %s till %s", "Reference '%-.64s' not supported (%s)", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index b5a6eec5c45..c5bfff130fd 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -250,5 +250,5 @@ "Unknown prepared statement handler (%ld) given to %s", "Help database is corrupt or does not exist", "ãÉËÌiÞÎÅ ÐÏÓÉÌÁÎÎÑ ÎÁ ÐiÄÚÁÐÉÔ", -"Converting column '%s' from %s to %s" +"ðÅÒÅÔ×ÏÒÅÎÎÑ ÓÔÏ×ÂÃÁ '%s' Ú %s Õ %s", "ðÏÓÉÌÁÎÎÑ '%-.64s' ÎÅ ÐiÄÔÒÉÍÕÅÔÓÑ (%s)", From 982e3423f34432cd97692b7a36833e64dcb297eb Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 23 Nov 2002 23:21:49 +0200 Subject: [PATCH 223/246] revert open_ltable changing --- sql/mysql_priv.h | 3 +-- sql/sql_base.cc | 17 +++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index a92893ca142..3ba88d493bd 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -448,8 +448,7 @@ void kill_delayed_threads(void); int mysql_delete(THD *thd, TABLE_LIST *table, COND *conds, ORDER *order, ha_rows rows, ulong options); int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok=0); -TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update, - bool multiopen= 0); +TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type update); TABLE *open_table(THD *thd,const char *db,const char *table,const char *alias, bool *refresh); TABLE *reopen_name_locked_table(THD* thd, TABLE_LIST* table); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 4c6192bc694..5655225cea3 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1615,24 +1615,17 @@ static bool check_lock_and_start_stmt(THD *thd, TABLE *table, table_list->table table */ -TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type, - bool multiopen) +TABLE *open_ltable(THD *thd, TABLE_LIST *table_list, thr_lock_type lock_type) { TABLE *table; bool refresh; DBUG_ENTER("open_ltable"); thd->proc_info="Opening table"; - if (table_list->next && multiopen) - { - while (open_tables(thd,table_list) && refresh) ; - table= table_list->table; - } - else - while (!(table= open_table(thd,table_list->db, - table_list->real_name,table_list->alias, - &refresh)) && refresh) ; - + while (!(table=open_table(thd,table_list->db, + table_list->real_name,table_list->alias, + &refresh)) && refresh) ; + if (table) { #if defined( __WIN__) || defined(OS2) From 4587dddab92fc96764f190b8dc1d74461846f47d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Nov 2002 11:18:32 +0200 Subject: [PATCH 224/246] fix of selfreference bug mysql-test/r/subselect.result: test of selfreference mysql-test/t/subselect.test: test of selfreference --- mysql-test/r/subselect.result | 2 ++ mysql-test/t/subselect.test | 2 ++ sql/item.h | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index b6699729532..154f8ac9667 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -15,6 +15,8 @@ Reference 'b' not supported (forward reference in item list) SELECT (SELECT 1),MAX(1) FROM (SELECT 1); (SELECT 1) MAX(1) 1 1 +SELECT (SELECT a) as a; +Reference 'a' not supported (forward reference in item list) drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 02d85dd60a1..f838a27e7ff 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -6,6 +6,8 @@ SELECT (SELECT 1 FROM (SELECT 1) HAVING a=1) as a; -- error 1245 SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVING a=1) as b; SELECT (SELECT 1),MAX(1) FROM (SELECT 1); +-- error 1245 +SELECT (SELECT a) as a; drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; create table t1 (a int); create table t2 (a int, b int); diff --git a/sql/item.h b/sql/item.h index e6b2d74c323..39e90cef561 100644 --- a/sql/item.h +++ b/sql/item.h @@ -403,8 +403,8 @@ public: :Item_ident(NullS,table_name_par,field_name_par),ref(item) {} enum Type type() const { return REF_ITEM; } bool eq(const Item *item, bool binary_cmp) const - { return (*ref)->eq(item, binary_cmp); } - ~Item_ref() { if (ref) delete *ref; } + { return ref && (*ref)->eq(item, binary_cmp); } + ~Item_ref() { if (ref && (*ref) != this) delete *ref; } double val() { double tmp=(*ref)->val_result(); From 72da2e4c9463aeb80083fd53cc0e6f5091b5f4f7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Nov 2002 15:47:19 +0200 Subject: [PATCH 225/246] Added new ANSI functions LOCALTIME, LOCALTIMESTAMP and CURRENT_USER Added CEIL as an alias for CEILING Cleaned up CHECK constraint handling. (We don't anymore require braces after CHECK) Added casting to CHAR. mysql-test/r/bigint.result: Moved casting test to cast.test mysql-test/r/func_time.result: Test of new functions mysql-test/t/bigint.test: Moved casting test to cast.test mysql-test/t/func_time.test: Test of new functions sql/item_create.cc: Added casting to CHAR sql/item_func.h: Added casting to CHAR sql/item_timefunc.h: Added casting to CHAR sql/lex.h: Added new ANSI functions LOCALTIME, LOCALTIMESTAMP and CURRENT_USER Added CEIL as an alias for CEILING sql/sql_yacc.yy: Cleaned up CHECK constraint handling. --- mysql-test/r/bigint.result | 21 ------------------ mysql-test/r/cast.result | 39 +++++++++++++++++++++++++++++++++ mysql-test/r/constraints.result | 16 ++++++++++++++ mysql-test/r/func_time.result | 6 +++++ mysql-test/t/bigint.test | 8 ------- mysql-test/t/cast.test | 22 +++++++++++++++++++ mysql-test/t/constraints.test | 21 ++++++++++++++++++ mysql-test/t/func_time.test | 2 ++ sql/item_create.cc | 1 + sql/item_func.h | 2 +- sql/item_timefunc.h | 13 +++++++++++ sql/lex.h | 4 ++++ sql/sql_yacc.yy | 19 +++++++++++----- 13 files changed, 138 insertions(+), 36 deletions(-) create mode 100644 mysql-test/r/cast.result create mode 100644 mysql-test/r/constraints.result create mode 100644 mysql-test/t/cast.test create mode 100644 mysql-test/t/constraints.test diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index f666c5311b8..6afa74d20e2 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -52,24 +52,3 @@ select min(big),max(big),max(big)-1 from t1 group by a; min(big) max(big) max(big)-1 -1 9223372036854775807 9223372036854775806 drop table t1; -select CAST(1-2 AS UNSIGNED); -CAST(1-2 AS UNSIGNED) -18446744073709551615 -select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER); -CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER) --1 -select CONVERT('-1',UNSIGNED); -CONVERT('-1',UNSIGNED) -18446744073709551615 -select cast(-5 as unsigned) | 1, cast(-5 as unsigned) & -1; -cast(-5 as unsigned) | 1 cast(-5 as unsigned) & -1 -18446744073709551611 18446744073709551611 -select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; -cast(-5 as unsigned) -1 cast(-5 as unsigned) + 1 -18446744073709551610 18446744073709551612 -select ~5, cast(~5 as signed); -~5 cast(~5 as signed) -18446744073709551610 -6 -select cast(5 as unsigned) -6.0; -cast(5 as unsigned) -6.0 --1.0 diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result new file mode 100644 index 00000000000..572b32c171c --- /dev/null +++ b/mysql-test/r/cast.result @@ -0,0 +1,39 @@ +select CAST(1-2 AS UNSIGNED); +CAST(1-2 AS UNSIGNED) +18446744073709551615 +select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER); +CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER) +-1 +select CONVERT('-1',UNSIGNED); +CONVERT('-1',UNSIGNED) +18446744073709551615 +select cast(-5 as unsigned) | 1, cast(-5 as unsigned) & -1; +cast(-5 as unsigned) | 1 cast(-5 as unsigned) & -1 +18446744073709551611 18446744073709551611 +select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; +cast(-5 as unsigned) -1 cast(-5 as unsigned) + 1 +18446744073709551610 18446744073709551612 +select ~5, cast(~5 as signed); +~5 cast(~5 as signed) +18446744073709551610 -6 +select cast(5 as unsigned) -6.0; +cast(5 as unsigned) -6.0 +-1.0 +select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A"; +cast("A" as binary) = "a" cast(BINARY "a" as CHAR) = "A" +0 1 +select cast("2001-1-1" as DATE), cast("2001-1-1" as DATETIME); +cast("2001-1-1" as DATE) cast("2001-1-1" as DATETIME) +2001-1-1 2001-1-1 +select cast("1:2:3" as TIME); +cast("1:2:3" as TIME) +1:2:3 +select cast("2001-1-1" as date) = "2001-01-01"; +cast("2001-1-1" as date) = "2001-01-01" +0 +select cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"; +cast("2001-1-1" as datetime) = "2001-01-01 00:00:00" +0 +select cast("1:2:3" as TIME) = "1:02:03"; +cast("1:2:3" as TIME) = "1:02:03" +0 diff --git a/mysql-test/r/constraints.result b/mysql-test/r/constraints.result new file mode 100644 index 00000000000..3b41e291e0f --- /dev/null +++ b/mysql-test/r/constraints.result @@ -0,0 +1,16 @@ +drop table if exists t1; +create table t1 (a int check (a>0)); +insert into t1 values (1); +insert into t1 values (0); +drop table t1; +create table t1 (a int ,b int, check a>b); +insert into t1 values (1,0); +insert into t1 values (0,1); +drop table t1; +create table t1 (a int ,b int, constraint abc check (a>b)); +insert into t1 values (1,0); +insert into t1 values (0,1); +drop table t1; +create table t1 (a int null); +insert into t1 values (1),(NULL); +drop table t1; diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 4a1012f73bf..2941352c776 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -24,6 +24,12 @@ now()-curdate()*1000000-curtime() select strcmp(current_timestamp(),concat(current_date()," ",current_time())); strcmp(current_timestamp(),concat(current_date()," ",current_time())) 0 +select strcmp(localtime(),concat(current_date()," ",current_time())); +strcmp(localtime(),concat(current_date()," ",current_time())) +0 +select strcmp(localtimestamp(),concat(current_date()," ",current_time())); +strcmp(localtimestamp(),concat(current_date()," ",current_time())) +0 select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w"); date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w") January Thursday 2nd 1997 97 01 02 03 04 05 4 diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test index 15b35ac7c87..15c61c2c0dc 100644 --- a/mysql-test/t/bigint.test +++ b/mysql-test/t/bigint.test @@ -35,11 +35,3 @@ alter table t1 modify big bigint not null; select min(big),max(big),max(big)-1 from t1; select min(big),max(big),max(big)-1 from t1 group by a; drop table t1; - -select CAST(1-2 AS UNSIGNED); -select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER); -select CONVERT('-1',UNSIGNED); -select cast(-5 as unsigned) | 1, cast(-5 as unsigned) & -1; -select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; -select ~5, cast(~5 as signed); -select cast(5 as unsigned) -6.0; diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test new file mode 100644 index 00000000000..7a120ef5005 --- /dev/null +++ b/mysql-test/t/cast.test @@ -0,0 +1,22 @@ +# +# Test of cast function +# + +select CAST(1-2 AS UNSIGNED); +select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER); +select CONVERT('-1',UNSIGNED); +select cast(-5 as unsigned) | 1, cast(-5 as unsigned) & -1; +select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; +select ~5, cast(~5 as signed); +select cast(5 as unsigned) -6.0; +select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A"; +select cast("2001-1-1" as DATE), cast("2001-1-1" as DATETIME); +select cast("1:2:3" as TIME); + +# +# The following should be fixed in 4.1 +# + +select cast("2001-1-1" as date) = "2001-01-01"; +select cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"; +select cast("1:2:3" as TIME) = "1:02:03"; diff --git a/mysql-test/t/constraints.test b/mysql-test/t/constraints.test new file mode 100644 index 00000000000..8682cdc42a2 --- /dev/null +++ b/mysql-test/t/constraints.test @@ -0,0 +1,21 @@ +# +# Testing of constraints +# Currently MySQL only ignores the syntax. +# +drop table if exists t1; + +create table t1 (a int check (a>0)); +insert into t1 values (1); +insert into t1 values (0); +drop table t1; +create table t1 (a int ,b int, check a>b); +insert into t1 values (1,0); +insert into t1 values (0,1); +drop table t1; +create table t1 (a int ,b int, constraint abc check (a>b)); +insert into t1 values (1,0); +insert into t1 values (0,1); +drop table t1; +create table t1 (a int null); +insert into t1 values (1),(NULL); +drop table t1; diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 2ff57959965..fdbc0f71dba 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -12,6 +12,8 @@ select sec_to_time(9001),sec_to_time(9001)+0,time_to_sec("15:12:22"), select sec_to_time(time_to_sec('-838:59:59')); select now()-curdate()*1000000-curtime(); select strcmp(current_timestamp(),concat(current_date()," ",current_time())); +select strcmp(localtime(),concat(current_date()," ",current_time())); +select strcmp(localtimestamp(),concat(current_date()," ",current_time())); select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w"); select date_format("1997-01-02", concat("%M %W %D ","%Y %y %m %d %h %i %s %w")); select dayofmonth("1997-01-02"),dayofmonth(19970323); diff --git a/sql/item_create.cc b/sql/item_create.cc index f28e3248c61..c5f53f0d040 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -425,6 +425,7 @@ Item *create_func_cast(Item *a, Item_cast cast_type) LINT_INIT(res); switch (cast_type) { case ITEM_CAST_BINARY: res= new Item_func_binary(a); break; + case ITEM_CAST_CHAR: res= new Item_char_typecast(a); break; case ITEM_CAST_SIGNED_INT: res= new Item_func_signed(a); break; case ITEM_CAST_UNSIGNED_INT: res= new Item_func_unsigned(a); break; case ITEM_CAST_DATE: res= new Item_date_typecast(a); break; diff --git a/sql/item_func.h b/sql/item_func.h index 2e02d7cfd28..b7e0cee540a 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1003,7 +1003,7 @@ public: enum Item_cast { ITEM_CAST_BINARY, ITEM_CAST_SIGNED_INT, ITEM_CAST_UNSIGNED_INT, - ITEM_CAST_DATE, ITEM_CAST_TIME, ITEM_CAST_DATETIME + ITEM_CAST_DATE, ITEM_CAST_TIME, ITEM_CAST_DATETIME, ITEM_CAST_CHAR }; Item *create_func_cast(Item *a, Item_cast cast_type); diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 0fe487b7983..c0255e71d27 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -410,6 +410,7 @@ public: unsigned int size_of() { return sizeof(*this);} }; + class Item_extract :public Item_int_func { const interval_type int_type; @@ -424,10 +425,12 @@ class Item_extract :public Item_int_func unsigned int size_of() { return sizeof(*this);} }; + class Item_typecast :public Item_str_func { public: Item_typecast(Item *a) :Item_str_func(a) {} + const char *func_name() const { return "char"; } String *val_str(String *a) { a=args[0]->val_str(a); null_value=args[0]->null_value; return a; } void fix_length_and_dec() { max_length=args[0]->max_length; } @@ -435,6 +438,14 @@ public: }; +class Item_char_typecast :public Item_typecast +{ +public: + Item_char_typecast(Item *a) :Item_typecast(a) {} + void fix_length_and_dec() { binary=0; max_length=args[0]->max_length; } +}; + + class Item_date_typecast :public Item_typecast { public: @@ -450,6 +461,7 @@ public: } }; + class Item_time_typecast :public Item_typecast { public: @@ -465,6 +477,7 @@ public: } }; + class Item_datetime_typecast :public Item_typecast { public: diff --git a/sql/lex.h b/sql/lex.h index 49b6a3811e5..717e8a355ca 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -210,6 +210,8 @@ static SYMBOL symbols[] = { { "LIMIT", SYM(LIMIT),0,0}, { "LOAD", SYM(LOAD),0,0}, { "LOCAL", SYM(LOCAL_SYM),0,0}, + { "LOCALTIME", SYM(NOW_SYM),0,0}, + { "LOCALTIMESTAMP", SYM(NOW_SYM),0,0}, { "LOCK", SYM(LOCK_SYM),0,0}, { "LOCKS", SYM(LOCKS_SYM),0,0}, { "LOGS", SYM(LOGS_SYM),0,0}, @@ -394,7 +396,9 @@ static SYMBOL sql_functions[] = { { "BIT_OR", SYM(BIT_OR),0,0}, { "BIT_AND", SYM(BIT_AND),0,0}, { "CAST", SYM(CAST_SYM),0,0}, + { "CEIL", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ceiling)}, { "CEILING", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_ceiling)}, + { "CURRENT_USER", SYM(USER),0,0}, { "BIT_LENGTH", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_bit_length)}, { "CHAR_LENGTH", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_char_length)}, { "CHARACTER_LENGTH", SYM(FUNC_ARG1),0,CREATE_FUNC(create_func_char_length)}, diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index f6a0c483bb9..c3c6d8ad66b 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -899,7 +899,7 @@ field_list: field_list_item: - field_spec + field_spec check_constraint | field_spec references { Lex->col_list.empty(); /* Alloced by sql_alloc */ @@ -914,10 +914,16 @@ field_list_item: { Lex->col_list.empty(); /* Alloced by sql_alloc */ } - | opt_constraint CHECK_SYM '(' expr ')' + | opt_constraint check_constraint { Lex->col_list.empty(); /* Alloced by sql_alloc */ - }; + } + ; + +check_constraint: + /* empty */ + | CHECK_SYM expr + ; opt_constraint: /* empty */ @@ -1986,13 +1992,15 @@ in_sum_expr: cast_type: BINARY { $$=ITEM_CAST_BINARY; } + | CHAR_SYM { $$=ITEM_CAST_CHAR; } | SIGNED_SYM { $$=ITEM_CAST_SIGNED_INT; } | SIGNED_SYM INT_SYM { $$=ITEM_CAST_SIGNED_INT; } | UNSIGNED { $$=ITEM_CAST_UNSIGNED_INT; } | UNSIGNED INT_SYM { $$=ITEM_CAST_UNSIGNED_INT; } | DATE_SYM { $$=ITEM_CAST_DATE; } | TIME_SYM { $$=ITEM_CAST_TIME; } - | DATETIME { $$=ITEM_CAST_DATETIME; }; + | DATETIME { $$=ITEM_CAST_DATETIME; } + ; expr_list: { Select->expr_list.push_front(new List); } @@ -2437,7 +2445,7 @@ table_name: { if (!add_table_to_list($1,NULL,1)) YYABORT; }; if_exists: - /* empty */ { $$=0; } + /* empty */ { $$= 0; } | IF EXISTS { $$= 1; } ; @@ -3154,7 +3162,6 @@ keyword: | CACHE_SYM {} | CHANGED {} | CHECKSUM_SYM {} - | CHECK_SYM {} | CIPHER_SYM {} | CLIENT_SYM {} | CLOSE_SYM {} From bb948c635507db07365554d0e33bc09522c77557 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Nov 2002 16:20:41 +0200 Subject: [PATCH 226/246] Rewrote nice handling to make more portable --- scripts/safe_mysqld.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/safe_mysqld.sh b/scripts/safe_mysqld.sh index 2272443c972..96568bd5d19 100644 --- a/scripts/safe_mysqld.sh +++ b/scripts/safe_mysqld.sh @@ -157,9 +157,14 @@ NOHUP_NICENESS="nohup" if test -w / then NOHUP_NICENESS=`nohup nice 2>&1` - if test $? -eq 0 && test x"$NOHUP_NICENESS" != x0 && nice --1 echo foo > /dev/null 2>&1 - then - NOHUP_NICENESS="nice -n $NOHUP_NICENESS nohup" + if test $? -eq 0 && test x"$NOHUP_NICENESS" != x0 && nice --1 echo foo > /dev/null 2>&1 + then + if $NOHUP_NICENESS -gt 0 + then + $NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup" + else + NOHUP_NICENESS="nice -$NOHUP_NICENESS nohup" + fi else NOHUP_NICENESS="nohup" fi From 83e25bbc3090982c31a064b1b2cd78b710c37207 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Nov 2002 17:41:34 +0200 Subject: [PATCH 227/246] fixed removed by previos patch thd->allow_sum_func "side effect" of setup_conds renamed tables to prevent droping real tables mysql-test/r/group_by.result: test of error message mysql-test/r/subselect.result: renamed tables to prevent droping real tables mysql-test/t/group_by.test: test of error message mysql-test/t/subselect.test: renamed tables to prevent droping real tables sql/sql_base.cc: moved thd->allow_sum_func assignment to upper level sql/sql_select.cc: fixed removed by previos patch thd->allow_sum_func "side effect" of setup_conds --- mysql-test/r/group_by.result | 2 + mysql-test/r/subselect.result | 134 +++++++++++++++++----------------- mysql-test/t/group_by.test | 2 + mysql-test/t/subselect.test | 119 +++++++++++++++--------------- sql/sql_base.cc | 3 - sql/sql_select.cc | 26 ++++++- 6 files changed, 151 insertions(+), 135 deletions(-) diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 86a8eb2dd22..ead9935f824 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1,3 +1,5 @@ +SELECT 1 FROM (SELECT 1) GROUP BY SUM(1); +Invalid use of group function drop table if exists t1,t2,t3; CREATE TABLE t1 ( spID int(10) unsigned, diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 154f8ac9667..848a90fba8f 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -17,7 +17,7 @@ SELECT (SELECT 1),MAX(1) FROM (SELECT 1); 1 1 SELECT (SELECT a) as a; Reference 'a' not supported (forward reference in item list) -drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; create table t1 (a int); create table t2 (a int, b int); create table t3 (a int); @@ -140,11 +140,11 @@ id select_type table type possible_keys key key_len ref rows Extra 3 DEPENDENT UNION t5 ALL NULL NULL NULL NULL 2 Using where select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; Subselect returns more than 1 record -create table attend (patient_uq int, clinic_uq int, index i1 (clinic_uq)); -create table clinic( uq int primary key, name char(25)); -insert into clinic values(1,"Oblastnaia bolnitsa"),(2,"Bolnitsa Krasnogo Kresta"); -insert into attend values (1,1),(1,2),(2,2),(1,3); -select * from attend where exists (select * from clinic where uq = clinic_uq); +create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq)); +create table t7( uq int primary key, name char(25)); +insert into t7 values(1,"Oblastnaia bolnitsa"),(2,"Bolnitsa Krasnogo Kresta"); +insert into t6 values (1,1),(1,2),(2,2),(1,3); +select * from t6 where exists (select * from t7 where uq = clinic_uq); patient_uq clinic_uq 1 1 1 2 @@ -167,117 +167,113 @@ W 1 SELECT * FROM t3 WHERE b = (SELECT MIN(b) FROM t3); a b W a -drop table if exists inscrit; -CREATE TABLE `inscrit` ( +drop table if exists t8; +CREATE TABLE `t8` ( `pseudo` varchar(35) character set latin1 NOT NULL default '', `email` varchar(60) character set latin1 NOT NULL default '', PRIMARY KEY (`pseudo`), UNIQUE KEY `email` (`email`) ) TYPE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC; -INSERT INTO inscrit (pseudo,email) VALUES ('joce','test'); -INSERT INTO inscrit (pseudo,email) VALUES ('joce1','test1'); -INSERT INTO inscrit (pseudo,email) VALUES ('2joce1','2test1'); -EXPLAIN SELECT pseudo,(SELECT email FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce')) FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce'); +INSERT INTO t8 (pseudo,email) VALUES ('joce','test'); +INSERT INTO t8 (pseudo,email) VALUES ('joce1','test1'); +INSERT INTO t8 (pseudo,email) VALUES ('2joce1','2test1'); +EXPLAIN SELECT pseudo,(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce')) FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY inscrit const PRIMARY PRIMARY 35 const 1 -4 SUBSELECT inscrit const PRIMARY PRIMARY 35 const 1 -2 SUBSELECT inscrit const PRIMARY PRIMARY 35 const 1 -3 SUBSELECT inscrit const PRIMARY PRIMARY 35 const 1 -SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo,email FROM -inscrit WHERE pseudo='joce'); +1 PRIMARY t8 const PRIMARY PRIMARY 35 const 1 +4 SUBSELECT t8 const PRIMARY PRIMARY 35 const 1 +2 SUBSELECT t8 const PRIMARY PRIMARY 35 const 1 +3 SUBSELECT t8 const PRIMARY PRIMARY 35 const 1 +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM +t8 WHERE pseudo='joce'); Subselect returns more than 1 field -SELECT pseudo FROM inscrit WHERE pseudo=(SELECT * FROM inscrit WHERE +SELECT pseudo FROM t8 WHERE pseudo=(SELECT * FROM t8 WHERE pseudo='joce'); Subselect returns more than 1 field -SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce'); +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); pseudo joce -SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo LIKE '%joce%'); +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%'); Subselect returns more than 1 record -drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; -drop table if exists searchconthardwarefr3; -CREATE TABLE `searchconthardwarefr3` ( +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; +CREATE TABLE `t1` ( `topic` mediumint(8) unsigned NOT NULL default '0', `date` date NOT NULL default '0000-00-00', `pseudo` varchar(35) character set latin1 NOT NULL default '', PRIMARY KEY (`pseudo`,`date`,`topic`), KEY `topic` (`topic`) ) TYPE=MyISAM ROW_FORMAT=DYNAMIC; -INSERT INTO searchconthardwarefr3 (topic,date,pseudo) VALUES +INSERT INTO t1 (topic,date,pseudo) VALUES ('43506','2002-10-02','joce'),('40143','2002-08-03','joce'); -EXPLAIN SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; +EXPLAIN SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 Using where; Using index -EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); +1 SIMPLE t1 index NULL PRIMARY 41 NULL 2 Using where; Using index +EXPLAIN SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY No tables used -2 SUBSELECT searchconthardwarefr3 index NULL PRIMARY 41 NULL 2 Using where; Using index -SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; +2 SUBSELECT t1 index NULL PRIMARY 41 NULL 2 Using where; Using index +SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; date 2002-08-03 -SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); -(SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03') +SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); +(SELECT DISTINCT date FROM t1 WHERE date='2002-08-03') 2002-08-03 -SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1; +SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1; 1 1 1 1 -SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; +SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; Subselect returns more than 1 record -EXPLAIN SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1); +EXPLAIN SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY searchconthardwarefr3 index NULL topic 3 NULL 2 Using index +1 PRIMARY t1 index NULL topic 3 NULL 2 Using index 2 SUBSELECT No tables used 3 UNION No tables used -drop table searchconthardwarefr3; -drop table if exists forumconthardwarefr7, searchconthardwarefr7; -CREATE TABLE `forumconthardwarefr7` ( +drop table t1; +CREATE TABLE `t1` ( `numeropost` mediumint(8) unsigned NOT NULL auto_increment, `maxnumrep` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) TYPE=MyISAM ROW_FORMAT=FIXED; -INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (40143,1),(43506,2); -CREATE TABLE `searchconthardwarefr7` ( +INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2); +CREATE TABLE `t2` ( `mot` varchar(30) NOT NULL default '', `topic` mediumint(8) unsigned NOT NULL default '0', `date` date NOT NULL default '0000-00-00', `pseudo` varchar(35) NOT NULL default '', PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`) ) TYPE=MyISAM ROW_FORMAT=DYNAMIC; -INSERT INTO searchconthardwarefr7 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); -select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); +select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); a 40143 -SELECT numeropost,maxnumrep FROM forumconthardwarefr7 WHERE exists (SELECT 1 FROM searchconthardwarefr7 WHERE (mot='joce') AND date >= '2002-10-21' AND forumconthardwarefr7.numeropost = searchconthardwarefr7.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; +SELECT numeropost,maxnumrep FROM t1 WHERE exists (SELECT 1 FROM t2 WHERE (mot='joce') AND date >= '2002-10-21' AND t1.numeropost = t2.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; numeropost maxnumrep 43506 2 40143 1 -SELECT (SELECT 1) as a FROM (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1); Unknown column 'a' in 'having clause' -drop table forumconthardwarefr7, searchconthardwarefr7; -drop table if exists forumconthardwarefr7; -CREATE TABLE `forumconthardwarefr7` ( +drop table t1, t2; +drop table if exists t1; +CREATE TABLE `t1` ( `numeropost` mediumint(8) unsigned NOT NULL auto_increment, `maxnumrep` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) TYPE=MyISAM ROW_FORMAT=FIXED; -INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (1,0),(2,1); -select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +INSERT INTO t1 (numeropost,maxnumrep) VALUES (1,0),(2,1); +select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); Subselect returns more than 1 record -select numeropost as a FROM forumconthardwarefr7 ORDER BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +select numeropost as a FROM t1 ORDER BY (SELECT 1 FROM t1 HAVING a=1); Subselect returns more than 1 record -drop table if exists forumconthardwarefr7; -drop table if exists iftest; -CREATE TABLE iftest (field char(1) NOT NULL DEFAULT 'b'); -INSERT INTO iftest VALUES (); -SELECT field FROM iftest WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) HAVING field='b'); +drop table t1; +CREATE TABLE t1 (field char(1) NOT NULL DEFAULT 'b'); +INSERT INTO t1 VALUES (); +SELECT field FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) HAVING field='b'); Subselect returns more than 1 record -drop table iftest; -drop table if exists threadhardwarefr7; -CREATE TABLE `threadhardwarefr7` ( +drop table t1; +CREATE TABLE `t1` ( `numeropost` mediumint(8) unsigned NOT NULL default '0', `numreponse` int(10) unsigned NOT NULL auto_increment, `pseudo` varchar(35) NOT NULL default '', @@ -285,20 +281,20 @@ PRIMARY KEY (`numeropost`,`numreponse`), UNIQUE KEY `numreponse` (`numreponse`), KEY `pseudo` (`pseudo`,`numeropost`) ) TYPE=MyISAM; -SELECT (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a),numreponse FROM (SELECT * FROM threadhardwarefr7) as a; +SELECT (SELECT numeropost FROM t1 HAVING numreponse=a),numreponse FROM (SELECT * FROM t1) as a; Reference 'numreponse' not supported (forward reference in item list) -SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a) FROM (SELECT * FROM threadhardwarefr7) as a; +SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=a) FROM (SELECT * FROM t1) as a; Unknown column 'a' in 'having clause' -SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=1) FROM (SELECT * FROM threadhardwarefr7) as a; -numreponse (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=1) -INSERT INTO threadhardwarefr7 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); -EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM threadhardwarefr7 WHERE numeropost='1'); +SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=1) FROM (SELECT * FROM t1) as a; +numreponse (SELECT numeropost FROM t1 HAVING numreponse=1) +INSERT INTO t1 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); +EXPLAIN SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1'); Subselect returns more than 1 record -EXPLAIN SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'; +EXPLAIN SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE Select tables optimized away -EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'); +EXPLAIN SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY threadhardwarefr7 const PRIMARY,numreponse PRIMARY 7 const,const 1 +1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 2 SUBSELECT Select tables optimized away -drop table if exists threadhardwarefrtest7; +drop table t1; diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 2f2f50c4085..0f30fbd4cc6 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1,3 +1,5 @@ +-- error 1111 +SELECT 1 FROM (SELECT 1) GROUP BY SUM(1); # # Test of group (Failed for Lars Hoss ) # diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index f838a27e7ff..17f24f387d3 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -8,7 +8,7 @@ SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVI SELECT (SELECT 1),MAX(1) FROM (SELECT 1); -- error 1245 SELECT (SELECT a) as a; -drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; create table t1 (a int); create table t2 (a int, b int); create table t3 (a int); @@ -57,11 +57,11 @@ select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) explain select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; -- error 1240 select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; -create table attend (patient_uq int, clinic_uq int, index i1 (clinic_uq)); -create table clinic( uq int primary key, name char(25)); -insert into clinic values(1,"Oblastnaia bolnitsa"),(2,"Bolnitsa Krasnogo Kresta"); -insert into attend values (1,1),(1,2),(2,2),(1,3); -select * from attend where exists (select * from clinic where uq = clinic_uq); +create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq)); +create table t7( uq int primary key, name char(25)); +insert into t7 values(1,"Oblastnaia bolnitsa"),(2,"Bolnitsa Krasnogo Kresta"); +insert into t6 values (1,1),(1,2),(2,2),(1,3); +select * from t6 where exists (select * from t7 where uq = clinic_uq); # not unique fields -- error 1052 @@ -80,62 +80,62 @@ SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1); SELECT * FROM t2 WHERE b = (SELECT MIN(b) FROM t2); SELECT * FROM t3 WHERE b = (SELECT MIN(b) FROM t3); -drop table if exists inscrit; +drop table if exists t8; -CREATE TABLE `inscrit` ( +CREATE TABLE `t8` ( `pseudo` varchar(35) character set latin1 NOT NULL default '', `email` varchar(60) character set latin1 NOT NULL default '', PRIMARY KEY (`pseudo`), UNIQUE KEY `email` (`email`) ) TYPE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC; -INSERT INTO inscrit (pseudo,email) VALUES ('joce','test'); -INSERT INTO inscrit (pseudo,email) VALUES ('joce1','test1'); -INSERT INTO inscrit (pseudo,email) VALUES ('2joce1','2test1'); -EXPLAIN SELECT pseudo,(SELECT email FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce')) FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce'); +INSERT INTO t8 (pseudo,email) VALUES ('joce','test'); +INSERT INTO t8 (pseudo,email) VALUES ('joce1','test1'); +INSERT INTO t8 (pseudo,email) VALUES ('2joce1','2test1'); +EXPLAIN SELECT pseudo,(SELECT email FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce')) FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); -- error 1239 -SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo,email FROM -inscrit WHERE pseudo='joce'); +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo,email FROM +t8 WHERE pseudo='joce'); -- error 1239 -SELECT pseudo FROM inscrit WHERE pseudo=(SELECT * FROM inscrit WHERE +SELECT pseudo FROM t8 WHERE pseudo=(SELECT * FROM t8 WHERE pseudo='joce'); -SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo='joce'); +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo='joce'); -- error 1240 -SELECT pseudo FROM inscrit WHERE pseudo=(SELECT pseudo FROM inscrit WHERE pseudo LIKE '%joce%'); +SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%'); -drop table if exists t1,t2,t3,t4,t5,attend,clinic,inscrit; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; -drop table if exists searchconthardwarefr3; -CREATE TABLE `searchconthardwarefr3` ( +#searchconthardwarefr3 +CREATE TABLE `t1` ( `topic` mediumint(8) unsigned NOT NULL default '0', `date` date NOT NULL default '0000-00-00', `pseudo` varchar(35) character set latin1 NOT NULL default '', PRIMARY KEY (`pseudo`,`date`,`topic`), KEY `topic` (`topic`) ) TYPE=MyISAM ROW_FORMAT=DYNAMIC; -INSERT INTO searchconthardwarefr3 (topic,date,pseudo) VALUES +INSERT INTO t1 (topic,date,pseudo) VALUES ('43506','2002-10-02','joce'),('40143','2002-08-03','joce'); -EXPLAIN SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; -EXPLAIN SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); -SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'; -SELECT (SELECT DISTINCT date FROM searchconthardwarefr3 WHERE date='2002-08-03'); -SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1; +EXPLAIN SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; +EXPLAIN SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); +SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'; +SELECT (SELECT DISTINCT date FROM t1 WHERE date='2002-08-03'); +SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1) UNION ALL SELECT 1; -- error 1240 -SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; -EXPLAIN SELECT 1 FROM searchconthardwarefr3 WHERE 1=(SELECT 1 UNION SELECT 1); -drop table searchconthardwarefr3; +SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1) UNION SELECT 1; +EXPLAIN SELECT 1 FROM t1 WHERE 1=(SELECT 1 UNION SELECT 1); +drop table t1; -drop table if exists forumconthardwarefr7, searchconthardwarefr7; -CREATE TABLE `forumconthardwarefr7` ( +#forumconthardwarefr7 searchconthardwarefr7 +CREATE TABLE `t1` ( `numeropost` mediumint(8) unsigned NOT NULL auto_increment, `maxnumrep` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) TYPE=MyISAM ROW_FORMAT=FIXED; -INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (40143,1),(43506,2); +INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2); -CREATE TABLE `searchconthardwarefr7` ( +CREATE TABLE `t2` ( `mot` varchar(30) NOT NULL default '', `topic` mediumint(8) unsigned NOT NULL default '0', `date` date NOT NULL default '0000-00-00', @@ -143,37 +143,38 @@ CREATE TABLE `searchconthardwarefr7` ( PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`) ) TYPE=MyISAM ROW_FORMAT=DYNAMIC; -INSERT INTO searchconthardwarefr7 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); -select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); -SELECT numeropost,maxnumrep FROM forumconthardwarefr7 WHERE exists (SELECT 1 FROM searchconthardwarefr7 WHERE (mot='joce') AND date >= '2002-10-21' AND forumconthardwarefr7.numeropost = searchconthardwarefr7.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; +INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce'); +select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); +SELECT numeropost,maxnumrep FROM t1 WHERE exists (SELECT 1 FROM t2 WHERE (mot='joce') AND date >= '2002-10-21' AND t1.numeropost = t2.topic) ORDER BY maxnumrep DESC LIMIT 0, 20; -- error 1054 -SELECT (SELECT 1) as a FROM (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); -drop table forumconthardwarefr7, searchconthardwarefr7; +SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1); +drop table t1, t2; -drop table if exists forumconthardwarefr7; -CREATE TABLE `forumconthardwarefr7` ( +#forumconthardwarefr7 +drop table if exists t1; +CREATE TABLE `t1` ( `numeropost` mediumint(8) unsigned NOT NULL auto_increment, `maxnumrep` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`numeropost`), UNIQUE KEY `maxnumrep` (`maxnumrep`) ) TYPE=MyISAM ROW_FORMAT=FIXED; -INSERT INTO forumconthardwarefr7 (numeropost,maxnumrep) VALUES (1,0),(2,1); +INSERT INTO t1 (numeropost,maxnumrep) VALUES (1,0),(2,1); -- error 1240 -select numeropost as a FROM forumconthardwarefr7 GROUP BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); +select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1); -- error 1240 -select numeropost as a FROM forumconthardwarefr7 ORDER BY (SELECT 1 FROM forumconthardwarefr7 HAVING a=1); -drop table if exists forumconthardwarefr7; +select numeropost as a FROM t1 ORDER BY (SELECT 1 FROM t1 HAVING a=1); +drop table t1; -drop table if exists iftest; -CREATE TABLE iftest (field char(1) NOT NULL DEFAULT 'b'); -INSERT INTO iftest VALUES (); +#iftest +CREATE TABLE t1 (field char(1) NOT NULL DEFAULT 'b'); +INSERT INTO t1 VALUES (); -- error 1240 -SELECT field FROM iftest WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) HAVING field='b'); -drop table iftest; +SELECT field FROM t1 WHERE 1=(SELECT 1 UNION ALL SELECT 1 FROM (SELECT 1) HAVING field='b'); +drop table t1; -drop table if exists threadhardwarefr7; -CREATE TABLE `threadhardwarefr7` ( +# threadhardwarefr7 +CREATE TABLE `t1` ( `numeropost` mediumint(8) unsigned NOT NULL default '0', `numreponse` int(10) unsigned NOT NULL auto_increment, `pseudo` varchar(35) NOT NULL default '', @@ -182,13 +183,13 @@ CREATE TABLE `threadhardwarefr7` ( KEY `pseudo` (`pseudo`,`numeropost`) ) TYPE=MyISAM; -- error 1245 -SELECT (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a),numreponse FROM (SELECT * FROM threadhardwarefr7) as a; +SELECT (SELECT numeropost FROM t1 HAVING numreponse=a),numreponse FROM (SELECT * FROM t1) as a; -- error 1054 -SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=a) FROM (SELECT * FROM threadhardwarefr7) as a; -SELECT numreponse, (SELECT numeropost FROM threadhardwarefr7 HAVING numreponse=1) FROM (SELECT * FROM threadhardwarefr7) as a; -INSERT INTO threadhardwarefr7 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); +SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=a) FROM (SELECT * FROM t1) as a; +SELECT numreponse, (SELECT numeropost FROM t1 HAVING numreponse=1) FROM (SELECT * FROM t1) as a; +INSERT INTO t1 (numeropost,numreponse,pseudo) VALUES (1,1,'joce'),(1,2,'joce'),(1,3,'test'); -- error 1240 -EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM threadhardwarefr7 WHERE numeropost='1'); -EXPLAIN SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'; -EXPLAIN SELECT numreponse FROM threadhardwarefr7 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM threadhardwarefr7 WHERE numeropost='1'); -drop table if exists threadhardwarefrtest7; +EXPLAIN SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 FROM t1 WHERE numeropost='1'); +EXPLAIN SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'; +EXPLAIN SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'); +drop table t1; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 7b434eb0bfb..d105d44fe12 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2227,8 +2227,6 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds) thd->set_query_id=1; thd->cond_count= 0; - bool save_allow_sum_func= thd->allow_sum_func; - thd->allow_sum_func= 0; if (*conds) { thd->where="where clause"; @@ -2301,7 +2299,6 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds) table->on_expr=and_conds(table->on_expr,cond_and); } } - thd->allow_sum_func= save_allow_sum_func; DBUG_RETURN(test(thd->fatal_error)); } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 20b000392df..db0219ae23c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -199,6 +199,26 @@ void fix_tables_pointers(SELECT_LEX *select_lex) } } +/* + Inline function to setup clauses without sum functions +*/ +inline int setup_without_group(THD *thd, TABLE_LIST *tables, + List &fields, + List &all_fields, + COND **conds, + ORDER *order, + ORDER *group, bool *hidden_group_fields) +{ + bool save_allow_sum_func= thd->allow_sum_func; + thd->allow_sum_func= 0; + int res= (setup_conds(thd,tables, conds) || + setup_order(thd,tables, fields, all_fields, order) || + setup_group(thd,tables, fields, all_fields, group, + hidden_group_fields)); + thd->allow_sum_func= save_allow_sum_func; + return res; +} + /***************************************************************************** Check fields, find best join, do the select and output fields. mysql_select assumes that all tables are already opened @@ -233,10 +253,8 @@ JOIN::prepare(TABLE_LIST *tables_init, if (setup_tables(tables_list) || setup_fields(thd,tables_list,fields_list,1,&all_fields,1) || - setup_conds(thd,tables_list,&conds) || - setup_order(thd,tables_list,fields_list,all_fields,order) || - setup_group(thd,tables_list,fields_list,all_fields,group_list, - &hidden_group_fields)) + setup_without_group(thd, tables_list, fields_list, all_fields, + &conds, order, group_list, &hidden_group_fields)) DBUG_RETURN(-1); /* purecov: inspected */ if (having) From 06e647472fada2a3b857121ecd947372a5322d77 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Nov 2002 21:10:52 +0200 Subject: [PATCH 228/246] Reference to field in outer subelect fixed Fixed context in error mesages mysql-test/r/subselect.result: tests of references and error message mysql-test/t/subselect.test: tests of references and error message sql/item.cc: Fixed layout Resolving field names of outer select sql/item_subselect.cc: saving/restoring context for error messages sql/mysql_priv.h: changed function interface to allow resolving field names inside Item_ref::fix_fields sql/sql_base.cc: changed function interface to allow resolving field names inside Item_ref::fix_fields sql/sql_lex.h: allow access to thd field --- mysql-test/r/subselect.result | 10 ++++++++++ mysql-test/t/subselect.test | 4 ++++ sql/item.cc | 26 +++++++++++++++++++++----- sql/item_subselect.cc | 14 +++++++++++++- sql/mysql_priv.h | 2 +- sql/sql_base.cc | 2 +- sql/sql_lex.h | 1 + 7 files changed, 51 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 848a90fba8f..87db58f4f04 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -17,6 +17,16 @@ SELECT (SELECT 1),MAX(1) FROM (SELECT 1); 1 1 SELECT (SELECT a) as a; Reference 'a' not supported (forward reference in item list) +EXPLAIN SELECT 1 FROM (SELECT 1 as a) HAVING (SELECT a)=1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY system NULL NULL NULL NULL 1 +3 DEPENDENT SUBSELECT No tables used +2 DERIVED No tables used +SELECT 1 FROM (SELECT 1 as a) HAVING (SELECT a)=1; +1 +1 +SELECT (SELECT 1), a; +Unknown column 'a' in 'field list' drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; create table t1 (a int); create table t2 (a int, b int); diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 17f24f387d3..3d0ba76683b 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -8,6 +8,10 @@ SELECT (SELECT 1 FROM (SELECT 1) HAVING b=1) as a,(SELECT 1 FROM (SELECT 1) HAVI SELECT (SELECT 1),MAX(1) FROM (SELECT 1); -- error 1245 SELECT (SELECT a) as a; +EXPLAIN SELECT 1 FROM (SELECT 1 as a) HAVING (SELECT a)=1; +SELECT 1 FROM (SELECT 1 as a) HAVING (SELECT a)=1; +-- error 1054 +SELECT (SELECT 1), a; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; create table t1 (a int); create table t2 (a int, b int); diff --git a/sql/item.cc b/sql/item.cc index 3ec6e9a3aa9..f5733d2151d 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -468,7 +468,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) (last= sl)->get_table_list(), 0)) != not_found_field) break; - if((refer= find_item_in_list(this, (last= sl)->item_list, + if ((refer= find_item_in_list(this, sl->item_list, REPORT_EXCEPT_NOT_FOUND)) != (Item **)not_found_item) break; @@ -867,6 +867,7 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) REPORT_ALL_ERRORS))) == (Item **)not_found_item) { + Field *tmp= (Field*) not_found_field; /* We can't find table field in table list of current select, consequently we have to find it in outer subselect(s). @@ -878,16 +879,21 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) */ SELECT_LEX *last=0; for ( ; sl ; sl= sl->outer_select()) - if((ref= find_item_in_list(this, (last= sl)->item_list, + { + if ((ref= find_item_in_list(this, (last= sl)->item_list, REPORT_EXCEPT_NOT_FOUND)) != (Item **)not_found_item) break; + if ((tmp= find_field_in_tables(thd, this, + sl->get_table_list(), + 0)) != not_found_field); + } if (!ref) - { return 1; - } - else if (ref == (Item **)not_found_item) + else if (!tmp) + return -1; + else if (ref == (Item **)not_found_item && tmp == not_found_field) { // Call to report error find_item_in_list(this, @@ -896,6 +902,16 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) ref= 0; return 1; } + else if (tmp != not_found_field) + { + ref= 0; // To prevent "delete *ref;" on ~Item_erf() of this item + Item_field* f; + if (!((*reference)= f= new Item_field(tmp))) + return 1; + f->depended_from= last; + thd->lex.current_select->mark_as_dependent(last); + return 0; + } else { depended_from= last; diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 01ce5fad4a6..7650ecc01c0 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -81,6 +81,7 @@ void Item_subselect::make_field (Send_field *tmp_field) bool Item_subselect::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) { + char const *save_where= thd->where; int res= engine->prepare(); if (!res) { @@ -93,6 +94,7 @@ bool Item_subselect::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) fix_length_and_dec(); } fixed= 1; + thd->where= save_where; return res; } @@ -312,11 +314,13 @@ void subselect_union_engine::fix_length_and_dec() int subselect_single_select_engine::exec() { DBUG_ENTER("subselect_single_select_engine::exec"); + char const *save_where= join->thd->where; if (!optimized) { optimized=1; if (join->optimize()) { + join->thd->where= save_where; executed= 1; DBUG_RETURN(join->error?join->error:1); } @@ -324,7 +328,10 @@ int subselect_single_select_engine::exec() if (select_lex->dependent && executed) { if (join->reinit()) + { + join->thd->where= save_where; DBUG_RETURN(1); + } item->assign_null(); item->assigned((executed= 0)); } @@ -335,14 +342,19 @@ int subselect_single_select_engine::exec() join->exec(); join->thd->lex.current_select= save_select; executed= 1; + join->thd->where= save_where; DBUG_RETURN(join->error||thd->fatal_error); } + join->thd->where= save_where; DBUG_RETURN(0); } int subselect_union_engine::exec() { - return unit->exec(); + char const *save_where= unit->thd->where; + int res= unit->exec(); + unit->thd->where= save_where; + return res; } uint subselect_single_select_engine::cols() diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 3ba88d493bd..0b6c2872925 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -463,7 +463,7 @@ bool table_is_used(TABLE *table, bool wait_for_name_lock); bool drop_locked_tables(THD *thd,const char *db, const char *table_name); void abort_locked_tables(THD *thd,const char *db, const char *table_name); extern const Field *not_found_field; -Field *find_field_in_tables(THD *thd, Item_field *item, TABLE_LIST *tables, +Field *find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables, bool report_error); Field *find_field_in_table(THD *thd,TABLE *table,const char *name,uint length, bool check_grant,bool allow_rowid); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d105d44fe12..755d64a97e8 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1861,7 +1861,7 @@ const Field *not_found_field= (Field*) 0x1; */ Field * -find_field_in_tables(THD *thd, Item_field *item, TABLE_LIST *tables, +find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables, bool report_error) { Field *found=0; diff --git a/sql/sql_lex.h b/sql/sql_lex.h index dd41af4b250..53bd0c0489a 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -294,6 +294,7 @@ public: int cleanup(); friend void mysql_init_query(THD *thd); + friend int subselect_union_engine::exec(); private: bool create_total_list_n_last_return(THD *thd, st_lex *lex, TABLE_LIST ***result); From 79cdd8773c365d80e6ed528668dfb03eda7406b3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Nov 2002 21:39:22 +0200 Subject: [PATCH 229/246] Updated results after merge from 3.23 --- mysql-test/r/innodb-deadlock.result | 20 +++++++++++++++ mysql-test/r/null_key.result | 16 ++++++++++++ mysql-test/t/innodb-deadlock.test | 38 +++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 mysql-test/r/innodb-deadlock.result create mode 100644 mysql-test/t/innodb-deadlock.test diff --git a/mysql-test/r/innodb-deadlock.result b/mysql-test/r/innodb-deadlock.result new file mode 100644 index 00000000000..121bfa8c6cb --- /dev/null +++ b/mysql-test/r/innodb-deadlock.result @@ -0,0 +1,20 @@ +drop table if exists t1; +create table t1 (id integer, x integer) type=INNODB; +insert into t1 values(0, 0); +set autocommit=0; +SELECT * from t1 where id = 0 FOR UPDATE; +id x +0 0 +set autocommit=0; +update t1 set x=2 where id = 0; +update t1 set x=1 where id = 0; +select * from t1; +id x +0 1 +commit; +commit; +select * from t1; +id x +0 2 +commit; +drop table t1; diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index b737f9254b0..236def64b5e 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -228,20 +228,36 @@ alter table t1 add key id (id); select * from t1, t2 where t1.id = t2.id; id id drop table t1,t2; +create table t1 ( +id integer, +id2 integer not null, +index (id), +index (id2) +); +insert into t1 values(null,null),(1,1); +select * from t1; id id2 NULL 0 1 1 +select * from t1 where id <=> null; id id2 NULL 0 +select * from t1 where id <=> null or id > 0; id id2 NULL 0 1 1 +select * from t1 where id is null or id > 0; id id2 NULL 0 1 1 +select * from t1 where id2 <=> null or id2 > 0; id id2 1 1 +select * from t1 where id2 is null or id2 > 0; id id2 1 1 +delete from t1 where id <=> NULL; +select * from t1; id id2 1 1 +drop table t1; diff --git a/mysql-test/t/innodb-deadlock.test b/mysql-test/t/innodb-deadlock.test new file mode 100644 index 00000000000..bc2839bfb3a --- /dev/null +++ b/mysql-test/t/innodb-deadlock.test @@ -0,0 +1,38 @@ +-- source include/have_innodb.inc + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); +drop table if exists t1; + +# +# Testing of FOR UPDATE +# + +connection con1; +create table t1 (id integer, x integer) type=INNODB; +insert into t1 values(0, 0); +set autocommit=0; +SELECT * from t1 where id = 0 FOR UPDATE; + +connection con2; +set autocommit=0; + +# The following query should hang because con1 is locking the page +--send +update t1 set x=2 where id = 0; +--sleep 2; + +connection con1; +update t1 set x=1 where id = 0; +select * from t1; +commit; + +connection con2; +reap; +commit; + +connection con1; +select * from t1; +commit; + +drop table t1; From b5b19a7877834362bf135cea408388ad2707c70c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 01:38:56 +0200 Subject: [PATCH 230/246] supported possiblity of item substitute (fixed bug) in setup_fields more efficient reference creation fixed table_name of Field in temporary table mysql-test/r/subselect.result: test of 2 references bugs mysql-test/t/subselect.test: test of 2 references bugs sql/field.h: fixed layout fixed table name of fields of temporary table (derived table) sql/item.cc: more efficient reference creation sql/sql_base.cc: fixed layout supported possiblity of item substitute (fixed bug) --- mysql-test/r/subselect.result | 9 +++++++++ mysql-test/t/subselect.test | 5 +++++ sql/field.h | 8 +++++--- sql/item.cc | 2 +- sql/sql_base.cc | 5 +++-- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 87db58f4f04..ef4da19c826 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -27,6 +27,9 @@ SELECT 1 FROM (SELECT 1 as a) HAVING (SELECT a)=1; 1 SELECT (SELECT 1), a; Unknown column 'a' in 'field list' +SELECT 1 as a FROM (SELECT 1) HAVING (SELECT a)=1; +a +1 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; create table t1 (a int); create table t2 (a int, b int); @@ -308,3 +311,9 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 const PRIMARY,numreponse PRIMARY 7 const,const 1 2 SUBSELECT Select tables optimized away drop table t1; +CREATE TABLE t1 (a int(1)); +INSERT INTO t1 VALUES (1); +SELECT 1 FROM (SELECT a FROM t1) HAVING (SELECT a)=1; +1 +1 +drop table t1; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 3d0ba76683b..6d4fc7de30b 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -12,6 +12,7 @@ EXPLAIN SELECT 1 FROM (SELECT 1 as a) HAVING (SELECT a)=1; SELECT 1 FROM (SELECT 1 as a) HAVING (SELECT a)=1; -- error 1054 SELECT (SELECT 1), a; +SELECT 1 as a FROM (SELECT 1) HAVING (SELECT a)=1; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; create table t1 (a int); create table t2 (a int, b int); @@ -197,3 +198,7 @@ EXPLAIN SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT 1 EXPLAIN SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'; EXPLAIN SELECT numreponse FROM t1 WHERE numeropost='1' AND numreponse=(SELECT MAX(numreponse) FROM t1 WHERE numeropost='1'); drop table t1; +CREATE TABLE t1 (a int(1)); +INSERT INTO t1 VALUES (1); +SELECT 1 FROM (SELECT a FROM t1) HAVING (SELECT a)=1; +drop table t1; \ No newline at end of file diff --git a/sql/field.h b/sql/field.h index 8c4c48968c4..9fc72cf56ec 100644 --- a/sql/field.h +++ b/sql/field.h @@ -126,10 +126,12 @@ public: Field *tmp= (Field*) memdup_root(root,(char*) this,size_of()); if (tmp) { - tmp->table=new_table; - tmp->key_start=tmp->part_of_key=tmp->part_of_sortkey=0; + tmp->table= new_table; + tmp->key_start= tmp->part_of_key= tmp->part_of_sortkey= 0; tmp->unireg_check=Field::NONE; - tmp->flags&= (NOT_NULL_FLAG | BLOB_FLAG | UNSIGNED_FLAG | ZEROFILL_FLAG | ENUM_FLAG | SET_FLAG); + tmp->flags&= (NOT_NULL_FLAG | BLOB_FLAG | UNSIGNED_FLAG | + ZEROFILL_FLAG | ENUM_FLAG | SET_FLAG); + tmp->table_name= new_table->table_name; tmp->reset_fields(); } return tmp; diff --git a/sql/item.cc b/sql/item.cc index f5733d2151d..13433990107 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -487,7 +487,7 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) else if (refer != (Item **)not_found_item) { Item_ref *r; - *ref= r= new Item_ref((char *)db_name, (char *)table_name, + *ref= r= new Item_ref(refer, (char *)table_name, (char *)field_name); if (!r) return 1; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 755d64a97e8..08a17ed1197 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2061,9 +2061,9 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List &fields, if (item->type() == Item::FIELD_ITEM && ((Item_field*) item)->field_name[0] == '*') { - uint elem=fields.elements; + uint elem= fields.elements; if (insert_fields(thd,tables,((Item_field*) item)->db_name, - ((Item_field*) item)->table_name,&it)) + ((Item_field*) item)->table_name, &it)) DBUG_RETURN(-1); /* purecov: inspected */ if (sum_func_list) { @@ -2079,6 +2079,7 @@ int setup_fields(THD *thd, TABLE_LIST *tables, List &fields, { if (item->fix_fields(thd, tables, it.ref())) DBUG_RETURN(-1); /* purecov: inspected */ + item= *(it.ref()); //Item can be chenged in fix fields if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM && sum_func_list) item->split_sum_func(*sum_func_list); From 8276111fa1539b0a58acce454b06c6dce143655b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 12:54:55 +0400 Subject: [PATCH 231/246] add define of __attribute__ for readline --- readline/rldefs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readline/rldefs.h b/readline/rldefs.h index 4a28bd1e49c..5cba9a5ac32 100644 --- a/readline/rldefs.h +++ b/readline/rldefs.h @@ -32,6 +32,10 @@ #include "rlstdc.h" +#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ <8) +#define __attribute__(A) +#endif + #if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING) # define TERMIOS_TTY_DRIVER #else From c115d1cee059ca49569642950802b650937690b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 10:58:49 +0200 Subject: [PATCH 232/246] fixed bug of subselect in derived tables mysql-test/r/subselect.result: test of subselect in derived table mysql-test/t/subselect.test: test of subselect in derived table --- mysql-test/r/subselect.result | 2 ++ mysql-test/t/subselect.test | 2 ++ sql/item.cc | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index ef4da19c826..5a8ff20aa33 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -30,6 +30,8 @@ Unknown column 'a' in 'field list' SELECT 1 as a FROM (SELECT 1) HAVING (SELECT a)=1; a 1 +SELECT 1 FROM (SELECT (SELECT a)); +Unknown column 'a' in 'field list' drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; create table t1 (a int); create table t2 (a int, b int); diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 6d4fc7de30b..00f3a4f6e44 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -13,6 +13,8 @@ SELECT 1 FROM (SELECT 1 as a) HAVING (SELECT a)=1; -- error 1054 SELECT (SELECT 1), a; SELECT 1 as a FROM (SELECT 1) HAVING (SELECT a)=1; +-- error 1054 +SELECT 1 FROM (SELECT (SELECT a)); drop table if exists t1,t2,t3,t4,t5,t6,t7,t8; create table t1 (a int); create table t2 (a int, b int); diff --git a/sql/item.cc b/sql/item.cc index 13433990107..df42b9185cc 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -472,7 +472,8 @@ bool Item_field::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref) REPORT_EXCEPT_NOT_FOUND)) != (Item **)not_found_item) break; - + if (sl->linkage == DERIVED_TABLE_TYPE) + break; // do not look over derived table } if (!tmp) return -1; @@ -887,6 +888,8 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) if ((tmp= find_field_in_tables(thd, this, sl->get_table_list(), 0)) != not_found_field); + if (sl->linkage == DERIVED_TABLE_TYPE) + break; // do not look over derived table } if (!ref) From 895e3dbbf831cfc6698f1f1f57586224351458b7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 12:11:16 +0200 Subject: [PATCH 233/246] Faster parsing of identifiers Compatibility syntax: SERIAL, [PRIMARY] KEY and VALUE sql/sql_lex.cc: Faster handling of identifiers sql/sql_lex.h: Faster handling of identifiers sql/sql_yacc.yy: Added SERIAL (alias for bigint auto_increment) Make PRIMARY optional in field specification Make VALUE alias for VALUES --- sql/sql_lex.cc | 54 +++++++++++++++++++++++++++++-------------------- sql/sql_lex.h | 2 +- sql/sql_yacc.yy | 17 ++++++++++++++-- 3 files changed, 48 insertions(+), 25 deletions(-) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 9ed66aede6f..e5d8ddf8067 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -76,7 +76,7 @@ inline int lex_casecmp(const char *s, const char *t, uint len) #include "lex_hash.h" -static uchar state_map[256]; +static uchar state_map[256], ident_map[256]; void lex_init(void) @@ -91,7 +91,7 @@ void lex_init(void) VOID(pthread_key_create(&THR_LEX,NULL)); /* Fill state_map with states to get a faster parser */ - for (i=0; i < 256 ; i++) + for (i=0; i < sizeof(state_map) ; i++) { if (my_isalpha(system_charset_info,i)) state_map[i]=(uchar) STATE_IDENT; @@ -126,6 +126,20 @@ void lex_init(void) { state_map[(uchar) '"'] = STATE_USER_VARIABLE_DELIMITER; } + + /* + Create a second map to make it faster to find identifiers + */ + for (i=0; i < sizeof(ident_map) ; i++) + { + ident_map[i]= (uchar) (state_map[i] == STATE_IDENT || + state_map[i] == STATE_NUMBER_IDENT); + } + + /* Special handling of hex and binary strings */ + state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) STATE_IDENT_OR_HEX; + state_map[(uchar)'b']= state_map[(uchar)'b']= (uchar) STATE_IDENT_OR_BIN; + DBUG_VOID_RETURN; } @@ -459,7 +473,7 @@ int yylex(void *arg) } case STATE_CHAR: // Unknown or single char token case STATE_SKIP: // This should not happen - yylval->lex_str.str=(char*) (lex->ptr=lex->tok_start);// Set to first char + yylval->lex_str.str=(char*) (lex->ptr=lex->tok_start);// Set to first chr yylval->lex_str.length=1; c=yyGet(); if (c != ')') @@ -468,12 +482,15 @@ int yylex(void *arg) lex->tok_start=lex->ptr; // Let tok_start point at next item return((int) c); - case STATE_IDENT: // Incomplete keyword or ident - if ((c == 'x' || c == 'X') && yyPeek() == '\'') + case STATE_IDENT_OR_HEX: + if (yyPeek() == '\'') { // Found x'hex-number' - state=STATE_HEX_NUMBER; + state= STATE_HEX_NUMBER; break; } + /* Fall through */ + case STATE_IDENT_OR_BIN: // TODO: Add binary string handling + case STATE_IDENT: #if defined(USE_MB) && defined(USE_MB_IDENT) if (use_mb(system_charset_info)) { @@ -488,8 +505,7 @@ int yylex(void *arg) } lex->ptr += l - 1; } - while (state_map[c=yyGet()] == STATE_IDENT || - state_map[c] == STATE_NUMBER_IDENT) + while (ident_map[c=yyGet()]) { if (my_ismbhead(system_charset_info, c)) { @@ -504,15 +520,13 @@ int yylex(void *arg) } else #endif - while (state_map[c=yyGet()] == STATE_IDENT || - state_map[c] == STATE_NUMBER_IDENT) ; + while (ident_map[c=yyGet()]) ; length= (uint) (lex->ptr - lex->tok_start)-1; if (lex->ignore_space) { for (; state_map[c] == STATE_SKIP ; c= yyGet()); } - if (c == '.' && (state_map[yyPeek()] == STATE_IDENT || - state_map[yyPeek()] == STATE_NUMBER_IDENT)) + if (c == '.' && ident_map[yyPeek()]) lex->next_state=STATE_IDENT_SEP; else { // '(' must follow directly if function @@ -550,7 +564,7 @@ int yylex(void *arg) case STATE_NUMBER_IDENT: // number or ident which num-start while (my_isdigit(system_charset_info,(c = yyGet()))) ; - if (state_map[c] != STATE_IDENT) + if (!ident_map[c]) { // Can't be identifier state=STATE_INT_OR_REAL; break; @@ -575,7 +589,7 @@ int yylex(void *arg) lex->tok_start[0] == '0' ) { // Varbinary while (my_isxdigit(system_charset_info,(c = yyGet()))) ; - if ((lex->ptr - lex->tok_start) >= 4 && state_map[c] != STATE_IDENT) + if ((lex->ptr - lex->tok_start) >= 4 && !ident_map[c]) { yylval->lex_str=get_token(lex,yyLength()); yylval->lex_str.str+=2; // Skip 0x @@ -602,8 +616,7 @@ int yylex(void *arg) } lex->ptr += l - 1; } - while (state_map[c=yyGet()] == STATE_IDENT || - state_map[c] == STATE_NUMBER_IDENT) + while (ident_map[c=yyGet()]) { if (my_ismbhead(system_charset_info, c)) { @@ -618,11 +631,9 @@ int yylex(void *arg) } else #endif - while (state_map[c = yyGet()] == STATE_IDENT || - state_map[c] == STATE_NUMBER_IDENT) ; + while (ident_map[c = yyGet()]) ; - if (c == '.' && (state_map[yyPeek()] == STATE_IDENT || - state_map[yyPeek()] == STATE_NUMBER_IDENT)) + if (c == '.' && ident_map[yyPeek()]) lex->next_state=STATE_IDENT_SEP;// Next is '.' // fall through @@ -900,8 +911,7 @@ int yylex(void *arg) [(global | local | session) .]variable_name */ - while (state_map[c=yyGet()] == STATE_IDENT || - state_map[c] == STATE_NUMBER_IDENT) ; + while (ident_map[c=yyGet()]) ; if (c == '.') lex->next_state=STATE_IDENT_SEP; length= (uint) (lex->ptr - lex->tok_start)-1; diff --git a/sql/sql_lex.h b/sql/sql_lex.h index dd41af4b250..c555bc6ff72 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -78,7 +78,7 @@ enum lex_states STATE_REAL_OR_POINT, STATE_BOOL, STATE_EOL, STATE_ESCAPE, STATE_LONG_COMMENT, STATE_END_LONG_COMMENT, STATE_COLON, STATE_SET_VAR, STATE_USER_END, STATE_HOSTNAME, STATE_SKIP, STATE_USER_VARIABLE_DELIMITER, STATE_SYSTEM_VAR, - STATE_IDENT_OR_KEYWORD + STATE_IDENT_OR_KEYWORD, STATE_IDENT_OR_HEX, STATE_IDENT_OR_BIN }; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index eaae24d0310..f79bf37d2f7 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1110,6 +1110,12 @@ type: $$=FIELD_TYPE_SET; } | LONG_SYM opt_binary { $$=FIELD_TYPE_MEDIUM_BLOB; } + | SERIAL_SYM + { + $$=FIELD_TYPE_LONGLONG; + Lex->type|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG | + UNIQUE_FLAG); + } ; char: @@ -1184,12 +1190,13 @@ attribute: | DEFAULT literal { Lex->default_value=$2; } | AUTO_INC { Lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; } | SERIAL_SYM DEFAULT VALUE_SYM - { Lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; } - | PRIMARY_SYM KEY_SYM { Lex->type|= PRI_KEY_FLAG | NOT_NULL_FLAG; } + { Lex->type|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG; } + | opt_primary KEY_SYM { Lex->type|= PRI_KEY_FLAG | NOT_NULL_FLAG; } | UNIQUE_SYM { Lex->type|= UNIQUE_FLAG; } | UNIQUE_SYM KEY_SYM { Lex->type|= UNIQUE_KEY_FLAG; } | COMMENT_SYM text_literal { Lex->comment= $2; }; + charset_name: BINARY { @@ -1227,6 +1234,11 @@ opt_binary: | BINARY { Lex->charset=my_charset_bin; } | CHAR_SYM SET charset_name { Lex->charset=$3; } ; + +opt_primary: + /* empty */ + | PRIMARY_SYM + references: REFERENCES table_ident { @@ -2882,6 +2894,7 @@ fields: insert_values: VALUES values_list {} + | VALUE_SYM values_list {} | SELECT_SYM { LEX *lex=Lex; From 27f2c605531ee8c9e2e629a6cb1d51fa2f81e0a6 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 13:44:47 +0200 Subject: [PATCH 234/246] removed limit for "FOR UPDATE" and "IN SHARE MODE" (now thay allowed for non-simple selects and applyed to current select) fix for using subselects with update test of locking for non-simple queries (SCRUM?) sql/sql_yacc.yy: removed limit for "FOR UPDATE" and "IN SHARE MODE" (now thay allowed for non-simple selects and applyed to current select) fix for using subselects with update --- mysql-test/r/innodb-non-simple.result | 76 +++++++++++++++++++++++++++ mysql-test/t/innodb-non-simple.test | 76 +++++++++++++++++++++++++++ sql/sql_yacc.yy | 9 ++-- 3 files changed, 155 insertions(+), 6 deletions(-) create mode 100644 mysql-test/r/innodb-non-simple.result create mode 100644 mysql-test/t/innodb-non-simple.test diff --git a/mysql-test/r/innodb-non-simple.result b/mysql-test/r/innodb-non-simple.result new file mode 100644 index 00000000000..8461b9d8d4d --- /dev/null +++ b/mysql-test/r/innodb-non-simple.result @@ -0,0 +1,76 @@ +drop table if exists t1, t2; +create table t1 (id integer, x integer) type=INNODB; +create table t2 (b integer, a integer) type=INNODB; +insert into t1 values(0, 0), (300, 300); +insert into t2 values(0, 10), (1, 20), (2, 30); +set autocommit=0; +select * from t2; +b a +0 10 +1 20 +2 30 +update t2 set a=100 where b=(SELECT x from t1 where id = b FOR UPDATE); +select * from t2; +b a +0 100 +1 20 +2 30 +select * from t1; +id x +0 0 +300 300 +set autocommit=0; +update t1 set x=2 where id = 0; +update t1 set x=1 where id = 0; +select * from t1; +id x +0 1 +300 300 +commit; +commit; +select * from t1; +id x +0 2 +300 300 +commit; +drop table t1, t2; +create table t1 (id integer, x integer) type=INNODB; +create table t2 (b integer, a integer) type=INNODB; +insert into t1 values(0, 0), (300, 300); +insert into t2 values(0, 0), (1, 20), (2, 30); +commit; +select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE; +a b +0 0 +20 1 +30 2 +300 300 +select * from t2; +b a +0 0 +1 20 +2 30 +select * from t1; +id x +0 0 +300 300 +update t2 set a=2 where b = 0; +select * from t2; +b a +0 2 +1 20 +2 30 +update t1 set x=2 where id = 0; +update t1 set x=1 where id = 0; +select * from t1; +id x +0 1 +300 300 +commit; +commit; +select * from t1; +id x +0 2 +300 300 +commit; +drop table t1, t2; diff --git a/mysql-test/t/innodb-non-simple.test b/mysql-test/t/innodb-non-simple.test new file mode 100644 index 00000000000..1d890896d3f --- /dev/null +++ b/mysql-test/t/innodb-non-simple.test @@ -0,0 +1,76 @@ +-- source include/have_innodb.inc + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); +drop table if exists t1, t2; +# +# Testing of FOR UPDATE +# + +connection con1; +create table t1 (id integer, x integer) type=INNODB; +create table t2 (b integer, a integer) type=INNODB; +insert into t1 values(0, 0), (300, 300); +insert into t2 values(0, 10), (1, 20), (2, 30); +set autocommit=0; +select * from t2; +update t2 set a=100 where b=(SELECT x from t1 where id = b FOR UPDATE); +select * from t2; +select * from t1; + +connection con2; +set autocommit=0; + +# The following query should hang because con1 is locking the page +--send +update t1 set x=2 where id = 0; +--sleep 2; + +connection con1; +update t1 set x=1 where id = 0; +select * from t1; +commit; + +connection con2; +reap; +commit; + +connection con1; +select * from t1; +commit; + +drop table t1, t2; +create table t1 (id integer, x integer) type=INNODB; +create table t2 (b integer, a integer) type=INNODB; +insert into t1 values(0, 0), (300, 300); +insert into t2 values(0, 0), (1, 20), (2, 30); +commit; + +connection con1; +select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE; +select * from t2; +select * from t1; + +connection con2; + +# The following query should hang because con1 is locking the page +update t2 set a=2 where b = 0; +select * from t2; +--send +update t1 set x=2 where id = 0; +--sleep 2; + +connection con1; +update t1 set x=1 where id = 0; +select * from t1; +commit; + +connection con2; +reap; +commit; + +connection con1; +select * from t1; +commit; + +drop table t1, t2; \ No newline at end of file diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index df343714e55..70d50559df9 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1690,17 +1690,14 @@ select_lock_type: | FOR_SYM UPDATE_SYM { LEX *lex=Lex; - if (check_simple_select()) - YYABORT; - lex->lock_option= TL_WRITE; + lex->current_select->set_lock_for_tables(TL_WRITE); lex->thd->safe_to_cache_query=0; } | LOCK_SYM IN_SYM SHARE_SYM MODE_SYM { LEX *lex=Lex; - if (check_simple_select()) - YYABORT; - lex->lock_option= TL_READ_WITH_SHARED_LOCKS; + lex->current_select-> + set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS); lex->thd->safe_to_cache_query=0; } ; From 1b9becc35824401f22b4e7c2b2f9b3dab5348fe9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 17:33:51 +0200 Subject: [PATCH 235/246] Fixed CAST( xxx as CHAR) sql/item.h: Made some virtual functions non virtual (as they are not used virtually) sql/item_strfunc.cc: Optimizations. sql/item_strfunc.h: Fixed BINARY handling sql/sql_string.h: Indentation cleanups --- sql/item.h | 10 ++++++---- sql/item_strfunc.cc | 11 +++++++---- sql/item_strfunc.h | 3 ++- sql/item_timefunc.h | 19 ++++++++++++++++--- sql/sql_string.h | 5 +++-- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/sql/item.h b/sql/item.h index 5eeaa22a2a2..34ca221cadc 100644 --- a/sql/item.h +++ b/sql/item.h @@ -85,12 +85,14 @@ public: virtual bool get_date(TIME *ltime,bool fuzzydate); virtual bool get_time(TIME *ltime); virtual bool is_null() { return 0; }; - virtual CHARSET_INFO *thd_charset() const; - virtual CHARSET_INFO *charset() const { return str_value.charset(); }; - virtual bool binary() const { return str_value.charset()->state & MY_CS_BINSORT ? 1 : 0 ; } - virtual void set_charset(CHARSET_INFO *cs) { str_value.set_charset(cs); } virtual bool check_loop(uint id); virtual void top_level_item() {} + + virtual bool binary() const + { return str_value.charset()->state & MY_CS_BINSORT ? 1 : 0 ; } + CHARSET_INFO *thd_charset() const; + CHARSET_INFO *charset() const { return str_value.charset(); }; + void set_charset(CHARSET_INFO *cs) { str_value.set_charset(cs); } }; diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 1a561c9eb34..34c89a49e8a 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1363,17 +1363,19 @@ String *Item_func_decode::val_str(String *str) String *Item_func_database::val_str(String *str) { - if (!current_thd->db) + THD *thd= current_thd; + if (!thd->db) str->length(0); else - str->copy((const char*) current_thd->db,(uint) strlen(current_thd->db), system_charset_info, thd_charset()); + str->copy((const char*) thd->db,(uint) strlen(thd->db), + system_charset_info, thd->thd_charset); return str; } String *Item_func_user::val_str(String *str) { THD *thd=current_thd; - CHARSET_INFO *cs=thd_charset(); + CHARSET_INFO *cs=thd->thd_charset; const char *host=thd->host ? thd->host : thd->ip ? thd->ip : ""; uint32 res_length=(strlen(thd->user)+strlen(host)+10) * cs->mbmaxlen; @@ -2128,7 +2130,8 @@ String *Item_func_charset::val_str(String *str) if ((null_value=(args[0]->null_value || !res->charset()))) return 0; - str->copy(res->charset()->name,strlen(res->charset()->name),my_charset_latin1,thd_charset()); + str->copy(res->charset()->name,strlen(res->charset()->name), + my_charset_latin1, thd_charset()); return str; } diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 2b308630b48..9fd9143586e 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -494,8 +494,9 @@ public: { String *tmp=args[0]->val_str(a); null_value=args[0]->null_value; + tmp->set_charset(my_charset_bin); return tmp; - } + } void fix_length_and_dec() { set_charset(my_charset_bin); diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 7765769c1d3..f9b987324f0 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -534,8 +534,17 @@ public: Item_typecast(Item *a) :Item_str_func(a) {} const char *func_name() const { return "char"; } String *val_str(String *a) - { a=args[0]->val_str(a); null_value=args[0]->null_value; return a; } - void fix_length_and_dec() { max_length=args[0]->max_length; } + { + String *tmp=args[0]->val_str(a); + null_value=args[0]->null_value; + tmp->set_charset(charset()); + return tmp; + } + void fix_length_and_dec() + { + set_charset(thd_charset()); + max_length=args[0]->max_length; + } void print(String *str); }; @@ -544,7 +553,11 @@ class Item_char_typecast :public Item_typecast { public: Item_char_typecast(Item *a) :Item_typecast(a) {} - void fix_length_and_dec() { binary=0; max_length=args[0]->max_length; } + void fix_length_and_dec() + { + set_charset(thd_charset()); + max_length=args[0]->max_length; + } }; diff --git a/sql/sql_string.h b/sql/sql_string.h index 42f9e446981..dde67b11d50 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -72,7 +72,7 @@ public: { sql_element_free(ptr_arg); } ~String() { free(); } - inline void set_charset(CHARSET_INFO *charset) { str_charset=charset; } + inline void set_charset(CHARSET_INFO *charset) { str_charset= charset; } inline CHARSET_INFO *charset() const { return str_charset; } inline uint32 length() const { return str_length;} inline uint32 alloced_length() const { return Alloced_length;} @@ -177,7 +177,8 @@ public: bool copy(); // Alloc string if not alloced bool copy(const String &s); // Allocate new string bool copy(const char *s,uint32 arg_length, CHARSET_INFO *cs); // Allocate new string - bool copy(const char*s,uint32 arg_length, CHARSET_INFO *csfrom, CHARSET_INFO *csto); + bool copy(const char*s,uint32 arg_length, CHARSET_INFO *csfrom, + CHARSET_INFO *csto); bool append(const String &s); bool append(const char *s,uint32 arg_length=0); bool append(IO_CACHE* file, uint32 arg_length); From 52f18046c496e021a36692cb9ed3544def87584e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 18:34:24 +0200 Subject: [PATCH 236/246] merging tests BitKeeper/deleted/.del-innodb-non-simple.test~380a6ef42b6e15d1: Delete: mysql-test/t/innodb-non-simple.test BitKeeper/deleted/.del-innodb-non-simple.result~2f77d5b0aaf5aa90: Delete: mysql-test/r/innodb-non-simple.result --- mysql-test/r/innodb-deadlock.result | 77 +++++++++++++++++++++++++++ mysql-test/r/innodb-non-simple.result | 76 -------------------------- mysql-test/t/innodb-deadlock.test | 73 +++++++++++++++++++++++++ mysql-test/t/innodb-non-simple.test | 76 -------------------------- 4 files changed, 150 insertions(+), 152 deletions(-) delete mode 100644 mysql-test/r/innodb-non-simple.result delete mode 100644 mysql-test/t/innodb-non-simple.test diff --git a/mysql-test/r/innodb-deadlock.result b/mysql-test/r/innodb-deadlock.result index 121bfa8c6cb..db7155f14fb 100644 --- a/mysql-test/r/innodb-deadlock.result +++ b/mysql-test/r/innodb-deadlock.result @@ -18,3 +18,80 @@ id x 0 2 commit; drop table t1; +drop table if exists t1, t2; +create table t1 (id integer, x integer) type=INNODB; +create table t2 (b integer, a integer) type=INNODB; +insert into t1 values(0, 0), (300, 300); +insert into t2 values(0, 10), (1, 20), (2, 30); +commit; +set autocommit=0; +select * from t2; +b a +0 10 +1 20 +2 30 +update t2 set a=100 where b=(SELECT x from t1 where id = b FOR UPDATE); +select * from t2; +b a +0 100 +1 20 +2 30 +select * from t1; +id x +0 0 +300 300 +set autocommit=0; +update t1 set x=2 where id = 0; +update t1 set x=1 where id = 0; +select * from t1; +id x +0 1 +300 300 +commit; +commit; +select * from t1; +id x +0 2 +300 300 +commit; +drop table t1, t2; +create table t1 (id integer, x integer) type=INNODB; +create table t2 (b integer, a integer) type=INNODB; +insert into t1 values(0, 0), (300, 300); +insert into t2 values(0, 0), (1, 20), (2, 30); +commit; +select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE; +a b +0 0 +20 1 +30 2 +300 300 +select * from t2; +b a +0 0 +1 20 +2 30 +select * from t1; +id x +0 0 +300 300 +update t2 set a=2 where b = 0; +select * from t2; +b a +0 2 +1 20 +2 30 +update t1 set x=2 where id = 0; +update t1 set x=1 where id = 0; +select * from t1; +id x +0 1 +300 300 +commit; +commit; +select * from t1; +id x +0 2 +300 300 +commit; +drop table t1, t2; diff --git a/mysql-test/r/innodb-non-simple.result b/mysql-test/r/innodb-non-simple.result deleted file mode 100644 index 8461b9d8d4d..00000000000 --- a/mysql-test/r/innodb-non-simple.result +++ /dev/null @@ -1,76 +0,0 @@ -drop table if exists t1, t2; -create table t1 (id integer, x integer) type=INNODB; -create table t2 (b integer, a integer) type=INNODB; -insert into t1 values(0, 0), (300, 300); -insert into t2 values(0, 10), (1, 20), (2, 30); -set autocommit=0; -select * from t2; -b a -0 10 -1 20 -2 30 -update t2 set a=100 where b=(SELECT x from t1 where id = b FOR UPDATE); -select * from t2; -b a -0 100 -1 20 -2 30 -select * from t1; -id x -0 0 -300 300 -set autocommit=0; -update t1 set x=2 where id = 0; -update t1 set x=1 where id = 0; -select * from t1; -id x -0 1 -300 300 -commit; -commit; -select * from t1; -id x -0 2 -300 300 -commit; -drop table t1, t2; -create table t1 (id integer, x integer) type=INNODB; -create table t2 (b integer, a integer) type=INNODB; -insert into t1 values(0, 0), (300, 300); -insert into t2 values(0, 0), (1, 20), (2, 30); -commit; -select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE; -a b -0 0 -20 1 -30 2 -300 300 -select * from t2; -b a -0 0 -1 20 -2 30 -select * from t1; -id x -0 0 -300 300 -update t2 set a=2 where b = 0; -select * from t2; -b a -0 2 -1 20 -2 30 -update t1 set x=2 where id = 0; -update t1 set x=1 where id = 0; -select * from t1; -id x -0 1 -300 300 -commit; -commit; -select * from t1; -id x -0 2 -300 300 -commit; -drop table t1, t2; diff --git a/mysql-test/t/innodb-deadlock.test b/mysql-test/t/innodb-deadlock.test index bc2839bfb3a..2648d6cdf9c 100644 --- a/mysql-test/t/innodb-deadlock.test +++ b/mysql-test/t/innodb-deadlock.test @@ -36,3 +36,76 @@ select * from t1; commit; drop table t1; +drop table if exists t1, t2; +# +# Testing of FOR UPDATE +# + +connection con1; +create table t1 (id integer, x integer) type=INNODB; +create table t2 (b integer, a integer) type=INNODB; +insert into t1 values(0, 0), (300, 300); +insert into t2 values(0, 10), (1, 20), (2, 30); +commit; +set autocommit=0; +select * from t2; +update t2 set a=100 where b=(SELECT x from t1 where id = b FOR UPDATE); +select * from t2; +select * from t1; + +connection con2; +set autocommit=0; + +# The following query should hang because con1 is locking the page +--send +update t1 set x=2 where id = 0; +--sleep 2; + +connection con1; +update t1 set x=1 where id = 0; +select * from t1; +commit; + +connection con2; +reap; +commit; + +connection con1; +select * from t1; +commit; + +drop table t1, t2; +create table t1 (id integer, x integer) type=INNODB; +create table t2 (b integer, a integer) type=INNODB; +insert into t1 values(0, 0), (300, 300); +insert into t2 values(0, 0), (1, 20), (2, 30); +commit; + +connection con1; +select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE; +select * from t2; +select * from t1; + +connection con2; + +# The following query should hang because con1 is locking the page +update t2 set a=2 where b = 0; +select * from t2; +--send +update t1 set x=2 where id = 0; +--sleep 2; + +connection con1; +update t1 set x=1 where id = 0; +select * from t1; +commit; + +connection con2; +reap; +commit; + +connection con1; +select * from t1; +commit; + +drop table t1, t2; diff --git a/mysql-test/t/innodb-non-simple.test b/mysql-test/t/innodb-non-simple.test deleted file mode 100644 index 1d890896d3f..00000000000 --- a/mysql-test/t/innodb-non-simple.test +++ /dev/null @@ -1,76 +0,0 @@ --- source include/have_innodb.inc - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -drop table if exists t1, t2; -# -# Testing of FOR UPDATE -# - -connection con1; -create table t1 (id integer, x integer) type=INNODB; -create table t2 (b integer, a integer) type=INNODB; -insert into t1 values(0, 0), (300, 300); -insert into t2 values(0, 10), (1, 20), (2, 30); -set autocommit=0; -select * from t2; -update t2 set a=100 where b=(SELECT x from t1 where id = b FOR UPDATE); -select * from t2; -select * from t1; - -connection con2; -set autocommit=0; - -# The following query should hang because con1 is locking the page ---send -update t1 set x=2 where id = 0; ---sleep 2; - -connection con1; -update t1 set x=1 where id = 0; -select * from t1; -commit; - -connection con2; -reap; -commit; - -connection con1; -select * from t1; -commit; - -drop table t1, t2; -create table t1 (id integer, x integer) type=INNODB; -create table t2 (b integer, a integer) type=INNODB; -insert into t1 values(0, 0), (300, 300); -insert into t2 values(0, 0), (1, 20), (2, 30); -commit; - -connection con1; -select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE; -select * from t2; -select * from t1; - -connection con2; - -# The following query should hang because con1 is locking the page -update t2 set a=2 where b = 0; -select * from t2; ---send -update t1 set x=2 where id = 0; ---sleep 2; - -connection con1; -update t1 set x=1 where id = 0; -select * from t1; -commit; - -connection con2; -reap; -commit; - -connection con1; -select * from t1; -commit; - -drop table t1, t2; \ No newline at end of file From 30d1b1436162b00fdbd9af8593cab17b2a40a296 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 21:27:14 +0200 Subject: [PATCH 237/246] subselet in delete (SCRUM) mysql-test/r/subselect.result: subselects in delete test mysql-test/t/subselect.test: subselects in delete test sql/sql_delete.cc: subselet in delete --- mysql-test/r/subselect.result | 19 +++++++++++++++++++ mysql-test/t/subselect.test | 11 +++++++++++ sql/sql_delete.cc | 8 ++++++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index a2d29b1c0cf..02f05ce50d6 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -335,3 +335,22 @@ a b 1 21 2 22 drop table t1, t2; +drop table if exists t1, t2; +create table t1 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t1 values (0, 10),(1, 11),(2, 12); +insert into t2 values (1, 21),(2, 12),(3, 23); +select * from t1; +a b +0 10 +1 11 +2 12 +select * from t1 where b = (select b from t2 where t1.a = t2.a); +a b +2 12 +delete from t1 where b = (select b from t2 where t1.a = t2.a); +select * from t1; +a b +0 10 +1 11 +drop table t1, t2; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 6bba9d4f3cd..3f20abe803a 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -215,3 +215,14 @@ update t1 set b= (select b from t2 where t1.a = t2.a); select * from t1; drop table t1, t2; +#delete with subselects +drop table if exists t1, t2; +create table t1 (a int NOT NULL, b int, primary key (a)); +create table t2 (a int NOT NULL, b int, primary key (a)); +insert into t1 values (0, 10),(1, 11),(2, 12); +insert into t2 values (1, 21),(2, 12),(3, 23); +select * from t1; +select * from t1 where b = (select b from t2 where t1.a = t2.a); +delete from t1 where b = (select b from t2 where t1.a = t2.a); +select * from t1; +drop table t1, t2; diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 16d6b6d4631..5b97b2f7750 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -37,14 +37,18 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, bool using_limit=limit != HA_POS_ERROR; bool transactional_table, log_delayed, safe_update, const_cond; ha_rows deleted; + TABLE_LIST *delete_table_list= (TABLE_LIST*) + thd->lex.select_lex.table_list.first; DBUG_ENTER("mysql_delete"); - if (!(table = open_ltable(thd, table_list, table_list->lock_type))) + if ((open_and_lock_tables(thd, table_list))) DBUG_RETURN(-1); + fix_tables_pointers(&thd->lex.select_lex); + table= table_list->table; table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); thd->proc_info="init"; table->map=1; - if (setup_conds(thd,table_list,&conds) || + if (setup_conds(thd, delete_table_list, &conds) || setup_ftfuncs(&thd->lex.select_lex)) DBUG_RETURN(-1); From 4ea2f42e33e1846335c1321fcd4d438d075c8e06 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Nov 2002 22:18:44 +0100 Subject: [PATCH 238/246] myisammrg::index_next_same myisammrg/Makefile.am: myrg_rnext_same.c added --- include/myisammrg.h | 1 + myisam/mi_rkey.c | 17 ++++++++-------- myisam/mi_rrnd.c | 5 ++++- myisam/myisamdef.h | 6 +++++- myisammrg/Makefile.am | 3 ++- myisammrg/myrg_rkey.c | 4 ++-- myisammrg/myrg_rnext_same.c | 40 +++++++++++++++++++++++++++++++++++++ sql/ha_myisammrg.cc | 10 ++++++++++ sql/ha_myisammrg.h | 11 +++++----- 9 files changed, 79 insertions(+), 18 deletions(-) create mode 100644 myisammrg/myrg_rnext_same.c diff --git a/include/myisammrg.h b/include/myisammrg.h index c3b3b39424b..16d3528717b 100644 --- a/include/myisammrg.h +++ b/include/myisammrg.h @@ -84,6 +84,7 @@ extern int myrg_rfirst(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rlast(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rnext(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rprev(MYRG_INFO *file,byte *buf,int inx); +extern int myrg_rnext_same(MYRG_INFO *file,byte *buf); extern int myrg_rkey(MYRG_INFO *file,byte *buf,int inx,const byte *key, uint key_len, enum ha_rkey_function search_flag); extern int myrg_rrnd(MYRG_INFO *file,byte *buf,ulonglong pos); diff --git a/myisam/mi_rkey.c b/myisam/mi_rkey.c index cefb7a74dd1..4a3c76809e8 100644 --- a/myisam/mi_rkey.c +++ b/myisam/mi_rkey.c @@ -38,7 +38,15 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->last_key_func=search_flag; - if (!info->use_packed_key) + if (info->once_flags & USE_PACKED_KEYS) + { + /* key is already packed! */ + key_buff=info->lastkey+info->s->base.max_key_length; + info->last_rkey_length=pack_key_length=key_len; + bmove(key_buff,key,key_len); + info->once_flags&= ~USE_PACKED_KEYS; + } + else { if (key_len == 0) key_len=USE_WHOLE_KEY; @@ -48,13 +56,6 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,share->keyinfo[inx].seg, key_buff,pack_key_length);); } - else - { - /* key is already packed! */ - key_buff=info->lastkey+info->s->base.max_key_length; - info->last_rkey_length=pack_key_length=key_len; - bmove(key_buff,key,key_len); - } if (fast_mi_readinfo(info)) goto err; diff --git a/myisam/mi_rrnd.c b/myisam/mi_rrnd.c index f8009441cff..29f686b0456 100644 --- a/myisam/mi_rrnd.c +++ b/myisam/mi_rrnd.c @@ -46,7 +46,10 @@ int mi_rrnd(MI_INFO *info, byte *buf, register my_off_t filepos) filepos= info->nextpos; } - info->lastinx= -1; /* Can't forward or backward */ + if (info->once_flags & RRND_PRESERVE_LASTINX) + info->once_flags&= ~RRND_PRESERVE_LASTINX; + else + info->lastinx= -1; /* Can't forward or backward */ /* Init all but update-flag */ info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h index 6499021861e..c63f4a28562 100644 --- a/myisam/myisamdef.h +++ b/myisam/myisamdef.h @@ -267,7 +267,7 @@ struct st_myisam_info { my_bool quick_mode; my_bool page_changed; /* If info->buff can't be used for rnext */ my_bool buff_used; /* If info->buff has to be reread for rnext */ - my_bool use_packed_key; /* For MYISAMMRG */ + my_bool once_flags; /* For MYISAMMRG */ #ifdef THREAD THR_LOCK_DATA lock; #endif @@ -288,6 +288,10 @@ struct st_myisam_info { #define WRITEINFO_UPDATE_KEYFILE 1 #define WRITEINFO_NO_UNLOCK 2 + /* once_flags */ +#define USE_PACKED_KEYS 1 +#define RRND_PRESERVE_LASTINX 2 + /* bits in state.changed */ #define STATE_CHANGED 1 diff --git a/myisammrg/Makefile.am b/myisammrg/Makefile.am index 6a6824affba..b749b84ba0b 100644 --- a/myisammrg/Makefile.am +++ b/myisammrg/Makefile.am @@ -21,7 +21,8 @@ libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ myrg_rrnd.c myrg_update.c myrg_delete.c myrg_rsame.c \ myrg_panic.c myrg_close.c myrg_create.c myrg_static.c \ myrg_rkey.c myrg_rfirst.c myrg_rlast.c myrg_rnext.c \ - myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c + myrg_rprev.c myrg_queue.c myrg_write.c myrg_range.c \ + myrg_rnext_same.c # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/myisammrg/myrg_rkey.c b/myisammrg/myrg_rkey.c index ba042352a51..c0cef5a4eca 100644 --- a/myisammrg/myrg_rkey.c +++ b/myisammrg/myrg_rkey.c @@ -62,9 +62,8 @@ int myrg_rkey(MYRG_INFO *info,byte *record,int inx, const byte *key, } else { - mi->use_packed_key=1; + mi->once_flags|= USE_PACKED_KEYS; err=mi_rkey(mi,0,inx,key_buff,pack_key_length,search_flag); - mi->use_packed_key=0; } info->last_used_table=table+1; @@ -83,5 +82,6 @@ int myrg_rkey(MYRG_INFO *info,byte *record,int inx, const byte *key, return HA_ERR_KEY_NOT_FOUND; mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table; + mi->once_flags|= RRND_PRESERVE_LASTINX; return mi_rrnd(mi,record,mi->lastpos); } diff --git a/myisammrg/myrg_rnext_same.c b/myisammrg/myrg_rnext_same.c new file mode 100644 index 00000000000..b569459b77d --- /dev/null +++ b/myisammrg/myrg_rnext_same.c @@ -0,0 +1,40 @@ +/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "myrg_def.h" + +int myrg_rnext_same(MYRG_INFO *info, byte *buf) +{ + uint err; + MI_INFO *mi; + + if (!info->current_table) + return (HA_ERR_KEY_NOT_FOUND); + + err=mi_rnext_same(info->current_table->table,buf); + if (err == HA_ERR_END_OF_FILE) + { + queue_remove(&(info->by_key),0); + if (!info->by_key.elements) + return HA_ERR_END_OF_FILE; + + mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table; + mi->once_flags|= RRND_PRESERVE_LASTINX; + return mi_rrnd(mi,buf,mi->lastpos); + } + return err; +} + diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 07683dca73e..4398aaecf4d 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -160,6 +160,16 @@ int ha_myisammrg::index_last(byte * buf) return error; } +int ha_myisammrg::index_next_same(byte * buf, + const byte *key __attribute__((unused)), + uint length __attribute__((unused))) +{ + statistic_increment(ha_read_next_count,&LOCK_status); + int error=myrg_rnext_same(file,buf); + table->status=error ? STATUS_NOT_FOUND: 0; + return error; +} + int ha_myisammrg::rnd_init(bool scan) { return myrg_extra(file,HA_EXTRA_RESET,0); diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h index 8e33b99e418..008f5339caf 100644 --- a/sql/ha_myisammrg.h +++ b/sql/ha_myisammrg.h @@ -65,15 +65,16 @@ class ha_myisammrg: public handler int index_prev(byte * buf); int index_first(byte * buf); int index_last(byte * buf); + int index_next_same(byte *buf, const byte *key, uint keylen); int rnd_init(bool scan=1); int rnd_next(byte *buf); int rnd_pos(byte * buf, byte *pos); void position(const byte *record); - ha_rows ha_myisammrg::records_in_range(int inx, - const byte *start_key,uint start_key_len, - enum ha_rkey_function start_search_flag, - const byte *end_key,uint end_key_len, - enum ha_rkey_function end_search_flag); + ha_rows records_in_range(int inx, + const byte *start_key,uint start_key_len, + enum ha_rkey_function start_search_flag, + const byte *end_key,uint end_key_len, + enum ha_rkey_function end_search_flag); my_off_t row_position() { return myrg_position(file); } void info(uint); int extra(enum ha_extra_function operation); From da538d2bb56cd7431ad7d87fb7b533004ddac983 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Nov 2002 01:00:05 +0200 Subject: [PATCH 239/246] subselects in insert/replace (SCRUM) mysql-test/r/subselect.result: test of insert/replace with subselects mysql-test/t/subselect.test: test of insert/replace with subselects sql/sql_insert.cc: subselects in insert/replace sql/sql_yacc.yy: subselects in insert/replace --- mysql-test/r/subselect.result | 62 ++++++++++++++++++++++++++++++++++- mysql-test/t/subselect.test | 39 +++++++++++++++++++++- sql/sql_insert.cc | 31 +++++++++++++----- sql/sql_yacc.yy | 8 ++++- 4 files changed, 128 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 02f05ce50d6..ce5e7d2032f 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -335,7 +335,6 @@ a b 1 21 2 22 drop table t1, t2; -drop table if exists t1, t2; create table t1 (a int NOT NULL, b int, primary key (a)); create table t2 (a int NOT NULL, b int, primary key (a)); insert into t1 values (0, 10),(1, 11),(2, 12); @@ -354,3 +353,64 @@ a b 0 10 1 11 drop table t1, t2; +CREATE TABLE t1 (x int); +create table t2 (a int); +insert into t2 values (1); +INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); +select * from t1; +x +1 +insert into t2 values (1); +INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2)); +select * from t1; +x +1 +2 +INSERT INTO t1 (x) select (SELECT SUM(a)+1 FROM t2) FROM t2; +select * from t1; +x +1 +2 +3 +3 +INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2; +INSERT TABLE 't1' isn't allowed in FROM table list +INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t1)); +select * from t1; +x +1 +2 +3 +3 +9 +drop table t1, t2; +CREATE TABLE t1 (x int not null, y int, primary key (x)); +create table t2 (a int); +insert into t2 values (1); +select * from t1; +x y +replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); +select * from t1; +x y +1 2 +replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+2 FROM t2)); +select * from t1; +x y +1 3 +replace DELAYED into t1 (x, y) VALUES ((SELECT a+3 FROM t2), (SELECT a FROM t2)); +select * from t1; +x y +1 3 +4 1 +replace DELAYED into t1 (x, y) VALUES ((SELECT a+3 FROM t2), (SELECT a+1 FROM t2)); +select * from t1; +x y +1 3 +4 2 +replace LOW_PRIORITY into t1 (x, y) VALUES ((SELECT a+1 FROM t2), (SELECT a FROM t2)); +select * from t1; +x y +1 3 +4 2 +2 1 +drop table t1, t2; diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 3f20abe803a..4dea1ab5bca 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -216,7 +216,6 @@ select * from t1; drop table t1, t2; #delete with subselects -drop table if exists t1, t2; create table t1 (a int NOT NULL, b int, primary key (a)); create table t2 (a int NOT NULL, b int, primary key (a)); insert into t1 values (0, 10),(1, 11),(2, 12); @@ -226,3 +225,41 @@ select * from t1 where b = (select b from t2 where t1.a = t2.a); delete from t1 where b = (select b from t2 where t1.a = t2.a); select * from t1; drop table t1, t2; + +#insert with subselects +CREATE TABLE t1 (x int); +create table t2 (a int); +insert into t2 values (1); +INSERT INTO t1 (x) VALUES ((SELECT a FROM t2)); +select * from t1; +insert into t2 values (1); +INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(a) FROM t2)); +-- sleep 1 +select * from t1; +INSERT INTO t1 (x) select (SELECT SUM(a)+1 FROM t2) FROM t2; +select * from t1; +-- error 1093 +INSERT INTO t1 (x) select (SELECT SUM(x)+2 FROM t1) FROM t2; +INSERT DELAYED INTO t1 (x) VALUES ((SELECT SUM(x) FROM t1)); +-- sleep 1 +select * from t1; +drop table t1, t2; + +#replace with subselects +CREATE TABLE t1 (x int not null, y int, primary key (x)); +create table t2 (a int); +insert into t2 values (1); +select * from t1; +replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+1 FROM t2)); +select * from t1; +replace into t1 (x, y) VALUES ((SELECT a FROM t2), (SELECT a+2 FROM t2)); +select * from t1; +replace DELAYED into t1 (x, y) VALUES ((SELECT a+3 FROM t2), (SELECT a FROM t2)); +-- sleep 1 +select * from t1; +replace DELAYED into t1 (x, y) VALUES ((SELECT a+3 FROM t2), (SELECT a+1 FROM t2)); +-- sleep 1 +select * from t1; +replace LOW_PRIORITY into t1 (x, y) VALUES ((SELECT a+1 FROM t2), (SELECT a FROM t2)); +select * from t1; +drop table t1, t2; diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index c8a29dcd8da..295c1e339c5 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -114,6 +114,8 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, List_item *values; char *query=thd->query; thr_lock_type lock_type = table_list->lock_type; + TABLE_LIST *insert_table_list= (TABLE_LIST*) + thd->lex.select_lex.table_list.first; DBUG_ENTER("mysql_insert"); /* @@ -126,7 +128,9 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, thd->slave_thread)) || (lock_type == TL_WRITE_CONCURRENT_INSERT && duplic == DUP_REPLACE)) lock_type=TL_WRITE; + table_list->lock_type= lock_type; + int res; if (lock_type == TL_WRITE_DELAYED) { if (thd->locked_tables) @@ -141,25 +145,34 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, DBUG_RETURN(-1); } } - if (!(table = delayed_get_table(thd,table_list)) && !thd->fatal_error) - table = open_ltable(thd,table_list,lock_type=thd->update_lock_default); + if ((table= delayed_get_table(thd,table_list)) && !thd->fatal_error) + if (table_list->next && table) + res= open_and_lock_tables(thd, table_list->next); + else + res= (table == 0); + else + res= open_and_lock_tables(thd, table_list); } else - table = open_ltable(thd,table_list,lock_type); - if (!table) + res= open_and_lock_tables(thd, table_list); + if (res) DBUG_RETURN(-1); + fix_tables_pointers(&thd->lex.select_lex); + + table= table_list->table; thd->proc_info="init"; thd->used_tables=0; save_time_stamp=table->time_stamp; values= its++; if (check_insert_fields(thd,table,fields,*values,1) || - setup_tables(table_list) || setup_fields(thd,table_list,*values,0,0,0)) + setup_tables(insert_table_list) || + setup_fields(thd, insert_table_list, *values, 0, 0, 0)) { - table->time_stamp=save_time_stamp; + table->time_stamp= save_time_stamp; goto abort; } value_count= values->elements; - while ((values = its++)) + while ((values= its++)) { counter++; if (values->elements != value_count) @@ -170,9 +183,9 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, table->time_stamp=save_time_stamp; goto abort; } - if (setup_fields(thd,table_list,*values,0,0,0)) + if (setup_fields(thd,insert_table_list,*values,0,0,0)) { - table->time_stamp=save_time_stamp; + table->time_stamp= save_time_stamp; goto abort; } } diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 4465a6d8695..187ba63e92f 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2837,7 +2837,13 @@ opt_temporary: */ insert: - INSERT { Lex->sql_command = SQLCOM_INSERT; } insert_lock_option + INSERT + { + LEX *lex= Lex; + lex->sql_command = SQLCOM_INSERT; + /* for subselects */ + lex->lock_option= (using_update_log) ? TL_READ_NO_INSERT : TL_READ; + } insert_lock_option opt_ignore insert2 { Select->set_lock_for_tables($3); From c6ce7b3fbe8075fa56a26a3b2b30020baf032bbe Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Nov 2002 14:01:08 +0100 Subject: [PATCH 240/246] removed redundant -I include-dirs --- client/Makefile.am | 5 ++--- dbug/Makefile.am | 2 +- extra/Makefile.am | 2 +- fs/Makefile.am | 7 ++----- heap/Makefile.am | 2 +- isam/Makefile.am | 2 +- libmysql/Makefile.am | 3 +-- libmysql_r/Makefile.am | 3 +-- libmysqld/Makefile.am | 5 ++--- merge/Makefile.am | 2 +- myisam/Makefile.am | 2 +- myisammrg/Makefile.am | 2 +- mysys/Makefile.am | 2 +- pstack/Makefile.am | 2 +- readline/Makefile.am | 2 +- regex/Makefile.am | 2 +- sql/Makefile.am | 5 ++--- strings/Makefile.am | 2 +- tests/Makefile.am | 4 +--- tools/Makefile.am | 3 +-- vio/Makefile.am | 2 +- 21 files changed, 25 insertions(+), 36 deletions(-) diff --git a/client/Makefile.am b/client/Makefile.am index 9c994814714..530e82ecae2 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -16,9 +16,8 @@ # This file is public domain and comes with NO WARRANTY of any kind -INCLUDES = -I$(srcdir)/../include \ - -I../include -I$(srcdir)/.. -I$(top_srcdir) \ - -I.. $(openssl_includes) +AUTOMAKE_OPTIONS = nostdinc +INCLUDES = -I$(top_srcdir)/include $(openssl_includes) LIBS = @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \ diff --git a/dbug/Makefile.am b/dbug/Makefile.am index 08f0164c02c..bd512ee1d1d 100644 --- a/dbug/Makefile.am +++ b/dbug/Makefile.am @@ -15,7 +15,7 @@ # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = libdbug.a ../strings/libmystrings.a pkglib_LIBRARIES = libdbug.a noinst_HEADERS = dbug_long.h diff --git a/extra/Makefile.am b/extra/Makefile.am index 2d7dc95f616..6895d7a09f8 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include -I.. +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ ../dbug/libdbug.a ../strings/libmystrings.a bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ diff --git a/fs/Makefile.am b/fs/Makefile.am index 33d1acd913d..6fea3d455a3 100644 --- a/fs/Makefile.am +++ b/fs/Makefile.am @@ -27,11 +27,8 @@ DISTCLEANFILES = CorbaFS-common.* CorbaFS-stubs.* CorbaFS-skels.* CorbaFS.h MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include \ - -I$(srcdir)/../regex \ - -I$(srcdir) -I../include -I.. -I. \ - -I$(srcdir) -I../include -I.. -I. \ - $(orbit_includes) +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \ + -I$(top_srcdir)/regex $(orbit_includes) WRAPLIBS= @WRAPLIBS@ libexec_PROGRAMS = mysqlcorbafsd noinst_PROGRAMS =mysqlfs_test diff --git a/heap/Makefile.am b/heap/Makefile.am index 41d98b79ae9..ec631148dce 100644 --- a/heap/Makefile.am +++ b/heap/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = libheap.a ../mysys/libmysys.a ../dbug/libdbug.a \ ../strings/libmystrings.a pkglib_LIBRARIES = libheap.a diff --git a/isam/Makefile.am b/isam/Makefile.am index 8f23138f29f..6d9e4176d43 100644 --- a/isam/Makefile.am +++ b/isam/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = @CLIENT_EXTRA_LDFLAGS@ libnisam.a ../mysys/libmysys.a \ ../dbug/libdbug.a ../strings/libmystrings.a pkglib_LIBRARIES = libnisam.a diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am index 3d380c14076..1d5a5b19180 100644 --- a/libmysql/Makefile.am +++ b/libmysql/Makefile.am @@ -20,8 +20,7 @@ target = libmysqlclient.la target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ -DMYSQL_CLIENT LIBS = @CLIENT_LIBS@ -INCLUDES = -I$(srcdir)/../include -I../include \ - -I$(srcdir)/.. -I$(top_srcdir) -I.. $(openssl_includes) +INCLUDES = -I$(top_srcdir)/include $(openssl_includes) include $(srcdir)/Makefile.shared diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am index e01fc7634a1..265e31fafdb 100644 --- a/libmysql_r/Makefile.am +++ b/libmysql_r/Makefile.am @@ -21,8 +21,7 @@ target = libmysqlclient_r.la target_defs = -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ ## LIBS = @LIBS@ -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include \ - -I$(srcdir)/.. -I$(top_srcdir) -I.. $(openssl_includes) +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) ## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include include $(top_srcdir)/libmysql/Makefile.shared diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 022a589e304..18469422e39 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -25,9 +25,8 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" -INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(srcdir)/../include \ - -I../include -I$(srcdir)/.. -I$(top_srcdir) -I.. \ - -I../sql -I../regex +INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \ + -I$(top_srcdir)/sql -I$(top_srcdir)/regex noinst_LIBRARIES = libmysqld_int.a pkglib_LIBRARIES = libmysqld.a diff --git a/merge/Makefile.am b/merge/Makefile.am index 78441e84fac..25e15e9c6ec 100644 --- a/merge/Makefile.am +++ b/merge/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include pkglib_LIBRARIES = libmerge.a noinst_HEADERS = mrg_def.h libmerge_a_SOURCES = mrg_open.c mrg_extra.c mrg_info.c mrg_locking.c \ diff --git a/myisam/Makefile.am b/myisam/Makefile.am index 1dbce5727f0..f8225868d96 100644 --- a/myisam/Makefile.am +++ b/myisam/Makefile.am @@ -17,7 +17,7 @@ EXTRA_DIST = mi_test_all.sh mi_test_all.res pkgdata_DATA = mi_test_all mi_test_all.res -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include LDADD = @CLIENT_EXTRA_LDFLAGS@ libmyisam.a ../mysys/libmysys.a \ ../dbug/libdbug.a ../strings/libmystrings.a pkglib_LIBRARIES = libmyisam.a diff --git a/myisammrg/Makefile.am b/myisammrg/Makefile.am index b749b84ba0b..b5b1260385b 100644 --- a/myisammrg/Makefile.am +++ b/myisammrg/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include pkglib_LIBRARIES = libmyisammrg.a noinst_HEADERS = myrg_def.h libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ diff --git a/mysys/Makefile.am b/mysys/Makefile.am index 2661363de11..330e1d6e59d 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -17,7 +17,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include -I.. -I$(srcdir) +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) pkglib_LIBRARIES = libmysys.a LDADD = libmysys.a ../dbug/libdbug.a \ ../strings/libmystrings.a diff --git a/pstack/Makefile.am b/pstack/Makefile.am index 863a52f4488..77f84d212cd 100644 --- a/pstack/Makefile.am +++ b/pstack/Makefile.am @@ -20,7 +20,7 @@ # SUBDIRS = aout -INCLUDES = -I$(srcdir)/../include -I../include +INCLUDES = -I$(top_srcdir)/include noinst_HEADERS = bucomm.h debug.h ieee.h budbg.h demangle.h \ linuxthreads.h pstack.h pstacktrace.h SRC= bucomm.c filemode.c linuxthreads.c rddbg.c \ diff --git a/readline/Makefile.am b/readline/Makefile.am index e9c6b3b8d58..2fdb2e04bcd 100644 --- a/readline/Makefile.am +++ b/readline/Makefile.am @@ -2,7 +2,7 @@ # Makefile for the GNU readline library. # Copyright (C) 1994,1996,1997 Free Software Foundation, Inc. -INCLUDES = -I$(srcdir)/../include -I$(srcdir)/.. -I.. +INCLUDES = -I$(top_srcdir)/include noinst_LIBRARIES = libreadline.a diff --git a/regex/Makefile.am b/regex/Makefile.am index ee421b70bcf..2e23efcbf2a 100644 --- a/regex/Makefile.am +++ b/regex/Makefile.am @@ -15,7 +15,7 @@ # Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, # MA 02111-1307, USA -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include noinst_LIBRARIES = libregex.a LDADD = libregex.a ../strings/libmystrings.a noinst_HEADERS = cclass.h cname.h regex2.h utils.h engine.c regex.h diff --git a/sql/Makefile.am b/sql/Makefile.am index 09fedd393c2..828e74c67fc 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -22,9 +22,8 @@ MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) INCLUDES = @MT_INCLUDES@ \ @bdb_includes@ @innodb_includes@ \ - -I$(srcdir)/../include \ - -I$(srcdir)/../regex \ - -I$(srcdir) -I../include -I. $(openssl_includes) + -I$(top_srcdir)/include -I$(top_srcdir)/regex \ + -I$(srcdir) $(openssl_includes) WRAPLIBS= @WRAPLIBS@ SUBDIRS = share libexec_PROGRAMS = mysqld diff --git a/strings/Makefile.am b/strings/Makefile.am index e53ff21cdf8..ac0b6d7f1e0 100644 --- a/strings/Makefile.am +++ b/strings/Makefile.am @@ -16,7 +16,7 @@ # This file is public domain and comes with NO WARRANTY of any kind -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include pkglib_LIBRARIES = libmystrings.a # Exact one of ASSEMBLER_X diff --git a/tests/Makefile.am b/tests/Makefile.am index 4935b6cd95a..5dc6871bd43 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -29,9 +29,7 @@ EXTRA_DIST = auto_increment.res auto_increment.tst \ # # C Test for 4.1 protocol # -INCLUDES = -I$(srcdir)/../include $(openssl_includes) \ - -I../include -I$(srcdir)/.. -I$(top_srcdir) \ - -I.. +INCLUDES = -I$(top_srcdir)/include $(openssl_includes) LIBS = @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la noinst_PROGRAMS = client_test diff --git a/tools/Makefile.am b/tools/Makefile.am index 3c786dc9281..0dc0b90c60e 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,5 +1,4 @@ -INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include \ - $(openssl_includes) -I../include +INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) LDADD= @CLIENT_EXTRA_LDFLAGS@ ../libmysql_r/libmysqlclient_r.la @openssl_libs@ bin_PROGRAMS= mysqlmanager mysqlmanager_SOURCES= mysqlmanager.c diff --git a/vio/Makefile.am b/vio/Makefile.am index b53f3be9f91..16c70b12454 100644 --- a/vio/Makefile.am +++ b/vio/Makefile.am @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -INCLUDES = -I$(srcdir)/../include -I../include $(openssl_includes) +INCLUDES = -I$(top_srcdir)/include $(openssl_includes) LDADD = @CLIENT_EXTRA_LDFLAGS@ libvio.a $(openssl_libs) pkglib_LIBRARIES = libvio.a noinst_PROGRAMS = test-ssl test-sslserver test-sslclient From 0c417889d90caa3c663413ff125d9df0a4f95b87 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Nov 2002 14:03:25 +0100 Subject: [PATCH 241/246] mysql.cc has to support older readline to compile on FreeBSD :(( --- client/mysql.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/mysql.cc b/client/mysql.cc index 391779ef801..13943691fb4 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1070,9 +1070,13 @@ static void initialize_readline (char *name) rl_readline_name = name; /* Tell the completer that we want a crack first. */ - /* rl_attempted_completion_function = (CPPFunction *)mysql_completion;*/ +#if RL_READLINE_VERSION > 0x0400 rl_attempted_completion_function = &new_mysql_completion; rl_completion_entry_function= &no_completion; +#else + rl_attempted_completion_function =(CPPFunction *)new_mysql_completion; + rl_completion_entry_function= (Function *)no_completion; +#endif } /* @@ -1087,7 +1091,11 @@ static char **new_mysql_completion (const char *text, int end __attribute__((unused))) { if (!status.batch && !quick) +#if RL_READLINE_VERSION > 0x0400 return rl_completion_matches(text, new_command_generator); +#else + return completion_matches((char *)text, (CPFunction *)new_command_generator); +#endif else return (char**) 0; } From cb746b6ce98845d4f88495570def630c85ea1ea0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Nov 2002 14:19:39 +0100 Subject: [PATCH 242/246] typo fixed --- myisam/ft_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c index 29a48352cd6..358706a8ffa 100644 --- a/myisam/ft_parser.c +++ b/myisam/ft_parser.c @@ -111,7 +111,7 @@ FT_WORD * ft_linearize(TREE *wtree) #else #define misc_word_char(X) ((X)=='\'' || (X)=='-') #endif -#define word_char(s,X) (true_word_char(s,X) || misc_word_char(s,X)) +#define word_char(s,X) (true_word_char(s,X) || misc_word_char(X)) /* returns: @@ -132,8 +132,8 @@ byte ft_get_word(byte **start, byte *end, FT_WORD *word, FTB_PARAM *param) { for (;doc Date: Tue, 26 Nov 2002 15:33:30 +0100 Subject: [PATCH 243/246] temporary fix to make mysql.cc to compile --with-readline (thought it won't compile --without-readline) preper fix is to follow... --- client/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Makefile.am b/client/Makefile.am index 530e82ecae2..92c46519275 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -16,7 +16,7 @@ # This file is public domain and comes with NO WARRANTY of any kind -AUTOMAKE_OPTIONS = nostdinc +#AUTOMAKE_OPTIONS = nostdinc INCLUDES = -I$(top_srcdir)/include $(openssl_includes) LIBS = @CLIENT_LIBS@ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la From ae729f93158e57ef52b57ead0ec4f0c052fdda92 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Nov 2002 16:49:55 +0200 Subject: [PATCH 244/246] A fix for a bug with derived tables within subselect within derived tables within ...... --- mysql-test/r/derived.result | 3 +++ mysql-test/t/derived.test | 3 ++- sql/sql_derived.cc | 18 +++++++++++------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 204ca86f306..b397c2f7635 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -65,3 +65,6 @@ a t 19 19 20 20 drop table if exists t1; +SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a))); +(SELECT * FROM (SELECT 1 as a)) +1 diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test index de765a0e280..c1d8af4074a 100644 --- a/mysql-test/t/derived.test +++ b/mysql-test/t/derived.test @@ -33,4 +33,5 @@ while ($1) } enable_query_log; SELECT * FROM (SELECT * FROM t1) ORDER BY a ASC LIMIT 0,20; -drop table if exists t1; \ No newline at end of file +drop table if exists t1; +SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a))); diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index b3d2b1602d0..6dc001a1932 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -50,15 +50,19 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t) if (res) DBUG_RETURN(-1); - for (TABLE_LIST *cursor= (TABLE_LIST *)tables; - cursor; - cursor=cursor->next) + for (SELECT_LEX *ssl= sl; ssl; ssl= ssl->next_select_in_list()) { - if (cursor->derived) + TABLE_LIST *t_tables= (TABLE_LIST *)ssl->table_list.first; + for (TABLE_LIST *cursor= (TABLE_LIST *)t_tables; + cursor; + cursor=cursor->next) { - res= mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived, - cursor); - if (res) DBUG_RETURN(res); + if (cursor->derived) + { + res= mysql_derived(thd, lex, (SELECT_LEX_UNIT *)cursor->derived, + cursor); + if (res) DBUG_RETURN(res); + } } } Item *item; From 4adb15f3fa83c2ca5b0d5586fa90d2b50dbedb61 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Nov 2002 03:49:35 +0500 Subject: [PATCH 245/246] add new tests, new functions sql-bench/crash-me.sh: Add tests: - If double double quotes are allowed in identifiers. - Rollback rolls back meta data - NULL sort and NULL sort perserve. - remove one check of "serial". - (Column,Table,Named constraints) new test to crash me if the check syntax is only supported by the parser, but not done for real. - For all ..USER tests, (like current_user), add an extra test if ...USER() is supported. - Add tests for constants TRUE and FALSE - Add test of LIMIT # OFFSET (PostgreSQL syntax) - tests of a lot of new functions --- sql-bench/crash-me.sh | 249 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 228 insertions(+), 21 deletions(-) diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh index 02e3072a3f9..5fa67773566 100644 --- a/sql-bench/crash-me.sh +++ b/sql-bench/crash-me.sh @@ -38,7 +38,7 @@ # as such, and clarify ones such as "mediumint" with comments such as # "3-byte int" or "same as xxx". -$version="1.58"; +$version="1.59"; use DBI; use Getopt::Long; @@ -253,6 +253,9 @@ check_and_report("\` as identifier quote",'quote_ident_with_`',[], 'select `A` from crash_me',[],"1",0); check_and_report("[] as identifier quote",'quote_ident_with_[',[], 'select [A] from crash_me',[],"1",0); +report('Double "" in identifiers as "','quote_ident_with_dbl_"', + 'create table crash_me1 ("abc""d" integer)', + 'drop table crash_me1'); report("Column alias","column_alias","select a as ab from crash_me"); report("Table alias","table_alias","select b.a from crash_me as b"); @@ -301,6 +304,7 @@ try_and_report("LIMIT number of rows","select_limit", ["with TOP", "select TOP 1 * from crash_me"]); report("SELECT with LIMIT #,#","select_limit2", "select * from crash_me limit 1,1"); +report("SELECT with LIMIT # OFFSET #","select_limit3", "select * from crash_me limit 1 offset 1"); # The following alter table commands MUST be kept together! if ($dbh->do("create table crash_q (a integer, b integer,c1 CHAR(10))")) @@ -434,6 +438,9 @@ report("hex strings (x'1ace')","hex_strings","select x'1ace' $end_query"); report_result("Value of logical operation (1=1)","logical_value", "select (1=1) $end_query"); +report_result("Value of TRUE","value_of_true","select TRUE $end_query"); +report_result("Value of FALSE","value_of_false","select FALSE $end_query"); + $logical_value= $limits{'logical_value'}; $false=0; @@ -584,7 +591,7 @@ print "$limits{'query_size'}\n"; "int not null identity,unique(q)", # postgres types "box","bool","circle","polygon","point","line","lseg","path", - "interval", "serial", "inet", "cidr", "macaddr", + "interval", "inet", "cidr", "macaddr", # oracle types "varchar2(16)","nvarchar2(16)","number(9,2)","number(9)", @@ -769,7 +776,6 @@ try_and_report("Automatic row id", "automatic_rowid", ["CURRENT_DATE","current_date","current_date",0,2], ["CURRENT_TIME","current_time","current_time",0,2], ["CURRENT_TIMESTAMP","current_timestamp","current_timestamp",0,2], - ["CURRENT_USER","current_user","current_user",0,2], ["EXTRACT","extract_sql","extract(minute from timestamp '2000-02-23 18:43:12.987')",43,0], ["LOCALTIME","localtime","localtime",0,2], ["LOCALTIMESTAMP","localtimestamp","localtimestamp",0,2], @@ -778,11 +784,8 @@ try_and_report("Automatic row id", "automatic_rowid", ["NULLIF with numbers","nullif_num","NULLIF(NULLIF(1,2),1)",undef(),4], ["OCTET_LENGTH","octet_length","octet_length('abc')",3,0], ["POSITION","position","position('ll' in 'hello')",3,0], - ["SESSION_USER","session_user","session_user",0,2], - ["SYSTEM_USER","system_user","system_user",0,2], ["TRIM","trim","trim(trailing from trim(LEADING FROM ' abc '))","abc",3], ["UPPER","upper","UPPER('abc')","ABC",1], - ["USER","user","user"], ["concatenation with ||","concat_as_||","'abc' || 'def'","abcdef",1], ); @@ -960,8 +963,61 @@ try_and_report("Automatic row id", "automatic_rowid", ["automatic num->string convert","auto_num2string","concat('a',2)","a2",1], ["automatic string->num convert","auto_string2num","'1'+2",3,0], ["concatenation with +","concat_as_+","'abc' + 'def'","abcdef",1], + ["SUBSTR (2 arg)",'substr2arg',"substr('abcd',2)",'bcd',1], #sapdb func + ["SUBSTR (3 arg)",'substr3arg',"substr('abcd',2,2)",'bc',1], + ["LFILL (3 arg)",'lfill3arg',"lfill('abcd','.',6)",'..abcd',1], + ["RFILL (3 arg)",'rfill3arg',"rfill('abcd','.',6)",'abcd..',1], + ["RPAD (4 arg)",'rpad4arg',"rpad('abcd',2,'+-',8)",'abcd+-+-',1], + ["LPAD (4 arg)",'rpad4arg',"lpad('abcd',2,'+-',8)",'+-+-abcd',1], + ["SAPDB compatible TRIM (1 arg)",'trim1arg',"trim(' abcd ')",'abcd',1], + ["SAPDB compatible TRIM (2 arg)",'trim2arg',"trim('..abcd..','.')",'abcd',1], + ["LTRIM (2 arg)",'ltrim2arg',"ltrim('..abcd..','.')",'abcd..',1], + ["RTRIM (2 arg)",'rtrim2arg',"rtrim('..abcd..','.')",'..abcd',1], + ["EXPAND",'expand2arg',"expand('abcd',6)",'abcd ',0], + ["REPLACE (2 arg) ",'replace2arg',"replace('AbCd','bC')",'Ad',1], + ["MAPCHAR",'mapchar',"mapchar('Aâ')",'Aa',1], + ["ALPHA",'alpha',"alpha('Aâ',2)",'AA',1], + ["ASCII in string cast",'ascii_string',"ascii('a')",'a',1], + ["EBCDIC in string cast",'ebcdic_string',"ebcdic('a')",'a',1], + ["TRUNC (1 arg)",'trunc1arg',"trunc(222.6)",222,0], + ["NOROUND",'noround',"noround(222.6)",222.6,0], + ["FIXED",'fixed',"fixed(222.6666,10,2)",'222.67',0], + ["FLOAT",'float',"float(6666.66,4)",6667,0], + ["LENGTH",'length',"length(1)",2,0], + ["INDEX",'index',"index('abcdefg','cd',1,1)",3,0], + ["ADDDATE",'adddate',"ADDDATE('20021201',3)",'20021204',0], + ["SUBDATE",'subdate',"SUBDATE('20021204',3)",'20021201',0], + ["DATEDIFF (2 arg)",'datediff2arg',"DATEDIFF('20021204','20021201')",'3',0], # sapdb + ["DAYOFWEEK with sapdb internal date as arg",'dayofweek_sapdb',"DAYOFWEEK('19630816')",'5',0], + ["WEEKOFYEAR",'weekofyear',"WEEKOFYEAR('19630816')",'33',0], + ["DAYOFMONTH with sapdb internal date as arg",'dayofmonth_sapdb',"dayofmonth('19630816')",'16',0], + ["DAYOFYEAR with sapdb internal date as arg",'dayofyear_sapdb',"DAYOFYEAR('19630816')",'228',0], + ["MAKEDATE",'makedate',"MAKEDATE(1963,228)",'19630816',0], + ["DAYNAME with sapdb internal date as arg",'dayname_sapdb',"DAYNAME('19630816')",'Friday',0], + ["MONTHNAME with sapdb internal date as arg",'monthname_sapdb',"MONTHNAME('19630816')",'August',0], + ["ADDTIME",'addtime',"ADDTIME('00200212','00000300')",'00200215',0], + ["SUBTIME",'subdate',"SUBDATE('00200215','00000300')",'00200212',0], + ["TIMEDIFF",'timediff',"TIMEDIFF('00200215','00200212')",'00000003',0], + ["MAKETIME",'maketime',"MAKETIME(20,02,12)",'00200212',0], + ["YEAR with sapdb internal date as arg",'year_sapdb',"YEAR('20021201')",'2002',0], + ["MONTH with sapdb internal date as arg",'month_sapdb',"MONTH('20021201')",'12',0], + ["DAY",'day',"DAY('20021201')",1,0], + ["HOUR with sapdb internal time as arg",'hour_sapdb',"HOUR('00200212')",20,0], + ["MINUTE with sapdb internal time as arg",'minute_sapdb',"MINUTE('00200212')",2,0], + ["SECOND with sapdb internal time as arg",'second_sapdb',"SECOND('00200212')",12,0], + ["MICROSECOND",'microsecond',"MICROSECOND('19630816200212111111')",'111111',0], + ["TIMESTAMP",'timestamp',"timestamp('19630816','00200212')",'19630816200212000000',0], + ["TIME",'time',"time('00200212')",'00200212',0], + ["DATE",'date',"date('19630816')",'19630816',0], + ["VALUE",'value',"value(NULL,'WALRUS')",'WALRUS',0], + ["DECODE",'decode',"DECODE('S-103','T72',1,'S-103',2,'Leopard',3)",2,0], + ["NUM",'num',"NUM('2123')",2123,0], + ["CHAR (conversation date)",'char_date',"CHAR(DATE('19630816'),EUR)",'16.08.1963',0], + ["CHR (any type to string)",'chr_str',"CHR(67)",'67',0], + ["HEX",'hex',"HEX('A')",41,0], ); + @sql_group_functions= ( ["AVG","avg","avg(a)",1,0], @@ -1131,6 +1187,20 @@ else } +if ($limits{'func_extra_noround'} eq 'yes') +{ + report("Ignoring NOROUND","ignoring_noround", + "create table crash_q (a int)", + "insert into crash_q values(noround(10.22))", + "drop table crash_q $drop_attr"); +} + +check_parenthesis("func_sql_","CURRENT_USER"); +check_parenthesis("func_sql_","SESSION_USER"); +check_parenthesis("func_sql_","SYSTEM_USER"); +check_parenthesis("func_sql_","USER"); + + report("LIKE on numbers","like_with_number", "create table crash_q (a int,b int)", "insert into crash_q values(10,10)", @@ -1561,19 +1631,29 @@ if (!defined($limits{"transactions"})) { my ($limit,$type); $limit="transactions"; + $limit_r="rollback_metadata"; print "$limit: "; foreach $type (('', 'type=bdb', 'type=innodb', 'type=gemini')) { undef($limits{$limit}); - last if (!report_trans($limit, + if (!report_trans($limit, [create_table("crash_q",["a integer not null"],[], $type), "insert into crash_q values (1)"], "select * from crash_q", "drop table crash_q $drop_attr" - )); + )) + { + report_rollback($limit_r, + [create_table("crash_q",["a integer not null"],[], + $type)], + "insert into crash_q values (1)", + "drop table crash_q $drop_attr" ); + last; + }; } print "$limits{$limit}\n"; + print "$limit_r: $limits{$limit_r}\n"; } report("atomic updates","atomic_updates", @@ -1644,14 +1724,29 @@ report("Column constraints","constraint_check", "create table crash_q (a int check (a>0))", "drop table crash_q $drop_attr"); +report("Ignoring column constraints","ignoring_constraint_check", + "create table crash_q (a int check (a>0))", + "insert into crash_q values(0)", + "drop table crash_q $drop_attr") if ($limits{'constraint_check'} eq 'yes'); + report("Table constraints","constraint_check_table", "create table crash_q (a int ,b int, check (a>b))", "drop table crash_q $drop_attr"); -report("Named constraints","constraint_check", +report("Ignoring table constraints","ignoring_constraint_check_table", + "create table crash_q (a int ,b int, check (a>b))", + "insert into crash_q values(0,0)", + "drop table crash_q $drop_attr") if ($limits{'constraint_check_table'} eq 'yes'); + +report("Named constraints","constraint_check_named", "create table crash_q (a int ,b int, constraint abc check (a>b))", "drop table crash_q $drop_attr"); +report("Ignoring named constraints","ignoring_constraint_check_named", + "create table crash_q (a int ,b int, constraint abc check (a>b))", + "insert into crash_q values(0,0)", + "drop table crash_q $drop_attr") if ($limits{'constraint_check_named'} eq 'yes'); + report("NULL constraint (SyBase style)","constraint_null", "create table crash_q (a int null)", "drop table crash_q $drop_attr"); @@ -2018,7 +2113,7 @@ $key="safe_decimal_arithmetic"; if (!defined($limits{$key})) { print "$prompt="; - save_incomplete($limit,$prompt); + save_incomplete($key,$prompt); if (!safe_query($server->create("crash_me_a",["a decimal(10,2)","b decimal(10,2)"]))) { print DBI->errstr(); @@ -2045,6 +2140,53 @@ if (!defined($limits{$key})) print "$prompt=$limits{$key} (cached)\n"; } +# Check where is null values in sorted recordset +if (!safe_query($server->create("crash_me_n",["i integer","r integer"]))) + { + print DBI->errstr(); + die "Can't create table 'crash_me_n' $DBI::errstr\n"; + }; +assert("insert into crash_me_n (i) values(1)"); +assert("insert into crash_me_n values(2,2)"); +assert("insert into crash_me_n values(3,3)"); +assert("insert into crash_me_n values(4,4)"); +assert("insert into crash_me_n (i) values(5)"); + +$key = "position_of_null"; +$prompt ="Where is null values in sorted recordset"; +if (!defined($limits{$key})) +{ + save_incomplete($key,$prompt); + print "$prompt="; + $sth=$dbh->prepare("select r from crash_me_n order by r "); + $sth->execute; + $limit= detect_null_position($sth); + $sth->finish; + print "$limit\n"; + save_config_data($key,$limit,$prompt); +} else { + print "$prompt=$limits{$key} (cache)\n"; +} + +$key = "position_of_null_desc"; +$prompt ="Where is null values in sorted recordset (DESC)"; +if (!defined($limits{$key})) +{ + save_incomplete($key,$prompt); + print "$prompt="; + $sth=$dbh->prepare("select r from crash_me_n order by r desc"); + $sth->execute; + $limit= detect_null_position($sth); + $sth->finish; + print "$limit\n"; + save_config_data($key,$limit,$prompt); +} else { + print "$prompt=$limits{$key} (cache)\n"; +} + + +assert("drop table crash_me_n $drop_attr"); + # # End of test @@ -2059,6 +2201,41 @@ $dbh->disconnect || warn $dbh->errstr; save_all_config_data(); exit 0; +# Check where is nulls in the sorted result (for) +# it expects exactly 5 rows in the result + +sub detect_null_position +{ + my $sth = shift; + my ($z,$r1,$r2,$r3,$r4,$r5); + $r1 = $sth->fetchrow_array; + $r2 = $sth->fetchrow_array; + $r3 = $sth->fetchrow_array; + $r4 = $sth->fetchrow_array; + $r5 = $sth->fetchrow_array; + return "first" if ( !defined($r1) && !defined($r2) && defined($r3)); + return "last" if ( !defined($r5) && !defined($r4) && defined($r3)); + return "random"; +} + +sub check_parenthesis { + my $prefix=shift; + my $fn=shift; + my $resultat='no'; + my $param_name=$prefix.lc($fn); + + save_incomplete($param_name,$fn); + if (safe_query("select $fn $end_query") == 1) + { + $resultat="yes"; + } + elsif ( safe_query("select $fn() $end_query") == 1) + { + $resultat="with_parenthesis"; + } + save_config_data($param_name,$resultat,$fn); +} + sub usage { print <rollback; - if ($rc) { - $dbh->{AutoCommit} = 1; + $dbh->rollback; + $dbh->{AutoCommit} = 1; if (safe_query_result($check,"","")) { save_config_data($limit,"yes",$limit); } safe_query($clear); - } else { - $dbh->{AutoCommit} = 1; - save_config_data($limit,"error",$limit); - } } else { save_config_data($limit,"error",$limit); } @@ -2603,6 +2775,39 @@ sub report_trans return $limits{$limit} ne "yes"; } +sub report_rollback +{ + my ($limit,$queries,$check,$clear)=@_; + if (!defined($limits{$limit})) + { + save_incomplete($limit,$prompt); + eval {undef($dbh->{AutoCommit})}; + if (!$@) + { + if (safe_query(\@$queries)) + { + $dbh->rollback; + $dbh->{AutoCommit} = 1; + if (safe_query($check)) { + save_config_data($limit,"no",$limit); + } else { + save_config_data($limit,"yes",$limit); + }; + safe_query($clear); + } else { + save_config_data($limit,"error",$limit); + } + } + else + { + save_config_data($limit,"error",$limit); + } + safe_query($clear); + } + $dbh->{AutoCommit} = 1; + return $limits{$limit} ne "yes"; +} + sub check_and_report { @@ -2929,7 +3134,7 @@ sub read_config_data { if ($key !~ /restart/i) { - $limits{$key}=$limit; + $limits{$key}=$limit eq "null"? undef : $limit; $prompts{$key}=length($prompt) ? substr($prompt,2) : ""; delete $limits{'restart'}; } @@ -2959,7 +3164,8 @@ sub save_config_data return if (defined($limits{$key}) && $limits{$key} eq $limit); if (!defined($limit) || $limit eq "") { - die "Undefined limit for $key\n"; +# die "Undefined limit for $key\n"; + $limit = 'null'; } print CONFIG_FILE "$key=$limit\t# $prompt\n"; $limits{$key}=$limit; @@ -3613,5 +3819,6 @@ sub check_query } + ### TODO: # OID test instead of / in addition to _rowid From 4826ed009186289b1b3f7a39a8bd0076cb85b712 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Nov 2002 18:51:38 -0800 Subject: [PATCH 246/246] =?UTF-8?q?select=5Ftest.c,=20insert=5Ftest.c:=20?= =?UTF-8?q?=20=20Added=20my=5Fglobal.h=20to=20compile=20after=20my=5Flist.?= =?UTF-8?q?h=20is=20added=20to=20mysql.h=20sql=5Fprepare.cc:=20=20=20Handl?= =?UTF-8?q?e=20close=20stmt=20from=20client=20=20=20Minor=20fixups=20to=20?= =?UTF-8?q?make=20SET=20variable=3D=3F=20to=20work=20sql=5Fparse.cc:=20=20?= =?UTF-8?q?=20Added=20missed=20COM=5FCLOSE=5FSTMT=20mysql=5Fpriv.h:=20=20?= =?UTF-8?q?=20Change=20mysql=5Fstmt=5Fclose=20to=20mysql=5Fstmt=5Ffree=20t?= =?UTF-8?q?o=20not=20to=20conflict=20with=20client=20type=20libmysql.c:=20?= =?UTF-8?q?=20=20Clean=20all=20open=20stmts=20during=20mysql=5Fclose()=20i?= =?UTF-8?q?mplicitly?= libmysql/libmysql.c: Clean all open stmts during mysql_close() implicitly sql/mysql_priv.h: Handle close_stmt from client Change mysql_stmt_close to mysql_stmt_free to not to conflict with client type sql/sql_parse.cc: Added missed COM_CLOSE_STMT sql/sql_prepare.cc: Handle close stmt from client Change mysql_stmt_close to mysql_stmt_free to not to conflict with client type Minor fixups to make SET variable=? to work client/insert_test.c: Added my_global.h to compile after my_list.h is added to mysql.h client/select_test.c: Added my_global.h to compile after my_list.h is added to mysql.h --- client/insert_test.c | 1 + client/select_test.c | 1 + include/mysql.h | 9 +++++++-- libmysql/libmysql.c | 43 ++++++++++++++++++++++++++++++++++-------- sql/mysql_priv.h | 2 +- sql/sql_parse.cc | 7 ++++++- sql/sql_prepare.cc | 45 +++++++++++++++++++++++++++----------------- 7 files changed, 79 insertions(+), 29 deletions(-) diff --git a/client/insert_test.c b/client/insert_test.c index 42691df6875..fb4890faf73 100644 --- a/client/insert_test.c +++ b/client/insert_test.c @@ -16,6 +16,7 @@ #include #include +#include #include "mysql.h" #define INSERT_QUERY "insert into test (name,num) values ('item %d', %d)" diff --git a/client/select_test.c b/client/select_test.c index ee2a9192865..d7f18c0f1f0 100644 --- a/client/select_test.c +++ b/client/select_test.c @@ -19,6 +19,7 @@ #endif #include #include +#include "my_global.h" #include "mysql.h" #define SELECT_QUERY "select name from test where num = %d" diff --git a/include/mysql.h b/include/mysql.h index 230c0aad9df..67558e39cdb 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -61,6 +61,8 @@ typedef int my_socket; #define CHECK_EXTRA_ARGUMENTS #endif +#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ + extern unsigned int mysql_port; extern char *mysql_unix_port; @@ -213,6 +215,8 @@ typedef struct st_mysql struct st_mysql* last_used_slave; /* needed for round-robin slave pick */ /* needed for send/read/store/use result to work correctly with replication */ struct st_mysql* last_used_con; + + LIST *stmts; /* list of all statements */ } MYSQL; @@ -457,6 +461,7 @@ typedef struct st_mysql_stmt MYSQL_RES *result; /* resultset */ MYSQL_BIND *bind; /* row binding */ MYSQL_FIELD *fields; /* prepare meta info */ + LIST list; /* list to keep track of all stmts */ char *query; /* query buffer */ MEM_ROOT mem_root; /* root allocations */ MYSQL_RES tmp_result; /* Used by mysql_prepare_result */ @@ -469,8 +474,8 @@ typedef struct st_mysql_stmt char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ my_bool long_alloced; /* flag to indicate long alloced */ my_bool send_types_to_server; /* to indicate types supply to server */ - my_bool param_buffers; /* to indicate the param bound buffers */ - my_bool res_buffers; /* to indicate the result bound buffers */ + my_bool param_buffers; /* to indicate the param bound buffers */ + my_bool res_buffers; /* to indicate the output bound buffers */ } MYSQL_STMT; diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 410be65660f..352ac520fed 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -114,6 +114,7 @@ static my_bool send_file_to_server(MYSQL *mysql,const char *filename); static sig_handler pipe_sig_handler(int sig); static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to, const char *from, ulong length); +static my_bool stmt_close(MYSQL_STMT *stmt, my_bool skip_list); static my_bool org_my_init_done=0; @@ -2436,6 +2437,16 @@ mysql_close(MYSQL *mysql) } mysql->rpl_pivot=0; } + if (mysql->stmts) + { + /* Free any open prepared statements */ + LIST *element, *next_element; + for (element= mysql->stmts; element; element= next_element) + { + next_element= element->next; + stmt_close((MYSQL_STMT *)element->data, 0); + } + } if (mysql != mysql->master) mysql_close(mysql->master); if (mysql->free_me) @@ -3675,18 +3686,20 @@ mysql_prepare(MYSQL *mysql, const char *query, ulong length) } if (simple_command(mysql, COM_PREPARE, query, length, 1)) { - mysql_stmt_close(stmt); + stmt_close(stmt, 1); DBUG_RETURN(0); } init_alloc_root(&stmt->mem_root,8192,0); if (read_prepare_result(mysql, stmt)) { - mysql_stmt_close(stmt); + stmt_close(stmt, 1); DBUG_RETURN(0); } stmt->state= MY_ST_PREPARE; stmt->mysql= mysql; + mysql->stmts= list_add(mysql->stmts, &stmt->list); + stmt->list.data= stmt; DBUG_PRINT("info", ("Parameter count: %ld", stmt->param_count)); DBUG_RETURN(stmt); } @@ -4304,7 +4317,6 @@ my_bool STDCALL mysql_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind) DBUG_RETURN(0); } - /* Fetch row data to bind buffers */ @@ -4387,27 +4399,42 @@ int STDCALL mysql_fetch(MYSQL_STMT *stmt) *********************************************************************/ /* - Close the statement handle by freeing all resources -*/ + Close the statement handle by freeing all alloced resources -my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) + SYNOPSIS + mysql_stmt_close() + stmt Statement handle + skip_list Flag to indicate delete from list or not + RETURN VALUES + 0 ok + 1 error +*/ +static my_bool stmt_close(MYSQL_STMT *stmt, my_bool skip_list) { my_bool error=0; DBUG_ENTER("mysql_stmt_close"); - if (stmt->state != MY_ST_UNKNOWN) + DBUG_ASSERT(stmt != 0); + if (stmt->state == MY_ST_PREPARE || stmt->state == MY_ST_EXECUTE) { char buff[4]; int4store(buff, stmt->stmt_id); - error= simple_command(stmt->mysql, COM_CLOSE_STMT, buff, 4, 0); + error= simple_command(stmt->mysql, COM_CLOSE_STMT, buff, 4, 1); } mysql_free_result(stmt->result); free_root(&stmt->mem_root, MYF(0)); my_free((gptr) stmt->query, MYF(MY_WME | MY_ALLOW_ZERO_PTR)); + if (!skip_list) + stmt->mysql->stmts= list_delete(stmt->mysql->stmts, &stmt->list); my_free((gptr) stmt, MYF(MY_WME)); DBUG_RETURN(error); } +my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) +{ + return stmt_close(stmt, 0); +} + /* Return statement error code */ diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 3ba88d493bd..d8c602d69fb 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -516,7 +516,7 @@ int compare_prep_stmt(void *not_used, PREP_STMT *stmt, ulong *key); void free_prep_stmt(PREP_STMT *stmt, TREE_FREE mode, void *not_used); bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length); void mysql_stmt_execute(THD *thd, char *packet); -void mysql_stm_close(THD *thd, char *packet); +void mysql_stmt_free(THD *thd, char *packet); void mysql_stmt_get_longdata(THD *thd, char *pos, ulong packet_length); int check_insert_fields(THD *thd,TABLE *table,List &fields, List &values, ulong counter); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 263ac50120d..b1bdb3f6d0f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -74,7 +74,7 @@ const char *command_name[]={ "Drop DB", "Refresh", "Shutdown", "Statistics", "Processlist", "Connect","Kill","Debug","Ping","Time","Delayed_insert","Change user", "Binlog Dump","Table Dump", "Connect Out", "Register Slave", - "Prepare", "Prepare Execute", "Long Data" + "Prepare", "Prepare Execute", "Long Data", "Close stmt" }; static char empty_c_string[1]= {0}; // Used for not defined 'db' @@ -1004,6 +1004,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd, mysql_stmt_prepare(thd, packet, packet_length); break; } + case COM_CLOSE_STMT: + { + mysql_stmt_free(thd, packet); + break; + } case COM_QUERY: { if (alloc_query(thd, packet, packet_length)) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 3ec12177778..fcae61d698e 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -20,32 +20,47 @@ This file contains the implementation of prepare and executes. Prepare: - - Server gets the query from client with command 'COM_PREPARE' + - Server gets the query from client with command 'COM_PREPARE'; + in the following format: + [COM_PREPARE:1] [query] - Parse the query and recognize any parameter markers '?' and - store its information list lex->param_list + store its information list in lex->param_list + - Allocate a new statement for this prepare; and keep this in + 'thd->prepared_statements' pool. - Without executing the query, return back to client the total number of parameters along with result-set metadata information - (if any) + (if any) in the following format: + [STMT_ID:4][Columns:2][Param_count:2][Columns meta info][Params meta info] Prepare-execute: - Server gets the command 'COM_EXECUTE' to execute the previously prepared query. If there is any param markers; then client will send the data in the following format: - [null_bits][types_specified(0/1)][[length][data]][[length][data] .. [length][data]. + [COM_EXECUTE:1] + [STMT_ID:4] + [NULL_BITS:(param_count+7)/8)] + [TYPES_SUPPLIED_BY_CLIENT(0/1):1] + [[length]data] + [[length]data] .. [[length]data]. + (Note: Except for string/binary types; all other types will not be + supplied with length field) - Replace the param items with this new data. If it is a first execute or types altered by client; then setup the conversion routines. - Execute the query without re-parsing and send back the results to client Long data handling: + - Server gets the long data in pieces with command type 'COM_LONG_DATA'. - The packet recieved will have the format as: - [COM_LONG_DATA:1][parameter_number:2][type:2][data] + [COM_LONG_DATA:1][STMT_ID:4][parameter_number:2][type:2][data] - Checks if the type is specified by client, and if yes reads the type, and stores the data in that format. - It's up to the client to check for read data ended. The server doesn't - care. + care; and also server doesn't notify to the client that it got the + data or not; if there is any error; then during execute; the error + will be returned ***********************************************************************/ @@ -238,9 +253,9 @@ static void setup_param_str(Item_param *param, uchar **pos) *pos+=len; } -static void setup_param_functions(Item_param *param, uchar read_pos) +static void setup_param_functions(Item_param *param, uchar param_type) { - switch (read_pos) { + switch (param_type) { case FIELD_TYPE_TINY: param->setup_param_func= setup_param_tiny; param->item_result_type = INT_RESULT; @@ -286,7 +301,6 @@ static bool setup_params_data(PREP_STMT *stmt) uchar *pos=(uchar*) thd->net.read_pos+1+MYSQL_STMT_HEADER; //skip header uchar *read_pos= pos+(stmt->param_count+7) / 8; //skip null bits - ulong param_no; if (*read_pos++) //types supplied / first execute { @@ -304,7 +318,7 @@ static bool setup_params_data(PREP_STMT *stmt) } param_iterator.rewind(); } - param_no= 0; + ulong param_no= 0; while ((param= (Item_param *)param_iterator++)) { if (!param->long_data_supplied) @@ -319,7 +333,6 @@ static bool setup_params_data(PREP_STMT *stmt) DBUG_RETURN(0); } - /* Validates insert fields */ @@ -473,7 +486,7 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables, List all_fields(fields); DBUG_ENTER("mysql_test_select_fields"); - if (!(table = open_ltable(thd,tables,tables->lock_type))) + if (!(table = open_ltable(thd,tables,TL_READ))) DBUG_RETURN(1); thd->used_tables=0; // Updated by setup_fields @@ -627,8 +640,8 @@ static bool init_param_items(THD *thd, PREP_STMT *stmt) { DBUG_PRINT("info",("param: %lx", to)); } - return 0; #endif + return 0; } /* @@ -671,7 +684,6 @@ bool mysql_stmt_prepare(THD *thd, char *packet, uint packet_length) stmt.mem_root= thd->mem_root; tree_insert(&thd->prepared_statements, (void *)&stmt, 0, (void *)0); thd->mem_root= thd_root; // restore main mem_root - thd->last_prepared_stmt= &stmt; DBUG_RETURN(0); err: @@ -722,7 +734,6 @@ void mysql_stmt_execute(THD *thd, char *packet) have re-check on setup_* and other things .. */ mysql_execute_command(stmt->thd); - thd->last_prepared_stmt= stmt; if (!(specialflag & SPECIAL_NO_PRIOR)) my_pthread_setprio(pthread_self(), WAIT_PRIOR); @@ -775,11 +786,11 @@ void mysql_stmt_reset(THD *thd, char *packet) Delete a prepared statement from memory */ -void mysql_stmt_close(THD *thd, char *packet) +void mysql_stmt_free(THD *thd, char *packet) { ulong stmt_id= uint4korr(packet); PREP_STMT *stmt; - DBUG_ENTER("mysql_stmt_close"); + DBUG_ENTER("mysql_stmt_free"); if (!(stmt=find_prepared_statement(thd, stmt_id, "close"))) {