Commit graph

52697 commits

Author SHA1 Message Date
davi@buzz.(none)
141e12b155 Fix lock_multi test case failure related to
concurrent inserts.
2008-02-22 10:35:08 -02:00
davi@buzz.(none)
236727788d Post-merge fixes for bug 32890 2008-02-21 23:58:45 -02:00
davi@buzz.(none)
d2bb9dd64f Merge buzz.(none):/home/davi/mysql-5.0-runtime
into  buzz.(none):/home/davi/mysql-5.1-runtime
2008-02-21 23:21:52 -02:00
davi@buzz.(none)
28cfe06a1e Post-merge fix to silence compiler warning. 2008-02-21 19:28:25 -02:00
davi@mysql.com/endora.local
0e91461842 Bug#32890 Crash after repeated create and drop of tables and views
The problem is that CREATE VIEW statements inside prepared statements
weren't being expanded during the prepare phase, which leads to objects
not being allocated in the appropriate memory arenas.

The solution is to perform the validation of CREATE VIEW statements
during the prepare phase of a prepared statement. The validation
during the prepare phase assures that transformations of the parsed
tree will use the permanent arena of the prepared statement.
2008-02-21 14:58:29 -03:00
anozdrin/alik@quad.
5f5773bfc8 Fix for Bug#33065: Mysql not writing general query logs after
sending SIGHUP.

There were two problems:
  - after some recent fix, the server started to crash after
    receiving SIGHUP. That happened because LEX of new THD-object
    was not properly initialized.
  - user-specified log options were ignored when logs were reopened.

The fix is to 1) initialize LEX and 2) take user-specified options
into account.

There is no test case in this CS, because our test suite does not
support sending SIGHUP to the server.
2008-02-21 14:49:27 +03:00
anozdrin/alik@quad.
10dca4fd8d Fix merge (fix result file) 2008-02-21 12:48:55 +03:00
anozdrin/alik@quad.
f039cf7ac7 Merge quad.:/mnt/raid/alik/MySQL/devel/bug-34337/5.0-rt-bug34337
into  quad.:/mnt/raid/alik/MySQL/devel/bug-34337/5.1-rt-bug34337
2008-02-21 12:24:40 +03:00
anozdrin/alik@quad.
f5cb5fdc4f Fix for Bug#34337: Server crash when Altering a view using
a table name.
  
The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).
  
The fix is to ensure that an error is thrown even if the table
is in the cache.

(This is a backport of the original patch for 5.1)
2008-02-21 12:17:32 +03:00
davi@buzz.(none)
919ccd9111 Post-merge fixes for bugs 34587 and 32265. 2008-02-20 23:30:29 -02:00
davi@buzz.(none)
bf9142825d Merge buzz.(none):/home/davi/mysql-5.0-runtime
into  buzz.(none):/home/davi/mysql-5.1-runtime
2008-02-20 23:18:40 -02:00
davi@mysql.com/endora.local
4b821c0cbd Post-merge fix to silence a compilation warning introduced
by patch for bug 32265 .
2008-02-20 22:11:06 -03:00
davi@endora.local
2aed47c98b Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
2008-02-20 17:30:12 -03:00
davi@endora.local
529ed22389 Merge mysql.com:/Users/davi/mysql/bugs/34587-5.1
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
2008-02-20 17:29:29 -03:00
davi@mysql.com/endora.local
b9c6b9eced Bug#34587 Creating a view inside a stored procedure leads to a server crash
The problem is that when a stored procedure is being parsed for
the first execution, the body is copied to a temporary buffer
which is disregarded sometime after the statement is parsed.
And during this parsing phase, the rule for CREATE VIEW was
holding a reference to the string being parsed for use during
the execution of the CREATE VIEW statement, leading to invalid
memory access later.

