Commit graph

48739 commits

Author SHA1 Message Date
unknown
92de7b7bb2 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-07-19 20:04:35 +02:00
unknown
d0020607b3 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/29850-bug-5.0-opt-mysql
2007-07-19 21:40:12 +04:00
unknown
6c24dd7f0c A follow-up fix for Bug#29431 "killing an insert delayed thread causes
crash" in 5.1


sql/sql_insert.cc:
  Additional safety fix: do not assume we already have a share in 
  get_local_table.
2007-07-19 21:10:19 +04:00
unknown
1e9bdcfbcd Merge bodhi.(none):/opt/local/work/mysql-5.0-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


sql/sql_insert.cc:
  Manual merge.
2007-07-19 20:27:35 +04:00
unknown
7f6a816484 Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs
a temporary table.

The result string of the Item_func_group_concat wasn't initialized in the 
copying constructor of the Item_func_group_concat class. This led to a
wrong charset of GROUP_CONCAT result when the select employs a temporary
table.

The copying constructor of the Item_func_group_concat class now correctly
initializes the charset of the result string.


mysql-test/t/func_gconcat.test:
  Added a test case for the bug#29850: Wrong charset of the GROUP_CONCAT result
  when the select employs a temporary table.
mysql-test/r/func_gconcat.result:
  Added a test case for the bug#29850: Wrong charset of the GROUP_CONCAT result
  when the select employs a temporary table.
sql/item_sum.cc:
  Bug#29850: Wrong charset of GROUP_CONCAT result when the select employs
  a temporary table.
  The copying constructor of the Item_func_group_concat class now correctly
  initializes the charset of the result string.
2007-07-19 20:21:23 +04:00
unknown
809e56e467 After-merge fix for bug#14151.
sql/sql_partition.cc:
  After-merge fix for bug#14151:
  This use of "md5.h" is new in 5.1 and must be changed to "my_md5.h" as well.
2007-07-19 18:05:55 +02:00
unknown
78cc8d3058 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/home/hf/work/29687/my51-29687
2007-07-19 21:03:26 +05:00
unknown
5547294b4e Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/29687/my51-29687
2007-07-19 21:02:11 +05:00
unknown
248c5e24e9 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/29687/my50-29687
2007-07-19 21:01:58 +05:00
unknown
223f3978f8 test case for memory leak added
tests/mysql_client_test.c:
  test case added
2007-07-19 20:59:11 +05:00
unknown
0299963601 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/29687/my50-29687
2007-07-19 20:59:08 +05:00
unknown
244c7ef315 Merge mysql.com:/home/hf/work/29687/my50-29687
into  mysql.com:/home/hf/work/29687/my51-29687


libmysql/libmysql.c:
  Auto merged
2007-07-19 20:58:04 +05:00
unknown
93de616578 A post-merge fix 2007-07-19 19:56:07 +04:00
unknown
615be59d63 Merge bk-internal.mysql.com:/data0/bk/tsmith-tmp/mysql-5.0-maint
into  bk-internal.mysql.com:/data0/bk/tsmith-tmp/mysql-5.1-maint


sql/mysql_priv.h:
  Auto merged
2007-07-19 17:44:35 +02:00
unknown
8d592e95a5 Merge bk-internal.mysql.com:/data0/bk/mysql-4.1-maint
into  bk-internal.mysql.com:/data0/bk/tsmith-tmp/mysql-5.0-maint
2007-07-19 17:43:34 +02:00
unknown
346ea19be7 Merge bodhi.(none):/opt/local/work/mysql-5.0-runtime
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


mysql-test/r/sp-prelocking.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/sp-prelocking.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/create.result:
  Use local.
mysql-test/r/innodb.result:
  Manual merge.
2007-07-19 19:42:24 +04:00
unknown
62eb5f1794 Rename all references to 'Delayed_insert' instances from 'tmp' to 'di'
for consistency.
2007-07-19 19:36:52 +04:00
unknown
e81e55e783 A fix for Bug#29431 killing an insert delayed thread causes crash
No test case, since the bug requires a stress case with 30 INSERT DELAYED
threads and 1 killer thread to repeat. The patch is verified
manually.
Review fixes.

The server that is running DELAYED inserts would deadlock itself
or crash under high load if some of the delayed threads were KILLed
in the meanwhile.

The fix is to change internal lock acquisition order of delayed inserts
subsystem and to ensure that
Delayed_insert::table_list::db does not point to volatile memory in some 
cases.
For details, please see a comment for sql_insert.cc.


sql/sql_insert.cc:
  A fix for Bug#29431 killing an insert delayed thread causes crash
  
  1) The deadlock was caused by different lock acquisition order
  between delayed_get_table and handle_delayed_insert.
  
  delayed_get_table would:
  - acquire LOCK_delayed_create
  - create a new Delayed_insert instance
  - acquire instance mutex (di->mutex)
  - "lock the instance in memory" by 
  increasing di->locked_in_memory variable
  - start the delayed thread
  - release di->mutex
  - let the delayed thread open the delayed table
  - discover that the delayed thread was killed
  - try to unlock() the delayed insert instance in memory
  - in Delayed_insert::unlock() do
   * lock LOCK_delayed_insert
   * decrease locks_in_memory and discover it's 0
   * attempt to lock di->mutex to broadcast di->cond condition <-- deadlock
   here
  
  Meanwhile, the delayed thread would
   * lock di->mutex
   * open the table
   * get killed
   * not notice that and attempt to lock LOCK_delayed_insert
  to register itself in the delayed insert list <-- deadlock here.
  
  Simply put, delayed_get_table used to lock LOCK_delayed_insert and then 
  di->mutex, and handle_delayed_insert would lock di->mutex and then 
  LOCK_delayed_insert.
  
  Fixed by moving registration in the list of delayed insert threads from 
  handle_delayed_insert to delayed_get_table - so that now
  handle_delayed_insert doesn't need to acquire LOCK_delayed_insert mutex.
  
  
  2) di->table_list.db was copied by-pointer from table_list.db of the first
  producer -- the one who initiated creation of the delayed insert thread.
  This producer might be long gone when the member is needed
  (handle_delayed_insert:open_ltable),
  e.g. by having been killed with KILL CONNECTION statement.
  Fixed by using a pointer to the consumer's deep copy of THD::db.
  
  3) In find_handler, we shouldn't assume that Delayed_insert object
  already (or still) has a table opened all the time it is
  present in the delayed insert list. E.g. it's not the case
  when Delayed_insert decided to terminate, closed the table, but haven't
  yet unregistered from the list (see the end of handle_delayed_insert).
2007-07-19 19:28:00 +04:00
unknown
22a644d272 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


sql/sql_select.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
2007-07-19 20:06:55 +05:00
unknown
e395b0ace2 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
2007-07-19 20:01:13 +05:00
unknown
c865b22514 Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt


sql/ha_myisam.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-07-19 19:57:53 +05:00
unknown
36f1e4848c Fixed bug #29338.
Optimization of queries with DETERMINISTIC functions in the
WHERE clause was not effective: sequential scan was always
used.
Now a SF with the DETERMINISTIC flags is treated as constant
when it's arguments are constants (or a SF doesn't has arguments).


sql/item_func.h:
  Fixed bug #29338.
  The Item_func_sp::used_tables has been removed
  (virtual Item_func::used_tables function is enough).
  The virtual Item_func_sp::update_used_tables function
  has been added.
sql/item_func.cc:
  Fixed bug #29338.
  The Item_func_sp::update_used_tables and the
  Item_func_sp::fix_field functions have been modified
  to take into account the DETERMINISTIC flag of SF definition.
mysql-test/r/sp.result:
  Updated test case for bug #29338.
mysql-test/t/sp.test:
  Updated test case for bug #29338.
2007-07-19 18:39:01 +05:00
unknown
bb00bbef1b Merge trift-lap.none:/MySQL/M50/bug14151-5.0
into  trift-lap.none:/MySQL/M51/bug14151-5.1


BitKeeper/deleted/.del-MySQL-Source.icc~edded3c3a5cf83b1:
  Auto merged
BitKeeper/deleted/.del-mysqlmanager-pwgen.c~d8f5f91ec54432b9:
  Auto merged
BitKeeper/deleted/.del-mysqlmanager.c~e97636d71145a0b:
  Auto merged
include/Makefile.am:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/table.cc:
  Auto merged
2007-07-19 15:11:01 +02:00
unknown
f4209c71a2 Avoid the name conflict between the system-provided "md5.h" and the MySQL one
by renaming "include/md5.h" to "include/my_md5.h".

Fixes bug#14151.


