summaryrefslogtreecommitdiff
path: root/sql-common/client.c
Commit message (Collapse)AuthorAgeFilesLines
* fixed warnings and compile errors from the fix for bug 26243gkodinov/kgeorge@macbook.gmz2008-03-291-1/+1
|
* Merge quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0anozdrin/alik@quad.opbmk2008-03-181-3/+7
|\ | | | | | | into quad.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt-merged
| * Bug#35103 mysql_client_test::test_bug29948 causes sporadic failuresdavi@mysql.com/endora.local2008-03-141-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the COM_STMT_SEND_LONG_DATA was sending a response packet if the prepared statement wasn't found in the server (due to reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE should not send any packets, even error packets should not be sent since they are not expected by the client API. The solution is to clear generated during the execution of the aforementioned commands and to skip resend of prepared statement commands. Another fix is that if the connection breaks during the send of prepared statement command, the command is not sent again since the prepared statement is no longer in the server.
* | Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.holyfoot/hf@mysql.com/hfmain.(none)2008-02-271-6/+21
|/ | | | | | | There was no way to return an error from the client library if no MYSQL connections was established. So here i added variables to store that king of errors and made functions like mysql_error(NULL) to return these.
* Bug#32429 ssl_cipher setting in my.cnf not read by libmysqlclientmsvensson@pilot.mysql.com2007-11-161-0/+5
|
* Merge mysql.com:/home/hf/work/29494/my41-29494holyfoot/hf@hfmain.(none)2007-07-221-7/+7
|\ | | | | | | into mysql.com:/home/hf/work/29494/my50-29494
| * Bug #29494 Field packet with NULL fields crashes libmysqlclient.holyfoot/hf@mysql.com/hfmain.(none)2007-07-201-7/+7
| | | | | | | | | | | | | | unpack_fields() didn't expect NULL_LENGHT in the field's descriptions. In this case we get NULL in the resulting string so cannot use strdup_root to make a copy of it. strdup_root changed with strmake_root as it's NULL-safe
* | Merge bk@192.168.21.1:mysql-5.0-optholyfoot/hf@hfmain.(none)2007-06-291-0/+1
|\ \ | | | | | | | | | into mysql.com:/home/hf/work/29247/my50-29247
| * | Bug #29247 Double free in libmysqlclient_r when mysql restarted.holyfoot/hf@mysql.com/hfmain.(none)2007-06-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one sets MYSQL_READ_DEFAULTS_FILE and MYSQL_READ_DEFAULT_GROUP options after mysql_real_connect() called with that MYSQL instance, these options will affect next mysql_reconnect then. As we use a copy of the original MYSQL object inside mysql_reconnect, and mysql_real_connect frees options.my_cnf_file and _group strings, we will free these twice when we execute mysql_reconnect with the same MYSQL for the second time. I don't think we should ever read defaults files handling mysql_reconnect. So i just set them to 0 for the temporary MYSQL object there/
* | | Bug#24924: shared-memory-base-name that is too long causes buffer overflowtnurnberg@sin.intern.azundris.com2007-06-211-1/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | long shared-memory-base-names could overflow a static internal buffer and thus crash mysqld and various clients. change both to dynamic buffers, show everything but overflowing those buffers still works. The test case for this would pretty much amount to mysqld --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --shared-memory=1 & mysqladmin --no-defaults --shared-memory-base-name=HeyMrBaseNameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX shutdown Unfortunately, we can't just use an .opt file for the server. The .opt file is used at start-up, before any include in the actual test can tell mysqltest to skip this one on non-Windows. As a result, such a test would break on unices. Fixing mysql-test-run.pl to export full path for master and slave would enable us to start a server from within the test which is ugly and, what's more, doesn't work as the server blocks (mysqltest offers no fire-and-forget fork-and-exec), and mysqladmin never gets run. Making the test rpl_windows_shm or some such so we can is beyond ugly. As is introducing another file-name based special case (run "win*.test" only when on Windows). As is (yuck) coding half the test into mtr (as in, having it hand out a customized environment conductive to the shm- thing on Win only). Situation is exacerbated by the fact that .sh is not necessary run as expected on Win. In short, it's just not worth it. No test-case until we have a new-and-improved test framework.
* | Bug #24731 Shared memory connections do not work with MySql ran as service ↵"Reggie"/Reggie@xp.2007-06-071-3/+3
| | | | | | | | | | | | on Vista The events were not being opened in the global namespace.
* | Bug#26664 test suite times out on OS X 64bitmsvensson@pilot.blaudden2007-05-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | - The "mysql client in mysqld"(which is used by replication and federated) should use alarms instead of setting socket timeout value if the rest of the server uses alarm. By always calling 'my_net_set_write_timeout' or 'my_net_set_read_timeout' when changing the timeout value(s), the selection whether to use alarms or timeouts will be handled by ifdef's in those two functions. - Move declaration of 'vio_timeout' into "vio_priv.h"
* | Bug#24121 Incorrect test for SSL_VERIFY_SERVER_CERTmsvensson@pilot.blaudden2007-03-271-1/+1
| | | | | | | | | | | | | | | | - Interpret the pointer passed to 'mysql_options' for MYSQL_OPT_SSL_VERIFY_SERVER_CERT as a my_bool - In 5.1 the mysql_options signature will be chanegd to take a 'void*' in order to further emphasize the need for a pointer to correct type
* | Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2007-02-211-2/+2
|\ \ | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| * \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2007-01-221-2/+2
| |\ \ | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| | * | Fixed compiler warnings detected by option -Wshadow and -Wunused:monty@mysql.com/narttu.mysql.fi2006-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed not used variables and functions - Added #ifdef around code that is not used - Renamed variables and functions to avoid conflicts - Removed some not used arguments Fixed some class/struct warnings in ndb Added define IS_LONGDATA() to simplify code in libmysql.c I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
* | | | Merge pilot.mysql.com:/home/msvensson/mysql/bug22943/my41-bug22943msvensson@pilot.mysql.com2007-01-291-1/+7
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| into pilot.mysql.com:/home/msvensson/mysql/bug22943/my50-bug22943
| * | Bug#22943 syscall pruning in libmysqlmsvensson@pilot.mysql.com2007-01-291-1/+7
| | | | | | | | | | | | - Set the timeout values only where needed
* | | Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
| |/ |/| | | | | Changed header to GPL version 2 only
* | Fixed portability issue in my_thr_init.c (was added in my last push)monty@mysql.com/narttu.mysql.fi2006-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | Fixed compiler warnings (detected by VC++): - Removed not used variables - Added casts - Fixed wrong assignments to bool - Fixed wrong calls with bool arguments - Added missing argument to store(longlong), which caused wrong store method to be called.
* | Merge bk-internal:/home/bk/mysql-5.0gkodinov@dl145s.mysql.com2006-11-271-11/+75
|\ \ | | | | | | | | | into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt
| * | Added some missing DBUG_RETURNmonty@mysql.com/nosik.monty.fi2006-11-231-6/+70
| | | | | | | | | | | | | | | Fixed that --valgrind works again with mysql-test-run.sh Extended error messages when loosing connection during mysql_real_connect()
| * | Remove compiler warningsmonty@mysql.com/nosik.monty.fi2006-11-201-5/+5
| | | | | | | | | | | | | | | | | | | | | (Mostly in DBUG_PRINT() and unused arguments) Fixed bug in query cache when used with traceing (--with-debug) Fixed memory leak in mysqldump Removed warnings from mysqltest scripts (replaced -- with #)
* | | Merge mysql.com:/home/hf/work/mysql-4.1-mrgholyfoot/hf@mysql.com/deer.(none)2006-11-161-0/+2
|\ \ \ | |/ / |/| / | |/ into mysql.com:/home/hf/work/mysql-5.0-mrg
| * Merge bk@192.168.21.1:mysql-4.1holyfoot/hf@mysql.com/deer.(none)2006-11-161-0/+2
| |\ | | | | | | | | | into mysql.com:/home/hf/work/mysql-4.1-mrg
| | * Bug #19216: Client crashes on long SELECTgkodinov/kgeorge@macbook.gmz2006-11-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The server sends a number of columns to the client. It uses a limited "fast" function for that instead of the general one. This fast function cannot send numbers larger than 2 bytes. This causes the client to expect smaller number of columns. The client writes outside of the allocated memory buffer as a result. Fixed the server to use the general function to send column count. Fixed the client to check the column count before writing column data.
* | | Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maintmsvensson@shellback.(none)2006-10-121-0/+2
|\ \ \ | |/ / | | | | | | into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
| * | Add DBUG_ASSERT to check that mysql is not null when mysql_reconnect is calledmsvensson@shellback.(none)2006-10-121-0/+2
| |/ | | | | | | Add DBUG_PRINT to show the value of mysql->reconnect
* | Merge mysql.com:/home/gluh/MySQL/Merge/4.1gluh@mysql.com/gluh.(none)2006-09-271-3/+3
|\ \ | |/ | | | | into mysql.com:/home/gluh/MySQL/Merge/5.0
| * Patch for bug#21432 is revertedgluh@mysql.com/gluh.(none)2006-09-271-3/+3
| |
* | Merge mysql.com:/home/gluh/MySQL/Merge/4.1-mergegluh@mysql.com/gluh.(none)2006-09-071-3/+3
|\ \ | |/ | | | | into mysql.com:/home/gluh/MySQL/Merge/5.0
| * Bug#20393 User name truncation in mysql clientgluh@mysql.com/gluh.(none)2006-08-301-3/+3
| | | | | | | | Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
| * Bug#7192 Specify --with-collation doesn't work for connections?bar@mysql.com/bar.intranet.mysql.r18.ru2006-08-111-2/+31
| | | | | | | | | | | | | | --with-collation worked only on the server side. Client side ignored this argument, so collation_connection was not properly set (remained latin1_swedish_ci).
* | Merge ↵cmiller@zippy.cornsilk.net2006-08-251-3/+5
|\ \ | | | | | | | | | | | | | | | zippy.cornsilk.net:/home/cmiller/work/mysql/release/mysql-5.0-release_mergable into zippy.cornsilk.net:/home/cmiller/work/mysql/release/mysql-5.0-maint
| * | Bug#21543: 5.0.24 breaks ABI compatibility for python bindings: \cmiller@zippy.cornsilk.net2006-08-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InterfaceError on connect Removed the bool flag from the st_mysql_options struct, since it adds another word in size to the memory size and shifts member memory locations down, both of which break binary-interface compatibility. Instead, use a flag, 2**30, in the client_options bit-field to represent that the client should check the SSL certificate of the server.
* | | Merge bk-internal.mysql.com:/home/bk/mysql-5.0kostja@bodhi.local2006-08-021-29/+40
|\ \ \ | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
| * | | A fix and a test case for Bug#15752 "Lost connection to MySQL server kostja@bodhi.local2006-07-241-29/+40
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge mysql.com:/home/hf/work/mysql-4.1.mrgholyfoot/hf@mysql.com/deer.(none)2006-07-181-1/+2
|\ \ \ | | |/ | |/| | | | into mysql.com:/home/hf/work/mysql-5.0.mrg
| * | Merge bk@192.168.21.1:mysql-4.1holyfoot/hf@mysql.com/deer.(none)2006-07-131-1/+2
| |\ \ | | | | | | | | | | | | into mysql.com:/home/hf/work/mysql-4.1.16017
| | * | bug #16017 (memory leaks in embedded server)holyfoot@deer.(none)2006-06-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There actually was 3 different problems - hash_user_connections wasn't cleaned one strdupped database name wasn't freed and stmt->mem_root wasn't cleaned as it was replased with mysql->field_alloc for result For the last one - i made the library using stmt's fields to store result if it's the case.
* | | | Merge mysql.com:/usr/home/bar/mysql-4.1.b7192bar@mysql.com2006-07-071-2/+31
|\ \ \ \ | |_|_|/ |/| | | | | | | into mysql.com:/usr/home/bar/mysql-5.0-kt
| * | | Bug#7192 Specify --with-collation doesn't work for connections?bar@mysql.com2006-06-301-2/+31
| |/ / | | | | | | | | | | | | | | | --with-collation worked only on the server side. Client side ignored this argument, so collation_connection was not properly set (remained latin1_swedish_ci).
* | | client.c:kent@mysql.com2006-07-031-0/+7
| | | | | | | | | | | | Define 'mysql_get_ssl_cipher' even if no SSL built in, it is referenced in libmysql.def
* | | mergingholyfoot@mysql.com2006-06-261-37/+49
|\ \ \ | |/ /
| * | bug #20318 (ctype_ucs2_def test fails with embedded)holyfoot@deer.(none)2006-06-191-36/+48
| |/ | | | | | | | | | | | | | | | | | | | | | | there was two problems about charsets in embedded server 1. mysys/charset.c - defined there default_charset_info variable is modified by both server and client code (particularly when --default-charset option is handled) In embedded server we get two codelines modifying one variable. I created separate default_client_charset_info for client code 2. mysql->charset and mysql->options.charset initialization isn't properly done for embedded server - necessary calls added
* | Remove C++ commentsmsvensson@neptunus.(none)2006-05-031-5/+5
| | | | | | | | Formatting
* | Merge neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208msvensson@neptunus.(none)2006-04-261-19/+107
|\ \ | | | | | | | | | into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
| * | Bug#17208 SSL: client does not verify server certificatemsvensson@neptunus.(none)2006-04-181-2/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add new function 'ssl_verify_server_cert' which is used if we are connecting to the server with SSL. It will compare the hostname in the server's cert against the hostname that we used when connecting to the server. Will reject the connection if hostname does not match. - Add new option "OPT_SSL_VERIFY_SERVER_CERT" to be passed to mysql_options which will turn on checking of servers cert. - Add new argument "ssl-verify-server-cert" to all mysql* clients which will activate the above option. - Generate a new server cert with 1024 bits that has "localhost" as the server name.
| * | Fix up patchmsvensson@neptunus.(none)2006-04-121-67/+1
| | |
| * | Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0msvensson@neptunus.(none)2006-04-121-17/+89
| |\ \ | | | | | | | | | | | | into neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208