Commit graph

461 commits

Author SHA1 Message Date
kroki/tomash@moonlight.intranet
1917a99270 BUG#21206: memory corruption when too many cursors are opened at once
Too many cursors (more than 1024) could lead to memory corruption.
This affects both, stored routines and C API cursors, and the
threshold is per-server, not per-connection.  Similarly, the
corruption could happen when the server was under heavy load
(executing more than 1024 simultaneous complex queries), and this is
the reason why this bug is fixed in 4.1, which doesn't support
cursors.

The corruption was caused by a bug in the temporary tables code, when
an attempt to create a table could lead to a write beyond allocated
space.  Note, that only internal tables were affected (the tables
created internally by the server to resolve the query), not tables
created with CREATE TEMPORARY TABLE.  Another pre-condition for the
bug is TRUE value of --temp-pool startup option, which, however, is a
default.

The cause of a bug was that random memory was overwritten in
bitmap_set_next() due to out-of-bound memory access.
2006-07-27 13:59:15 +04:00
kent@suse9-x86.mysql.com
6b08a98644 Makefile.am:
Avoid duplicate symbol errors on Netware
mwldnlm, mwccnlm, mwasmnlm:
  Filter garbage characters from output
2006-07-03 10:56:19 +02:00
kent@mysql.com
51f3882243 Merge mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0
2006-05-26 18:38:34 +02:00
serg@mysql.com
c00edb8e8a Merge mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0.22-release
2006-05-24 14:22:36 +02:00
serg@mysql.com
1841c44cfc Merge mysql.com:/data0/mysqldev/my/mysql-4.1.16a-release
into  mysql.com:/data0/mysqldev/my/mysql-5.0.17c-release
2006-05-24 12:19:39 +02:00
kent@mysql.com
97674810b0 don't let bugfix for bug#8303 break the bugfix for bug#8378
revert the fix for bug#8303
correct the test for bug#8378
2006-05-24 00:55:53 +02:00
knielsen@mysql.com
f0341ac431 Fix a bunch of non-Linux compile failures. 2006-05-02 09:19:54 +02:00
cmiller@zippy.(none)
85ffd9640e SECURITY FIX
Bug#17667: An attacker has the opportunity to bypass query logging.

This adds a new, local-only printf format specifier to our *printf functions
that allows us to print known-size buffers that must not be interpreted as 
NUL-terminated "strings."

It uses this format-specifier to print to the log, thus fixing this 
problem.
2006-05-01 22:10:50 -04:00
sergefp@mysql.com
c67ed1ee8c Fix incorrect merge: put '/*' comment start back. 2006-03-30 22:35:50 +04:00
evgen@sunlight.local
eb075f2255 Manual merge 2006-03-30 17:14:55 +04:00
monty@mysql.com
c04660e85e Cleanup during review of new pushed code 2006-03-30 03:11:37 +03:00
konstantin@mysql.com
2ea0b9b72c Revert the changeset for Bug#16144 "mysql_stmt_attr_get type error":
it breaks binary compatibility. The patch will be left intact
in 5.1.
2006-03-05 00:38:54 +03:00
konstantin@mysql.com
951943c22a Undo the patch for Bug#16144 "mysql_stmt_attr_get type error",
it breaks binary compatibility. The patch will be left intact
in 5.1. Warning: this changeset should be null-merged into 5.1.
A separate commit in order to push into the release clone of 
5.0.19.
2006-03-04 23:04:48 +03:00
evgen@sunlight.local
f641a91943 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into sunlight.local:/work_local/14169-bug-5.0-mysql
2006-02-28 19:42:11 +03:00
evgen@moonbone.local
0ce39664b6 Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was
used

In a simple queries a result of the GROUP_CONCAT() function was always of 
varchar type.
But if length of GROUP_CONCAT() result is greater than 512 chars and temporary
table is used during select then the result is converted to blob, due to
policy to not to store fields longer than 512 chars in tmp table as varchar
fields.