The solution is to allocate and copy the SELECT of a CREATE
VIEW statement using the thread memory root, which is set to
the permanent arena of the stored procedure.
2008-02-20 17:26:50 -03:00
davi@mysql.com/endora.local
0473205592 Bug#32265 Server returns different metadata if prepared statement is used
Executing a prepared statement associated with a materialized
cursor yields to the client a metadata packet with wrong table
and database names. The problem was occurring because the server
was sending the the name of the temporary table used by the cursor
instead of the table name of the original table. The same problem
occurs when selecting from views, in which case the table name was
being sent and not the name of the view.
  
The solution is to fill the list item from the temporary table but
preserving the table and database names of the original fields. This
is achieved by tweaking the Select_materialize to accept a pointer to
the Materialized_cursor class which contains the item list to be filled.
2008-02-20 16:45:24 -03:00
anozdrin/alik@quad.
576794214f Fix for Bug#34337: Server crash when Altering a view using
a table name.

The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).

The fix is to ensure that an error is thrown even if the table
is in the cache.
2008-02-20 22:23:39 +03:00
kostja@dipika.(none)
812ee08488 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  dipika.(none):/opt/local/work/mysql-5.1-runtime
2008-02-20 00:32:03 +03:00
kostja@dipika.(none)
f8ec5e0984 Fix a compilation failure of the community tree. 2008-02-19 23:47:15 +03:00
davi@endora.local
d5847eb112 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
2008-02-19 10:39:14 -03:00
davi@endora.local
84a0d7c507 Merge mysql.com:/Users/davi/mysql/bugs/23771-5.1
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime
2008-02-19 10:36:31 -03:00
kostja@dipika.(none)
72495c968b Rename send_eof() to my_eof() for consistency with my_ok() and my_error() 2008-02-19 15:58:08 +03:00
kostja@dipika.(none)
f106d9738a Rename send_ok to my_ok. Similarly to my_error, it only records the status,
does not send it to the client.
2008-02-19 15:45:21 +03:00
kostja@dipika.(none)
d8e6308c42 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  dipika.(none):/opt/local/work/mysql-5.1-2pc-opt-merge-push
2008-02-19 14:53:22 +03:00
kostja@dipika.(none)
acf9b1f346 A fix and a test case for Bug#12713 "Error in a stored function called from
a SELECT doesn't cause ROLLBACK of statem".

The idea of the fix is to ensure that we always commit the current
statement at the end of dispatch_command(). In order to not issue
redundant disc syncs, an optimization of the two-phase commit
protocol is implemented to bypass the two phase commit if
the transaction is read-only.
2008-02-19 14:43:01 +03:00
anozdrin/alik@quad.
f4659b38af Merge quad.:/mnt/raid/alik/MySQL/devel/5.1
into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2008-02-18 18:12:37 +03:00
anozdrin/alik@quad.
48058cf10b Merge quad.:/mnt/raid/alik/MySQL/devel/5.0-rt
into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged
2008-02-18 18:12:05 +03:00
anozdrin/alik@quad.
b25de63309 Add a test case for Bug#21704: Renaming column does not update
FK definition.
2008-02-15 14:14:09 +03:00
mkindahl@dl145h.mysql.com
a1a94e238f Adding waits to events_scheduling to prevent the test from
failing on heavily loaded systems.
2008-02-15 10:24:13 +01:00
anozdrin/alik@quad.
6bf1306b13 A patch for Bug#18834: ALTER TABLE ADD INDEX on table with
two timestamp fields.
  
The actual problem here was that CREATE TABLE allowed zero
date as a default value for a TIMESTAMP column in NO_ZERO_DATE mode.
  
The thing is that for TIMESTAMP date type specific rule is applied:
  column_name TIMESTAMP == column_name TIMESTAMP DEFAULT 0
whever for any other date data type
  column_name TYPE == column_name TYPE DEFAULT NULL
  
