Commit graph

54684 commits

Author SHA1 Message Date
Davi Arnaut
d622b04f39 Post-merge fix: Silence warning due to type mismatch.
client/mysql_upgrade.c:
  Silence warning due to type mismatch.
2008-08-11 10:08:21 -03:00
Kristofer Pettersson
2c01793a73 Null merging 5.0->5.1; Changeset is a back port. 2008-08-11 13:06:16 +02:00
Kristofer Pettersson
861c06f0b8 Automerge 2008-08-11 13:00:48 +02:00
Kristofer Pettersson
75a5ecbd72 Bug#38486 Crash when using cursor protocol
Server side cursors were not initialized properly and this caused a reference to
uninitialized memory.
2008-08-11 11:40:54 +02:00
Timothy Smith
5d036ff311 Up-merge test case for bug 35220 from 5.0 (no real code changes). 2008-08-07 18:33:12 -06:00
Timothy Smith
9d9fa39b97 Cherry-pick fix for Bug#35220 from innodb-5.0-ss2475 snapshot.
Bug#35220: ALTER TABLE too picky on reserved word "foreign"

In ALTER TABLE, change the internal parser to search for
``FOREIGN[[:space:]]'' instead of only ``FOREIGN'' when parsing
ALTER TABLE ... DROP FOREIGN KEY ...; otherwise it could be mistaken
with ALTER TABLE ... DROP foreign_col;

(This fix is already present in MySQL 5.1 and higher.)
2008-08-07 18:25:24 -06:00
Chad MILLER
b37814ef04 Merge from bugteam trunk. 2008-08-07 18:08:31 -04:00
Chad MILLER
9d2e311b6b merge from local 5.0 fix tree. 2008-08-07 16:27:05 -04:00
Chad MILLER
abeda651c5 Bug#31605: mysql_upgrade relies on Linux /proc filesystem when not \
running on Windows

We used two OS-specific methods of looking up the executable 
name, which don't work outside of those two kinds of OSes 
(Linux+Solaris and Windows).

We assume that if the user ran this program with a certain 
name, we can run the other sibling programs with a similar name.

(re-patch in bzr)
2008-08-07 12:24:39 -04:00
Davi Arnaut
130ab95a54 Bug#21226 FLUSH PRIVILEGES does not provided feedback when it fails.
Post-merge fix: remove spurious semicolon that caused the function
to return failure regardless of the outcome.

sql/sql_parse.cc:
  Remove spurious semicolon.
2008-08-06 23:23:58 -03:00
Chad MILLER
2c933391f6 Better fix of build-tags, merged from local 5.0-bugteam . 2008-08-06 16:45:15 -04:00
Chad MILLER
82d13392eb Bug#37201: make tags doesn't work in bazaar server trees
Fall back to "find" if bzr is unavailable.

Don't fail for paths that have spaces in them.
2008-08-06 16:25:25 -04:00
Chad MILLER
d771e0148d Merge from local 5.0-bugteam. 2008-08-06 15:29:41 -04:00
Chad MILLER
93df483fdd Bug#37201: make tags doesn't work in bazaar server trees
bk sfiles -> bzr ls
2008-08-06 15:27:28 -04:00
Kristofer Pettersson
857a0d6461 Manual merge 5.0->5.1 2008-08-06 16:20:41 +02:00
Sven Sandberg
0623864f34 merged 5.1 main -> 5.1-rpl-testfixes
all files automerged without conflict
2008-08-06 15:49:03 +02:00
Chad MILLER
ff577e3590 Bug#30129: mysql_install_db appears to run normally, but the databases \
are not created  {Netware}

The init and test sql files were not created at cross-compilation time.

