Commit graph

597 commits

Author SHA1 Message Date
cmiller@zippy.cornsilk.net
2d9187fcba Merge zippy.cornsilk.net:/home/cmiller/work/mysql/no-strange-literals/my41-no-strange-literals
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2006-08-31 11:30:14 -04:00
cmiller@zippy.cornsilk.net
797b8206ed Merge zippy.cornsilk.net:/home/cmiller/work/mysql/no-strange-literals/my41-no-strange-literals
into  zippy.cornsilk.net:/home/cmiller/work/mysql/no-strange-literals/my50-no-strange-literals
2006-08-31 11:27:55 -04:00
cmiller@zippy.cornsilk.net
436d3a3798 Bitkeeper's Tk interface uses UTF8 by default, so mixing charsets in a
single file is a bad practice.
2006-08-31 11:14:04 -04:00
msvensson@neptunus.(none)
9d87db7767 Bug#21813 An attacker has the opportunity to bypass query logging, part2
- Use the "%.*b" format when printing prepared and exeuted prepared statements to the log.
 - Add test case to check that also prepared statements end up in the query log
Bug#14346 Prepared statements corrupting general log/server memory
 - Use "stmt->query" when logging the newly prepared query instead of "packet"
2006-08-30 17:11:00 +02:00
msvensson@neptunus.(none)
1682c8b463 Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-08-22 08:31:18 +02:00
msvensson@neptunus.(none)
aa944afbe7 Remove debug printout from mysql_client_test 2006-08-22 08:30:33 +02:00
iggy@rolltop.ignatz42.dyndns.org
39a8fe6e44 Bug#21757: mysql_client_test fails in testcase when reading master.log file 2006-08-21 20:29:11 -04:00
msvensson@shellback.(none)
adaa3a2a60 Merge bk-internal:/home/bk/mysql-5.0-maint
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-08-21 14:09:38 +02:00
msvensson@shellback.(none)
2b2985e0ea Print lines from log file to see what's in them 2006-08-21 14:06:59 +02:00
cmiller@zippy.cornsilk.net
6998c5140b Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
2006-08-17 10:53:12 -04:00
cmiller@zippy.cornsilk.net
7d38d61398 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
2006-08-17 10:49:56 -04:00
cmiller@zippy.cornsilk.net
030ddb48f3 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
2006-08-17 10:47:23 -04:00
rburnett@production.mysql.com
0199dda5a6 My previous change of replacing the call to sprintf with some memcpy type routines was not correct. This patch reverts that.
mysql_client_test.c:
  reverting my previous change
2006-08-14 20:48:37 +02:00
Reggie@xgeek.
e26aef9f64 Some small cleanups that will help get mysql_client_test passing on Windows 2006-08-10 17:39:01 -05:00
msvensson@neptunus.(none)
dee4105ce0 Remove extra whitespace 2006-08-07 19:21:43 +02:00
msvensson@neptunus.(none)
862d5626a5 Add some more code to analyze why the fgets fails. 2006-08-07 17:26:02 +02:00
msvensson@neptunus.(none)
419e4dd46f Add printouts in test case for bug17667 2006-08-07 14:02:57 +02:00
msvensson@neptunus.(none)
68168c8e8f Change the 'sleep' into an explicit FLUSH LOGS command 2006-08-07 11:29:41 +02:00
msvensson@neptunus.(none)
2e4dbadf9f fflush(NULL) before abort so that all pending writes are performed 2006-08-07 10:16:37 +02:00
msvensson@neptunus.(none)
e33bd1a309 Flush stderr before calling abort() 2006-08-06 23:56:51 +02:00
Reggie@xgeek.
7a8a33a941 please don't call methods that should always execute inside assert() 2006-08-05 18:58:38 -05:00
rburnett@production.mysql.com
a73a9da34b mysql_client_test.c:
Moving call that processes select results out of the assert
2006-08-05 23:15:23 +02:00
kostja@bodhi.local
4bfc67fc3c Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
2006-08-02 14:13:01 +04:00
kroki/tomash@moonlight.intranet
cc98d26a23 Fix after manual merge. 2006-07-29 13:50:08 +04:00
holyfoot/hf@mysql.com/deer.(none)
a9a345d9a5 Merge mysql.com:/home/hf/work/mysql-4.1.mrg
into  mysql.com:/home/hf/work/mysql-5.0.mrg
2006-07-25 13:50:17 +05:00
kostja@bodhi.local
2ce1a07c89 A fix and a test case for Bug#15752 "Lost connection to MySQL server
when calling a SP from C API"

