From ea82b7c68779a105d686570b6f1849c4c9ad41b7 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2001 23:57:43 +0300 Subject: [PATCH 1/9] Updated Changelog Docs/manual.texi: Added slave_read_timeout --- Docs/manual.texi | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index ec06cdf13b2..989d083ba00 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -22277,7 +22277,7 @@ is automatically enlarged, up to @code{max_allowed_packet} bytes.) @item @code{net_read_timeout} Number of seconds to wait for more data from a connection before aborting the read. Note that when we don't expect data from a connection, the timeout -is defined by @code{write_timeout}. +is defined by @code{write_timeout}. See also @code{slave_read_timeout}. @item @code{net_retry_count} If a read on a communication port is interrupted, retry this many times @@ -22335,6 +22335,10 @@ the @code{PROCESS_PRIV} privilege. This can improve security if you're concerned about people being able to see what databases other users have. See also @code{safe_show_databases}. +@item @code{slave_read_timeout} +Number of seconds to wait for more data from a master/slave connection +before aborting the read. + @item @code{slow_launch_time} If creating the thread takes longer than this value (in seconds), the @code{Slow_launch_threads} counter will be incremented. @@ -29379,7 +29383,6 @@ times, once for each table.(Example: @code{replicate-ignore-table=foo%.bar%} - will not upates to tables in all databases that start with foo and whose table names start with bar) - @item @code{replicate-ignore-db=database_name} @tab Tells the slave thread to not replicate to the specified database. To specify more than one database to ignore, use the directive multiple @@ -29400,7 +29403,6 @@ you have 3.23.28 or later, and use @code{replicate-wild-do-table=db_name.%} (Example: @code{replicate-do-db=some_db}) - @item @code{log-slave-updates} @tab Tells the slave to log the updates from the slave thread to the binary log. Off by default. You will need to turn it on if you plan to @@ -29413,6 +29415,10 @@ Updates to a database with a different name than the original (Example: @item @code{skip-slave-start} @tab Tells the slave server not to start the slave on the startup. The user can start it later with @code{SLAVE START}. + +@item @code{slave_read_timeout=#} +Number of seconds to wait for more data from the master before aborting +the read. @end multitable @cindex SQL commands, replication @@ -45717,6 +45723,8 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.40 @itemize @bullet @item +Added @code{slave_wait_timeout} for replication. +@item Fixed problem with @code{UPDATE} and BDB tables. @item Fixed problem when using the @code{GRANT FILE ON database.* ...}; Previously From f63d29f515332ebd4454f1cfc200a03ea7722e82 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2001 17:11:19 -0400 Subject: [PATCH 2/9] configure.in Fix "$target_os" = "freebsd" test; not a critical fix. configure.in: Fix "$target_os" = "freebsd" test; not a critical fix. --- configure.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 37bc22ff63e..e1a1d6eac6e 100644 --- a/configure.in +++ b/configure.in @@ -1122,10 +1122,10 @@ if test "$ac_cv_lib_pthread_strtok_r" = "no" then my_save_LIBS="$LIBS" AC_CHECK_LIB(c_r,strtok_r) - if test "$with_osf32_threads" = "yes" -o "$target_os" = "FreeBSD" -o "$target_os" = "freebsd" - then - LIBS="$my_save_LIBS" - fi + case "$with_osf32_threads---$target_os" in + # Don't keep -lc_r in LIBS; -pthread handles it magically + yes---* | *---freebsd* ) LIBS="$my_save_LIBS" ;; + esac AC_CHECK_FUNCS(strtok_r pthread_init) else AC_CHECK_FUNCS(strtok_r) From c35334543c2d48f2a4527c3b837913133c8fff6d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Jul 2001 17:30:17 -0400 Subject: [PATCH 3/9] bdb.test new test for a bug report mysql-test/t/bdb.test: new test for a bug report --- mysql-test/t/bdb.test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test index c61a6c7197d..ed167d8d005 100644 --- a/mysql-test/t/bdb.test +++ b/mysql-test/t/bdb.test @@ -715,3 +715,18 @@ CREATE TABLE t2 ( SYAIN_NO char(5) NOT NULL default '',STR_DATE char(8) NOT NULL select T1.KINMU_DATE from t1 T1 ,t2 T2 where T1.SYAIN_NO = '12345' and T1.KINMU_DATE = '200106' and T2.SYAIN_NO = T1.SYAIN_NO; select T1.KINMU_DATE from t1 T1 ,t2 T2 where T1.SYAIN_NO = '12345' and T1.KINMU_DATE = '200106' and T2.SYAIN_NO = T1.SYAIN_NO; DROP TABLE t1,t2; + +# +# Test problem with joining table to itself on a multi-part unique key +# + +drop table if exists t; +create table t (a int(11) not null, b int(11) not null, unique (a,b)) type=bdb; + +insert into t values (1,1), (1,2); + +select * from t where a = 1; +select t1.*, t2.* from t t1, t t2 where t1.a = t2.a and t2.a = 1; +select * from t where a = 1; + +drop table t; From 653d19af023b8a02a24cda15e69f674423f44377 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2001 11:31:18 +0300 Subject: [PATCH 4/9] Fixed problem with part keys and BDB tables Docs/manual.texi: Changelog --- Docs/manual.texi | 11 +++++++++-- bdb/include/db.src | 1 + mysql-test/r/bdb.result | 11 +++++++++++ sql/ha_berkeley.cc | 15 +++++++++++---- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index 989d083ba00..3d355bd0410 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -3145,6 +3145,10 @@ unsubscribe from the @code{myodbc} list, send a message to @email{myodbc-subscribe@@lists.mysql.com} or @email{myodbc-unsubscribe@@lists.mysql.com}. +If you can't get an answer for your questions from the mailing list, one +option is to pay for support from @strong{MySQL AB}, which will put you +in direct contact with @strong{MySQL} developers. @xref{Support}. + The following table shows some @strong{MySQL} mailing in other languages than English. Note that these are not operated by @strong{MySQL AB}, so we can't guarantee the quality on these. @@ -7584,7 +7588,7 @@ You should also add /etc/my.cnf: open_files_limit=8192 @end example -The above should allow @strong{MySQL} to create up to 8192 connections + files. +The above should allow @strong{MySQL} to create up to 8192 connections/files. The @code{STACK_SIZE} constant in LinuxThreads controls the spacing of thread stacks in the address space. It needs to be large enough so that there will @@ -30742,7 +30746,8 @@ method for changing the limit varies widely from system to system. @code{table_cache} is related to @code{max_connections}. For example, for 200 concurrent running connections, you should have a table cache of at least @code{200 * n}, where @code{n} is the maximum number of tables -in a join. +in a join. You also need to reserve some extra file descriptors for +temporary tables and files. The cache of open tables can grow to a maximum of @code{table_cache} (default 64; this can be changed with the @code{-O table_cache=#} @@ -45727,6 +45732,8 @@ Added @code{slave_wait_timeout} for replication. @item Fixed problem with @code{UPDATE} and BDB tables. @item +Fixed hard bug in BDB tables when using key parts. +@item Fixed problem when using the @code{GRANT FILE ON database.* ...}; Previously we added the @code{DROP} privilege for the database. @item diff --git a/bdb/include/db.src b/bdb/include/db.src index bcb9033eed1..5226d4e98c6 100644 --- a/bdb/include/db.src +++ b/bdb/include/db.src @@ -119,6 +119,7 @@ struct __db_dbt { u_int32_t dlen; /* RO: get/put record length. */ u_int32_t doff; /* RO: get/put record offset. */ + void *app_private; /* Application-private handle. */ #define DB_DBT_ISSET 0x001 /* Lower level calls set value. */ #define DB_DBT_MALLOC 0x002 /* Return in malloc'd memory. */ #define DB_DBT_PARTIAL 0x004 /* Partial put/get. */ diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index c88b7375aec..89d9c56b3b0 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -511,3 +511,14 @@ id id3 100 2 KINMU_DATE KINMU_DATE +a b +1 1 +1 2 +a b a b +1 1 1 1 +1 1 1 2 +1 2 1 1 +1 2 1 2 +a b +1 1 +1 2 diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index d2b3ef62865..6907da855b9 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -351,7 +351,8 @@ berkeley_cmp_hidden_key(DB* file, const DBT *new_key, const DBT *saved_key) static int berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key) { - KEY *key= (KEY*) (file->app_private); + KEY *key= (new_key->app_private ? (KEY*) new_key->app_private : + (KEY*) (file->app_private)); char *new_key_ptr= (char*) new_key->data; char *saved_key_ptr=(char*) saved_key->data; KEY_PART_INFO *key_part= key->key_part, *end=key_part+key->key_parts; @@ -388,7 +389,8 @@ berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key) static int berkeley_cmp_fix_length_key(DB *file, const DBT *new_key, const DBT *saved_key) { - KEY *key=(KEY*) (file->app_private); + KEY *key= (new_key->app_private ? (KEY*) new_key->app_private : + (KEY*) (file->app_private)); char *new_key_ptr= (char*) new_key->data; char *saved_key_ptr=(char*) saved_key->data; KEY_PART_INFO *key_part= key->key_part, *end=key_part+key->key_parts; @@ -730,9 +732,9 @@ DBT *ha_berkeley::create_key(DBT *key, uint keynr, char *buff, const byte *record, int key_length) { bzero((char*) key,sizeof(*key)); - if (hidden_primary_key && keynr == primary_key) { + /* We don't need to set app_private here */ key->data=current_ident; key->size=BDB_HIDDEN_PRIMARY_KEY_LENGTH; return key; @@ -744,6 +746,7 @@ DBT *ha_berkeley::create_key(DBT *key, uint keynr, char *buff, DBUG_ENTER("create_key"); key->data=buff; + key->app_private= key_info; for ( ; key_part != end && key_length > 0; key_part++) { if (key_part->null_bit) @@ -777,10 +780,11 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff, KEY *key_info=table->key_info+keynr; KEY_PART_INFO *key_part=key_info->key_part; KEY_PART_INFO *end=key_part+key_info->key_parts; - DBUG_ENTER("pack_key2"); + DBUG_ENTER("bdb:pack_key"); bzero((char*) key,sizeof(*key)); key->data=buff; + key->app_private= (void*) key_info; for (; key_part != end && (int) key_length > 0 ; key_part++) { @@ -1373,6 +1377,7 @@ int ha_berkeley::read_row(int error, char *buf, uint keynr, DBT *row, bzero((char*) &key,sizeof(key)); key.data=key_buff; key.size=row->size; + key.app_private= (void*) (table->key_info+primary_key); memcpy(key_buff,row->data,row->size); /* Read the data into current_row */ current_row.flags=DB_DBT_REALLOC; @@ -1537,6 +1542,7 @@ int ha_berkeley::rnd_next(byte *buf) DBT *ha_berkeley::get_pos(DBT *to, byte *pos) { + /* We don't need to set app_private here */ bzero((char*) to,sizeof(*to)); to->data=pos; @@ -1950,6 +1956,7 @@ longlong ha_berkeley::get_auto_increment() table->next_number_key_offset); /* Store for compare */ memcpy(old_key.data=key_buff2, key_buff, (old_key.size=last_key.size)); + old_key.app_private=(void*) key_info; error=1; { /* Modify the compare so that we will find the next key */ From 2cbf3b9b532e048dbe3d42669bff539c5864236e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2001 14:32:54 +0300 Subject: [PATCH 5/9] Updated version number Update to new debian files configure.in: Updated version number sql-bench/Results/ATIS-mysql-Linux_2.2.16_SMP_alpha: New benchmark results sql-bench/Results/RUN-mysql-Linux_2.2.16_SMP_alpha: New benchmark results sql-bench/Results/alter-table-mysql-Linux_2.2.16_SMP_alpha: New benchmark results sql-bench/Results/big-tables-mysql-Linux_2.2.16_SMP_alpha: New benchmark results sql-bench/Results/connect-mysql-Linux_2.2.16_SMP_alpha: New benchmark results sql-bench/Results/create-mysql-Linux_2.2.16_SMP_alpha: New benchmark results sql-bench/Results/insert-mysql-Linux_2.2.16_SMP_alpha: New benchmark results sql-bench/Results/select-mysql-Linux_2.2.16_SMP_alpha: New benchmark results sql-bench/Results/wisconsin-mysql-Linux_2.2.16_SMP_alpha: New benchmark results support-files/debian/README.debian: Update to new debian files support-files/debian/changelog: Update to new debian files support-files/debian/control: Update to new debian files support-files/debian/gomi: Update to new debian files support-files/debian/move: Update to new debian files support-files/debian/patches/ab: Update to new debian files support-files/debian/patches/ad: Update to new debian files support-files/debian/patches/ae: Update to new debian files support-files/debian/rules: Update to new debian files support-files/debian/shlibs: Update to new debian files --- configure.in | 2 +- .../Results/ATIS-mysql-Linux_2.2.16_SMP_alpha | 20 +- .../Results/RUN-mysql-Linux_2.2.16_SMP_alpha | 183 +++++++++--------- .../alter-table-mysql-Linux_2.2.16_SMP_alpha | 10 +- .../big-tables-mysql-Linux_2.2.16_SMP_alpha | 12 +- .../connect-mysql-Linux_2.2.16_SMP_alpha | 20 +- .../create-mysql-Linux_2.2.16_SMP_alpha | 14 +- .../insert-mysql-Linux_2.2.16_SMP_alpha | 98 +++++----- .../select-mysql-Linux_2.2.16_SMP_alpha | 34 ++-- .../wisconsin-mysql-Linux_2.2.16_SMP_alpha | 10 +- support-files/debian/README.debian | 9 + support-files/debian/changelog | 137 ++++++++++++- support-files/debian/control | 67 +++++-- support-files/debian/gomi | 9 +- support-files/debian/libmysqlclient10.dirs | 1 + .../debian/libmysqlclient10.postinst | 3 + support-files/debian/move | 21 +- support-files/debian/mysql-max-debug.dirs | 1 + support-files/debian/mysql-max-debug.postinst | 3 + support-files/debian/mysql-max-debug.postrm | 3 + support-files/debian/mysql-max-shared.dirs | 1 + .../debian/mysql-max-shared.postinst | 3 + support-files/debian/mysql-max-shared.postrm | 3 + support-files/debian/mysql-max.dirs | 1 + support-files/debian/mysql-max.postinst | 3 + support-files/debian/mysql-max.postrm | 3 + support-files/debian/patches/ab | 31 ++- support-files/debian/patches/ad | 53 +---- support-files/debian/patches/ae | 48 ++--- support-files/debian/patches/ta | 68 +++++++ support-files/debian/patches/tb | 86 ++++++++ support-files/debian/rules | 81 +++++++- support-files/debian/shlibs | 2 +- 33 files changed, 710 insertions(+), 330 deletions(-) create mode 100644 support-files/debian/libmysqlclient10.dirs create mode 100644 support-files/debian/libmysqlclient10.postinst create mode 100644 support-files/debian/mysql-max-debug.dirs create mode 100644 support-files/debian/mysql-max-debug.postinst create mode 100644 support-files/debian/mysql-max-debug.postrm create mode 100644 support-files/debian/mysql-max-shared.dirs create mode 100644 support-files/debian/mysql-max-shared.postinst create mode 100644 support-files/debian/mysql-max-shared.postrm create mode 100644 support-files/debian/mysql-max.dirs create mode 100644 support-files/debian/mysql-max.postinst create mode 100644 support-files/debian/mysql-max.postrm create mode 100644 support-files/debian/patches/ta create mode 100644 support-files/debian/patches/tb diff --git a/configure.in b/configure.in index 17098e85157..cfe6d323021 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! -AM_INIT_AUTOMAKE(mysql, 3.23.39) +AM_INIT_AUTOMAKE(mysql, 3.23.40) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 diff --git a/sql-bench/Results/ATIS-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/ATIS-mysql-Linux_2.2.16_SMP_alpha index c4791adf90d..4f87bebff3d 100644 --- a/sql-bench/Results/ATIS-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/ATIS-mysql-Linux_2.2.16_SMP_alpha @@ -1,20 +1,20 @@ -Testing server 'MySQL 3.23.36' at 2001-03-26 1:22:18 +Testing server 'MySQL 3.23.39' at 2002-09-08 10:26:22 ATIS table test Creating tables -Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for create_table (28): 0 wallclock secs ( 0.00 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Inserting data -Time to insert (9768): 4 wallclock secs ( 0.57 usr 0.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to insert (9768): 3 wallclock secs ( 0.51 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Retrieving data -Time for select_simple_join (500): 1 wallclock secs ( 0.58 usr 0.37 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_join (100): 2 wallclock secs ( 0.44 usr 0.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_key_prefix_join (100): 11 wallclock secs ( 3.47 usr 2.55 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_distinct (800): 10 wallclock secs ( 1.53 usr 0.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_group (2800): 11 wallclock secs ( 1.44 usr 0.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_simple_join (500): 2 wallclock secs ( 0.58 usr 0.37 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_join (100): 2 wallclock secs ( 0.48 usr 0.33 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key_prefix_join (100): 10 wallclock secs ( 3.45 usr 2.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_distinct (800): 11 wallclock secs ( 1.54 usr 0.97 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_group (2800): 11 wallclock secs ( 1.48 usr 0.63 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Removing tables -Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Total time: 39 wallclock secs ( 8.05 usr 5.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to drop_table (28): 0 wallclock secs ( 0.00 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 39 wallclock secs ( 8.05 usr 5.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/RUN-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/RUN-mysql-Linux_2.2.16_SMP_alpha index f0287b6bde7..fe7dd396f30 100644 --- a/sql-bench/Results/RUN-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/RUN-mysql-Linux_2.2.16_SMP_alpha @@ -1,103 +1,104 @@ -Benchmark DBD suite: 2.12 -Date of test: 2001-03-26 1:22:18 +Benchmark DBD suite: 2.13 +Date of test: 2002-09-08 10:26:21 Running tests on: Linux 2.2.16-SMP alpha Arguments: Comments: Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; cxx 6.3 + ccc 6.2.9 Limits from: -Server version: MySQL 3.23.36 +Server version: MySQL 3.23.39 -ATIS: Total time: 39 wallclock secs ( 8.05 usr 5.53 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -alter-table: Total time: 405 wallclock secs ( 0.30 usr 0.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -big-tables: Total time: 40 wallclock secs ( 7.49 usr 10.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -connect: Total time: 76 wallclock secs (33.34 usr 18.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -create: Total time: 147 wallclock secs ( 9.75 usr 5.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -insert: Total time: 2318 wallclock secs (663.06 usr 307.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -select: Total time: 1346 wallclock secs (63.34 usr 28.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -wisconsin: Total time: 19 wallclock secs ( 3.99 usr 3.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +ATIS: Total time: 39 wallclock secs ( 8.05 usr 5.44 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +alter-table: Total time: 345 wallclock secs ( 0.29 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +big-tables: Total time: 38 wallclock secs ( 7.19 usr 9.54 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +connect: Total time: 76 wallclock secs (34.04 usr 17.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +create: Total time: 225 wallclock secs (10.03 usr 4.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +insert: Total time: 2279 wallclock secs (634.62 usr 299.74 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +select: Total time: 1360 wallclock secs (65.68 usr 27.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +wisconsin: Total time: 18 wallclock secs ( 3.78 usr 3.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) All 8 test executed successfully Totals per operation: Operation seconds usr sys cpu tests -alter_table_add 219.00 0.16 0.07 0.00 992 -alter_table_drop 178.00 0.06 0.04 0.00 496 -connect 14.00 7.60 2.34 0.00 10000 -connect+select_1_row 17.00 8.25 3.12 0.00 10000 -connect+select_simple 16.00 7.88 3.28 0.00 10000 -count 55.00 0.04 0.01 0.00 100 -count_distinct 48.00 0.40 0.10 0.00 1000 -count_distinct_2 50.00 0.42 0.12 0.00 1000 -count_distinct_big 137.00 6.05 7.22 0.00 120 -count_distinct_group 69.00 0.98 0.61 0.00 1000 -count_distinct_group_on_key 42.00 0.42 0.15 0.00 1000 -count_distinct_group_on_key_parts 70.00 0.97 0.59 0.00 1000 -count_distinct_key_prefix 38.00 0.39 0.12 0.00 1000 -count_group_on_key_parts 42.00 0.94 0.56 0.00 1000 -count_on_key 391.00 16.30 4.71 0.00 50100 -create+drop 13.00 2.39 1.35 0.00 10000 -create_MANY_tables 104.00 1.76 0.73 0.00 10000 +alter_table_add 187.00 0.18 0.06 0.00 992 +alter_table_drop 150.00 0.05 0.05 0.00 496 +connect 14.00 8.11 2.28 0.00 10000 +connect+select_1_row 17.00 8.45 3.08 0.00 10000 +connect+select_simple 16.00 8.44 2.99 0.00 10000 +count 50.00 0.04 0.01 0.00 100 +count_distinct 51.00 0.44 0.11 0.00 1000 +count_distinct_2 49.00 0.41 0.14 0.00 1000 +count_distinct_big 137.00 6.09 6.97 0.00 120 +count_distinct_group 75.00 0.97 0.60 0.00 1000 +count_distinct_group_on_key 47.00 0.45 0.14 0.00 1000 +count_distinct_group_on_key_parts 75.00 0.98 0.61 0.00 1000 +count_distinct_key_prefix 41.00 0.42 0.13 0.00 1000 +count_group_on_key_parts 38.00 0.89 0.59 0.00 1000 +count_on_key 386.00 17.16 4.60 0.00 50100 +create+drop 12.00 2.44 1.26 0.00 10000 +create_MANY_tables 183.00 1.96 0.78 0.00 10000 create_index 4.00 0.00 0.00 0.00 8 -create_key+drop 17.00 4.00 1.40 0.00 10000 -create_table 0.00 0.00 0.00 0.00 31 -delete_all 10.00 0.00 0.00 0.00 12 -delete_all_many_keys 51.00 0.03 0.01 0.00 1 -delete_big 0.00 0.00 0.00 0.00 1 -delete_big_many_keys 51.00 0.03 0.01 0.00 128 -delete_key 5.00 0.64 0.59 0.00 10000 +create_key+drop 17.00 4.03 1.40 0.00 10000 +create_table 0.00 0.00 0.01 0.00 31 +delete_all 11.00 0.00 0.00 0.00 12 +delete_all_many_keys 52.00 0.02 0.01 0.00 1 +delete_big 1.00 0.00 0.00 0.00 1 +delete_big_many_keys 52.00 0.01 0.01 0.00 128 +delete_key 4.00 0.59 0.58 0.00 10000 drop_index 4.00 0.00 0.00 0.00 8 -drop_table 0.00 0.00 0.00 0.00 28 -drop_table_when_MANY_tables 7.00 0.64 0.63 0.00 10000 -insert 137.00 24.38 23.04 0.00 350768 -insert_duplicates 40.00 5.91 6.68 0.00 100000 -insert_key 97.00 8.84 6.70 0.00 100000 -insert_many_fields 14.00 0.33 0.14 0.00 2000 -insert_select_1_key 6.00 0.00 0.00 0.00 1 -insert_select_2_keys 6.00 0.00 0.00 0.00 1 -min_max 22.00 0.02 0.00 0.00 60 -min_max_on_key 164.00 26.11 7.96 0.00 85000 -multiple_value_insert 7.00 1.91 0.06 0.00 100000 -order_by_big 49.00 17.41 20.76 0.00 10 -order_by_big_key 32.00 18.87 13.82 0.00 10 -order_by_big_key2 31.00 17.40 13.49 0.00 10 -order_by_big_key_desc 33.00 18.88 13.81 0.00 10 -order_by_big_key_diff 45.00 17.45 20.78 0.00 10 -order_by_big_key_prefix 31.00 17.49 13.48 0.00 10 -order_by_key2_diff 4.00 1.66 1.15 0.00 500 -order_by_key_prefix 3.00 0.93 0.63 0.00 500 -order_by_range 4.00 0.95 0.63 0.00 500 -outer_join 67.00 0.01 0.00 0.00 10 -outer_join_found 59.00 0.01 0.00 0.00 10 -outer_join_not_found 41.00 0.01 0.00 0.00 500 -outer_join_on_key 45.00 0.00 0.00 0.00 10 -select_1_row 3.00 0.30 0.80 0.00 10000 -select_2_rows 2.00 0.32 0.95 0.00 10000 -select_big 52.00 25.87 20.37 0.00 10080 -select_column+column 3.00 0.31 0.79 0.00 10000 -select_diff_key 146.00 0.24 0.05 0.00 500 -select_distinct 10.00 1.53 0.98 0.00 800 -select_group 51.00 1.49 0.67 0.00 2911 -select_group_when_MANY_tables 6.00 0.95 0.90 0.00 10000 -select_join 2.00 0.44 0.33 0.00 100 -select_key 138.00 75.48 21.52 0.00 200000 -select_key2 143.00 75.08 21.72 0.00 200000 -select_key2_return_key 136.00 72.18 19.55 0.00 200000 -select_key2_return_prim 140.00 73.57 20.03 0.00 200000 -select_key_prefix 144.00 76.03 21.36 0.00 200000 -select_key_prefix_join 11.00 3.47 2.55 0.00 100 -select_key_return_key 135.00 73.99 20.17 0.00 200000 -select_many_fields 25.00 7.16 10.10 0.00 2000 -select_query_cache 82.00 3.31 1.00 0.00 10000 -select_query_cache2 83.00 3.20 0.96 0.00 10000 -select_range 225.00 7.61 5.12 0.00 410 -select_range_key2 19.00 6.41 2.20 0.00 25010 -select_range_prefix 20.00 6.33 2.25 0.00 25010 -select_simple 1.00 0.33 0.77 0.00 10000 -select_simple_join 1.00 0.58 0.37 0.00 500 -update_big 25.00 0.00 0.00 0.00 10 -update_of_key 26.00 2.53 2.87 0.00 50000 -update_of_key_big 19.00 0.05 0.03 0.00 501 -update_of_primary_key_many_keys 23.00 0.02 0.03 0.00 256 -update_with_key 134.00 23.08 21.47 0.00 300000 -update_with_key_prefix 41.00 6.81 6.85 0.00 100000 -wisc_benchmark 4.00 1.59 0.88 0.00 114 -TOTALS 4439.00 789.18 378.53 0.00 2667247 +drop_table 0.00 0.00 0.01 0.00 28 +drop_table_when_MANY_tables 6.00 0.61 0.57 0.00 10000 +insert 131.00 23.35 22.54 0.00 350768 +insert_duplicates 39.00 6.17 6.65 0.00 100000 +insert_key 95.00 8.00 5.91 0.00 100000 +insert_many_fields 14.00 0.34 0.13 0.00 2000 +insert_select_1_key 5.00 0.00 0.00 0.00 1 +insert_select_2_keys 7.00 0.00 0.00 0.00 1 +min_max 22.00 0.02 0.01 0.00 60 +min_max_on_key 164.00 27.09 7.47 0.00 85000 +multiple_value_insert 8.00 1.89 0.06 0.00 100000 +order_by_big 47.00 17.25 20.19 0.00 10 +order_by_big_key 32.00 18.66 13.81 0.00 10 +order_by_big_key2 31.00 17.10 13.60 0.00 10 +order_by_big_key_desc 33.00 18.68 13.83 0.00 10 +order_by_big_key_diff 45.00 17.28 20.09 0.00 10 +order_by_big_key_prefix 30.00 16.96 13.61 0.00 10 +order_by_key2_diff 5.00 1.58 1.19 0.00 500 +order_by_key_prefix 2.00 0.94 0.59 0.00 500 +order_by_range 5.00 0.92 0.60 0.00 500 +outer_join 63.00 0.01 0.00 0.00 10 +outer_join_found 57.00 0.00 0.00 0.00 10 +outer_join_not_found 38.00 0.00 0.00 0.00 500 +outer_join_on_key 41.00 0.01 0.00 0.00 10 +select_1_row 3.00 0.28 0.85 0.00 10000 +select_2_rows 3.00 0.37 0.91 0.00 10000 +select_big 31.00 17.13 13.64 0.00 80 +select_big_str 19.00 7.79 6.10 0.00 10000 +select_column+column 3.00 0.31 0.71 0.00 10000 +select_diff_key 151.00 0.24 0.05 0.00 500 +select_distinct 11.00 1.54 0.97 0.00 800 +select_group 53.00 1.53 0.65 0.00 2911 +select_group_when_MANY_tables 7.00 0.99 0.95 0.00 10000 +select_join 2.00 0.48 0.33 0.00 100 +select_key 136.00 72.34 21.48 0.00 200000 +select_key2 140.00 71.17 20.98 0.00 200000 +select_key2_return_key 134.00 69.60 18.79 0.00 200000 +select_key2_return_prim 138.00 70.28 19.14 0.00 200000 +select_key_prefix 141.00 71.11 21.99 0.00 200000 +select_key_prefix_join 10.00 3.45 2.53 0.00 100 +select_key_return_key 132.00 70.93 19.96 0.00 200000 +select_many_fields 24.00 6.84 9.41 0.00 2000 +select_query_cache 82.00 3.53 0.98 0.00 10000 +select_query_cache2 84.00 3.50 1.01 0.00 10000 +select_range 230.00 7.50 5.11 0.00 410 +select_range_key2 19.00 6.21 2.20 0.00 25010 +select_range_prefix 19.00 6.24 2.16 0.00 25010 +select_simple 1.00 0.29 0.81 0.00 10000 +select_simple_join 2.00 0.58 0.37 0.00 500 +update_big 28.00 0.00 0.00 0.00 10 +update_of_key 24.00 2.35 2.65 0.00 50000 +update_of_key_big 21.00 0.05 0.03 0.00 501 +update_of_primary_key_many_keys 22.00 0.02 0.01 0.00 256 +update_with_key 129.00 20.61 19.68 0.00 300000 +update_with_key_prefix 37.00 5.70 5.82 0.00 100000 +wisc_benchmark 3.00 1.61 0.89 0.00 114 +TOTALS 4432.00 763.56 368.43 0.00 2667247 diff --git a/sql-bench/Results/alter-table-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/alter-table-mysql-Linux_2.2.16_SMP_alpha index 712e2a72b04..40d0c158606 100644 --- a/sql-bench/Results/alter-table-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/alter-table-mysql-Linux_2.2.16_SMP_alpha @@ -1,16 +1,16 @@ -Testing server 'MySQL 3.23.36' at 2001-03-26 1:22:58 +Testing server 'MySQL 3.23.39' at 2002-09-08 10:27:01 Testing of ALTER TABLE Testing with 1000 columns and 1000 rows in 20 steps Insert data into the table -Time for insert (1000) 0 wallclock secs ( 0.07 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for insert (1000) 0 wallclock secs ( 0.05 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for alter_table_add (992): 219 wallclock secs ( 0.16 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for alter_table_add (992): 187 wallclock secs ( 0.18 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for create_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for drop_index (8): 4 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for alter_table_drop (496): 178 wallclock secs ( 0.06 usr 0.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for alter_table_drop (496): 150 wallclock secs ( 0.05 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Total time: 405 wallclock secs ( 0.30 usr 0.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 345 wallclock secs ( 0.29 usr 0.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/big-tables-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/big-tables-mysql-Linux_2.2.16_SMP_alpha index 12b577bb50c..c9775e7ef88 100644 --- a/sql-bench/Results/big-tables-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/big-tables-mysql-Linux_2.2.16_SMP_alpha @@ -1,19 +1,19 @@ -Testing server 'MySQL 3.23.36' at 2001-03-26 1:29:43 +Testing server 'MySQL 3.23.39' at 2002-09-08 10:32:47 Testing of some unusual tables All tests are done 1000 times with 1000 fields Testing table with 1000 fields Testing select * from table with 1 record -Time to select_many_fields(1000): 10 wallclock secs ( 3.55 usr 5.04 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to select_many_fields(1000): 10 wallclock secs ( 3.45 usr 4.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing select all_fields from table with 1 record -Time to select_many_fields(1000): 15 wallclock secs ( 3.61 usr 5.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to select_many_fields(1000): 14 wallclock secs ( 3.39 usr 4.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing insert VALUES() -Time to insert_many_fields(1000): 5 wallclock secs ( 0.30 usr 0.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to insert_many_fields(1000): 5 wallclock secs ( 0.31 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing insert (all_fields) VALUES() -Time to insert_many_fields(1000): 9 wallclock secs ( 0.03 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to insert_many_fields(1000): 9 wallclock secs ( 0.03 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Total time: 40 wallclock secs ( 7.49 usr 10.23 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 38 wallclock secs ( 7.19 usr 9.54 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/connect-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/connect-mysql-Linux_2.2.16_SMP_alpha index 1a149f79087..c5ab74dce1b 100644 --- a/sql-bench/Results/connect-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/connect-mysql-Linux_2.2.16_SMP_alpha @@ -1,30 +1,30 @@ -Testing server 'MySQL 3.23.36' at 2001-03-26 1:30:23 +Testing server 'MySQL 3.23.39' at 2002-09-08 10:33:26 Testing the speed of connecting to the server and sending of data All tests are done 10000 times Testing connection/disconnect -Time to connect (10000): 14 wallclock secs ( 7.60 usr 2.34 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to connect (10000): 14 wallclock secs ( 8.11 usr 2.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Test connect/simple select/disconnect -Time for connect+select_simple (10000): 16 wallclock secs ( 7.88 usr 3.28 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for connect+select_simple (10000): 16 wallclock secs ( 8.44 usr 2.99 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Test simple select -Time for select_simple (10000): 1 wallclock secs ( 0.33 usr 0.77 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_simple (10000): 1 wallclock secs ( 0.29 usr 0.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing connect/select 1 row from table/disconnect -Time to connect+select_1_row (10000): 17 wallclock secs ( 8.25 usr 3.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to connect+select_1_row (10000): 17 wallclock secs ( 8.45 usr 3.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing select 1 row from table -Time to select_1_row (10000): 3 wallclock secs ( 0.30 usr 0.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to select_1_row (10000): 3 wallclock secs ( 0.28 usr 0.85 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing select 2 rows from table -Time to select_2_rows (10000): 2 wallclock secs ( 0.32 usr 0.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to select_2_rows (10000): 3 wallclock secs ( 0.37 usr 0.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Test select with aritmetic (+) -Time for select_column+column (10000): 3 wallclock secs ( 0.31 usr 0.79 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_column+column (10000): 3 wallclock secs ( 0.31 usr 0.71 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing retrieval of big records (65000 bytes) -Time to select_big (10000): 20 wallclock secs ( 8.34 usr 6.75 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to select_big_str (10000): 19 wallclock secs ( 7.79 usr 6.10 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Total time: 76 wallclock secs (33.34 usr 18.80 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 76 wallclock secs (34.04 usr 17.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/create-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/create-mysql-Linux_2.2.16_SMP_alpha index d0e62c1c6d0..65f0e0f2f85 100644 --- a/sql-bench/Results/create-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/create-mysql-Linux_2.2.16_SMP_alpha @@ -1,18 +1,18 @@ -Testing server 'MySQL 3.23.36' at 2001-03-26 1:31:40 +Testing server 'MySQL 3.23.39' at 2002-09-08 10:34:42 Testing the speed of creating and droping tables Testing with 10000 tables and 10000 loop count Testing create of tables -Time for create_MANY_tables (10000): 104 wallclock secs ( 1.76 usr 0.73 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for create_MANY_tables (10000): 183 wallclock secs ( 1.96 usr 0.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Accessing tables -Time to select_group_when_MANY_tables (10000): 6 wallclock secs ( 0.95 usr 0.90 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to select_group_when_MANY_tables (10000): 7 wallclock secs ( 0.99 usr 0.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing drop -Time for drop_table_when_MANY_tables (10000): 7 wallclock secs ( 0.64 usr 0.63 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for drop_table_when_MANY_tables (10000): 6 wallclock secs ( 0.61 usr 0.57 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing create+drop -Time for create+drop (10000): 13 wallclock secs ( 2.39 usr 1.35 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for create_key+drop (10000): 17 wallclock secs ( 4.00 usr 1.40 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Total time: 147 wallclock secs ( 9.75 usr 5.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for create+drop (10000): 12 wallclock secs ( 2.44 usr 1.26 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for create_key+drop (10000): 17 wallclock secs ( 4.03 usr 1.40 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 225 wallclock secs (10.03 usr 4.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/insert-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/insert-mysql-Linux_2.2.16_SMP_alpha index 20e67d0f929..b89fd2db681 100644 --- a/sql-bench/Results/insert-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/insert-mysql-Linux_2.2.16_SMP_alpha @@ -1,4 +1,4 @@ -Testing server 'MySQL 3.23.36' at 2001-03-26 1:34:07 +Testing server 'MySQL 3.23.39' at 2002-09-08 10:38:28 Testing the speed of inserting data into 1 table and do some selects on it. The tests are done with a table that has 100000 rows. @@ -8,83 +8,83 @@ Creating tables Inserting 100000 rows in order Inserting 100000 rows in reverse order Inserting 100000 rows in random order -Time for insert (300000): 114 wallclock secs (20.61 usr 19.46 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for insert (300000): 110 wallclock secs (19.96 usr 19.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing insert of duplicates -Time for insert_duplicates (100000): 40 wallclock secs ( 5.91 usr 6.68 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for insert_duplicates (100000): 39 wallclock secs ( 6.17 usr 6.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Retrieving data from the table -Time for select_big (10:3000000): 31 wallclock secs (17.41 usr 13.54 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_big_key (10:3000000): 32 wallclock secs (18.87 usr 13.82 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_big_key_desc (10:3000000): 33 wallclock secs (18.88 usr 13.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_big_key_prefix (10:3000000): 31 wallclock secs (17.49 usr 13.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_big_key2 (10:3000000): 31 wallclock secs (17.40 usr 13.49 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_big_key_diff (10:3000000): 45 wallclock secs (17.45 usr 20.78 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_big (10:3000000): 49 wallclock secs (17.41 usr 20.76 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_range (500:125750): 4 wallclock secs ( 0.95 usr 0.63 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_key_prefix (500:125750): 3 wallclock secs ( 0.93 usr 0.63 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for order_by_key2_diff (500:250500): 4 wallclock secs ( 1.66 usr 1.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_diff_key (500:1000): 146 wallclock secs ( 0.24 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_range_prefix (5010:42084): 11 wallclock secs ( 2.76 usr 0.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_range_key2 (5010:42084): 11 wallclock secs ( 2.81 usr 0.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_key_prefix (200000): 144 wallclock secs (76.03 usr 21.36 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_key (200000): 138 wallclock secs (75.48 usr 21.52 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_key_return_key (200000): 135 wallclock secs (73.99 usr 20.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_key2 (200000): 143 wallclock secs (75.08 usr 21.72 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_key2_return_key (200000): 136 wallclock secs (72.18 usr 19.55 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_key2_return_prim (200000): 140 wallclock secs (73.57 usr 20.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_big (10:3000000): 31 wallclock secs (17.01 usr 13.56 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key (10:3000000): 32 wallclock secs (18.66 usr 13.81 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key_desc (10:3000000): 33 wallclock secs (18.68 usr 13.83 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key_prefix (10:3000000): 30 wallclock secs (16.96 usr 13.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key2 (10:3000000): 31 wallclock secs (17.10 usr 13.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big_key_diff (10:3000000): 45 wallclock secs (17.28 usr 20.09 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_big (10:3000000): 47 wallclock secs (17.25 usr 20.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_range (500:125750): 5 wallclock secs ( 0.92 usr 0.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_key_prefix (500:125750): 2 wallclock secs ( 0.94 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for order_by_key2_diff (500:250500): 5 wallclock secs ( 1.58 usr 1.19 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_diff_key (500:1000): 151 wallclock secs ( 0.24 usr 0.05 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range_prefix (5010:42084): 10 wallclock secs ( 2.65 usr 0.92 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range_key2 (5010:42084): 11 wallclock secs ( 2.64 usr 0.95 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key_prefix (200000): 141 wallclock secs (71.11 usr 21.99 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key (200000): 136 wallclock secs (72.34 usr 21.48 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key_return_key (200000): 132 wallclock secs (70.93 usr 19.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key2 (200000): 140 wallclock secs (71.17 usr 20.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key2_return_key (200000): 134 wallclock secs (69.60 usr 18.79 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_key2_return_prim (200000): 138 wallclock secs (70.28 usr 19.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Test of compares with simple ranges -Time for select_range_prefix (20000:43500): 9 wallclock secs ( 3.57 usr 1.29 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_range_key2 (20000:43500): 8 wallclock secs ( 3.60 usr 1.29 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_group (111): 40 wallclock secs ( 0.05 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for min_max_on_key (15000): 9 wallclock secs ( 4.67 usr 1.41 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for min_max (60): 22 wallclock secs ( 0.02 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_on_key (100): 36 wallclock secs ( 0.03 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count (100): 55 wallclock secs ( 0.04 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_distinct_big (20): 55 wallclock secs ( 0.01 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range_prefix (20000:43500): 9 wallclock secs ( 3.59 usr 1.24 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range_key2 (20000:43500): 8 wallclock secs ( 3.57 usr 1.25 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_group (111): 42 wallclock secs ( 0.05 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for min_max_on_key (15000): 9 wallclock secs ( 4.54 usr 1.27 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for min_max (60): 22 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_on_key (100): 37 wallclock secs ( 0.04 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count (100): 50 wallclock secs ( 0.04 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_big (20): 57 wallclock secs ( 0.01 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing update of keys with functions -Time for update_of_key (50000): 26 wallclock secs ( 2.53 usr 2.87 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for update_of_key_big (501): 19 wallclock secs ( 0.05 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for update_of_key (50000): 24 wallclock secs ( 2.35 usr 2.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for update_of_key_big (501): 21 wallclock secs ( 0.05 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing update with key -Time for update_with_key (300000): 134 wallclock secs (23.08 usr 21.47 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for update_with_key_prefix (100000): 41 wallclock secs ( 6.81 usr 6.85 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for update_with_key (300000): 129 wallclock secs (20.61 usr 19.68 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for update_with_key_prefix (100000): 37 wallclock secs ( 5.70 usr 5.82 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing update of all rows -Time for update_big (10): 25 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for update_big (10): 28 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing left outer join -Time for outer_join_on_key (10:10): 45 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for outer_join (10:10): 67 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for outer_join_found (10:10): 59 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for outer_join_not_found (500:10): 41 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for outer_join_on_key (10:10): 41 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for outer_join (10:10): 63 wallclock secs ( 0.01 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for outer_join_found (10:10): 57 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for outer_join_not_found (500:10): 38 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing INSERT INTO ... SELECT -Time for insert_select_1_key (1): 6 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for insert_select_2_keys (1): 6 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for insert_select_1_key (1): 5 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for insert_select_2_keys (1): 7 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for drop table(2): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing delete -Time for delete_key (10000): 5 wallclock secs ( 0.64 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for delete_all (12): 10 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for delete_key (10000): 4 wallclock secs ( 0.59 usr 0.58 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for delete_all (12): 11 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Insert into table with 16 keys and with a primary key with 16 parts -Time for insert_key (100000): 97 wallclock secs ( 8.84 usr 6.70 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for insert_key (100000): 95 wallclock secs ( 8.00 usr 5.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing update of keys -Time for update_of_primary_key_many_keys (256): 23 wallclock secs ( 0.02 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for update_of_primary_key_many_keys (256): 22 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Deleting rows from the table -Time for delete_big_many_keys (128): 51 wallclock secs ( 0.03 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for delete_big_many_keys (128): 52 wallclock secs ( 0.01 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Deleting everything from table -Time for delete_all_many_keys (1): 51 wallclock secs ( 0.03 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for delete_all_many_keys (1): 52 wallclock secs ( 0.02 usr 0.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Inserting 100000 rows with multiple values -Time for multiple_value_insert (100000): 7 wallclock secs ( 1.91 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for multiple_value_insert (100000): 8 wallclock secs ( 1.89 usr 0.06 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Time for drop table(1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Total time: 2318 wallclock secs (663.06 usr 307.16 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 2279 wallclock secs (634.62 usr 299.74 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/select-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/select-mysql-Linux_2.2.16_SMP_alpha index 1715d46f4a9..224278db66f 100644 --- a/sql-bench/Results/select-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/select-mysql-Linux_2.2.16_SMP_alpha @@ -1,30 +1,30 @@ -Testing server 'MySQL 3.23.36' at 2001-03-26 2:12:47 +Testing server 'MySQL 3.23.39' at 2002-09-08 11:16:28 Testing the speed of selecting on keys that consist of many parts The test-table has 10000 rows and the test is done with 500 ranges. Creating table Inserting 10000 rows -Time to insert (10000): 4 wallclock secs ( 0.81 usr 0.63 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to insert (10000): 4 wallclock secs ( 0.71 usr 0.65 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Test if the database has a query cache -Time for select_query_cache (10000): 82 wallclock secs ( 3.31 usr 1.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_query_cache (10000): 82 wallclock secs ( 3.53 usr 0.98 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_query_cache2 (10000): 83 wallclock secs ( 3.20 usr 0.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_query_cache2 (10000): 84 wallclock secs ( 3.50 usr 1.01 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing big selects on the table -Time for select_big (70:17207): 1 wallclock secs ( 0.12 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for select_range (410:1057904): 225 wallclock secs ( 7.61 usr 5.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for min_max_on_key (70000): 155 wallclock secs (21.44 usr 6.55 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_on_key (50000): 355 wallclock secs (16.27 usr 4.69 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_big (70:17207): 0 wallclock secs ( 0.12 usr 0.08 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for select_range (410:1057904): 230 wallclock secs ( 7.50 usr 5.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for min_max_on_key (70000): 155 wallclock secs (22.55 usr 6.20 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_on_key (50000): 349 wallclock secs (17.12 usr 4.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_group_on_key_parts (1000:100000): 42 wallclock secs ( 0.94 usr 0.56 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_group_on_key_parts (1000:100000): 38 wallclock secs ( 0.89 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Testing count(distinct) on the table -Time for count_distinct_key_prefix (1000:1000): 38 wallclock secs ( 0.39 usr 0.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_distinct (1000:1000): 48 wallclock secs ( 0.40 usr 0.10 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_distinct_2 (1000:1000): 50 wallclock secs ( 0.42 usr 0.12 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_distinct_group_on_key (1000:6000): 42 wallclock secs ( 0.42 usr 0.15 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_distinct_group_on_key_parts (1000:100000): 70 wallclock secs ( 0.97 usr 0.59 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_distinct_group (1000:100000): 69 wallclock secs ( 0.98 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time for count_distinct_big (100:1000000): 82 wallclock secs ( 6.04 usr 7.21 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Total time: 1346 wallclock secs (63.34 usr 28.50 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_key_prefix (1000:1000): 41 wallclock secs ( 0.42 usr 0.13 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct (1000:1000): 51 wallclock secs ( 0.44 usr 0.11 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_2 (1000:1000): 49 wallclock secs ( 0.41 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_group_on_key (1000:6000): 47 wallclock secs ( 0.45 usr 0.14 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_group_on_key_parts (1000:100000): 75 wallclock secs ( 0.98 usr 0.61 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_group (1000:100000): 75 wallclock secs ( 0.97 usr 0.60 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for count_distinct_big (100:1000000): 80 wallclock secs ( 6.08 usr 6.96 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 1360 wallclock secs (65.68 usr 27.91 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/sql-bench/Results/wisconsin-mysql-Linux_2.2.16_SMP_alpha b/sql-bench/Results/wisconsin-mysql-Linux_2.2.16_SMP_alpha index c1b239520de..04133bca37b 100644 --- a/sql-bench/Results/wisconsin-mysql-Linux_2.2.16_SMP_alpha +++ b/sql-bench/Results/wisconsin-mysql-Linux_2.2.16_SMP_alpha @@ -1,14 +1,14 @@ -Testing server 'MySQL 3.23.36' at 2001-03-26 2:35:13 +Testing server 'MySQL 3.23.39' at 2002-09-08 11:39:09 Wisconsin benchmark test Time for create_table (3): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Inserting data -Time to insert (31000): 15 wallclock secs ( 2.39 usr 2.30 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Time to delete_big (1): 0 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to insert (31000): 14 wallclock secs ( 2.17 usr 2.10 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time to delete_big (1): 1 wallclock secs ( 0.00 usr 0.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) Running actual benchmark -Time for wisc_benchmark (114): 4 wallclock secs ( 1.59 usr 0.88 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Time for wisc_benchmark (114): 3 wallclock secs ( 1.61 usr 0.89 sys + 0.00 cusr 0.00 csys = 0.00 CPU) -Total time: 19 wallclock secs ( 3.99 usr 3.17 sys + 0.00 cusr 0.00 csys = 0.00 CPU) +Total time: 18 wallclock secs ( 3.78 usr 3.00 sys + 0.00 cusr 0.00 csys = 0.00 CPU) diff --git a/support-files/debian/README.debian b/support-files/debian/README.debian index aa6dbaac12e..9a990585854 100644 --- a/support-files/debian/README.debian +++ b/support-files/debian/README.debian @@ -18,6 +18,15 @@ Comments regarding the Package mysql-server-debug: --with-debug flag. mysqld only. (/usr/sbin/mysqld-debug) +* about MySQL-Max packages: + + mysql-max : + this is static linked MySQL-Max server only. (/usr/sbin/mysqld-max-static). + mysql-max-shared: + this is dynamic linked MySQL server only. (/usr/sbin/mysqld-max-shared) + mysql-max-debug: + --with-debug flag. mysqld only. (/usr/sbin/mysqld-max-debug) + * about charset I build MySQL server --with-extra-charsets=all diff --git a/support-files/debian/changelog b/support-files/debian/changelog index ee32ceb4e74..e52589d7025 100644 --- a/support-files/debian/changelog +++ b/support-files/debian/changelog @@ -1,12 +1,145 @@ -mysql (3.23.23-1potato.2) unstable; urgency=low +mysql (3.23.39-1) unstable; urgency=low + + * new + + -- takeshi Sat, 12 May 2001 05:07:35 +0900 + +mysql (3.23.38-1potato) unstable; urgency=low + + * new + + -- takeshi Sat, 12 May 2001 05:07:35 +0900 + +mysql (3.23.37-1potato.2) unstable; urgency=low + + * new + * add mysql-max multi packages. + + -- takeshi Thr, 26 Apr 2001 05:07:35 +0900 + +mysql (3.23.37-1potato) unstable; urgency=low + + * new + + -- takeshi Thr, 26 Apr 2001 05:07:35 +0900 + +mysql (3.23.36-1potato) unstable; urgency=low + + * new + + -- takeshi Thr, 29 Mar 2001 05:07:35 +0900 + +mysql (3.23.35-1potato.1) unstable; urgency=low + + * sql fix patch + + -- takeshi Thr, 22 Mar 2001 05:07:35 +0900 + +mysql (3.23.35-1potato) unstable; urgency=low + + * new + * --with-innobase + + -- takeshi Sat, 17 Mar 2001 05:07:35 +0900 + +mysql (3.23.34a-1potato) unstable; urgency=low + + * new + * --with-innobase + + -- takeshi Wed, 14 Mar 2001 05:07:35 +0900 + +mysql (3.23.33-1potato) unstable; urgency=low + + * new + + -- takeshi Tue, 13 Feb 2001 05:07:35 +0900 + +mysql (3.23.32-1potato) unstable; urgency=low + + * new + + -- takeshi Tue, 23 Jan 2001 05:07:35 +0900 + +mysql (3.23.31-1potato) unstable; urgency=low + + * new + + -- takeshi Fri, 19 Jan 2001 05:07:35 +0900 + +mysql (3.23.30-gamma-1potato) unstable; urgency=low + + * new + + -- takeshi Sat, 6 Jan 2001 05:07:35 +0900 + +mysql (3.23.29a-gamma-1potato.3) unstable; urgency=low + + * server:/usr/sbin/{mysql_config, mysqltest} -> client:/usr/bin/ + * server:/usr/bin/my_print_defaults -> client:/usr/bin/ + * /usr/mysql-test -> mysql-bench /var/mysql/mysql-test + + -- takeshi Fri, 29 Dec 2000 05:07:35 +0900 + +mysql (3.23.29a-gamma-1potato.2) unstable; urgency=low + + * /usr/mysql-test -> mysql-bench /var/mysql/mysql-test + + -- takeshi Sun, 17 Dec 2000 05:07:35 +0900 + +mysql (3.23.29a-gamma-1potato) unstable; urgency=low + + * new + + -- takeshi Sun, 17 Dec 2000 05:07:35 +0900 + +mysql (3.23.28-gamma-1potato) unstable; urgency=low + + * new + + -- takeshi Fri, 24 Nov 2000 05:07:35 +0900 + +mysql (3.23.27-beta-1potato) unstable; urgency=low + + * new + + -- takeshi Fri, 28 Oct 2000 05:07:35 +0900 + +mysql (3.23.26-beta-1potato) unstable; urgency=low + + * new + + -- takeshi Sun, 22 Oct 2000 05:07:35 +0900 + +mysql (3.23.25-beta-1potato) unstable; urgency=low + + * new , libmysqlclient10 + * change debian/control file. remove Provides keyword + + -- takeshi Fri, 29 Sep 2000 05:07:35 +0900 + +mysql (3.23.24-1potato.2) unstable; urgency=low + + * fix debian/control file + * move patch into debian/patches/ + if you want to make new patch, + write patch file and put it into debian/patches/. + debian/rules do patch debian/patches/* automatically. + * change debian/rules , debian/move + * back mysql_resolveip -> resolveip , mysql_perror -> perror + + -- takeshi Thr, 14 Sep 2000 05:07:35 +0900 + +mysql (3.23.24-1potato) unstable; urgency=low * move patch into debian/patches/ if you want to make new patch, write patch file and put it into debian/patches/. debian/rules do patch debian/patches/* automatically. * change debian/rules , debian/move + * back mysql_resolveip -> resolveip , mysql_perror -> perror - -- takeshi Tue, 5 Sep 2000 05:07:35 +0900 + -- takeshi Sat, 9 Sep 2000 05:07:35 +0900 mysql (3.23.23-1potato) unstable; urgency=low diff --git a/support-files/debian/control b/support-files/debian/control index acd83518412..3ccc1d097c8 100644 --- a/support-files/debian/control +++ b/support-files/debian/control @@ -11,38 +11,44 @@ Description: mysql Package: mysql-doc Architecture: all +Section: doc +Priority: extra +Replaces: mysql-gpl-doc Description: mysql Documentation (html) MySQL Doc. -Package: libmysqlclient9 +Package: libmysqlclient10 Architecture: any -Provides: libmysqlclient9 -Description: libmysqlclient.so.9 - libmysqlclient.so.9 +Section: libs +Priority: extra +Description: libmysqlclient.so.10 + libmysqlclient.so.10 Package: mysql-client Architecture: any Depends: ${shlibs:Depends} -Section: devel +Section: misc Priority: extra Conflicts: mysql-client-ujis, mysql-client-sjis -Replaces: mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-client-ujis, mysql-client-sjis -Provides: mysql-client +Replaces: mysql-gpl-client, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-client-ujis, mysql-client-sjis Description: mysql clients. MySQL clients programs. Package: mysql-server Architecture: any +Section: misc +Priority: extra Depends: ${shlibs:Depends} Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) -Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) -Provides: mysql-server +Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0), mysql-common Description: MySQL server (static linked) MySQL server. static linked. Package: mysql-server-shared Architecture: any -Depends: ${shlibs:Depends} +Section: misc +Priority: extra +Depends: mysql-server, ${shlibs:Depends} Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) Description: MySQL server (dynamic linked) @@ -50,22 +56,57 @@ Description: MySQL server (dynamic linked) Package: mysql-server-debug Architecture: any -Depends: ${shlibs:Depends} +Section: misc +Priority: extra +Depends: mysql-server, ${shlibs:Depends} Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) Description: MySQL server debug MySQL server. debug +Package: mysql-max +Architecture: any +Section: misc +Priority: extra +Depends: mysql-server +Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) +Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) +Description: MySQL-MAX server (static linked) + MySQL-Max server. (static linked) + +Package: mysql-max-shared +Architecture: any +Section: misc +Priority: extra +Depends: mysql-server, ${shlibs:Depends} +Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) +Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) +Description: MySQL-MAX server (shared linked) + MySQL-Max server. (shared linked) + +Package: mysql-max-debug +Architecture: any +Section: misc +Priority: extra +Depends: mysql-server, ${shlibs:Depends} +Conflicts: mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) +Replaces: mysql-server-sjis, mysql-base (<< 3.22.11), mysql-base-ujis (<< 3.22.11), mysql-base-sjis (<< 3.22.11), mysql-server-sjis, mysql-server-ujis, mysql-server (<< 3.23.0) +Description: MySQL-MAX server (with debug shared linked) + MySQL-Max server. (with debug and shared linked) + Package: mysql-dev Architecture: any +Section: devel +Priority: extra Depends: ${shlibs:Depends} Conflicts: mysql-dev-sjis, mysql-dev-ujis -Replaces: mysql-dev-sjis, mysql-dev-ujis, libmysqlclient6-ujis, libmysqlclient6-sjis -Provides: mysql-dev +Replaces: mysql-devel, libmysqlclient10-dev, libmysqlclient9-dev, libmysqlclient6-dev, mysql-gpl-dev, mysql-dev-sjis, mysql-dev-ujis, libmysqlclient6-ujis, libmysqlclient6-sjis Description: MySQL develop suite MySQL develop. Package: mysql-bench Architecture: all +Section: misc +Priority: extra Description: mysql benchmark suite. MySQL sql-bench files. diff --git a/support-files/debian/gomi b/support-files/debian/gomi index 29afaf50a18..4c9460578be 100644 --- a/support-files/debian/gomi +++ b/support-files/debian/gomi @@ -1,14 +1,15 @@ Docs/Makefile -strings/Makefile dbug/Makefile -mysys/Makefile extra/Makefile -regex/Makefile -isam/Makefile heap/Makefile +isam/Makefile merge/Makefile +mysys/Makefile +readline/Makefile +regex/Makefile sql/Makefile sql/share/Makefile +strings/Makefile support-files/binary-configure support-files/my-example.cnf support-files/mysql-log-rotate diff --git a/support-files/debian/libmysqlclient10.dirs b/support-files/debian/libmysqlclient10.dirs new file mode 100644 index 00000000000..68457717bd8 --- /dev/null +++ b/support-files/debian/libmysqlclient10.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/support-files/debian/libmysqlclient10.postinst b/support-files/debian/libmysqlclient10.postinst new file mode 100644 index 00000000000..2d1871b1df6 --- /dev/null +++ b/support-files/debian/libmysqlclient10.postinst @@ -0,0 +1,3 @@ +#!/bin/sh + +ldconfig diff --git a/support-files/debian/move b/support-files/debian/move index e134c055fe9..36f250fcfb3 100644 --- a/support-files/debian/move +++ b/support-files/debian/move @@ -7,7 +7,7 @@ if [ -e $STAMPFILE ]; then fi #---------- -CLIENT1="msql2mysql mysql mysql_convert_table_format mysql_find_rows mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlaccess mysqladmin mysqlbug mysqldump mysqlhotcopy mysqlimport mysqlshow" +CLIENT1="msql2mysql mysql mysql_convert_table_format mysql_find_rows mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlaccess mysqladmin mysqlbug mysqldump mysqlhotcopy mysqlimport mysqlshow mysql_config mysqltest my_print_defaults" # CLIENT2="add_file_priv add_func_table add_long_password make_binary_distribution" @@ -20,7 +20,7 @@ for CHAR in build do #----- cp -Rpd debian/${CHAR}/usr debian/mysql-server/ - cp -Rpd debian/${CHAR}-shared/usr/lib/mysql/libmysqlclient.so.* debian/libmysqlclient9/usr/lib/ + cp -Rpd debian/${CHAR}-shared/usr/lib/mysql/libmysqlclient.so.* debian/libmysqlclient10/usr/lib/ #----- mysql-server-shared --- cp -Rpd debian/${CHAR}-shared/usr/sbin/mysqld debian/mysql-server-shared/usr/sbin/mysqld-shared @@ -31,20 +31,28 @@ do #----- mysql-server --- mv debian/mysql-server/usr/sbin/mysqld debian/mysql-server/usr/sbin/mysqld-static + #----- mysql-max-shared --- + cp -Rpd debian/${CHAR}-max-shared/usr/sbin/mysqld debian/mysql-max-shared/usr/sbin/mysqld-max-shared + + #----- mysql-max-debug --- + cp -Rpd debian/${CHAR}-max-debug/usr/sbin/mysqld debian/mysql-max-debug/usr/sbin/mysqld-max-debug + + #----- mysql-max --- + mv debian/${CHAR}-max/usr/sbin/mysqld debian/mysql-max/usr/sbin/mysqld-max-static + #----- mysql-client ---- cd ${P}/debian/mysql-server/usr/bin/ && mv $CLIENT1 ../../../mysql-client/usr/bin/ cd ${P} mv -f debian/mysql-server/usr/{man,info} debian/mysql-client/usr/share/ - mv debian/mysql-server/usr/share/mysql/my-example.cnf debian/mysql-client/usr/share/mysql/ +# mv debian/mysql-server/usr/share/mysql/my-*.cnf debian/mysql-client/usr/share/mysql/ mv -f debian/mysql-server/usr/bin/replace debian/mysql-client/usr/bin/mysql_replace #----- mysql-server --- mv debian/mysql-server/usr/bin/* debian/mysql-server/usr/sbin/ - mv debian/mysql-server/usr/sbin/my_print_defaults debian/mysql-server/usr/bin/ mv debian/mysql-server/usr/sbin/comp_err debian/mysql-server/usr/bin/ - mv debian/mysql-server/usr/sbin/perror debian/mysql-server/usr/bin/mysql_perror - mv debian/mysql-server/usr/sbin/resolveip debian/mysql-server/usr/bin/mysql_resolveip + mv debian/mysql-server/usr/sbin/perror debian/mysql-server/usr/bin/ + mv debian/mysql-server/usr/sbin/resolveip debian/mysql-server/usr/bin/ #----- mysql-dev ---- cp -Rpd debian/${CHAR}-shared/usr/lib/mysql/libmysqlclient.so debian/mysql-dev/usr/lib/ @@ -67,6 +75,7 @@ cp -r COPYING* MIRRORS README* Docs/* debian/mysql-doc/usr/share/doc/mysql/ #### sql-bench mv debian/mysql-server/usr/sql-bench \ + debian/mysql-server/usr/mysql-test \ debian/mysql-bench/var/mysql/ touch $STAMPFILE diff --git a/support-files/debian/mysql-max-debug.dirs b/support-files/debian/mysql-max-debug.dirs new file mode 100644 index 00000000000..236670a2d0f --- /dev/null +++ b/support-files/debian/mysql-max-debug.dirs @@ -0,0 +1 @@ +usr/sbin diff --git a/support-files/debian/mysql-max-debug.postinst b/support-files/debian/mysql-max-debug.postinst new file mode 100644 index 00000000000..e9d8b628c2e --- /dev/null +++ b/support-files/debian/mysql-max-debug.postinst @@ -0,0 +1,3 @@ +#!/bin/sh + +update-alternatives --install /usr/sbin/mysqld mysqld /usr/sbin/mysqld-max-debug 40 diff --git a/support-files/debian/mysql-max-debug.postrm b/support-files/debian/mysql-max-debug.postrm new file mode 100644 index 00000000000..25c7aadf494 --- /dev/null +++ b/support-files/debian/mysql-max-debug.postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +update-alternatives --auto mysqld diff --git a/support-files/debian/mysql-max-shared.dirs b/support-files/debian/mysql-max-shared.dirs new file mode 100644 index 00000000000..236670a2d0f --- /dev/null +++ b/support-files/debian/mysql-max-shared.dirs @@ -0,0 +1 @@ +usr/sbin diff --git a/support-files/debian/mysql-max-shared.postinst b/support-files/debian/mysql-max-shared.postinst new file mode 100644 index 00000000000..d47d85c73eb --- /dev/null +++ b/support-files/debian/mysql-max-shared.postinst @@ -0,0 +1,3 @@ +#!/bin/sh + +update-alternatives --install /usr/sbin/mysqld mysqld /usr/sbin/mysqld-max-shared 35 diff --git a/support-files/debian/mysql-max-shared.postrm b/support-files/debian/mysql-max-shared.postrm new file mode 100644 index 00000000000..25c7aadf494 --- /dev/null +++ b/support-files/debian/mysql-max-shared.postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +update-alternatives --auto mysqld diff --git a/support-files/debian/mysql-max.dirs b/support-files/debian/mysql-max.dirs new file mode 100644 index 00000000000..236670a2d0f --- /dev/null +++ b/support-files/debian/mysql-max.dirs @@ -0,0 +1 @@ +usr/sbin diff --git a/support-files/debian/mysql-max.postinst b/support-files/debian/mysql-max.postinst new file mode 100644 index 00000000000..a65ccd5b6c7 --- /dev/null +++ b/support-files/debian/mysql-max.postinst @@ -0,0 +1,3 @@ +#!/bin/sh + +update-alternatives --install /usr/sbin/mysqld mysqld /usr/sbin/mysqld-max-static 30 diff --git a/support-files/debian/mysql-max.postrm b/support-files/debian/mysql-max.postrm new file mode 100644 index 00000000000..25c7aadf494 --- /dev/null +++ b/support-files/debian/mysql-max.postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +update-alternatives --auto mysqld diff --git a/support-files/debian/patches/ab b/support-files/debian/patches/ab index ed6ca58f729..e169ee38188 100644 --- a/support-files/debian/patches/ab +++ b/support-files/debian/patches/ab @@ -1,20 +1,11 @@ ---- mysql-3.23.23.orig/scripts/Makefile.in -+++ mysql-3.23.23/scripts/Makefile.in -@@ -337,6 +337,7 @@ - @RM@ -f $@ $@-t - @SED@ \ - -e 's!@''bindir''@!$(bindir)!g' \ -+ -e 's!@''sbindir''@!$(sbindir)!g' \ - -e 's!@''scriptdir''@!$(bindir)!g' \ - -e 's!@''prefix''@!$(prefix)!g' \ - -e 's!@''datadir''@!$(datadir)!g' \ ---- mysql-3.23.23.orig/support-files/Makefile.in -+++ mysql-3.23.23/support-files/Makefile.in -@@ -308,6 +308,7 @@ - @RM@ -f $@ $@-t - @SED@ \ - -e 's!@''bindir''@!$(bindir)!g' \ -+ -e 's!@''sbindir''@!$(sbindir)!g' \ - -e 's!@''scriptdir''@!$(bindir)!g' \ - -e 's!@''prefix''@!$(prefix)!g' \ - -e 's!@''datadir''@!$(datadir)!g' \ +--- mysql-3.23.34a/sql/Makefile.in.orig Mon Mar 12 08:27:39 2001 ++++ mysql-3.23.34a/sql/Makefile.in Thu Mar 15 04:11:14 2001 +@@ -373,7 +373,7 @@ + + mysqlbinlog: $(mysqlbinlog_OBJECTS) $(mysqlbinlog_DEPENDENCIES) + @rm -f mysqlbinlog +- $(CXXLINK) $(mysqlbinlog_LDFLAGS) $(mysqlbinlog_OBJECTS) $(mysqlbinlog_LDADD) $(LIBS) ++ $(CXXLINK) $(mysqld_LDFLAGS) $(mysqlbinlog_OBJECTS) $(mysqld_LDADD) $(LIBS) + + mysqld: $(mysqld_OBJECTS) $(mysqld_DEPENDENCIES) + @rm -f mysqld diff --git a/support-files/debian/patches/ad b/support-files/debian/patches/ad index a90cf669ff6..25394116ad9 100644 --- a/support-files/debian/patches/ad +++ b/support-files/debian/patches/ad @@ -1,52 +1,11 @@ ---- mysql-3.23.23.orig/scripts/mysql_install_db.sh -+++ mysql-3.23.23/scripts/mysql_install_db.sh -@@ -11,6 +11,7 @@ - ldata=@localstatedir@ - execdir=@libexecdir@ - bindir=@bindir@ -+sbindir=@sbindir@ - force=0 - IN_RPM=0 - defaults= -@@ -47,6 +48,10 @@ +--- mysql-3.23.34a/scripts/mysql_install_db.sh.orig Mon Mar 12 08:18:27 2001 ++++ mysql-3.23.34a/scripts/mysql_install_db.sh Thu Mar 15 04:12:28 2001 +@@ -325,7 +325,7 @@ + if test "$IN_RPM" -eq 0 then - bindir=`grep "^bindir" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'` - fi -+ if grep "^sbindir" $conf >/dev/null -+ then -+ sbindir=`grep "^sbindir" $conf | sed '.*=[ \t]*//` -+ fi - if grep "^user" $conf >/dev/null - then - user=`grep "^user" $conf | sed 's;^[^=]*=[ \t]*;;' | sed 's;[ \t]$;;'` -@@ -56,7 +61,7 @@ - for arg - do - case "$arg" in -- --basedir=*) basedir=`echo "$arg"|sed 's;^--basedir=;;'`; bindir="$basedir/bin"; execdir="$basedir/libexec" ;; -+ --basedir=*) basedir=`echo "$arg"|sed 's;^--basedir=;;'`; bindir="$basedir/bin"; sbindir="$basedir/sbin"; execdir="$basedir/libexec" ;; - --datadir=*) ldata=`echo "$arg"|sed 's;^--datadir=;;'` ;; - --user=*) user=`echo "$arg"|sed 's;^--user=;;'` ;; - esac -@@ -82,10 +87,10 @@ - # Check if hostname is valid - if test "$IN_RPM" -eq 0 -a $force -eq 0 - then -- resolved=`$bindir/resolveip $hostname 2>&1` -+ resolved=`$bindir/mysql_resolveip $hostname 2>&1` - if [ $? -ne 0 ] - then -- resolved=`$bindir/resolveip localhost 2>&1` -+ resolved=`$bindir/mysql_resolveip localhost 2>&1` - if [ $? -eq 0 ] - then - echo "Sorry, the host '$hostname' could not be looked up." -@@ -300,7 +305,7 @@ - if test -z "$IN_RPM" - then - echo "You can start the MySQL demon with:" + echo "You can start the MySQL daemon with:" - echo "cd @prefix@ ; $bindir/safe_mysqld &" + echo "cd @prefix@ ; $sbindir/safe_mysqld &" echo - echo "You can test the MySQL demon with the benchmarks in the 'sql-bench' directory:" + echo "You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:" echo "cd sql-bench ; run-all-tests" diff --git a/support-files/debian/patches/ae b/support-files/debian/patches/ae index d6ccdcfaaf0..7ea5733147f 100644 --- a/support-files/debian/patches/ae +++ b/support-files/debian/patches/ae @@ -1,25 +1,17 @@ ---- mysql-3.23.23.orig/support-files/mysql.server.sh Tue Sep 5 19:13:35 2000 -+++ mysql-3.23.23/support-files/mysql.server.sh Tue Sep 5 19:19:40 2000 -@@ -16,6 +16,7 @@ - PATH=/sbin:/usr/sbin:/bin:/usr/bin - basedir=@prefix@ - bindir=@bindir@ -+sbindir=@sbindir@ - datadir=@localstatedir@ - pid_file=@localstatedir@/mysqld.pid - log_file=@localstatedir@/mysqld.log -@@ -64,6 +65,10 @@ - then - bindir=`grep "^bindir" $conf | cut -f 2 -d= | tr -d ' '` - fi -+ if grep "^sbindir" $conf >/dev/null -+ then -+ sbindir=`grep "^sbindir" $conf | cut -f 2 -d= | tr -d ' '` -+ fi - if grep "^log[ \t]*=" $conf >/dev/null - then - log_file=`grep "log[ \t]*=" $conf | cut -f 2 -d= | tr -d ' '` -@@ -78,14 +83,15 @@ +--- mysql-3.23.30-gamma/support-files/mysql.server.sh.orig Thu Jan 4 11:03:57 2001 ++++ mysql-3.23.30-gamma/support-files/mysql.server.sh Sat Jan 6 12:18:50 2001 +@@ -28,8 +28,10 @@ + then + basedir=@prefix@ + bindir=@bindir@ ++ sbindir=@sbindir@ + else + bindir="$basedir/bin" ++ sbindir="$basedir/sbin" + fi + if test -z "$pid_file" + then +@@ -100,18 +102,18 @@ 'start') # Start daemon @@ -28,11 +20,13 @@ then # Give extra arguments to mysqld with the my.cnf file. This script may # be overwritten at next upgrade. -- $bindir/safe_mysqld \ -- --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file & -+ $sbindir/safe_mysqld \ -+ --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file & -+# --log=$log_file & +- $bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file & ++ $sbindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file & + # Make lock for RedHat / SuSE + if test -w /var/lock/subsys + then + touch /var/lock/subsys/mysql + fi else - echo "Can't execute $bindir/safe_mysqld" + echo "Can't execute $sbindir/safe_mysqld" diff --git a/support-files/debian/patches/ta b/support-files/debian/patches/ta new file mode 100644 index 00000000000..b27259f4473 --- /dev/null +++ b/support-files/debian/patches/ta @@ -0,0 +1,68 @@ +--- mysql-3.23.34a/mysql-test/install_test_db.sh.orig Mon Mar 12 08:18:24 2001 ++++ mysql-3.23.34a/mysql-test/install_test_db.sh Thu Mar 15 04:11:14 2001 +@@ -5,6 +5,15 @@ + # This scripts creates the privilege tables db, host, user, tables_priv, + # columns_priv in the mysql database, as well as the func table. + ++if [ x$1 = x"-debian" ]; then ++ DEBIAN=1 ++ shift 1 ++ execdir=/usr/sbin ++ bindir=/usr/bin ++ BINARY_DIST=1 ++ fix_bin=/var/mysql/mysql-test ++else ++ + if [ x$1 = x"-bin" ]; then + shift 1 + execdir=../bin +@@ -17,6 +26,10 @@ + fix_bin=. + fi + ++fi ++ ++ ++ + vardir=var + logdir=$vardir/log + if [ x$1 = x"-slave" ] +@@ -47,12 +60,17 @@ + #create the directories + [ -d $vardir ] || mkdir $vardir + [ -d $logdir ] || mkdir $logdir ++[ "x$RUN_USER" != "x" ] && chown -R $RUN_USER $logdir + + # Create database directories mysql & test + if [ -d $data ] ; then rm -rf $data ; fi + mkdir $data $data/mysql $data/test + + #for error messages ++if [ "x$DEBIAN" = "x1" ]; then ++ basedir=/usr ++else ++ + if [ x$BINARY_DIST = x1 ] ; then + basedir=.. + else +@@ -62,6 +80,10 @@ + ln -sf ../../sql/share share/mysql + fi + ++fi ++ ++ ++ + # Initialize variables + c_d="" i_d="" + c_h="" i_h="" +@@ -211,7 +233,9 @@ + $c_c + END_OF_DATA + then ++ [ "x$RUN_USER" != "x" ] && chown -R $RUN_USER $ldata + exit 0 + else ++ [ "x$RUN_USER" != "x" ] && chown -R $RUN_USER $ldata + exit 1 + fi diff --git a/support-files/debian/patches/tb b/support-files/debian/patches/tb new file mode 100644 index 00000000000..c3890dcab62 --- /dev/null +++ b/support-files/debian/patches/tb @@ -0,0 +1,86 @@ +--- mysql-3.23.34a/mysql-test/mysql-test-run.sh.orig Mon Mar 12 08:18:27 2001 ++++ mysql-3.23.34a/mysql-test/mysql-test-run.sh Thu Mar 15 04:11:14 2001 +@@ -37,9 +37,23 @@ + XARGS=`which xargs | head -1` + SED=sed + ++if [ $USER = root ]; then ++ RUN_USER="mysql" ++ RUN_USER_OPT="--user=$RUN_USER" ++ export RUN_USER ++fi ++ ++ + # Are we using a source or a binary distribution? + + testdir=@testdir@ ++ ++if [ -d /var/mysql/mysql-test ]; then ++ DEBIAN=1 ++ cd /var/mysql/mysql-test ++ testdir=/var/mysql ++fi ++ + if [ -d bin/mysqld ] && [ -d mysql-test ] ; then + cd mysql-test + else +@@ -56,6 +70,10 @@ + exit 1 + fi + ++if [ x$DEBIAN = x1 ]; then ++ MY_BASEDIR=/usr ++fi ++ + #++ + # Misc. Definitions + #-- +@@ -184,12 +202,21 @@ + [ -d $MYSQL_TEST_DIR/var ] || mkdir $MYSQL_TEST_DIR/var + [ -d $MYSQL_TEST_DIR/var/tmp ] || mkdir $MYSQL_TEST_DIR/var/tmp + [ -d $MYSQL_TEST_DIR/var/run ] || mkdir $MYSQL_TEST_DIR/var/run ++[ -d $MYSQL_TEST_DIR -a "x$RUN_USER" != "x" ] && chown -R $RUN_USER $MYSQL_TEST_DIR + + [ -z "$COLUMNS" ] && COLUMNS=80 + E=`$EXPR $COLUMNS - 8` + #DASH72=`expr substr '------------------------------------------------------------------------' 1 $E` + DASH72=`$ECHO '------------------------------------------------------------------------'|$CUT -c 1-$E` + ++if [ "x$DEBIAN" = "x1" ]; then ++ MYSQLD="/usr/sbin/mysqld" ++ MYSQL_TEST="/usr/sbin/mysqltest" ++ MYSQLADMIN="/usr/bin/mysqladmin" ++ INSTALL_DB="/var/mysql/mysql-test/install_test_db -debian" ++ ++else ++ + # on source dist, we pick up freshly build executables + # on binary, use what is installed + if [ x$SOURCE_DIST = x1 ] ; then +@@ -250,6 +277,8 @@ + read unused + } + ++fi ++ + + error () { + $ECHO "Error: $1" +@@ -365,7 +394,7 @@ + --language=english \ + --innobase_data_file_path=ibdata1:50M \ + $SMALL_SERVER \ +- $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT" ++ $RUN_USER_OPT $EXTRA_MASTER_OPT $EXTRA_MASTER_MYSQLD_OPT" + if [ x$DO_DDD = x1 ] + then + $ECHO "set args $master_args" > $GDB_MASTER_INIT +@@ -420,7 +449,7 @@ + --language=english \ + --skip-innobase \ + $SMALL_SERVER \ +- $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT" ++ $RUN_USER_OPT $EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT" + if [ x$DO_DDD = x1 ] + then + $ECHO "set args $master_args" > $GDB_SLAVE_INIT diff --git a/support-files/debian/rules b/support-files/debian/rules index e63f144a655..c03e7fd1742 100755 --- a/support-files/debian/rules +++ b/support-files/debian/rules @@ -4,9 +4,11 @@ package=mysql CHARSET=ujis +SYSNAME= + TEMPINST=build -#CFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static +# CFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -mpentium -mstack-align-double -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static CC=gcc CFLAGS=-O6 -fomit-frame-pointer @@ -14,7 +16,6 @@ CXX=gcc CXXFLAGS=-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti # CXXFLAGS=-O6 -fomit-frame-pointer -felide-constructors -fno-rtti -SYSNAME= COMMONCONF= --prefix=/usr --libexecdir=/usr/sbin \ --localstatedir=/var/mysql/data \ --enable-shared \ @@ -26,8 +27,14 @@ COMMONCONF= --prefix=/usr --libexecdir=/usr/sbin \ SERVERCONF=$(COMMONCONF) --enable-assembler \ --with-raid +MYSQLMAXCONF= --with-server-suffix=-Max \ + --with-innodb \ + --with-berkeley-db + +# --with-gemini \ + # --with-berkeley-db-includes=/usr/include/db3 \ -# --with-berkeley-db-libs=/usr/lib/libdb3.a +# --with-berkeley-db-libs=/usr/lib STATICCONF=--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static @@ -37,6 +44,7 @@ CLIENTCONF=$(COMMONCONF) --without-server patches debian/stamp-patches: -test -e debian/stamp-patches || \ for i in `find debian/patches -type f -print` ; do \ + echo "==== $$i ====" ; \ patch -p1 < $$i ; \ done touch debian/stamp-patches @@ -46,9 +54,15 @@ premkdir debian/stamp-premkdir: $(checkdir) -rm -rf debian/tmp debian/$(TEMPINST)* dh_installdirs - -install -d debian/$(TEMPINST)/usr/{bin,sbin,share,man,include,info} - -install -d debian/$(TEMPINST)-shared/usr/{bin,sbin,share,man,include,info} - -install -d debian/$(TEMPINST)-debug/usr/{bin,sbin,share,man,include,info} + + for i in '' -shared -debug -max -max-shared -max-debug ; do \ + install -d debian/$(TEMPINST)$${i}/usr/{bin,sbin,share,man,include,info} ; \ + done + +# -install -d debian/$(TEMPINST)$${i}/usr/{bin,sbin,share,man,include,info} +# -install -d debian/$(TEMPINST)-shared/usr/{bin,sbin,share,man,include,info} +# -install -d debian/$(TEMPINST)-debug/usr/{bin,sbin,share,man,include,info} + touch debian/stamp-premkdir ################################################## @@ -59,6 +73,7 @@ config debian/stamp-config: debian/stamp-premkdir debian/stamp-patches --with-charset=$(CHARSET) \ --with-bench \ $(SYSNAME) + # sed 's/-fno-implicit-templates//g' sql/Makefile > .m # mv .m sql/Makefile touch debian/stamp-config @@ -101,6 +116,51 @@ build-debug debian/stamp-build-debug: debian/stamp-patches touch debian/stamp-build-debug +################################################## +debian/stamp-mysql-max: debian/stamp-mysql-max-static debian/stamp-mysql-max-shared debian/stamp-mysql-max-debug + +debian/stamp-mysql-max-static: debian/stamp-premkdir debian/stamp-patches + -make distclean + CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \ + ./configure $(SERVERCONF) $(STATICCONF) \ + $(MYSQLMAXCONF) \ + --with-charset=$(CHARSET) \ + $(SYSNAME) + + make LDFLAGS="-static" + make install DESTDIR=`pwd`/debian/$(TEMPINST)-max + + touch debian/stamp-mysql-max-static + +debian/stamp-mysql-max-shared: debian/stamp-premkdir debian/stamp-patches + -make distclean + CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \ + ./configure $(SERVERCONF) \ + $(MYSQLMAXCONF) \ + --with-charset=$(CHARSET) \ + $(SYSNAME) + + make + make install DESTDIR=`pwd`/debian/$(TEMPINST)-max-shared + + touch debian/stamp-mysql-max-shared + + +debian/stamp-mysql-max-debug: debian/stamp-premkdir debian/stamp-patches + -make distclean + CC=$(CC) CFLAGS="$(CFLAGS)" CXX=$(CXX) CXXFLAGS="$(CXXFLAGS)" \ + ./configure $(SERVERCONF) \ + $(MYSQLMAXCONF) \ + --with-charset=$(CHARSET) \ + --with-debug \ + $(SYSNAME) + + make + make install DESTDIR=`pwd`/debian/$(TEMPINST)-max-debug + + touch debian/stamp-mysql-max-debug + + ################################################## clean: $(checkdir) @@ -123,12 +183,12 @@ binary-indep: checkroot build # generated by this package. If there were any they would be # made here. -binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug +binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug debian/stamp-mysql-max sh debian/move ### init, post* dh_installdeb - cp debian/shlibs debian/libmysqlclient9/DEBIAN/ + cp debian/shlibs debian/libmysqlclient10/DEBIAN/ cp debian/my.cnf debian/mysql-server/etc/ cp support-files/mysql.server debian/mysql-server/etc/init.d/mysql ; chmod +x debian/mysql-server/etc/init.d/mysql @@ -143,7 +203,7 @@ binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug dh_shlibdeps dh_gencontrol - dpkg --build debian/libmysqlclient9 .. + dpkg --build debian/libmysqlclient10 .. dpkg --build debian/mysql-client .. dpkg --build debian/mysql-server .. dpkg --build debian/mysql-server-shared .. @@ -151,6 +211,9 @@ binary-arch: checkroot build debian/stamp-build-shared debian/stamp-build-debug dpkg --build debian/mysql-dev .. dpkg --build debian/mysql-bench .. dpkg --build debian/mysql-doc .. + dpkg --build debian/mysql-max .. + dpkg --build debian/mysql-max-shared .. + dpkg --build debian/mysql-max-debug .. define checkdir test -f debian/rules diff --git a/support-files/debian/shlibs b/support-files/debian/shlibs index 9906c2b605f..5500d337df9 100644 --- a/support-files/debian/shlibs +++ b/support-files/debian/shlibs @@ -1 +1 @@ -libmysqlclient 9 libmysqlclient9 +libmysqlclient 10 libmysqlclient10 From 76eaa2595f785d2664bc0165cf8431c79ed92659 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2001 14:26:43 -0600 Subject: [PATCH 6/9] fixed mysterious offset confusion bug added a test case for it - took some creative work to figure out how to make it happen at will updated the manual Docs/manual.texi: fixed wrong info on SLAVE_SKIP_COUNTER fixed wrong info in BitKeeper tree build instructions updated change history about bug fix mysql-test/t/rpl_sporadic_master.test: tried hard to get slave confused, but failed. nevertheless, a more exhaustive test case does not hurt sql/slave.cc: fixed mysterious offset confusion bug --- Docs/manual.texi | 14 ++++++--- mysql-test/r/rpl_mystery22.result | 4 +++ mysql-test/t/rpl_mystery22.test | 43 +++++++++++++++++++++++++++ mysql-test/t/rpl_sporadic_master.test | 11 +++++-- sql/slave.cc | 2 ++ 5 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 mysql-test/r/rpl_mystery22.result create mode 100644 mysql-test/t/rpl_mystery22.test diff --git a/Docs/manual.texi b/Docs/manual.texi index 3d355bd0410..1d3fae2f785 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -6543,8 +6543,8 @@ shell> make A collection of our standard configure scripts is located in the @file{BUILD/} subdirectory. If you are lazy, you can use -@file{BUILD/compile-pentium-debug}. It will actually work on a lot of -non-x86 machines despite its name. +@file{BUILD/compile-pentium-debug}. To compile on a different architecture, +modify the script removing flags that are Pentium-specific. @item When the build is done, run @code{make install}. Be careful with this @@ -29828,8 +29828,11 @@ query from the master. @item If you have decided you can skip the next query, do @code{SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START;} to skip a query that -does not use auto_increment, last_insert_id or timestamp, or -@code{SET SQL_SLAVE_SKIP_COUNTER=2; SLAVE START;} otherwise +does not use auto_increment, or last_insert_id or +@code{SET SQL_SLAVE_SKIP_COUNTER=2; SLAVE START;} otherwise. The reason +auto_increment/last_insert_id queries are different is that they take +two events in the binary log of the master. + @item If you are sure the slave started out perfectly in sync with the master, and no one has updated the tables involved outside of slave thread, @@ -45728,6 +45731,9 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.40 @itemize @bullet @item +Fixed bug in slave thread when under some rare circumstances it could +get 22 bytes ahead on the offset in the master +@item Added @code{slave_wait_timeout} for replication. @item Fixed problem with @code{UPDATE} and BDB tables. diff --git a/mysql-test/r/rpl_mystery22.result b/mysql-test/r/rpl_mystery22.result new file mode 100644 index 00000000000..f85b057eefa --- /dev/null +++ b/mysql-test/r/rpl_mystery22.result @@ -0,0 +1,4 @@ +n +1 +2 +3 diff --git a/mysql-test/t/rpl_mystery22.test b/mysql-test/t/rpl_mystery22.test new file mode 100644 index 00000000000..3a48ef84dc1 --- /dev/null +++ b/mysql-test/t/rpl_mystery22.test @@ -0,0 +1,43 @@ +# test case to make slave thread get ahead by 22 bytes + +source include/master-slave.inc; +connection master; +# first, cause a duplicate key problem on the slave +create table t1(n int auto_increment primary key); +save_master_pos; +connection slave; +sync_with_master; +insert into t1 values (2); +connection master; +insert into t1 values(NULL); +insert into t1 values(NULL); +save_master_pos; +connection slave; +sleep 1; # there is no way around this sleep - we have to wait until +# the slave tries to run the query, fails and aborts slave thread +delete from t1 where n = 2; +slave start; +sync_with_master; +#now the buggy slave would be confused on the offset but it can replicate +#in order to make it break, we need to stop/start the slave one more time +slave stop; +connection master; +# to be able to really confuse the slave, we need some non-auto-increment +# events in the log +create table t2(n int); +drop table t2; +insert into t1 values(NULL); +save_master_pos; +connection slave; +slave start; +#now the truth comes out - if the slave is buggy, it will never sync because +#the slave thread is not able to read events +sync_with_master; +select * from t1; +#clean up +connection master; +drop table t1; +save_master_pos; +connection slave; +sync_with_master; + diff --git a/mysql-test/t/rpl_sporadic_master.test b/mysql-test/t/rpl_sporadic_master.test index a3217f9dd55..c1a47781ddf 100644 --- a/mysql-test/t/rpl_sporadic_master.test +++ b/mysql-test/t/rpl_sporadic_master.test @@ -3,12 +3,19 @@ source include/master-slave.inc; connection master; -drop table if exists t1; +drop table if exists t1,t2; +create table t2(n int); create table t1(n int not null auto_increment primary key); insert into t1 values (NULL),(NULL); delete from t1; # We have to use 4 in the following to make this test work with all table types insert into t1 values (4),(NULL); +save_master_pos; +connection slave; +sync_with_master; +slave stop; +slave start; +connection master; insert into t1 values (NULL),(NULL); flush logs; delete from t1; @@ -20,7 +27,7 @@ connection slave; sync_with_master; select * from t1; connection master; -drop table t1; +drop table t1,t2; save_master_pos; connection slave; sync_with_master; diff --git a/sql/slave.cc b/sql/slave.cc index ab1a880a46e..7cb9bdfd3fc 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1222,6 +1222,8 @@ pthread_handler_decl(handle_slave,arg __attribute__((unused))) thd->thread_stack = (char*)&thd; // remember where our stack is thd->temporary_tables = save_temporary_tables; // restore temp tables threads.append(thd); + glob_mi.pending = 0; //this should always be set to 0 when the slave thread + // is started DBUG_PRINT("info",("master info: log_file_name=%s, position=%s", glob_mi.log_file_name, llstr(glob_mi.pos,llbuff))); From 0e66a78a4deda14424dc2585caaba201c7fa573b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jul 2001 23:34:04 +0300 Subject: [PATCH 7/9] Upgrade TL_WRITE_CONCURRENT_INSERT to TL_WRITE_LOW_PRIORITY if --low-priority-updates is used and the file has holes. Docs/manual.texi: Changelog sql/sql_insert.cc: Fixed that sleeptime is 0 for new insert delayed threads. --- Docs/manual.texi | 4 +++- include/thr_lock.h | 1 + mysys/thr_lock.c | 9 +++++---- sql/mysqld.cc | 1 + sql/sql_insert.cc | 1 + 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Docs/manual.texi b/Docs/manual.texi index 3d355bd0410..63aab0b7a59 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -24702,7 +24702,7 @@ The meanings of the configuration parameters are the following: @multitable @columnfractions .30 .70 @item @code{innodb_data_home_dir} @tab -The common part of the directory path for all innobase data files. +The common part of the directory path for all InnoDB data files. @item @code{innodb_data_file_path} @tab Paths to individual data files and their sizes. The full directory path to each data file is acquired by concatenating innodb_data_home_dir to @@ -45728,6 +45728,8 @@ not yet 100% confident in this code. @appendixsubsec Changes in release 3.23.40 @itemize @bullet @item +Fixed problem with @code{--low-priority-updates} and @code{INSERT}'s. +@item Added @code{slave_wait_timeout} for replication. @item Fixed problem with @code{UPDATE} and BDB tables. diff --git a/include/thr_lock.h b/include/thr_lock.h index 42bcd9bcaba..6dd59f80e64 100644 --- a/include/thr_lock.h +++ b/include/thr_lock.h @@ -65,6 +65,7 @@ enum thr_lock_type { TL_IGNORE=-1, extern ulong max_write_lock_count; extern my_bool thr_lock_inited; +extern enum thr_lock_type thr_upgraded_concurrent_insert_lock; typedef struct st_thr_lock_data { pthread_t thread; diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index cff4d3bbac8..7d86d0c9524 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -85,6 +85,7 @@ multiple read locks. my_bool thr_lock_inited=0; ulong locks_immediate = 0L, locks_waited = 0L; +enum thr_lock_type thr_upgraded_concurrent_insert_lock = TL_WRITE; /* The following constants are only for debug output */ #define MAX_THREADS 100 @@ -514,7 +515,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) } } else if (lock_type == TL_WRITE_CONCURRENT_INSERT && ! lock->check_status) - data->type=lock_type= TL_WRITE; /* not supported */ + data->type=lock_type= thr_upgraded_concurrent_insert_lock; if (lock->write.data) /* If there is a write lock */ { @@ -556,7 +557,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) { /* no scheduled write locks */ if (lock_type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) - data->type=lock_type=TL_WRITE; /* Upgrade lock */ + data->type=lock_type= thr_upgraded_concurrent_insert_lock; if (!lock->read.data || (lock_type <= TL_WRITE_DELAYED && @@ -943,10 +944,10 @@ my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data) DBUG_ENTER("thr_upgrade_write_delay_lock"); pthread_mutex_lock(&lock->mutex); - if (data->type == TL_UNLOCK || data->type == TL_WRITE) /* Aborted */ + if (data->type == TL_UNLOCK || data->type >= TL_WRITE_LOW_PRIORITY) { pthread_mutex_unlock(&lock->mutex); - DBUG_RETURN(data->type == TL_UNLOCK); + DBUG_RETURN(data->type == TL_UNLOCK); /* Test if Aborted */ } check_locks(lock,"before upgrading lock",0); /* TODO: Upgrade to TL_WRITE_CONCURRENT_INSERT in some cases */ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 422d27ec624..5d4339d3ca6 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3563,6 +3563,7 @@ static void get_options(int argc,char **argv) break; case OPT_LOW_PRIORITY_UPDATES: thd_startup_options|=OPTION_LOW_PRIORITY_UPDATES; + thr_upgraded_concurrent_insert_lock= TL_WRITE_LOW_PRIORITY; low_priority_updates=1; break; case OPT_BOOTSTRAP: diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 14f4a732eac..50e4a6dedd4 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -871,6 +871,7 @@ static pthread_handler_decl(handle_delayed_insert,arg) /* Add thread to THD list so that's it's visible in 'show processlist' */ pthread_mutex_lock(&LOCK_thread_count); thd->thread_id=thread_id++; + thd->end_time(); threads.append(thd); pthread_mutex_unlock(&LOCK_thread_count); From 8e3872f34e26149437952832330814abb4438772 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jul 2001 02:37:41 +0300 Subject: [PATCH 8/9] Fixed bad merge and fixed some wrong test cases mysql-test/t/rpl_magic.test: Added missing drop table mysql-test/t/rpl_mystery22.test: Added missing drop table mysql-test/t/rpl_sporadic_master.test: Fixed bad merge --- mysql-test/t/rpl_magic.test | 1 + mysql-test/t/rpl_mystery22.test | 1 + mysql-test/t/rpl_sporadic_master.test | 4 +--- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/t/rpl_magic.test b/mysql-test/t/rpl_magic.test index 18f1cea34a3..376edc301d7 100644 --- a/mysql-test/t/rpl_magic.test +++ b/mysql-test/t/rpl_magic.test @@ -28,3 +28,4 @@ disable_rpl_parse; select * from t1; connection slave; select * from t1; +drop table t1; diff --git a/mysql-test/t/rpl_mystery22.test b/mysql-test/t/rpl_mystery22.test index 3a48ef84dc1..e987074697b 100644 --- a/mysql-test/t/rpl_mystery22.test +++ b/mysql-test/t/rpl_mystery22.test @@ -1,5 +1,6 @@ # test case to make slave thread get ahead by 22 bytes +drop table if exists t1; source include/master-slave.inc; connection master; # first, cause a duplicate key problem on the slave diff --git a/mysql-test/t/rpl_sporadic_master.test b/mysql-test/t/rpl_sporadic_master.test index a8d953b94a4..0487f868436 100644 --- a/mysql-test/t/rpl_sporadic_master.test +++ b/mysql-test/t/rpl_sporadic_master.test @@ -19,9 +19,7 @@ connection master; insert into t1 values (NULL),(NULL); flush logs; truncate table t1; -insert into t1 values (10),(NULL); -insert into t1 values (NULL),(NULL) -insert into t1 values (NULL),(NULL); +insert into t1 values (10),(NULL),(NULL),(NULL),(NULL),(NULL); save_master_pos; connection slave; sync_with_master; From cccb3aaf70ea1fafc629bcdedd9a2f019629c790 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jul 2001 13:31:54 +0300 Subject: [PATCH 9/9] Changes for the furtherment of UNIONS --- sql/sql_class.h | 9 +-- sql/sql_insert.cc | 7 ++- sql/sql_parse.cc | 21 ++++++- sql/sql_unions.cc | 145 ++++++++++++++++++++++++---------------------- 4 files changed, 106 insertions(+), 76 deletions(-) diff --git a/sql/sql_class.h b/sql/sql_class.h index 5cec5341dc3..bb5071a2e1c 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -481,12 +481,13 @@ class select_insert :public select_result { uint save_time_stamp; ulonglong last_insert_id; COPY_INFO info; + bool unions; - select_insert(TABLE *table_par,List *fields_par,enum_duplicates duplic) + select_insert(TABLE *table_par,List *fields_par,enum_duplicates duplic, bool u=false) :table(table_par),fields(fields_par), save_time_stamp(0),last_insert_id(0) { bzero((char*) &info,sizeof(info)); - info.handle_duplicates=duplic; + info.handle_duplicates=duplic; unions = u; } ~select_insert(); int prepare(List &list); @@ -511,8 +512,8 @@ public: HA_CREATE_INFO *create_info_par, List &fields_par, List &keys_par, - List &select_fields,enum_duplicates duplic) - :select_insert (NULL, &select_fields, duplic), db(db_name), + List &select_fields,enum_duplicates duplic, bool u=false) + :select_insert (NULL, &select_fields, duplic, u), db(db_name), name(table_name), extra_fields(&fields_par),keys(&keys_par), create_info(create_info_par), lock(0) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 19dc239c050..2dd54704a2d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1318,7 +1318,8 @@ bool select_insert::send_eof() thd->cuted_fields); if (last_insert_id) thd->insert_id(last_insert_id); // For update log - ::send_ok(&thd->net,info.copied,last_insert_id,buff); + if (!unions) + ::send_ok(&thd->net,info.copied,last_insert_id,buff); mysql_update_log.write(thd,thd->query,thd->query_length); if (mysql_bin_log.is_open()) { @@ -1400,7 +1401,9 @@ bool select_create::send_eof() mysql_unlock_tables(thd, lock); if (!table->tmp_table) hash_delete(&open_cache,(byte*) table); - lock=0; table=0; + lock=0; + if (!unions) + table=0; VOID(pthread_mutex_unlock(&LOCK_open)); } return tmp; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 18774955f6a..f6d24830a61 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1754,7 +1754,15 @@ mysql_execute_command(void) break; } if (!(res=open_and_lock_tables(thd,(TABLE_LIST *)total->first))) + { + /* Fix tables--to-be-unioned-from list to point at opened tables */ + for (SELECT_LEX *sl=&lex->select_lex;sl;sl=sl->next) + { + for (TABLE_LIST *cursor=(TABLE_LIST *)sl->table_list.first;cursor;cursor=cursor->next) + cursor->table= ((TABLE_LIST*) cursor->table)->table; + } res=mysql_union(thd,lex, select_lex->select_number+1); + } close_thread_tables(thd); break; } @@ -2894,11 +2902,12 @@ TABLE_LIST *add_table_to_list(Table_ident *table, LEX_STRING *alias, static int link_in_large_list_and_check_acl(THD *thd,LEX *lex,SQL_LIST *tables) { SELECT_LEX *sl; const char *current_db=thd->db ? thd->db : ""; + TABLE_LIST *ptr; for (sl=&lex->select_lex;sl;sl=sl->next) { if ((lex->sql_command == SQLCOM_UNION_SELECT) && (sl->order_list.first != (byte *)NULL) && (sl->next != (st_select_lex *)NULL)) { - net_printf(&thd->net,ER_ILLEGAL_GRANT_FOR_TABLE); // correct error message will come here; only last SELECt can have ORDER BY + net_printf(&thd->net,ER_ILLEGAL_GRANT_FOR_TABLE); // correct error message will come here; only last SELECT can have ORDER BY return -1; } if (sl->table_list.first == (byte *)NULL) continue; @@ -2919,7 +2928,15 @@ static int link_in_large_list_and_check_acl(THD *thd,LEX *lex,SQL_LIST *tables) aux->lock_type= lex->lock_option; if (!tables->next) tables->next= (byte**) &tables->first; - link_in_list(tables,(byte*)aux,(byte**) &aux->next); + if (!(ptr = (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST)))) + return 1; + ptr->db= aux->db; ptr->real_name=aux->real_name; + ptr->name=aux->name; ptr->lock_type=aux->lock_type; + ptr->updating=aux->updating; + ptr->use_index=aux->use_index; + ptr->ignore_index=aux->use_index; + aux->table=(TABLE *)ptr; + link_in_list(tables,(byte*)ptr,(byte**) &ptr->next); } } } diff --git a/sql/sql_unions.cc b/sql/sql_unions.cc index 1a00f08c434..cd0b41ac3ca 100644 --- a/sql/sql_unions.cc +++ b/sql/sql_unions.cc @@ -29,7 +29,8 @@ int mysql_union(THD *thd,LEX *lex,uint no_of_selects) { SELECT_LEX *sl, *for_order=&lex->select_lex; uint no=0; int res=0; - List fields; TABLE *table=(TABLE *)NULL; TABLE_LIST *resulting=(TABLE_LIST *)NULL; + select_create *create_result; + List fields; TABLE *table=(TABLE *)NULL; TABLE_LIST *resulting=(TABLE_LIST *)NULL; for (;for_order->next;for_order=for_order->next); ORDER *some_order = (ORDER *)for_order->order_list.first; for (sl=&lex->select_lex;sl;sl=sl->next, no++) @@ -37,102 +38,110 @@ int mysql_union(THD *thd,LEX *lex,uint no_of_selects) TABLE_LIST *tables=(TABLE_LIST*) sl->table_list.first; if (!no) // First we do CREATE from SELECT { - select_create *result; lex->create_info.options=HA_LEX_CREATE_TMP_TABLE; - if ((result=new select_create(tables->db ? tables->db : thd->db, - NULL, &lex->create_info, + lex->create_info.db_type=DB_TYPE_MYISAM; + lex->create_info.row_type = ROW_TYPE_DEFAULT; + lex->create_info.avg_row_length = 0; + lex->create_info.max_rows=INT_MAX; lex->create_info.min_rows=0; + lex->create_info.comment=lex->create_info.password=NullS; + lex->create_info.data_file_name=lex->create_info.index_file_name=NullS; + lex->create_info.raid_type=lex->create_info.raid_chunks=0; + lex->create_info.raid_chunksize=0; + lex->create_info.if_not_exists=false; + lex->create_info.used_fields=0; + + if ((create_result=new select_create(tables->db ? tables->db : thd->db, + "ZVEK", &lex->create_info, lex->create_list, lex->key_list, - sl->item_list,DUP_IGNORE))) + sl->item_list,DUP_IGNORE,true))) { - res=mysql_select(thd,tables,sl->item_list, - sl->where, - sl->ftfunc_list, - (ORDER*) NULL, - (ORDER*) sl->group_list.first, - sl->having, - (ORDER*) some_order, - sl->options | thd->options, - result); - if (res) - { - result->abort(); - delete result; - return res; - } - table=result->table; - List_iterator it(*(result->fields)); - Item *item; - while ((item= it++)) - fields.push_back(item); - delete result; - if (!reopen_table(table)) return 1; - if (!(resulting = (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST)))) - return 1; - resulting->db=tables->db ? tables->db : thd->db; - resulting->real_name=table->real_name; - resulting->name=table->table_name; - resulting->table=table; + res=mysql_select(thd,tables,sl->item_list, + sl->where, + sl->ftfunc_list, + (ORDER*) NULL, + (ORDER*) sl->group_list.first, + sl->having, + (ORDER*) some_order, + sl->options | thd->options, + create_result); + if (res) + { + create_result->abort(); + delete create_result; + return res; + } + table=create_result->table; + List_iterator it(*(create_result->fields)); + Item *item; + while ((item= it++)) + fields.push_back(item); + if (!(resulting = (TABLE_LIST *) thd->calloc(sizeof(TABLE_LIST)))) + return 1; + resulting->db=tables->db ? tables->db : thd->db; + resulting->real_name=table->real_name; + resulting->name=table->table_name; + resulting->table=table; } else - return -1; + return -1; } else // Then we do INSERT from SELECT { select_result *result; - if ((result=new select_insert(table, &fields, DUP_IGNORE))) + if ((result=new select_insert(table, &fields, DUP_IGNORE, true))) { - res=mysql_select(thd,tables,sl->item_list, - sl->where, + res=mysql_select(thd,tables,sl->item_list, + sl->where, sl->ftfunc_list, - (ORDER*) some_order, - (ORDER*) sl->group_list.first, - sl->having, - (ORDER*) NULL, - sl->options | thd->options, - result); - delete result; - if (res) return 1; + (ORDER*) some_order, + (ORDER*) sl->group_list.first, + sl->having, + (ORDER*) NULL, + sl->options | thd->options, + result); + delete result; + if (res) + { + delete create_result; + return 1; + } } else - return -1; + { + delete create_result; + return -1; + } } } select_result *result; List item_list; List ftfunc_list; ftfunc_list.empty(); - if (item_list.push_back(new Item_field(NULL,NULL,"*"))) - return -1; + void(item_list.push_back(new Item_field(NULL,NULL,"*"))); if (lex->exchange) { if (lex->exchange->dumpfile) - { - if (!(result=new select_dump(lex->exchange))) - return -1; - } + result=new select_dump(lex->exchange); else - { - if (!(result=new select_export(lex->exchange))) - return -1; - } + result=new select_export(lex->exchange); } - else if (!(result=new select_send())) - return -1; - else + else result=new select_send(); + if (result) { res=mysql_select(thd,resulting,item_list, - NULL, - ftfunc_list, - (ORDER*) NULL, - (ORDER*) NULL, - NULL, - (ORDER*) NULL, - thd->options, - result); + NULL, + ftfunc_list, + (ORDER*) NULL, + (ORDER*) NULL, + NULL, + (ORDER*) NULL, + thd->options, + result); if (res) result->abort(); + delete result; } - delete result; + delete create_result; return res; }