Now, make them in the default build rule.  Additionally, remove the "fix" 
SQL instructions, which are unnecessary for newly initialized databases.
Also, clean up the english in an error message, and BZRify nwbootstrap.
2008-08-06 09:25:03 -04:00
Kristofer Pettersson
be7d4dc8ee automerge 2008-08-04 14:37:28 +02:00
Davi Arnaut
b757f48565 Bug#37003: Tests sporadically crashes with embedded server
Post-merge fix: Alter linking order so that the thread linking
flags appear last in the list. This needs to be done this way
because some linkers will not search the thread archive again
if a undefined symbol (pthread_kill in this case) appears later.

client/Makefile.am:
  Link mysys before thread libs.
2008-08-01 12:10:06 -03:00
Timothy Smith
00940891b0 NULL MERGE of innodb-5.0-ss2475 snapshot cherry-pick (bugs: 34286, 35352, 36600)
These changes, where applicable, are available in 5.1-specific snapshots for MySQL 5.1+.
2008-07-31 16:39:03 -06:00
Timothy Smith
dc593c3ec4 Cherry-pick InnoDB fixes for Bug#34286, Bug#35352, and Bug#36600 from snapshot
innodb-5.0-ss2475.

Bug #34286  Assertion failure in thread 2816 in file .\row\row0sel.c line 3500
Since autoinc init performs a MySQL SELECT query to determine the auto-inc
value, set prebuilt->sql_stat_start = TRUE so that it is performed like any
normal SELECT, regardless of the context in which it was invoked.


Bug #35352  If InnoDB crashes with UNDO slots full error the error persists on restart
We've added a heuristic that checks the size of the UNDO slots cache lists
(insert and upate). If either of cached lists has more than 500 entries then we
add any UNDO slots that are freed, to the common free list instead of the cache
list, this is to avoid the case where all the free slots end up in only one of
the lists on startup after a crash.

Tested with test case for 26590 and passes all mysql-test(s).

Bug #36600  SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
Fixed by removing the Innodb_buffer_pool_pages_latched variable from SHOW
STATUS output in non-UNIV_DEBUG compilation.
2008-07-31 15:47:57 -06:00
Georgi Kodinov
a3cd2e2dab merged 34159 and 37662 5.0-bugteam->5.1-bugteam 2008-07-31 12:50:24 +03:00
Georgi Kodinov
b19155258e Bug#34159: mysql_install_db fails with sql_mode=TRADITIONAL
Reset session sql_mode before creating system tables as it
is done in the mysql_fix_privilege_tables.sql script.

scripts/mysql_system_tables.sql:
  reset sql mode
2008-07-31 12:28:04 +03:00
Georgi Kodinov
ae4a35fd5c Bug#37662 nested if() inside sum() is parsed in exponential time
min() and max() functions are implemented in MySQL as macros.
This means that max(a,b) is expanded to: ((a) > (b) ? (a) : (b))
Note how 'a' is quoted two times.
Now imagine 'a' is a recursive function call that's several 10s of levels deep.
And the recursive function does max() with a function arg as well to dive into
recursion.
This means that simple function call can take most of the clock time.
Identified and fixed several such calls to max()/min() : including the IF() 
sql function implementation.

mysql-test/r/func_if.result:
  Bug#37662 test case
mysql-test/t/func_if.test:
  Bug#37662 test case
sql/item.cc:
  Bug#37662 don't call expensive functions as arguments to min/max
sql/item_cmpfunc.cc:
  Bug#37662 don't call expensive functions as arguments to min/max
sql/item_func.cc:
  Bug#37662 don't call expensive functions as arguments to min/max
2008-07-30 14:07:37 +03:00
Sven Sandberg
5101f124e8 merge 5.1 main -> 5.1-rpl-testfixes
all changes automerged without conflicts
2008-07-29 19:55:46 +02:00
Sven Sandberg
c6bf7ead8f BUG#38068: binlog_stm_binlog fails sporadically in pushbuild
Post-push fix: updated some result files that were affected
by the previous fix to this bug.


mysql-test/suite/binlog/r/binlog_killed_simulate.result:
  Updated result file.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Updated result file.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  Updated result file.
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
  Updated result file.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  Updated result file.
