Commit graph

23830 commits

Author SHA1 Message Date
Narayanan V
0141da0444 Importing test cases for IBMDB2I
The current patch

-- Adds the ibmdb2i suite
-- related include(.inc) files
-- tests for Bug#44020 and Bug#44025
2009-04-14 16:32:55 +05:30
Sergey Glukhov
19854c6d8c Bug#43385 Cannot ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME when Views exist(addon)
mysql_rename_view can not rename view if database is not the same.
The fix is to add new argument 'new_db' to mysql_rename_view() and
allow rename with different databases
(only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME).


mysql-test/t/upgrade.test:
  test fix
sql/parse_file.cc:
  mysql_rename_view can not rename view if database is not the same.
  The fix is to add new argument 'new_db' to mysql_rename_view() and
  allow rename with different databases
  (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME).
sql/parse_file.h:
  mysql_rename_view can not rename view if database is not the same.
  The fix is to add new argument 'new_db' to mysql_rename_view() and
  allow rename with different databases
  (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME).
sql/sql_rename.cc:
  mysql_rename_view can not rename view if database is not the same.
  The fix is to add new argument 'new_db' to mysql_rename_view() and
  allow rename with different databases
  (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME).
sql/sql_view.cc:
  mysql_rename_view can not rename view if database is not the same.
  The fix is to add new argument 'new_db' to mysql_rename_view() and
  allow rename with different databases
  (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME).
sql/sql_view.h:
  mysql_rename_view can not rename view if database is not the same.
  The fix is to add new argument 'new_db' to mysql_rename_view() and
  allow rename with different databases
  (only for ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME).
2009-04-13 18:09:10 +05:00
Chad MILLER
ebd4f43e44 Merge fix for bug 39559 and bugteam trunk. 2009-04-10 10:18:57 -04:00
Sergey Glukhov
bb08984f07 Bug#43385 Cannot ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME when Views exist
allow 'rename view' for ALTER ...UPGRADE DATA DIRECTORY NAME command.
it's safe because a view has valid internal db&table names in this case.


mysql-test/r/upgrade.result:
  test result
mysql-test/t/upgrade.test:
  test case
sql/sql_rename.cc:
  allow 'rename view' for ALTER ...UPGRADE DATA DIRECTORY NAME command.
  it's safe because a view has valid internal db&table names in this case.
2009-04-10 14:25:48 +05:00
Chad MILLER
8c828507e4 Bug#39559: dump of stored procedures / functions with C-style \
comment can't be read back

A change to the lexer in 5.1 caused slash-asterisk-bang-version
sections to be terminated early if there exists a slash-asterisk-
style comment inside it.  Nesting comments is usually illegal,
but we rely on versioned comment blocks in mysqldump, and the
contents of those sections must be allowed to have comments.

The problem was that when encountering open-comment tokens and
consuming -or- passing through the contents, the "in_comment"
state at the end was clobbered with the not-in-a-comment value,
regardless of whether we were in a comment before this or not.  

So, """/*!VER one /* two */ three */""" would lose its in-comment
state between "two" and "three".  Save the echo and in-comment
state, and restore it at the end of the comment if we consume a 
comment.
2009-04-09 22:18:18 -04:00
Sergey Glukhov
d2e6c462c8 5.0-bugteam->5.1-bugteam merge 2009-04-09 14:38:50 +05:00
Sergey Glukhov
920abd58b2 Bug#43833 Simple INSERT crashes the server
The crash happens due to wrong 'digits' variable value(0),
'digits' can not be 0, so the fix is use 1 as min allowed value.


mysql-test/r/insert.result:
  test result
mysql-test/t/insert.test:
  test case
sql/field.cc:
  The crash happens due to wrong 'digits' variable value(0),
  'digits' can not be 0, so the fix is use 1 as min allowed value.
