Commit graph

307 commits

Author SHA1 Message Date
konstantin@mysql.com
420c956d27 Intermediate commit of client library (cleanups + fixes of 3 items from
flaws list)
TODO: 
 * verify that no sequence of API calls produces SIGSEGV.
 That is, verify that mysql_stmt_init  -> mysql_stmt_fetch is OK,
 or mysql_stmt_prepare -> mysql_stmt_fetch_column is OK and sets
 meaningful error.
 * remove alloc_stmt_fields call
 * revise stmt->state codes and statement states.
 * there are other items in prepared statements 'to fix' document.

Done:
 - cleanups and comments
 - revision of prepared statement error codes.
 - mysql_stmt_prepare is now can always be called (that is, you can reprepare
   a statement)
 - new implementation of mysql_stmt_close and fetch cancellation
2004-03-16 01:04:04 +03:00
konstantin@oak.local
a1834919a9 Rudimentary part of libmysql patch:
set_mysql_error is deployed
2004-03-12 15:21:48 +03:00
konstantin@oak.local
082a01d1e0 Rename:
read_statistic -> read_statistics
(statistic is adjective)
2004-03-10 20:12:24 +03:00
konstantin@mysql.com
1d624d3546 Fix for C++ style declaration 2004-03-05 19:04:59 +03:00
konstantin@mysql.com
7753c6b93e New call mysql_stmt_init() introduced.
Renames:
mysql_bind_param      -> mysql_stmt_bind_param
mysql_bind_result     -> mysql_stmt_bind_result
mysql_execute         -> mysql_stmt_execute
mysql_fetch           -> mysql_stmt_fetch
mysql_fetch_column    -> mysql_stmt_fetch_column
mysql_get_metadata    -> mysql_stmt_result_metadata
mysql_param_count     -> mysql_stmt_param_count
mysql_param_result    -> mysql_stmt_param_metadata
mysql_prepare         -> mysql_stmt_prepare
mysql_send_long_data  -> mysql_stmt_send_long_data

client_test.c cleaned up from memory leaks
2004-03-05 16:55:09 +03:00
monty@mashka.mysql.fi
1ae05760ac Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
2004-02-22 11:01:28 +02:00
monty@mashka.mysql.fi
494e43c1f5 merge with 4.0 to get security fixes and latest bug fixes 2004-02-20 17:43:02 +02:00
hf@deer.(none)
e01ea15029 Fix for #1429 (Segfault in mysql_stmt_close)
Problem was that we checked for existing connection in stmt_close
and did not free(stmt) if it's closed (that didn't work well with
embedded)
I just added new flag to the stmt_close and now we check it instead
of connection
2004-02-20 12:18:06 +04:00
monty@mysql.com
e1fee022fa Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0
2004-02-19 22:04:46 +02:00
monty@mysql.com
14dc56b2a1 Fixed usage of strxnmov() in recent changesets 2004-02-19 22:04:31 +02:00
greg@mysql.com
25872043b5 Merge gweir@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/bk/mysql-4.0
2004-02-19 14:56:31 -01:00
serg@serg.mylan
7a03cf04af potential problem fixed afer some reasoning 2004-02-19 09:11:46 +01:00
monty@mysql.com
e9315f984d Changed wellformedlen to well_formed_len
Fixed that blobs >16M can be inserted/updated
Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE
2004-02-17 01:35:17 +02:00
hf@deer.(none)
e100530b3e Fix for #2212 (mysql_change_user doesn't work in embedded library)
now it's working
2004-02-14 20:26:21 +04:00
konstantin@mysql.com
b865fb1cf3 manual merge, bug #2247 2004-02-13 00:50:03 +03:00
dlenev@mysql.com
8e6a2e98ae Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg2248
2004-02-11 16:09:33 +03:00
hf@deer.(none)
f347208ac9 Addition to the fix for #2208
Made code shorter and more correct
2004-02-11 16:35:56 +04:00
dlenev@dlenev.mshome
8ec663ef5b Fixed bug #2248 "mysql_fetch without prior mysql_execute hangs"
Done clean-up in prep stmt API functions:
1) Removed some checks that were performed only in debug version
were making debug version more tolerable to user errors than 
production (and thus caused problems for example masking some
bugs). 
2) Also removed some other checks to make prep stmt API 
consistent with the rest of C API (this also in line with 
general politics - make checks in only those places where 
errors are very common and hard to spot).
2004-02-10 16:58:20 +03:00
hf@deer.(none)
348bd98e48 Fix for #2208 (multi-query returns wrong result in embedded library)
now we execute only one first select during mysql_real_query
others - during 'mysql_next_result'
2004-02-10 17:09:59 +04:00
konstantin@oak.local
69d00bdb88 Fix for bug #2247: "mysql_stmt_affected_rows returns affected rows from
last command"
2004-02-06 16:03:09 +03:00
greg@mysql.com
e845a6685c Revise Windows build script, correct comment re NetWare in libmysql.c 2004-01-21 16:06:26 -01:00
paul@teton.kitebird.com
d1517d4997 Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into teton.kitebird.com:/home/paul/mysql-4.1
2003-12-23 09:47:02 -06:00
hf@deer.(none)
a735a51402 Fix for #2181 (mysql_execute crashed instead of returning error on embedded
server)
We didn't perform the check for the error for embedded server
2003-12-23 18:24:33 +04:00
paul@teton.kitebird.com
4050a2f58a Minor comment edits. 2003-12-22 13:08:16 -06:00
monty@mysql.com
eeff10e4c1 merge 2003-12-19 16:34:48 +02:00
hf@deer.(none)
de470e6f83 Fix for #2126
additional changes (after discussion with Monty)
2003-12-18 18:12:00 +04:00
hf@deer.(none)
42799cc584 Fix for #2126 (mysql_server_init call shouldn't be needed)
now mysql_server_init is called from mysql_init with fake parameters
mysql_once_init code included to mysql_server_init.
embedded-specific initialization is in init_embedded_server function
2003-12-18 15:51:22 +04:00
monty@mysql.com
e0cc6799ec Merge with 4.0.17 2003-12-17 17:35:34 +02:00
monty@mysql.com
7e92336b1d Fixed a possible memory leak on MacOSX when using the shared libmysql.so library (Bug #2061)
mysql_server_init() now returns error code if something went wrong (Bug #2062)
Don't use my_fopen() when reading symlink information as this may cause problems when a lot of files are opened.
Free thread keys with pthread_key_delete() instead of relying on automatic free. (Bug #2062)
Fixed bug in UNION statement with alias '*'. (Bug #1249)
Fixed a bug in DELETE ... ORDER BY ... LIMIT where the rows where not deleted in the proper order. (Bug #1024).
FOUND_ROWS() could return incorrect number of rows after a query with an impossible WHERE condition.
HOW DATABASES doesn't anymore show .sym files (on windows) that doesn't point to a valid directory. (Bug #1385)
2003-12-11 06:24:08 +02:00
serg@serg.mylan
eaa0c4494f code cleanup after some reasoning 2003-12-09 20:49:48 +01:00
monty@mysql.com
a7610584d6 Merge mysql.com:/my/mysql-4.0 into mysql.com:/my/mysql-4.1 2003-11-28 20:44:26 +02:00
monty@mysql.com
cad6b7c8be rpl_parse and rpl_probe don't have to be reset as they are already 0 2003-11-28 20:41:33 +02:00
serg@serg.mylan
d2e065022f "optimization cleanup" reverted - problems on rpl_redirect test.
It happens that mysql->client_next->client_next=mysql
and mysql_close() goes into infinite loop.
Results vary from simple sigsegv (FreeBSD), to hard system lockup (Linux)
:)
2003-11-28 18:15:58 +01:00
monty@mysql.com
5914033478 merge with 4.0 to get fix for range bug 2003-11-28 15:55:43 +02:00
konstantin@mysql.com
3b9eb09276 no need to zero-initialize mysql->master->{rpl_pivot, options.rpl_parse,
options.rpl_probe} as they are zero-initialized in spawn_init()
2003-11-28 01:57:05 +03:00
konstantin@mysql.com
48ef39ee65 cleanup:
no need to set rpl_parse, rpl_probe and rpl_pivot to zero as whole mysql
structure is bzeroed in mysql_init(0) few lines before
2003-11-28 01:54:34 +03:00
monty@mysql.com
d87494c5ac Don't flush cur_log (relay log) on flush_relay_log_info becasue this crashes the server if cur_log is 'hot' and the io_thread has changed log file.
Updated project files for windows
Made rpl_change_master.test portable
Ensure that mutex are not freed if not initilized
2003-11-22 03:21:40 +02:00
monty@mysql.com
7c6113a39f Merge key cache structures to one
Fixed compiler warnings (IRIX C compiler and VC++)
2003-11-20 22:06:25 +02:00
monty@mashka.mysql.fi
ac76198330 Portability fixes for AIX43 2003-11-20 02:48:09 +02:00
monty@mashka.mysql.fi
0bd17351ca Changed mysql_next_result() to return int instead of bool
Changed ~Item_func_in() to call cleanup() (to fix memory leak)
Fixed test_multi_statements() test in client_test
2003-11-19 17:31:57 +02:00
monty@mashka.mysql.fi
cab1dc628c CLIENT_MULTI_QUERIES -> CLIENT_MULTI_STATEMENTS
New multi-key-cache handling. This was needed becasue the old one didn't work reliable with MERGE tables.
ALTER TABLE table_name ... CHARACTER SET  ... now changes all char/varchar/text columns to the given character set
(One must use ALTER TABLE ... DEFAULT CHARACTER SET ... to change the default character set)
Fixed that have_compress is detected properly (fixes problems with func_compress.test on platforms without zlib)
New syntax for CACHE INDEX ('keys' is optional if no index name is given and one mentions the key cache name only ones)
Removed compiler warnings
Added mysql_set_server_option() to allow clients like PHP to easaily set/reset the multi-statement flag.
2003-11-18 13:47:27 +02:00
guilhem@mysql.com
c1f7f33960 4 small items in this:
- when we don't have in_addr_t, use uint32.
- a forgotten initialization of slave_proxy_id in sql/log_event.cc (was not really "forgot", was
"we needn't init it there", but there was one case where we needed...).
- made slave_proxy_id always meaningful in THD and Log_event, so we can
rely more on it (no need to test if it's meaningful). THD::slave_proxy_id
is equal to THD::thread_id except for the slave SQL thread.
- clean up the slave's temporary table (i.e. free their memory) when slave
server shuts down.
2003-10-31 23:20:23 +01:00
monty@mashka.mysql.fi
e87c9f5ff8 merge with 4.0 2003-10-16 03:08:40 +03:00
monty@mashka.mysql.fi
9ef2a83fbe Portability fixes for windows
After merge fixes
2003-10-15 22:40:36 +03:00
monty@mashka.mysql.fi
84d9d98078 Better fix for CREATE TABLE IF NOT EXISTS ... SELECT
Fixed chsize() problem on windows
Extend default timeout on windows clients to 1 year (to avoid timeout problems)
2003-10-15 21:41:13 +03:00
monty@narttu.mysql.fi
6056cfadfc Merge with 4.0.16 2003-10-07 15:42:26 +03:00
hf@deer.(none)
8bc13b1874 Fix for bugs #1437, #1446 2003-10-04 19:28:08 +05:00
lenz@kallisto.local
5ce5a68b4e - Code cleanup: replaced C++-style comments with the proper syntax for
.c files (the IBM Visual Age C compiler aborts with a syntax error
   on these)
2003-09-24 08:35:02 +02:00
monty@narttu.mysql.fi
f05a1c8394 Block SIGPIPE also for not threaded client programs.
Added --include and --libs_r options to mysql_config.
Added mysql_get_client_version() to client library
Fixed some minor benchmark issues
2003-09-23 13:36:01 +03:00
hf@deer.(none)
cda32e123c SCRUM
prepared statements in embedded library.
some fixes after testing
2003-09-19 14:05:28 +05:00