Commit graph

54594 commits

Author SHA1 Message Date
Chad MILLER
d5f5db8452 Merge from 5.0-bugteam local. 2008-08-18 11:08:57 -04:00
Chad MILLER
9f277e5554 Merge from 5.0-bugteam local. 2008-08-18 11:00:19 -04:00
Chad MILLER
86fd86ed98 Merge from 5.0-bugteam. 2008-08-15 16:42:29 -04:00
Chad MILLER
21598ea0e6 Bug#37301 Length and Max_length differ with no obvious reason(2nd version)
Length value is the length of the field,
Max_length is the length of the field value.
So Max_length can not be more than Length.
The fix: fixed calculation of the Item_empty_string item length

(Patch applied and queued on demand of Trudy/Davi.)

sql/item.h:
  fixed calculation of the item length
sql/sql_show.cc:
  removed unnecessary code
2008-08-15 16:13:27 -04:00
Chad MILLER
535a183964 Merge from 5.0-bugteam. 2008-08-15 15:49:43 -04:00
Chad MILLER
65c3870cfc Bug#36270: incorrect calculation result - works in 4.1 but not in 5.0 or 5.1
When the fractional part in a multiplication of DECIMALs
overflowed, we truncated the first operand rather than the
longest. Now truncating least significant places instead
for more precise multiplications.

(Queuing at demand of Trudy/Davi.)

mysql-test/r/type_newdecimal.result:
  show that if we need to truncate the scale of an operand, we pick the
  right one (that is, we discard the least significant decimal places)
mysql-test/t/type_newdecimal.test:
  show that if we need to truncate the scale of an operand, we pick the
  right one (that is, we discard the least significant decimal places)
strings/decimal.c:
  when needing to disregard fractional parts, pick the least
  significant ones
2008-08-15 15:46:21 -04:00
Chad MILLER
0156ccdc50 Merge from 5.0-bugteam. 2008-08-15 15:30:17 -04:00
Chad MILLER
2dcc449fab Bug#21579 - innodb_concurrent random failures with varying differences
Due to unknown changes the test failed in some ways.

Fixed by checking the test case in detail, commenting the expected behavior,
and fixing error directives.

In the course of the analyze unneeded get_lock()/release_lock() use,
unneeded send/reap use, and unneeded sleeps were removed. The lock wait
timeout was reduced to 1 second, so that this is no big-test any more.

The test was split into two parts, one running the tests with
--innodb_locks_unsafe_for_binlog, the other part without.
The main part (include/concurrent.inc) conditionally expects
lock wait timeouts based on the value of the system variable
innodb_locks_unsafe_for_binlog.

The major part of the patch comes from Kristofer Pettersson.

(Chad queues this patch on demand by Trudy/Davi.)
2008-08-15 14:48:14 -04:00
Chad MILLER
35c8b4c5e7 Bug#38272: timestamps fields incorrectly defaulted on \
update accross partitions.
      
It's not Innodb-specific bug.
ha_partition::update_row() didn't set
table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET when
orig_timestamp_type == TIMESTAMP_AUTO_SET_ON_INSERT.

So that a partition sets the timestamp field when a record
is moved to a different partition.

Fixed by doing '= TIMESTAMP_NO_AUTO_SET' unconditionally.
Also ha_partition::write_row() is fixed in same way as now
Field_timestamp::set() is called twice in SET_ON_INSERT case.

(Chad queues this patch on demand by Trudy/Davi.)

mysql-test/r/partition.result:
  Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
  test result
mysql-test/t/partition.test:
  Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
  test case
sql/ha_partition.cc:
  Bug#38272 timestamps fields incorrectly defaulted on update accross partitions.
  Do table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET unconditionally
  in ha_partition::update_row and ::write_row()