2009-04-09 14:19:31 +05:00
He Zhenxing
a15e25f852 Auto merge 2009-04-09 14:31:09 +08:00
He Zhenxing
85cff45ef7 Manually merge BUG#37145 to 5.1-bugteam 2009-04-09 07:42:51 +08:00
Alfranio Correia
fb5bc0a39d BUG#39393. Post-fix for test rpl_skip_error.
The result set for multi-row statements is not the same between STMT and
RBR and among different versions. Thus to avoid test failures, we are not
printing out such result sets. Note, however, that this does not have
impact on coverage and accuracy since the execution is able to continue
without further issues when an error is found on the master and such error
is set to be skipped.
2009-04-08 22:02:19 +01:00
Alfranio Correia
43e85ecedf merge 5.1-bugteam --> 5.1-bugteam (local) 2009-04-08 11:07:24 +01:00
He Zhenxing
16641a8820 Auto merge 2009-04-08 16:17:26 +08:00
Satya B
440858b816 merge to latest 5.1-bugteam 2009-04-07 18:44:37 +05:30
Satya B
543abcd48e merge 5.0-bugteam to 5.1-bugteam 2009-04-07 17:06:15 +05:30
Satya B
10350e2097 Fix for Bug #43973 - backup_myisam.test fails on 6.0-bugteam
The test started failing following the push for BUG#41541.
Some of the algorithms access bytes beyond the input data
and this can affect up to one byte less than "word size"
which is BITS_SAVED / 8. 
      
Fixed by adding (BITS_SAVED / 8) -1 bytes to buffer size
(i.e. Memory Segment #2) to avoid accessing un-allocated data.

myisam/mi_packrec.c:
  Fixed _mi_read_pack_info() method to allocate (BITS_SAVED/8) - 1 
  bytes to the Memory Segment #2
mysql-test/r/myisampack.result:
  Result file for BUG#43973
mysql-test/t/myisampack.test:
  Testcase for BUG#43973
2009-04-07 16:54:32 +05:30
Satya B
58fa483a20 merge 5.0-bugteam to 5.1-bugteam 2009-04-06 12:31:17 +05:30
Alfranio Correia
e0d74efd85 merge 5.1-bugteam --> 5.1-bugteam (local) 2009-04-06 01:22:34 +01:00
Alfranio Correia
f9338b318e BUG#39393 slave-skip-errors does not work when using ROW based replication
RBR was not considering the option --slave-skip-errors.
                              
To fix the problem, we are reporting the ignored ERROR(s) as warnings thus avoiding 
stopping the SQL Thread. Besides, it fixes the output of "SHOW VARIABLES LIKE 
'slave_skip_errors'" which was showing nothing when the value "all" was assigned 
to --slave-skip-errors.
                  
@sql/log_event.cc
  skipped rbr errors when the option skip-slave-errors is set.
@sql/slave.cc
  fixed the output of for SHOW VARIABLES LIKE 'slave_skip_errors'"
@test-cases
  fixed the output of rpl.rpl_idempotency
  updated the test case rpl_skip_error
2009-04-05 13:03:04 +01:00
Serge Kozlov
a81e21f8a4 Bug#37716.
1. Test case was rewritten completely.
2. Test covers 3 cases:
 a) do deadlock on slave, wait retries of transaction, unlock slave before lock
timeout;
 b) do deadlock on slave and wait error 'lock timeout exceed' on slave;
 c) same as b) but if of max relay log size = 0;
3. Added comments inline.
4. Updated result file.
2009-04-04 01:33:13 +04:00
Davi Arnaut
54bf80b633 Merge Bug#43230 into mysql-5.1-bugteam 2009-04-03 16:46:00 -03:00
Davi Arnaut
72e978828e Bug#43230: SELECT ... FOR UPDATE can hang with FLUSH TABLES WITH READ LOCK indefinitely
The problem is that a SELECT .. FOR UPDATE statement might open
a table and later wait for a impeding global read lock without
noticing whether it is holding a table that is being waited upon
the the flush phase of the process that took the global read
lock.

The same problem also affected the following statements:

LOCK TABLES .. WRITE
UPDATE .. SET (update and multi-table update)
TRUNCATE TABLE ..
LOAD DATA ..

The solution is to make the above statements wait for a impending
global read lock before opening the tables. If there is no
impending global read lock, the statement raises a temporary
protection against global read locks and progresses smoothly
towards completion.

Important notice: the patch does not try to address all possible
cases, only those which are common and can be fixed unintrusively
enough for 5.0.

mysql-test/r/lock_multi.result:
  Add test case result for Bug#43230
mysql-test/t/lock_multi.test:
  Add test case for Bug#43230
sql/sql_lex.cc:
  Initialize flag.
sql/sql_lex.h:
  Add a flag to the lexer.
sql/sql_parse.cc:
  Wait for the global read lock is a write lock is going to be
  taken. The wait is done before opening tables.
sql/sql_yacc.yy:
  Protect against the GRL if its a SELECT .. FOR UPDATE or LOCK TABLES
  .. WRITE statement.
