From 66137dba9753180085b6f3a74f2c65654b68bf60 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 Nov 2000 23:20:05 +0200 Subject: [PATCH 1/4] Added documentation about perror. Docs/manual.texi: Added documentation about perror --- Docs/manual.texi | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index ee56c5d22ce..179c4b5c27d 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -27725,6 +27725,7 @@ How big a @code{VARCHAR} column can be * mysqldump:: Dumping the structure and data from @strong{MySQL} databases and tables * mysqlimport:: Importing data from text files * mysqlshow:: Showing databases, tables and columns +* perror:: Displaying error messages * myisampack:: The @strong{MySQL} compressed read-only table generator @end menu @@ -28523,7 +28524,7 @@ mysqldump --all-databases > all_databases.sql @cindex files, text @cindex text files, importing @cindex @code{mysqlimport} -@node mysqlimport, mysqlshow, mysqldump, Tools +@node mysqlimport, perror, mysqldump, Tools @section Importing data from text files @code{mysqlimport} provides a command line interface to the @code{LOAD DATA @@ -28660,12 +28661,34 @@ $ mysql -e 'SELECT * FROM imptest' test +------+---------------+ @end example +@cindex error messages, displaying +@cindex perror +@node perror, mysqlshow, mysqlimport, Tools +@section Converting an error code to the corresponding error message + +@code{perror} can be used to print error message(s). @code{perror} can +be invoked like this: + +@example +shell> perror [OPTIONS] [ERRORCODE [ERRORCODE...]] + +For example: + +shell> perror 64 79 +Error code 64: Machine is not on the network +Error code 79: Can not access a needed shared library +@end example + +@code{perror} can be used to display a description for a system error +code, or an MyISAM/ISAM table handler error code. The error messages +are mostly system dependent. + @cindex databases, displaying @cindex displaying, database information @cindex tables, displaying @cindex columns, displaying @cindex showing, database information -@node mysqlshow, myisampack, mysqlimport, Tools +@node mysqlshow, myisampack, perror, Tools @section Showing databases, tables and columns @code{mysqlshow} can be used to quickly look at which databases exist, @@ -32055,6 +32078,12 @@ tmpdir=C:/temp assuming that the @file{c:\\temp} directory exists. @xref{Option files}. +Check also the error code that you get with @code{perror}. One reason +may also be a disk full error; + +shell >perror 28 +Error code 28: No space left on device + @cindex commands out of sync @node Commands out of sync, Ignoring user, Cannot create, Common errors @subsection @code{Commands out of sync} error in client From 0485b9eef5872199d84abcbc1627457c51c60d98 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 Nov 2000 23:34:48 +0200 Subject: [PATCH 2/4] Turn off SCCS flag. mysql-test/chew_on_this/select.res: ***MISSING WEAVE*** From 146b9d78c13640bb7674c9dceb476bfb11b6c7ba Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Nov 2000 04:58:34 +0200 Subject: [PATCH 3/4] FrontBase benchmark --- sql-bench/Comments/FrontBase.benchmark | 59 ++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 sql-bench/Comments/FrontBase.benchmark diff --git a/sql-bench/Comments/FrontBase.benchmark b/sql-bench/Comments/FrontBase.benchmark new file mode 100644 index 00000000000..03386a4d883 --- /dev/null +++ b/sql-bench/Comments/FrontBase.benchmark @@ -0,0 +1,59 @@ +# This file describes how to run benchmarks and crash-me with FrontBase + +Installed components: + +- FrontBase-2.1-8.rpm + (had to run with rpm -i --nodeps; the rpm wanted libreadline.so.4.0, + but only libreadline.so.4.1 was available) + +- DBD-FB-0.03.tar.gz + (perl Makefile.Pl; + make; + make test; + make install;) + +- DBI-1.14.tar.gz + (perl Makefile.Pl; + make; + make test; + make install;) + +- Msql-Mysql-modules-1.2215.tar.gz + (perl Makefile.Pl; + make; + make test; + make install;) + +After installations: + +- cd /etc/rc.d + FBWeb start + FrontBase start + +- cd /usr/local/mysql/sql-bench +- FBExec & +- FrontBase test + +crash-me: + +There were a lot of troubles running the crash-me; FrontBase core +dumped several tens of times while crash-me was trying to determine +the maximum values in different areas. + +The crash-me program itself was also needed to be tuned quite a lot +for FB. There were also some bugs/lacking features in the crash-me +program, which are now fixed to the new version. + +After we finally got the limits, we runned the benchmarks. + +benchmarks: + +Problems again. Frontbase core dumped with every part of the +benchmark (8/8) tests. After a lot of fine-tuning we got the +benchmarks to run through. The maximum values had to be dropped +down a lot in many of the tests. + +The benchmarks were run with the following command: + +perl run-all-tests --server=frontbase --host=prima +--cmp=frontbase,mysql --tcpip --log From 034e028d008f015643b530b03e29760801f89d3a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 7 Dec 2000 14:17:07 +0200 Subject: [PATCH 4/4] Bug fix, max_heap_table_size variable was not used. Docs/manual.texi: Bug fix with HEAP type tables. --- Docs/manual.texi | 5 +++++ sql/ha_heap.cc | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index 9d33130549b..578cea9b571 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -38935,6 +38935,11 @@ though, so Version 3.23 is not released as a stable version yet. @appendixsubsec Changes in release 3.23.29 @itemize @bullet @item +Fixed a bug with @code{HEAP} type tables; the variable +@code{max_heap_table_size} wasn't used. Now either @code{MAX_ROWS} or +@code[max_heap_table_size} can be used to limit the size of a @code{HEAP} +type table. +@item Applied patches for OS2 by @code{Yuri Dario}. @item @code{FLUSH TABLES table_name} didn't always flush table properly to diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index b4b0c4b677e..0a8f55bc5bb 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -33,7 +33,8 @@ const char **ha_heap::bas_ext() const int ha_heap::open(const char *name, int mode, uint test_if_locked) { - uint key,part,parts; + uint key,part,parts,mem_per_row=0; + ulong max_rows; HP_KEYDEF *keydef; HP_KEYSEG *seg; @@ -47,7 +48,8 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) for (key=0 ; key < table->keys ; key++) { KEY *pos=table->key_info+key; - + mem_per_row += (pos->key_length + (sizeof(char*) * 2)); + keydef[key].keysegs=(uint) pos->key_parts; keydef[key].flag = (pos->flags & HA_NOSAME); keydef[key].seg=seg; @@ -66,9 +68,13 @@ int ha_heap::open(const char *name, int mode, uint test_if_locked) seg++; } } + mem_per_row += MY_ALIGN(table->reclength+1, sizeof(char*)); + max_rows = (ulong) (max_heap_table_size / mem_per_row); file=heap_open(table->path,mode, table->keys,keydef, - table->reclength,table->max_rows, + table->reclength, + ((table->max_rows < max_rows && table->max_rows) ? + table->max_rows : max_rows), table->min_rows); my_free((gptr) keydef,MYF(0)); info(HA_STATUS_NO_LOCK | HA_STATUS_CONST | HA_STATUS_VARIABLE);