2008-08-15 14:26:25 -04:00
Chad MILLER
0546add33e Correcting tree name in bzr config. Should not include team suffix. 2008-08-15 13:55:05 -04:00
Davi Arnaut
986a27fb03 Merge from mysql-5.1 main. 2008-08-15 12:58:19 -03:00
Davi Arnaut
02cd785691 Bug#38560: valgrind warnings on PB due to query profiling
Fix for a valgrind warning due to a jump on a uninitialized
variable. The problem was that the sql profile preparation
function wasn't being called for all possible code paths
of query execution.

The solution is to ensure that query profiling is always
started before dispatch_command function is called and to
explicitly call the profile preparation function on bootstrap.



sql/sql_parse.cc:
  Finish query profiling properly when executing bootstrap commands.
  Add query profiling to execute_init_command as it calls dispatch_command.
2008-08-15 12:38:46 -03:00
Sergey Glukhov
02aaff1b34 Bug#36638 mysqld crashes when open file limit is passed and general query log enabled
The problem:
CSV storage engine open function returns success even
thought it failed to open the data file
The fix:
return error
Additional fixes:
added MY_WME to my_open to avoid mysterious error message
free share struct if open the file was unsuccessful


mysql-test/r/csv.result:
  test result
mysql-test/t/csv.test:
  test case
storage/csv/ha_tina.cc:
  The problem:
  CSV storage engine open function returns success even
  thought it failed to open the data file
  The fix:
  return error
  Additional fixes:
  added MY_WME to my_open to avoid mysterious error message
  free share struct if open the file was unsuccessful
2008-08-15 11:53:54 +05:00
Ramil Kalimullin
2b179caf9a Fix for bug #34779: crash in checksum table on federated tables
with blobs containing nulls

Problem: FEDERATED SE improperly stores NULL fields in the record buffer.

Fix: store them properly.


mysql-test/r/federated.result:
  Fix for bug #34779: crash in checksum table on federated tables 
  with blobs containing nulls
    - test result.
mysql-test/t/federated.test:
  Fix for bug #34779: crash in checksum table on federated tables 
  with blobs containing nulls
    - test case.
sql/ha_federated.cc:
  Fix for bug #34779: crash in checksum table on federated tables 
  with blobs containing nulls
    - storing a NULL field in the record buffer
      we must initialize its data as other code
      may rely on it.
2008-08-15 11:40:05 +05:00
Ramil Kalimullin
a233d7b851 Fix for bug#37537: myisamchk fails with Assertion failure with partitioned table
Problem: missed "break" in a switch leads to unexpected assertion failure
of 'myisamchk compressed_table'.

Fix: add the break.


storage/myisam/mi_check.c:
  Fix for bug#37537: myisamchk fails with Assertion failure with partitioned table
  
  In the record links check function (chk_data_link()) 
  missed "break" for case COMPRESSED_RECORD was added.
2008-08-15 10:55:20 +05:00
Ramil Kalimullin
67a3d9e4d0 Fix for bug#37337: Function returns different results
Problem: REGEXP in functions/PSs may return wrong results
due to improper initialization.

Fix: initialize required REGEXP params.


sql/item_cmpfunc.cc:
  Fix for bug#37337: Function returns different results
  
  prev_regexp is used in the Item_func_regex::regcomp()
  to store previous regex and to avoid re-initialization 
  if given the same pattern.
  Shoud be deleted in the Item_func_regex::cleanup() where we
  clean up the regexp structure.
2008-08-15 10:53:25 +05:00
He Zhenxing
e4e99f1439 auto merge 2008-08-15 06:56:46 +08:00
Evgeny Potemkin
368f7f63b2 Fixed failing test case for the bug#38195. 2008-08-14 23:55:18 +04:00
He Zhenxing
44f406a008 merge mysql-5.1-rpl-testfixes -> mysql-5.1 2008-08-14 22:01:37 +08:00
He Zhenxing
193a8f9735 fix after merge
mysql-test/extra/rpl_tests/rpl_row_basic.test:
  remove extra sync_slave_with_master
