Commit 152f0603 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi

Merge with 3.23.56 (Replace manual with 'empty' document)

Fix for bug when using auto_increment column and LAST_INSERT_ID()
parents 689578a0 710ffb2d
......@@ -27,7 +27,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) $(BUILT_SOURCES) mysqld_error.txt \
all: $(targets) txt_files
txt_files: ../INSTALL-SOURCE ../COPYING ../COPYING.LIB \
INSTALL-BINARY # ../MIRRORS
INSTALL-BINARY
CLEAN_FILES: $(BUILD_SOURCES)
touch $(BUILD_SOURCES)
......@@ -254,8 +254,5 @@ INSTALL-BINARY: mysql.info $(GT)
../COPYING.LIB: mysql.info $(GT)
perl -w $(GT) mysql.info "LGPL license" "Function Index" > $@
#../MIRRORS: manual.texi $(srcdir)/Support/generate-mirror-listing.pl
# perl -w $(srcdir)/Support/generate-mirror-listing.pl manual.texi > $@
# Don't update the files from bitkeeper
%::SCCS/s.%
This diff is collapsed.
@c This is a placeholder file for the autogenerated MySQL reserved
@c word list "reservedwords.texi", which is being included in
@c manual.texi when building the manual.
@c
@c This file will be replaced with the actual reserved word list
@c from the "mysqldoc" BK source tree when building the official
@c source distribution.
@c
@c Please note, that the manual is now maintained in a separate
@c "mysqldoc" BitKeeper tree! See
@c
@c http://www.mysql.com/doc/en/Installing_source_tree.html
@c
@c for more info on how to work with the MySQL BK source trees.
......@@ -604,11 +604,11 @@ btr_cur_open_at_index_side(
page_cur_set_after_last(page, page_cursor);
}
if (estimate) {
btr_cur_add_path_info(cursor, height, root_height);
}
if (height == 0) {
if (estimate) {
btr_cur_add_path_info(cursor, height,
root_height);
}
break;
}
......@@ -621,6 +621,10 @@ btr_cur_open_at_index_side(
page_cur_move_to_prev(page_cursor);
}
if (estimate) {
btr_cur_add_path_info(cursor, height, root_height);
}
height--;
node_ptr = page_cur_get_rec(page_cursor);
......
......@@ -486,7 +486,8 @@ simple_command(MYSQL *mysql,enum enum_server_command command, const char *arg,
if (net_write_command(net,(uchar) command,arg,
length ? length : (ulong) strlen(arg)))
{
DBUG_PRINT("error",("Can't send command to server. Error: %d",socket_errno));
DBUG_PRINT("error",("Can't send command to server. Error: %d",
socket_errno));
if (net->last_errno == ER_NET_PACKET_TOO_LARGE)
{
net->last_errno=CR_NET_PACKET_TOO_LARGE;
......
......@@ -3013,7 +3013,7 @@ hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
# the DEB_BUILD_ARCH variable should be of non-zero length, indicating
# that we are in the middle of a Debian package build (assuming the
# user isn't doing anything strange with environment variables).
if test -n "`dpkg-architecture -qDEB_BUILD_ARCH`" && ps | grep debuild | grep -v grep > /dev/null; then
if test -n "`dpkg-architecture -qDEB_BUILD_ARCH 2>/dev/null`" && ps | grep debuild | grep -v grep > /dev/null; then
# Debian policy mandates that rpaths should not be encoded into a binary
# so it is overridden.
hardcode_libdir_flag_spec=" -D_DEBIAN_PATCHED_LIBTOOL_ "
......
a
1
2
3
4
b c
1 4
a
10
11
12
13
b c
5 0
6 11
#see if queries that use both
#auto_increment and LAST_INSERT_ID()
#are replicated well
source include/master-slave.inc;
connection master;
drop table if exists t1;
create table t1(a int auto_increment, key(a));
create table t2(b int auto_increment, c int, key(b));
insert into t1 values (1),(2),(3);
insert into t1 values (null);
insert into t2 values (null,last_insert_id());
save_master_pos;
connection slave;
sync_with_master;
select * from t1;
select * from t2;
connection master;
#check if multi-line inserts,
#which set last_insert_id to the first id inserted,
#are replicated the same way
drop table t1;
drop table t2;
create table t1(a int auto_increment, key(a));
create table t2(b int auto_increment, c int, key(b));
insert into t1 values (10);
insert into t1 values (null),(null),(null);
insert into t2 values (5,0);
insert into t2 values (null,last_insert_id());
save_master_pos;
connection slave;
sync_with_master;
select * from t1;
select * from t2;
connection master;
drop table t1;
drop table t2;
save_master_pos;
connection slave;
sync_with_master;
......@@ -93,7 +93,7 @@ DEFS = -DMYSQL_SERVER \
# Don't put lex_hash.h in BUILT_SOURCES as this will give infinite recursion
BUILT_SOURCES = sql_yacc.cc sql_yacc.h
EXTRA_DIST = udf_example.cc $(BUILT_SOURCES)
YFLAGS = -d
AM_YFLAGS = -d
link_sources:
rm -f mini_client_errors.c
......
......@@ -1070,7 +1070,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
if (thd->last_insert_id_used)
{
Intvar_log_event e(thd,(uchar) LAST_INSERT_ID_EVENT,
thd->last_insert_id);
thd->current_insert_id);
e.set_log_pos(this);
if (thd->server_id)
e.server_id = thd->server_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment