Commit graph

37717 commits

Author SHA1 Message Date
thek@adventure.(none)
f5ecb35e6c Bug #21074 Large query_cache freezes mysql server sporadically under heavy load
Invaldating a subset of a sufficiently large query cache can take a long time.
During this time the server is efficiently frozen and no other operation can
be executed. This patch addresses this problem by setting a time limit on
how long time a dictionary access request can take before giving up on the 
attempt. This patch does not work for query cache invalidations issued by
DROP, ALTER or RENAME TABLE operations.
2007-09-03 10:47:24 +02:00
gluh@mysql.com/eagle.(none)
33eaf2cd95 Bug#29408 Cannot find view in columns table if the selection contains a function
Use view db name as thread default database, in order to ensure
that the view is parsed and prepared correctly.
2007-09-03 12:22:56 +05:00
gshchepa/uchum@gleb.loc
df7771de65 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30126
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-08-31 17:05:37 +05:00
gshchepa/uchum@gleb.loc
3e49bbd8e7 Fixed bug #30126.
When dumping database from a 4.x server, the mysqldump client
inserted a delimiter sign inside special commentaries of the form:
  /*!... CREATE DATABASE IF NOT EXISTS ... ;*/
During restoration that dump file was splitten by delimiter signs on
the client side, and the rest of some commentary strings was prepended
to following statements.

The 4x_server_emul test case option has been added for use with the
DBUG_EXECUTE_IF debugging macro. This option affects debug server
builds only to emulate particular behavior of a 4.x server for
the mysqldump client testing. Non-debugging builds are not affected.
2007-08-31 16:59:07 +05:00
malff/marcsql@weblab.(none)
ca2b2585a5 Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime
2007-08-30 17:23:40 -06:00
davi@moksha.local
1180c22aef Bug#28587 SELECT is blocked by INSERT waiting on read lock, even with low_priority_updates
The problem is that a SELECT on one thread is blocked by INSERT ... ON
DUPLICATE KEY UPDATE on another thread even when low_priority_updates is
activated.

The solution is to possibly downgrade the lock type to the setting of
low_priority_updates if the INSERT cannot be concurrent.
2007-08-30 16:11:53 -03:00
malff/marcsql@weblab.(none)
f51c6acc37 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.0-28779-b
2007-08-30 10:38:20 -06:00
kaa@polly.(none)
33d10a0667 Use double quotes instead of single ones which make the test fail on Windows. This is for bug #30164. 2007-08-30 17:21:43 +04:00
kaa@polly.(none)
2bb849644b Bug #30164: Using client side macro inside server side comments generates broken queries
Problem:
  
In cases when a client-side macro appears inside a server-side comment, the add_line() function in mysql.cc discarded all characters until the next delimiter to remove macro arguments from the query string. This resulted in broken queries being sent to the server when the next delimiter character appeared past the comment's boundaries, because the comment closing sequence ('*/') was discarded.
  
Fix:
  
If a client-side macro appears inside a server-side comment, discard all characters in the comment after the macro (that is, until the end of the comment rather than the next delimiter).
This is a minimal fix to allow only simple cases used by the mysqlbinlog utility. Limitations that are worth documenting:
  
- Nested server-side and/or client-side comments are not supported by mysql.cc
- Using client-side macros in multi-line server-side comments is not supported
- All characters after a client-side macro in a server-side comment will be omitted from the query string (and thus, will not be sent to server).
2007-08-30 12:53:24 +04:00
malff/marcsql@weblab.(none)
6f72d99099 Bug#28779 (mysql_query() allows execution of statements with unbalanced
comments)

Before this fix, the server would accept queries that contained comments,
even when the comments were not properly closed with a '*' '/' marker.

For example,
  select 1 /* + 2 <EOF>
would be accepted as
  select 1 /* + 2 */ <EOF>
and executed as
  select 1

With this fix, the server now rejects queries with unclosed comments
as syntax errors.
Both regular comments ('/' '*') and special comments ('/' '*' '!') must be
closed with '*' '/' to be parsed correctly.
2007-08-29 14:50:32 -06:00
pekka@sama.ndb.mysql.com
af1ce5c230 ndb - bug#29102 : use locked read even for blob parts 2007-08-29 21:45:53 +03:00
msvensson@pilot.(none)
b1fdece307 Merge pilot.(none):/data/msvensson/mysql/mysql-4.1-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-08-29 17:54:16 +02:00
msvensson@pilot.(none)
ac5309cb04 Remove any old pidfile before starting mysqld to make sure that
'mysqld_wait_started' don't return prematurely because of an old
pidfile
2007-08-29 17:54:02 +02:00
msvensson@pilot.(none)
1a1bbf2da0 Remove unportable use of "system rm" 2007-08-29 14:44:23 +02:00
msvensson@pilot.(none)
2028c2b696 Merge pilot.(none):/data/msvensson/mysql/mysql-4.1-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-08-29 14:39:59 +02:00
msvensson@pilot.(none)
f164a136e1 Fix typo: '$$' => '$' 2007-08-29 14:39:40 +02:00
anozdrin/alik@ibm.
290d724943 Test case for Bug#13675: DATETIME/DATE type in store proc param
seems to be converted as varbinary.

The bug has been already fixed. This CS just adds a test case for it.
2007-08-29 14:57:59 +04:00
msvensson@pilot.(none)
aa57f6106c Remove unportable use of "system rm" 2007-08-29 12:47:00 +02:00
msvensson@pilot.(none)
9ffb05dbbf Remove unportable "system rm" 2007-08-29 12:44:43 +02:00
msvensson@pilot.(none)
044f7a3270 Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-08-29 11:54:21 +02:00
msvensson@pilot.(none)
523cddeec3 Merge pilot.(none):/data/msvensson/mysql/mysql-4.1-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-08-29 11:53:36 +02:00
msvensson@pilot.(none)
b68689172f Remove unportable use of "exec chmod" 2007-08-29 11:53:15 +02:00
msvensson@pilot.(none)
387990f78d Add 'mtr_rmtree' 2007-08-29 11:51:34 +02:00
gkodinov/kgeorge@magare.gmz
625c44fe67 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30377-5.0-opt
2007-08-29 12:47:24 +03:00
mhansson/martin@linux-st28.site
f672e5bca6 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bugx/my50-bugx
2007-08-29 10:49:19 +02:00
davi@moksha.local
74fcc76028 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  moksha.local:/Users/davi/mysql/push/mysql-5.0-runtime
2007-08-28 18:47:08 -03:00
tsmith@ramayana.hindu.god
044cd7b471 Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/b27694/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-08-28 13:24:31 -06:00
malff/marcsql@weblab.(none)
ec9b9a98aa Bug#30625 (Performance, reduce depth for expressions)
This is a performance bug, affecting in particular the bison generated code
for the parser.

Prior to this fix, the grammar used a long chain of reduces to parse an
expression, like:
  bit_expr -> bit_term
  bit_term -> bit_factor
  bit_factor -> value_expr
  value_expr -> term
  term -> factor
etc

This chain of reduces cause the internal state automaton in the generated
parser to execute more state transitions and more reduces, so that the
generated MySQLParse() function would spend a lot of time looping to execute
all the grammar reductions.

With this patch, the grammar has been reorganized so that rules are more
"flat", limiting the depth of reduces needed to parse <expr>.

Tests have been written to enforce that relative priorities and properties
of operators have not changed while changing the grammar.

See the bug report for performance data.
2007-08-28 11:16:03 -06:00
gkodinov/kgeorge@magare.gmz
cfaa0983c8 Bug #30377: EXPLAIN loses last_query_cost when used with UNION
Currently the Last_query_cost session status variable shows
only the cost of a single flat subselect. For complex queries
(with subselects or unions etc) Last_query_cost is not valid
as it was showing the cost for the last optimized subselect.
Fixed by reseting to zero Last_query_cost when the complete
cost of the query cannot be determined.
Last_query_cost will be non-zero only for single flat queries.
2007-08-28 18:51:03 +03:00
msvensson@pilot.(none)
4a7087526f Streamline "do_close_connection" and "do_send_quit"
Fix typo, "next_con" -> "con"
2007-08-28 16:47:05 +02:00
msvensson@pilot.(none)
397fbd0289 Remove unportable constructs in loaddata.test 2007-08-28 16:44:31 +02:00
msvensson@pilot.(none)
4a013e295d Move "analyze_testcase_failure" to mysqltest(since it knows best when
to perform this analyzis)
2007-08-28 15:32:13 +02:00
msvensson@pilot.(none)
bce8ea54ff Merge pilot.(none):/data/msvensson/mysql/bug28812/my50-bug28812
into  pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
2007-08-28 11:35:22 +02:00
msvensson@pilot.(none)
c2b817013c Merge pilot.(none):/data/msvensson/mysql/yassl_import/my50-yassl_import
into  pilot.(none):/data/msvensson/mysql/bug28812/my50-bug28812
2007-08-28 11:35:05 +02:00
msvensson@pilot.(none)
ec421a02a9 Bug#28812 rpl_ssl fails due to assert in extra/yassl/src/socket_wrapper.cpp:117
- Merge sslaccept and sslconnect.
 - Atomically "reset" vio to VIO_TYPE_SSL when the SSL connection has
   succeeded, this avoids having to revert anything and thus protects
   against "close_active_vio" in the middle.
 - Add some variance to the testcase