The fix is to raise an error when we're in NO_ZERO_DATE mode and
there is TIMESTAMP column w/o default value.
2008-02-14 18:13:40 +03:00
mkindahl@dl145h.mysql.com
fd5d7fa761 Fixing test rpl_events to not give false failures. 2008-02-14 10:53:12 +01:00
mkindahl@dl145h.mysql.com
8906700e13 Fixes to try to handle valgrind warnings identical to those in
BUG#24387, which is closed since long.
2008-02-14 09:53:01 +01:00
mkindahl@dl145h.mysql.com
32853b9fa5 Removing non-deterministic tests from events_scheduling test. 2008-02-13 12:41:54 +01:00
mkindahl@dl145h.mysql.com
b1fadc4cf9 The test rpl_row_charset and it dependent rpl_ndb_charset is
irrelevant to execute since the charset information does not
affect replication for row-based replication. The row-based
versions of the tests were removed, and the statement-based
version of the test was made executable by all three modes.

This involves removing any lines that causes the test to be
dependent on the contents of the binary log, and instead we
just check that the replication works as it should.
2008-02-13 11:37:06 +01:00
anozdrin/alik@quad.
7e88f7718c Additional patch for Bug#31222: com_% global status counters
behave randomly with mysql_change_user.

The test case had to be moved into not_embedded_server.test file,
because SHOW GLOBAL STATUS does not work properly in embedded
server (see bug 34517).
2008-02-13 13:00:24 +03:00
anozdrin/alik@quad.
265dbd3056 Additional patch for Bug#32538. Fix result files of windows test cases. 2008-02-13 12:02:16 +03:00
anozdrin/alik@quad.
d36d243d3d Fix for Bug#32538: View definition picks up character set,
but not collation.

The problem here was that text literals in a view were always
dumped with character set introducer. That lead to loosing
collation information.

The fix is to dump character set introducer only if it was
in the original query. That is now possible because there 
is no problem any more of loss of character set of string
literals in views -- after WL#4052 the view is dumped 
in the original character set.
2008-02-12 22:09:16 +03:00
anozdrin/alik@quad.
931f793c5c Additional fix for Bug#31222. 2008-02-12 21:42:15 +03:00
anozdrin/alik@quad.
d665fc3bd7 Fix for Bug#31222: com_% global status counters
behave randomly with mysql_change_user.
  
The problem was that global status variables were not updated
in THD::check_user(), so thread statistics were lost after
COM_CHANGE_USER.
  
The fix is to update global status variables with the thread ones
before preparing the thread for new user.
2008-02-12 20:59:09 +03:00
mkindahl@dl145h.mysql.com
a3fe485dfe Various fixes to fix memory leaks after merging replication
tree with main.
2008-02-12 18:21:17 +01:00
davi@mysql.com/endora.local
48ac77a95a Bug#23771 AFTER UPDATE trigger not invoked when there are no changes of the data
The problem is that AFTER UPDATE triggers will fire only if the
new data is different from the old data on the row. The trigger
should fire regardless of whether there are changes to the data.

The solution is to fire the trigger on UPDATE even if there are
no changes to the value (because the value is the same).
2008-02-12 09:44:27 -02:00
mkindahl@dl145h.mysql.com
e91c287ead Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
2008-02-11 18:16:56 +01:00
mkindahl@dl145h.mysql.com
83dac31180 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
2008-02-11 18:10:56 +01:00
mkindahl@dl145h.mysql.com
23d670c33e Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
2008-02-11 18:09:17 +01:00
mkindahl@dl145h.mysql.com
3afb341aaf Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1
2008-02-11 17:57:02 +01:00
anozdrin/alik@quad.
301ab0d8b7 Disable sporadically failing test cases (Bug#34454). 2008-02-11 14:34:53 +03:00
anozdrin/alik@quad.
524cbe2e4c Disabling declaration of debug variable for non-debug builds.
(originally from Mats)
2008-02-11 14:05:27 +03:00
anozdrin/alik@quad.
a52a30e3e6 Patch to eliminate some valgrind warnings in debug printout code.
(originally from Mats)
2008-02-11 14:04:30 +03:00
mkindahl@dl145h.mysql.com
ccd09676db Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
2008-02-11 10:06:21 +01:00
mkindahl@dl145h.mysql.com
525a324a77 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
2008-02-11 09:42:28 +01:00