2009-04-03 16:11:54 -03:00
Guangbao Ni
102de8f5c3 AutoMerged from pushbuild mysql-5.1-bugteam 2009-04-03 18:42:00 +00:00
Guangbao Ni
173d29536d BUG#42640 mysqld crashes when unsafe statements are executed (STRICT_TRANS_TABLESmode)
Mysql server crashes because unsafe statements warning is wrongly elevated to error,
which is set the error status of Diagnostics_area of the thread in THD::binlog_query().
Yet the caller believes that binary logging shouldn't touch the status, so it will
set the status also later by my_ok(), my_error() or my_message() seperately
according to the execution result of the statement or transaction.
But the status of Diagnostics_area of the thread is allowed to set only once.

Fixed to clear the error wrongly set by binary logging, but keep the warning message.

mysql-test/suite/binlog/r/binlog_stm_ps.result:
  Change unsafe warning to NOTE level
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Test case result for unsafe statements to ensure mysql sever don't crash
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Test case for unsafe statements to ensure mysql sever don't crash
mysql-test/suite/rpl/r/rpl_skip_error.result:
  Change unsafe warning to NOTE level
mysql-test/suite/rpl/r/rpl_stm_loadfile.result:
  Change unsafe warning to NOTE level
mysql-test/suite/rpl/r/rpl_udf.result:
  Change unsafe warning to NOTE level
sql/sql_class.cc:
  the error status of the thread is cleared When a warning is elevated to an error
  because of unsafe warning of binary log.
2009-04-03 18:21:57 +00:00
Horst Hunger
92ea1722c0 Fix belonging to bug#42838: Though this bug is only for 6.0 I put in some updated result files for 6.0 and this are the corrsponding resul files for 5.1, so that sys_vars should then run successfully also in 5.1. 2009-04-03 11:37:48 +02:00
Patrick Crews
05c9b0c396 Bug#43716: Test mysqlbinlog_row_big is failing, needs to be updated
Altered the test to accommodate the new behavior of max_allowed_packet.
Had to disconnect / reconnect the default connection for the new value to register.
Re-enabled certain parts of the test that were commented out and added
some setup / cleanup code to ensure proper reset of max_allowed_packet at the end of the test.

Re-recorded the .result file to account for changes to the test.
2009-04-02 18:34:18 -04:00
Alexander Nozdrin
b317801959 Patch for Bug#38741: main.innodb_mysql crashes randomly (2).
It was a test case problem: one 'reap' statement was forgotten.
2009-04-02 12:21:51 +04:00
Bernt M. Johnsen
ac8081290e Bug 43355 merged from 5.1 gca 2009-04-01 14:45:04 +02:00
Bernt M. Johnsen
e40fe386ae Bug 43355 merged from 5.1 gca 2009-04-01 14:39:36 +02:00
Gleb Shchepa
02884a4d98 Backport bug #37348 fix 5.1 --> 5.0.
Original commentary:

Bug #37348: Crash in or immediately after JOIN::make_sum_func_list
            
The optimizer pulls up aggregate functions which should be aggregated in
an outer select. At some point it may substitute such a function for a field
in the temporary table. The setup_copy_fields function doesn't take this
into account and may overrun the copy_field buffer.
            
Fixed by filtering out the fields referenced through the specialized
reference for aggregates (Item_aggregate_ref).
Added an assertion to make sure bugs that cause similar discrepancy 
don't go undetected.


mysql-test/r/func_group.result:
  Backport bug #37348 fix 5.1 --> 5.0.
mysql-test/t/func_group.test:
  Backport bug #37348 fix 5.1 --> 5.0.
sql/item.cc:
  Backport bug #37348 fix 5.1 --> 5.0.
sql/item.h:
  Backport bug #37348 fix 5.1 --> 5.0.
sql/sql_select.cc:
  Backport bug #37348 fix 5.1 --> 5.0.
2009-04-01 16:02:26 +05:00
Georgi Kodinov
3bb9a70f4f auto merge 2009-04-01 13:03:53 +03:00
Georgi Kodinov
3346c5c9d3 merged 5.1-main -> 5.1-bugteam 2009-04-01 12:57:34 +03:00
Georgi Kodinov
01e647352d merged 5.0-main -> 5.0-bugteam 2009-04-01 12:50:27 +03:00
Bernt M. Johnsen
b63460a938 Bug 43355 Prepared for commit on 5.1 gca 2009-04-01 10:58:55 +02:00
Sergey Glukhov
b46dc9ca4d Bug#43183 ExctractValue() brings result list in missorder
The problem is that XML functions(items) do not reset null_value
before their execution and further item excution may use
null_value value of the previous result.
The fix is to reset null_value.