The bug was caused by lack of checks for misuse in mysql_real_query. 
A stored procedure always returns at least one result, which is the 
status of execution of the procedure itself.
This result, or so-called OK packet, is similar to a result
returned by INSERT/UPDATE/CREATE operations: it contains the overall
status of execution, the number of affected rows and the number of
warnings. The client test program attached to the bug did not read this 
result and ivnoked the next query. In turn, libmysql had no check for 
such scenario and mysql_real_query was simply trying to send that query 
without reading the pending response, thus messing up the communication
protocol.

The fix is to return an error from mysql_real_query when it's called
prior to retrieval of all pending results.
2006-07-24 14:56:53 +04:00
holyfoot/hf@mysql.com/deer.(none)
95b88445fb Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1.19983
2006-07-20 16:03:21 +05:00
holyfoot/hf@mysql.com/deer.(none)
00f56da9af merging 2006-07-18 16:43:39 +05:00
cmiller@zippy.(none)
2c5308a703 Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/m50-maint--07C2P
2006-07-13 11:11:20 -04:00
cmiller@zippy.(none)
e62e730020 A patch to Bug#17667 didn't take into consideration that the vardir, which contains
the server's binlog file, might be set to a different directory.  This adds a new
"vardir" parameter, which takes the name of the directory as a value, so that the 
test_bug17667() test can find the binlog.
2006-07-10 16:38:03 -04:00
knielsen@rt.int.sifira.dk
7062993817 Merge mysqldev@production:my/mysql-5.0-release
into  rt.int.sifira.dk:/usr/local/mysql/tmp-5.0
2006-07-04 12:08:58 +02: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
gluh@mysql.com
d2b378d57f Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-kt
2006-07-03 13:19:18 +05:00
monty@mysql.com
2f86009c9e Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2006-06-30 19:15:18 +03:00
kroki@mysql.com
79ca4c1d55 bug #20152: mysql_stmt_execute() overwrites parameter buffers
When using a parameter bind MYSQL_TYPE_DATE in a prepared statement,
the time part of the MYSQL_TIME buffer was written to zero in
mysql_stmt_execute(). The param_store_date() function in libmysql.c
worked directly on the provided buffer.
Changed to use a copy of the buffer.
2006-06-30 12:52:05 +04:00
gluh@eagle.intranet.mysql.r18.ru
f9214221fc Bug#19671 mysql_list_fields returns incorrect table name for VIEWs
After view onening real view db name and table name are placed
into table_list->view_db & table_list->view_name.
Item_field class does not handle these names properly during 
intialization of Send_field.
The fix is to use new class 'Item_ident_for_show' 
which sets correct view db name and table name for Send_field.
2006-06-29 16:52:46 +05:00
holyfoot@deer.(none)
7a1c9459b3 bug #19983 (mysql_client_test_embedded fails) 2006-06-02 22:33:22 +05: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
44ec4456b8 Merge mysql.com:/data0/mysqldev/my/mysql-4.1.16a-release
into  mysql.com:/data0/mysqldev/my/mysql-4.1.20-release
2006-05-24 14:12:19 +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
monty@mishka.local
f384e08277 Merge mishka.local:/home/my/mysql-4.1
into  mishka.local:/home/my/mysql-5.0
2005-08-25 06:55:48 +03:00
jimw@mysql.com
6964b7491e Merge mysql.com:/home/jimw/my/mysql-5.0-11680
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-24 15:54:23 -07:00
jimw@mysql.com
cf5dd176c0 Fix build using --without-server. (Bug #11680) 2005-08-23 11:25:24 -07:00
timour@mysql.com
e040300393 WL#2486 - natural and using join according to SQL:2003
* Provide backwards compatibility extension to name resolution of
  coalesced columns. The patch allows such columns to be qualified
  with a table (and db) name, as it is in 4.1.
  Based on a patch from Monty.

* Adjusted tests accordingly to test both backwards compatible name
  resolution of qualified columns, and ANSI-style resolution of
  non-qualified columns.
  For this, each affected test has two versions - one with qualified
  columns, and one without.
2005-08-23 18:08:04 +03:00
evgen@moonbone.local
6d8bd17c3a Fix bug #11718 query with function, join and order by returns wrong type.
create_tmp_field_from_item() was creating tmp field without regard to
original field type of Item. This results in wrong type being reported to
client.

To create_tmp_field_from_item() added special handling for Items with 
DATE/TIME field types to preserve their type.
2005-08-17 23:53:12 +04:00
monty@mysql.com
1a6f16edd9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-08-15 18:35:48 +03:00
monty@mysql.com
df32f7d621 Save and clear run context before executing a stored function or trigger and restore it afterwards.
This allows us to use statement replication with functions and triggers
The following things are fixed with this patch:
- NOW() and automatic timestamps takes the value from the main event for functions and triggers (which allows these to replicate with statement level logging)
- No side effects for triggers or functions with auto-increment values(), last_insert_id(), rand() or found_rows()
- Triggers can't return result sets

Fixes bugs:
#12480: NOW() is not constant in a trigger
#12481: Using NOW() in a stored function breaks statement based replication
#12482: Triggers has side effects with auto_increment values
#11587: trigger causes lost connection error
2005-08-15 18:15:12 +03:00
timour@mysql.com
354ce1d024 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486-merge
2005-08-12 19:27:54 +03:00
timour@mysql.com
a247282aa6 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task
2005-08-12 17:57:19 +03:00
acurtis@xiphis.org
b9476f7d50 Merge xiphis.org:/usr/home/antony/work2/mysql-4.1
into  xiphis.org:/usr/home/antony/work2/merge-5.0
2005-08-11 12:18:53 +01:00
konstantin@mysql.com
8392a814af A fix and a test case for Bug#12243 "MySQL Server crashes with 2
cursors (+ commit)" and Bug#11832 "Server crash with InnoDB + Cursors"
See comments to the changed files.
2005-08-10 18:36:13 +04:00
konstantin@mysql.com
3a73ef8a86 Fix coding style. 2005-08-10 17:45:42 +04:00
konstantin@mysql.com
f6306a8db1 A fix for Bug#11901 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY join in
subqry order by server crash": failing DBUG_ASSERT(curr_join == this)
when opening a cursor.
Ensure that for top-level join curr_join == join (always), 
and thus fix the failing assert.
curr_join is a hack to ensure that uncacheable subqueries can be
re-evaluated safely, and should be never different from main join
in case of top-level join.
2005-08-10 12:25:26 +04:00
konstantin@mysql.com
043f77ccdf A fix and a test case for Bug#11909 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY nested queries corrupt result"
2005-08-08 19:24:56 +04:00
monty@mysql.com
987edeaa9b Fixed compiler warnings 2005-07-28 21:25:05 +03:00
pappa@c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se
6026054ead Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into  c-450ae253.1238-1-64736c10.cust.bredbandsbolaget.se:/home/pappa/mysql-5.0
2005-07-21 01:29:57 -04:00
konstantin@mysql.com
21957c423e Implement MySQL framework to support consistent read views in
cursors. This should fix Bug#11813 when InnoDB part is in 
(tested with a draft patch).
The idea of the patch is that if a storage engine supports
consistent read views, we open one when open a cursor,
set is as the active view when fetch from the cursor, and close
together with cursor close.
2005-07-20 20:02:36 +04:00
georg@lmy002.wdf.sap.corp
dc0645f7cf Merge grichter@bk-internal.mysql.com:/home/bk/mysql-4.1
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-4.1
2005-07-20 13:32:43 +02:00
georg@lmy002.wdf.sap.corp
3468c8485d cs fixes from last commit 2005-07-20 13:31:45 +02:00
jimw@mysql.com
2a06e5756e Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-19 19:59:32 -07:00
jimw@mysql.com
63c6ece728 Cleanups after merge from 4.1. 2005-07-19 16:32:38 -07:00
konstantin@mysql.com
14344b658a A fix and a test case for Bug#10760 and complementary cleanups.
The idea of the patch
is that every cursor gets its own lock id for table level locking.
Thus cursors are protected from updates performed within the same 
connection. Additionally a list of transient (must be closed at
commit) cursors is maintained and all transient cursors are closed
when necessary. Lastly, this patch adds support for deadlock
timeouts to TLL locking when using cursors.
+ post-review fixes.
2005-07-19 22:21:12 +04:00
jimw@mysql.com
80c1c6b33f Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-19 11:05:49 -07:00
georg@lmy002.wdf.sap.corp
3e1ae2633a fix for bug#12001 2005-07-19 17:31:18 +02:00
monty@mishka.local
2278e0319c Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mishka.local:/home/my/mysql-5.0
2005-07-18 19:03:01 +03:00
reggie@linux.site
8f605428cb Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into  linux.site:/home/reggie/bk/bug7142
2005-07-18 08:03:59 -06:00
monty@mishka.local
78c65b5adc Cleanups during review
Changed defaults option --instance to --defaults-group-suffix
Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX
mysql_print_defaults now understands --defaults-group-suffix
Remove usage of my_tempnam() (not safe function)
if( -> if ( and while( to while (
2005-07-18 15:33:18 +03:00
georg@lmy002.wdf.sap.corp
912fef706a cs fixes 2005-07-16 09:19:23 +02:00
georg@lmy002.wdf.sap.corp
02599bdf27 minor fix for restoring the previous characterset in
test_client_character_set
2005-07-15 17:05:00 +02:00
georg@lmy002.wdf.sap.corp
8c4cd0427f Fix for bug #11037.
When all rows are fetched subsequent calls to mysql_stmt_fetch return
now MYSQL_NO_DATA instead of errorcode 1.
2005-07-15 14:30:47 +02:00
tomas@poseidon.ndb.mysql.com
b144b920a0 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-new
2005-07-15 14:14:59 +02:00
konstantin@mysql.com
1c142ee631 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-07-14 20:02:34 +04:00
konstantin@mysql.com
a1270b65db A fix and a test case for Bug#11183 "mysql_stmt_reset() doesn't reset
information about error".
2005-07-14 20:02:33 +04:00
konstantin@mysql.com
3f28ad8eb7 Merge mysql.com:/opt/local/work/mysql-4.1-root
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-07-14 20:02:32 +04:00
ramil@mysql.com
be233935cc fix for #11808 backported. 2005-07-14 20:19:27 +05:00
konstantin@mysql.com
509531421c Implement MarkM optimization request to avoid redundnat packet exchange
in cursors.
2005-07-14 15:27:24 +04:00
konstantin@mysql.com
62b8e6fdd1 A fix and a test case for Bug#9735.
No separate typecode for MEDIUMTEXT/LONGTEXT is added, as we
have no sound decision yet what typecodes and for what types are
sent by the server (aka what constitutes a distinct type in MySQL).
2005-07-14 15:13:23 +04:00
konstantin@mysql.com
e0b9e35484 Post-merge fixes. 2005-07-14 01:19:52 +04:00
ramil@mysql.com
6da9cf09c9 a fix (bug #11808: Test case 'mysql_client_test' fails in assert 'double_data == o_double_data') 2005-07-13 11:49:54 +05:00
reggie@linux.site
8a68788c39 Bug #7142 Show Fields from fails using Borland's dbExpress interface
The problem here is that columns that have an especially long type 
such as an enum type with many options would be longer than 40 chars
but the type column returned from show columns always was defined
as varchar(40).

This is fixed in 5.0 using info schema.
2005-07-12 08:35:30 -06:00
georg@lmy002.wdf.sap.corp
55d413252f changes after Bar's review: renamed CHARACTER_SET to MY_CHARSET_INFO 2005-07-12 10:58:21 +02:00
georg@lmy002.wdf.sap.corp
ceba4ee9cd New attempt after Bar's review
Added api function mysql_get_character_set_info which provides
information about the current client character set.
2005-07-12 10:31:43 +02:00
kent@mysql.com
8e3b393d5c Merge 2005-07-06 00:06:11 +02:00
kent@mysql.com
a7be42163a Makefile.am:
Added -I$(top_builddir)/include for searching
  generated header files, when builddir != srcdir
2005-07-05 23:24:48 +02:00
jimw@mysql.com
485f2c93c2 Merge mysql.com:/home/jimw/my/mysql-5.0-10214
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-05 09:47:20 -07:00
konstantin@mysql.com
d8fef65119 tests/mysql_client_test.c
Add a test case for Bug#11656 "Server crash with mysql_stmt_fetch 
    (cursors)", the bug itself is no longer present.
2005-07-01 17:11:39 +04:00
konstantin@mysql.com
0efa6f86be A fix and a test case for Bug#11172 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY date/datetime filter server crash".
The fix adds support for Item_change_list in cursors (proper rollback
of the modified item tree).
2005-07-01 15:47:45 +04:00
konstantin@mysql.com
f60ebc4815 A fix and a test case for Bug#10794 "mysql_stmt_attr_set no
open cursor after mysql_stmt_execute" + post-review fixes.
The bug was caused by wrong flags in stmt->server_status on the client
side: if there was no cursor, the server didn't send server_status
flags to the client, and the old flags were used to set up the
fetch function of a statement. Consequently, stmt_read_row_from_cursor was
used when there was no cursor. The fix fixes the server to always
send server flags to the client.
2005-06-30 16:17:10 +04:00
konstantin@mysql.com
8b0cee88f0 A fix and a test case for Bug#10736 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY select within select".
The bug was caused by the reset of thd->mem_root to thd->main_mem_root in 
Item_subselect::exec, which in turn triggered too early free_root() for
data which was needed on subsequent fetches from a cursor.
This reset also caused a memory leak in stored procedures, as 
subsequent executions of instructions containing a subselect
were allocating memory in thd->main_mem_root, which is not freed
until the end of the entire SP, instead of the per-call mem_root,
which is freed in the end of execution of the instruction.
2005-06-28 20:52:15 +04:00
jimw@mysql.com
3ccb90c085 Make status of NO_BACKSLASH_ESCAPES mode known to the client so
it can use it to switch to only quoting apostrophes by doubling
them when it is in effect. (Bug #10214)
2005-06-23 18:29:56 -07:00
konstantin@mysql.com
b875f7902d Fix a formatting bug and add a test for it. 2005-06-20 15:38:15 +04:00
konstantin@mysql.com
82f3120541 Rewrite the test for Bug#9992. 2005-06-19 17:31:20 +04:00
konstantin@mysql.com
021c2d45cb Fix the test for Bug#11111: coding style, a compiler warning, don't
use tabs.
2005-06-19 17:02:31 +04:00
konstantin@mysql.com
b3d977df10 Rename all prepared statements COM_ commands to prefix with COM_STMT_ 2005-06-17 23:26:25 +04:00
bell@sanja.is.com.ua
303dafc538 fix of BUG#11111 fix 2005-06-15 01:57:25 +03:00
evgen@moonbone.local
bff2fd8d7b Fix 11 "fetch from view returns wrong data"
Wrong method for creating temporary field was choosen, which results in
sending int field with int header but lonlong data.

Test case is added to mysql_client_test.c because client library is required
to test the bug.
2005-06-15 01:57:40 +04:00
svoj@mysql.com
685c844fc4 WL#2286 - Compile MySQL w/YASSL support
Fix for link failures on boxes with non-gnu compiler.
2005-06-12 18:18:46 +05:00
konstantin@mysql.com
95e620485c A fix and test case for Bug#10729 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY". The bug was that we (me) don't perform proper
cleanups of the prepared statement when done fetching from a cursor.
Another patch.
2005-06-09 18:17:45 +04:00
serg@serg.mylan
34df99ab82 more than 64 indexes per table. bugfixes. bug#10995 2005-06-01 18:33:16 +02:00
gluh@eagle.intranet.mysql.r18.ru
26e9e13c26 Fix for bug #9992: mysql_next_result hangs on error
set net->no_send_error to 0 before execution of each element of
    multiquery statement to provide the sending of error to client
2005-05-27 18:01:09 +05:00
monty@mysql.com
c1b512fad3 Change update_auto_increment to return 1 if get_auto_increment() returned ~(ulonglong)
This makes it easier to give an error in the handler if there was a problem generating an auto-increment value
2005-05-18 10:41:35 +03:00
konstantin@mysql.com
f1916b87d2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-9643
2005-05-16 18:29:04 +04:00
konstantin@mysql.com
38d68559bf A fix and a test case for Bug#9643 " CURSOR_TYPE_SCROLLABLE dos not work"
- check on the client the unsupported feature and return 
an error message if it's been requested.
Additionally added API support for STMT_ATTR_PREFETCH_ROWS.
Post-review fixes.
2005-05-16 18:27:21 +04:00
monty@mysql.com
7d70579917 Fixed failing tests for not 32 bit intel machines
Fixed bug in mysql_stmt_fetch() when retrieving rows to return
2005-05-16 13:34:23 +03:00