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.
tests/mysql_client_test.c:
Test case for bug#11111 "fetch from view returns wrong data"
sql/sql_select.cc:
Fix bug #11111 "fetch from view returns wrong data"
sql/item.h:
Fix bug #11111 "fetch from view returns wrong data"
Fix for link failures on boxes with non-gnu compiler.
client/Makefile.am:
Add a dummy C++ file to client suite to make libtool use a C++ linker:
this lets client suite link when using yaSSL and a non-gcc C++ compiler.
config/ac-macros/yassl.m4:
HAVE_YASSL conditional is used to add dummy C++ file if configured with yaSSL.
tests/Makefile.am:
Add a dummy C++ file to tests to make libtool use a C++ linker:
this lets tests link when using yaSSL and a non-gcc C++ compiler.
vio/Makefile.am:
Use dummy C++ file if configured with yaSSL only.
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.
sql/mysql_priv.h:
Rename reset_stmt_for_execute to init_stmt_before_use (to correspond to
cleanup_stmt_and_thd_after_use).
sql/sp_head.cc:
Rename.
sql/sql_prepare.cc:
Move common cleanup code to a cleanup function, call it when we close
a cursor.
sql/sql_select.cc:
Cleanup.
sql/sql_select.h:
No need for init_thd, this code has been inlined in Cursor::open.
tests/mysql_client_test.c:
Add a test case for Bug#10729 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY"
(problem reusing a prepared statemnt if there was a cursor)
set net->no_send_error to 0 before execution of each element of
multiquery statement to provide the sending of error to client
tests/mysql_client_test.c:
Fix for bug #9992: mysql_next_result hangs on error
test case
This makes it easier to give an error in the handler if there was a problem generating an auto-increment value
mysys/thr_alarm.c:
Remove warning from valgrind
sql/item_strfunc.cc:
Fixed indentation
tests/mysql_client_test.c:
Removed compiler warning
- 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.
include/errmsg.h:
Add a new error code for "Not implemented" client-side error message.
include/mysql.h:
Add a statement attribute STMT_ATTR_PREFETCH_ROWS - unsigned long
number of rows to fetch per one COM_FETCH command, used when there
is a read-only cursor.
Note, that we don't break compatibility by adding this new member
because MYSQL_STMT is always allocated inside the client library by
mysql_stmt_init.
libmysql/errmsg.c:
Text for the error message CR_NOT_IMPLEMENTED
libmysql/libmysql.c:
Implement support for STMT_ATTR_PREFETCH_ROWS
Return an error message on attempt to set an attribute of a prepared
statement which is not implemented yet. We probably should be doing
it in the server: currently the server just ignores unknown attributes.
tests/mysql_client_test.c:
A test case for Bug#9643 "CURSOR_TYPE_SCROLLABLE dos not work"
- check that an error message is returned for CURSOR_TYPE_SCROLLABLE.
Additionally, check setting of STMT_ATTR_PREFETCH_ROWS.
Fixed bug in mysql_stmt_fetch() when retrieving rows to return
mysql-test/r/ps.result:
Fix to not get warnings if mysql_client_test.test fails
mysql-test/t/index_merge_ror.test:
Proper fix for 64 bit intel (which gives uses another, equal good index)
mysql-test/t/ps.test:
Fix to not get warnings if mysql_client_test.test fails
sql-common/client.c:
More debugging
sql/sql_prepare.cc:
Fixed bug in mysql_stmt_fetch() when retrieving rows to return
sql/sql_select.cc:
More debugging
tests/mysql_client_test.c:
More debugging
(crash on attempt to re-execute a statement with an open cursor) +
post-review fixes.
include/errmsg.h:
Add a special error message when we attempt to mysql_stmt_fetch
from a statement which has no result set.
libmysql/errmsg.c:
Error message text for CR_NO_RESULT_SET
libmysql/libmysql.c:
Move the code which frees result sets on client and closes the cursor
on server, resets long data state on client and server.
This makes one function out of two (mysql_stmt_reset and
mysql_stmt_free_result), thus aggregating all related reset work
in one place.
sql-common/client.c:
Fix one place where we flushed the pending result set of a statement,
but didn't set unbuffered_fetch_cancelled flag.
sql/share/errmsg.txt:
Fix format of ER_UNKNOWN_STMT_HANDLER error message (needs to
be fixed separately in 4.1). Add two new error messages
for the case when we fetch from when there is no cursor
and for the case when we attempt to execute a statement while there is
a cursor.
sql/sql_prepare.cc:
Return error when we fetch while there is no open cursor and
when we call execute while there is a pending cursor.
Fix mysql_stmt_reset to close the open cursor if there is any.
sql/sql_select.cc:
free_items and free_root moved to Cursor::close().
sql/sql_select.h:
A comment added.
tests/mysql_client_test.c:
A test case for Bug#9478, test the case of mysql_stmt_reset
called for client-side cached result set and for the case with open cursor.
All strcpy replaced with strmov (review request).
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
mysql-test/r/drop.result:
Auto merged
mysys/default.c:
Auto merged
mysys/mf_keycache.c:
Auto merged
sql/field.h:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysqld.cc:
Auto merged
BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
Auto merged
mysql-test/r/cast.result:
Merge
mysql-test/t/cast.test:
Merge
sql/sql_insert.cc:
Merge
sql/sql_select.cc:
Merge
with cursor". The patch refactors do_select/sub_select
functions, which implement the nested loop algorithm, and reuses them to
fetch rows for cursors as well.
Pushing with view.test failing (--ps-protocol).
sql/sql_prepare.cc:
Cursor::fetch() now returns void
sql/sql_select.cc:
A fix for Bug#9520 "SELECT DISTINCT crashes server with cursor":
* rename sub_select returns codes to be able to track down what's going
on in which case.
* move record processing and outer join record processing to a separate
function, out of sub_select read-record loop.
* use generalized sub_select() nested loop function for
cursors instead of own loop implementation used in Cursor::fetch() before
sql/sql_select.h:
Replace all return values of sub_select family with enum.
Add JOIN::resume_nested_loop flag to indicate we are restarting the nested loop
for execution of next chunk of cursor's rows.
tests/mysql_client_test.c:
A test case for Bug#9520 "SELECT DISTINCT crashes server with cursor"
mysql-test/mysql-test-run.sh:
Set up arguments for mysql_client_test when testing
the embedded server.
tests/mysql_client_test.c:
Add -A switch for passing arguments to the embedded server.
Fixed problem with NULL in VARCHAR/BLOB keys for multi-part keys where VARCHAR/BLOB is first part
client/mysqladmin.cc:
Show GLOBAL status
myisam/mi_key.c:
Fixed problem with NULL in VARCHAR/BLOB keys for multi-part keys where VARCHAR/BLOB is first part
(Ramil will soon push test cases)
sql/handler.cc:
Indentation fix
tests/mysql_client_test.c:
Portability fixes
Added email threading capabilities to both
programs.
tests/mail_to_db.pl:
Changes to mail_to_db.pl
- Removed table name as optional. Future releases may require
more than one table, after which it's better to have a fixed
table name.
- Fixed a bug in report (division by zero error), if table was created,
but no mails was inserted.
- Added fields message_id and in_reply_to.
tests/pmail.pl:
Changed pmail:
New option: --thread. Prints all sub sequent replies in the thread.
New option: --message_id. Prints message_id and number of replies found.
Both options are run recursively. That means, not just direct replies to
the mail found are being searched, but also replies to replies and so on
until the whole thread has been found.
Clean up: Localized variables and moved code into functions.
Fix that mysql.proc works with new VARCHAR fields
Give warnings for wrong zero dates
configure.in:
Don't use -lsupc++ with gcc 3.3 and below as this gives linking problems when linking staticly
mysql-test/r/func_time.result:
New warnings
mysql-test/r/row.result:
Moved code around to get things to work with --ps-protocol
Note that one on warning disappered, but it should appear again when bug #9600 is fixed
mysql-test/r/strict.result:
enabled more tests
Added more tests
mysql-test/r/union.result:
Test that UNION generates correct row format
mysql-test/t/row.test:
Moved test to get things to work with --ps-protocol
mysql-test/t/strict.test:
enabled more tests
Added more tests
mysql-test/t/union.test:
Test that UNION generates correct row format
sql/item.cc:
Removed compiler warning
Simple cleanup
sql/sp.cc:
Fix that mysql.proc works with new VARCHAR fields
sql/time.cc:
Give warnings for wrong zero dates
tests/mysql_client_test.c:
More startup information
and Bug#9159 "Server crash during mysql_stmt_close".
The patch adds support for single-row result sets in cursors.
libmysql/libmysql.c:
If we wanted a cursor, and the server wasn't able to create one,
buffer all rows on client. Currently this is possible only for
single row result sets and some SHOW commands.
sql/sql_prepare.cc:
Properly free resources if there was a request to open a cursor which
wasn't fullfilled.
Give error on attempt to open a cursor for a statement not returning
a result set.
sql/sql_select.h:
Initialize Item_arena of Cursor object. A case when a cursor object
is created but not used is possible with single-row result sets.
tests/mysql_client_test.c:
Test cases for Bug#8880 and Bug#9159
server" to the test suite, the bug is no longer repeatable.
tests/mysql_client_test.c:
The test case for Bug#8722 "prepared statement with view crashes server"
First one is related to Bug#7905. One should not be allowed to
create new user with password without UPDATE privilege to
MySQL database. Furthermore, executing the same GRANT statement
twice would actually crash the server and corrupt privilege database.
Other bug was that one could update a column, using the existing
value as basis to calculate the new value (e.g. UPDATE t1 SET a=a+1)
without SELECT privilege to the field (a in the above example)
Fixed tests grant.pl and grant2, which were wrong.
BitKeeper/deleted/.del-mysqlfs.m4~2c0a06625ffdef2:
Delete: config/ac-macros/mysqlfs.m4
Makefile.am:
Removed fs_dir (since dropping mysqlfs support)
configure.in:
Removed support for MySQLFS.
Gone is support for mit-threads.
Gone is Raid.
I feel like if I say "gone" one more time I should embed a secret country song somewhere in the source as an easter egg.
dbug/Makefile.am:
Removed mit-threads
extra/Makefile.am:
Removed mit-threads
heap/Makefile.am:
removed mit-threads
libmysql_r/Makefile.am:
removed mit-threads
libmysqld/Makefile.am:
removed mit-threads
myisam/Makefile.am:
remove mt-threads
myisammrg/Makefile.am:
removed mit-threas
mysys/Makefile.am:
removed mit-threads
regex/Makefile.am:
removed mit-treads
sql/Makefile.am:
removed mit-threads
strings/Makefile.am:
removed mit-threads
tests/Makefile.am:
removed mit-threads
tools/Makefile.am:
removed mit-threads
mysql-test/r/innodb.result:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/rpl_rotate_logs.test:
Auto merged
sql/item.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_select.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/examples/ha_archive.cc:
Merge with global tree
(Use my changes)
sql/sql_parse.cc:
Remove 'tmp' fix to be able to run tests
(Found during build process)
extra/comp_err.c:
Remove compiler warnings
extra/perror.c:
Remove compiler warnings
innobase/dict/dict0dict.c:
Remove compiler warnings
innobase/dict/dict0load.c:
Remove compiler warnings
innobase/pars/pars0sym.c:
Remove compiler warnings
innobase/row/row0row.c:
Remove compiler warnings
innobase/row/row0sel.c:
Remove compiler warnings
libmysqld/lib_sql.cc:
Remove not used variables
myisam/mi_key.c:
Remove compiler warnings
regex/engine.c:
Added comment
sql/derror.cc:
Remove not used variables
sql/examples/ha_archive.cc:
Fixed bug in blob handling
Removed not used variable
sql/field.cc:
Remove compiler warnings
Remove not used variables
sql/filesort.cc:
Remove compiler warnings
sql/ha_heap.cc:
Remove not used variable
sql/ha_innodb.cc:
Remove not used variables
Remove compiler warnings
sql/handler.cc:
Remove compiler warnings and remove not used variables
sql/item.cc:
Remove compiler warnings and remove not used variables
sql/item_subselect.cc:
Remove compiler warnings
sql/item_sum.cc:
Remove compiler warnings
sql/item_sum.h:
Remove compiler warnings and remove not used variables
sql/log.cc:
Remove compiler warnings and remove not used variables
sql/log_event.cc:
Remove compiler warnings
sql/mysqld.cc:
Remove compiler warnings and remove not used variables
sql/opt_range.cc:
Remove compiler warnings and remove not used variables
sql/slave.cc:
Remove compiler warnings and remove not used variables
sql/sp_pcontext.cc:
Remove compiler warnings and remove not used variables
sql/sql_acl.cc:
Remove compiler warnings and remove not used variables
sql/sql_analyse.cc:
Remove compiler warnings and remove not used variables
sql/sql_base.cc:
Remove compiler warnings and remove not used variables
sql/sql_db.cc:
Remove compiler warnings and remove not used variables
sql/sql_help.cc:
Remove compiler warnings and remove not used variables
sql/sql_insert.cc:
Remove compiler warnings and remove not used variables
sql/sql_load.cc:
Remove compiler warnings and remove not used variables
sql/sql_parse.cc:
Remove compiler warnings and remove not used variables
sql/sql_prepare.cc:
Remove compiler warnings and remove not used variables
sql/sql_select.cc:
Remove compiler warnings and remove not used variables
sql/sql_show.cc:
Remove compiler warnings and remove not used variables
sql/sql_table.cc:
Remove compiler warnings
sql/sql_union.cc:
Remove compiler warnings
sql/sql_update.cc:
Remove compiler warnings and remove not used variables
sql/sql_yacc.yy:
Remove compiler warnings and remove not used variables
sql/strfunc.cc:
Remove compiler warnings and remove not used variables
strings/ctype-ucs2.c:
Remove compiler warnings
tests/mysql_client_test.c:
Remove compiler warnings and remove not used variables
tools/mysqlmanager.c:
Remove compiler warnings and remove not used variables
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
BitKeeper/triggers/post-commit:
Auto merged
mysql-test/r/lowercase_table2.result:
Auto merged
mysql-test/r/variables.result:
Auto merged
mysql-test/t/variables.test:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
mysql-test/r/system_mysql_db.result:
Update results
scripts/mysql_create_system_tables.sh:
Merge fix for Bug #7617, making enum fields in grant tables
case-insensitive.
scripts/mysql_fix_privilege_tables.sql:
Merge fix for Bug #7617, and fix additional enum/set columns.
sql/sql_acl.cc:
Hand-merge due to whitespace change
sql/sql_lex.cc:
Hand-merge bug fix.
a multibyte character, but was not a valid multibyte character. Refinement
of fix for Bug #8378.
tests/mysql_client_test.c:
Fix test (and fix number) for Bug #8378
mysys/charset.c:
Fix to only escape the first character in a sequence that appears
to be a multibyte character, but was not a valid one.
sql/sql_parse.cc:
SP pre/post processing moved to functions and used for mysql_list_fields command execution.
tests/mysql_client_test.c:
test of mysql_list_fields call for VIEW with SP function
reset mysql->net.last_error": the solution is to clear
MYSQL->net error before performing COM_CLOSE: if the call
succeeds, the connection is usable for other statements.
More comprehensive fix is to clear MYSQL->net for all
recoverable errors at the time they happen, it will be
implemented in 5.0 as it introduces incompatibility in behavior.
libmysql/libmysql.c:
A simple fix for Bug#7990 "mysql_stmt_close doesn't reset
mysql->net.last_error"
tests/mysql_client_test.c:
A test case for Bug#7990 " mysql_stmt_close doesn't reset
mysql->net.last_error"