mirror of
https://github.com/MariaDB/server.git
synced 2025-12-13 20:03:16 +03:00
branches/zip: Merge revisions 1402:1493 from trunk.
Remove mysql.patch, because the configuration parameter interface has changed.
This commit is contained in:
241
Makefile.am
241
Makefile.am
@@ -25,104 +25,153 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
|
|||||||
-I$(top_srcdir)/sql \
|
-I$(top_srcdir)/sql \
|
||||||
-I$(srcdir)
|
-I$(srcdir)
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = foreign
|
DEFS = @DEFS@
|
||||||
TAR = gtar
|
|
||||||
|
|
||||||
noinst_HEADERS =
|
|
||||||
|
|
||||||
SUBDIRS = os ut btr buf data dict dyn eval fil fsp fut \
|
|
||||||
ha ibuf lock log mach mem mtr page \
|
|
||||||
handler \
|
|
||||||
pars que read rem row srv sync thr trx usr
|
|
||||||
|
|
||||||
EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr0cur.ic \
|
|
||||||
include/btr0pcur.h include/btr0pcur.ic include/btr0sea.h include/btr0sea.ic \
|
|
||||||
include/btr0types.h \
|
|
||||||
include/buf0buddy.h include/buf0buddy.ic \
|
|
||||||
include/buf0buf.h include/buf0buf.ic include/buf0flu.h include/buf0flu.ic \
|
|
||||||
include/buf0lru.h include/buf0lru.ic include/buf0rea.h include/buf0types.h \
|
|
||||||
include/data0data.h include/data0data.ic include/data0type.h include/data0type.ic \
|
|
||||||
include/data0types.h include/db0err.h \
|
|
||||||
include/dict0boot.h include/dict0boot.ic include/dict0crea.h include/dict0crea.ic \
|
|
||||||
include/dict0dict.h include/dict0dict.ic include/dict0load.h include/dict0load.ic \
|
|
||||||
include/dict0mem.h include/dict0mem.ic include/dict0types.h \
|
|
||||||
include/dyn0dyn.h include/dyn0dyn.ic \
|
|
||||||
include/eval0eval.h include/eval0eval.ic include/eval0proc.h include/eval0proc.ic \
|
|
||||||
include/fil0fil.h include/fsp0fsp.h include/fsp0fsp.ic \
|
|
||||||
include/fut0fut.h include/fut0fut.ic include/fut0lst.h include/fut0lst.ic \
|
|
||||||
include/ha0ha.h include/ha0ha.ic include/hash0hash.h include/hash0hash.ic \
|
|
||||||
include/ibuf0ibuf.h include/ibuf0ibuf.ic include/ibuf0types.h \
|
|
||||||
include/lock0lock.h include/lock0lock.ic include/lock0types.h \
|
|
||||||
include/log0log.h include/log0log.ic include/log0recv.h include/log0recv.ic \
|
|
||||||
include/mach0data.h include/mach0data.ic include/mem0dbg.h include/mem0dbg.ic \
|
|
||||||
include/mem0mem.h include/mem0mem.ic include/mem0pool.h include/mem0pool.ic \
|
|
||||||
include/mtr0log.h include/mtr0log.ic include/mtr0mtr.h include/mtr0mtr.ic \
|
|
||||||
include/mtr0types.h include/os0file.h \
|
|
||||||
include/os0proc.h include/os0proc.ic include/os0sync.h include/os0sync.ic \
|
|
||||||
include/os0thread.h include/os0thread.ic \
|
|
||||||
include/page0cur.h include/page0cur.ic include/page0page.h include/page0page.ic \
|
|
||||||
include/page0types.h \
|
|
||||||
include/pars0grm.h include/pars0opt.h include/pars0opt.ic \
|
|
||||||
include/pars0pars.h include/pars0pars.ic include/pars0sym.h include/pars0sym.ic \
|
|
||||||
include/pars0types.h \
|
|
||||||
include/que0que.h include/que0que.ic include/que0types.h \
|
|
||||||
include/read0read.h include/read0read.ic include/read0types.h \
|
|
||||||
include/rem0cmp.h include/rem0cmp.ic include/rem0rec.h include/rem0rec.ic \
|
|
||||||
include/rem0types.h \
|
|
||||||
include/row0ext.h include/row0ext.ic \
|
|
||||||
include/row0ins.h include/row0ins.ic include/row0mysql.h include/row0mysql.ic \
|
|
||||||
include/row0purge.h include/row0purge.ic include/row0row.h include/row0row.ic \
|
|
||||||
include/row0sel.h include/row0sel.ic include/row0types.h \
|
|
||||||
include/row0uins.h include/row0uins.ic include/row0umod.h include/row0umod.ic \
|
|
||||||
include/row0undo.h include/row0undo.ic include/row0upd.h include/row0upd.ic \
|
|
||||||
include/row0vers.h include/row0vers.ic \
|
|
||||||
include/srv0que.h include/srv0srv.h include/srv0srv.ic include/srv0start.h \
|
|
||||||
include/sync0arr.h include/sync0arr.ic include/sync0rw.h include/sync0rw.ic \
|
|
||||||
include/sync0sync.h include/sync0sync.ic include/sync0types.h \
|
|
||||||
include/thr0loc.h include/thr0loc.ic \
|
|
||||||
include/trx0purge.h include/trx0purge.ic include/trx0rec.h include/trx0rec.ic \
|
|
||||||
include/trx0roll.h include/trx0roll.ic include/trx0rseg.h include/trx0rseg.ic \
|
|
||||||
include/trx0sys.h include/trx0sys.ic include/trx0trx.h include/trx0trx.ic \
|
|
||||||
include/trx0types.h include/trx0undo.h include/trx0undo.ic include/trx0xa.h \
|
|
||||||
include/univ.i include/usr0sess.h include/usr0sess.ic include/usr0types.h \
|
|
||||||
include/ut0byte.h include/ut0byte.ic include/ut0dbg.h include/ut0lst.h \
|
|
||||||
include/ut0mem.h include/ut0mem.ic include/ut0rnd.h include/ut0rnd.ic \
|
|
||||||
handler/ha_innodb.h \
|
|
||||||
include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h \
|
|
||||||
include/ut0list.h include/ut0list.ic \
|
|
||||||
include/ut0wqueue.h \
|
|
||||||
pars/make_bison.sh pars/make_flex.sh \
|
|
||||||
pars/pars0grm.y pars/pars0lex.l
|
|
||||||
CMakeLists.txt plug.in
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libinnobase.a
|
|
||||||
libinnobase_a_LIBADD = usr/libusr.a srv/libsrv.a dict/libdict.a \
|
|
||||||
que/libque.a srv/libsrv.a ibuf/libibuf.a \
|
|
||||||
row/librow.a pars/libpars.a btr/libbtr.a \
|
|
||||||
trx/libtrx.a read/libread.a usr/libusr.a \
|
|
||||||
buf/libbuf.a ibuf/libibuf.a eval/libeval.a \
|
|
||||||
log/liblog.a fsp/libfsp.a fut/libfut.a \
|
|
||||||
fil/libfil.a lock/liblock.a mtr/libmtr.a \
|
|
||||||
page/libpage.a rem/librem.a thr/libthr.a \
|
|
||||||
sync/libsync.a data/libdata.a mach/libmach.a \
|
|
||||||
ha/libha.a dyn/libdyn.a mem/libmem.a \
|
|
||||||
handler/libhandler.a \
|
|
||||||
ut/libut.a os/libos.a ut/libut.a
|
|
||||||
libinnobase_a_SOURCES =
|
|
||||||
|
|
||||||
|
|
||||||
libinnobase.a: $(libinnobase_a_LIBADD)
|
noinst_HEADERS = include/btr0btr.h include/btr0btr.ic \
|
||||||
-rm -f $@
|
include/btr0cur.h include/btr0cur.ic \
|
||||||
if test "$(host_os)" = "netware" ; \
|
include/btr0pcur.h include/btr0pcur.ic \
|
||||||
then \
|
include/btr0sea.h include/btr0sea.ic \
|
||||||
$(libinnobase_a_AR) $@ $(libinnobase_a_LIBADD) ; \
|
include/btr0types.h include/buf0buddy.h \
|
||||||
else \
|
include/buf0buddy.ic include/buf0buf.h \
|
||||||
for arc in $(libinnobase_a_LIBADD); do \
|
include/buf0buf.ic include/buf0flu.h \
|
||||||
arpath=`echo $$arc|sed 's|[^/]*$$||'`; \
|
include/buf0flu.ic include/buf0lru.h \
|
||||||
$(AR) t $$arc|sed "s|^|$$arpath|"; \
|
include/buf0lru.ic include/buf0rea.h \
|
||||||
done | sort -u | xargs $(AR) cq $@ ; \
|
include/buf0types.h include/data0data.h \
|
||||||
$(RANLIB) $@ ; \
|
include/data0data.ic include/data0type.h \
|
||||||
fi
|
include/data0type.ic include/data0types.h \
|
||||||
|
include/db0err.h include/dict0boot.h \
|
||||||
|
include/dict0boot.ic include/dict0crea.h \
|
||||||
|
include/dict0crea.ic include/dict0dict.h \
|
||||||
|
include/dict0dict.ic include/dict0load.h \
|
||||||
|
include/dict0load.ic include/dict0mem.h \
|
||||||
|
include/dict0mem.ic include/dict0types.h \
|
||||||
|
include/dyn0dyn.h include/dyn0dyn.ic \
|
||||||
|
include/eval0eval.h include/eval0eval.ic \
|
||||||
|
include/eval0proc.h include/eval0proc.ic \
|
||||||
|
include/fil0fil.h include/fsp0fsp.h \
|
||||||
|
include/fsp0fsp.ic include/fut0fut.h \
|
||||||
|
include/fut0fut.ic include/fut0lst.h \
|
||||||
|
include/fut0lst.ic include/ha0ha.h \
|
||||||
|
include/ha0ha.ic include/hash0hash.h \
|
||||||
|
include/hash0hash.ic include/ibuf0ibuf.h \
|
||||||
|
include/ibuf0ibuf.ic include/ibuf0types.h \
|
||||||
|
include/lock0lock.h include/lock0lock.ic \
|
||||||
|
include/lock0types.h include/log0log.h \
|
||||||
|
include/log0log.ic include/log0recv.h \
|
||||||
|
include/log0recv.ic include/mach0data.h \
|
||||||
|
include/mach0data.ic include/mem0dbg.h \
|
||||||
|
include/mem0dbg.ic mem/mem0dbg.c \
|
||||||
|
include/mem0mem.h include/mem0mem.ic \
|
||||||
|
include/mem0pool.h include/mem0pool.ic \
|
||||||
|
include/mtr0log.h include/mtr0log.ic \
|
||||||
|
include/mtr0mtr.h include/mtr0mtr.ic \
|
||||||
|
include/mtr0types.h include/os0file.h \
|
||||||
|
include/os0proc.h include/os0proc.ic \
|
||||||
|
include/os0sync.h include/os0sync.ic \
|
||||||
|
include/os0thread.h include/os0thread.ic \
|
||||||
|
include/page0cur.h include/page0cur.ic \
|
||||||
|
include/page0page.h include/page0page.ic \
|
||||||
|
include/page0zip.h include/page0zip.ic \
|
||||||
|
include/page0types.h include/pars0grm.h \
|
||||||
|
include/pars0opt.h include/pars0opt.ic \
|
||||||
|
include/pars0pars.h include/pars0pars.ic \
|
||||||
|
include/pars0sym.h include/pars0sym.ic \
|
||||||
|
include/pars0types.h include/que0que.h \
|
||||||
|
include/que0que.ic include/que0types.h \
|
||||||
|
include/read0read.h include/read0read.ic \
|
||||||
|
include/read0types.h include/rem0cmp.h \
|
||||||
|
include/rem0cmp.ic include/rem0rec.h \
|
||||||
|
include/rem0rec.ic include/rem0types.h \
|
||||||
|
include/row0ext.h include/row0ext.ic \
|
||||||
|
include/row0ins.h include/row0ins.ic \
|
||||||
|
include/row0merge.h \
|
||||||
|
include/row0mysql.h include/row0mysql.ic \
|
||||||
|
include/row0purge.h include/row0purge.ic \
|
||||||
|
include/row0row.h include/row0row.ic \
|
||||||
|
include/row0sel.h include/row0sel.ic \
|
||||||
|
include/row0types.h include/row0uins.h \
|
||||||
|
include/row0uins.ic include/row0umod.h \
|
||||||
|
include/row0umod.ic include/row0undo.h \
|
||||||
|
include/row0undo.ic include/row0upd.h \
|
||||||
|
include/row0upd.ic include/row0vers.h \
|
||||||
|
include/row0vers.ic include/srv0que.h \
|
||||||
|
include/srv0srv.h include/srv0srv.ic \
|
||||||
|
include/srv0start.h include/sync0arr.h \
|
||||||
|
include/sync0arr.ic include/sync0rw.h \
|
||||||
|
include/sync0rw.ic include/sync0sync.h \
|
||||||
|
include/sync0sync.ic include/sync0types.h \
|
||||||
|
include/thr0loc.h include/thr0loc.ic \
|
||||||
|
include/trx0purge.h include/trx0purge.ic \
|
||||||
|
include/trx0rec.h include/trx0rec.ic \
|
||||||
|
include/trx0roll.h include/trx0roll.ic \
|
||||||
|
include/trx0rseg.h include/trx0rseg.ic \
|
||||||
|
include/trx0sys.h include/trx0sys.ic \
|
||||||
|
include/trx0trx.h include/trx0trx.ic \
|
||||||
|
include/trx0types.h include/trx0undo.h \
|
||||||
|
include/trx0undo.ic include/trx0xa.h \
|
||||||
|
include/univ.i include/usr0sess.h \
|
||||||
|
include/usr0sess.ic include/usr0types.h \
|
||||||
|
include/ut0byte.h include/ut0byte.ic \
|
||||||
|
include/ut0dbg.h include/ut0lst.h \
|
||||||
|
include/ut0mem.h include/ut0mem.ic \
|
||||||
|
include/ut0rnd.h include/ut0rnd.ic \
|
||||||
|
include/ut0sort.h include/ut0ut.h \
|
||||||
|
include/ut0ut.ic include/ut0vec.h \
|
||||||
|
include/ut0vec.ic include/ut0list.h \
|
||||||
|
include/ut0list.ic include/ut0wqueue.h \
|
||||||
|
include/ha_prototypes.h handler/ha_innodb.h
|
||||||
|
|
||||||
|
EXTRA_LIBRARIES = libinnobase.a
|
||||||
|
noinst_LIBRARIES = @plugin_innobase_static_target@
|
||||||
|
libinnobase_a_SOURCES = btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c \
|
||||||
|
btr/btr0sea.c buf/buf0buddy.c \
|
||||||
|
buf/buf0buf.c buf/buf0flu.c \
|
||||||
|
buf/buf0lru.c buf/buf0rea.c data/data0data.c \
|
||||||
|
data/data0type.c dict/dict0boot.c \
|
||||||
|
dict/dict0crea.c dict/dict0dict.c \
|
||||||
|
dict/dict0load.c dict/dict0mem.c dyn/dyn0dyn.c \
|
||||||
|
eval/eval0eval.c eval/eval0proc.c \
|
||||||
|
fil/fil0fil.c fsp/fsp0fsp.c fut/fut0fut.c \
|
||||||
|
fut/fut0lst.c ha/ha0ha.c ha/hash0hash.c \
|
||||||
|
ibuf/ibuf0ibuf.c lock/lock0lock.c \
|
||||||
|
log/log0log.c log/log0recv.c mach/mach0data.c \
|
||||||
|
mem/mem0mem.c mem/mem0pool.c mtr/mtr0log.c \
|
||||||
|
mtr/mtr0mtr.c os/os0file.c os/os0proc.c \
|
||||||
|
os/os0sync.c os/os0thread.c page/page0cur.c \
|
||||||
|
page/page0page.c page/page0zip.c \
|
||||||
|
pars/lexyy.c pars/pars0grm.c \
|
||||||
|
pars/pars0opt.c pars/pars0pars.c \
|
||||||
|
pars/pars0sym.c que/que0que.c read/read0read.c \
|
||||||
|
rem/rem0cmp.c rem/rem0rec.c row/row0ext.c \
|
||||||
|
row/row0ins.c row/row0merge.c \
|
||||||
|
row/row0mysql.c row/row0purge.c row/row0row.c \
|
||||||
|
row/row0sel.c row/row0uins.c row/row0umod.c \
|
||||||
|
row/row0undo.c row/row0upd.c row/row0vers.c \
|
||||||
|
srv/srv0que.c srv/srv0srv.c srv/srv0start.c \
|
||||||
|
sync/sync0arr.c sync/sync0rw.c \
|
||||||
|
sync/sync0sync.c thr/thr0loc.c trx/trx0purge.c \
|
||||||
|
trx/trx0rec.c trx/trx0roll.c trx/trx0rseg.c \
|
||||||
|
trx/trx0sys.c trx/trx0trx.c trx/trx0undo.c \
|
||||||
|
usr/usr0sess.c ut/ut0byte.c ut/ut0dbg.c \
|
||||||
|
ut/ut0list.c ut/ut0mem.c ut/ut0rnd.c \
|
||||||
|
ut/ut0ut.c ut/ut0vec.c ut/ut0wqueue.c \
|
||||||
|
handler/ha_innodb.cc
|
||||||
|
|
||||||
|
libinnobase_a_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_SERVER
|
||||||
|
libinnobase_a_CFLAGS = $(AM_CFLAGS) -DMYSQL_SERVER
|
||||||
|
|
||||||
|
EXTRA_LTLIBRARIES = ha_innodb.la
|
||||||
|
pkglib_LTLIBRARIES = @plugin_innobase_shared_target@
|
||||||
|
|
||||||
|
ha_innodb_la_LDFLAGS = -module -rpath $(MYSQLLIBdir)
|
||||||
|
ha_innodb_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
||||||
|
ha_innodb_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN
|
||||||
|
ha_innodb_la_SOURCES = $(libinnobase_a_SOURCES)
|
||||||
|
|
||||||
|
EXTRA_DIST = CMakeLists.txt plug.in \
|
||||||
|
pars/make_bison.sh pars/make_flex.sh \
|
||||||
|
pars/pars0grm.y pars/pars0lex.l
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libbtr.a
|
|
||||||
|
|
||||||
libbtr_a_SOURCES = btr0btr.c btr0cur.c btr0pcur.c btr0sea.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libbuf.a
|
|
||||||
|
|
||||||
libbuf_a_SOURCES = buf0buf.c buf0buddy.c buf0flu.c buf0lru.c buf0rea.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libdata.a
|
|
||||||
|
|
||||||
libdata_a_SOURCES = data0data.c data0type.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -19,6 +19,8 @@ Created 5/30/1994 Heikki Tuuri
|
|||||||
#include "dict0dict.h"
|
#include "dict0dict.h"
|
||||||
#include "btr0cur.h"
|
#include "btr0cur.h"
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#ifdef UNIV_DEBUG
|
#ifdef UNIV_DEBUG
|
||||||
byte data_error; /* data pointers of tuple fields are initialized
|
byte data_error; /* data pointers of tuple fields are initialized
|
||||||
to point here for error checking */
|
to point here for error checking */
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libdict.a
|
|
||||||
|
|
||||||
libdict_a_SOURCES = dict0boot.c dict0crea.c dict0dict.c dict0load.c\
|
|
||||||
dict0mem.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1240,7 +1240,8 @@ dict_create_or_check_foreign_constraint_tables(void)
|
|||||||
fprintf(stderr, "InnoDB: error %lu in creation\n",
|
fprintf(stderr, "InnoDB: error %lu in creation\n",
|
||||||
(ulong) error);
|
(ulong) error);
|
||||||
|
|
||||||
ut_a(error == DB_OUT_OF_FILE_SPACE);
|
ut_a(error == DB_OUT_OF_FILE_SPACE
|
||||||
|
|| error == DB_TOO_MANY_CONCURRENT_TRXS);
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: creation failed\n"
|
"InnoDB: creation failed\n"
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ Created 1/8/1996 Heikki Tuuri
|
|||||||
# include "m_ctype.h" /* my_isspace() */
|
# include "m_ctype.h" /* my_isspace() */
|
||||||
#endif /* !UNIV_HOTBACKUP */
|
#endif /* !UNIV_HOTBACKUP */
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
dict_sys_t* dict_sys = NULL; /* the dictionary system */
|
dict_sys_t* dict_sys = NULL; /* the dictionary system */
|
||||||
|
|
||||||
rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve
|
rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libdyn.a
|
|
||||||
|
|
||||||
libdyn_a_SOURCES = dyn0dyn.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libeval.a
|
|
||||||
|
|
||||||
libeval_a_SOURCES = eval0eval.c eval0proc.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libfil.a
|
|
||||||
|
|
||||||
libfil_a_SOURCES = fil0fil.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libfsp.a
|
|
||||||
|
|
||||||
libfsp_a_SOURCES = fsp0fsp.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libfut.a
|
|
||||||
|
|
||||||
libfut_a_SOURCES = fut0fut.c fut0lst.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libha.a
|
|
||||||
|
|
||||||
libha_a_SOURCES = ha0ha.c hash0hash.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
|
||||||
# & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
DEFS = -DMYSQL_SERVER @DEFS@
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libhandler.a
|
|
||||||
|
|
||||||
libhandler_a_SOURCES = ha_innodb.cc
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
1104
handler/ha_innodb.cc
1104
handler/ha_innodb.cc
File diff suppressed because it is too large
Load Diff
@@ -147,6 +147,7 @@ class ha_innobase: public handler
|
|||||||
*max_key);
|
*max_key);
|
||||||
ha_rows estimate_rows_upper_bound();
|
ha_rows estimate_rows_upper_bound();
|
||||||
|
|
||||||
|
void update_create_info(HA_CREATE_INFO* create_info);
|
||||||
int create(const char *name, register TABLE *form,
|
int create(const char *name, register TABLE *form,
|
||||||
HA_CREATE_INFO *create_info);
|
HA_CREATE_INFO *create_info);
|
||||||
int delete_all_rows();
|
int delete_all_rows();
|
||||||
@@ -190,42 +191,6 @@ class ha_innobase: public handler
|
|||||||
uint table_changes);
|
uint table_changes);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern ulong innobase_fast_shutdown;
|
|
||||||
extern ulong innobase_large_page_size;
|
|
||||||
extern long innobase_mirrored_log_groups, innobase_log_files_in_group;
|
|
||||||
extern longlong innobase_log_file_size;
|
|
||||||
extern long innobase_log_buffer_size;
|
|
||||||
extern long innobase_additional_mem_pool_size;
|
|
||||||
extern long innobase_file_io_threads, innobase_lock_wait_timeout;
|
|
||||||
extern long innobase_force_recovery;
|
|
||||||
extern long innobase_open_files;
|
|
||||||
extern char *innobase_data_home_dir, *innobase_data_file_path;
|
|
||||||
extern char *innobase_log_group_home_dir, *innobase_log_arch_dir;
|
|
||||||
extern char *innobase_unix_file_flush_method;
|
|
||||||
/* The following variables have to be my_bool for SHOW VARIABLES to work */
|
|
||||||
extern my_bool innobase_log_archive,
|
|
||||||
innobase_use_doublewrite,
|
|
||||||
innobase_use_checksums,
|
|
||||||
innobase_use_large_pages,
|
|
||||||
innobase_use_native_aio,
|
|
||||||
innobase_file_per_table, innobase_locks_unsafe_for_binlog,
|
|
||||||
innobase_rollback_on_timeout,
|
|
||||||
innobase_create_status_file,
|
|
||||||
innobase_stats_on_metadata;
|
|
||||||
extern "C" {
|
|
||||||
extern ulong srv_buf_pool_curr_size;
|
|
||||||
extern ulong srv_buf_pool_size;
|
|
||||||
extern ulong srv_max_buf_pool_modified_pct;
|
|
||||||
extern ulong srv_max_purge_lag;
|
|
||||||
extern ulong srv_auto_extend_increment;
|
|
||||||
extern ulong srv_n_spin_wait_rounds;
|
|
||||||
extern ulong srv_n_free_tickets_to_enter;
|
|
||||||
extern ulong srv_thread_sleep_delay;
|
|
||||||
extern ulong srv_thread_concurrency;
|
|
||||||
extern ulong srv_commit_concurrency;
|
|
||||||
extern ulong srv_flush_log_at_trx_commit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
don't delete it - it may be re-enabled later
|
don't delete it - it may be re-enabled later
|
||||||
as an optimization for the most common case InnoDB+binlog
|
as an optimization for the most common case InnoDB+binlog
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libibuf.a
|
|
||||||
|
|
||||||
libibuf_a_SOURCES = ibuf0ibuf.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -150,9 +150,30 @@ ulint ibuf_flush_count = 0;
|
|||||||
#define IBUF_COUNT_N_PAGES 2000
|
#define IBUF_COUNT_N_PAGES 2000
|
||||||
|
|
||||||
/* Buffered entry counts for file pages, used in debugging */
|
/* Buffered entry counts for file pages, used in debugging */
|
||||||
static ulint* ibuf_counts[IBUF_COUNT_N_SPACES];
|
static ulint ibuf_counts[IBUF_COUNT_N_SPACES][IBUF_COUNT_N_PAGES];
|
||||||
|
|
||||||
static ibool ibuf_counts_inited = FALSE;
|
/**********************************************************************
|
||||||
|
Checks that the indexes to ibuf_counts[][] are within limits. */
|
||||||
|
UNIV_INLINE
|
||||||
|
void
|
||||||
|
ibuf_count_check(
|
||||||
|
/*=============*/
|
||||||
|
ulint space_id, /* in: space identifier */
|
||||||
|
ulint page_no) /* in: page number */
|
||||||
|
{
|
||||||
|
if (space_id < IBUF_COUNT_N_SPACES && page_no < IBUF_COUNT_N_PAGES) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(stderr,
|
||||||
|
"InnoDB: UNIV_IBUF_DEBUG limits space_id and page_no\n"
|
||||||
|
"InnoDB: and breaks crash recovery.\n"
|
||||||
|
"InnoDB: space_id=%lu, should be 0<=space_id<%lu\n"
|
||||||
|
"InnoDB: page_no=%lu, should be 0<=page_no<%lu\n",
|
||||||
|
(ulint) space_id, (ulint) IBUF_COUNT_N_SPACES,
|
||||||
|
(ulint) page_no, (ulint) IBUF_COUNT_N_PAGES);
|
||||||
|
ut_error;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The start address for an insert buffer bitmap page bitmap */
|
/* The start address for an insert buffer bitmap page bitmap */
|
||||||
@@ -330,15 +351,9 @@ ibuf_count_get(
|
|||||||
ulint space, /* in: space id */
|
ulint space, /* in: space id */
|
||||||
ulint page_no)/* in: page number */
|
ulint page_no)/* in: page number */
|
||||||
{
|
{
|
||||||
ut_ad(space < IBUF_COUNT_N_SPACES);
|
ibuf_count_check(space, page_no);
|
||||||
ut_ad(page_no < IBUF_COUNT_N_PAGES);
|
|
||||||
|
|
||||||
if (!ibuf_counts_inited) {
|
return(ibuf_counts[space][page_no]);
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(*(ibuf_counts[space] + page_no));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
@@ -351,11 +366,10 @@ ibuf_count_set(
|
|||||||
ulint page_no,/* in: page number */
|
ulint page_no,/* in: page number */
|
||||||
ulint val) /* in: value to set */
|
ulint val) /* in: value to set */
|
||||||
{
|
{
|
||||||
ut_a(space < IBUF_COUNT_N_SPACES);
|
ibuf_count_check(space, page_no);
|
||||||
ut_a(page_no < IBUF_COUNT_N_PAGES);
|
|
||||||
ut_a(val < UNIV_PAGE_SIZE);
|
ut_a(val < UNIV_PAGE_SIZE);
|
||||||
|
|
||||||
*(ibuf_counts[space] + page_no) = val;
|
ibuf_counts[space][page_no] = val;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -380,22 +394,6 @@ ibuf_init_at_db_start(void)
|
|||||||
|
|
||||||
ibuf->size = 0;
|
ibuf->size = 0;
|
||||||
|
|
||||||
#ifdef UNIV_IBUF_COUNT_DEBUG
|
|
||||||
{
|
|
||||||
ulint i, j;
|
|
||||||
|
|
||||||
for (i = 0; i < IBUF_COUNT_N_SPACES; i++) {
|
|
||||||
|
|
||||||
ibuf_counts[i] = mem_alloc(sizeof(ulint)
|
|
||||||
* IBUF_COUNT_N_PAGES);
|
|
||||||
for (j = 0; j < IBUF_COUNT_N_PAGES; j++) {
|
|
||||||
ibuf_count_set(i, j, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ibuf_counts_inited = TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
mutex_create(&ibuf_pessimistic_insert_mutex,
|
mutex_create(&ibuf_pessimistic_insert_mutex,
|
||||||
SYNC_IBUF_PESS_INSERT_MUTEX);
|
SYNC_IBUF_PESS_INSERT_MUTEX);
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
# Makefile included in Makefile.am in every subdirectory
|
|
||||||
|
|
||||||
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \
|
|
||||||
-I$(top_srcdir)/regex \
|
|
||||||
-I$(top_srcdir)/storage/innobase/include \
|
|
||||||
-I$(top_srcdir)/sql \
|
|
||||||
-I$(srcdir)
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -66,6 +66,11 @@ Created 5/24/1996 Heikki Tuuri
|
|||||||
it is needed on foreign key
|
it is needed on foreign key
|
||||||
constraint */
|
constraint */
|
||||||
|
|
||||||
|
#define DB_TOO_MANY_CONCURRENT_TRXS 47 /* when InnoDB runs out of the
|
||||||
|
preconfigured undo slots, this can
|
||||||
|
only happen when there are too many
|
||||||
|
concurrent transactions */
|
||||||
|
|
||||||
/* The following are partial failure codes */
|
/* The following are partial failure codes */
|
||||||
#define DB_FAIL 1000
|
#define DB_FAIL 1000
|
||||||
#define DB_OVERFLOW 1001
|
#define DB_OVERFLOW 1001
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
#ifndef HA_INNODB_PROTOTYPES_H
|
#ifndef HA_INNODB_PROTOTYPES_H
|
||||||
#define HA_INNODB_PROTOTYPES_H
|
#define HA_INNODB_PROTOTYPES_H
|
||||||
|
|
||||||
|
#include "univ.i" /* ulint, uint */
|
||||||
|
#include "m_ctype.h" /* CHARSET_INFO */
|
||||||
|
|
||||||
/* Prototypes for global functions in ha_innodb.cc that are called by
|
/* Prototypes for global functions in ha_innodb.cc that are called by
|
||||||
InnoDB's C-code. */
|
InnoDB's C-code. */
|
||||||
|
|
||||||
@@ -19,4 +22,17 @@ innobase_convert_string(
|
|||||||
CHARSET_INFO* from_cs,
|
CHARSET_INFO* from_cs,
|
||||||
uint* errors);
|
uint* errors);
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
Returns true if the thread is the replication thread on the slave
|
||||||
|
server. Used in srv_conc_enter_innodb() to determine if the thread
|
||||||
|
should be allowed to enter InnoDB - the replication thread is treated
|
||||||
|
differently than other threads. Also used in
|
||||||
|
srv_conc_force_exit_innodb(). */
|
||||||
|
|
||||||
|
ibool
|
||||||
|
thd_is_replication_slave_thread(
|
||||||
|
/*============================*/
|
||||||
|
/* out: true if thd is the replication thread */
|
||||||
|
void* thd); /* in: thread handle (THD*) */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -94,7 +94,8 @@ log. */
|
|||||||
#define OS_FILE_PATH_ERROR 74
|
#define OS_FILE_PATH_ERROR 74
|
||||||
#define OS_FILE_AIO_RESOURCES_RESERVED 75 /* wait for OS aio resources
|
#define OS_FILE_AIO_RESOURCES_RESERVED 75 /* wait for OS aio resources
|
||||||
to become available again */
|
to become available again */
|
||||||
#define OS_FILE_ERROR_NOT_SPECIFIED 76
|
#define OS_FILE_SHARING_VIOLATION 76
|
||||||
|
#define OS_FILE_ERROR_NOT_SPECIFIED 77
|
||||||
|
|
||||||
/* Types for aio operations */
|
/* Types for aio operations */
|
||||||
#define OS_FILE_READ 10
|
#define OS_FILE_READ 10
|
||||||
|
|||||||
@@ -578,6 +578,20 @@ row_undo_report_drop_table_dict_operation(
|
|||||||
/* out: DB_SUCCESS or error code */
|
/* out: DB_SUCCESS or error code */
|
||||||
trx_t* trx, /* in: query thread */
|
trx_t* trx, /* in: query thread */
|
||||||
const char* table_name); /* in: table name dropped */
|
const char* table_name); /* in: table name dropped */
|
||||||
|
/*************************************************************************
|
||||||
|
Get the min of the maximum possible row sizes. */
|
||||||
|
|
||||||
|
ulint
|
||||||
|
page_get_free_space_of_empty_noninline(
|
||||||
|
/*===================================*/
|
||||||
|
/* out: The (approx) maximum size
|
||||||
|
of a row, this is a conservative
|
||||||
|
estimate, since the size can be
|
||||||
|
slightly larger depending upon
|
||||||
|
the ROW_FORMAT setting.*/
|
||||||
|
dict_table_t* table); /* in: table for which max record
|
||||||
|
size required.*/
|
||||||
|
|
||||||
/* A struct describing a place for an individual column in the MySQL
|
/* A struct describing a place for an individual column in the MySQL
|
||||||
row format which is presented to the table handler in ha_innobase.
|
row format which is presented to the table handler in ha_innobase.
|
||||||
This template struct is used to speed up row transformations between
|
This template struct is used to speed up row transformations between
|
||||||
|
|||||||
@@ -84,9 +84,9 @@ extern ulong srv_flush_log_at_trx_commit;
|
|||||||
|
|
||||||
extern byte srv_latin1_ordering[256];/* The sort order table of the latin1
|
extern byte srv_latin1_ordering[256];/* The sort order table of the latin1
|
||||||
character set */
|
character set */
|
||||||
extern ulong srv_buf_pool_size; /* requested size in kilobytes */
|
extern ulong srv_buf_pool_size; /* requested size in bytes */
|
||||||
extern ulong srv_buf_pool_old_size; /* previously requested size */
|
extern ulong srv_buf_pool_old_size; /* previously requested size */
|
||||||
extern ulong srv_buf_pool_curr_size; /* current size in kilobytes */
|
extern ulong srv_buf_pool_curr_size; /* current size in bytes */
|
||||||
extern ulint srv_mem_pool_size;
|
extern ulint srv_mem_pool_size;
|
||||||
extern ulint srv_lock_table_size;
|
extern ulint srv_lock_table_size;
|
||||||
|
|
||||||
|
|||||||
@@ -464,7 +464,8 @@ struct trx_struct{
|
|||||||
dulint table_id; /* Table to drop iff dict_operation
|
dulint table_id; /* Table to drop iff dict_operation
|
||||||
is TRUE.*/
|
is TRUE.*/
|
||||||
/*------------------------------*/
|
/*------------------------------*/
|
||||||
int active_trans; /* 1 - if a transaction in MySQL
|
unsigned duplicates:2; /* TRX_DUP_IGNORE | TRX_DUP_REPLACE */
|
||||||
|
unsigned active_trans:2; /* 1 - if a transaction in MySQL
|
||||||
is active. 2 - if prepare_commit_mutex
|
is active. 2 - if prepare_commit_mutex
|
||||||
was taken */
|
was taken */
|
||||||
void* mysql_thd; /* MySQL thread handle corresponding
|
void* mysql_thd; /* MySQL thread handle corresponding
|
||||||
@@ -616,7 +617,7 @@ struct trx_struct{
|
|||||||
NULL */
|
NULL */
|
||||||
ibool was_chosen_as_deadlock_victim;
|
ibool was_chosen_as_deadlock_victim;
|
||||||
/* when the transaction decides to wait
|
/* when the transaction decides to wait
|
||||||
for a lock, this it sets this to FALSE;
|
for a lock, it sets this to FALSE;
|
||||||
if another transaction chooses this
|
if another transaction chooses this
|
||||||
transaction as a victim in deadlock
|
transaction as a victim in deadlock
|
||||||
resolution, it sets this to TRUE */
|
resolution, it sets this to TRUE */
|
||||||
@@ -657,7 +658,12 @@ struct trx_struct{
|
|||||||
cannot be any activity in the undo
|
cannot be any activity in the undo
|
||||||
logs! */
|
logs! */
|
||||||
dulint undo_no; /* next undo log record number to
|
dulint undo_no; /* next undo log record number to
|
||||||
assign */
|
assign; since the undo log is
|
||||||
|
private for a transaction, this
|
||||||
|
is a simple ascending sequence
|
||||||
|
with no gaps; thus it represents
|
||||||
|
the number of modified/inserted
|
||||||
|
rows in a transaction */
|
||||||
trx_savept_t last_sql_stat_start;
|
trx_savept_t last_sql_stat_start;
|
||||||
/* undo_no when the last sql statement
|
/* undo_no when the last sql statement
|
||||||
was started: in case of an error, trx
|
was started: in case of an error, trx
|
||||||
@@ -687,19 +693,19 @@ struct trx_struct{
|
|||||||
single operation of a
|
single operation of a
|
||||||
transaction, e.g., a parallel
|
transaction, e.g., a parallel
|
||||||
query */
|
query */
|
||||||
/* Transaction concurrency states */
|
/* Transaction concurrency states (trx->conc_state) */
|
||||||
#define TRX_NOT_STARTED 1
|
#define TRX_NOT_STARTED 1
|
||||||
#define TRX_ACTIVE 2
|
#define TRX_ACTIVE 2
|
||||||
#define TRX_COMMITTED_IN_MEMORY 3
|
#define TRX_COMMITTED_IN_MEMORY 3
|
||||||
#define TRX_PREPARED 4 /* Support for 2PC/XA */
|
#define TRX_PREPARED 4 /* Support for 2PC/XA */
|
||||||
|
|
||||||
/* Transaction execution states when trx state is TRX_ACTIVE */
|
/* Transaction execution states when trx->conc_state == TRX_ACTIVE */
|
||||||
#define TRX_QUE_RUNNING 1 /* transaction is running */
|
#define TRX_QUE_RUNNING 1 /* transaction is running */
|
||||||
#define TRX_QUE_LOCK_WAIT 2 /* transaction is waiting for a lock */
|
#define TRX_QUE_LOCK_WAIT 2 /* transaction is waiting for a lock */
|
||||||
#define TRX_QUE_ROLLING_BACK 3 /* transaction is rolling back */
|
#define TRX_QUE_ROLLING_BACK 3 /* transaction is rolling back */
|
||||||
#define TRX_QUE_COMMITTING 4 /* transaction is committing */
|
#define TRX_QUE_COMMITTING 4 /* transaction is committing */
|
||||||
|
|
||||||
/* Transaction isolation levels */
|
/* Transaction isolation levels (trx->isolation_level) */
|
||||||
#define TRX_ISO_READ_UNCOMMITTED 1 /* dirty read: non-locking
|
#define TRX_ISO_READ_UNCOMMITTED 1 /* dirty read: non-locking
|
||||||
SELECTs are performed so that
|
SELECTs are performed so that
|
||||||
we do not look at a possible
|
we do not look at a possible
|
||||||
@@ -734,6 +740,12 @@ struct trx_struct{
|
|||||||
converted to LOCK IN SHARE
|
converted to LOCK IN SHARE
|
||||||
MODE reads */
|
MODE reads */
|
||||||
|
|
||||||
|
/* Treatment of duplicate values (trx->duplicates; for example, in inserts).
|
||||||
|
Multiple flags can be combined with bitwise OR. */
|
||||||
|
#define TRX_DUP_IGNORE 1 /* duplicate rows are to be updated */
|
||||||
|
#define TRX_DUP_REPLACE 2 /* duplicate rows are to be replaced */
|
||||||
|
|
||||||
|
|
||||||
/* Types of a trx signal */
|
/* Types of a trx signal */
|
||||||
#define TRX_SIG_NO_SIGNAL 100
|
#define TRX_SIG_NO_SIGNAL 100
|
||||||
#define TRX_SIG_TOTAL_ROLLBACK 1
|
#define TRX_SIG_TOTAL_ROLLBACK 1
|
||||||
|
|||||||
@@ -228,13 +228,16 @@ trx_undo_lists_init(
|
|||||||
Assigns an undo log for a transaction. A new undo log is created or a cached
|
Assigns an undo log for a transaction. A new undo log is created or a cached
|
||||||
undo log reused. */
|
undo log reused. */
|
||||||
|
|
||||||
trx_undo_t*
|
ulint
|
||||||
trx_undo_assign_undo(
|
trx_undo_assign_undo(
|
||||||
/*=================*/
|
/*=================*/
|
||||||
/* out: the undo log, NULL if did not succeed: out of
|
/* out: DB_SUCCESS if undo log assign
|
||||||
space */
|
* successful, possible error codes are:
|
||||||
trx_t* trx, /* in: transaction */
|
* ER_TOO_MANY_CONCURRENT_TRXS
|
||||||
ulint type); /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
|
* DB_OUT_OF_FILE_SPAC
|
||||||
|
* DB_OUT_OF_MEMORY */
|
||||||
|
trx_t* trx, /* in: transaction */
|
||||||
|
ulint type); /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Sets the state of the undo log segment at a transaction finish. */
|
Sets the state of the undo log segment at a transaction finish. */
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = liblock.a
|
|
||||||
|
|
||||||
liblock_a_SOURCES = lock0lock.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -4588,12 +4588,9 @@ lock_table_queue_validate(
|
|||||||
dict_table_t* table) /* in: table */
|
dict_table_t* table) /* in: table */
|
||||||
{
|
{
|
||||||
lock_t* lock;
|
lock_t* lock;
|
||||||
ibool is_waiting;
|
|
||||||
|
|
||||||
ut_ad(mutex_own(&kernel_mutex));
|
ut_ad(mutex_own(&kernel_mutex));
|
||||||
|
|
||||||
is_waiting = FALSE;
|
|
||||||
|
|
||||||
lock = UT_LIST_GET_FIRST(table->locks);
|
lock = UT_LIST_GET_FIRST(table->locks);
|
||||||
|
|
||||||
while (lock) {
|
while (lock) {
|
||||||
@@ -4603,13 +4600,10 @@ lock_table_queue_validate(
|
|||||||
|
|
||||||
if (!lock_get_wait(lock)) {
|
if (!lock_get_wait(lock)) {
|
||||||
|
|
||||||
ut_a(!is_waiting);
|
|
||||||
|
|
||||||
ut_a(!lock_table_other_has_incompatible(
|
ut_a(!lock_table_other_has_incompatible(
|
||||||
lock->trx, 0, table,
|
lock->trx, 0, table,
|
||||||
lock_get_mode(lock)));
|
lock_get_mode(lock)));
|
||||||
} else {
|
} else {
|
||||||
is_waiting = TRUE;
|
|
||||||
|
|
||||||
ut_a(lock_table_has_to_wait_in_queue(lock));
|
ut_a(lock_table_has_to_wait_in_queue(lock));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = liblog.a
|
|
||||||
|
|
||||||
liblog_a_SOURCES = log0log.c log0recv.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libmach.a
|
|
||||||
|
|
||||||
libmach_a_SOURCES = mach0data.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libmem.a
|
|
||||||
|
|
||||||
libmem_a_SOURCES = mem0mem.c mem0pool.c
|
|
||||||
|
|
||||||
EXTRA_DIST = mem0dbg.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libmtr.a
|
|
||||||
|
|
||||||
libmtr_a_SOURCES = mtr0mtr.c mtr0log.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -3177,3 +3177,39 @@ SELECT * FROM t1;
|
|||||||
a
|
a
|
||||||
DDD
|
DDD
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=42;
|
||||||
|
INSERT INTO t1 VALUES (0),(347),(0);
|
||||||
|
SELECT * FROM t1;
|
||||||
|
id
|
||||||
|
42
|
||||||
|
347
|
||||||
|
348
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
|
||||||
|
CREATE TABLE t2 (id int PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t2 VALUES(42),(347),(348);
|
||||||
|
ALTER TABLE t1 ADD CONSTRAINT t1_t2 FOREIGN KEY (id) REFERENCES t2(id);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
CONSTRAINT `t1_t2` FOREIGN KEY (`id`) REFERENCES `t2` (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
|
||||||
|
DROP TABLE t1,t2;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
|
||||||
|
c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
|
||||||
|
c09 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
|
||||||
|
c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
|
||||||
|
c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
|
||||||
|
c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
|
||||||
|
c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
|
||||||
|
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
|
||||||
|
) ENGINE = InnoDB;
|
||||||
|
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
|
||||||
|
|||||||
@@ -2320,6 +2320,41 @@ INSERT INTO t1 VALUES ('DDD');
|
|||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #23313 (AUTO_INCREMENT=# not reported back for InnoDB tables)
|
||||||
|
# Bug #21404 (AUTO_INCREMENT value reset when Adding FKEY (or ALTER?))
|
||||||
|
#
|
||||||
|
|
||||||
|
CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
|
||||||
|
AUTO_INCREMENT=42;
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES (0),(347),(0);
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (id int PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t2 VALUES(42),(347),(348);
|
||||||
|
ALTER TABLE t1 ADD CONSTRAINT t1_t2 FOREIGN KEY (id) REFERENCES t2(id);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
|
||||||
|
DROP TABLE t1,t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #21101 (Prints wrong error message if max row size is too large)
|
||||||
|
#
|
||||||
|
--error 1118
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
|
||||||
|
c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
|
||||||
|
c09 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
|
||||||
|
c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
|
||||||
|
c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
|
||||||
|
c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
|
||||||
|
c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
|
||||||
|
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
|
||||||
|
) ENGINE = InnoDB;
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# #
|
# #
|
||||||
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
|
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
|
||||||
|
|||||||
72
mysql.patch
72
mysql.patch
@@ -1,72 +0,0 @@
|
|||||||
diff -pu mysql-5.1-bk/sql/mysqld.cc mysql-5.1-zip/sql/mysqld.cc
|
|
||||||
--- mysql-5.1-bk/sql/mysqld.cc 2006-11-09 16:01:19.000000000 +0200
|
|
||||||
+++ mysql-5.1-zip/sql/mysqld.cc 2006-11-13 12:54:04.000000000 +0200
|
|
||||||
@@ -370,7 +370,6 @@ extern long innobase_lock_scan_time;
|
|
||||||
extern long innobase_mirrored_log_groups, innobase_log_files_in_group;
|
|
||||||
extern longlong innobase_log_file_size;
|
|
||||||
extern long innobase_log_buffer_size;
|
|
||||||
-extern longlong innobase_buffer_pool_size;
|
|
||||||
extern long innobase_additional_mem_pool_size;
|
|
||||||
extern long innobase_file_io_threads, innobase_lock_wait_timeout;
|
|
||||||
extern long innobase_force_recovery;
|
|
||||||
@@ -390,6 +389,8 @@ extern "C" {
|
|
||||||
extern ulong srv_max_buf_pool_modified_pct;
|
|
||||||
extern ulong srv_max_purge_lag;
|
|
||||||
extern ulong srv_auto_extend_increment;
|
|
||||||
+extern ulong srv_buf_pool_curr_size;
|
|
||||||
+extern ulong srv_buf_pool_size;
|
|
||||||
extern ulong srv_n_spin_wait_rounds;
|
|
||||||
extern ulong srv_n_free_tickets_to_enter;
|
|
||||||
extern ulong srv_thread_sleep_delay;
|
|
||||||
@@ -5801,9 +5802,9 @@ log and this option does nothing anymore
|
|
||||||
(gptr*) &srv_auto_extend_increment,
|
|
||||||
0, GET_LONG, REQUIRED_ARG, 8L, 1L, 1000L, 0, 1L, 0},
|
|
||||||
{"innodb_buffer_pool_size", OPT_INNODB_BUFFER_POOL_SIZE,
|
|
||||||
- "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
|
|
||||||
- (gptr*) &innobase_buffer_pool_size, (gptr*) &innobase_buffer_pool_size, 0,
|
|
||||||
- GET_LL, REQUIRED_ARG, 8*1024*1024L, 1024*1024L, LONGLONG_MAX, 0,
|
|
||||||
+ "The requested size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
|
|
||||||
+ (gptr*) &srv_buf_pool_size, (gptr*) &srv_buf_pool_size, 0,
|
|
||||||
+ GET_LL, REQUIRED_ARG, 8*1024*1024L, 5*1024*1024L, LONGLONG_MAX, 0,
|
|
||||||
1024*1024L, 0},
|
|
||||||
{"innodb_commit_concurrency", OPT_INNODB_COMMIT_CONCURRENCY,
|
|
||||||
"Helps in performance tuning in heavily concurrent environments.",
|
|
||||||
diff -pu mysql-5.1-bk/sql/set_var.cc mysql-5.1-zip/sql/set_var.cc
|
|
||||||
--- mysql-5.1-bk/sql/set_var.cc 2006-11-09 16:01:19.000000000 +0200
|
|
||||||
+++ mysql-5.1-zip/sql/set_var.cc 2006-11-13 12:54:05.000000000 +0200
|
|
||||||
@@ -65,7 +65,6 @@ extern ulong innobase_fast_shutdown;
|
|
||||||
extern long innobase_mirrored_log_groups, innobase_log_files_in_group;
|
|
||||||
extern longlong innobase_log_file_size;
|
|
||||||
extern long innobase_log_buffer_size;
|
|
||||||
-extern longlong innobase_buffer_pool_size;
|
|
||||||
extern long innobase_additional_mem_pool_size;
|
|
||||||
extern long innobase_file_io_threads, innobase_lock_wait_timeout;
|
|
||||||
extern long innobase_force_recovery;
|
|
||||||
@@ -81,6 +80,8 @@ extern my_bool innobase_log_archive,
|
|
||||||
innobase_locks_unsafe_for_binlog;
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
+extern ulong srv_buf_pool_curr_size;
|
|
||||||
+extern ulong srv_buf_pool_size;
|
|
||||||
extern ulong srv_max_buf_pool_modified_pct;
|
|
||||||
extern ulong srv_max_purge_lag;
|
|
||||||
extern ulong srv_auto_extend_increment;
|
|
||||||
@@ -499,6 +500,8 @@ sys_var_thd_bool sys_innodb_support_xa("
|
|
||||||
&SV::innodb_support_xa);
|
|
||||||
sys_var_long_ptr sys_innodb_autoextend_increment("innodb_autoextend_increment",
|
|
||||||
&srv_auto_extend_increment);
|
|
||||||
+sys_var_long_ptr sys_innodb_buffer_pool_size("innodb_buffer_pool_size",
|
|
||||||
+ &srv_buf_pool_size);
|
|
||||||
sys_var_long_ptr sys_innodb_sync_spin_loops("innodb_sync_spin_loops",
|
|
||||||
&srv_n_spin_wait_rounds);
|
|
||||||
sys_var_long_ptr sys_innodb_concurrency_tickets("innodb_concurrency_tickets",
|
|
||||||
@@ -818,7 +821,8 @@ SHOW_VAR init_vars[]= {
|
|
||||||
#ifdef WITH_INNOBASE_STORAGE_ENGINE
|
|
||||||
{"innodb_additional_mem_pool_size", (char*) &innobase_additional_mem_pool_size, SHOW_LONG },
|
|
||||||
{sys_innodb_autoextend_increment.name, (char*) &sys_innodb_autoextend_increment, SHOW_SYS},
|
|
||||||
- {"innodb_buffer_pool_size", (char*) &innobase_buffer_pool_size, SHOW_LONGLONG },
|
|
||||||
+ {sys_innodb_buffer_pool_size.name, (char*) &sys_innodb_buffer_pool_size, SHOW_SYS },
|
|
||||||
+ {"innodb_buffer_pool_curr_size", (char*) &srv_buf_pool_curr_size, SHOW_LONGLONG },
|
|
||||||
{"innodb_checksums", (char*) &innobase_use_checksums, SHOW_MY_BOOL},
|
|
||||||
{sys_innodb_commit_concurrency.name, (char*) &sys_innodb_commit_concurrency, SHOW_SYS},
|
|
||||||
{sys_innodb_concurrency_tickets.name, (char*) &sys_innodb_concurrency_tickets, SHOW_SYS},
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003-2004 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libos.a
|
|
||||||
|
|
||||||
libos_a_SOURCES = os0proc.c os0sync.c os0thread.c os0file.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
16
os/os0file.c
16
os/os0file.c
@@ -250,6 +250,15 @@ os_file_get_last_error(
|
|||||||
"InnoDB: the directory. It may also be"
|
"InnoDB: the directory. It may also be"
|
||||||
" you have created a subdirectory\n"
|
" you have created a subdirectory\n"
|
||||||
"InnoDB: of the same name as a data file.\n");
|
"InnoDB: of the same name as a data file.\n");
|
||||||
|
} else if (err == ERROR_SHARING_VIOLATION
|
||||||
|
|| err == ERROR_LOCK_VIOLATION) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"InnoDB: The error means that another program"
|
||||||
|
" is using InnoDB's files.\n"
|
||||||
|
"InnoDB: This might be a backup or antivirus"
|
||||||
|
" software or another instance\n"
|
||||||
|
"InnoDB: of MySQL."
|
||||||
|
" Please close it to get rid of this error.\n");
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Some operating system error numbers"
|
"InnoDB: Some operating system error numbers"
|
||||||
@@ -268,6 +277,9 @@ os_file_get_last_error(
|
|||||||
return(OS_FILE_DISK_FULL);
|
return(OS_FILE_DISK_FULL);
|
||||||
} else if (err == ERROR_FILE_EXISTS) {
|
} else if (err == ERROR_FILE_EXISTS) {
|
||||||
return(OS_FILE_ALREADY_EXISTS);
|
return(OS_FILE_ALREADY_EXISTS);
|
||||||
|
} else if (err == ERROR_SHARING_VIOLATION
|
||||||
|
|| err == ERROR_LOCK_VIOLATION) {
|
||||||
|
return(OS_FILE_SHARING_VIOLATION);
|
||||||
} else {
|
} else {
|
||||||
return(100 + err);
|
return(100 + err);
|
||||||
}
|
}
|
||||||
@@ -388,6 +400,10 @@ os_file_handle_error_cond_exit(
|
|||||||
|| err == OS_FILE_PATH_ERROR) {
|
|| err == OS_FILE_PATH_ERROR) {
|
||||||
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
} else if (err == OS_FILE_SHARING_VIOLATION) {
|
||||||
|
|
||||||
|
os_thread_sleep(10000000); /* 10 sec */
|
||||||
|
return(TRUE);
|
||||||
} else {
|
} else {
|
||||||
if (name) {
|
if (name) {
|
||||||
fprintf(stderr, "InnoDB: File name %s\n", name);
|
fprintf(stderr, "InnoDB: File name %s\n", name);
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libpage.a
|
|
||||||
|
|
||||||
libpage_a_SOURCES = page0page.c page0cur.c page0zip.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libpars.a
|
|
||||||
|
|
||||||
noinst_HEADERS = pars0grm.h
|
|
||||||
|
|
||||||
libpars_a_SOURCES = pars0grm.c lexyy.c pars0opt.c pars0pars.c pars0sym.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
33
plug.in
33
plug.in
@@ -2,6 +2,8 @@ MYSQL_STORAGE_ENGINE(innobase, innodb, [InnoDB Storage Engine],
|
|||||||
[Transactional Tables using InnoDB], [max,max-no-ndb])
|
[Transactional Tables using InnoDB], [max,max-no-ndb])
|
||||||
MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase])
|
MYSQL_PLUGIN_DIRECTORY(innobase, [storage/innobase])
|
||||||
MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
|
MYSQL_PLUGIN_STATIC(innobase, [libinnobase.a])
|
||||||
|
MYSQL_PLUGIN_DYNAMIC(innobase, [ha_innodb.la])
|
||||||
|
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(innobase, [handler/ha_innodb.cc])
|
||||||
MYSQL_PLUGIN_ACTIONS(innobase, [
|
MYSQL_PLUGIN_ACTIONS(innobase, [
|
||||||
AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
|
AC_CHECK_LIB(rt, aio_read, [innodb_system_libs="-lrt"])
|
||||||
AC_SUBST(innodb_system_libs)
|
AC_SUBST(innodb_system_libs)
|
||||||
@@ -38,37 +40,6 @@ MYSQL_PLUGIN_ACTIONS(innobase, [
|
|||||||
openbsd*)
|
openbsd*)
|
||||||
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
|
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
|
||||||
esac
|
esac
|
||||||
AC_CONFIG_FILES(
|
|
||||||
storage/innobase/ut/Makefile
|
|
||||||
storage/innobase/btr/Makefile
|
|
||||||
storage/innobase/buf/Makefile
|
|
||||||
storage/innobase/data/Makefile
|
|
||||||
storage/innobase/dict/Makefile
|
|
||||||
storage/innobase/dyn/Makefile
|
|
||||||
storage/innobase/eval/Makefile
|
|
||||||
storage/innobase/fil/Makefile
|
|
||||||
storage/innobase/fsp/Makefile
|
|
||||||
storage/innobase/fut/Makefile
|
|
||||||
storage/innobase/ha/Makefile
|
|
||||||
storage/innobase/ibuf/Makefile
|
|
||||||
storage/innobase/lock/Makefile
|
|
||||||
storage/innobase/log/Makefile
|
|
||||||
storage/innobase/mach/Makefile
|
|
||||||
storage/innobase/mem/Makefile
|
|
||||||
storage/innobase/mtr/Makefile
|
|
||||||
storage/innobase/os/Makefile
|
|
||||||
storage/innobase/page/Makefile
|
|
||||||
storage/innobase/pars/Makefile
|
|
||||||
storage/innobase/que/Makefile
|
|
||||||
storage/innobase/read/Makefile
|
|
||||||
storage/innobase/rem/Makefile
|
|
||||||
storage/innobase/row/Makefile
|
|
||||||
storage/innobase/srv/Makefile
|
|
||||||
storage/innobase/sync/Makefile
|
|
||||||
storage/innobase/thr/Makefile
|
|
||||||
storage/innobase/trx/Makefile
|
|
||||||
storage/innobase/handler/Makefile
|
|
||||||
storage/innobase/usr/Makefile)
|
|
||||||
])
|
])
|
||||||
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(innobase, [handler/ha_innodb.cc])
|
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS(innobase, [handler/ha_innodb.cc])
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libque.a
|
|
||||||
|
|
||||||
libque_a_SOURCES = que0que.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libread.a
|
|
||||||
|
|
||||||
libread_a_SOURCES = read0read.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = librem.a
|
|
||||||
|
|
||||||
librem_a_SOURCES = rem0rec.c rem0cmp.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = librow.a
|
|
||||||
|
|
||||||
librow_a_SOURCES = row0ext.c row0merge.c\
|
|
||||||
row0ins.c row0mysql.c row0purge.c row0row.c row0sel.c\
|
|
||||||
row0uins.c row0umod.c row0undo.c row0upd.c row0vers.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -51,21 +51,6 @@ innobase_invalidate_query_cache(
|
|||||||
ulint full_name_len); /* in: full name length where also the null
|
ulint full_name_len); /* in: full name length where also the null
|
||||||
chars count */
|
chars count */
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
This function returns true if
|
|
||||||
|
|
||||||
1) SQL-query in the current thread
|
|
||||||
is either REPLACE or LOAD DATA INFILE REPLACE.
|
|
||||||
|
|
||||||
2) SQL-query in the current thread
|
|
||||||
is INSERT ON DUPLICATE KEY UPDATE.
|
|
||||||
|
|
||||||
NOTE that /mysql/innobase/row/row0ins.c must contain the
|
|
||||||
prototype for this function ! */
|
|
||||||
|
|
||||||
ibool
|
|
||||||
innobase_query_is_update(void);
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Creates an insert node struct. */
|
Creates an insert node struct. */
|
||||||
|
|
||||||
@@ -1667,6 +1652,7 @@ row_ins_scan_sec_index_for_duplicate(
|
|||||||
btr_pcur_t pcur;
|
btr_pcur_t pcur;
|
||||||
ulint err = DB_SUCCESS;
|
ulint err = DB_SUCCESS;
|
||||||
ibool moved;
|
ibool moved;
|
||||||
|
unsigned allow_duplicates;
|
||||||
mtr_t mtr;
|
mtr_t mtr;
|
||||||
mem_heap_t* heap = NULL;
|
mem_heap_t* heap = NULL;
|
||||||
ulint offsets_[REC_OFFS_NORMAL_SIZE];
|
ulint offsets_[REC_OFFS_NORMAL_SIZE];
|
||||||
@@ -1699,6 +1685,8 @@ row_ins_scan_sec_index_for_duplicate(
|
|||||||
|
|
||||||
block = btr_pcur_get_block(&pcur);
|
block = btr_pcur_get_block(&pcur);
|
||||||
|
|
||||||
|
allow_duplicates = thr_get_trx(thr)->duplicates & TRX_DUP_IGNORE;
|
||||||
|
|
||||||
/* Scan index records and check if there is a duplicate */
|
/* Scan index records and check if there is a duplicate */
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@@ -1712,7 +1700,7 @@ row_ins_scan_sec_index_for_duplicate(
|
|||||||
offsets = rec_get_offsets(rec, index, offsets,
|
offsets = rec_get_offsets(rec, index, offsets,
|
||||||
ULINT_UNDEFINED, &heap);
|
ULINT_UNDEFINED, &heap);
|
||||||
|
|
||||||
if (innobase_query_is_update()) {
|
if (allow_duplicates) {
|
||||||
|
|
||||||
/* If the SQL-query will update or replace
|
/* If the SQL-query will update or replace
|
||||||
duplicate key we will take X-lock for
|
duplicate key we will take X-lock for
|
||||||
@@ -1843,7 +1831,7 @@ row_ins_duplicate_error_in_clust(
|
|||||||
sure that in roll-forward we get the same duplicate
|
sure that in roll-forward we get the same duplicate
|
||||||
errors as in original execution */
|
errors as in original execution */
|
||||||
|
|
||||||
if (innobase_query_is_update()) {
|
if (trx->duplicates & TRX_DUP_IGNORE) {
|
||||||
|
|
||||||
/* If the SQL-query will update or replace
|
/* If the SQL-query will update or replace
|
||||||
duplicate key we will take X-lock for
|
duplicate key we will take X-lock for
|
||||||
@@ -1883,7 +1871,7 @@ row_ins_duplicate_error_in_clust(
|
|||||||
offsets = rec_get_offsets(rec, cursor->index, offsets,
|
offsets = rec_get_offsets(rec, cursor->index, offsets,
|
||||||
ULINT_UNDEFINED, &heap);
|
ULINT_UNDEFINED, &heap);
|
||||||
|
|
||||||
if (innobase_query_is_update()) {
|
if (trx->duplicates & TRX_DUP_IGNORE) {
|
||||||
|
|
||||||
/* If the SQL-query will update or replace
|
/* If the SQL-query will update or replace
|
||||||
duplicate key we will take X-lock for
|
duplicate key we will take X-lock for
|
||||||
|
|||||||
@@ -484,7 +484,8 @@ handle_new_error:
|
|||||||
/* MySQL will roll back the latest SQL statement */
|
/* MySQL will roll back the latest SQL statement */
|
||||||
} else if (err == DB_ROW_IS_REFERENCED
|
} else if (err == DB_ROW_IS_REFERENCED
|
||||||
|| err == DB_NO_REFERENCED_ROW
|
|| err == DB_NO_REFERENCED_ROW
|
||||||
|| err == DB_CANNOT_ADD_CONSTRAINT) {
|
|| err == DB_CANNOT_ADD_CONSTRAINT
|
||||||
|
|| err == DB_TOO_MANY_CONCURRENT_TRXS) {
|
||||||
if (savept) {
|
if (savept) {
|
||||||
/* Roll back the latest, possibly incomplete
|
/* Roll back the latest, possibly incomplete
|
||||||
insertion or update */
|
insertion or update */
|
||||||
@@ -4579,3 +4580,24 @@ row_remove_indexes_for_mysql(
|
|||||||
return(error);
|
return(error);
|
||||||
}
|
}
|
||||||
#endif /* !UNIV_HOTBACKUP */
|
#endif /* !UNIV_HOTBACKUP */
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Get the maximum row size. */
|
||||||
|
|
||||||
|
ulint
|
||||||
|
page_get_free_space_of_empty_noninline(
|
||||||
|
/*===================================*/
|
||||||
|
/* out: The (approx) maximum size
|
||||||
|
of a row, this is a conservative
|
||||||
|
estimate, since the size can be
|
||||||
|
slightly larger depending upon
|
||||||
|
the ROW_FORMAT setting.*/
|
||||||
|
dict_table_t* table) /* in: table for which max record
|
||||||
|
size is required.*/
|
||||||
|
{
|
||||||
|
ibool compact;
|
||||||
|
|
||||||
|
compact = dict_table_is_comp(table);
|
||||||
|
|
||||||
|
return(page_get_free_space_of_empty(compact) / 2);
|
||||||
|
}
|
||||||
|
|||||||
@@ -3671,6 +3671,33 @@ shortcut_fails_too_big_rec:
|
|||||||
pcur, 0, &mtr);
|
pcur, 0, &mtr);
|
||||||
|
|
||||||
pcur->trx_if_known = trx;
|
pcur->trx_if_known = trx;
|
||||||
|
|
||||||
|
rec = btr_pcur_get_rec(pcur);
|
||||||
|
|
||||||
|
if (!moves_up
|
||||||
|
&& !page_rec_is_supremum(rec)
|
||||||
|
&& set_also_gap_locks
|
||||||
|
&& !(srv_locks_unsafe_for_binlog
|
||||||
|
|| trx->isolation_level == TRX_ISO_READ_COMMITTED)
|
||||||
|
&& prebuilt->select_lock_type != LOCK_NONE) {
|
||||||
|
|
||||||
|
/* Try to place a gap lock on the next index record
|
||||||
|
to prevent phantoms in ORDER BY ... DESC queries */
|
||||||
|
|
||||||
|
offsets = rec_get_offsets(page_rec_get_next(rec),
|
||||||
|
index, offsets,
|
||||||
|
ULINT_UNDEFINED, &heap);
|
||||||
|
err = sel_set_rec_lock(btr_pcur_get_block(pcur),
|
||||||
|
page_rec_get_next(rec),
|
||||||
|
index, offsets,
|
||||||
|
prebuilt->select_lock_type,
|
||||||
|
LOCK_GAP, thr);
|
||||||
|
|
||||||
|
if (err != DB_SUCCESS) {
|
||||||
|
|
||||||
|
goto lock_wait_or_error;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mode == PAGE_CUR_G) {
|
if (mode == PAGE_CUR_G) {
|
||||||
btr_pcur_open_at_index_side(
|
btr_pcur_open_at_index_side(
|
||||||
|
|||||||
2
setup.sh
2
setup.sh
@@ -13,7 +13,7 @@ TARGETDIR=../storage/innobase
|
|||||||
ln -sf $TARGETDIR/compile-innodb{,-debug} ../../BUILD
|
ln -sf $TARGETDIR/compile-innodb{,-debug} ../../BUILD
|
||||||
|
|
||||||
cd ../../mysql-test/t
|
cd ../../mysql-test/t
|
||||||
ln -sf ../$TARGETDIR/mysql-test/*.test $TARGETDIR/mysql-test/*.opt .
|
ln -sf ../$TARGETDIR/mysql-test/*.test ../$TARGETDIR/mysql-test/*.opt .
|
||||||
cd ../r
|
cd ../r
|
||||||
ln -sf ../$TARGETDIR/mysql-test/*.result .
|
ln -sf ../$TARGETDIR/mysql-test/*.result .
|
||||||
cd ../include
|
cd ../include
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003-2004 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libsrv.a
|
|
||||||
|
|
||||||
libsrv_a_SOURCES = srv0srv.c srv0que.c srv0start.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -47,6 +47,7 @@ Created 10/8/1995 Heikki Tuuri
|
|||||||
#include "dict0boot.h"
|
#include "dict0boot.h"
|
||||||
#include "srv0start.h"
|
#include "srv0start.h"
|
||||||
#include "row0mysql.h"
|
#include "row0mysql.h"
|
||||||
|
#include "ha_prototypes.h"
|
||||||
|
|
||||||
/* This is set to TRUE if the MySQL user has set it in MySQL; currently
|
/* This is set to TRUE if the MySQL user has set it in MySQL; currently
|
||||||
affects only FOREIGN KEY definition parsing */
|
affects only FOREIGN KEY definition parsing */
|
||||||
@@ -177,6 +178,16 @@ ib_uint64_t srv_archive_recovery_limit_lsn;
|
|||||||
|
|
||||||
ulint srv_lock_wait_timeout = 1024 * 1024 * 1024;
|
ulint srv_lock_wait_timeout = 1024 * 1024 * 1024;
|
||||||
|
|
||||||
|
/* This parameter is used to throttle the number of insert buffers that are
|
||||||
|
merged in a batch. By increasing this parameter on a faster disk you can
|
||||||
|
possibly reduce the number of I/O operations performed to complete the
|
||||||
|
merge operation. The value of this parameter is used as is by the
|
||||||
|
background loop when the system is idle (low load), on a busy system
|
||||||
|
the parameter is scaled down by a factor of 4, this is to avoid putting
|
||||||
|
a heavier load on the I/O sub system. */
|
||||||
|
|
||||||
|
ulong srv_insert_buffer_batch_size = 20;
|
||||||
|
|
||||||
char* srv_file_flush_method_str = NULL;
|
char* srv_file_flush_method_str = NULL;
|
||||||
ulint srv_unix_file_flush_method = SRV_UNIX_FDATASYNC;
|
ulint srv_unix_file_flush_method = SRV_UNIX_FDATASYNC;
|
||||||
ulint srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
|
ulint srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED;
|
||||||
@@ -969,6 +980,17 @@ srv_conc_enter_innodb(
|
|||||||
srv_conc_slot_t* slot = NULL;
|
srv_conc_slot_t* slot = NULL;
|
||||||
ulint i;
|
ulint i;
|
||||||
|
|
||||||
|
if (trx->mysql_thd != NULL
|
||||||
|
&& thd_is_replication_slave_thread(trx->mysql_thd)) {
|
||||||
|
|
||||||
|
/* TODO Do something more interesting (based on a config
|
||||||
|
parameter). Some users what to give the replication
|
||||||
|
thread very low priority, see http://bugs.mysql.com/25078
|
||||||
|
This can be done by introducing
|
||||||
|
innodb_replication_delay(ms) config parameter */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* If trx has 'free tickets' to enter the engine left, then use one
|
/* If trx has 'free tickets' to enter the engine left, then use one
|
||||||
such ticket */
|
such ticket */
|
||||||
|
|
||||||
@@ -1009,7 +1031,7 @@ retry:
|
|||||||
if (!has_slept && !trx->has_search_latch
|
if (!has_slept && !trx->has_search_latch
|
||||||
&& NULL == UT_LIST_GET_FIRST(trx->trx_locks)) {
|
&& NULL == UT_LIST_GET_FIRST(trx->trx_locks)) {
|
||||||
|
|
||||||
has_slept = TRUE; /* We let is sleep only once to avoid
|
has_slept = TRUE; /* We let it sleep only once to avoid
|
||||||
starvation */
|
starvation */
|
||||||
|
|
||||||
srv_conc_n_waiting_threads++;
|
srv_conc_n_waiting_threads++;
|
||||||
@@ -1144,6 +1166,12 @@ srv_conc_force_exit_innodb(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (trx->mysql_thd != NULL
|
||||||
|
&& thd_is_replication_slave_thread(trx->mysql_thd)) {
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (trx->declared_to_be_inside_innodb == FALSE) {
|
if (trx->declared_to_be_inside_innodb == FALSE) {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -2240,7 +2268,8 @@ loop:
|
|||||||
+ buf_pool->n_pages_written;
|
+ buf_pool->n_pages_written;
|
||||||
if (n_pend_ios < 3 && (n_ios - n_ios_old < 5)) {
|
if (n_pend_ios < 3 && (n_ios - n_ios_old < 5)) {
|
||||||
srv_main_thread_op_info = "doing insert buffer merge";
|
srv_main_thread_op_info = "doing insert buffer merge";
|
||||||
ibuf_contract_for_n_pages(TRUE, 5);
|
ibuf_contract_for_n_pages(
|
||||||
|
TRUE, srv_insert_buffer_batch_size / 4);
|
||||||
|
|
||||||
srv_main_thread_op_info = "flushing log";
|
srv_main_thread_op_info = "flushing log";
|
||||||
|
|
||||||
@@ -2301,7 +2330,7 @@ loop:
|
|||||||
even if the server were active */
|
even if the server were active */
|
||||||
|
|
||||||
srv_main_thread_op_info = "doing insert buffer merge";
|
srv_main_thread_op_info = "doing insert buffer merge";
|
||||||
ibuf_contract_for_n_pages(TRUE, 5);
|
ibuf_contract_for_n_pages(TRUE, srv_insert_buffer_batch_size / 4);
|
||||||
|
|
||||||
srv_main_thread_op_info = "flushing log";
|
srv_main_thread_op_info = "flushing log";
|
||||||
log_buffer_flush_to_disk();
|
log_buffer_flush_to_disk();
|
||||||
@@ -2435,7 +2464,8 @@ background_loop:
|
|||||||
if (srv_fast_shutdown && srv_shutdown_state > 0) {
|
if (srv_fast_shutdown && srv_shutdown_state > 0) {
|
||||||
n_bytes_merged = 0;
|
n_bytes_merged = 0;
|
||||||
} else {
|
} else {
|
||||||
n_bytes_merged = ibuf_contract_for_n_pages(TRUE, 20);
|
n_bytes_merged = ibuf_contract_for_n_pages(
|
||||||
|
TRUE, srv_insert_buffer_batch_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
srv_main_thread_op_info = "reserving kernel mutex";
|
srv_main_thread_op_info = "reserving kernel mutex";
|
||||||
|
|||||||
@@ -1024,6 +1024,12 @@ innobase_start_or_create_for_mysql(void)
|
|||||||
"InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!\n");
|
"InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef UNIV_IBUF_DEBUG
|
||||||
|
fprintf(stderr,
|
||||||
|
"InnoDB: !!!!!!!! UNIV_IBUF_DEBUG switched on !!!!!!!!!\n"
|
||||||
|
"InnoDB: Crash recovery will fail with UNIV_IBUF_DEBUG\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef UNIV_SYNC_DEBUG
|
#ifdef UNIV_SYNC_DEBUG
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!\n");
|
"InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!\n");
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003-2004 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libsync.a
|
|
||||||
|
|
||||||
libsync_a_SOURCES = sync0arr.c sync0rw.c sync0sync.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libthr.a
|
|
||||||
|
|
||||||
libthr_a_SOURCES = thr0loc.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libtrx.a
|
|
||||||
|
|
||||||
libtrx_a_SOURCES = trx0purge.c trx0rec.c trx0roll.c trx0rseg.c\
|
|
||||||
trx0sys.c trx0trx.c trx0undo.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1241,6 +1241,7 @@ trx_undo_report_row_operation(
|
|||||||
ulint page_no;
|
ulint page_no;
|
||||||
trx_rseg_t* rseg;
|
trx_rseg_t* rseg;
|
||||||
mtr_t mtr;
|
mtr_t mtr;
|
||||||
|
ulint err = DB_SUCCESS;
|
||||||
mem_heap_t* heap = NULL;
|
mem_heap_t* heap = NULL;
|
||||||
ulint offsets_[REC_OFFS_NORMAL_SIZE];
|
ulint offsets_[REC_OFFS_NORMAL_SIZE];
|
||||||
ulint* offsets = offsets_;
|
ulint* offsets = offsets_;
|
||||||
@@ -1270,33 +1271,32 @@ trx_undo_report_row_operation(
|
|||||||
|
|
||||||
if (trx->insert_undo == NULL) {
|
if (trx->insert_undo == NULL) {
|
||||||
|
|
||||||
trx_undo_assign_undo(trx, TRX_UNDO_INSERT);
|
err = trx_undo_assign_undo(trx, TRX_UNDO_INSERT);
|
||||||
}
|
}
|
||||||
|
|
||||||
undo = trx->insert_undo;
|
undo = trx->insert_undo;
|
||||||
|
|
||||||
if (UNIV_UNLIKELY(!undo)) {
|
if (UNIV_UNLIKELY(!undo)) {
|
||||||
/* Did not succeed: out of space */
|
/* Did not succeed */
|
||||||
mutex_exit(&(trx->undo_mutex));
|
mutex_exit(&(trx->undo_mutex));
|
||||||
|
|
||||||
return(DB_OUT_OF_FILE_SPACE);
|
return(err);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ut_ad(op_type == TRX_UNDO_MODIFY_OP);
|
ut_ad(op_type == TRX_UNDO_MODIFY_OP);
|
||||||
|
|
||||||
if (trx->update_undo == NULL) {
|
if (trx->update_undo == NULL) {
|
||||||
|
|
||||||
trx_undo_assign_undo(trx, TRX_UNDO_UPDATE);
|
err = trx_undo_assign_undo(trx, TRX_UNDO_UPDATE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
undo = trx->update_undo;
|
undo = trx->update_undo;
|
||||||
|
|
||||||
if (UNIV_UNLIKELY(!undo)) {
|
if (UNIV_UNLIKELY(!undo)) {
|
||||||
/* Did not succeed: out of space */
|
/* Did not succeed */
|
||||||
mutex_exit(&(trx->undo_mutex));
|
mutex_exit(&(trx->undo_mutex));
|
||||||
|
return(err);
|
||||||
return(DB_OUT_OF_FILE_SPACE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
offsets = rec_get_offsets(rec, index, offsets,
|
offsets = rec_get_offsets(rec, index, offsets,
|
||||||
@@ -1332,7 +1332,9 @@ trx_undo_report_row_operation(
|
|||||||
if (offset == 0) {
|
if (offset == 0) {
|
||||||
/* The record did not fit on the page. We erase the
|
/* The record did not fit on the page. We erase the
|
||||||
end segment of the undo log page and write a log
|
end segment of the undo log page and write a log
|
||||||
record of it to to ensure deterministic contents. */
|
record of it: this is to ensure that in the debug
|
||||||
|
version the replicate page constructed using the log
|
||||||
|
records stays identical to the original page */
|
||||||
|
|
||||||
trx_undo_erase_page_end(undo_page, &mtr);
|
trx_undo_erase_page_end(undo_page, &mtr);
|
||||||
mtr_commit(&mtr);
|
mtr_commit(&mtr);
|
||||||
|
|||||||
@@ -134,6 +134,8 @@ trx_create(
|
|||||||
|
|
||||||
trx->mysql_thd = NULL;
|
trx->mysql_thd = NULL;
|
||||||
trx->mysql_query_str = NULL;
|
trx->mysql_query_str = NULL;
|
||||||
|
trx->active_trans = 0;
|
||||||
|
trx->duplicates = 0;
|
||||||
|
|
||||||
trx->n_mysql_tables_in_use = 0;
|
trx->n_mysql_tables_in_use = 0;
|
||||||
trx->mysql_n_tables_locked = 0;
|
trx->mysql_n_tables_locked = 0;
|
||||||
@@ -1902,7 +1904,7 @@ Does the transaction prepare for MySQL. */
|
|||||||
|
|
||||||
ulint
|
ulint
|
||||||
trx_prepare_for_mysql(
|
trx_prepare_for_mysql(
|
||||||
/*====-=============*/
|
/*==================*/
|
||||||
/* out: 0 or error number */
|
/* out: 0 or error number */
|
||||||
trx_t* trx) /* in: trx handle */
|
trx_t* trx) /* in: trx handle */
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -389,27 +389,32 @@ trx_undo_page_init(
|
|||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
Creates a new undo log segment in file. */
|
Creates a new undo log segment in file. */
|
||||||
static
|
static
|
||||||
page_t*
|
ulint
|
||||||
trx_undo_seg_create(
|
trx_undo_seg_create(
|
||||||
/*================*/
|
/*================*/
|
||||||
/* out: segment header page x-latched, NULL
|
/* out: DB_SUCCESS if page creation OK
|
||||||
if no space left */
|
possible error codes are:
|
||||||
|
DB_TOO_MANY_CONCURRENT_TRXS
|
||||||
|
DB_OUT_OF_FILE_SPACE */
|
||||||
trx_rseg_t* rseg __attribute__((unused)),/* in: rollback segment */
|
trx_rseg_t* rseg __attribute__((unused)),/* in: rollback segment */
|
||||||
trx_rsegf_t* rseg_hdr,/* in: rollback segment header, page
|
trx_rsegf_t* rseg_hdr,/* in: rollback segment header, page
|
||||||
x-latched */
|
x-latched */
|
||||||
ulint type, /* in: type of the segment: TRX_UNDO_INSERT or
|
ulint type, /* in: type of the segment: TRX_UNDO_INSERT or
|
||||||
TRX_UNDO_UPDATE */
|
TRX_UNDO_UPDATE */
|
||||||
ulint* id, /* out: slot index within rseg header */
|
ulint* id, /* out: slot index within rseg header */
|
||||||
|
page_t** undo_page,
|
||||||
|
/* out: segment header page x-latched, NULL
|
||||||
|
if there was an error */
|
||||||
mtr_t* mtr) /* in: mtr */
|
mtr_t* mtr) /* in: mtr */
|
||||||
{
|
{
|
||||||
ulint slot_no;
|
ulint slot_no;
|
||||||
ulint space;
|
ulint space;
|
||||||
buf_block_t* block;
|
buf_block_t* block;
|
||||||
page_t* undo_page;
|
|
||||||
trx_upagef_t* page_hdr;
|
trx_upagef_t* page_hdr;
|
||||||
trx_usegf_t* seg_hdr;
|
trx_usegf_t* seg_hdr;
|
||||||
ulint n_reserved;
|
ulint n_reserved;
|
||||||
ibool success;
|
ibool success;
|
||||||
|
ulint err = DB_SUCCESS;
|
||||||
|
|
||||||
ut_ad(mtr && id && rseg_hdr);
|
ut_ad(mtr && id && rseg_hdr);
|
||||||
ut_ad(mutex_own(&(rseg->mutex)));
|
ut_ad(mutex_own(&(rseg->mutex)));
|
||||||
@@ -427,7 +432,7 @@ trx_undo_seg_create(
|
|||||||
"InnoDB: many active transactions"
|
"InnoDB: many active transactions"
|
||||||
" running concurrently?\n");
|
" running concurrently?\n");
|
||||||
|
|
||||||
return(NULL);
|
return(DB_TOO_MANY_CONCURRENT_TRXS);
|
||||||
}
|
}
|
||||||
|
|
||||||
space = page_get_space_id(page_align(rseg_hdr));
|
space = page_get_space_id(page_align(rseg_hdr));
|
||||||
@@ -436,7 +441,7 @@ trx_undo_seg_create(
|
|||||||
mtr);
|
mtr);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
|
||||||
return(NULL);
|
return(DB_OUT_OF_FILE_SPACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate a new file segment for the undo log */
|
/* Allocate a new file segment for the undo log */
|
||||||
@@ -449,18 +454,18 @@ trx_undo_seg_create(
|
|||||||
if (block == NULL) {
|
if (block == NULL) {
|
||||||
/* No space left */
|
/* No space left */
|
||||||
|
|
||||||
return(NULL);
|
return(DB_OUT_OF_FILE_SPACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef UNIV_SYNC_DEBUG
|
#ifdef UNIV_SYNC_DEBUG
|
||||||
buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE);
|
buf_block_dbg_add_level(block, SYNC_TRX_UNDO_PAGE);
|
||||||
#endif /* UNIV_SYNC_DEBUG */
|
#endif /* UNIV_SYNC_DEBUG */
|
||||||
undo_page = buf_block_get_frame(block);
|
*undo_page = buf_block_get_frame(block);
|
||||||
|
|
||||||
page_hdr = undo_page + TRX_UNDO_PAGE_HDR;
|
page_hdr = *undo_page + TRX_UNDO_PAGE_HDR;
|
||||||
seg_hdr = undo_page + TRX_UNDO_SEG_HDR;
|
seg_hdr = *undo_page + TRX_UNDO_SEG_HDR;
|
||||||
|
|
||||||
trx_undo_page_init(undo_page, type, mtr);
|
trx_undo_page_init(*undo_page, type, mtr);
|
||||||
|
|
||||||
mlog_write_ulint(page_hdr + TRX_UNDO_PAGE_FREE,
|
mlog_write_ulint(page_hdr + TRX_UNDO_PAGE_FREE,
|
||||||
TRX_UNDO_SEG_HDR + TRX_UNDO_SEG_HDR_SIZE,
|
TRX_UNDO_SEG_HDR + TRX_UNDO_SEG_HDR_SIZE,
|
||||||
@@ -474,10 +479,10 @@ trx_undo_seg_create(
|
|||||||
page_hdr + TRX_UNDO_PAGE_NODE, mtr);
|
page_hdr + TRX_UNDO_PAGE_NODE, mtr);
|
||||||
|
|
||||||
trx_rsegf_set_nth_undo(rseg_hdr, slot_no,
|
trx_rsegf_set_nth_undo(rseg_hdr, slot_no,
|
||||||
page_get_page_no(undo_page), mtr);
|
page_get_page_no(*undo_page), mtr);
|
||||||
*id = slot_no;
|
*id = slot_no;
|
||||||
|
|
||||||
return(undo_page);
|
return(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
@@ -1421,6 +1426,11 @@ trx_undo_mem_create(
|
|||||||
|
|
||||||
undo = mem_alloc(sizeof(trx_undo_t));
|
undo = mem_alloc(sizeof(trx_undo_t));
|
||||||
|
|
||||||
|
if (undo == NULL) {
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
undo->id = id;
|
undo->id = id;
|
||||||
undo->type = type;
|
undo->type = type;
|
||||||
undo->state = TRX_UNDO_ACTIVE;
|
undo->state = TRX_UNDO_ACTIVE;
|
||||||
@@ -1499,11 +1509,15 @@ trx_undo_mem_free(
|
|||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Creates a new undo log. */
|
Creates a new undo log. */
|
||||||
static
|
static
|
||||||
trx_undo_t*
|
ulint
|
||||||
trx_undo_create(
|
trx_undo_create(
|
||||||
/*============*/
|
/*============*/
|
||||||
/* out: undo log object, NULL if did not
|
/* out: DB_SUCCESS if successful in creating
|
||||||
succeed: out of space */
|
the new undo lob object, possible error
|
||||||
|
codes are:
|
||||||
|
DB_TOO_MANY_CONCURRENT_TRXS
|
||||||
|
DB_OUT_OF_FILE_SPACE
|
||||||
|
DB_OUT_OF_MEMORY*/
|
||||||
trx_t* trx, /* in: transaction */
|
trx_t* trx, /* in: transaction */
|
||||||
trx_rseg_t* rseg, /* in: rollback segment memory copy */
|
trx_rseg_t* rseg, /* in: rollback segment memory copy */
|
||||||
ulint type, /* in: type of the log: TRX_UNDO_INSERT or
|
ulint type, /* in: type of the log: TRX_UNDO_INSERT or
|
||||||
@@ -1511,20 +1525,22 @@ trx_undo_create(
|
|||||||
dulint trx_id, /* in: id of the trx for which the undo log
|
dulint trx_id, /* in: id of the trx for which the undo log
|
||||||
is created */
|
is created */
|
||||||
XID* xid, /* in: X/Open transaction identification*/
|
XID* xid, /* in: X/Open transaction identification*/
|
||||||
|
trx_undo_t** undo, /* out: the new undo log object, undefined
|
||||||
|
* if did not succeed */
|
||||||
mtr_t* mtr) /* in: mtr */
|
mtr_t* mtr) /* in: mtr */
|
||||||
{
|
{
|
||||||
trx_rsegf_t* rseg_header;
|
trx_rsegf_t* rseg_header;
|
||||||
ulint page_no;
|
ulint page_no;
|
||||||
ulint offset;
|
ulint offset;
|
||||||
ulint id;
|
ulint id;
|
||||||
trx_undo_t* undo;
|
|
||||||
page_t* undo_page;
|
page_t* undo_page;
|
||||||
|
ulint err;
|
||||||
|
|
||||||
ut_ad(mutex_own(&(rseg->mutex)));
|
ut_ad(mutex_own(&(rseg->mutex)));
|
||||||
|
|
||||||
if (rseg->curr_size == rseg->max_size) {
|
if (rseg->curr_size == rseg->max_size) {
|
||||||
|
|
||||||
return(NULL);
|
return(DB_OUT_OF_FILE_SPACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
rseg->curr_size++;
|
rseg->curr_size++;
|
||||||
@@ -1532,14 +1548,15 @@ trx_undo_create(
|
|||||||
rseg_header = trx_rsegf_get(rseg->space, rseg->zip_size, rseg->page_no,
|
rseg_header = trx_rsegf_get(rseg->space, rseg->zip_size, rseg->page_no,
|
||||||
mtr);
|
mtr);
|
||||||
|
|
||||||
undo_page = trx_undo_seg_create(rseg, rseg_header, type, &id, mtr);
|
err = trx_undo_seg_create(rseg, rseg_header, type, &id,
|
||||||
|
&undo_page, mtr);
|
||||||
|
|
||||||
if (undo_page == NULL) {
|
if (err != DB_SUCCESS) {
|
||||||
/* Did not succeed */
|
/* Did not succeed */
|
||||||
|
|
||||||
rseg->curr_size--;
|
rseg->curr_size--;
|
||||||
|
|
||||||
return(NULL);
|
return(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
page_no = page_get_page_no(undo_page);
|
page_no = page_get_page_no(undo_page);
|
||||||
@@ -1551,9 +1568,14 @@ trx_undo_create(
|
|||||||
undo_page + offset, mtr);
|
undo_page + offset, mtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
undo = trx_undo_mem_create(rseg, id, type, trx_id, xid,
|
*undo = trx_undo_mem_create(rseg, id, type, trx_id, xid,
|
||||||
page_no, offset);
|
page_no, offset);
|
||||||
return(undo);
|
if (*undo == NULL) {
|
||||||
|
|
||||||
|
err = DB_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
|
return(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*================ UNDO LOG ASSIGNMENT AND CLEANUP =====================*/
|
/*================ UNDO LOG ASSIGNMENT AND CLEANUP =====================*/
|
||||||
@@ -1672,17 +1694,20 @@ trx_undo_mark_as_dict_operation(
|
|||||||
Assigns an undo log for a transaction. A new undo log is created or a cached
|
Assigns an undo log for a transaction. A new undo log is created or a cached
|
||||||
undo log reused. */
|
undo log reused. */
|
||||||
|
|
||||||
trx_undo_t*
|
ulint
|
||||||
trx_undo_assign_undo(
|
trx_undo_assign_undo(
|
||||||
/*=================*/
|
/*=================*/
|
||||||
/* out: the undo log, NULL if did not succeed: out of
|
/* out: DB_SUCCESS if undo log assign
|
||||||
space */
|
successful, possible error codes are:
|
||||||
trx_t* trx, /* in: transaction */
|
DD_TOO_MANY_CONCURRENT_TRXS
|
||||||
ulint type) /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
|
DB_OUT_OF_FILE_SPACE DB_OUT_OF_MEMORY*/
|
||||||
|
trx_t* trx, /* in: transaction */
|
||||||
|
ulint type) /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
|
||||||
{
|
{
|
||||||
trx_rseg_t* rseg;
|
trx_rseg_t* rseg;
|
||||||
trx_undo_t* undo;
|
trx_undo_t* undo;
|
||||||
mtr_t mtr;
|
mtr_t mtr;
|
||||||
|
ulint err = DB_SUCCESS;
|
||||||
|
|
||||||
ut_ad(trx);
|
ut_ad(trx);
|
||||||
ut_ad(trx->rseg);
|
ut_ad(trx->rseg);
|
||||||
@@ -1700,15 +1725,11 @@ trx_undo_assign_undo(
|
|||||||
undo = trx_undo_reuse_cached(trx, rseg, type, trx->id, &trx->xid,
|
undo = trx_undo_reuse_cached(trx, rseg, type, trx->id, &trx->xid,
|
||||||
&mtr);
|
&mtr);
|
||||||
if (undo == NULL) {
|
if (undo == NULL) {
|
||||||
undo = trx_undo_create(trx, rseg, type, trx->id, &trx->xid,
|
err = trx_undo_create(trx, rseg, type, trx->id, &trx->xid,
|
||||||
&mtr);
|
&undo, &mtr);
|
||||||
if (undo == NULL) {
|
if (err != DB_SUCCESS) {
|
||||||
/* Did not succeed */
|
|
||||||
|
|
||||||
mutex_exit(&(rseg->mutex));
|
goto func_exit;
|
||||||
mtr_commit(&mtr);
|
|
||||||
|
|
||||||
return(NULL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1726,10 +1747,11 @@ trx_undo_assign_undo(
|
|||||||
trx_undo_mark_as_dict_operation(trx, undo, &mtr);
|
trx_undo_mark_as_dict_operation(trx, undo, &mtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func_exit:
|
||||||
mutex_exit(&(rseg->mutex));
|
mutex_exit(&(rseg->mutex));
|
||||||
mtr_commit(&mtr);
|
mtr_commit(&mtr);
|
||||||
|
|
||||||
return(undo);
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libusr.a
|
|
||||||
|
|
||||||
libusr_a_SOURCES = usr0sess.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; version 2 of the License.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
include ../include/Makefile.i
|
|
||||||
|
|
||||||
noinst_LIBRARIES = libut.a
|
|
||||||
|
|
||||||
libut_a_SOURCES = ut0byte.c ut0dbg.c ut0mem.c ut0rnd.c ut0ut.c ut0vec.c ut0list.c ut0wqueue.c
|
|
||||||
|
|
||||||
EXTRA_PROGRAMS =
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
|
||||||
%::SCCS/s.%
|
|
||||||
@@ -14,6 +14,7 @@ Created 5/11/1994 Heikki Tuuri
|
|||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "ut0sort.h"
|
#include "ut0sort.h"
|
||||||
#include "trx0trx.h"
|
#include "trx0trx.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user