MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
  • MariaDB\ 71.8%
  • C++ 16.4%
  • C 10.4%
  • Shell 0.5%
  • Perl 0.4%
  • Other 0.3%
Find a file
unknown 36510232aa 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.


client/mysqlbinlog.cc:
  net_safe_read -> cli_safe_read
include/mysql.h:
  Remove a private function from the public header.
include/mysql_com.h:
  Remove a define that is never used.
include/sql_common.h:
  Add a declaration for cli_safe_read - a function that reads one packet
  from the server.
libmysql/libmysql.c:
  net_safe_read -> cli_safe_read
  Return CR_COMMANDS_OUT_OF_SYNC on attempt to execute a statement
  using a connection which has pending result sets.
sql-common/client.c:
  Actual fix for Bug#15752: if the server has pending result sets for
  the client, return CR_COMMANDS_OUT_OF_SYNC on attempt to execute
  another query. Similarly to the behaviour of mysql_use_result(),
  multiple result sets block the connection and must be fetched
  before it can be used for another query.
  This uncovered an error in the protocol: the server doesn't drop
  SERVER_MORE_RESULTS_EXISTS status flag upon an error, so in case of
  a multi-query like SELECT 1; SELECT syntax_error; SELECT 2; 
  the client has no way to know that the server won't ever come to 
  execution of the third query and won't return any result sets for it.
  For now, fix it in cli_safe_read, as a proper fix requires extension
  of the client-server protocol.
sql/protocol.cc:
  Remove a name that is never used.
sql/slave.cc:
  net_safe_read -> cli_safe_read
tests/mysql_client_test.c:
  Make 'query' a local variable to avoid name clash.
  Add a test case for Bug#15752 "Lost connection to MySQL server when
  calling an SP from C API"
2006-07-24 14:56:53 +04:00
bdb BUG#15734: Fix undefined awk behaviour breaking compilation on Debian. 2005-12-14 13:09:37 +01:00
BitKeeper pekka - checkout:get (4.1) 2006-07-04 13:51:35 +02:00
BUILD Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-new 2006-06-17 15:42:24 +02:00
client A fix and a test case for Bug#15752 "Lost connection to MySQL server 2006-07-24 14:56:53 +04:00
cmd-line-utils Merge neptunus.(none):/home/msvensson/mysql/bug16557/my50-bug16557 2006-02-21 08:58:19 +01:00
config/ac-macros Merge xiphis.org:/home/antony/work2/p4-bug12096.2 2006-06-28 09:54:40 -07:00
dbug Fix two Valgrind memory leak warnings. 2006-05-15 18:07:18 +02:00
Docs Merge mysql.com:/home/tomash/src/mysql_ab/tmp_merge 2006-05-06 11:18:42 +04:00
extra Bug#19191 Repeated crashes on OpenBSD for ssl test cases 2006-06-14 21:30:49 +02:00
heap Merge mysql.com:/home/my/mysql-4.1 2006-06-30 19:15:18 +03:00
include A fix and a test case for Bug#15752 "Lost connection to MySQL server 2006-07-24 14:56:53 +04:00
innobase Applied innodb-5.0-ss609 snapshot. 2006-06-06 23:37:42 +04:00
libmysql A fix and a test case for Bug#15752 "Lost connection to MySQL server 2006-07-24 14:56:53 +04:00
libmysql_r Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
libmysqld Merge bodhi.local:/opt/local/work/tmp_merge 2006-07-08 02:30:07 +04:00
man - Removed obsolete and outdated man page files from the man 2005-10-27 14:51:58 +02:00
myisam Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2006-07-08 21:45:02 +04:00
myisammrg BUG#17314: Can't use index_merge/intersection for MERGE tables 2006-02-11 21:51:43 +03:00
mysql-test Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0 2006-07-22 00:08:45 +04:00
mysys Merge mysql.com:/home/my/mysql-4.1 2006-06-30 02:35:52 +03:00
ndb Merge dl145k.mysql.com:/data0/mkindahl/bkroot/mysql-5.0-rpl 2006-07-11 11:15:22 +02:00
netware mwldnlm, mwccnlm, mwasmnlm: 2006-07-03 16:44:17 +02:00
os2 Merge 2005-09-29 03:20:31 +02:00
pstack Makefile.am, configure.in: 2005-09-24 15:51:45 +02:00
regex Bug#19407 Test 'func_regexp' fails on Windows x64 2006-06-19 22:19:05 -04:00
scripts Merge mysql.com:/home/mydev/mysql-4.1-bug14400 2006-07-05 11:20:10 +02:00
server-tools mysql.spec.sh: 2006-06-30 02:49:28 +02:00
sql A fix and a test case for Bug#15752 "Lost connection to MySQL server 2006-07-24 14:56:53 +04:00
sql-bench Set thread_stack after return from end_thread() 2005-12-03 18:13:06 +02:00
sql-common A fix and a test case for Bug#15752 "Lost connection to MySQL server 2006-07-24 14:56:53 +04:00
SSL Remove client-req-pem and server-req.pem 2006-05-03 11:53:16 +02:00
strings Fix Windows build problem following previous push. 2006-06-30 11:10:38 +02:00
support-files support-files/mysql.spec.sh : Fix a typing error. 2006-07-10 12:03:44 +02:00
tests A fix and a test case for Bug#15752 "Lost connection to MySQL server 2006-07-24 14:56:53 +04:00
tools Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
VC++Files Add sql_locale.cpp to our windows build scripts. 2006-07-10 14:30:17 +04:00
vio Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init 2006-05-31 16:19:06 +02:00
zlib Changes after initial patch to #15787 2006-01-23 21:35:11 +03:00
.bzrignore Merge bodhi.local:/opt/local/work/tmp_merge 2006-07-08 02:30:07 +04:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
configure.in Raise the version number. 2006-07-11 12:34:43 +02:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
Makefile.am Merge 2005-11-04 02:17:11 +01:00
README README: 2006-04-01 04:13:33 +02:00

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file.
- For commercial distributions, see the MySQLEULA.txt file.


For further information about MySQL or additional documentation, see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installation chapter.
- For future plans, see the TODO appendix.
- For the new features/bugfix history, see the News appendix.
- For the currently known bugs/misfeatures (known errors) see the problems
  appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.