Commit graph

10974 commits

Author SHA1 Message Date
unknown
5728fbb552 Merge bk-internal:/home/bk/mysql-5.1-new-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-09-01 16:57:51 +02:00
unknown
6b71aaa256 Move test that requires innodb to "mysql_innodb" 2006-09-01 16:51:37 +02:00
unknown
adb650b236 Fix results of mysqldump test after messy merge
mysql-test/r/mysqldump.result:
  Fix results
2006-08-31 21:21:23 -07:00
unknown
6a20f7431a Merge rama.(none):/home/jimw/my/mysql-5.0-clean
into  rama.(none):/home/jimw/my/mysql-5.1-clean

mysqldump.result is wrong, will need to be cleaned up.


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Resolve conflict (probably wrong)
mysql-test/t/mysqldump.test:
  Resolve conflicts, make sure all tests new to 5.1 come after 'End of 5.0 tests'
2006-08-31 21:02:17 -07:00
unknown
55c61a6ea6 Restore bug fix lost in merge of client/mysqldump.c, and clean up mysqldump.test
so that 4.1 and 5.0 tests are all in the right place and no tests are duplicated.


client/mysqldump.c:
  Restore fix for bug 21215 accidently removed during merge
mysql-test/r/mysqldump.result:
  Update results
mysql-test/t/mysqldump.test:
  Fix order of tests so that all the tests new to the 5.0 tree come after
  "End of 4.1 tests", and so that each leaves things in the state it found
  them (particularly by returning to the 'test' database. Also remove some
  tests that were duplicated.
2006-08-31 20:53:34 -07:00
unknown
cf749a7aa9 Resolve conflicts 2006-08-31 18:24:37 -07:00
unknown
648f8a178f Manual merge.
include/config-netware.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-08-30 21:26:43 -04:00
unknown
85281ce80f Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1
2006-08-30 18:19:39 -04:00
unknown
6d48c8c703 Merge maint2.mysql.com:/data/localhome/tsmith/bk/bfx/50
into  maint2.mysql.com:/data/localhome/tsmith/bk/bfx/51


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
BUILD/SETUP.sh:
  SCCS merged
BUILD/check-cpu:
  Manual merge.
2006-08-30 23:20:01 +02:00
unknown
4e16868d88 Merge maint2.mysql.com:/data/localhome/tsmith/bk/bfx/41
into  maint2.mysql.com:/data/localhome/tsmith/bk/bfx/50


BUILD/SETUP.sh:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
BUILD/check-cpu:
  Manual merge.
2006-08-30 23:14:29 +02:00
unknown
077b649aef Remove ^Z from ctype_ucs.test data, to avoid problems testing on Windows 2006-08-30 22:39:23 +02:00
unknown
2592d4a139 Merge lamia.home:/home/timka/mysql/src/5.0-bug-21456
into  lamia.home:/home/timka/mysql/src/5.1-bug-21456


mysql-test/r/distinct.result:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-08-29 16:39:09 +03:00
unknown
a2c533ce68 Correcting bad merge. 2006-08-29 09:30:58 -04:00
unknown
a9a675a8e5 Post merge changes.
mysql-test/r/mysqldump.result:
  post-merge fix.
mysql-test/t/mysqldump.test:
  post-merge fix.
2006-08-28 21:13:55 -04:00
unknown
80bb699f92 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-maint_21527
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.1-new-maint_21527


include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
sql-common/client.c:
  Auto merged
client/mysqldump.c:
  manual merge
mysql-test/r/mysqldump.result:
  manual merge
mysql-test/t/mysqldump.test:
  manual merge
2006-08-28 20:41:22 -04:00
unknown
e88121ea7a Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the information_schema database.
init_dumping now accepts a function pointer to the table or view specific init_dumping function.  This allows both tables and views to use the init_dumping function.


client/mysqldump.c:
  Added functions for table and view specific dumping initalization.
mysql-test/r/mysqldump.result:
  Added Result.
mysql-test/t/mysqldump.test:
  Added test case.
2006-08-28 17:48:06 -04:00
unknown
9fac91d473 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1


storage/innobase/btr/btr0btr.c:
  Null merge.
storage/innobase/buf/buf0buf.c:
  Null merge.
storage/innobase/dict/dict0dict.c:
  Null merge.
storage/innobase/fil/fil0fil.c:
  Null merge.
storage/innobase/fsp/fsp0fsp.c:
  Null merge.
storage/innobase/include/btr0cur.ic:
  Null merge.
storage/innobase/include/buf0buf.ic:
  Null merge.
storage/innobase/log/log0log.c:
  Null merge.
storage/innobase/log/log0recv.c:
  Null merge.
storage/innobase/os/os0file.c:
  Null merge.
storage/innobase/row/row0mysql.c:
  Null merge.
storage/innobase/row/row0sel.c:
  Null merge.
storage/innobase/srv/srv0start.c:
  Null merge.
storage/innobase/ut/ut0dbg.c:
  Null merge.
client/mysqltest.c:
  Manual merge.
include/config-netware.h:
  Manual merge.
mysql-test/r/func_time.result:
  Manual merge.
mysql-test/t/func_time.test:
  Manual merge.
sql/ha_innodb.cc:
  Manual merge.
sql/item_timefunc.cc:
  Manual merge.
sql/sql_acl.cc:
  Manual merge.
tests/mysql_client_test.c:
  Manual merge.
2006-08-25 14:34:17 -04:00
unknown
bf5802c389 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1-new-maint


mysql-test/r/csv.result:
  SCCS merged
mysql-test/t/csv.test:
  SCCS merged
storage/csv/ha_tina.cc:
  Using petr's merge.
sql/sql_acl.cc:
  SCCS merged
sql/sql_show.cc:
  SCCS merged
2006-08-24 16:47:59 -04:00
unknown
19d3b53a35 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  salvation.intern.azundris.com:/home/tnurnberg/mysql-5.1-maint


client/mysql.cc:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-08-24 21:12:17 +02:00
unknown
749242b683 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-maint_11972
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.1-new-maint_11972


BitKeeper/etc/ignore:
  auto-union
client/mysql.cc:
  Auto merged
client/mysql_upgrade.c:
  Auto merged
include/config-netware.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/gen_lex_hash.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/csv.result:
  manual merge
mysql-test/t/csv.test:
  manual merge
storage/csv/ha_tina.cc:
  manual merge
2006-08-24 15:03:33 -04:00
unknown
7547a3f178 Merge salvation.intern.azundris.com:/home/tnurnberg/mysql-5.1
into  salvation.intern.azundris.com:/home/tnurnberg/mysql-5.1-maint


BitKeeper/deleted/.del-openssl.m4~41cebd0ba8281769:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/mysql_client_test.test:
  Auto merged
server-tools/instance-manager/listener.cc:
  Auto merged
server-tools/instance-manager/portability.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
client/mysql.cc:
  manual merge
mysql-test/r/grant.result:
  manual merge
2006-08-24 19:11:51 +02:00
unknown
689fae6406 Bug #11972: client uses wrong character set after reconnect.
The mysql client uses the default character set on reconnect.  The default character set is now controled by the client charset command while the client is running.  The charset command now also issues a SET NAMES command to the server to make sure that the client's charset settings are in sync with the server's.


client/mysql.cc:
  Client charset command now changes the default character set and issues a SET NAMES command to the server.
mysql-test/r/mysql.result:
  Corrected results for new behaviour.
mysql-test/t/mysql.test:
  Removed redundant commands from test.
2006-08-24 11:15:08 -04:00
unknown
2ebea0aba8 Merge neptunus.(none):/home/msvensson/mysql/my51-m-bug20841
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


mysql-test/r/ndb_dd_backuprestore.result:
  Auto merged
sql/sql_show.cc:
  Auto merged
2006-08-24 15:07:57 +02:00
unknown
78eb30e89d Bug#20841 mysqldump fails to store right info with --compatible=mysql40 option
- Add "not in version before" commensta around new syntax "WITH PARSER" and "TABLESPACE xxx STORAGE DISK"
 


mysql-test/r/ndb_dd_advance.result:
  Update result file
mysql-test/r/ndb_dd_advance2.result:
  Update result file
mysql-test/r/ndb_dd_backuprestore.result:
  Update result file
mysql-test/r/ndb_dd_basic.result:
  Update result file
mysql-test/r/ndb_dd_disk2memory.result:
  Update result file
sql/sql_show.cc:
  Add "not in version before"  comments around "WITH PARSER xxx" and "TABLESPACE xxx STORAGE DISK"
  Use STRING_WITH_LEN when adding fixed string AUTO_INCREMENT= to output from SHOW TABLE
2006-08-24 14:27:57 +02:00
unknown
43dbfa66c5 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin
2006-08-24 16:18:58 +04:00
unknown
8bf960efec Merge siva.hindu.god:/usr/home/tim/m/bk/beef-51
into  siva.hindu.god:/usr/home/tim/m/bk/51


sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2006-08-23 18:33:02 -06:00
unknown
43176fa7fd Merge siva.hindu.god:/usr/home/tim/m/bk/beef-50
into  siva.hindu.god:/usr/home/tim/m/bk/50


sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2006-08-23 18:31:15 -06:00
unknown
05a42ef6f9 Merge siva.hindu.god:/usr/home/tim/m/bk/beef-50
into  siva.hindu.god:/usr/home/tim/m/bk/beef-51


mysql-test/r/func_misc.result:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2006-08-23 18:27:34 -06:00
unknown
f23adec9cd Merge siva.hindu.god:/usr/home/tim/m/bk/b21531-41
into  siva.hindu.god:/usr/home/tim/m/bk/beef-50


mysql-test/r/func_misc.result:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
sql/item_func.h:
  Manual merge
sql/item_strfunc.cc:
  Manual merge
2006-08-23 18:24:59 -06:00
unknown
b2a0d025e3 Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets
- Fix typo in Item_func_export_set::fix_length_and_dec() which caused character set aggregation to fail
- Remove default argument from last arg of agg_arg_charsets() function, to reduce potential errors


mysql-test/r/func_misc.result:
  Test EXPORT_SET() with charset coersion (bug #21531)
mysql-test/t/func_misc.test:
  Test EXPORT_SET() with charset coersion (bug #21531)
sql/item_func.h:
  Remove default argument from last arg of agg_arg_charsets() function, to reduce potential errors.
sql/item_strfunc.cc:
  Fix typo in Item_func_export_set::fix_length_and_dec() which caused character set aggregation to fail.
2006-08-23 18:02:31 -06:00
unknown
09e7808909 Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-50
into  siva.hindu.god:/usr/home/tim/m/bk/50


sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
2006-08-23 13:43:28 -06:00
unknown
1152f80939 Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-51
into  siva.hindu.god:/usr/home/tim/m/bk/51


sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
2006-08-23 13:28:01 -06:00
unknown
0a25f54554 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  maint1.mysql.com:/data/localhome/cmiller/mysql-5.0-maint


sql/sql_lex.cc:
  Auto merged
2006-08-23 17:37:18 +02:00
unknown
07cc141e99 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new-maint
into  maint1.mysql.com:/data/localhome/cmiller/mysql-5.1-maint


sql/sql_lex.cc:
  Auto merged
2006-08-23 17:34:34 +02:00
unknown
e3181c59e7 Merge lamia.home:/home/timka/mysql/src/4.1-bug-21456
into  lamia.home:/home/timka/mysql/src/5.0-bug-21456


mysql-test/r/distinct.result:
  Merge the fix for BUG#21456
mysql-test/t/distinct.test:
  Merge the fix for BUG#21456
sql/sql_select.cc:
  Merge the fix for BUG#21456
2006-08-23 18:22:53 +03:00
unknown
9a770f5318 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  example.com:/work/mysql-5.1-runtime
2006-08-23 15:51:37 +02:00
unknown
7a37eeae62 Fix for bug #20665 All commands supported in Stored Procedures
should work in Prepared Statements. Post-review changeset.

Problem: There are some commands which are avaiable to be executed in SP
         but cannot be prepared. This patch fixes this and makes it possible
         prepare these statements.

Changes: The commands later are made available in PS. RESET has been forbidden
         in SF/Trigger.

Solution: All current server commands where checked and those missing (see later)
          we added. Tests for all of the commands with repeated executions were
          added - testing with SP, SF and PS.

SHOW BINLOG EVENTS
SHOW (MASTER | SLAVE) STATUS
SHOW (MASTER | BINARY) LOGS
SHOW (PROCEDURE | FUNCTION) CODE (parsable only in debug builds)
SHOW CREATE (PROCEDURE | FUNCTION | EVENT | TABLE | VIEW)
SHOW (AUTHORS | CONTRIBUTORS | WARNINGS | ERRORS)
CHANGE MASTER
RESET (MASTER | SLAVE | QUERY CACHE)
SLAVE (START | STOP)
CHECKSUM (TABLE | TABLES)
INSTALL PLUGIN
UNINSTALL PLUGIN
CACHE INDEX
LOAD INDEX INTO CACHE
GRANT
REVOKE
KILL
(CREATE | RENAME | DROP) DATABASE
(CREATE | RENAME | DROP) USER
FLUSH (TABLE | TABLES | TABLES WITH READ LOCK | HOSTS | PRIVILEGES |
       LOGS | STATUS | MASTER | SLAVE | DES_KEY_FILE | USER_RESOURCES)


mysql-test/r/ps.result:
  update result
mysql-test/r/ps_1general.result:
  update result
mysql-test/r/ps_grant.result:
  update result
mysql-test/r/sp-dynamic.result:
  update result
mysql-test/t/ps.test:
  Add more statements, probably all currently missing which are possible in
  a SP but not preparable.
  Every statement is tested in a SP, in a SF and attempted to prepare.
mysql-test/t/ps_1general.test:
  - Enable some of the statements, which are already possible in SP.
  - 1295 -> ER_UNSUPPORTED_PS
mysql-test/t/ps_grant.test:
  Enable statements already possible in SP.
sql/sp_head.cc:
  - Reorder to keep some alphabet order.
  - Add missing SHOW_SCHEDULER_STATUS.
sql/sql_prepare.cc:
  Add possibility to prepare statements, which are already allowed in SP.
2006-08-23 15:50:06 +02:00
unknown
2baf2fdf13 Bug #21456: SELECT DISTINCT(x) produces incorrect results when using order by
GROUP BY/DISTINCT pruning optimization must be done before ORDER BY 
optimization because ORDER BY may be removed when GROUP BY/DISTINCT
sorts as a side effect, e.g. in 
  SELECT DISTINCT <non-key-col>,<pk> FROM t1
  ORDER BY <non-key-col> DISTINCT
must be removed before ORDER BY as if done the other way around
it will remove both.


mysql-test/r/distinct.result:
  Test for BUG#21456.
mysql-test/t/distinct.test:
  Test for BUG#21456.
sql/sql_select.cc:
  Bug #21456: SELECT DISTINCT(x) produces incorrect results when using order by
  
  GROUP BY/DISTINCT pruning optimization must be done before ORDER BY 
  optimization because ORDER BY may be removed when GROUP BY/DISTINCT
  sorts as a side effect.
2006-08-23 16:46:57 +03:00
unknown
d08dd523a2 Merge mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin


storage/csv/ha_tina.cc:
  merge later
mysql-test/r/csv.result:
  manual merge
mysql-test/t/csv.test:
  manual merge
2006-08-23 17:15:24 +04:00
unknown
118677a293 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin


sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/handler.cc:
  manual merge
2006-08-23 16:48:39 +04:00
unknown
2efd625f92 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1
into  salvation.intern.azundris.com:/home/tnurnberg/mysql-5.1


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
2006-08-23 02:30:40 +02:00
unknown
f40b6c273c Merge salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.0-maint-20411
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.0-maint-20987
2006-08-22 17:27:36 +02:00
unknown
cdd9147ee2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.0-maint-20411


sql/sql_acl.cc:
  Auto merged
2006-08-22 14:31:57 +02:00
unknown
97e0f59b3b Bug#20411: "GRANT ... REQUIRE ISSUER nnn AND SUBJECT mmm" fails to require both
when X.509 subject was required for a connect, we tested whether it was the right
one, but did not refuse the connexion if not. fixed.

(corrected CS now --replace_results socket-path)


mysql-test/r/openssl_1.result:
  Bug#20411: "GRANT ... REQUIRE ISSUER nnn AND SUBJECT mmm" fails to require both
  
  test not only whether we can connect with a correct X.509 subject when one is
  required, but also assure that we can't without one.
mysql-test/t/openssl_1.test:
  Bug#20411: "GRANT ... REQUIRE ISSUER nnn AND SUBJECT mmm" fails to require both
  
  test not only whether we can connect with a correct X.509 subject when one is
  required, but also assure that we can't without one.
sql/sql_acl.cc:
  Bug#20411: "GRANT ... REQUIRE ISSUER nnn AND SUBJECT mmm" fails to require both
  
  actually refuse connexion if X.509 is required, but does not match. kudos to Al Smith.
2006-08-22 14:29:48 +02:00
unknown
a649c63130 Update result file for "grant" to 5.1 version
mysql-test/r/grant.result:
  Update result file format to 5.1 version
2006-08-22 14:16:39 +02:00
unknown
1b6858ea50 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1
2006-08-21 16:59:53 -04:00
unknown
167aaaa5a4 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1


mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/mysql_client_test.test:
  Auto merged
server-tools/instance-manager/listener.cc:
  Auto merged
server-tools/instance-manager/portability.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
BitKeeper/deleted/.del-openssl.m4~41cebd0ba8281769:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
client/mysql.cc:
  Manual merge.
mysql-test/mysql-test-run.pl:
  Manual merge.
2006-08-21 12:59:46 -04:00
unknown
a611307811 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1


mysql-test/r/func_time.result:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
mysql-test/t/func_time.test:
  Manual merge.
2006-08-21 12:55:43 -04:00
unknown
cda7278dc6 Merge mockturtle.local:/home/dlenev/src/mysql-5.0-bg21216-2
into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg19403-2


mysql-test/r/drop.result:
  Auto merged
sql/lock.cc:
  Use 5.1 version of code as bug#21216 will be fixed there in different way.
2006-08-21 12:28:35 +04:00
unknown
8daf4e8373 Fix for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes
server to crash".

Crash caused by assertion failure happened when one ran SHOW OPEN TABLES
while concurrently doing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE
or any other command that takes name-lock) in other connection.
For non-debug version of server problem exposed itself as wrong output
of SHOW OPEN TABLES statement (it was missing name-locked tables).
Finally in 5.1 both debug and non-debug versions simply crashed in
this situation due to NULL-pointer dereference.

This problem was caused by the fact that table placeholders which were
added to table cache in order to obtain name-lock had TABLE_SHARE::table_name
set to 0. Therefore they broke assumption that this member is non-0 for
all tables in table cache which was checked by assert in list_open_tables()
(in 5.1 this function simply relies on it).
The fix simply sets this member for such placeholders to appropriate value
making this assumption true again.

This patch also includes test for similar bug 12212 "Crash that happens
during removing of database name from cache" reappeared in 5.1 as bug 19403.


mysql-test/r/drop.result:
  Added test for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES
  causes server to crash" and bug#12212/19403 "Crash that happens during
  removing of database name from cache".
mysql-test/t/drop.test:
  Added test for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES
  causes server to crash" and bug#12212/19403 "Crash that happens during
  removing of database name from cache".
sql/lock.cc:
  lock_table_name():
    Our code assumes that TABLE_SHARE::table_name for objects in table cache
    is non-NULL (for example look at assertion in list_open_tables()). This
    was not true for table placeholders that were added to table cache for
    name-locking. So let us set this member for such placeholders.
2006-08-21 12:18:59 +04:00