a updatable view.
When there's a VIEW on a base table that have AUTO_INCREMENT column, and
this VIEW doesn't provide an access such column, after INSERT to such
VIEW LAST_INSERT_ID() did not return the value just generated.
This behaviour is intended and correct, because if the VIEW doesn't list
some columns then these columns are effectively hidden from the user,
and so any side effects of inserting default values to them.
However, there was a bug that such statement inserting into a view would
reset LAST_INSERT_ID() instead of leaving it unchanged.
This patch restores the original value of LAST_INSERT_ID() instead of
resetting it to zero.
mysql-test/r/view.result:
Add result for bug#22584: last_insert_id not updated after inserting
a record through a updatable view.
mysql-test/t/view.test:
Add test case for bug#22584: last_insert_id not updated after inserting
a record through a updatable view.
sql/sql_parse.cc:
When we have inserted into a view, and AUTO_INCREMENT column is not
accessed from this view, instead of setting LAST_INSERT_ID to zero set
it to the value it had before this statement was executed.
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
client/mysql.cc:
Auto merged
mysql-test/r/mysql.result:
Auto merged
mysql-test/t/mysql.test:
Auto merged
- Add two null bytes in "buff" variable allowing us to call
get_arg two times also for strings longer than sizeof(buff)
client/mysql.cc:
Make sure there are _two_ zero bytes at the end of buff, to allow 'get_arg' to be
called twice on long strings. The first time it will mark end of string with a
zero and the second time it will "skip ahead" to the first zero, and the find the
second one indicating end of buff.
mysql-test/r/mysql.result:
Update test results
mysql-test/t/mysql.test:
Add tests for "com_connect" function in mysql
Add test reported in bug
- As a sideeffect of the patch to generate lex_hash.h only once
on the machine where the source dist was produced, a problem
was found when compiling a mysqld without partition support - it
would crash when looking up the lex symbols due to mismatch between
lex.h and the generated lex_hash.h
- Remove the ifdef for partition in lex.h
- Fix minor problem with"EXPLAIN PARTITION" when not compiled with
partition(existed also without the above patch)
- Add test case that will be run when we don't have partition
support compiled into mysqld
- Return error ER_FEATURE_DISABLED if user tries to use PARTITION
when there is no support for it.
sql/lex.h:
There should be no ifdefs of features in lex.h
sql/sql_class.cc:
In line with the comment in sql_yacc.yy that we want the same output
from "EXPLAIN PARTITIONS.." regardless of wheter we have compiled in
support for partition or not, remove the ifdef so the extra field
is added to output if the DESCRIBE_PARTITIONS bit it set. Without
this patch we get a crash as the code in select_describe believes the
field is there.
sql/sql_select.cc:
Use "const" for the variable as it's a ssigned once and never changes
sql/sql_yacc.yy:
Don't allow PARTITION syntax oif there is no suport for partitioning
mysql-test/r/not_partition.require:
New BitKeeper file ``mysql-test/r/not_partition.require''
mysql-test/r/not_partition.result:
New BitKeeper file ``mysql-test/r/not_partition.result''
mysql-test/t/not_partition.test:
New BitKeeper file ``mysql-test/t/not_partition.test''
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug18819
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
sql/sql_delete.cc:
Auto merged
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug18819
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
sql/sql_delete.cc:
Auto merged
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug18819
mysql-test/r/innodb_mysql.result:
Auto merged
sql/sql_delete.cc:
Auto merged
mysql-test/include/mix1.inc:
Auto merged
If the error happens during DELETE IGNORE, nothing could be send to the
client, thus leaving it frozen expecting the reply.
The problem was that if some error occurred, it wouldn't be reported to
the client because of IGNORE, but neither success would be reported.
MySQL 4.1 would not freeze the client, but will report
ERROR 1105 (HY000): Unknown error
instead, which is also a bug.
The solution is to report success if we are in DELETE IGNORE and some
non-fatal error has happened.
mysql-test/r/innodb_mysql.result:
Add result for bug#18819: DELETE IGNORE hangs on foreign key parent
delete.
mysql-test/t/innodb_mysql.test:
Add test case for bug#18819: DELETE IGNORE hangs on foreign key parent
delete.
sql/sql_delete.cc:
Report success if we have got an error, but we are in DELETE IGNORE, and
the error is not fatal (if it is, it would be reported to the client).
Disable warnings around the create table statements, we want to use innodb when possible but they work just fine without.
mysql-test/t/ctype_utf8.test:
Disable warnings around the create table statements, we want to use innodb when possible but they work just fine without.
Fix two memory leaks in mysql_client_test
mysql-test/mysql-test-run.pl:
Add valgrinding support for mysql_client_test
tests/mysql_client_test.c:
Fix two memory leaks
mysql-test/r/ndb_multi.result:
update result file with post-merge results
sql/ha_ndbcluster.cc:
update usage of ndb_get_table_statistics for changes made for bug 19914
into willster.(none):/home/stewart/Documents/MySQL/5.1/ndb
sql/sql_select.cc:
Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
Auto merged
mysql-test/r/ndb_multi.result:
merge result file
mysql-test/t/ndb_multi.test:
merge test
sql/ha_ndbcluster.cc:
merge ndb_get_table_statistics definition and usage
sql/ha_ndbcluster.h:
merge
into siva.hindu.god:/usr/home/tim/m/bk/50
configure.in:
Auto merged
mysql-test/r/rename.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/view.test:
Auto merged
mysys/mf_iocache.c:
Auto merged
sql/item_func.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
myisam/sort.c:
Manual merge
mysql-test/r/innodb_mysql.result:
Manual merge
mysql-test/t/innodb_mysql.test:
Manual merge
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
BitKeeper/etc/ignore:
auto-union
include/Makefile.am:
Auto merged
include/mysql.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
configure.in:
SCCS merged
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
BitKeeper/etc/ignore:
auto-union
configure.in:
Auto merged
include/mysql.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
include/Makefile.am:
Merge, SUPERCLEANFILES and CLEANFILES has dissapeared in 5.0
into maint1.mysql.com:/data/localhome/tsmith/bk/51
mysql-test/include/mix1.inc:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/t/view.test:
Auto merged
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
mysql-test/mysql-test-run.pl:
Auto merged
tests/mysql_client_test.c:
Remove the fflush(NULL) and instead explicitly fflush stdout and then stderr
Flush both stdout and stderr before abort'ing mysql_client_test
mysql-test/mysql-test-run.pl:
Run mysql_client_test wihtout --silent flag
tests/mysql_client_test.c:
Before aborting mysql_client_test in die, make sure
to first flush stdout and finally after the error message
has been printed also fflush stderr