- When an ALTER TABLE RENAME is performed on windows, the files are closed and their cached file
descriptors are marked invalid. Performing INSERT, UPDATE or SELECT on the associated merge
table causes a server crash on windows. This patch adds a test for bad file descriptors when a
table attempts a lock. If a bad descriptor is found an error is thrown. An additional FLUSH TABLES
will be necessary to further operate on the associated merge table.
myisam/mi_locking.c:
This patch prevents the windows built to crash if the file is closed.
mysql-test/r/windows.result:
Added test case for the windows built.
mysql-test/t/windows.test:
Added test case for the windows built.
More specifically, the scripts/Makefile isn't created and it doesn't
translate mysql_fix_privilege_tables ".sh" . So,
mysql-test/mysql-test-run.pl doesn't find the binary and substitutes
/bin/false instead. That obviously doesn't "fix" anything and the
test fails because of it.
mysql-test/t/system_mysql_db_fix.test:
Change stolen from the -win tree.
into shellback.(none):/home/msvensson/mysql/mysql-5.1-new-maint
sql/ha_innodb.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_show.cc:
Auto merged
storage/csv/ha_tina.cc:
Auto merged
mysql-test/mysql-test-run.pl:
Merge
- Add ifdefs in ha_innodb.cc so it's only compiled if we have selected to build mysqld with innodb.
This is inline with how it's done in other handlers.
sql/ha_innodb.cc:
Add ifdef for WITH_INNOBASE_STORAGE_ENGINE around all code in ha_innodb.cc so it's only included if we have defined --with-innodb to configure
into shellback.(none):/home/msvensson/mysql/mysql-5.1-new-maint
configure.in:
Auto merged
include/mysql_com.h:
Auto merged
mysql-test/lib/mtr_process.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/grant.result:
Auto merged
mysql-test/r/partition.result:
Auto merged
mysql-test/r/partition_mgm.result:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/grant.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_show.cc:
Auto merged
Fix OPT_MYISAM_STATS_METHOD case, where the NULLS_EQUAL and NULLS_NOT_EQUAL methods were mixed up
sql/mysqld.cc:
Fix OPT_MYISAM_STATS_METHOD case, bug #21054
sql/stacktrace.c:
stacktrace dumps for amd64 (backport fix for bug 21250 to mysql-4.1)
sql/stacktrace.h:
stacktrace dumps for amd64 (backport fix for bug 21250 to mysql-4.1)
mysql-test/r/ctype_recoding.result:
Case change in 5.1.
mysql-test/t/heap_btree.test:
Fixes bad merge.
mysql-test/t/partition.test:
Split terrible "ls" test into two parts so that the different sorting orders
of sundry OSes don't affect the output.
This bug report was two problems:
1) LAST_INSERT_ID() returns a value which does not exist in the table
2) the reporter would want it to return the autoinc id of the updated
row.
1) is a real bug, 2) is a feature request.
In July I implemented 2) in 5.1 (which automatically fixes 1).
This has not yet been documented or released, so is changeable.
Precisely, recently Paul and a user found an easy workaround to give
2), which works in 4.1-5.0-5.1. So I can revert my code for 2),
because it's not needed, that's what I do here;
we forget about 2) (we will document the workaround).
But when I revert my code for 2), 1) comes back. We solve 1) by saying
that if INSERT ON DUPLICATE KEY UPDATE updates a row, it's like a
regular UPDATE: LAST_INSERT_ID() should not be affected (instead of
returning a non-existent value).
So note: no behaviour change compared to the last released 5.1; just
a bugfix for 1).
mysql-test/r/innodb_mysql.result:
result update
mysql-test/t/innodb_mysql.test:
test for the new way to fix BUG#19243: that if INSERT ON DUPLICATE
KEY UPDATE updates a row, SELECT LAST_INSERT_ID() is not affected.
Test of the workaround for people who want SELECT LAST_INSERT_ID()
to return the autoinc id of the updated row.
sql/sql_insert.cc:
No need to change LAST_INSERT_ID() if INSERT ON DUPLICATE KEY UPDATE
updates a row, there is a workaround to achieve this without changing
code: just add "autoinc_col=LAST_INSERT_ID(autoinc_col)" to your
ON DUPLICATE KEY UPDATE clause.
Prevent LAST_INSERT_ID() to contain an inexistent value in this case:
if the row is updated it should be like a regular UPDATE: don't
affect LAST_INSERT_ID() (achieved by marking that we didn't generate
an id for this row: insert_id_for_cur_row=0).
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
client/mysql.cc:
Auto merged
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/net_serv.cc:
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/sql_yacc.yy:
Auto merged
vio/viosocket.c:
Auto merged
mysql-test/r/ctype_recoding.result:
Manual merge.
mysql-test/t/ctype_recoding.test:
Manual merge.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/r/heap_btree.result:
Auto merged
sql/set_var.cc:
Auto merged
mysql-test/t/heap_btree.test:
Manually merged.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/r/ctype_recoding.result:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/t/ctype_recoding.test:
manual merge.
sql/sql_lex.h:
manual merge.
sql/sql_table.cc:
manual merge.
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/r/ctype_utf8.result:
Auto merged
mysql-test/t/ctype_utf8.test:
Auto merged
sql/sql_select.cc:
Auto merged
into salvation.intern.azundris.com:/home/tnurnberg/21913/my51-21913
mysql-test/r/func_time.result:
Auto merged
mysql-test/t/func_time.test:
Auto merged
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/t/heap_btree.test:
Manually merged.