In order to provide consistent behaviour, result of GROUP_CONCAT() now
will always be converted to blob if it is longer than 512 chars.
Item_func_group_concat::field_type() is modified accordingly.
2006-02-28 19:30:30 +03:00
monty@mysql.com
dd1d40f8f8 Fixed new introduced bug in binlog.test with --ps-protocol 2006-02-25 13:24:18 +02:00
msvensson@neptunus.(none)
12b23630db Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-15 20:16:33 +01:00
msvensson@devsrv-b.mysql.com
eb97818627 Bug#16143 mysql_stmt_sqlstate returns an empty string instead of '00000'
- Init sql_state in mysql_stmt_init
2006-02-15 13:45:03 +01:00
msvensson@neptunus.(none)
db6c9129b3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-13 14:55:56 +01:00
msvensson@neptunus.(none)
e486d81a52 Merge neptunus.(none):/home/msvensson/mysql/bug14013/my50-bug14013
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-02-13 10:56:45 +01:00
msvensson@neptunus.(none)
5000951ab4 Bug#14013 mysql_stmt_store_result() bombs if a cursor is open
- Add code to 'mysql_stmt_store_result' to allow it to be called on 
   a prepared statement with open server side cursor.
 - Add tests to mysql_client_test that uses 'mysql_stmt_store_result'
2006-02-10 14:50:29 +01:00
andrey@lmy004.
bdf0f9a2d9 fix test of bug 12744 on OSX 2006-02-10 14:42:08 +01:00
konstantin@mysql.com
303ad65fb2 Post-merge fixes. 2006-02-03 00:07:36 +03:00
konstantin@mysql.com
98091b152a Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2006-02-02 18:17:18 +03:00
andrey@lmy004.
736faf4730 fix for bug #12744 (MYSQL_STMT operations cause seg fault after connection reset) 2006-02-01 20:35:16 +01:00
msvensson@neptunus.(none)
a6c508dbf3 Merge neptunus.(none):/home/msvensson/mysql/bug15719/my50-bug15719
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-01-30 11:02:09 +01:00
msvensson@neptunus.(none)
41c6fee874 Bug #15719 MYSQL_OPT_RECONNECT option is modified by mysql_real_connect
- Move init of "reconnect" variable to mysql_init 
 - Add test case to mysql_client_test.