mysql-test/suite/rpl/r/rpl_stm_log.result:
  Updated result file.
2008-07-29 17:36:13 +02:00
Kristofer Pettersson
0a415f62fd Bug#29738 Error message not properly translated to Serbian
Community contribution fix for Serbian translation in error message list.
2008-07-29 15:58:15 +02:00
Kristofer Pettersson
f0dfb82fcb Bug#37781 mysql_drop_user calls get_current_user() twice for no reason
Fixed typo and removed duplicate call to get_current_user.
2008-07-29 15:37:09 +02:00
Kristofer Pettersson
0b918cfd7d auto merge 2008-07-29 15:15:04 +02:00
Alexander Barkov
480554a76a Bug#36597 Testsuite "jp": Suspicious results for some tests using sjis
Problem: Extra new line appeared in jisx0208_sjis2.dat in a mistake, which
broke jp_convert_sjis and jp_select_sjis tests.
Fix: removing extra line

  mysql-test/suite/jp/std_data/jisx0208_sjis2.dat:
      removing wrong extra new line

  mysql-test/suite/jp/t/disabled.def:     
      activating disabled tests
2008-07-29 10:43:57 +05:00
Alexander Barkov
686ced5367 Bug#35808 utf8 hungarian collation not part of the utf8 charset?
config/ac-macros/character_sets.m4 didn't mention hungarian collations
in the UTF8 and UCS2 lists.
2008-07-29 08:25:46 +05:00
Igor Babaev
7f615b2c14 Merge 2008-07-28 01:24:56 -07:00
Igor Babaev
b6e3a9e28c Fixed bug #38191.
Calling List<Cached_item>::delete_elements for the same list twice
caused a crash of the server in the function JOIN::cleaunup.
Ensured that delete_elements() in JOIN::cleanup would be called only once.


mysql-test/r/subselect.result:
  Added a test case for bug #38191.
mysql-test/t/subselect.test:
  Added a test case for bug #38191.
sql/sql_select.cc:
  Fixed bug #38191.
  Ensured that delete_elements() in JOIN::cleanup would be called only once.
2008-07-26 13:44:07 -07:00
Patrick Crews
e195149b43 Bug#38383 - Certain funcs_1 trig tests are failing on Pushbuild.
Removing duplicate 'setup' portions of these include files.  Likely an editor error created dupe lines.
This is causing many Pushbuild errors
2008-07-25 13:14:52 -04:00
Georgi Kodinov
c7fc78c3b2 merge of 5.1-main to 5.1-bugteam 2008-07-25 18:06:47 +03:00
Davi Arnaut
d09b5ab227 Null merge of mysql-5.0-bugteam into mysql-5.1-bugteam. 2008-07-25 12:12:47 -03:00
Georgi Kodinov
e113042588 Disabled 5.1 tests (and reported bugs)
mysql-test/suite/ndb/t/disabled.def:
  disabled failing test in 5.1-bzr
mysql-test/suite/rpl_ndb/t/disabled.def:
  disabled failing test in 5.1-bzr
2008-07-25 13:32:05 +03:00
Kristofer Pettersson
0a91049cfc auto merged 2008-07-24 22:50:47 +02:00
Kristofer Pettersson
548413824b Bug#38002 table_cache consumes too much memory with blobs
Tables in the table definition cache are keeping a cache buffer for blob
fields which can consume a lot of memory.
    
This patch introduces a maximum size threshold for these buffers.


sql/sql_base.cc:
  Added function free_field_buffers_larger_than to reclaim memory from blob
  field buffers too large to be cached.
sql/table.cc:
  Added function free_field_buffers_larger_than