2008-08-14 16:27:28 +08:00
He Zhenxing
84173b21e7 Merge with mysql-5.1-rpl-testfixes 2008-08-14 15:16:04 +08:00
He Zhenxing
ef58dcfcc8 auto merge 2008-08-14 14:47:48 +08:00
He Zhenxing
7bf8e29b99 Auto merge from mysql-5.1 main 2008-08-14 14:27:18 +08:00
He Zhenxing
29cc45d0ce BUG#38290 valgrind warnings in binlog_base64_flag
The problem was because the event allocated in mysql_client_binlog_statement
was not freed when an error occured while applying the event.

sql/sql_binlog.cc:
  Delete the event if apply it failed
2008-08-14 10:42:10 +08:00
Matthias Leich
03818bff5a Merge 2008-08-13 22:17:43 +02:00
Matthias Leich
d23e8e06a1 Fix for Bug#37853
Test "funcs_1.processlist_val_ps" fails in various ways
+ corrections of logic in poll routines
+ minor improvements
2008-08-13 21:44:54 +02:00
Matthias Leich
632cf8ef43 Improve the testcases for Bug 12093 in ps_ddl.test
Details:
- add subtest with drop unrelated view
- rearrange existing tests so that a distinction
  between drop procedure and drop function effects
  is possible
2008-08-13 21:42:21 +02:00
Serge Kozlov
f2188dc323 Bug#18817, removing --binlog-format option from .opt files 2008-08-13 23:12:51 +04:00
Mattias Jonsson
fd7c7e20af Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt

Post push fix

an DBUG_ASSERT broke the embedded server, fixed by initializing
it in the embedded version of Protocol_text::prepare_for_resend

libmysqld/lib_sql.cc:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Post push fix
  
  an DBUG_ASSERT in Protocol_text::store broke the embedded
  server, fixed by initializing it in the embedded version
  of Protocol_text::prepare_for_resend
2008-08-13 20:50:08 +02:00
Evgeny Potemkin
b789b4f33c Bug#38195: Incorrect handling of aggregate functions when loose index scan is
used causes server crash.

When the loose index scan access method is used values of aggregated functions
are precomputed by it. Aggregation of such functions shouldn't be performed
in this case and functions should be treated as normal ones.
The create_tmp_table function wasn't taking this into account and this led to
a crash if a query has MIN/MAX aggregate functions and employs temporary table
and loose index scan.
Now the JOIN::exec and the create_tmp_table functions treat MIN/MAX aggregate
functions as normal ones when the loose index scan is used.


mysql-test/r/group_min_max.result:
  Added a test case for the bug#38195.
mysql-test/t/group_min_max.test:
  Added a test case for the bug#38195.
sql/sql_select.cc:
  Bug#38195: Incorrect handling of aggregate functions when loose index scan is
  used causes server crash.
  Now the JOIN::exec and the create_tmp_table functions treat MIN/MAX aggregate
  functions as normal ones when the loose index scan is used.
2008-08-13 22:24:55 +04:00
Joerg Bruehe
e613615693 Null-merge a 5.0 version number change up to 5.1 2008-08-13 12:45:56 +02:00
Joerg Bruehe
182b238334 Correct the version number to 5.0.70.
configure.in:
  Version number raise was incomplete, the 5.0 tree steps by 2.
2008-08-13 12:34:35 +02:00
unknown
6cab759d7a Raise version number after cloning 5.0.68 2008-08-13 11:05:24 +02:00
Mattias Jonsson
c8d01f1401 Bug#37402: Mysql cant read partitioned table with capital letter in the name
Post push fix (compiler warning)

sql/ha_partition.cc:
  Bug#37402: Mysql cant read partitioned table with capital letter in the name
  
  fix to prevent a compiler warning.
2008-08-13 10:47:24 +02:00
Timothy Smith
88329eafd9 Up-merge from 5.0; adds test for innodb bug 34286 (but no code changes). 2008-08-13 01:27:22 -06:00
Mattias Jonsson
3cc5b2c571 merge (into the latest mysql-5.1-bugteam tree) 2008-08-13 08:59:05 +02:00
Timothy Smith
f1715b2b35 Merge in new test case 2008-08-13 00:12:06 -06:00
Timothy Smith
d7c36eb334 Merge some 5.0 innodb changes 2008-08-13 00:11:11 -06:00
Marc Alff
6c91a2805f Merge mysql-5.1-bugteam -> local bugfix branch 2008-08-12 17:45:04 -06:00
Marc Alff
7ea370d2a2 Bug#38296 (low memory crash with many conditions in a query)
This fix is for 5.1 only : back porting the 6.0 patch manually

The parser code in sql/sql_yacc.yy needs to be more robust to out of
memory conditions, so that when parsing a query fails due to OOM,
the thread gracefully returns an error.

Before this fix, a new/alloc returning NULL could:
- cause a crash, if dereferencing the NULL pointer,
- produce a corrupted parsed tree, containing NULL nodes,
- alter the semantic of a query, by silently dropping token values or nodes

With this fix:
- C++ constructors are *not* executed with a NULL "this" pointer
when operator new fails.
This is achieved by declaring "operator new" with a "throw ()" clause,
so that a failed new gracefully returns NULL on OOM conditions.

- calls to new/alloc are tested for a NULL result,

- The thread diagnostic area is set to an error status when OOM occurs.
This ensures that a request failing in the server properly returns an
ER_OUT_OF_RESOURCES error to the client.

- OOM conditions cause the parser to stop immediately (MYSQL_YYABORT).
This prevents causing further crashes when using a partially built parsed
tree in further rules in the parser.

No test scripts are provided, since automating OOM failures is not
instrumented in the server.
Tested under the debugger, to verify that an error in alloc_root cause the
thread to returns gracefully all the way to the client application, with
an ER_OUT_OF_RESOURCES error.
2008-08-12 17:05:19 -06:00
Davi Arnaut
b907f225fe Merge and fix tree name. 2008-08-12 17:08:19 -03:00
Davi Arnaut
8ed209b21d Merge and fix tree name. 2008-08-12 16:52:52 -03:00
Davi Arnaut
7e35139c8f Merge mysql-5.0-bugteam into mysql-5.0 2008-08-12 15:51:00 -03:00
Mattias Jonsson
b32a49ac97 merge 2008-08-12 17:45:51 +02:00
Davi Arnaut
f18bc40caa Merge mysql-5.1-bugteam into mysql-5.1 main. 2008-08-12 11:28:43 -03:00
Mattias Jonsson
642bf9022a manual merge of bug#37402 2008-08-12 12:26:23 +02:00
He Zhenxing
44d0fcddf1 Apply tomas's patch to fix rpl_row_basic.test, this can fix BUG#37884,
BUG#38369, enable rpl_row_basic_7ndb test
2008-08-12 17:09:36 +08:00
Mattias Jonsson
bdab488391 Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
partition is corrupt

Updated result files after merge

mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Updated result file after merge
mysql-test/suite/parts/t/disabled.def:
  Bug#20129: ALTER TABLE ... REPAIR PARTITION ... complains that
  partition is corrupt
  
  Enabled two tests after fixing the bug.
2008-08-12 10:02:30 +02:00
Davi Arnaut
88d10290e7 Merge mysql-5.0-bugteam into mysql-5.1-bugteam 2008-08-11 21:27:17 -03:00
Davi Arnaut
1912eaacc4 Bug#38486: Crash when using cursor protocol
Post-merge fix: mysql_client_test.c is compiled by C compilers
and some C compilers don't support mixed declarations and code
and it's explicitly forbidden by ISO C90.

tests/mysql_client_test.c:
  Don't mix declarations and code.
2008-08-11 20:27:09 -03:00