2006-01-26 11:20:59 +01:00
konstantin@mysql.com
37c9e9e375 Merge mysql.com:/opt/local/work/mysql-4.1-15613
into  mysql.com:/opt/local/work/mysql-5.0-root
2006-01-19 14:01:20 +03:00
konstantin@mysql.com
4ca48591f1 A fix and a test case for Bug#15613 "libmysqlclient API function
mysql_stmt_prepare returns wrong field length"
2006-01-18 22:50:31 +03:00
konstantin@mysql.com
d2bba04183 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2006-01-18 15:15:09 +03:00
konstantin@mysql.com
19fd36e254 A fix and a test case for Bug#16144 "mysql_stmt_attr_get type error":
use the right type in mysql_stmt_attr_get
2006-01-17 23:19:43 +03:00
ingo@mysql.com
8482de4381 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-bug10932
2005-12-08 07:56:07 +01:00
jimw@mysql.com
e228b43946 Fix value returned by mysql_warning_count() after fetching a prepared
statement that generated a warning. (Bug #15510)
2005-12-06 15:50:03 -08:00
ingo@mysql.com
6b18dbef31 Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Added and used a configure.in macro.
Replaced fixed limits by the configurable limit.
Limited MyISAM indexes to its hard limit.
Fixed a bug in opt_range.cc for many indexes with InnoDB.

Tested for 2, 63, 64, 65, 127, 128, 129, 255, 256, and 257 indexes.
Testing this part of the bugfix requires rebuilding of the server 
with different options. This cannot be done with our test suite. 
Therefore I added the necessary test files to the bug report.
If you repeat the tests, please note that the ps_* tests fail for
everything but 64 indexes. This is because of differences in the 
meta data, namely field lengths for index names etc.
2005-12-02 16:27:18 +01:00
konstantin@mysql.com
159bf8832e A test case for Bug#14845 "mysql_stmt_fetch returns MYSQL_NO_DATA
when COUNT(*) is 0". The bug itself cannot be repeated.
2005-11-18 17:55:52 +03:00
konstantin@mysql.com
85f5263284 A fix and a test case for Bug#13524 "lock timeout gives
incorrect warning on open cursor"
2005-11-17 16:20:12 +03:00
konstantin@mysql.com
b318ed1768 A fix and a test case for Bug#13488 "Left outer join query incorrectly
gives MYSQL_DATA_TRUNCATED"
2005-11-09 20:31:01 +03:00
konstantin@mysql.com
7e3f757f2d A fix and a test case for Bug#14210 "Simple query with > operator on
large table gives server crash": make sure that when a MyISAM temporary
table is created for a cursor, it's created in its memory root,
not the memory root of the current query.
2005-11-03 14:20:13 +03:00
jani@ua141d10.elisa.omakaista.fi
cbe21a8eb6 Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-tmp
2005-10-27 23:43:20 +03:00
jimw@mysql.com
a01cd74647 Merge mysql.com:/home/jimw/my/mysql-4.1-12925
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-10-25 10:11:47 -07:00
jimw@mysql.com
e8eed35c6a Fix incorrect casts in my_getopt code that capped the maximum of longlong
options to the wrong value. (Bug #12925)
2005-10-25 10:10:53 -07:00
msvensson@neptunus.(none)
b81f3ef1ef Bug #12698 abnormal program termination running mysql_client_test
- Move test for bug#93 from mysql_client_test.c to show_check.test
 - No need for test written in c
2005-10-13 15:52:22 +02:00
msvensson@neptunus.(none)
0ac493d16c Bug #12698 abnormal program termination running mysql_client_test
- The testcase create a .frm file consisting of "junk". Unfortunately the "junk" wasn't
   written to the .frm file if mysql_client_test was run with -s option to make it run silent.
   This most likely caused the file never to be created on windows, and thus the 
    test case failed.
2005-10-13 13:37:10 +02:00
konstantin@mysql.com
6f8d3c4844 A fix and a test case for Bug#6513 "Test Suite: Values inserted by using
cursor is interpreted latin1 character and Bug#9819 "Cursors: Mysql Server
Crash while fetching from table with 5 million records."
A fix for a possible memory leak when fetching into an SP cursor
in a long loop.
The patch uses a common implementation of cursors in the binary protocol and 
in stored procedures and implements materialized cursors.
For implementation details, see comments in sql_cursor.cc
2005-09-22 02:11:21 +04:00
gluh@eagle.intranet.mysql.r18.ru
99bc9607e1 Bug#12817 SHOW STATUS now blob fields
This fix is cancellation of ChangeSet
   1.2329 05/07/12 08:35:30 reggie@linux.site +8 -0
   Bug 7142  Show Fields from fails using Borland's dbExpress interface
   The reason is we can't fix bug#7142 without
   breaking of existing applications/APIs that worked fine with earlier 4.1
   bug 7142 is fixed in 5.0
2005-09-09 13:22:16 +05:00
jimw@mysql.com
1d997477aa Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-31 15:24:06 -07:00
jimw@mysql.com
0dc444ec4e Fix incorrect spellings of "dropped" in source and tests. (Bug #12828) 2005-08-30 12:24:37 -07:00
andrey@lmy004.
c9d9c74ac6 Merge ahristov@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy004.:/work/mysql-5.0-bug11904
2005-08-27 09:09:54 +02:00
andrey@lmy004.
7b1b3997a8 fix for bug #11904 (select statement, cursor, grouping wrong results) 2005-08-26 09:45:30 +02:00
monty@mishka.local
b90d7fe3b6 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mishka.local:/home/my/mysql-5.0
2005-08-25 09:40:40 +03:00