2008-07-24 22:38:44 +02:00
Chad MILLER
f6f6d81b82 Make community features (including profiling) on by default. 2008-07-24 13:43:14 -04:00
Davi Arnaut
14887bb2ab Cherry-pick Bug#33362 from mysql-5.1 2008-07-24 11:14:34 -03:00
Horst Hunger
94ba5b8914 Merge from parent. 2008-07-24 09:49:29 +02:00
Sven Sandberg
159505f82b BUG#38068: binlog_stm_binlog fails sporadically in pushbuild
Problem: binlog_stm_binlog runs INSERT DELAYED queries, and
then prints the contents of the binlog. Before checking the
contents of the binlog, the test waits until the rows have
appeared in the table. However, this is not enough, since
INSERT DELAYED does not write rows to the binlog at the same
time as it writes them to the table. So there is a race.
Fix: Add a FLUSH TABLES before SHOW BINLOG EVENTS. That
waits until the insert_delayed thread is done.


mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
  - Added FLUSH TABLES, so that SHOW BINLOG EVENTS becomes
  deterministic.
  - Added comments.
  - Removed unnecessary 'set @@session.auto_increment_increment'
  statements.
  - Removed unnecessary check that the number of rows inserted
  to the table is 11.
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  updated result file
2008-07-23 18:56:39 +02:00
Sven Sandberg
d8c838c27a BUG#37733: rpl.rpl_flushlog_loop 'row' fails sporadically on pushbuild
BUG#37884: rpl_row_basic_2myisam and rpl_row_basic_3innodb fail sporadically in pushbuild
These have been fixed in 5.1-rpl. Re-applying fix for BUG#37884
in 5.1-bugteam, and disabling rpl_flushlog_loop for BUG#37733 in
5.1-bugteam.


mysql-test/extra/rpl_tests/rpl_row_basic.test:
  Missing sync_slave_with_master added.
mysql-test/suite/rpl/t/disabled.def:
  Disabling rpl_flushlog_loop until the fixed version gets
  merged from 5.1-rpl
2008-07-23 16:34:02 +02:00
Horst Hunger
ea4b396303 Final fix for bug#36522 in 5.1. This new fix was necessary due to fix of bug 37708. 2008-07-23 16:06:44 +02:00
Georgi Kodinov
dd85aa78ba Bug#37830 : ORDER BY ASC/DESC - no difference
Range scan in descending order for c <= <col> <= c type of
ranges was ignoring the DESC flag.
However some engines like InnoDB have the primary key parts 
as a suffix for every secondary key.
When such primary key suffix is used for ordering ignoring 
the DESC is not valid.
But we generally would like to do this because it's faster.
            
Fixed by performing only reverse scan if the primary key is used.
Removed some dead code in the process.

mysql-test/r/innodb_mysql.result:
  Bug#37830 : test case
mysql-test/t/innodb_mysql.test:
  Bug#37830 : test case
sql/opt_range.cc:
  Bug#37830 : 
  - preserve and use used_key_parts to
    distinguish when a primary key suffix is used
  - removed some dead code
sql/opt_range.h:
  Bug#37830 : 
  - preserve used_key_parts
  - dead code removed
sql/sql_select.cc:
  Bug#37830 : Do only reverse order traversal
  if the primary key suffix is used.
2008-07-23 14:25:00 +03:00
Sven Sandberg
7978905c5c BUG#37493: rpl_trunc_temp.test nondeterministic
Problem: the test waits for a 'DROP TEMPORARY TABLE' event to
appear in the master's binlog, then checks on the slave whether
the number of temporary tables has decreased. The slave does
not sync, causing a race.
Fix: check for the 'DROP TEMPORARY TABLE' event on slave
instead of on master.


mysql-test/suite/rpl/t/rpl_trunc_temp.test:
  - Fixed BUG#37493 by waiting for the event on the slave
  instead of on the master.
  - Added comments.
2008-07-23 12:13:55 +02:00
Horst Hunger
cbbe2afdda fix of bug#37708: removed a forgotten include file. 2008-07-23 08:51:04 +02:00
Horst Hunger
75258f31bf merge from parent 2008-07-23 08:49:41 +02:00
Davi Arnaut
afeab2052f Merge 5.1-bugteam into main. 2008-07-22 15:24:31 -03:00