2007-08-28 11:34:43 +02:00
msvensson@pilot.(none)
394d9a0e55 Import yaSSL version 1.7.2
- Fix bug#27265
- Support for fixing bug#18441
2007-08-28 10:35:55 +02:00
tsmith@ramayana.hindu.god
86ef148e6c Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-08-27 18:19:55 -06:00
mhansson/martin@linux-st28.site
a4d5d9204d Bug #30596 GROUP BY optimization gives wrong result order
The optimization that uses a unique index to remove GROUP BY, did not 
ensure that the index was actually used, thus violating the ORDER BY
that is impled by GROUP BY.
Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains
a unique index. In case GROUP BY ... ORDER BY null is used, GROUP BY is
simply removed.
2007-08-27 17:33:41 +02:00
davi@moksha.local
77d78a883f Bug#30632 HANDLER read failure causes hang
If, after the tables are locked, one of the conditions to read from a
HANDLER table is not met, the handler code wrongly jumps to a error path
that won't unlock the tables.

The user-visible effect is that after a error in a handler read command,
all subsequent handler operations on the same table will hang.

The fix is simply to correct the code to jump to the (same) error path that
unlocks the tables.
2007-08-27 10:37:12 -03:00
davi@moksha.local
91e1cc2195 Bug#25164 create table a as select * from A hangs
The problem from a user's perspective: user creates table A, and then tries
to CREATE TABLE a SELECT from A - and this causes a deadlock error, a hang,
or fails with a debug assert, but only if the storage engine is InnoDB.

The origin of the problem: InnoDB uses case-insensitive collation
(system_charset_info) when looking up the internal table share, thus returning
the same share for 'a' and 'A'.

Cause of the user-visible behavior: since the same share is returned to SQL
locking subsystem, it assumes that the same table is first locked (within the
same session) for WRITE, and then for READ, and returns a deadlock error.
However, the code is wrong in not properly cleaning up upon an error, leaving
external locks in place, which leads to assertion failures and hangs.

Fix that has been implemented: the SQL layer should properly propagate the
deadlock error, cleaning up and freeing all resources.

Further work towards a more complete solution: InnoDB should not use case
insensitive collation for table share hash if table names on disk honor the case.
2007-08-27 10:13:54 -03:00
df@pippilotta.erinye.com
0670af9479 adjust version number 2007-08-27 11:38:32 +02:00
msvensson@pilot.(none)
f9c245611e Bug#29805 mysql_upgrade test fail if ~/.my.cnf contain a password
- "mysql" and "mysqlcheck" should not read defaults file
2007-08-27 11:31:49 +02:00
dfischer/mysqldev@mysql.com/production.mysql.com
ba419bdc8c Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/data0/mysqldev/my/build-200708231546-5.0.48/mysql-5.0-release
2007-08-27 11:24:54 +02:00
msvensson@pilot.(none)
a91bd85215 Bug#28560 mysql_upgrade test links /usr/local/mysql/lib libraries
- Chop off .libs/ part of path if running in non installed builddir
   using libtool
2007-08-27 10:25:34 +02:00
gshchepa/uchum@gleb.loc
a8c7e45067 Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-08-26 19:47:23 +05:00
gshchepa/uchum@gleb.loc
01190c869c Merge gleb.loc:/home/uchum/work/bk/5.0
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-08-25 23:25:37 +05:00
evgen@moonbone.local
36a2950016 sql_select.cc:
Additional fix for the bug#30245.
2007-08-25 17:32:17 +00:00
jani@a88-113-38-195.elisa-laajakaista.fi
516cafdc79 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-08-25 11:39:56 +03:00
evgen@moonbone.local
2ee3efc240 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/30245-bug-5.0-opt-mysql
2007-08-24 22:11:23 +00:00
joerg@trift2.
d7c1a81136 Merge trift2.:/MySQL/M50/netware2-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-08-24 23:40:36 +02:00