include/my_md5.h:
  Rename: include/md5.h -> include/my_md5.h
2007-07-19 14:14:03 +02:00
unknown
9fa66ba423 field.cc, field.h:
i5 compatibility


sql/field.h:
  i5 compatibility
sql/field.cc:
  i5 compatibility
2007-07-19 14:12:05 +02:00
unknown
8d7eb7139e Merge mysql.com:/home/svoj/devel/mysql/BUG26325/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG26325/mysql-5.1-engines


mysql-test/r/check.result:
  Auto merged
mysql-test/t/check.test:
  Auto merged
sql/handler.cc:
  Auto merged
2007-07-19 15:54:31 +05:00
unknown
8e500b7b75 mysqldump.result:
Post-merge fix.


mysql-test/r/mysqldump.result:
  Post-merge fix.
2007-07-19 14:56:04 +05:00
unknown
0a433b21db Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/r/mysqldump.result:
  Merge with 5.0-opt.
2007-07-19 14:23:53 +05:00
unknown
2486c23ca6 BUG#26325 - TEMPORARY TABLE "corrupt" after first read, according
to CHECK TABLE

CHECK/REPAIR TABLE reports "File not found" error when issued
against temporary table.

Fixed by disabling a brunch of code (in case it gets temporary table)
that is responsible for updating frm version as it is not needed
for temporary tables.


mysql-test/r/check.result:
  A test case for BUG#26325.
mysql-test/t/check.test:
  A test case for BUG#26325.
sql/handler.cc:
  No need to update frm version in case table was created or checked
  by server with the same version. This also ensures that we do not
  update frm version for temporary tables as this code doesn't support
  temporary tables.
2007-07-19 13:51:31 +05:00
unknown
8b59beaebe Merge gleb.loc:/home/uchum/work/bk/5.0-opt-28524
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-07-19 10:54:39 +05:00
unknown
c1d12ec726 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-07-18 15:32:22 -06:00
unknown
b55bb35c25 ddl_i18n_utf8.test, ddl_i18n_koi8r.test:
Don't run test with embedded server; requires external client connections


mysql-test/t/ddl_i18n_koi8r.test:
  Don't run test with embedded server; requires external client connections
mysql-test/t/ddl_i18n_utf8.test:
  Don't run test with embedded server; requires external client connections
2007-07-18 15:31:24 -06:00
unknown
43a6c7804b Post-merge fixes
Fixed debug code of new query cache implementation.
2007-07-18 20:52:55 +02:00
unknown
b79daf4109 Re-set the plugin name so that we can be sure the plugin init()
function doesn't set it to something else.
2007-07-18 13:37:56 -04:00
unknown
6d0419f6bc Move the filling of the table_name column above the initialization,
so that the init function has access to the name.
2007-07-18 12:27:54 -04:00
unknown
155eb4658d 5.0-opt -> 5.1-opt merge 2007-07-18 18:08:05 +03:00
unknown
2bfe84d434 Fixed bug #28524.
For each view the mysqldump utility creates a temporary table
with the same name and the same columns as the view 
in order to satisfy views that depend on this view.
After the creation of all tables, mysqldump drops all
temporary tables and creates actual views.
However, --skip-add-drop-table and --compact flags disable
DROP TABLE statements for those temporary tables. Thus, it was
impossible to create the views because of existence of the
temporary tables with the same names.


client/mysqldump.c:
  Fixed bug #28524.
  The mysqldump utility has been modified to unconditionally drop
  temporary tables before the creation of views.
mysql-test/t/mysqldump.test:
  Updated test case for bug #28524 and updated result of previous tests.
mysql-test/r/mysqldump.result:
  Updated test case for bug #28524 and updated result of previous tests.
2007-07-18 19:14:48 +05:00
unknown
0114d8c082 CMakeLists.txt, configure.js:
Allow to set mysqld exe suffix


sql/CMakeLists.txt:
  Allow to set mysqld exe suffix
win/configure.js:
  Allow to set mysqld exe suffix
2007-07-18 15:53:10 +02:00
unknown
9653787d3f Merge mysql.com:/home/kent/bk/tmp3/mysql-5.0-build
into  mysql.com:/home/kent/bk/tmp3/mysql-5.1-build


BitKeeper/deleted/.del-CMakeLists.txt~3:
  Auto merged
