From f3f84ed8a08a7c19442cdbacc9c23fbc5d38323b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 9 Oct 2005 23:05:44 +0400 Subject: [PATCH 01/16] Fix bug#7672 Unknown column error in order clause When fixing Item_func_plus in ORDER BY clause field c is searched in all opened tables, but because c is an alias it wasn't found there. This patch adds a flag to select_lex which allows Item_field::fix_fields() to look up in select's item_list to find aliased fields. sql/item.cc: Fix bug#7672 Unknown column error in order clause When fixing fields in ORDER BY clause allow Item_field::fix_fields() to look up items in select's item list to find aliased fields. sql/sql_lex.cc: Fix bug#7672 Unknown column error in order clause sql/sql_lex.h: Fix bug#7672 Unknown column error in order clause Added flag to select_lex allowing Item_field::fix_fields to look up items in select's item list. sql/sql_select.cc: Fix bug#7672 Unknown column error in order clause mysql-test/t/select.test: Test case for bug#7672 Unknown column error in order clause mysql-test/r/select.result: Test case for bug#7672 Unknown column error in order clause --- mysql-test/r/select.result | 10 ++++++++++ mysql-test/t/select.test | 9 +++++++++ sql/item.cc | 11 +++++++++++ sql/sql_lex.cc | 1 + sql/sql_lex.h | 2 +- sql/sql_select.cc | 6 ++++++ 6 files changed, 38 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 3c7a74c0c57..299e0b6bf33 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2431,3 +2431,13 @@ AND FK_firma_id = 2; COUNT(*) 0 drop table t1; +CREATE TABLE t1 (a INT, b INT); +(SELECT a, b AS c FROM t1) ORDER BY c+1; +a c +(SELECT a, b AS c FROM t1) ORDER BY b+1; +a c +SELECT a, b AS c FROM t1 ORDER BY c+1; +a c +SELECT a, b AS c FROM t1 ORDER BY b+1; +a c +drop table t1; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 6626397e9e5..2adf4f1749c 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -1983,3 +1983,12 @@ AND FK_firma_id = 2; drop table t1; +# +# Bug 7672 Unknown column error in order clause +# +CREATE TABLE t1 (a INT, b INT); +(SELECT a, b AS c FROM t1) ORDER BY c+1; +(SELECT a, b AS c FROM t1) ORDER BY b+1; +SELECT a, b AS c FROM t1 ORDER BY c+1; +SELECT a, b AS c FROM t1 ORDER BY b+1; +drop table t1; diff --git a/sql/item.cc b/sql/item.cc index 8737cc06bbd..c3845db904c 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -348,7 +348,18 @@ bool Item_field::fix_fields(THD *thd,TABLE_LIST *tables) { Field *tmp; if (!(tmp=find_field_in_tables(thd,this,tables))) + { + if (thd->lex.select_lex.is_item_list_lookup) + { + Item** res= find_item_in_list(this, thd->lex.select_lex.item_list); + if (res && *res && (*res)->type() == Item::FIELD_ITEM) + { + set_field((*((Item_field**)res))->field); + return 0; + } + } return 1; + } set_field(tmp); } else if (thd && thd->set_query_id && field->query_id != thd->query_id) diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 20aacf42be0..9fb35e3f914 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->slave_thd_opt=0; lex->sql_command=SQLCOM_END; bzero((char *)&lex->mi,sizeof(lex->mi)); + lex->select_lex.is_item_list_lookup= 0; return lex; } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index ab78555262f..d4b20c69bf2 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -121,7 +121,7 @@ typedef struct st_select_lex ignore_index, *ignore_index_ptr; List ftfunc_list; uint in_sum_expr, sort_default; - bool create_refs, braces; + bool create_refs, braces, is_item_list_lookup; st_select_lex *next; } SELECT_LEX; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 29c15741347..5292a1fc0e0 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6845,8 +6845,14 @@ find_order_in_list(THD *thd,TABLE_LIST *tables,ORDER *order,List &fields, return 0; } order->in_field_list=0; + /* Allow lookup in select's item_list to find aliased fields */ + thd->lex.select_lex.is_item_list_lookup= 1; if ((*order->item)->fix_fields(thd,tables) || thd->fatal_error) + { + thd->lex.select_lex.is_item_list_lookup= 0; return 1; // Wrong field + } + thd->lex.select_lex.is_item_list_lookup= 0; all_fields.push_front(*order->item); // Add new field to field list order->item=(Item**) all_fields.head_ref(); return 0; From 28dffbcd6683b351c71d5e11f2c89d8b013b599b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 11 Oct 2005 21:16:08 +0200 Subject: [PATCH 02/16] - added Docs/manual.chm to the windows source distribution (BUG#13899) scripts/make_win_src_distribution.sh: - added Docs/manual.chm to the windows source distribution (BUG#13899). The file is placed in there by the Bootstrap script, which pulls it from the mysqldoc repository --- scripts/make_win_src_distribution.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index 0800fec1ac6..f863e5385d4 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -275,7 +275,7 @@ cd $SOURCE for i in COPYING ChangeLog README EXCEPTIONS-CLIENT\ INSTALL-SOURCE INSTALL-WIN \ INSTALL-WIN-SOURCE \ - Docs/INSTALL-BINARY + Docs/INSTALL-BINARY Docs/manual.chm do print_debug "Copying file '$i'" From 6c89848de9f3bedf0a1d5e6721f9c88959a9f9b4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Oct 2005 18:50:25 +0500 Subject: [PATCH 03/16] memcpy_overlap() removed, as 1. it's wrong to use memcpy() for overlapped areas; 2. we use it only once. During merge to 4.1 will remove a memcpy_overlap() call from strings/ctype-tis620.c as well in order to fix bug #10836: ctype_tis620 test failure with ICC-compiled binaries on IA64. myisam/mi_search.c: use memmove() instead, as memcpy_overlap() is removed. --- include/m_string.h | 10 ---------- myisam/mi_search.c | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/m_string.h b/include/m_string.h index 419e70d93bf..f081c966fac 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -119,16 +119,6 @@ extern void bmove_allign(gptr dst,const gptr src,uint len); #define bmove512(A,B,C) memcpy(A,B,C) #endif -#ifdef HAVE_purify -#include -#define memcpy_overlap(A,B,C) \ -DBUG_ASSERT((A) <= (B) || ((B)+(C)) <= (A)); \ -bmove((byte*) key,(byte*) from,(size_t) length); -#else -#define memcpy_overlap(A,B,C) memcpy((A), (B), (C)) -#endif /* HAVE_purify */ - - /* Prototypes for string functions */ #if !defined(bfill) && !defined(HAVE_BFILL) diff --git a/myisam/mi_search.c b/myisam/mi_search.c index c0be1a427df..3d16a70d70b 100644 --- a/myisam/mi_search.c +++ b/myisam/mi_search.c @@ -1306,7 +1306,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, } DBUG_PRINT("info",("key: %p from: %p length: %u", key, from, length)); - memcpy_overlap((byte*) key, (byte*) from, (size_t) length); + memmove((byte*) key, (byte*) from, (size_t) length); key+=length; from+=length; } From 2e887f794a846c8463e5fa6a5098a390d5c25d1a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Oct 2005 19:23:52 +0500 Subject: [PATCH 04/16] Fix for bug #3874 (Group by field is not considered) mysql-test/r/select.result: test result fixed mysql-test/t/select.test: test case added sql/sql_select.cc: do the same for nullable --- mysql-test/r/select.result | 36 ++++++++++++++++++++++++++++++++++++ mysql-test/t/select.test | 21 +++++++++++++++++++++ sql/sql_select.cc | 2 +- 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 299e0b6bf33..11a50d6cabc 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2441,3 +2441,39 @@ a c SELECT a, b AS c FROM t1 ORDER BY b+1; a c drop table t1; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, UNIQUE idx (a,b) ); +INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4); +CREATE TABLE t2 ( a INT NOT NULL, b INT NOT NULL, c INT ); +INSERT INTO t2 VALUES ( 1,10,1), (1,10,2), (1,11,1), (1,11,2), (1,2,1), (1,2,2), +(1,2,3); +SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2 LEFT JOIN +t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY a, b, c; +a b c d +1 2 1 1 +1 2 2 1 +1 2 3 1 +1 10 2 +1 11 2 +SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2 LEFT JOIN +t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY t1.a, t1.b, c; +a b c d +1 10 4 +1 2 1 1 +1 2 2 1 +1 2 3 1 +SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2 LEFT JOIN +t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY t2.a, t2.b, c; +a b c d +1 2 1 1 +1 2 2 1 +1 2 3 1 +1 10 2 +1 11 2 +SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2,t1 +WHERE t2.a = t1.a AND t2.b = t1.b GROUP BY a, b, c; +a b c d +1 2 1 1 +1 2 2 1 +1 2 3 1 +DROP TABLE IF EXISTS t1, t2; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 2adf4f1749c..2607a00bed4 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -1992,3 +1992,24 @@ CREATE TABLE t1 (a INT, b INT); SELECT a, b AS c FROM t1 ORDER BY c+1; SELECT a, b AS c FROM t1 ORDER BY b+1; drop table t1; + +# +# Bug #3874 (function in GROUP and LEFT JOIN) +# + +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, UNIQUE idx (a,b) ); +INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4); +CREATE TABLE t2 ( a INT NOT NULL, b INT NOT NULL, c INT ); +INSERT INTO t2 VALUES ( 1,10,1), (1,10,2), (1,11,1), (1,11,2), (1,2,1), (1,2,2), + (1,2,3); +SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2 LEFT JOIN +t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY a, b, c; +SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2 LEFT JOIN +t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY t1.a, t1.b, c; +SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2 LEFT JOIN +t1 ON t2.a = t1.a AND t2.b = t1.b GROUP BY t2.a, t2.b, c; +SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2,t1 +WHERE t2.a = t1.a AND t2.b = t1.b GROUP BY a, b, c; +DROP TABLE IF EXISTS t1, t2; + diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 5292a1fc0e0..7c2c233d754 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3115,7 +3115,7 @@ eq_ref_table(JOIN *join, ORDER *start_order, JOIN_TAB *tab) tab->cached_eq_ref_table=1; if (tab->type == JT_CONST) // We can skip const tables return (tab->eq_ref_table=1); /* purecov: inspected */ - if (tab->type != JT_EQ_REF) + if (tab->type != JT_EQ_REF || tab->table->maybe_null) return (tab->eq_ref_table=0); // We must use this Item **ref_item=tab->ref.items; Item **end=ref_item+tab->ref.key_parts; From d853ecd67c10a0ed59d203ee75a09341fe80dbac Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Oct 2005 17:41:55 +0300 Subject: [PATCH 05/16] Review of new pushed code - No need to check *ref when ref is checked (Simple optimization fix) sql/item.cc: No need to check *ref --- sql/item.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index c3845db904c..38b6516b742 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -351,8 +351,8 @@ bool Item_field::fix_fields(THD *thd,TABLE_LIST *tables) { if (thd->lex.select_lex.is_item_list_lookup) { - Item** res= find_item_in_list(this, thd->lex.select_lex.item_list); - if (res && *res && (*res)->type() == Item::FIELD_ITEM) + Item **res= find_item_in_list(this, thd->lex.select_lex.item_list); + if (res && (*res)->type() == Item::FIELD_ITEM) { set_field((*((Item_field**)res))->field); return 0; From 124b0a594c0082ebd2fd59ef2e3ac64a2b0468ae Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Oct 2005 22:10:54 +0200 Subject: [PATCH 06/16] - added a usermod call in the postinstall section of the RPM spec file to assign a potential existing mysql user to the correct user group (BUG#12823) support-files/mysql.spec.sh: - added a usermod call to assign a potential existing mysql user to the correct user group (BUG#12823) --- support-files/mysql.spec.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 6104b7a4882..16845aa4be7 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -2,6 +2,7 @@ %define release 0 %define license GPL %define mysqld_user mysql +%define mysqld_group mysql %define server_suffix -standard %define mysqldatadir /var/lib/mysql @@ -371,18 +372,20 @@ fi # Create a MySQL user and group. Do not report any problems if it already # exists. -groupadd -r %{mysqld_user} 2> /dev/null || true -useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g %{mysqld_user} %{mysqld_user} 2> /dev/null || true +groupadd -r %{mysqld_group} 2> /dev/null || true +useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true +# The user may already exist, make sure it has the proper group nevertheless (BUG#12823) +usermod -g %{mysqld_group} %{mysqld_user} 2> /dev/null || true # Change permissions so that the user that will run the MySQL daemon # owns all database files. -chown -R %{mysqld_user}:%{mysqld_user} $mysql_datadir +chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir # Initiate databases %{_bindir}/mysql_install_db -IN-RPM --user=%{mysqld_user} # Change permissions again to fix any new files. -chown -R %{mysqld_user}:%{mysqld_user} $mysql_datadir +chown -R %{mysqld_user}:%{mysqld_group} $mysql_datadir # Fix permissions for the permission database so that only the user # can read them. @@ -562,6 +565,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Thu Oct 13 2005 Lenz Grimmer + +- added a usermod call to assign a potential existing mysql user to the + correct user group (BUG#12823) * Thu Sep 29 2005 Lenz Grimmer - fixed the removing of the RPM_BUILD_ROOT in the %clean section (the From 0390de8672255aed7d35734fa8bc0d87efbe532e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Oct 2005 01:22:24 +0400 Subject: [PATCH 07/16] Fix bug #13855 select distinct with group by caused server crash DISTINCT wasn't optimized away and caused creation of tmp table in wrong case. This result in integer overrun and running out of memory. Fix backported from 4.1. Now if optimizer founds that in result be only 1 row it removes distinct. sql/sql_select.cc: Fix bug #13855 select distinct with group by caused server crash mysql-test/r/select.result: Test case for bug#13855 select distinct with group by caused server crash mysql-test/t/select.test: Test case for bug#13855 select distinct with group by caused server crash --- mysql-test/r/select.result | 8 ++++++++ mysql-test/t/select.test | 9 +++++++++ sql/sql_select.cc | 1 + 3 files changed, 18 insertions(+) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 11a50d6cabc..98d474821c9 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2477,3 +2477,11 @@ a b c d 1 2 2 1 1 2 3 1 DROP TABLE IF EXISTS t1, t2; +create table t1 (f1 int primary key, f2 int); +create table t2 (f3 int, f4 int, primary key(f3,f4)); +insert into t1 values (1,1); +insert into t2 values (1,1),(1,2); +select distinct count(f2) >0 from t1 left join t2 on f1=f3 group by f1; +count(f2) >0 +1 +drop table t1,t2; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 2607a00bed4..984b467d435 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -2013,3 +2013,12 @@ SELECT t2.a, t2.b, IF(t1.b IS NULL,'',c) AS c, COUNT(*) AS d FROM t2,t1 WHERE t2.a = t1.a AND t2.b = t1.b GROUP BY a, b, c; DROP TABLE IF EXISTS t1, t2; +# +# Bug #13855 select distinct with group by caused server crash +# +create table t1 (f1 int primary key, f2 int); +create table t2 (f3 int, f4 int, primary key(f3,f4)); +insert into t1 values (1,1); +insert into t2 values (1,1),(1,2); +select distinct count(f2) >0 from t1 left join t2 on f1=f3 group by f1; +drop table t1,t2; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 7c2c233d754..46f0139a608 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -626,6 +626,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List &fields,COND *conds, { order=0; // The output has only one row simple_order=1; + select_distinct= 0; // No need in distinct for 1 row } calc_group_buffer(&join,group); From e17b176e9b9a2589a54e972bdede1138937317cc Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Oct 2005 02:27:55 +0200 Subject: [PATCH 08/16] Makefile.am: Option to set environment variable MTR_BUILD_THREAD to a small number, from what mysql-test-run calculate port numbers that will not conflict with other runs with different thread num Makefile.am: Option to set environment variable MTR_BUILD_THREAD to a small number, from what mysql-test-run calculate port numbers that will not conflict with other runs with different thread num --- Makefile.am | 17 ++++++++--------- mysql-test/mysql-test-run.sh | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index be2d34f8db8..35c5a51caf4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -85,15 +85,14 @@ tags: support-files/build-tags .PHONY: init-db bin-dist -# Test installation. Ports are configurable from the environment. - -MYSQL_TEST_MANAGER_PORT = 9305 -MYSQL_TEST_MASTER_PORT = 9306 -MYSQL_TEST_SLAVE_PORT = 9308 +# Target 'test' will run the regression test suite using the built server. +# +# If you are running in a shared environment, users can avoid clashing +# port numbers by setting individual small numbers 1-100 to the +# environment variable MTR_BUILD_THREAD. The script "mysql-test-run" +# will then calculate the various port numbers it needs from this, +# making sure each user use different ports. test: cd mysql-test ; \ - ./mysql-test-run \ - --manager-port=$(MYSQL_TEST_MANAGER_PORT) \ - --master_port=$(MYSQL_TEST_MASTER_PORT) \ - --slave_port=$(MYSQL_TEST_SLAVE_PORT) + ./mysql-test-run diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index b760309bb5b..9a2c4345bae 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -201,6 +201,23 @@ MYSQL_MANAGER_PORT=9305 # needs to be out of the way of slaves MYSQL_MANAGER_PW_FILE=$MYSQL_TEST_DIR/var/tmp/manager.pwd MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log MYSQL_MANAGER_USER=root + +# +# To make it easier for different devs to work on the same host, +# an environment variable can be used to control all ports. A small +# number is to be used, 0 - 16 or similar. +# +if [ -n "$MTR_BUILD_THREAD" ] ; then + MASTER_MYPORT=`expr $MTR_BUILD_THREAD '*' 40 + 8120` + SLAVE_MYPORT=`expr $MASTER_MYPORT + 16` + MYSQL_MANAGER_PORT=`expr $MASTER_MYPORT + 2` + + echo "Using MTR_BUILD_THREAD = $MTR_BUILD_THREAD" + echo "Using MASTER_MYPORT = $MASTER_MYPORT" + echo "Using MYSQL_MANAGER_PORT = $MYSQL_MANAGER_PORT" + echo "Using SLAVE_MYPORT = $SLAVE_MYPORT" +fi + NO_SLAVE=0 USER_TEST= FAILED_CASES= From a345629ac699f718a5494afe2ea9e64bffdf3723 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Oct 2005 16:56:25 +0300 Subject: [PATCH 09/16] Imported fixes from 4.1 and 5.0 to 4.0. --- include/config-netware.h | 4 ++++ netware/mysql_test_run.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/config-netware.h b/include/config-netware.h index 578975a1cea..310c9bb7db8 100644 --- a/include/config-netware.h +++ b/include/config-netware.h @@ -45,6 +45,7 @@ extern "C" { #undef HAVE_SCHED_H #undef HAVE_SYS_MMAN_H #undef HAVE_SYNCH_H +#undef HAVE_RINT #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 #define HAVE_PTHREAD_SIGMASK 1 #define HAVE_PTHREAD_YIELD_ZERO_ARG 1 @@ -91,6 +92,9 @@ extern "C" { /* On NetWare, stack grows towards lower address*/ #define STACK_DIRECTION -1 +/* On NetWare, to fix the problem with the deletion of open files */ +#define CANT_DELETE_OPEN_FILES 1 + /* default directory information */ #define DEFAULT_MYSQL_HOME "sys:/mysql" #define PACKAGE "mysql" diff --git a/netware/mysql_test_run.c b/netware/mysql_test_run.c index 28fbe34993d..e8d4c09bc16 100644 --- a/netware/mysql_test_run.c +++ b/netware/mysql_test_run.c @@ -173,7 +173,7 @@ void report_stats() mtr_log("\nFailed %u/%u test(s), %.02f%% successful.\n", total_fail, total_test, percent); mtr_log("\nThe .out and .err files in %s may give you some\n", result_dir); - mtr_log("hint of what when wrong.\n"); + mtr_log("hint of what went wrong.\n"); mtr_log("\nIf you want to report this error, please first read the documentation\n"); mtr_log("at: http://www.mysql.com/doc/M/y/MySQL_test_suite.html\n"); } From 0ffe070cee102534e59be45edffb92de0dd73acc Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Oct 2005 14:51:58 +0200 Subject: [PATCH 10/16] - Removed obsolete and outdated man page files from the man directory - these files are now maintained in the mysqldoc repository and included in the source distribution during the release build. Updated the configure.in script and Makefiles to create the man page file list at build time - Updated the file list in the RPM spec file to include all currently available man pages (this can not be done with wildcards, as the man pages are spread across several subpackages. However, RPM warns about unpackaged files, so newly added man pages can be spotted) BitKeeper/deleted/.del-isamchk.1.in~9d44303f6d951962: Delete: man/isamchk.1.in BitKeeper/deleted/.del-isamlog.1.in~416d91adbf665b19: Delete: man/isamlog.1.in BitKeeper/deleted/.del-mysql.1.in~3f4dbf65d31fea3a: Delete: man/mysql.1.in BitKeeper/deleted/.del-mysqlaccess.1.in~2adf98feb44a0dbf: Delete: man/mysqlaccess.1.in BitKeeper/deleted/.del-mysqladmin.1.in~81703c6092a1f769: Delete: man/mysqladmin.1.in BitKeeper/deleted/.del-mysqld.1.in~42371a82eb27d87c: Delete: man/mysqld.1.in BitKeeper/deleted/.del-mysqld_multi.1.in~b3f1c5343b8481e6: Delete: man/mysqld_multi.1.in BitKeeper/deleted/.del-mysqld_safe.1.in~6f34e14acc0c5e0b: Delete: man/mysqld_safe.1.in BitKeeper/deleted/.del-mysqldump.1.in~9520980bfec710d5: Delete: man/mysqldump.1.in BitKeeper/deleted/.del-mysql_fix_privilege_tables.1.in~7422405bb0e64325: Delete: man/mysql_fix_privilege_tables.1.in BitKeeper/deleted/.del-mysql_zap.1.in~df5cf8089b50c624: Delete: man/mysql_zap.1.in BitKeeper/deleted/.del-mysqlshow.1.in~81ce953dcc1a282f: Delete: man/mysqlshow.1.in BitKeeper/deleted/.del-perror.1.in~60d1efcbe71bdd9c: Delete: man/perror.1.in BitKeeper/deleted/.del-replace.1.in~e92dc1aea682608c: Delete: man/replace.1.in configure.in: - dynamically add man pages included in the man directory (the BK tree only contains one dummy file, the directory is populated by the Bootstrap script by copying current man pages from the documentation server) man/Makefile.am: - removed hard-coded list of man pages, the list is populated during the configure stage. When building from BK, only one placeholder file exists. For the release builds, this directory is populated by the Bootstrap script, which takes man page files from the documentation server. man/mysqlman.1: - removed version number support-files/mysql.spec.sh: - adjusted file list: added man pages that are now part of the official source distribution (taken from the documentation server) --- configure.in | 4 + man/Makefile.am | 26 +-- man/isamchk.1.in | 145 --------------- man/isamlog.1.in | 107 ----------- man/mysql.1.in | 160 ---------------- man/mysql_fix_privilege_tables.1.in | 40 ---- man/mysql_zap.1.in | 52 ------ man/mysqlaccess.1.in | 125 ------------- man/mysqladmin.1.in | 209 --------------------- man/mysqld.1.in | 234 ----------------------- man/mysqld_multi.1.in | 94 ---------- man/mysqld_safe.1.in | 91 --------- man/mysqldump.1.in | 279 ---------------------------- man/{mysqlman.1.in => mysqlman.1} | 2 +- man/mysqlshow.1.in | 98 ---------- man/perror.1.in | 58 ------ man/replace.1.in | 73 -------- support-files/mysql.spec.sh | 34 +++- 18 files changed, 32 insertions(+), 1799 deletions(-) delete mode 100644 man/isamchk.1.in delete mode 100644 man/isamlog.1.in delete mode 100644 man/mysql.1.in delete mode 100644 man/mysql_fix_privilege_tables.1.in delete mode 100644 man/mysql_zap.1.in delete mode 100644 man/mysqlaccess.1.in delete mode 100644 man/mysqladmin.1.in delete mode 100644 man/mysqld.1.in delete mode 100644 man/mysqld_multi.1.in delete mode 100644 man/mysqld_safe.1.in delete mode 100644 man/mysqldump.1.in rename man/{mysqlman.1.in => mysqlman.1} (89%) delete mode 100644 man/mysqlshow.1.in delete mode 100644 man/perror.1.in delete mode 100644 man/replace.1.in diff --git a/configure.in b/configure.in index b893a234dc7..df4b0fbd5af 100644 --- a/configure.in +++ b/configure.in @@ -2202,10 +2202,14 @@ AC_ARG_WITH(man, if test "$with_man" = "yes" then man_dirs="man" + man1_files=`ls -1 $srcdir/man/*.1 | sed -e 's;^.*man/;;'` + man1_files=`echo $man1_files` else man_dirs="" + man1_files="" fi AC_SUBST(man_dirs) +AC_SUBST(man1_files) # Shall we build the bench code? AC_ARG_WITH(bench, diff --git a/man/Makefile.am b/man/Makefile.am index 539c43dfed6..9702c4b2ace 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -17,30 +17,8 @@ ## Process this file with automake to create Makefile.in -man_MANS = mysql.1 isamchk.1 isamlog.1 mysql_zap.1 mysqlaccess.1 \ - mysqladmin.1 mysqld.1 mysqld_multi.1 mysqldump.1 mysqlshow.1 \ - perror.1 replace.1 mysqld_safe.1 mysql_fix_privilege_tables.1 - -EXTRA_DIST = mysql.1.in isamchk.1.in isamlog.1.in mysql_zap.1.in \ - mysqlaccess.1.in mysqladmin.1.in mysqld.1.in mysqld_multi.1.in \ - mysqldump.1.in mysqlshow.1.in perror.1.in replace.1.in mysqlman.1.in \ - mysqld_safe.1.in mysql_fix_privilege_tables.1.in - -CLEANFILES = $(man_MANS) - -SUFFIXES = .in - -.in: - @RM@ -f $@ $@-t - @SED@ \ - -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ - -e 's!@''sysconfdir''@!@sysconfdir@!' \ - -e 's!@''bindir''@!$(bindir)!g' \ - -e 's!@''libexecdir''@!$(libexecdir)!g' \ - -e 's!@''localstatedir''@!$(localstatedir)!g' \ - -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ - $< > $@-t - @MV@ $@-t $@ +man1_MANS = @man1_files@ +EXTRA_DIST = $(man1_MANS) # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/man/isamchk.1.in b/man/isamchk.1.in deleted file mode 100644 index d908e8af3ee..00000000000 --- a/man/isamchk.1.in +++ /dev/null @@ -1,145 +0,0 @@ -.TH isamchk 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -.BR isamchk - \- Description, check and repair of ISAM tables. -Used without options all tables on the command will be checked for errors -.SH USAGE -isamchk [OPTIONS] tables[.ISM] -.SH SYNOPSIS -.B isamchk -.RB [ \-a | \-\-analyze ] -.RB [ \-# | \-\-debug=... ] -.RB [ \-\-character\-sets\-dir=...] -.RB [ \-C | \-\-default\-character\-set=...] -.RB [ \-d | \-\-description ] -.RB [ \-e | \-\-extend\-check ] -.RB [ \-f | \-\-force ] -.RB [ \-? | \-\-help ] -.RB [ \-i | \-\-information ] -.RB [ \-k | \-\-keys\-used=# ] -.RB [ \-l | \-\-no\-symlinks] -.RB [ \-q | \-\-quick ] -.RB [ \-r | \-\-recover ] -.RB [ \-o | \-\-safe\-recover ] -.RB [ \-O | "\-\-set\-variable var=option"] -.RB [ \-s | \-\-silent ] -.RB [ \-S | \-\-sort\-index ] -.RB [ \-R | \-\-sort\-records=#] -.RB [ \-u | \-\-unpack ] -.RB [ \-v | \-\-verbose ] -.RB [ \-V | \-\-version ] -.RB [ \-w | \-\-wait ] -.SH DESCRIPTION -.TP -.BR \-a | \-\-analyze -Analyze distribution of keys. Will make some joins in -MySQL faster. -.TP -.BR \-# | \-\-debug=... -Output debug log. Often this is 'd:t:o ,filename` -.TP -.BR \-\-character\-sets\-dir=... -Directory where character sets are -.TP -.BR \-C | \-\-default\-character\-set=... -Set the default character set -.TP -.BR \-d | \-\-description -Prints some information about table. -.TP -.BR \-e | \-\-extend\-check -Check the table VERY thoroughly. One need use this -only in extreme cases as isamchk should normally find -all errors even without this switch -.TP -.BR \-f | \-\-force -Overwrite old temporary files. -If one uses \-f when checking tables (running isamchk -without \-r), isamchk will automatically restart with -\-r on any wrong table. -.TP -.BR \-? | \-\-help -Display help and exit. -.TP -.BR \-i | \-\-information -Print statistics information about the table -.TP -.BR \-k | \-\-keys\-used=# -Used with '\-r'. Tell ISAM to update only the first -# keys. This can be used to get faster inserts! -.TP -.BR \-l | \-\-no\-symlinks -Do not follow symbolic links when repairing. Normally -isamchk repairs the table a symlink points at. -.TP -.BR \-q | \-\-quick -Used with \-r to get a faster repair. (The data file -isn't touched.) One can give a second '\-q' to force -isamchk to modify the original datafile. -.TP -.BR \-r | \-\-recover -Can fix almost anything except unique keys that aren't -unique. -.TP -.BR \-o | \-\-safe\-recover -Uses old recovery method; slower than '\-r' but can -handle a couple of cases that '\-r' cannot handle. -.TP -.BR \-O | " \-\-set\-variable var=option " -Change the value of a variable. -.TP -.BR \-s | \-\-silent -Only print errors. One can use two \-s to make isamchk -very silent -.TP -.BR \-S | \-\-sort\-index -Sort index blocks. This speeds up 'read\-next' in -applications -.TP -.BR \-R | \-\-sort\-records=# -Sort records according to an index. This makes your -data much more localized and may speed up things -(It may be VERY slow to do a sort the first time!) -.TP -.BR \-u | \-\-unpack -Unpack file packed with pack_isam. -.TP -.BR \-v | \-\-verbose -Print more information. This can be used with -\-d and \-e. Use many \-v for more verbosity! -.TP -.BR \-V | \-\-version -Print version and exit. -.TP -.BR \-w | \-\-wait -Wait if table is locked. -.SH "SEE ALSO" -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill\-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - -.\" end of man page diff --git a/man/isamlog.1.in b/man/isamlog.1.in deleted file mode 100644 index 5f69e70297a..00000000000 --- a/man/isamlog.1.in +++ /dev/null @@ -1,107 +0,0 @@ -.TH isamlog 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -isamlog - Write info about whats in a nisam log file. -.SH USAGE -isamlog [-?iruvIV] [-c #] [-f #] [-F filepath/] [-o #] [-R file recordpos] [-w write_file] [log-filename [table ...]] -.SH SYNOPSIS -.B isamlog -.RB [ -? | -I ] -.RB [ -V ] -.RB [ -c ] -.RB [ -f ] -.RB [ -F ] -.RB [ -i ] -.RB [ -o ] -.RB [ "-p #" ] -.RB [ -r ] -.RB [ -R ] -.RB [ -u ] -.RB [ -v ] -.RB [ -w ] -.SH DESCRIPTION -.TP -.BR isamlog -.TP -.BR -? | -I -info -.TP -.BR -V -version -.TP -.BR -c -do only # commands -.TP -.BR -f -max open files -.TP -.BR -F -file path -.TP -.BR -i -extra info -.TP -.BR -o -offset -.TP -.BR "-p #" -remove # components from path -.TP -.BR -r -recover -.TP -.BR -R -file recordposition -.TP -.BR -u -update -.TP -.BR -v -verbose -.TP -.BR -w -write file -.SH NOTE -If no file name is given isam.log is used -One can give a second and a third '-v' for more verbose. -Normaly one does a update (-u). -If a recover is done all writes and all possibly updates and deletes is done -and errors are only counted. -If one gives table names as arguments only these tables will be updated - - - -.SH "SEE ALSO" -isamchk(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. - -.SH AUTHOR - -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - - -.\" end of man page - - diff --git a/man/mysql.1.in b/man/mysql.1.in deleted file mode 100644 index c4463aa658b..00000000000 --- a/man/mysql.1.in +++ /dev/null @@ -1,160 +0,0 @@ -.TH mysql 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -mysql \- text-based client for mysqld, a SQL-based relational database daemon -.SH USAGE -mysql [OPTIONS] [Database] -.SH SYNOPSIS -.B mysql -.RB [ \-B | \-\-batch ] -.RB [ \-# | \-\-debug= -.IR logfile ] -.RB [ \-T | \-\-debug-info ] -.RB [ \-e | \-\-exec= -.IR command ] -.RB [ \-f | \-\-force ] -.RB [ \-? | \-\-help ] -.RB [ \-h | \-\-host= -.IR hostname ] -.RB [ \-n | \-\-unbuffered ] -.RB [ \-p[pwd] ] -.RI [ \-\-password=[pwd] ] -.RB [ \-P | \-\-port= -.IR pnum ] -.RB [ \-q | \-\-quick ] -.RB [ \-r | \-\-raw ] -.RB [ \-s | \-\-silent ] -.RB [ \-S | \-\-socket= -.IR snum ] -.RB [ \-u | \-\-user= -.IR uname ] -.RB [ \-v | \-\-verbose ] -.RB [ \-V | \-\-version ] -.RB [ \-w | \-\-wait ] -.SH DESCRIPTION -The -.IR mysql -program provides a curses-based interface to the SQL-based database -server daemon, -.IR mysqld (1). -Full fuller documentation, refer to the HTML documents installed with -the package. -.SH OPTIONS -.TP -.BR \-B | \-\-batch -Print results with a tab as separator, -each row on a new line. -.TP -\fB\-#\fP|\fB\-\-debug=\fP\fIlogfile\fP -Employ the specified debug log. -.TP -.BR \-T | \-\-debug-info -Print debug information upon exiting. -.TP -\fB\-e | \-\-exec=\fP\fPcommand\fP -Execute the specified command and quit -.BR ( \-\-batch -is implicit). -.TP -.BR \-f | \-\-force -Continue even if the face of a SQL error. -.TP -.BR \-? | \-\-help -Display a help message and exit. -.TP -\fB\-h\fP|\fP\-\-host=\fP\fIhostname\fP -Connect to the specified host. -.TP -.BR \-n | \-\-unbuffered -Flush the buffer after each query. -.TP -\fB\-p\fP|\fB\-\-password\fP[\fB=\fP\fIpwd\fP] -Employ the specified password when connecting to the database server. -If a password is not supplied, it will be requested interactively. -.TP -\fB\-P\fR|\fB\-\-port=\fP\fIpnum\fP -Employ the specified port number for connecting to the database server. -.TP -.BR \-q | \-\-quick -Do not cache the result; print it row by row. -This may slow down the server if the output is suspended. -.TP -.BR \-r | \-\-raw -Write fields without conversion. -(used with -.BR \-\-batch ). -.TP -.BR \-s | \-\-silent -Silent mode: reduce the amount of output. -.TP -\fB\-S\fP|\fB\-\-socket=\fP\fIsnum\fP -Employ the specified socket file for connecting to the database server. -.TP -\fB\-u\fP|\fB\-\-user=\fP\fIuname\fP -Employ the specified user name for logging in to the server. -.TP -.BR \-v | \-\-verbose -Verbose mode: write more -Specifying this option -.I twice -produces a tabular output format. -.TP -.BR \-V | \-\-version -Print the -.I mysql -version number and exit. -.TP -.BR \-w | \-\-wait -Wait and retry if the database server connection is down. -.SH FILES -.TP 2.2i -.I /etc/my.cnf -MySQL configuration file -.TP -.I @bindir@/mysql -Client executable -.TP -.I @libexecdir@/mysqld -Server executable -.TP -.I @bindir@/mysqld_safe -executable shell script for starting mysqld safely -.TP -.I @localstatedir@ -location of database files -.SH EXAMPLE -You can also read a backup dump file back into MySQL with: -.TP -.BR mysql -\fP\fIdatabase\fP -.BR < -backup-file.sql -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 6.3, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/) -This software comes with no warranty. -Manual page by R. P. C. Rodgers, -Lister Hill National Center for Biomedical Communication, -U.S. National Library of Medicine -(rodgers@nlm.nih.gov). -.\" end of man page diff --git a/man/mysql_fix_privilege_tables.1.in b/man/mysql_fix_privilege_tables.1.in deleted file mode 100644 index fe1016e8d98..00000000000 --- a/man/mysql_fix_privilege_tables.1.in +++ /dev/null @@ -1,40 +0,0 @@ -.TH mysql 1 "17 March 2003" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -mysql_fix_privilege_tables \- Fixes MySQL privilege tables. -.SH SYNOPSIS -mysql_fix_privilege_tables [mysql_root_password] -.SH DESCRIPTION -This scripts updates the mysql.user, mysql.db, mysql.host and the -mysql.func tables to MySQL 3.22.14 and above. - -This is needed if you want to use the new GRANT functions, -CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 3.23 - -If you get 'Access denied' errors, run the script again -and give the MySQL root user password as an argument. - -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -This manpage was written by Christian Hammers . - -MySQL is available at http://www.mysql.com/. -.\" end of man page diff --git a/man/mysql_zap.1.in b/man/mysql_zap.1.in deleted file mode 100644 index fb030427dc2..00000000000 --- a/man/mysql_zap.1.in +++ /dev/null @@ -1,52 +0,0 @@ -.TH zap 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -zap - a perl script used to kill processes -.SH USAGE -/usr/bin/mysql_zap [-signal] [-?Ift] pattern -.SH SYNOPSIS -.B zap -.RB [ \-I | \-? ] -.RB [ \-f ] -.RB [ \-t ] -.SH DESCRIPTION -.TP -.BR zap -supports by executing -.TP -.BR \-I | \-? -info -.TP -.BR \-f -force -.TP -.BR \-t -test -.SH NOTE -If -.BR -f -isn't given, ask user for confirmation for each process to kill. If signal isn't given, try first with signal 15 and after that with signal 9. If -.BR -t -is given the processes is only shown on stdout. -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ Michael (Monty) Widenius (monty@mysql.com), MySQL AB (http://www.mysql.com/). This software comes with no warranty. Manual page by L. (Kill-9) Pedersen (kill-9@kill-9.dk), Mercurmedia Data Model Architect / system developer (http://www.mercurmedia.com) -.\" end of man page diff --git a/man/mysqlaccess.1.in b/man/mysqlaccess.1.in deleted file mode 100644 index e0b3d314a10..00000000000 --- a/man/mysqlaccess.1.in +++ /dev/null @@ -1,125 +0,0 @@ -.TH mysqlaccess 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -.BR mysqlaccess \- Create new users to mysql. -.SH USAGE -mysqlaccess [host [user [db]]] OPTIONS -.SH SYNOPSIS -.B mysqlaccess -.RB [ \-? | \-\-help ] -.RB [ \-v | \-\-version ] -.RB [ \-p | \-\-password=# ] -.RB [ \-h | \-\-host=# ] -.RB [ \-d | \-\-db=# ] -.RB [ \-U | \-\-superuser=# ] -.RB [ \-P | \-\-spassword=# ] -.RB [ \-H | \-\-rhost=# ] -.RB [ \-\-old_server ] -.RB [ \-b | \-\-brief ] -.RB [ \-t | \-\-table ] -.RB [ \-\-relnotes] -.RB [ \-\-plan ] -.RB [ \-\-howto ] -.RB [ \-\-debug=N ] -.RB [ \-\-copy ] -.RB [ \-\-preview ] -.RB [ \-\-commit ] -.RB [ \-\-rollback ] -.SH DESCRIPTION -.TP -.BR \-? | \-\-help -display this helpscreen and exit -.TP -.BR \-v | \-\-version -print information on the program `mysqlaccess' -.TP -.BR \-u | \-\-user=# -username for logging in to the db -.TP -.BR \-p | \-\-password=# -validate password for user -.TP -.BR \-h | \-\-host=# -name or IP\-number of the host -.TP -.BR \-d | \-\-db=# -name of the database -.TP -.BR \-U | \-\-superuser=# -connect as superuser -.TP -.BR \-P | \-\-spassword=# -password for superuser -.TP -.BR \-H | \-\-rhost=# -remote MySQL\-server to connect to -.TP -.BR \-\-old_server -connect to old MySQL\-server (before v3.21) which -does not yet know how to handle full where clauses. -.TP -.BR \-b | \-\-brief -single\-line tabular report -.TP -.BR \-t | \-\-table -report in table\-format -.TP -.BR \-\-relnotes -print release\-notes -.TP -.BR \-\-plan -print suggestions/ideas for future releases -.TP -.BR \-\-howto -some examples of how to run `mysqlaccess' -.TP -.BR \-\-debug=N -enter debuglevel N (0..3) -.TP -.BR \-\-copy -reload temporary grant\-tables from original ones -.TP -.BR \-\-preview -show differences in privileges after making -changes in (temporary) grant\-tables -.TP -.BR \-\-commit -copy grant\-rules from temporary tables to grant\-tables -(!don't forget to do an mysqladmin reload) -.TP -.BR \-\-rollback -undo the last changes to the grant\-tables. -.SH NOTE -At least the user and the db must be given (even with wildcards) -If no host is given, `localhost' is assumed -Wildcards (*,?,%,_) are allowed for host, user and db, but be sure -to escape them from your shell!! (i.e., type \\* or '*') -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill\-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - -.\" end of man page diff --git a/man/mysqladmin.1.in b/man/mysqladmin.1.in deleted file mode 100644 index e62cb32dc78..00000000000 --- a/man/mysqladmin.1.in +++ /dev/null @@ -1,209 +0,0 @@ -.TH mysqladmin 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME - mysqladmin [OPTIONS] command command.... \- A utility for performing administrative operations -.SH OPTION SYNOPSIS -.B mysqladmin -.RB [ \-# | \-\-debug= -.IR logfile ] -.RB [ \-f | \-\-force ] -.RB [ \-? | \-\-help ] -.BR [ --character-sets-dir=\fP\fIdirectory\fP ] -.RB [ \-C | \-\-compress ] -.RB [ \-h | \-\-host=[#] ] -.RB [ \-p[pwd] ] -.RI [ \-\-password=[pwd] ] -.RB [ \-P | \-\-port= -.IR pnum ] -.RB [ \-i | \-\-sleep= -.IR sec ] -.RB [ \-E | \-\-vertical ] -.RB [ \-s | \-\-silent ] -.RB [ \-S | \-\-socket= -.IR # ] -.RB [ \-r | \-\-relative ] -.RB [ \-t | \-\-timeout= -.IR # ] -.RB [ \-u | \-\-user= -.IR uname ] -.RB [ \-v | \-\-verbose ] -.RB [ \-V | \-\-version ] -.RB [ \-w | \-\-wait[=retries] ] -.SH OPTION DESCRIPTION -You can get a list of the options your version of -.IR mysqladmin -supports by executing -.BR "mysqladmin \-\-help" -.SH OPTIONS -.TP -.BR \-# | \-\-debug=\fP\fIlogfile\fP -Output debug log. Often this is 'd:t:o,filename` -.TP -.BR \-f | \-\-force -Don't ask for confirmation on drop database; with -multiple commands, continue even if an error occurs -.TP -.BR \-? | \-\-help - Display help and exit -.TP -.BR --character-sets-dir=\fP\fIdirectory\fP -Set the character set directory -.TP -.BR \-C | \-\-compress -Use compression in server/client protocol -.TP -\fB\-h\fP|\fP\-\-host=\fP\fIhostname\fP -Connect to host -.TP -\fB\-p\fP|\fB\-\-password\fP[\fB=\fP\fIpwd\fP] -Password to use when connecting to server -If password is not given it's asked from the tty -.TP -\fB\-P\fR|\fB\-\-port=\fP\fIpnum\fP -Port number to use for connection -.TP -\fB\-i\fR|\fB\-\-sleep=\fP\fIsec\fP -Execute commands again and again with a sleep between -.TP -.BR \-r | \-\-relative -Show difference between current and previous values -when used with -.BR -i -. Currently works only with -extended-status -.TP -.BR \-E | \-\-vertical -Print output vertically. Is similar to -.BR --relative, -but prints output vertically. -.TP -.BR \-s | \-\-silent -Silently exit if one can't connect to server -.TP -\fB\-S\fR|\fB\-\-socket=\fP\fIfile\fP -Socket file to use for connection -.TP -\fB\-t\fR|\fB\-\-timeout=\fP\fIsec\fP -Timeout for connection to the mysqld server -.TP -\fB\-u\fP|\fB\-\-user=\fP\fIuname\fP -User for login if not current user -.TP -.BR \-v | \-\-verbose -Write more information -.TP -.BR \-V | \-\-version -Output version information and exit -.TP -.BR \-w | \-\-wait - Wait and retry if connection is down -.SH COMMAND SYNOPSIS -.B MySQLADMIN -.RB [ "create \fP\fIdatabasename\fP "] -.RB [ "drop \fP\fIdatabasename\fP" ] -.RB [ extended-status ] -.RB [ flush-hosts ] -.RB [ flush-logs ] -.RB [ flush-tables ] -.RB [ flush-privileges ] -.RB [ " kill id,id,... " ] -.RB [ "password \fP\fInew-password\fP "] -.RB [ ping ] -.RB [ processlist ] -.RB [ reload ] -.RB [ refresh ] -.RB [ shutdown ] -.RB [ slave-start ] -.RB [ slave-stop ] -.RB [ status ] -.RB [ variables ] -.RB [ version ] - -.SH COMMANDS -Where command is a one or more of: (Commands may be shortened) -.TP -.BR "create databasename" -Create a new database -.TP -.BR "drop databasename" -Delete a database and all its tables -.TP -.BR extended-status -Gives an extended status message from the server -.TP -.BR flush-hosts -Flush all cached hosts -.TP -.BR flush-logs -Flush all logs -.TP -.BR flush-status -Clear status variables -.TP -.BR flush-tables -Flush all tables -.TP -.BR flush-threads -Flush the thread cache -.TP -.BR flush-privileges -Reload grant tables (same as reload) -.TP -.BR "kill id,id,..." -Kill mysql threads -.TP -.BR "password \fP\fInew-password\fP" -Change old password to new-password -.TP -.BR ping -Check if mysqld is alive -.TP -.BR processlist -Show list of active threads in server -.TP -.BR reload -Reload grant tables -.TP -.BR refresh -Flush all tables and close and open logfiles -.TP -.BR shutdown -Take server down -.TP -.BR status -Gives a short status message from the server -.TP -.BR variables -Prints variables available -.TP -.BR version -Get version info from server -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) -.\" end of man page - diff --git a/man/mysqld.1.in b/man/mysqld.1.in deleted file mode 100644 index 73f07337f25..00000000000 --- a/man/mysqld.1.in +++ /dev/null @@ -1,234 +0,0 @@ -.TH mysqld 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -mysqld \- The MySQL server demon -.SH USAGE -mysqld [OPTIONS] -.SH SYNOPSIS -.B mysqld -.RB [ \-\-ansi ] -.RB [ \-b | \-\-basedir=\fP\fIpath\fP ] -.RB [ \-\-big-tables ] -.RB [ \-\-bind\-address=IP ] -.RB [ \-\-character\-sets\-dir=\fP\fIpath\fP ] -.RB [ \-\-chroot=\fP\fIpath\fP ] -.RB [ \-h | \-\-datadir=\fP\fIpath\fP ] -.RB [ \-\-default\-character\-set=\fP\fIcharset\fP ] -.RB [ \-\-default\-table\-type=\fP\fItype \fP] -.RB [ \-\-delay\-key\-write\-for\-all\-tables ] -.RB [ \-\-enable\-locking ] -.RB [ \-T | \-\-exit\-info] -.RB [ \-\-flush ] -.RB [ \-? | \-\-help ] -.RB [ \-\-init\-file=file ] -.RB [ \-L | \-\-language=... ] -.RB [ \-l | \-\-log[=file] ] -.RB [ \-\-log\-isam[=file] ] -.RB [ \-\-log\-slow\-queries\fP\fI[=file]\fP ] -.RB [ \-\-log\-update\fP\fI[=file]\fP ] -.RB [ \-\-log\-long\-format ] -.RB [ \-\-low\-priority\-updates ] -.RB [ \-\-memlock ] -.RB [ " \-\-myisam\-recover [=option[,option...]]] where option is one of DEFAULT, BACKUP, FORCE or QUICK." ] -.RB [ \-\-pid\-file=\fP\fIpath\fP ] -.RB [ \-P | \-\-port=... ] -.RB [ \-o | \-\-old\-protocol ] -.RB [ \-\-one\-thread ] -.RB [ \-O | \-\-set\-variable var=\fP\fIoption\fP ] -.RB [ \-Sg | \-\-skip\-grant\-tables ] -.RB [ \-\-safe\-mode ] -.RB [ \-\-secure ] -.RB [ \-\-skip\-concurrent\-insert ] -.RB [ \-\-skip\-delay\-key\-write ] -.RB [ \-\-skip\-locking ] -.RB [ \-\-skip\-name\-resolve ] -.RB [ \-\-skip\-networking ] -.RB [ \-\-skip\-new ] -.RB [ \-\-skip\-host\-cache ] -.RB [ \-\-skip\-show\-database ] -.RB [ \-\-skip\-thread\-priority ] -.RB [ \-\-socket=path ] -.RB [ \-t | \-\-tmpdir=\fP\fIpath \fP] -.RB [ \-u | \-\-user=\fP\fIuser_name\fP ] -.RB [ \-V | \-\-version ] -.SH DESCRIPTION -.TP -.BR --ansi -Use ANSI SQL syntax instead of MySQL syntax. See section 5.2 Running MySQL in ANSI Mode. -.TP -.BR -b | --basedir=\fP\fIpath \fP -Path to installation directory. All paths are usually resolved relative to this. -.TP -.BR --big-tables -Allow big result sets by saving all temporary sets on file. It solves most 'table full' errors, but also slows down the queries where in\-memory tables would suffice. Since Version 3.23.2, MySQL is able to solve it automaticaly by using memory for small temporary tables and switching to disk tables where necessary. -.TP -.BR \-\-bind\-address=\fP\fIIP \fP -IP address to bind to. -.TP -.BR \-\-character\-sets\-dir=\fP\fIpath \fP -Directory where character sets are. See section 10.1.1 The Character Set Used for Data and Sorting. -.TP -.BR \-\-chroot=\fP\fIpath \fP -Chroot mysqld daemon during startup. Recommended security measure. It will somewhat limit LOAD DATA INFILE and SELECT ... INTO OUTFILE though. -.TP -.BR \-h | \-\-datadir=\fP\fIpath \fP -Path to the database root. -.TP -.BR \-\-default\-character\-set=\fP\fIcharset \fP -Set the default character set. See section 10.1.1 The Character Set Used for Data and Sorting. -.TP -.BR \-\-default\-table\-type=\fP\fItype \fP -Set the default table type for tables. See section 8 MySQL Table Types. -.TP -.BR \-\-delay\-key\-write\-for\-all\-tables -Don't flush key buffers between writes for any MyISAM table. See Mysql Manual section 12.2.3 Tuning Server Parameters. -.TP -.BR \-\-enable\-locking -Enable system locking. -.TP -.BR \-T | \-\-exit\-info -Print some debug info at exit. -.TP -.BR \-\-flush -Flush all changes to disk after each SQL command. Normally MySQL only does a write of all changes to disk after each SQL command and lets the operating system handle the syncing to disk. See section 20.2 What to Do if MySQL Keeps Crashing. -.TP -.BR \-? | \-\-help -Display short help and exit. -.TP -.BR \-\-init\-file=\fP\fIfile \fP -Read SQL commands from this file at startup. -.TP -.BR \-L | \-\-language=... -Client error messages in given language. May be given as a full path. See Mysql Manual section 10.1 What Languages Are Supported by MySQL?. -.TP -.BR \-l | \-\-log\fP\fI[=file] \fP -Log connections and queries to file. -.TP -.BR \-\-log\-isam\fP\fI[=file] \fP -Log all ISAM/MyISAM changes to file (only used when debugging ISAM/MyISAM). -.TP -.BR \-\-log\-slow\-queries\fP\fI[=file] \fP -Log all queries that have taken more than long_query_time seconds to execute to file. See Mysql Manual section 21.5 The Slow Query Log. -.TP -.BR \-\-log\-update\fP\fI[=file] \fP -Log updates to file.# where # is a unique number if not given. See Mysql Manual section 21.3 The Update Log. -.TP -.BR \-\-log\-long\-format -Log some extra information to update log. If you are using -.BR \-\-log\-slow\-queries -then queries that are not using indexes are logged to the slow query log. -.TP -.BR \-\-low\-priority\-updates -Table\-modifying operations (INSERT/DELETE/UPDATE) will have lower priority than selects. It can also be done via {INSERT | REPLACE | UPDATE | DELETE} LOW_PRIORITY ... to lower the priority of only one query, or by SET OPTION SQL_LOW_PRIORITY_UPDATES=1 to change the priority in one thread. See Mysql Manual section 12.2.9 Table Locking Issues. -.TP -.BR \-\-memlock -Lock the mysqld process in memory. This works only if your system supports the mlockall() system call. This may help if you have a problem where the operating system is causing mysqld to swap on disk. -.TP -.BR " \-\-myisam\-recover [=option[,option...]]] where option is one of DEFAULT, BACKUP, FORCE or QUICK. " -If this option is used, mysqld will on open check if the table is marked as crashed or if if the table wasn't closed properly (The last option only works if you are running with \-\-skip\-locking). If this is the case mysqld will run check on the table. If the table was corrupted, mysqld will attempt to repair it. The following options affects how the repair works. -.BR DEFAULT -The same as not giving any option to \-\-myisam\-recover. -.BR BACKUP -If the data table was changed during recover, save a backup of the `table_name.MYD' data file as `table_name\-datetime.BAK'. -.BR FORCE -Run recover even if we will loose more than one row from the .MYD file. -.BR QUICK -Don't check the rows in the table if there isn't any delete blocks. -Before a table is automaticly repaired, mysqld will add a note about this in the error log. If you want to be able to recover from most things without user intervention, you should use the options BACKUP,FORCE. This will force a repair of a table even if some rows would be deleted, but it will keep the old data file as a backup so that you can later examine what happened. -.TP -.BR \-\-pid\-file=\fP\fIpath \fP -Path to pid file used by mysqld_safe. -.TP -.BR \-P | \-\-port=... -Port number to listen for TCP/IP connections. -.TP -.BR \-o | \-\-old\-protocol -Use the 3.20 protocol for compatibility with some very old clients. See Mysql Manual section 4.17.3 Upgrading from Version 3.20 to Version 3.21. -.TP -.BR \-\-one\-thread -Only use one thread (for debugging under Linux). See Mysql Manual section H.1 Debugging a MySQL server. -.TP -.BR \-O | " \-\-set\-variable var=\fP\fIoption\fP " -Give a variable a value. \-\-help lists variables. You can find a full description for all variables in the SHOW VARIABLES section in this manual. See Mysql Manual section 7.28.4 SHOW VARIABLES. The tuning server parameters section includes information of how to optimize these. See Mysql Manual section 12.2.3 Tuning Server Parameters. -.TP -.BR \-Sg | \-\-skip\-grant\-tables -This option causes the server not to use the privilege system at all. This gives everyone full access to all databases! (You can tell a running server to start using the grant tables again by executing mysqladmin flush\-privileges or mysqladmin reload.) -.TP -.BR \-\-safe\-mode -Skip some optimize stages. Implies -.BR \-\-skip\-delay\-key\-write. -.TP -.BR \-\-secure -IP numbers returned by the gethostbyname() system call are checked to make sure they resolve back to the original hostname. This makes it harder for someone on the outside to get access by pretending to be another host. This option also adds some sanity checks of hostnames. The option is turned off by default in MySQL Version 3.21 because sometimes it takes a long time to perform backward resolutions. MySQL Version 3.22 caches hostnames (unless \-\-skip\-host\-cache is used) and has this option enabled by default. -.TP -.BR \-\-skip\-concurrent\-insert -Turn off the ability to select and insert at the same time on MyISAM tables. (This is only to be used if you think you have found a bug in this feature). -.TP -.BR \-\-skip\-delay\-key\-write -Ignore the delay_key_write option for all tables. See Mysql Manual section 12.2.3 Tuning Server Parameters. -.TP -.BR \-\-skip\-locking -Don't use system locking. To use isamchk or myisamchk you must shut down the server. See Mysql Manual section 1.6 How Stable Is MySQL?. Note that in MySQL Version 3.23 you can use REPAIR and CHECK to repair/check MyISAM tables. -.TP -.BR \-\-skip\-name\-resolve -Hostnames are not resolved. All Host column values in the grant tables must be IP numbers or localhost. -.TP -.BR \-\-skip\-networking -Don't listen for TCP/IP connections at all. All interaction with mysqld must be made via Unix sockets. This option is highly recommended for systems where only local requests are allowed. However, this option is unsuitable for systems that use MIT\-pthreads, because the MIT\-pthreads package doesn't support Unix sockets. -.TP -.BR \-\-skip\-new -Don't use new, possible wrong routines. Implies -.BR \-\-skip\-delay\-key\-write -. This will also set default table type to ISAM. See Mysql Manual section 8.3 ISAM Tables. -.TP -.BR \-\-skip\-host\-cache -Never use host name cache for faster name\-ip resolution, but query DNS server on every connect instead. -.TP -.BR \-\-skip\-show\-database -Don't allow 'SHOW DATABASE' commands, unless the user has process privilege. -.TP -.BR \-\-skip\-thread\-priority -Disable using thread priorities for faster response time. -.TP -.BR \-\-socket=\fP\fIpath \fP -Socket file to use for local connections instead of default /tmp/mysql.sock. -.TP -.BR \-t | \-\-tmpdir=\fP\fIpath\fP -Path for temporary files. It may be useful if your default /tmp directory resides on a partition too small to hold temporary tables. -.TP -.BR \-u | \-\-user=\fP\fIuser_name \fP -Run mysqld daemon as user user_name. This option is mandatory when starting mysqld as root. -.TP -.BR \-V | \-\-version -Output version information and exit. - -.SH NOTE -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill\-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - -.\" end of man page diff --git a/man/mysqld_multi.1.in b/man/mysqld_multi.1.in deleted file mode 100644 index 58e5c71d01d..00000000000 --- a/man/mysqld_multi.1.in +++ /dev/null @@ -1,94 +0,0 @@ -.TH mysqld_multi 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -mysqld_multi - is meant for managing several mysqld processes running in different UNIX sockets and TCP/IP ports. -.SH USAGE -mysqld_multi [OPTIONS] {start|stop|report} [GNR,GNR,GNR...] -.SH SYNOPSIS -.B mysqld_multi -.RB [ --config-file=... ] -.RB [ --example ] -.RB [ --help ] -.RB [ --log=... ] -.RB [ --mysqladmin=... ] -.RB [ --mysqld=... ] -.RB [ --no-log ] -.RB [ --password=... ] -.RB [ --tcp-ip ] -.RB [ --user=... ] -.RB [ --version ] -.SH DESCRIPTION -.TP -.BR mysqld_multi -.TP -.BR --config-file=... -Alternative config file. NOTE: This will not affect this program\'s own options (group [mysqld_multi]), but only groups [mysqld#]. Without this option everything will be searched from the ordinary my.cnf file. -.TP -.BR --example -Give an example of a config file. -.TP -.BR --help -Print this help and exit. -.TP -.BR --log=... -Log file. Full path to and the name for the log file. NOTE: If the file exists, everything will be appended. -.TP -.BR --mysqladmin=... -mysqladmin binary to be used for a server shutdown. -.TP -.BR --mysqld=... -mysqld binary to be used. Note that you can give mysqld_safe to this option also. The options are passed to mysqld. Just make sure you have mysqld in your environment variable PATH or fix mysqld_safe. -.TP -.BR --no-log -Print to stdout instead of the log file. By default the log file is turned on. -.TP -.BR --password=... -Password for user for mysqladmin. -.TP -.BR --tcp-ip -Connect to the MySQL server(s) via the TCP/IP port instead of the UNIX socket. This affects stopping and reporting. If a socket file is missing, the server may still be running, but can be accessed only via the TCP/IP port. By default connecting is done via the UNIX socket. -.TP -.BR --user=... -MySQL user for mysqladmin. -.TP -.BR --version -Print the version number and exit. -.SH NOTE -Please see the mysql manual for more detailed information on this. - - - -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. - -.SH AUTHOR - -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - - -.\" end of man page - - diff --git a/man/mysqld_safe.1.in b/man/mysqld_safe.1.in deleted file mode 100644 index 5aabd232a11..00000000000 --- a/man/mysqld_safe.1.in +++ /dev/null @@ -1,91 +0,0 @@ -.TH safe_mysqld 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -mysqld_safe \- start the mysqld daemon on Unix. -.SH SYNOPSIS -.B mysqld_safe -.RB [ \-\-basedir=\fP\fIpath\fP ] -.RB [ \-\-core\-file\-size=# ] -.RB [ \-\-defaults\-extra\-file=\fP\fIpath\fP ] -.RB [ \-\-defaults\-file=\fP\fIpath\fP ] -.RB [ \-\-open\-files=# ] -.RB [ \-\-datadir=\fP\fIpath\fP ] -.RB [ \-\-err\-log=\fP\fIpath \fP] -.RB [ \-\-ledir=path ] -.RB [ \-\-log=\fP\fIpath\fP ] -.RB [ \-\-no\-defaults ] -.RB [ \-\-open\-files=# ] -.RB [ \-\-pid\-file=\fP\fIpath\fP ] -.RB [ \-\-port=# ] -.RB [ \-\-socket=\fP\fIpath\fP ] -.RB [ \-\-timezone=# ] -.RB [ \-\-user=# ] -.SH DESCRIPTION -mysqld_safe adds some safety features such as restarting the server when an -error occurs and logging run-time information to a log file. -.BR -.TP -.BR \-\-basedir=\fP\fIpath \fP -.TP -.BR \-\-core\-file\-size=# -Size of the core file mysqld should be able to create. Passed to ulimit \-c. -.TP -.BR \-\-defaults\-extra\-file=\fP\fIpath \fP -.TP -.BR \-\-defaults\-file=\fP\fIpath \fP -.TP -.BR \-\-datadir=\fP\fIpath \fP -.TP -.BR \-\-err\-log=\fP\fIpath \fP -.TP -.BR \-\-ledir=\fP\fIpath \fP -Path to mysqld -.TP -.BR \-\-log=\fP\fIpath \fP -.TP -.BR \-\-no\-defaults -.TP -.BR \-\-open\-files=# -Number of files mysqld should be able to open. Passed to ulimit \-n. -.TP -.BR \-\-pid\-file=\fP\fIpath \fP -.TP -.BR \-\-port=# -.TP -.BR \-\-socket=\fP\fIpath \fP -.TP -.BR \-\-timezone=# -Set the timezone (the TZ) variable to the value of this parameter. -.TP -.BR \-\-user=# -.SH NOTE -Note that all options on the command line to mysqld_safe are passed to mysqld. If you wants to use any options in mysqld_safe that mysqld doesn't support, you must specify these in the option file. -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill\-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - -.\" end of man page diff --git a/man/mysqldump.1.in b/man/mysqldump.1.in deleted file mode 100644 index 0f581429af7..00000000000 --- a/man/mysqldump.1.in +++ /dev/null @@ -1,279 +0,0 @@ -.TH mysqldump 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -mysqldump \- text\-based client for dumping or backing up mysql databases, tables and or data. - -.SH USAGE -.BR "mysqldump [\fP\fIOPTIONS\fP] database [\fP\fItables\fP]" -.TP -OR -.BR "mysqldump [\fP\fIOPTIONS\fP] \-\-databases [\fP\fIOPTIONS\fP] DB1 [\fP\fIDB2 DB3...\fP]" -.TP -OR -.BR "mysqldump [\fP\fIOPTIONS\fP] \-\-all-databases [\fP\fIOPTIONS\fP]" - -.SH OPTION SYNOPSIS -.B mysqldump -.RB [ \-A | \-\-all-databases ] -.RB [ \-a | \-\-all ] -.RB [ \-# | \-\-debug=... ] -.RB [ \-\-character-sets-dir=...] -.RB [ \-? | \-\-help ] -.RB [ \-B | \-\-databases ] -.RB [ \-c | \-\-complete-insert ] -.RB [ \-C | \-\-compress ] -.RB [ \-\-default-character-set=...] -.RB [ \-e | \-\-extended-insert ] -.RB [ \-\-add-drop-table ] -.RB [ \-\-add-locks ] -.RB [ \-\-allow-keywords ] -.RB [ \-\-delayed-insert ] -.RB [ \-F | \-\-flush-logs ] -.RB [ \-f | \-\-force ] -.RB [ \-h | \-\-host=... ] -.RB [ \-l | \-\-lock-tables ] -.RB [ \-n | \-\-no-create-db ] -.RB [ \-t | \-\-no-create-info ] -.RB [ \-d | \-\-no-data ] -.RB [ \-O | \-\-set-variable var=\fP\fIoption\fP ] -.RB [ \-\-opt ] -.RB [ \-p | \-\-password\fP\fI[=...]\fP ] -.RB [ \-P | \-\-port=... ] -.RB [ \-q | \-\-quick ] -.RB [ \-Q | \-\-quote-names ] -.RB [ \-S | \-\-socket=... ] -.RB [ \-\-tables ] -.RB [ \-T | \-\-tab=... ] -.RB [ \-u | \-\-user=# ] -.RB [ \-v | \-\-verbose ] -.RB [ \-V | \-\-version ] -.RB [ \-w | \-\-where= ] -.RB [ \-\-delayed ] -.RB [ \-e | \-\-extended-insert ] -.RB [ \-\-fields\-terminated\-by=... ] -.RB [ \-\-fields\-enclosed\-by=... ] -.RB [ \-\-fields-optionally\-enclosed\-by=... ] -.RB [ \-\-fields\-escaped\-by=... ] -.RB [ \-\-lines\-terminated\-by=... ] -.RB [ \-v | \-\-verbose ] -.RB [ \-V | \-\-version ] -.RB [ "\-O net_buffer_length=#, where # < 16M" ] -.SH DESCRIPTION -Dumping definition and data mysql database or table -.IR mysqldump -supports by executing -.TP -.BR \-A | \-\-all\-databases -Dump all the databases. This will be same as -.BR \-\-databases -with all databases selected. -.TP -.BR \-a | \-\-all -Include all MySQL specific create options. -.TP -.BR \-# | \-\-debug=... -Output debug log. Often this is 'd:t:o,filename`. -.TP -.BR \-\-character\-sets\-dir=... -Directory where character sets are -.TP -.BR \-? | \-\-help -Display this help message and exit. -.TP -.BR \-B | \-\-databases -To dump several databases. Note the difference in -usage; In this case no tables are given. All name -arguments are regarded as databasenames. -'USE db_name;' will be included in the output -.TP -.BR \-c | \-\-complete\-insert -Use complete insert statements. -.TP -.BR \-C | \-\-compress -Use compression in server/client protocol. -.TP -.BR \-\-default\-character\-set=... -Set the default character set -.TP -.BR \-e | \-\-extended\-insert -Allows utilization of the new, much faster -INSERT syntax. -.TP -.BR \-\-add\-drop\-table -Add a 'drop table' before each create. -.TP -.BR \-\-add\-locks -Add locks around insert statements. -.TP -.BR \-\-allow\-keywords -Allow creation of column names that are keywords. -.TP -.BR \-\-delayed\-insert -Insert rows with INSERT DELAYED. -.TP -.BR \-F | \-\-flush\-logs -Flush logs file in server before starting dump. -.TP -.BR \-f | \-\-force -Continue even if we get an sql\-error. -.TP -.BR \-h | \-\-host=... -Connect to host. -.TP -.BR \-l | \-\-lock\-tables -Lock all tables for read. -.TP -.BR \-n | \-\-no\-create\-db -\&'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' -will not be put in the output. The above line will -be added otherwise, if -.BR \-\-databases -or -.BR \-\-all\-databases -option was given. -.TP -.BR \-t | \-\-no\-create\-info -Don't write table creation info. -.TP -.BR \-d | \-\-no\-data -No row information. -.TP -.BR \-O | "\-\-set\-variable var=option" -give a variable a value. -.BR \-\-help -lists variables -.TP -.BR \-\-opt -Same as -.BR " \-\-add\-drop\-table \-\-add\-locks \-\-all \-\-extended\-insert \-\-quick \-\-lock\-tables " -.TP -.BR \-p | \-\-password[=...] -Password to use when connecting to server. -If password is not given it's solicited on the tty. -.TP -.BR \-P | \-\-port=... -Port number to use for connection. -.TP -.BR \-q | \-\-quick -Don't buffer query, dump directly to stdout. -.TP -.BR \-Q | \-\-quote\-names -Quote table and column names with ` -.TP -.BR \-S | \-\-socket=... -Socket file to use for connection. -.TP -.BR \-\-tables -\fP\fIOverrides \fPoption -.BR \-\-databases (\-B). -.TP -.BR \-T | \-\-tab=... -Creates tab separated textfile for each table to -given path. (creates .sql and .txt files). -NOTE: This only works if mysqldump is run on -the same machine as the mysqld daemon. -.TP -.BR \-u | \-\-user=# -User for login if not current user. -.TP -.BR \-v | \-\-verbose -Print info about the various stages. -.TP -.BR \-V | \-\-version -Output version information and exit. -.TP -.BR \-w | \-\-where= -dump only selected records; QUOTES mandatory! -.TP -.BR \-\-delayed -Insert rows with the INSERT DELAYED command. -.TP -.BR \-e | \-\-extended-insert -Use the new multiline INSERT syntax. (Gives more compact and faster inserts statements.) -.TP -.BR \-\-fields\-terminated\-by=... -.TP -.BR \-\-fields\-enclosed\-by=... -.TP -.TP -.BR \-\-fields-optionally\-enclosed\-by=... -.TP -.BR \-\-fields\-escaped\-by=... -.TP -.BR \-\-lines\-terminated\-by=... -These options are used with the -.BR -T -option and have the same meaning as the corresponding clauses for LOAD DATA INFILE. See Mysql manual section 7.23 LOAD DATA INFILE Syntax. -.TP -.BR \-v | \-\-verbose -Verbose mode. Print out more information on what the program does. -.TP -.BR \-V | \-\-version -Print version information and exit. -.TP -.BR "\-O net_buffer_length=#, where # < 16M " -When creating multi-row-insert statements (as with option -.BR --extended-insert -or -.BR --opt -), mysqldump will create rows up to net_buffer_length length. If you increase this variable, you should also ensure that the max_allowed_packet variable in the MySQL server is bigger than the net_buffer_length. -.SH EXAMPLES -.TP -The most normal use of mysqldump is probably for making a backup of whole -databases. See the section on Database Backups in the MySQL Reference Manual. -.TP -mysqldump \-\-opt \fP\fIdatabase\fP > backup-file.sql -.TP -You can read this back into MySQL with: -.TP -.BR mysql -\fP\fIdatabase\fP -.BR < -backup-file.sql -.TP -or -.TP -.BR mysql -\-e 'source /patch\-to\-backup/backup\-file.sql' database -.TP -However, it's also very useful to populate another MySQL server with information from a database: -.TP -mysqldump \-\-opt \fP\fIdatabase\fP | mysql \-\-host=\fP\fIremote\-host\fP \-C database -.TP -It is possible to dump several databases with one command: -.TP -mysqldump \-\-databases database1 [ database2 database3... ] > my_databases.sql -.TP -If all the databases are wanted, one can use: -.TP -mysqldump \fP\fI\-\-all\-databases\fP > all_databases.sql - -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - -.\" end of man page diff --git a/man/mysqlman.1.in b/man/mysqlman.1 similarity index 89% rename from man/mysqlman.1.in rename to man/mysqlman.1 index b09b01ca759..2170942ebd9 100644 --- a/man/mysqlman.1.in +++ b/man/mysqlman.1 @@ -1,4 +1,4 @@ -.TH mysqlman 1 "20 July 2004" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" +.TH mysqlman 1 "20 July 2004" "MySQL" "MySQL database" .SH NAME mysqlman \- default man page for mysql .SH "DESCRIPTION" diff --git a/man/mysqlshow.1.in b/man/mysqlshow.1.in deleted file mode 100644 index 2db79ae070e..00000000000 --- a/man/mysqlshow.1.in +++ /dev/null @@ -1,98 +0,0 @@ -.TH mysqlshow 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -.BR mysqlshow - \- Shows the structure of a mysql database (databases,tables and columns) -.SH USAGE -shell> mysqlshow [\fP\fIOPTIONS\fP] [\fP\fIdatabase [table [column]]\fP] -.SH SYNOPSIS -.B mysqlshow -.RB [ \-# | \-\-debug=...] -.RB [ \-? | \-\-help ] -.RB [ \-c | \-\-character\-sets\-dir=...] -.RB [ \-C | \-\-compress ] -.RB [ \-h | \-\-host=... ] -.RB [ \-i | \-\-status ] -.RB [ \-k | \-\-keys ] -.RB [ \-p | \-\-password\fP\fI[=...]\fP ] -.RB [ \-P | \-\-port=... ] -.RB [ \-S | \-\-socket=... ] -.RB [ \-u | \-\-user=# ] -.RB [ \-V | \-\-version ] -.SH DESCRIPTION -.TP -.BR \-# | \-\-debug=... -output debug log. Often this is 'd:t:o,filename` -.TP -.BR \-? | \-\-help -display help and exit -.TP -.BR \-c | \-\-character\-sets\-dir=... -Directory where character sets are -.TP -.BR \-C | \-\-compress -Use compression in server/client protocol -.TP -.BR \-h | \-\-host=... -connect to host -.TP -.BR \-i | \-\-status -Shows a lot of extra information about each table -.TP -.BR \-k | \-\-keys -show keys for table -.TP -.BR \-p | \-\-password \fP\fI[=...] \fP -password to use when connecting to server -If password is not given it's asked from the tty. -.TP -.BR \-P | \-\-port=... -Port number to use for connection -.TP -.BR \-S | \-\-socket=... -Socket file to use for connection -.TP -.BR \-u | \-\-user=# -user for login if not current user -.TP -.BR \-V | \-\-version -output version information and exit - - -.SH NOTE -If last argument contains a shell or SQL wildcard (*,?,% or _) then only -what's matched by the wildcard is shown. -If no database is given then all matching databases are shown. -If no table is given then all matching tables in database are shown -If no column is given then all matching columns and columntypes in table -are shown - -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysql_zap(1), -perror(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill\-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - -.\" end of man page diff --git a/man/perror.1.in b/man/perror.1.in deleted file mode 100644 index 45b343a9c3f..00000000000 --- a/man/perror.1.in +++ /dev/null @@ -1,58 +0,0 @@ -.TH perror 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -perror \- describes a system or MySQL error code. -.SH SYNOPSIS -perror [OPTIONS] [ERRORCODE [ERRORCODE...]] -.SH DESCRIPTION -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. -.SH OPTIONS -.TP -.BR \-? | \-\-help -Displays this help and exits. -.TP -.BR \-I | \-\-info -Synonym for the above. -.TP -.BR \-s | \-\-silent -Only print the error message -.TP -.BR \-v | \-\-verbose -Print error code and message (default). -.TP -.BR \-V | \-\-version -Displays version information and exits. -.SH EXAMPLE -shell> perror 64 79 -Error code 64: Machine is not on the network -Error code 79: Can not access a needed shared library -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -replace(1) -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill\-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) - -.\" end of man page diff --git a/man/replace.1.in b/man/replace.1.in deleted file mode 100644 index 618ed0f5bea..00000000000 --- a/man/replace.1.in +++ /dev/null @@ -1,73 +0,0 @@ -.TH replace 1 "19 December 2000" "MySQL @MYSQL_BASE_VERSION@" "MySQL database" -.SH NAME -.TP -replace - A utility program that is used by msql2mysql, but that has more general applicability as well. replace changes strings in place in files or on the standard input. Uses a finite state machine to match longer strings first. Can be used to swap strings. -.SH USAGE -replace [-?svIV] from to from to ... -- [files] -.TP -or -.TP -replace [-?svIV] from to from to ... < fromfile > tofile -.SH SYNOPSIS -.B replace -.RB [ -? | -I ] -.RB [ -s ] -.RB [ -v ] -.SH DESCRIPTION -.TP -.BR replace -.TP -.BR -? | -I -info -.TP -.BR -s -silent -.TP -.BR -v -verbose -.SH EXTRA INFO -.B Special characters in from string: -.TP -\\^ -Match start of line. -.TP -\\$ -Match end of line. -.TP -\\b -Match space-character, start of line or end of line. For a end \\b the next replace starts locking at the end space-character. A \\b alone in a string matches only a space-character. -.SH EXAMPLE -this command swaps a and b in the given files: -.TP -shell> replace a b b a -- file1 file2 ... -.SH "SEE ALSO" -isamchk(1), -isamlog(1), -mysql(1), -mysqlaccess(1), -mysqladmin(1), -mysqld(1), -mysqld_multi(1), -mysqld_safe(1), -mysqldump(1), -mysql_fix_privilege_tables(1), -mysqlshow(1), -mysql_zap(1), -perror(1), -.P -For more information please refer to the MySQL reference -manual, which may already be installed locally and which -is also available online at http://dev.mysql.com/doc/mysql/en -.SH BUGS -Please refer to http://bugs.mysql.com/ to report bugs. -.SH AUTHOR -Ver 1.0, distribution @MYSQL_NO_DASH_VERSION@ -Michael (Monty) Widenius (monty@mysql.com), -MySQL AB (http://www.mysql.com/). -This software comes with no warranty. -Manual page by L. (Kill-9) Pedersen -(kill-9@kill-9.dk), Mercurmedia Data Model Architect / -system developer (http://www.mercurmedia.com) -.\" end of man page - - diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 16845aa4be7..3384e074ba9 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -440,41 +440,48 @@ fi %doc %attr(644, root, man) %{_mandir}/man1/isamchk.1* %doc %attr(644, root, man) %{_mandir}/man1/isamlog.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1* +%doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1* +%doc %attr(644, root, man) %{_mandir}/man1/myisamlog.1* +%doc %attr(644, root, man) %{_mandir}/man1/myisampack.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqld.1* -%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqld_multi.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqld_safe.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_fix_privilege_tables.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1* +%doc %attr(644, root, man) %{_mandir}/man1/pack_isam.1* %doc %attr(644, root, man) %{_mandir}/man1/perror.1* %doc %attr(644, root, man) %{_mandir}/man1/replace.1* +%doc %attr(644, root, man) %{_mandir}/man1/safe_mysqld.1* %ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf %attr(755, root, root) %{_bindir}/isamchk %attr(755, root, root) %{_bindir}/isamlog -%attr(755, root, root) %{_bindir}/my_print_defaults %attr(755, root, root) %{_bindir}/myisamchk %attr(755, root, root) %{_bindir}/myisam_ftdump %attr(755, root, root) %{_bindir}/myisamlog %attr(755, root, root) %{_bindir}/myisampack +%attr(755, root, root) %{_bindir}/my_print_defaults +%attr(755, root, root) %{_bindir}/mysqlbug %attr(755, root, root) %{_bindir}/mysql_convert_table_format +%attr(755, root, root) %{_bindir}/mysqld_multi +%attr(755, root, root) %{_bindir}/mysqld_safe %attr(755, root, root) %{_bindir}/mysql_explain_log %attr(755, root, root) %{_bindir}/mysql_fix_extensions %attr(755, root, root) %{_bindir}/mysql_fix_privilege_tables +%attr(755, root, root) %{_bindir}/mysqlhotcopy %attr(755, root, root) %{_bindir}/mysql_install_db %attr(755, root, root) %{_bindir}/mysql_secure_installation %attr(755, root, root) %{_bindir}/mysql_setpermission -%attr(755, root, root) %{_bindir}/mysql_zap -%attr(755, root, root) %{_bindir}/mysqlbug -%attr(755, root, root) %{_bindir}/mysqld_multi -%attr(755, root, root) %{_bindir}/mysqld_safe -%attr(755, root, root) %{_bindir}/mysqlhotcopy %attr(755, root, root) %{_bindir}/mysqltest +%attr(755, root, root) %{_bindir}/mysql_zap %attr(755, root, root) %{_bindir}/pack_isam %attr(755, root, root) %{_bindir}/perror %attr(755, root, root) %{_bindir}/replace -%attr(755, root, root) %{_bindir}/resolve_stack_dump %attr(755, root, root) %{_bindir}/resolveip +%attr(755, root, root) %{_bindir}/resolve_stack_dump %attr(755, root, root) %{_bindir}/safe_mysqld %attr(755, root, root) %{_sbindir}/mysqld @@ -502,10 +509,14 @@ fi %attr(755, root, root) %{_bindir}/mysqlimport %attr(755, root, root) %{_bindir}/mysqlshow +%doc %attr(644, root, man) %{_mandir}/man1/msql2mysql.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqlaccess.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqladmin.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlbinlog.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlcheck.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqldump.1* +%doc %attr(644, root, man) %{_mandir}/man1/mysqlimport.1* %doc %attr(644, root, man) %{_mandir}/man1/mysqlshow.1* %post shared @@ -517,6 +528,7 @@ fi %files devel %defattr(-, root, root, 0755) %doc EXCEPTIONS-CLIENT +%doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1* %attr(755, root, root) %{_bindir}/comp_err %attr(755, root, root) %{_bindir}/mysql_config %dir %attr(755, root, root) %{_includedir}/mysql @@ -565,6 +577,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Thu Oct 27 2005 Lenz Grimmer + +- added more man pages + * Thu Oct 13 2005 Lenz Grimmer - added a usermod call to assign a potential existing mysql user to the From ac22cdc57745fe810546b4929d096019aaba00e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Oct 2005 18:32:14 +0200 Subject: [PATCH 11/16] - cleanup: removed the empty NEW-RPMS directory and all references - cleanup: removed obsolete support-files/MacOSX/make_mysql_pkg.pl script (we now use Do-pkg for building OS X packages) BitKeeper/deleted/.del-.cvsignore~4c7a1f88a5a62a24: Delete: NEW-RPMS/.cvsignore BitKeeper/deleted/.del-make_mysql_pkg.pl~caac82eb901cc206: Delete: support-files/MacOSX/make_mysql_pkg.pl netware/BUILD/compile-linux-tools: - removed reference to the NEW-RPMS directory netware/BUILD/compile-netware-END: - removed reference to the NEW-RPMS directory netware/BUILD/compile-netware-src: - removed reference to the NEW-RPMS directory --- NEW-RPMS/.cvsignore | 1 - netware/BUILD/compile-linux-tools | 1 - netware/BUILD/compile-netware-END | 1 - netware/BUILD/compile-netware-src | 1 - support-files/MacOSX/make_mysql_pkg.pl | 475 ------------------------- 5 files changed, 479 deletions(-) delete mode 100644 NEW-RPMS/.cvsignore delete mode 100644 support-files/MacOSX/make_mysql_pkg.pl diff --git a/NEW-RPMS/.cvsignore b/NEW-RPMS/.cvsignore deleted file mode 100644 index eee690e5a6c..00000000000 --- a/NEW-RPMS/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -MySQL-*.rpm diff --git a/netware/BUILD/compile-linux-tools b/netware/BUILD/compile-linux-tools index 886f866d674..523e0260087 100755 --- a/netware/BUILD/compile-linux-tools +++ b/netware/BUILD/compile-linux-tools @@ -18,7 +18,6 @@ path=`dirname $0` if test -e "Makefile"; then make -k clean; fi # remove files -rm -f NEW-RPMS/* rm -f */.deps/*.P rm -f */*.linux diff --git a/netware/BUILD/compile-netware-END b/netware/BUILD/compile-netware-END index 2bd59f97114..c5c08cea908 100755 --- a/netware/BUILD/compile-netware-END +++ b/netware/BUILD/compile-netware-END @@ -12,7 +12,6 @@ path=`dirname $0` if test -e "Makefile"; then make -k clean; fi # remove files -rm -f NEW-RPMS/* rm -f */.deps/*.P rm -rf Makefile.in.bk diff --git a/netware/BUILD/compile-netware-src b/netware/BUILD/compile-netware-src index df7f6fcdd1a..f4e8a53ffea 100644 --- a/netware/BUILD/compile-netware-src +++ b/netware/BUILD/compile-netware-src @@ -21,7 +21,6 @@ if test -e "Makefile"; then fi # remove other files -rm -f NEW-RPMS/* rm -f */.deps/*.P rm -rf Makefile.in.bk diff --git a/support-files/MacOSX/make_mysql_pkg.pl b/support-files/MacOSX/make_mysql_pkg.pl deleted file mode 100644 index 22283d57098..00000000000 --- a/support-files/MacOSX/make_mysql_pkg.pl +++ /dev/null @@ -1,475 +0,0 @@ -#!/usr/bin/perl -w -# -# -# make_mysql_pkg.pl -# -# This script creates a Mac OS X installation package -# of MySQL for Apple's Installer application. -# -# To use it: -# -# 1.) Unpack the mysql source tarball and cd into the directory -# 2.) execute this script -# -# -# Written by Marc Liyanage (http://www.entropy.ch) -# -# History: -# -# When Who What -# ------------------------------------------------------------------ -# 2001-09-16 Marc Liyanage First version -# 2001-11-18 Marc Liyanage Improved configure directory options -# - -use strict; -use DirHandle; - -my $data = {}; - -$data->{PREFIX_DIR} = "/usr/local/mysql"; -$data->{CONFIG} = join(" ", - "--prefix=$data->{PREFIX_DIR}", - "--localstatedir=$data->{PREFIX_DIR}/data", - "--libdir=$data->{PREFIX_DIR}/lib", - "--includedir=$data->{PREFIX_DIR}/include", - "--with-named-z-libs=/usr/local/libz.a", - "--with-innodb", - "--with-server-suffix='-entropy.ch'", - "--with-comment='http://www.entropy.ch/software/macosx/mysql/'", - "--with-mysqld-user=mysql", - "--enable-assembler", - "CFLAGS=\"-DHAVE_BROKEN_REALPATH -lncurses\"", -); - - - - - -prepare($data); -configure_source($data); -make($data); -make_binary_distribution($data); -create_pax_root($data); -create_package($data); -cleanup($data); - -print "Package $data->{PACKAGE_TARBALL_FILENAME} created\n"; - - - - - - -# Subroutines follow here... - - - - -# Prepares data in the global $data hash, like version numbers, -# directory names etc. Also makes sure that no old stuff -# is in our way. -# -sub prepare { - - my ($data) = @_; - - # Keep the current wd for reference - # - $data->{OLDWD} = `pwd`; - chomp($data->{OLDWD}); - - # Look for configure script - # - unless (-f "configure") { - abort($data, "Unable to find 'configure', make sure you're in the MySQL source toplevel directory!"); - } - - # Try to find version number there - # - my $mysql_version_h = `cat configure`; - ($data->{VERSION}) = $mysql_version_h =~ /^VERSION=(.+?)$/m; - - unless ($data->{VERSION} =~ /\d+/) { - abort($data, "Unable to find MySQL version number!"); - } - - debug($data, "found MySQL version number $data->{VERSION}"); - - - # PAXROOT_DIR is where we will build our own little - # fake /usr/local directory. Make sure it doesn't exist, - # then try to create it. - # - $data->{PAXROOT_DIR} = "/tmp/mysql-$data->{VERSION}-paxroot"; - - if (-e $data->{PAXROOT_DIR}) { - abort($data, "$data->{PAXROOT_DIR} exists, please remove first"); - } - - if (system("mkdir $data->{PAXROOT_DIR}")) { - abort($data, "Unable to mkdir $data->{PAXROOT_DIR}, please make sure you have the right permissions!"); - } - - - # PACKAGE_DIR is where we will build the package directory - # hierarchy, according to the standard .pkg layout. - # - $data->{PACKAGE_NAME} = "mysql-$data->{VERSION}.pkg"; - $data->{PACKAGE_DIR} = "/tmp/$data->{PACKAGE_NAME}"; - - if (-e $data->{PACKAGE_DIR}) { - abort($data, "$data->{PACKAGE_DIR} exists, please remove first"); - } - - if (system("mkdir $data->{PACKAGE_DIR}")) { - abort($data, "Unable to mkdir $data->{PACKAGE_DIR}, please make sure you have the right permissions!"); - } - - -} - - - -# Configure the MySQL source with our options -# -sub configure_source { - - my ($data) = @_; - - if (system("./configure $data->{CONFIG}")) { - abort($data, "Unable to configure!"); - } - -} - - - - -# Build the software -# -sub make { - - my ($data) = @_; - - if (system("make")) { - abort($data, "Unable to make!"); - } - -} - - - -# We don't ever install the software, but instead we use an -# included script to create a binary distribution -# tarball. -# -sub make_binary_distribution { - - my ($data) = @_; - - if (system("./scripts/make_binary_distribution > make_binary_distribution.out")) { - abort($data, "Unable to make_binary_distribution!"); - } - - my @output = `cat make_binary_distribution.out`; - my $last_line = $output[-1]; - unlink("make_binary_distribution.out"); - - my ($tarball_filename, $tarball_directory) = $last_line =~ /^((.+)\.tar\.gz) created/i; - - unless ($tarball_filename and -f $tarball_filename) { - abort($data, "Unable determine the output filename of scripts/make_binary_distribution!"); - } - - $data->{BINARY_TARBALL_FILENAME} = $tarball_filename; - $data->{BINARY_TARBALL_DIRECTORY} = $tarball_directory; - -} - - - - -# Now we build a fake /usr/local directory hierarchy. -# This will be fed to the pax tool to create the archive. -# -sub create_pax_root { - - my ($data) = @_; - - # Go there and try to extract the binary distribution - # tarball which we created in the previous step. - # - chdir($data->{PAXROOT_DIR}); - my $tarfile = "$data->{OLDWD}/$data->{BINARY_TARBALL_FILENAME}"; - - if (system("tar -xzf $tarfile")) { - abort($data, "Unable to extract $tarfile inside $data->{PAXROOT_DIR}"); - } - - # Rename it to what we want it to be in the - # installed /usr/local directory later on, i.e. - # mysql-. Then create a symlink from - # mysql to mysql- - # - rename($data->{BINARY_TARBALL_DIRECTORY}, "mysql-$data->{VERSION}"); - symlink("mysql-$data->{VERSION}", "mysql"); - - - # We create a bunch of symlinks in /usr/local/bin and - # /usr/local/share/man so that the end-user will not - # have to adjust PATH and MANPATH to include the - # /usr/local/mysql/bin and man directories. - # - system("mkdir -p $_") foreach qw(bin share/man); - - - # First create the symlinks in the bin directory - # - # 2001-02-13: we no longer use symlinks for the binaries, we - # use small dummy scripts instead because the - # mysql scripts do a lot of guesswork with their - # own path and that will not work when called via the symlink - # -# symlink("../mysql/bin/$_", "$_") foreach (grep {$_ !~ /^\.+$/} DirHandle->new("../mysql/bin")->read()); - - chdir("bin"); - - foreach my $command (grep {$_ !~ /^\.+$/} DirHandle->new("../mysql/bin")->read()) { - - my $scriptcode = qq+#!/bin/sh\n# Part of the entropy.ch mysql package\ncd /usr/local/mysql/\nexec ./bin/$command "\$\@"\n+; - open(SCRIPTFILE, ">$command") or die "Unable to write open $command\n"; - print SCRIPTFILE $scriptcode; - close(SCRIPTFILE); - chmod(0755, $command); - - } - - - - - - - - # Now include the man pages. Two problems here: - # 1.) the make_binary_distribution script does not seem - # to include the man pages, so we have to copy them over - # now. [outdated, was fixed by MySQL!] - # 2.) The man pages could be in different sections, so - # we have to recursively copy *and* symlink them. - # - - # First find out what's there in the source distribution. - # Store the names of the manpages in anonymous - # arrays which in turn will be stored in a hash, using - # the section numbers as hash keys. - # - chdir("$data->{PAXROOT_DIR}/mysql"); - my %man_sections; - foreach my $manpage (grep {$_ =~ /^.+\.(\d+)$/} DirHandle->new("man")->read()) { - - my ($section) = $manpage =~ /\.(\d+)$/; - - $man_sections{$section} ||= []; - push @{$man_sections{$section}}, "$manpage"; - - } - - - # Now iterate through the sections and man pages, - # and copy/symlink the man pages - # - chdir("$data->{PAXROOT_DIR}/share/man/"); - - foreach my $section (keys(%man_sections)) { - - system("mkdir -p man$section"); - chdir("man$section"); - - foreach my $manpage (@{$man_sections{$section}}) { - - symlink("../../../mysql/man/$manpage", $manpage) - - } - - chdir(".."); - - } - - - - # Fix up the library and lib directories. They are packed up wrong in the - # binary distribution tarball. - # - # (no longer needed as of 3.23.47) - # (oops, still needed because 3.23.47 is broken...) - # -# if (-d "$data->{PAXROOT_DIR}/mysql/lib/mysql") { -# abort($data, "$data->{PAXROOT_DIR}/mysql/lib/mysql exists, layout has changed!"); -# } -# chdir("$data->{PAXROOT_DIR}/mysql/lib/"); -# system("mkdir -p mysql"); -# system("mv * mysql"); - -# if (-d "$data->{PAXROOT_DIR}/mysql/include/mysql") { -# abort($data, "$data->{PAXROOT_DIR}/mysql/include/mysql exists, layout has changed!"); -# } -# chdir("$data->{PAXROOT_DIR}/mysql/include/"); -# system("mkdir -p mysql"); -# system("mv * mysql"); - - - - - - - - - -} - - - -# Take the pax root directory, create a few auxiliary -# files and then pack everything up into a tarball -# -sub create_package { - - my ($data) = @_; - - # Create the resources directory in which all - # interesting files for this package will be stored - # - $data->{PKG_RESOURCES_DIR} = "$data->{PACKAGE_DIR}/Contents/Resources"; - - if (system("mkdir -p $data->{PKG_RESOURCES_DIR}")) { - abort("Unable to create package resources dir $data->{PKG_RESOURCES_DIR}"); - } - - - # Create the big archive with all the files using - # the pax tool - # - chdir($data->{PAXROOT_DIR}); - if(system("pax -w . | gzip -c > $data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.pax.gz")) { - abort("Unable to create package pax file"); - } - - - # Create the "Bill Of Materials" (bom) file. - # - if(system("mkbom . $data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.bom")) { - abort("Unable to create package bom file"); - } - - - # Create the ".sizes" file with some information about the package - # - my $size_uncompressed = `du -sk $data->{PAXROOT_DIR} | cut -f 1`; - chomp($size_uncompressed); - - my $size_compressed = `du -sk $data->{PACKAGE_DIR} | cut -f 1`; - chomp($size_compressed); - - my $numfiles = `find /tmp/mysql-$data->{VERSION}-paxroot | wc -l`; - $numfiles--; - - open(SIZESFILE, ">$data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.sizes") or abort("Unable to write open sizes file $data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.sizes"); - print SIZESFILE "NumFiles $numfiles\n"; - print SIZESFILE "InstalledSize $size_uncompressed\n"; - print SIZESFILE "CompressedSize $size_compressed\n"; - close(SIZESFILE); - - - # Create the ".info" file with more information abou the package. - # - open(INFOFILE, ">$data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.info") or abort("Unable to write open sizes file $data->{PKG_RESOURCES_DIR}/mysql-$data->{VERSION}.info"); - my $infodata = join("", ); - $infodata =~ s/<%(.+?)%>/$data->{$1}/eg; - abort("Unable to get info file data from __DATA__!") unless ($infodata =~ /\w+/); - print INFOFILE $infodata; - close(INFOFILE); - - - - # Finally, create the .tar.gz file for the package, - # this is our end result - # - chdir($data->{PACKAGE_DIR}); - chdir(".."); - - $data->{PACKAGE_TARBALL_FILENAME} = "$data->{PACKAGE_NAME}.tar.gz"; - - if(system("tar -czf $data->{OLDWD}/$data->{PACKAGE_TARBALL_FILENAME} $data->{PACKAGE_NAME}")) { - abort("Unable to create package tar file $data->{OLDWD}/$data->{PACKAGE_TARBALL_FILENAME}"); - } - - - -} - - -# Abort with an error message -# -sub abort { - - my ($data, $errormessage) = @_; - - my ($caller) = (caller(1))[3]; - $caller =~ s/^main:://; - - print "*** Error: $caller(): $errormessage\n"; - - exit 1; - -} - - -# Output informative messages -# -sub debug { - - my ($data, $message) = @_; - - my ($caller) = (caller(1))[3]; - $caller =~ s/^main:://; - - print "*** Info: $caller(): $message\n"; - -} - - - -# Remove temporary items -# -sub cleanup { - - my ($data) = @_; - - chdir($data->{OLDWD}); - - system("rm -rf $data->{PACKAGE_DIR}"); - system("rm -rf $data->{PAXROOT_DIR}"); - system("rm $data->{BINARY_TARBALL_FILENAME}"); - -} - - - - -__DATA__ -Title MySQL -Version <%VERSION%> -Description The MySQL database server in a convenient Mac OS X package. Some additional configuration is necessary, please see http://www.entropy.ch/software/macosx/mysql/ -DefaultLocation /usr/local -Diskname (null) -DeleteWarning -NeedsAuthorization YES -DisableStop NO -UseUserMask NO -Application NO -Relocatable NO -Required NO -InstallOnly NO -RequiresReboot NO -InstallFat NO From 1fb1802e71d7535b74d6880e69b8fa39250b0390 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Nov 2005 11:05:52 +0200 Subject: [PATCH 12/16] Changed mysql-test-run to correspond to the one in 5.0 tree. --- mysql-test/mysql-test-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 9a2c4345bae..296bbecc843 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -208,9 +208,9 @@ MYSQL_MANAGER_USER=root # number is to be used, 0 - 16 or similar. # if [ -n "$MTR_BUILD_THREAD" ] ; then - MASTER_MYPORT=`expr $MTR_BUILD_THREAD '*' 40 + 8120` - SLAVE_MYPORT=`expr $MASTER_MYPORT + 16` + MASTER_MYPORT=`expr $MTR_BUILD_THREAD '*' 5 + 10000` MYSQL_MANAGER_PORT=`expr $MASTER_MYPORT + 2` + SLAVE_MYPORT=`expr $MASTER_MYPORT + 3` echo "Using MTR_BUILD_THREAD = $MTR_BUILD_THREAD" echo "Using MASTER_MYPORT = $MASTER_MYPORT" From 9a714420677f0e5412f3f8df92425f28976d2c39 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Nov 2005 11:19:06 +0200 Subject: [PATCH 13/16] Added new build script for pentium64. --- BUILD/compile-pentium64-debug-max | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 BUILD/compile-pentium64-debug-max diff --git a/BUILD/compile-pentium64-debug-max b/BUILD/compile-pentium64-debug-max new file mode 100755 index 00000000000..f0745c88c90 --- /dev/null +++ b/BUILD/compile-pentium64-debug-max @@ -0,0 +1,13 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" $@ --with-debug=full + +extra_flags="$pentium64_cflags $debug_cflags $max_cflags" +c_warnings="$c_warnings $debug_extra_warnings" +cxx_warnings="$cxx_warnings $debug_extra_warnings" +extra_configs="$pentium_configs $debug_configs $max_configs" + +extra_configs="$extra_configs " + +. "$path/FINISH.sh" From fb4c949f57b281a232ea581e26b8c48be6c1d873 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Nov 2005 11:47:54 +0200 Subject: [PATCH 14/16] Added test-force to Makefile. --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.am b/Makefile.am index 35c5a51caf4..54bafaaa40a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -96,3 +96,7 @@ tags: test: cd mysql-test ; \ ./mysql-test-run + +test-force: + cd mysql-test ; \ + ./mysql-test-run --force From 7d183320b0e9b271efe6017986b904b694d32310 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Nov 2005 18:24:12 +0100 Subject: [PATCH 15/16] Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Version for 4.0. It fixes two problems: 1. The cause of the bug was that we did not check the table version for the HANDLER ... READ commands. We did not notice when a table was replaced by a new one. This can happen during ALTER TABLE, REPAIR TABLE, and OPTIMIZE TABLE (there might be more cases). I call the fix for this problem "the primary bug fix". 2. mysql_ha_flush() was not always called with a locked LOCK_open. Though the function comment clearly said it must. I changed the code so that the locking is done when required. I call the fix for this problem "the secondary fix". mysql-test/r/handler.result: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash The test result. mysql-test/t/handler.test: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash The test case. sql/mysql_priv.h: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Changed a definition for the secondary fix. sql/sql_base.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Changed function calls for the secondary fix. sql/sql_class.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Changed a function call for the secondary fix. sql/sql_handler.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash The first two diffs make the primary bug fix. The rest is for the secondary fix. sql/sql_table.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Changed function calls for the secondary fix. --- mysql-test/r/handler.result | 18 ++++++++++++++ mysql-test/t/handler.test | 29 ++++++++++++++++++++++ sql/mysql_priv.h | 3 ++- sql/sql_base.cc | 7 +++--- sql/sql_class.cc | 2 +- sql/sql_handler.cc | 49 ++++++++++++++++++++++++++++++++++--- sql/sql_table.cc | 6 ++--- 7 files changed, 102 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result index 5af153930d5..3a61236ea14 100644 --- a/mysql-test/r/handler.result +++ b/mysql-test/r/handler.result @@ -447,3 +447,21 @@ drop table t2; drop table t3; drop table t4; drop table t5; +create table t1 (c1 int); +insert into t1 values (1); +handler t1 open; +handler t1 read first; +c1 +1 +send the below to another connection, do not wait for the result + optimize table t1; +proceed with the normal connection +handler t1 read next; +c1 +1 +handler t1 close; +read the result from the other connection +Table Op Msg_type Msg_text +test.t1 optimize status OK +proceed with the normal connection +drop table t1; diff --git a/mysql-test/t/handler.test b/mysql-test/t/handler.test index 53fe8c0a059..d91587b8070 100644 --- a/mysql-test/t/handler.test +++ b/mysql-test/t/handler.test @@ -339,3 +339,32 @@ drop table t2; drop table t3; drop table t4; drop table t5; + +# +# Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash +# +create table t1 (c1 int); +insert into t1 values (1); +# client 1 +handler t1 open; +handler t1 read first; +# client 2 +connect (con2,localhost,root,,); +connection con2; +--exec echo send the below to another connection, do not wait for the result +send optimize table t1; +--sleep 1 +# client 1 +--exec echo proceed with the normal connection +connection default; +handler t1 read next; +handler t1 close; +# client 2 +--exec echo read the result from the other connection +connection con2; +reap; +# client 1 +--exec echo proceed with the normal connection +connection default; +drop table t1; + diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 9b9edd905ad..526b79cd73a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -547,7 +547,8 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen= 0); int mysql_ha_close(THD *thd, TABLE_LIST *tables); int mysql_ha_read(THD *, TABLE_LIST *,enum enum_ha_read_modes,char *, List *,enum ha_rkey_function,Item *,ha_rows,ha_rows); -int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags); +int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags, + bool is_locked); /* mysql_ha_flush mode_flags bits */ #define MYSQL_HA_CLOSE_FINAL 0x00 #define MYSQL_HA_REOPEN_ON_USAGE 0x01 diff --git a/sql/sql_base.cc b/sql/sql_base.cc index bc2ad9fff50..4f52904a61e 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -390,7 +390,8 @@ bool close_cached_tables(THD *thd, bool if_wait_for_refresh, thd->proc_info="Flushing tables"; close_old_data_files(thd,thd->open_tables,1,1); - mysql_ha_flush(thd, tables, MYSQL_HA_REOPEN_ON_USAGE | MYSQL_HA_FLUSH_ALL); + mysql_ha_flush(thd, tables, MYSQL_HA_REOPEN_ON_USAGE | MYSQL_HA_FLUSH_ALL, + TRUE); bool found=1; /* Wait until all threads has closed all the tables we had locked */ DBUG_PRINT("info", ("Waiting for others threads to close their open tables")); @@ -863,7 +864,7 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, } /* close handler tables which are marked for flush */ - mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE); + mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE, TRUE); for (table=(TABLE*) hash_search(&open_cache,(byte*) key,key_length) ; table && table->in_use ; @@ -1262,7 +1263,7 @@ bool wait_for_tables(THD *thd) { thd->some_tables_deleted=0; close_old_data_files(thd,thd->open_tables,0,dropping_tables != 0); - mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE); + mysql_ha_flush(thd, (TABLE_LIST*) NULL, MYSQL_HA_REOPEN_ON_USAGE, TRUE); if (!table_is_used(thd->open_tables,1)) break; (void) pthread_cond_wait(&COND_refresh,&LOCK_open); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 9dd75b32d5d..66d23ada163 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -217,7 +217,7 @@ void THD::cleanup(void) close_thread_tables(this); } mysql_ha_flush(this, (TABLE_LIST*) 0, - MYSQL_HA_CLOSE_FINAL | MYSQL_HA_FLUSH_ALL); + MYSQL_HA_CLOSE_FINAL | MYSQL_HA_FLUSH_ALL, FALSE); hash_free(&handler_tables_hash); close_temporary_tables(this); hash_free(&user_vars); diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index fcdb2aeb668..28e94d1a477 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -357,6 +357,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables, ha_rows select_limit,ha_rows offset_limit) { TABLE_LIST *hash_tables; + TABLE **table_ptr; TABLE *table; int err; int keyno=-1; @@ -379,6 +380,27 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables, DBUG_PRINT("info-in-hash",("'%s'.'%s' as '%s' tab %p", hash_tables->db, hash_tables->real_name, hash_tables->alias, table)); + /* Table might have been flushed. */ + if (table && (table->version != refresh_version)) + { + /* + We must follow the thd->handler_tables chain, as we need the + address of the 'next' pointer referencing this table + for close_thread_table(). + */ + for (table_ptr= &(thd->handler_tables); + *table_ptr && (*table_ptr != table); + table_ptr= &(*table_ptr)->next) + {} + VOID(pthread_mutex_lock(&LOCK_open)); + if (close_thread_table(thd, table_ptr)) + { + /* Tell threads waiting for refresh that something has happened */ + VOID(pthread_cond_broadcast(&COND_refresh)); + } + VOID(pthread_mutex_unlock(&LOCK_open)); + table= hash_tables->table= NULL; + } if (!table) { /* @@ -593,6 +615,7 @@ err0: MYSQL_HA_REOPEN_ON_USAGE mark for reopen. MYSQL_HA_FLUSH_ALL flush all tables, not only those marked for flush. + is_locked If LOCK_open is locked. DESCRIPTION The list of HANDLER tables may be NULL, in which case all HANDLER @@ -600,7 +623,6 @@ err0: If 'tables' is NULL and MYSQL_HA_FLUSH_ALL is not set, all HANDLER tables marked for flush are closed. Broadcasts a COND_refresh condition, for every table closed. - The caller must lock LOCK_open. NOTE Since mysql_ha_flush() is called when the base table has to be closed, @@ -610,10 +632,12 @@ err0: 0 ok */ -int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags) +int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags, + bool is_locked) { TABLE_LIST *tmp_tables; TABLE **table_ptr; + bool did_lock= FALSE; DBUG_ENTER("mysql_ha_flush"); DBUG_PRINT("enter", ("tables: %p mode_flags: 0x%02x", tables, mode_flags)); @@ -637,6 +661,12 @@ int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags) (*table_ptr)->table_cache_key, (*table_ptr)->real_name, (*table_ptr)->table_name)); + /* The first time it is required, lock for close_thread_table(). */ + if (! did_lock && ! is_locked) + { + VOID(pthread_mutex_lock(&LOCK_open)); + did_lock= TRUE; + } mysql_ha_flush_table(thd, table_ptr, mode_flags); continue; } @@ -655,6 +685,12 @@ int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags) if ((mode_flags & MYSQL_HA_FLUSH_ALL) || ((*table_ptr)->version != refresh_version)) { + /* The first time it is required, lock for close_thread_table(). */ + if (! did_lock && ! is_locked) + { + VOID(pthread_mutex_lock(&LOCK_open)); + did_lock= TRUE; + } mysql_ha_flush_table(thd, table_ptr, mode_flags); continue; } @@ -662,6 +698,10 @@ int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags) } } + /* Release the lock if it was taken by this function. */ + if (did_lock) + VOID(pthread_mutex_unlock(&LOCK_open)); + DBUG_RETURN(0); } @@ -693,8 +733,8 @@ static int mysql_ha_flush_table(THD *thd, TABLE **table_ptr, uint mode_flags) table->table_name, mode_flags)); if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash, - (byte*) (*table_ptr)->table_name, - strlen((*table_ptr)->table_name) + 1))) + (byte*) table->table_name, + strlen(table->table_name) + 1))) { if (! (mode_flags & MYSQL_HA_REOPEN_ON_USAGE)) { @@ -708,6 +748,7 @@ static int mysql_ha_flush_table(THD *thd, TABLE **table_ptr, uint mode_flags) } } + safe_mutex_assert_owner(&LOCK_open); if (close_thread_table(thd, table_ptr)) { /* Tell threads waiting for refresh that something has happened */ diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 4c269e6830f..987d12ccb40 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -179,7 +179,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, { char *db=table->db; uint flags; - mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL); + mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL, TRUE); if (!close_temporary_table(thd, db, table->real_name)) { tmp_table_deleted=1; @@ -1239,7 +1239,7 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables, if (send_fields(thd, field_list, 1)) DBUG_RETURN(-1); - mysql_ha_flush(thd, tables, MYSQL_HA_CLOSE_FINAL); + mysql_ha_flush(thd, tables, MYSQL_HA_CLOSE_FINAL, FALSE); for (table = tables; table; table = table->next) { char table_name[NAME_LEN*2+2]; @@ -1500,7 +1500,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name, } used_fields=create_info->used_fields; - mysql_ha_flush(thd, table_list, MYSQL_HA_CLOSE_FINAL); + mysql_ha_flush(thd, table_list, MYSQL_HA_CLOSE_FINAL, FALSE); if (!(table=open_ltable(thd,table_list,TL_WRITE_ALLOW_READ))) DBUG_RETURN(-1); From 5412ee4f299a4a2d71db1b7e5f3e62132032fb00 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 7 Nov 2005 12:16:49 +0100 Subject: [PATCH 16/16] Bug#14616 - Freshly imported table returns error 124 when using LIMIT Initialized usable_keys from table->keys_in_use instead of ~0 in test_if_skip_sort_order(). It was possible that a disabled index was used for sorting. mysql-test/r/myisam.result: Bug#14616 - Freshly imported table returns error 124 when using LIMIT The test result. mysql-test/t/myisam.test: Bug#14616 - Freshly imported table returns error 124 when using LIMIT The test case. --- mysql-test/r/myisam.result | 10 ++++++++++ mysql-test/t/myisam.test | 12 ++++++++++++ sql/sql_select.cc | 8 ++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index c55bacdd371..e6df3499eb5 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -462,3 +462,13 @@ select count(*) from t1 where a is null; count(*) 2 drop table t1; +create table t1 ( +c1 varchar(32), +key (c1) +) engine=myisam; +alter table t1 disable keys; +insert into t1 values ('a'), ('b'); +select c1 from t1 order by c1 limit 1; +c1 +a +drop table t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 57b64e30bac..a502002d30e 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -446,3 +446,15 @@ explain select count(*) from t1 where a is null; select count(*) from t1 where a is null; drop table t1; +# +# Bug#14616 - Freshly imported table returns error 124 when using LIMIT +# +create table t1 ( + c1 varchar(32), + key (c1) +) engine=myisam; +alter table t1 disable keys; +insert into t1 values ('a'), ('b'); +select c1 from t1 order by c1 limit 1; +drop table t1; + diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 46f0139a608..6dd68a60f88 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6003,8 +6003,12 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, key_map usable_keys; DBUG_ENTER("test_if_skip_sort_order"); - /* Check which keys can be used to resolve ORDER BY */ - usable_keys= ~(key_map) 0; + /* + Check which keys can be used to resolve ORDER BY. + We must not try to use disabled keys. + */ + usable_keys= table->keys_in_use; + for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next) { if ((*tmp_order->item)->type() != Item::FIELD_ITEM)