mysql-test/r/xml.result:
  test result
mysql-test/t/xml.test:
  test case
sql/item_xmlfunc.cc:
  The problem is that XML functions(items) do not reset null_value
  before their execution and further item excution may use
  null_value value of the previous result.
  The fix is to reset null_value.
2009-04-01 13:40:33 +05:00
Ramil Kalimullin
968069d845 Fix for bug#42944: partition not pruned correctly
Problem: we don't prune a LESS THAN partition if MAXVALUE is given and
given value is equal to a LESS THAN value.

Fix: prune partitions in such cases.


mysql-test/r/partition.result:
  Fix for bug#42944: partition not pruned correctly
    - test result.
mysql-test/t/partition.test:
  Fix for bug#42944: partition not pruned correctly
    - test case.
sql/sql_partition.cc:
  Fix for bug#42944: partition not pruned correctly
    - prune partition if given value is equal to a LESS THAN value
      and it's not a "PARTITION ... LESS THAN MAXVALUE" one.
2009-04-01 10:34:59 +05:00
Bernt M. Johnsen
c517fc2b00 Bug 43355 Prepared for commit on 5.0 gca 2009-03-31 10:38:33 +02:00
Matthias Leich
993239ec2e merge of fix for bug 43383 into actual tree 2009-03-30 16:12:27 +02:00
Matthias Leich
a662bf763d Merge of fix for bug 43383 into actual tree 2009-03-30 15:36:10 +02:00
Matthias Leich
dcbf9a5537 Merge 5.0 -> 5.1 of fix for bug 43383
+ disable the funcs_1.charset_collation_* tests which are broken because
  of bug 38346, 40209, 40545, 40618
2009-03-30 12:03:25 +02:00
Kristofer Pettersson
ba10c9ccc5 Automerge 2009-03-30 10:44:17 +02:00
Kristofer Pettersson
a20bc967ce Bug#40127 Multiple table DELETE IGNORE hangs on foreign key constraint violation
on 5.0            
The server crashes on an assert in net_end_statement indicating that the
Diagnostics area wasn't set properly during execution.
This happened on a multi table DELETE operation using the IGNORE keyword.
The keyword is suppose to allow for execution to continue on a best effort
despite some non-fatal errors. Instead execution stopped and no client
response was sent which would have led to a protocol error if it hadn't been
for the assert.
This patch corrects this issue by checking for the existence of an IGNORE
option before setting an error state during row-by-row delete iteration.


mysql-test/r/innodb_mysql.result:
  * Added test case for bug40127
mysql-test/t/innodb_mysql.test:
  * Added test case for bug40127
sql/sql_delete.cc:
  * IGNORE option wasn't implemented in multi_delete::send_data
    and multi_delete::do_deletes
2009-03-27 17:08:14 +01:00
Staale Smedseng
2c65a31a7c Merge from 5.0-bugteam 2009-03-27 14:11:52 +01:00
Staale Smedseng
9869875646 Merge from 5.1-bugteam 2009-03-27 14:10:28 +01:00
Alexey Kopytov
b718d18aea Automerge. 2009-03-27 15:59:09 +03:00
Alexey Kopytov
dcac05be55 Automerge. 2009-03-27 15:58:34 +03:00
Staale Smedseng
722fb72a4d Merge from 5.0-bugteam 2009-03-27 13:55:14 +01:00
Georgi Kodinov
2b54a92c89 auto-merge 2009-03-27 14:15:50 +02:00
Georgi Kodinov
2c312d9737 disabled a failing test suite due to bug #42311 2009-03-27 14:12:33 +02:00
Tatiana A. Nurnberg
81f4ffc2cc auto-merge 2009-03-27 12:40:53 +01:00
Tatiana A. Nurnberg
ffd9792ca5 Bug#43748: crash when non-super user tries to kill the replication threads
Test was flakey on some machines and showed spurious
reds for races.

New-and-improved test makes do with fewer statements,
no mysqltest-variables, and no backticks. Should hope-
fully be more robust. Heck, it's debatable whether we
should have a test for this, anyway.

mysql-test/suite/rpl/r/rpl_temporary.result:
  streamlined
mysql-test/suite/rpl/t/rpl_temporary.test:
  streamlined
2009-03-27 12:20:37 +01:00