BitKeeper/deleted/.del-configure.js:
  Auto merged
2007-07-18 15:43:20 +02:00
unknown
73a680a54d CMakeLists.txt, configure.js:
Allow to set mysqld exe suffix


sql/CMakeLists.txt:
  Allow to set mysqld exe suffix
win/configure.js:
  Allow to set mysqld exe suffix
2007-07-18 15:42:36 +02:00
unknown
6981af6ff5 Add a test case for Bug#22427 create table if not exists + stored
function results in inconsistent behavior.

The bug itself was fixed by the patch for bug 20662.


mysql-test/r/sp-prelocking.result:
  Update results (Bug#22427)
mysql-test/t/sp-prelocking.test:
  Add a test case for Bug#22427 create table if not exists + stored 
  function results in inconsistent behavior
2007-07-18 17:09:03 +04:00
unknown
c9b88730e4 Merge magare.gmz:/home/kgeorge/mysql/work/B29325-my_errno-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.0-5.1-opt


mysys/my_symlink2.c:
  Auto merged
2007-07-18 15:57:17 +03:00
unknown
4a07ed48dd Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.0-5.1-opt


mysql-test/r/type_time.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
BitKeeper/deleted/.del-index_merge.result:
  Auto merged
mysql-test/include/index_merge1.inc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
storage/heap/ha_heap.cc:
  Auto merged
storage/heap/ha_heap.h:
  Auto merged
2007-07-18 15:56:29 +03:00
unknown
a266c16d14 Bug #29325: create table overwrites .MYD file of other
table (datadir)
Set errno when retunring an error in my_create_with_symlink.


mysys/my_symlink2.c:
  Bug #29325: set errno when retunring 
  an error in my_create_with_symlink
2007-07-18 15:33:41 +03:00
unknown
c0277a1192 A fix and a test case for Bug#26104 Bug on foreign key class constructor.
Fix the typo in the constructor. Cover a semantic check that previously
never worked with a test.


mysql-test/r/create.result:
  Update results (Bug#26104)
mysql-test/r/innodb.result:
  Update results.
mysql-test/t/create.test:
  Add a test case for Bug#26104 Bug on foreign key class constructor
mysql-test/t/innodb.test:
  Return a new error number (MySQL error instead of internal InnoDB error).
sql/sql_class.h:
  A fix for Bug#26104 Bug on foreign key class constructor -- fix
  the typo in the constructor
2007-07-18 16:22:05 +04:00
unknown
5f462f9626 Add a test case for Bug#27248 Triggers: error if insert affects temporary
table.
The bug itself is yet another manifestation of Bug 26141.


mysql-test/r/trigger.result:
  Update results.
mysql-test/t/trigger.test:
  Add a test case for Bug#27248 Triggers: error if insert affects temporary
  table
2007-07-18 14:42:06 +04:00
unknown
035b06b4e1 BUG#28838 - duplicate external_lock in mysql_alter_table
Removed duplicate call to handler::external_lock() when
ALTER TABLE that doesn't need to copy a table (quick
ALTER TABLE) was executed.

Also quick ALTER TABLE doesn't hold LOCK_open anymore when
it enables/disables indexes.


sql/sql_table.cc:
  Do not call handler::external_lock() as table is already locked
  by open_ltable().
  
  Also do not hold LOCK_open mutex for alter_table_manage_keys() as
  this function doesn't require LOCK_open (LOCK_open is required by
  wait_while_table_is_used() only).
2007-07-18 15:39:13 +05:00
unknown
082c3cb46a BUG#29839 - lowercase_table3.test: Cannot find table test/T1 from
the internal data dictiona
- re-enabled lowercase_table3 test;
- added a rule to throw away expected warning to mtr_report.pl;
- fixed a test case to produce unique warning.


mysql-test/lib/mtr_report.pl:
  Throw away a warning produced by BUG#29839 test.
mysql-test/r/lowercase_table3.result:
  Modified a test case to throw away expected warning.
mysql-test/t/disabled.def:
  Re-enabled lowercase_table3.test.
mysql-test/t/lowercase_table3.test:
  Modified a test case to throw away expected warning.
2007-07-18 13:55:50 +05:00
unknown
06b446dae4 Mark deadcode for gcov 2007-07-18 11:12:15 +04:00
unknown
043f697aee Mark deadcode for gcov 2007-07-18 00:29:25 +04:00