Commit 29f53961 authored by MySQL Build Team's avatar MySQL Build Team

Automerge with an intermediate build clone,

to prepare for a tree parent alignment.
No code changes.
parents 76e39b1c 78c61d6b
.snprj
COPYING
COPYING.LIB
INSTALL-SOURCE
INSTALL-SOURCE-GENERIC
Logs
MIRRORS
Makefile
Makefile.in
NEW-RPMS
PUBLIC
Projects
TODO
WIN-LICENSE
aclocal.m4
binary
compile
confdefs.h
config.cache
config.h
config.log
config.status
configure
configure.in-removed
conftest.c
conftest.s1
conftest.s2
conftest.subs
internal-docs
libtool
linked_client_sources
linked_server_sources
mysql-copyright-120700-194832
mysql-copyright-120700-221248
skr
stamp-h
tmp
compile-pentium-test
44d03f27qNdqJmARzBoP3Is_cN5e0w
44ec850ac2k4y2Omgr92GiWPBAVKGQ
44edb86b1iE5knJ97MbliK_3lCiAXA
44f33f3aj5KW5qweQeekY1LU0E9ZCg
45001f7c3b2hhCXDKfUvzkX9TNe6VA
45002051rHJfMEXAIMiAZV0clxvKSA
4513d8e4Af4dQWuk13sArwofRgFDQw
45143312u0Tz4r0wPXCbUKwdHa2jWA
45143b90ewOQuTW8-jrB3ZSAQvMRJw
45184588w9U72A6KX1hUFeAC4shSHA
45185df8mZbxfp85FbA0VxUXkmDewA
4519a6c5BVUxEHTf5iJnjZkixMBs8g
451ab499rgdjXyOnUDqHu-wBDoS-OQ
451b110a3ZV6MITl93ehXk2wxrbW7g
45214442pBGT9KuZEGixBH71jTzbOA
45214a07hVsIGwvwa-WrO-jpeaSwVw
452a92d0-31-8wSzSfZi165fcGcXPA
452c6c6dAjuNghfc1ObZ_UQ5SCl85g
4538a7b0EbDHHkWPbIwxO6ZIDdg6Dg
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
454bb488ijVLOUK_GFjcoISE0GxPUA
454bb9a8AwlGRC_wWLS2sNMoRBMRGw
454c946ciQoR4dfTBZ0RTBmGJKp6lw
454f6e7eAnfLD9OCbGr5X9KiKvfKcQ
454f704bJiJy0_Nx2drY9P5kK3uOzg
454f8960jsVT_kMKJtZ9OCgXoba0xQ
454fa71cxshxszXJQYa9jbo0-_hAHw
4550b0ceIcozdgQhWFUTAtWkN196lA
4554a95d7txO1DuO9G3nAizI3SkFAA
4554b3722d71SbPiI2Gx-RhbZjmuIQ
4558b3d73Cxjlb7Wv1oytdSTthxDfw
4561b2ecZbhuAc0TTDdCdultxUYaMw
4561bde4qWhz1I8tkItXKex5uniipA
4562ba016dYH0JzszOqZ8p6psbKfnQ
45771031yRCoM_ZfONdYchPvVEgLRg
459a60d8rIxeTuhB3j_QsOwLGdcpng
459a61c9OS8PzIsdviZJDkybJ1y1uA
459a70691aYIfU2ohV0a3P5iTLpO2A
459a7422KF_P7PuU3YQ5qG6ZLEVpiA
459a74e4nRcXppMSBYeQQ5efDkTADg
459c03b9N_mqF2XJKK6DwSrIt7e6_g
459c1965_BQMBzBO8S_gVqjTHYQrmw
459c2098XoAUsUn8N07IVRDD6CTM-A
459ea845XenN-uWqEM5LFvUT60tW_A
45ae6628gqKTsUFfnoNExadETVIkbA
45af88c9RIIJWPfBxs3o7zekI-ELPQ
45ba4faf2oqu6eR8fqecR3LfSNcYUg
45ba5238-NKl80QVXzdGo8hO9M75Xg
45c0fdfb2mz6NdOIsLenJtf6_ZelTA
45c38d90tNwOTSaYKHXd3ccLtnytlQ
45c390d6BbWrwyEi5T5VsWKYxl06Rg
45c39d31g0iik6UE_oTK5N55ry-ycA
45d1ffcd-r3v8A7uh92hQaMfQM9UPQ
45d21437Vg_-i4uOWyvzYWHESXDP6A
45da6370nnZlAAIieMCrXkxF9toOyQ
45da6551zUuplwxuqcT2fhRgceC0CQ
45db0d4bkGtxBk21sZFJgbCV1FcNRg
45db468b-DKE8kUTV42eYMYmk8_g9g
45dd21d1rVPnDfvZTNVHLalcjnbsZw
45ddaf15_Ld7IAEpUUP3FJjJ-oSEFg
45ddc763DodLG1BqH_wRBJXMbCSB5A
45ddc8282KnaNGuijqCTphlXV_eeog
# This is the BitKeeper configuration for this package.
#
# Please take a minute to fill it out carefully, it needs to be accurate.
#
# NOTICE: you really do want to fill this out, if something goes wrong
# with your repository, or if someone changes the logging policy, we
# send mail to the contact listed here for confirmation.
#
# BitKeeper can maintain a log of your change comments (not your source,
# just the comments) on a centralized server. This is useful as your
# project grows, it gives people a place to go see what is happening on
# a per project basis. This is especially useful for distributed developers.
#
#
# Name of the project, such as "BitKeeper" or "The GNU C compiler".
#
description: MySQL - fast and reliable SQL database
#
# Open Logging server. This site is where users go to see the
# changelog comments for all instances of this repository. This must
# be logging@openlogging.org for usage under the terms of the BKL,
# "bk help bkl" will show you the default licensing terms. If this
# repository is commercial it can be an internal email address or "none"
# to disable logging.
#
logging: none
#
# If this field is set, all checkins will appear to be made by this user,
# in effect making this a single user package. Single user packages are
# free from the logging constraint. In order for the package to really
# be free, both the single_user and the single_host field need to be set.
#
single_user:
#
# If this field is set, all checkins will appear to be made on this host.
#
single_host:
#
# Contact person for this project. This is whoever is the person that
# should be contacted with update information or contacted if BitKeeper
# discovers a problem which requires local intervention. Please make the
# contact information accurate so we can support you.
#
contact: sys@mysql.com
#
# It is very important that this email address is filled out and accurate.
# If someone converts your repository to open logging (which you may not
# want), we will contact this email address for confirmation that you really
# did want open logging. If the email address is inaccurate and we get no
# response from anyone else at your location after 90 days, then open logging
# will be implicitly approved.
#
email: sys@mysql.com
#
# Add your street address if you like, it is optional.
#
street:
city:
state:
postal:
country:
phone:
cell:
pager:
#
# Business Hours when we can contact you if you left a phone number.
#
hours:
[serg:]checkout:get
[arjen:]checkout:get
[kostja:]checkout:get
[nick:]checkout:get
[jonas:]checkout:get
[tomas:]checkout:get
[guilhem:]checkout:get
[pekka:]checkout:get
[msvensson:]checkout:get
checkout:edit
eoln:unix
This source diff could not be displayed because it is too large. You can view the blob instead.
Administrador@light.
Administrator@co3064164-a.
Administrator@co3064164-a.rochd1.qld.optushome.com.au
Administrator@fred.
Administrator@w2k.
Greg@greg-laptop.
Miguel@light.local
Sinisa@sinisa.nasamreza.org
WAX@sergbook.mysql.com
acurtis@ltantony.rdg.cyberkinetica.homeunix.net
acurtis@pcgem.rdg.cyberkinetica.com
acurtis@xiphis.org
administrador@light.hegel.local
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
akishkin@work.mysql.com
anjuta@arthur.local
antony@ltantony.dsl-verizon.net
antony@ltantony.mysql.com
antony@ltantony.rdg.cyberkinetica.com
antony@ltantony.rdg.cyberkinetica.homeunix.net
antony@ltantony.xiphis.org
arjen@bitbike.com
arjen@co3064164-a.bitbike.com
arjen@fred.bitbike.com
arjen@george.bitbike.com
autotest@mc01.ndb.mysql.com
bar@bar.intranet.mysql.r18.ru
bar@bar.mysql.r18.ru
bar@bar.udmsearch.izhnet.ru
bar@deer.(none)
bar@eagle.intranet.mysql.r18.ru
bar@gw.udmsearch.izhnet.ru
bar@mysql.com
bar@noter.intranet.mysql.r18.ru
bell@51.0.168.192.in-addr.arpa
bell@52.0.168.192.in-addr.arpa
bell@book.sanja.is.com.ua
bell@laptop.sanja.is.com.ua
bell@sanja.is.com.ua
bk@admin.bk
bk@mysql.r18.ru
brian@avenger.(none)
brian@brian-akers-computer.local
brian@private-client-ip-101.oz.net
brian@zim.(none)
carsten@tsort.bitbybit.dk
cps@silver_beast.(none)
davida@isil.mysql.com
dean@mysql.com
dellis@goetia.(none)
dlenev@brandersnatch.localdomain
dlenev@build.mysql.com
dlenev@jabberwock.localdomain
dlenev@mysql.com
ejonore@mc03.ndb.mysql.com
elliot@mysql.com
evgen@moonbone.(none)
evgen@moonbone.local
gbichot@bk-internal.mysql.com
gbichot@production.mysql.com
gbichot@quadita2.mysql.com
gbichot@quadxeon.mysql.com
geert@kriem.kemuri.org
georg@beethoven.local
georg@beethoven.site
georg@lmy002.wdf.sap.corp
gerberb@ou800.zenez.com
gluh@eagle.intranet.mysql.r18.ru
gluh@gluh.(none)
gluh@gluh.mysql.r18.ru
gluh@mysql.com
gordon@zero.local.lan
greg@gcw.ath.cx
greg@mysql.com
guilhem@mysql.com
gweir@build.mysql.com
gweir@work.mysql.com
harrison@mysql.com
harry@corona.lordblink.com
hartmut@mysql.com
heikki@donna.mysql.fi
heikki@hundin.mysql.fi
heikki@rescue.
heikki@work.mysql.com
hf@bison.(none)
hf@bisonxp.(none)
hf@deer.(none)
hf@deer.mysql.r18.ru
hf@genie.(none)
holyfoot@mysql.com
igor@hundin.mysql.fi
igor@igor-inspiron.creware.com
igor@linux.local
igor@rurik.mysql.com
ingo@mysql.com
jan@hundin.mysql.fi
jani@a193-229-222-105.elisa-laajakaista.fi
jani@a193-229-222-2.elisa-laajakaista.fi
jani@a80-186-24-72.elisa-laajakaista.fi
jani@a80-186-41-201.elisa-laajakaista.fi
jani@a80-186-8-224.elisa-laajakaista.fi
jani@dsl-jkl1657.dial.inet.fi
jani@dsl-kpogw4gb5.dial.inet.fi
jani@hynda.(none)
jani@hynda.mysql.fi
jani@ibmlab.site
jani@janikt.pp.saunalahti.fi
jani@linux.local
jani@rhols221.adsl.netsonic.fi
jani@rhols221.arenanet.fi
jani@ua126d19.elisa.omakaista.fi
jani@ua141d10.elisa.omakaista.fi
jani@ua167d18.elisa.omakaista.fi
jani@ua72d24.elisa.omakaista.fi
jcole@abel.spaceapes.com
jcole@main.burghcom.com
jcole@mugatu.jcole.us
jcole@mugatu.spaceapes.com
jcole@sarvik.tfr.cafe.ee
jcole@tetra.spaceapes.com
jimw@mysql.com
joerg@mysql.com
joerg@trift-lap.fambruehe
jon@gigan.
jonas@mysql.com
joreland@bk-internal.mysql.com
joreland@mysql.com
jorge@linux.jorge.mysql.com
jplindst@t41.(none)
kaa@polly.local
kaj@work.mysql.com
kent@mysql.com
konstantin@mysql.com
kosipov@production.mysql.com
kostja@oak.local
lars@mysql.com
lenz@kallisto.mysql.com
lenz@mysql.com
magnus@msdesk.mysql.com
magnus@neptunus.(none)
magnus@shellback.(none)
marko@hundin.mysql.fi
marty@flipper.bredbandsbolaget.se
marty@linux.site
marty@shark.
mats@mysql.com
matt@booty.(none)
matt@mysql.com
matthias@three.local.lan
miguel@hegel.(none)
miguel@hegel.br
miguel@hegel.local
miguel@hegel.txg
miguel@hegel.txg.br
miguel@light.
miguel@light.local
miguel@sartre.local
mikael@mc04.(none)
mikael@orca.ndb.mysql.com
mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
mikron@mikael-ronstr-ms-dator.local
mleich@mysql.com
mmatthew@markslaptop.
monty@bitch.mysql.fi
monty@butch.
monty@donna.mysql.fi
monty@hundin.mysql.fi
monty@mashka.(none)
monty@mashka.mysql.fi
monty@mishka.local
monty@mishka.mysql.fi
monty@mysql.com
monty@narttu.
monty@narttu.mysql.fi
monty@rescue.
monty@tik.
monty@tik.mysql.fi
monty@tramp.mysql.fi
monty@work.mysql.com
mronstrom@build.mysql.com
mronstrom@mysql.com
mskold@bk-internal.mysql.com
mskold@mysql.com
msvensson@build.mysql.com
msvensson@neptunus.(none)
msvensson@neptunus.homeip.net
mwagner@cash.mwagner.org
mwagner@evoq.mwagner.org
mwagner@here.mwagner.org
mwagner@mysql.com
mwagner@ultrafly.mysql.com
mwagner@work.mysql.com
mydev@mysql.com
mysql@home.(none)
mysql@mc04.(none)
mysqldev@bk-internal.mysql.com
mysqldev@build.mysql2.com
mysqldev@melody.local
mysqldev@mysql.com
mysqldev@o2k.irixworld.net
ndbdev@dl145b.mysql.com
ndbdev@dl145c.mysql.com
ndbdev@eel.hemma.oreland.se
ndbdev@ndbmaster.mysql.com
ndbdev@shark.
nick@mysql.com
nick@nick.leippe.com
obarnir@mysql.com
papa@gbichot.local
patg@krsna.
patg@krsna.patg.net
patg@patrick-galbraiths-computer.local
patg@patrick.local
patg@pc248.lfp.kcls.org
patg@radha.local
paul@central.snake.net
paul@frost.snake.net
paul@ice.local
paul@ice.snake.net
paul@kite-hub.kitebird.com
paul@snake-hub.snake.net
paul@teton.kitebird.com
pekka@mysql.com
pem@mysql.com
pem@per-erik-martins-dator.local
peter@linux.local
peter@mysql.com
peterg@mysql.com
petr@mysql.com
pgulutzan@linux.local
pmartin@build.mysql2.com
psergey@psergey-rh8.(none)
psergey@psergey.(none)
ram@deer.(none)
ram@gw.mysql.r18.ru
ram@gw.udmsearch.izhnet.ru
ram@mysql.r18.ru
ram@ram-book.(none)
ram@ram.(none)
ramil@mysql.com
ranger@regul.home.lan
rburnett@bk-internal.mysql.com
rburnett@build.mysql.com
reggie@bob.(none)
reggie@mdk10.(none)
reggie@monster.
root@home.(none)
root@mc04.(none)
root@x3.internalnet
salle@banica.(none)
salle@geopard.(none)
salle@geopard.online.bg
salle@vafla.home
salle@vafla.online.bg
sasha@mysql.sashanet.com
schwenke@lmy003.wdf.sap.corp
schwenke@lmy003.xl.local
serg@build.mysql.com
serg@build.mysql2.com
serg@mysql.com
serg@serg.mylan
serg@serg.mysql.com
serg@sergbook.mylan
serg@sergbook.mysql.com
sergefp@mysql.com
shuichi@mysql.com
sinisa@rhols221.adsl.netsonic.fi
stewart@mysql.com
svoj@mysql.com
tfr@beta.frontier86.ee
tfr@indrek.tfr.cafe.ee
tfr@sarvik.tfr.cafe.ee
tim@bitch.mysql.fi
tim@black.box
tim@hundin.mysql.fi
tim@sand.box
tim@siva.hindu.god
tim@threads.polyesthetic.msg
tim@white.box
tim@work.mysql.com
timour@mysql.com
tom@basil-firewall.home.com
tomas@mc05.(none)
tomas@poseidon.(none)
tomas@poseidon.bredbandsbolaget.se
tomas@poseidon.elisa-laajakaista.fi
tomas@poseidon.ndb.mysql.com
tonu@hundin.mysql.fi
tonu@volk.internalnet
tonu@x153.internalnet
tonu@x3.internalnet
tsmith@build.mysql.com
tulin@build.mysql.com
tulin@dl145b.mysql.com
tulin@dl145c.mysql.com
tulin@mysql.com
ulli@morbus.(none)
venu@hundin.mysql.fi
venu@myvenu.com
venu@work.mysql.com
vtkachenko@intelp4d.mysql.com
vtkachenko@mail.mysql.com
vva@eagle.mysql.r18.ru
vva@genie.(none)
vva@mysql.r18.ru
walrus@kishkin.ru
walrus@mysql.com
wax@kishkin.ru
wax@mysql.com
worm@altair.is.lan
zak@balfor.local
zak@linux.local
zak@mysql.com
zgreant@mysql.com
BK|scripts/safe_mysqld.sh|19700101030959|01930|d0a3cc73fd1b0d8d tim@localhost.polyesthetic.msg|scripts/safe_mysqld.sh|20000802235627|38519
bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe arjen@co3064164-a.bitbike.com|BitKeeper/etc/logging_ok|20011212060636|33009
bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe jcole@tetra.bedford.progress.com|BitKeeper/etc/logging_ok|20001004201211|30554
bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe sasha@work.mysql.com|BitKeeper/etc/logging_ok|20000802223223|24242
bk@work.mysql.com|BitKeeper/etc/logging_ok|20000731192914|03271|5e19f6258f804ffe tim@localhost.polyesthetic.msg|BitKeeper/etc/logging_ok|20000802235640|27343
bk@work.mysql.com|ChangeSet|20000731191004|44203|eae70093a6122e66+ sasha@work.mysql.com|ChangeSet|20000802223249|54774
bk@work.mysql.com|ChangeSet|20000731191004|44203|eae70093a6122e66+ tim@localhost.polyesthetic.msg|ChangeSet|20000802235645|56533
#!/bin/sh
shift
REPO=`bk gethost`:`pwd`
TO=dev@mysql.com
if [ -f BitKeeper/etc/pushed -a "$BK_OUTGOING" = OK ]
then (
echo ${USER}@"$@"
echo ""
bk changes - < BitKeeper/etc/pushed
) | mail -s "Outgoing from $REPO" $TO
else
echo ${USER}@"$@"| mail -s "Outgoing from $REPO = $BK_OUTGOING" $TO
fi
#!/bin/sh
#shift
if [ -n "$BK_USER" ]
then
COMMITTER=$BK_USER
else
COMMITTER=$USER
fi
FROM=$COMMITTER@mysql.com
COMMITS=commits@lists.mysql.com
DOCS=docs-commit@mysql.com
LIMIT=10000
VERSION="5.1"
BKROOT=`bk root`
if [ -x /usr/sbin/sendmail ]; then
SENDMAIL=/usr/sbin/sendmail
else
SENDMAIL=sendmail
fi
if [ "$REAL_EMAIL" = "" ]
then
echo "Warning: you must set REAL_EMAIL in your profile"
else
FROM=$REAL_EMAIL
fi
BK_STATUS=$BK_STATUS$BK_COMMIT
if [ "$BK_STATUS" = OK ]
then
HAS_ACTUAL_CHANGES=`bk cset -r+ -d | grep -v "^#"`
if [ "$HAS_ACTUAL_CHANGES" = "" ]
then
echo ChangeSet had no real changes, not sending emails
exit
fi
IS_MERGE=`bk changes -r+ -k -m`
if [ "$IS_MERGE" = "" ]
then
echo Merge changeset, not sending mails
exit
fi
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
CSETKEY=`bk -R prs -r+ -h -d':KEY:' ChangeSet`
#
# composing subject lines of commit mails.
# if a fix targets to a WL and there is a bug referred
# then X-Bug mail header will contain the first found bug's number
#
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | \
sed -ne 's/[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/BUG#\1/
s/.*BUG#\([0-9][0-9]*\)/\1/p'`
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | \
sed -ne 's/[Ww][Ll] *# *\([0-9][0-9]*\).*$/WL#\1/
s/.*\(WL#[0-9][0-9]*\)/ \1/p'`
if [ "$BUG" = "" ]
then
# TO=dev-public@mysql.com
BS=""
BH=""
else
# TO=dev-bugs@mysql.com
BS=" BUG#$BUG"
# need newline here
BH="X-Bug: $BUG
"
fi
#++
# commits@ or dev-private@ mail
#--
LIST="commits"
TO="commits@lists.mysql.com"
if [ -f .tree-is-private ]
then
LIST="dev-private"
TO="dev-private@mysql.com"
fi
echo "Notifying $LIST list at $TO"
(
cat <<EOF
List-ID: <bk.mysql-$VERSION>
From: $FROM
To: $TO
Subject: bk commit into $VERSION tree ($CHANGESET)$BS
X-CSetKey: <$CSETKEY>
$BH
Below is the list of changes that have just been committed into a local
$VERSION repository of $COMMITTER. When $COMMITTER does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
EOF
bk changes -v -r+
bk rset -r+ -ah | bk gnupatch -h -dup -T
) | bk sed -e ${LIMIT}q > $BKROOT/BitKeeper/tmp/commits.txt
$SENDMAIL -t < $BKROOT/BitKeeper/tmp/commits.txt
#++
# docs-commit@ mail
# Picks up anything under the Docs subdirectory (relevant for docs team).
#--
bk changes -v -r+ | grep -q " Docs/"
if [ $? -eq 0 ]
then
echo "Notifying docs list at $DOCS"
(
cat <<EOF
List-ID: <bk.mysql-$VERSION>
From: $FROM
To: $DOCS
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)$BS
EOF
bk changes -v -r+
bk rset -r+ -ah | bk gnupatch -h -dup -T
) > $BKROOT/BitKeeper/tmp/docs.txt
$SENDMAIL -t < $BKROOT/BitKeeper/tmp/docs.txt
fi
else
echo "commit failed because '$BK_STATUS', you may need to re-clone..."
fi
#! /usr/bin/perl
use strict;
use warnings;
use FindBin;
require "$FindBin::Bin/triggers-lib.pl";
# Don't run unless commit was successful
check_status() || exit 0;
my $cset = latest_cset();
# Read most recent ChangeSet's changed files. Send merge changes along, since
# they'll need to be incorporated in InnoDB's source tree eventually.
my $changes = innodb_get_changes('cset', $cset, 'yes')
or exit 0;
innodb_send_changes_email($cset, $changes)
or exit 1;
exit 0;
#! /usr/bin/perl
use strict;
use warnings;
use FindBin;
require "$FindBin::Bin/triggers-lib.pl";
# Don't run unless push/pull was successful
check_status() or exit 0;
# Don't run if push/pull is in local clones
exit 0 if repository_type() eq 'local';
# For each pushed ChangeSet, check it for InnoDB files and send
# diff of entire ChangeSet to InnoDB developers if such changes
# exist.
my $error = 0;
foreach my $cset (read_bk_csetlist())
{
my $changes = innodb_get_changes('cset', $cset, 'yes')
or next;
innodb_send_changes_email($cset, $changes)
or $error = 1;
}
exit ($error == 0 ? 0 : 1);
#!/bin/sh
if [ "$BK_USER" = "Administrator" -o "$BK_USER" = "mysqldev" ]
then
echo "Error: you cannot commit as 'Administrator' or 'mysqldev' user."
echo "as a workaround set BK_USER to your nickname"
echo "e.g.: export BK_USER='bar'"
echo ""
echo "Checkin FAILED!"
echo "Set BK_USER and retry."
exit 1
fi
if [ "$REAL_EMAIL" = "" ]
then
echo "Error: you must set REAL_EMAIL in your profile"
echo "e.g.: export REAL_EMAIL='Joe Dow <joe@foo.bar>'"
echo ""
echo "Commit FAILED!"
echo "Set REAL_EMAIL and retry."
exit 1
fi
#!/usr/bin/perl
my $status = 0;
my $pending = $ENV{'BK_PENDING'};
exit 0 unless -f $pending;
open FI, "<", $pending || exit 0;
while(<FI>) {
my ($file, $stuff) = split /\|/, $_, 2;
next unless -f $file;
$file =~ s/^(.*)\/([^\/]*)$/$2/;
my $path = $1;
opendir DIR, $path;
my @files = sort map { lc } readdir DIR;
closedir DIR;
my %count = ();
$count{$_}++ for @files;
@files = grep { $count{$_} > 1 } keys %count;
if(@files > 0) {
print "$path/$file: duplicate file names: " . (join " ", @files) . "\n";
$status = 1;
}
}
close FI;
exit $status;
#! /usr/bin/perl
use strict;
use warnings;
use FindBin;
require "$FindBin::Bin/triggers-lib.pl";
die "$0: Script error: \$BK_PENDING is not set in pre-commit trigger\n"
unless defined $ENV{BK_PENDING};
# Read changed files from $BK_PENDING directly. Do not bother user about
# merge changes; they don't have any choice, the merge must be done.
my $changes = innodb_get_changes('file', $ENV{BK_PENDING}, undef)
or exit 0;
innodb_inform_and_query_user($changes)
or exit 1; # Abort commit
# OK, continue with commit
exit 0;
#!/bin/sh
if [ "$BK_USER" = "Administrator" -o "$BK_USER" = "mysqldev" ]
then
echo "Error: you cannot checkin as 'Administrator' or 'mysqldev' user."
echo "as a workaround set BK_USER to your nickname"
echo "e.g.: export BK_USER='bar'"
echo ""
echo "Checkin FAILED!"
echo "Set BK_USER and retry."
exit 1
fi
if [ `tail -c1 $BK_FILE` ]
then
echo "File $BK_FILE does not end with a new-line character!"
echo ""
echo "Checkin FAILED!"
echo "Fix the problem and retry."
exit 1
fi
#! /usr/bin/perl
use strict;
use warnings;
my $event= $ENV{BK_EVENT};
unless($event eq 'outgoing pull' || $event eq 'outgoing push' ||
$event eq 'resolve') {
exit 0;
}
my @bad_csets=
( 'monty@mysql.com|ChangeSet|20060418090255|16983',
'monty@mysql.com|ChangeSet|20060418090458|02628',
'monty@mysql.com|ChangeSet|20060419084236|49576',
'monty@mysql.com|ChangeSet|20060503164655|51444',
'monty@mysql.com|ChangeSet|20060503225814|60133',
'monty@mysql.com|ChangeSet|20060504033006|54878',
'monty@mysql.com|ChangeSet|20060504130520|48660',
'monty@mysql.com|ChangeSet|20060504164102|03511',
'monty@mysql.com|ChangeSet|20060504193112|04109',
'monty@mysql.com|ChangeSet|20060505015314|02799',
'monty@mysql.com|ChangeSet|20060505084007|16704',
'monty@mysql.com|ChangeSet|20060505104008|16695',
'monty@mysql.com|ChangeSet|20060505171041|13924',
'monty@mysql.com|ChangeSet|20060508121933|13866',
'monty@mysql.com|ChangeSet|20060508160902|15029',
'monty@mysql.com|ChangeSet|20060509145448|38636',
'monty@mysql.com|ChangeSet|20060509224111|40037',
'monty@mysql.com|ChangeSet|20060510090758|40678',
'monty@mysql.com|ChangeSet|20060515164104|46760',
'monty@mysql.com|ChangeSet|20060530114549|35852',
'monty@mysql.com|ChangeSet|20060605032828|23579',
'monty@mysql.com|ChangeSet|20060605033011|10641',
'monty@mysql.com|ChangeSet|20060605060652|09843',
'msvensson@neptunus.(none)|ChangeSet|20060605094744|10838',
'msvensson@neptunus.(none)|ChangeSet|20060605105746|11800',
'msvensson@neptunus.(none)|ChangeSet|20060605122345|12772',
'jmiller@mysql.com|ChangeSet|20060531210831|36442',
'jmiller@mysql.com|ChangeSet|20060602151941|36118',
'jmiller@mysql.com|ChangeSet|20060602152136|27762',
'jmiller@mysql.com|ChangeSet|20060605121748|12864',
'jmiller@mysql.com|ChangeSet|20060605160304|14798',
'jimw@mysql.com|ChangeSet|20060605210201|14667',
'igor@rurik.mysql.com|ChangeSet|20060605220727|15265',
'igor@rurik.mysql.com|ChangeSet|20060605221206|15134',
'stewart@mysql.com|ChangeSet|20060525073521|11169',
'stewart@mysql.com|ChangeSet|20060605154220|12975',
'stewart@mysql.com|ChangeSet|20060606040001|15337',
'hartmut@mysql.com/linux.site|ChangeSet|20070413121444|50289'
);
# Read the list of changesets.
my $csetlist = $ENV{BK_CSETLIST};
if(!defined($csetlist) || !open(FH, '<', $csetlist)) {
die "Failed to open list of incoming changesets '$csetlist': $!.\n";
}
my @csets = <FH>;
close FH;
# Reject any attempt to push/pull a bad changeset.
for my $cs (@csets) {
# Do this the raw way, don't want to be bitten by different EOL conventions
# on server and client (Unix/Windows/Mac).
$cs =~ s/\x0d?\x0a?$//s;
if(grep($_ eq $cs, @bad_csets)) {
print <<END;
BAD CHANGESET DETECTED! $event REJECTED!
The changeset with key '$cs' was detected in the attempted push or pull.
This changeset is from the corrupt part of the crashed mysql-5.1-new tree.
Pushing or pulling this changeset would result in corruption of the new tree,
and therefore the operation has been rejected.
Contact Kristian Nielsen (knielsen\@mysql.com, IRC knielsen) if you have any
questions regarding this.
END
exit 1;
}
}
exit 0;
#! /usr/bin/perl
use strict;
use warnings;
my $event= $ENV{BK_EVENT};
unless($event eq 'outgoing pull' || $event eq 'outgoing push' ||
$event eq 'resolve') {
exit 0;
}
my @bad_csets=
( 'monty@mysql.com|ChangeSet|20060418090255|16983',
'monty@mysql.com|ChangeSet|20060418090458|02628',
'monty@mysql.com|ChangeSet|20060419084236|49576',
'monty@mysql.com|ChangeSet|20060503164655|51444',
'monty@mysql.com|ChangeSet|20060503225814|60133',
'monty@mysql.com|ChangeSet|20060504033006|54878',
'monty@mysql.com|ChangeSet|20060504130520|48660',
'monty@mysql.com|ChangeSet|20060504164102|03511',
'monty@mysql.com|ChangeSet|20060504193112|04109',
'monty@mysql.com|ChangeSet|20060505015314|02799',
'monty@mysql.com|ChangeSet|20060505084007|16704',
'monty@mysql.com|ChangeSet|20060505104008|16695',
'monty@mysql.com|ChangeSet|20060505171041|13924',
'monty@mysql.com|ChangeSet|20060508121933|13866',
'monty@mysql.com|ChangeSet|20060508160902|15029',
'monty@mysql.com|ChangeSet|20060509145448|38636',
'monty@mysql.com|ChangeSet|20060509224111|40037',
'monty@mysql.com|ChangeSet|20060510090758|40678',
'monty@mysql.com|ChangeSet|20060515164104|46760',
'monty@mysql.com|ChangeSet|20060530114549|35852',
'monty@mysql.com|ChangeSet|20060605032828|23579',
'monty@mysql.com|ChangeSet|20060605033011|10641',
'monty@mysql.com|ChangeSet|20060605060652|09843',
'msvensson@neptunus.(none)|ChangeSet|20060605094744|10838',
'msvensson@neptunus.(none)|ChangeSet|20060605105746|11800',
'msvensson@neptunus.(none)|ChangeSet|20060605122345|12772',
'jmiller@mysql.com|ChangeSet|20060531210831|36442',
'jmiller@mysql.com|ChangeSet|20060602151941|36118',
'jmiller@mysql.com|ChangeSet|20060602152136|27762',
'jmiller@mysql.com|ChangeSet|20060605121748|12864',
'jmiller@mysql.com|ChangeSet|20060605160304|14798',
'jimw@mysql.com|ChangeSet|20060605210201|14667',
'igor@rurik.mysql.com|ChangeSet|20060605220727|15265',
'igor@rurik.mysql.com|ChangeSet|20060605221206|15134',
'stewart@mysql.com|ChangeSet|20060525073521|11169',
'stewart@mysql.com|ChangeSet|20060605154220|12975',
'stewart@mysql.com|ChangeSet|20060606040001|15337',
'hartmut@mysql.com/linux.site|ChangeSet|20070413121444|50289'
);
# Read the list of changesets.
my $csetlist = $ENV{BK_CSETLIST};
if(!defined($csetlist) || !open(FH, '<', $csetlist)) {
die "Failed to open list of incoming changesets '$csetlist': $!.\n";
}
my @csets = <FH>;
close FH;
# Reject any attempt to push/pull a bad changeset.
for my $cs (@csets) {
# Do this the raw way, don't want to be bitten by different EOL conventions
# on server and client (Unix/Windows/Mac).
$cs =~ s/\x0d?\x0a?$//s;
if(grep($_ eq $cs, @bad_csets)) {
print <<END;
BAD CHANGESET DETECTED! $event REJECTED!
The changeset with key '$cs' was detected in the attempted push or pull.
This changeset is from the corrupt part of the crashed mysql-5.1-new tree.
Pushing or pulling this changeset would result in corruption of the new tree,
and therefore the operation has been rejected.
Contact Kristian Nielsen (knielsen\@mysql.com, IRC knielsen) if you have any
questions regarding this.
END
exit 1;
}
}
exit 0;
# To use this convenience library in a trigger, simply require it at
# at the top of the script. For example:
#
# #! /usr/bin/perl
#
# use FindBin;
# require "$FindBin::Bin/triggers-lib.pl";
#
# FindBin is needed, because sometimes a trigger is called from the
# RESYNC directory, and the trigger dir is ../BitKeeper/triggers
use strict;
use warnings;
use Carp;
use FindBin;
my $mysql_version = "5.1";
# These addresses must be kept current in all MySQL versions.
# See the wiki page InnoDBandOracle.
#my @innodb_to_email = ('dev_innodb_ww@oracle.com');
#my @innodb_cc_email = ('dev-innodb@mysql.com');
# FIXME: Keep this for testing; remove it once it's been used for a
# week or two.
my @innodb_to_email = ('tim@mysql.com');
my @innodb_cc_email = ();
# This is for MySQL >= 5.1. Regex which defines the InnoDB files
# which should generally not be touched by MySQL developers.
my $innodb_files_description = <<EOF;
storage/innobase/*
mysql-test/t/innodb* (except mysql-test/t/innodb_mysql*)
mysql-test/r/innodb* (except mysql-test/r/innodb_mysql*)
EOF
my $innodb_files_regex = qr{
^
(
# Case 1: innobase/*
storage/innobase/
|
# Case 2: mysql-test/[tr]/innodb* (except innodb_mysql*)
mysql-test/(t|r)/SCCS/s.innodb
# The mysql-test/[tr]/innodb_mysql* are OK to edit
(?!_mysql)
)
}x;
# See 'bk help log', and the format of, e.g., $BK_PENDING.
# Important: this already contains the terminating newline!
my $file_rev_dspec = ':SFILE:|:REV:\n';
my $bktmp = "$FindBin::Bin/../tmp";
my $sendmail;
foreach ('/usr/sbin/sendmail', 'sendmail') {
$sendmail = $_;
last if -x $sendmail;
}
my $from = $ENV{REAL_EMAIL} || $ENV{USER} . '@mysql.com';
# close_or_warn
# $fh file handle to be closed
# $description description of the file handle
# RETURN Return value of close($fh)
#
# Print a nice warning message if close() isn't successful. See
# perldoc perlvar and perldoc -f close for details.
sub close_or_warn (*$)
{
my ($fh, $description) = @_;
my $status = close $fh;
if (not $status) {
warn "$0: error on close of '$description': ",
($! ? "$!" : "exit status " . ($? >> 8)), "\n";
}
return $status;
}
# check_status
# $warn If true, warn about bad status
# RETURN TRUE, if $BK_STATUS is "OK"; FALSE otherwise
#
# Also checks the undocumented $BK_COMMIT env variable
sub check_status
{
my ($warn) = @_;
my $status = (grep { defined $_ }
$ENV{BK_STATUS}, $ENV{BK_COMMIT}, '<undef>')[0];
unless ($status eq 'OK')
{
warn "Bad BK_STATUS '$status'\n" if $warn;
return undef;
}
return 1;
}
# repository_location
#
# RETURN ('HOST', 'ROOT') for the repository being modified
sub repository_location
{
if ($ENV{BK_SIDE} eq 'client') {
return ($ENV{BK_HOST}, $ENV{BK_ROOT});
} else {
return ($ENV{BKD_HOST}, $ENV{BKD_ROOT});
}
}
# repository_type
# RETURN:
# 'main' for repo on bk-internal with post-incoming.bugdb trigger
# 'team' for repo on bk-internal with post-incoming.queuepush.pl trigger
# 'local' otherwise
#
# This definition may need to be modified if the host name or triggers change.
sub repository_type
{
my ($host, $root) = repository_location();
return 'local'
unless uc($host) eq 'BK-INTERNAL.MYSQL.COM'
and -e "$root/BitKeeper/triggers/post-incoming.queuepush.pl";
return 'main' if -e "$root/BitKeeper/triggers/post-incoming.bugdb";
return 'team';
}
# latest_cset
# RETURN Key for most recent ChangeSet
sub latest_cset {
chomp(my $retval = `bk changes -r+ -k`);
return $retval;
}
# read_bk_csetlist
# RETURN list of cset keys from $BK_CSETLIST file
sub read_bk_csetlist
{
die "$0: script error: \$BK_CSETLIST not set\n"
unless defined $ENV{BK_CSETLIST};
open CSETS, '<', $ENV{BK_CSETLIST}
or die "$0: can't read \$BK_CSETLIST='$ENV{BK_CSETLIST}': $!\n";
chomp(my @csets = <CSETS>);
close_or_warn(CSETS, "\$BK_CSETLIST='$ENV{BK_CSETLIST}'");
return @csets;
}
# innodb_get_changes
# $type 'file' or 'cset'
# $value file name (e.g., $BK_PENDING) or ChangeSet key
# $want_merge_changes flag; if false, merge changes will be ignored
# RETURN A string describing the InnoDB changes, or undef if no changes
#
# The return value does *not* include ChangeSet comments, only per-file
# comments.
sub innodb_get_changes
{
my ($type, $value, $want_merge_changes) = @_;
if ($type eq 'file')
{
open CHANGES, '<', $value
or die "$0: can't read '$value': $!\n";
}
elsif ($type eq 'cset')
{
open CHANGES, '-|', "bk changes -r'$value' -v -d'$file_rev_dspec'"
or die "$0: can't exec 'bk changes': $!\n";
}
else
{
croak "$0: script error: invalid type '$type'";
}
my @changes = grep { /$innodb_files_regex/ } <CHANGES>;
close_or_warn(CHANGES, "($type, '$value')");
return undef unless @changes;
# Set up a pipeline of 'bk log' commands to weed out unwanted deltas. We
# never want deltas which contain no actual changes. We may not want deltas
# which are merges.
my @filters;
# This tests if :LI: (lines inserted) or :LD: (lines deleted) is
# non-zero. That is, did this delta change the file contents?
push @filters,
"bk log -d'"
. "\$if(:LI: -gt 0){$file_rev_dspec}"
. "\$if(:LI: -eq 0){\$if(:LD: -gt 0){$file_rev_dspec}}"
. "' -";
push @filters, "bk log -d'\$unless(:MERGE:){$file_rev_dspec}' -"
unless $want_merge_changes;
my $tmpname = "$bktmp/ibchanges.txt";
my $pipeline = join(' | ', @filters) . " > $tmpname";
open TMP, '|-', $pipeline
or die "$0: can't exec [[$pipeline]]: $!\n";
print TMP @changes;
close_or_warn(TMP, "| $pipeline");
# Use bk log to describe the changes
open LOG, "bk log - < $tmpname |"
or die "$0: can't exec 'bk log - < $tmpname': $!\n";
my @log = <LOG>;
close_or_warn(LOG, "bk log - < $tmpname |");
unlink $tmpname;
return undef unless @log;
return join('', @log);
}
# Ask user if they really want to commit.
# RETURN TRUE = YES, commit; FALSE = NO, do not commit
sub innodb_inform_and_query_user
{
my ($description) = @_;
my $tmpname = "$bktmp/ibquery.txt";
open MESSAGE, "> $tmpname"
or die "$0: can't write message to '$tmpname': $!";
print MESSAGE <<EOF;
This ChangeSet modifies some files which should normally be changed by
InnoDB developers only. In general, MySQL developers should not change:
$innodb_files_description
The following InnoDB files were modified:
=========================================================
$description
=========================================================
If you understand this, you may Commit these changes. The changes
will be sent to the InnoDB developers at @{[join ', ', @innodb_to_email]},
CC @{[join ', ', @innodb_cc_email]}.
EOF
close_or_warn(MESSAGE, "$tmpname");
my $status = system('bk', 'prompt', '-w',
'-yCommit these changes', '-nDo not Commit', "-f$tmpname");
unlink $tmpname;
return ($status == 0 ? 1 : undef);
}
# innodb_send_changes_email
# $cset The ChangeSet key
# $description A (maybe brief) description of the changes
# RETURN TRUE = Success, e-mail sent; FALSE = Failure
#
# Sends a complete diff of changes in $cset by e-mail.
sub innodb_send_changes_email
{
my ($cset, $description) = @_;
# FIXME: Much of this is duplicated in the 'post-commit' Bourne shell
# trigger
my $cset_short = `bk changes -r'$cset' -d':P:::I:'`;
my $cset_key = `bk changes -r'$cset' -d':KEY:'`;
my ($host, $bk_root) = repository_location();
my $type = repository_type();
(my $treename = $bk_root) =~ s,^.*/,,;
print "Nofifying InnoDB developers at ",
(join ', ', @innodb_to_email, @innodb_cc_email), "\n";
open SENDMAIL, '|-', "$sendmail -t"
or die "Can't exec '$sendmail -t': $!\n";
my @headers;
push @headers, "List-ID: <bk.innodb-$mysql_version>";
push @headers, "From: $from";
push @headers, "To: " . (join ', ', @innodb_to_email);
push @headers, "Cc: " . (join ', ', @innodb_cc_email) if @innodb_cc_email;
push @headers,
"Subject: InnoDB changes in $type $mysql_version tree ($cset_short)";
push @headers, "X-CSetKey: <$cset_key>";
print SENDMAIL map { "$_\n" } @headers, '';
if ($type eq 'main')
{
print SENDMAIL <<EOF;
Changes pushed to $treename by $ENV{USER} affect the following
files. These changes are in a $mysql_version main tree. They
will be available publicly within 24 hours.
EOF
}
elsif ($type eq 'team')
{
print SENDMAIL <<EOF;
Changes added to $treename by $ENV{USER} affect the
following files. These changes are in a $mysql_version team tree.
EOF
}
else
{
print SENDMAIL <<EOF;
A local commit by $ENV{USER} affects the following files. These
changes are in a clone of a $mysql_version tree.
EOF
}
print SENDMAIL "\n";
print SENDMAIL qx(bk changes -r'$cset');
print SENDMAIL "$description";
print SENDMAIL "The complete ChangeSet diffs follow.\n\n";
print SENDMAIL qx(bk rset -r'$cset' -ah | bk gnupatch -h -dup -T);
close_or_warn(SENDMAIL, "$sendmail -t")
or return undef;
return 1;
}
1;
INSTALL-SOURCE
INSTALL-BINARY
Makefile
Makefile.in
mysql.info
......@@ -199,10 +199,6 @@ test-bt-fast:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress $(EXP)
test-bt-fast:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=ps --ps-protocol --report-features
test-bt-debug:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=debug --force --timer \
......
.deps
.libs
Makefile
Makefile.in
insert_test
mysql
mysql-test
mysql_test
mysqladmin
mysqldump
mysqlimport
mysqlshow
select_test
thread_test
......@@ -4338,7 +4338,7 @@ com_status(String *buffer __attribute__((unused)),
Don't remove "limit 1",
it is protection againts SQL_SELECT_LIMIT=0
*/
if (mysql_store_result_for_lazy(&result))
if (!mysql_store_result_for_lazy(&result))
{
MYSQL_ROW cur=mysql_fetch_row(result);
if (cur)
......@@ -4382,7 +4382,7 @@ com_status(String *buffer __attribute__((unused)),
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
return 0;
}
if (mysql_store_result_for_lazy(&result))
if (!mysql_store_result_for_lazy(&result))
{
MYSQL_ROW cur=mysql_fetch_row(result);
if (cur)
......@@ -4477,9 +4477,7 @@ server_version_string(MYSQL *con)
*/
if (server_version == NULL)
{
server_version= strdup(mysql_get_server_info(con));
}
server_version= my_strdup(mysql_get_server_info(con), MYF(MY_WME));
}
return server_version ? server_version : "";
......
......@@ -601,15 +601,15 @@ dnl ---------------------------------------------------------------------------
dnl MYSQL_NEEDS_MYSYS_NEW
AC_DEFUN([MYSQL_NEEDS_MYSYS_NEW],
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_use_mysys_new,
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_cv_use_mysys_new,
[
AC_LANG_PUSH(C++)
AC_TRY_LINK([], [
class A { public: int b; }; A *a=new A; a->b=10; delete a;
], mysql_use_mysys_new=no, mysql_use_mysys_new=yes)
], mysql_cv_use_mysys_new=no, mysql_cv_use_mysys_new=yes)
AC_LANG_POP(C++)
])
if test "$mysql_use_mysys_new" = "yes"
if test "$mysql_cv_use_mysys_new" = "yes"
then
AC_DEFINE([USE_MYSYS_NEW], [1], [Needs to use mysys_new helpers])
fi
......
......@@ -13,6 +13,12 @@ AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(mysql, 5.5.1-beta)
AM_CONFIG_HEADER([include/config.h:config.h.in])
# Request support for automake silent-rules if available.
# Default to verbose output. One can use the configure-time
# option --enable-silent-rules or make V=0 to activate
# silent rules.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
PROTOCOL_VERSION=10
DOT_FRM_VERSION=6
# See the libtool docs for information on how to do shared lib versions.
......
.deps
.libs
Makefile
Makefile.in
comp_err
my_print_defaults
perror
print_defaults
replace
resolveip
......@@ -660,7 +660,7 @@ static ha_checksum checksum_format_specifier(const char* msg)
case 'u':
case 'x':
case 's':
chksum= my_checksum(chksum, start, (uint) (p - start));
chksum= my_checksum(chksum, start, (uint) (p + 1 - start));
start= 0; /* Not in format specifier anymore */
break;
......@@ -1030,8 +1030,10 @@ static char *parse_text_line(char *pos)
{
int i, nr;
char *row= pos;
size_t len;
DBUG_ENTER("parse_text_line");
len= strlen (pos);
while (*pos)
{
if (*pos == '\\')
......@@ -1039,11 +1041,11 @@ static char *parse_text_line(char *pos)
switch (*++pos) {
case '\\':
case '"':
VOID(strmov(pos - 1, pos));
VOID(memmove (pos - 1, pos, len - (row - pos)));
break;
case 'n':
pos[-1]= '\n';
VOID(strmov(pos, pos + 1));
VOID(memmove (pos, pos + 1, len - (row - pos)));
break;
default:
if (*pos >= '0' && *pos < '8')
......@@ -1053,10 +1055,10 @@ static char *parse_text_line(char *pos)
nr= nr * 8 + (*(pos++) - '0');
pos -= i;
pos[-1]= nr;
VOID(strmov(pos, pos + i));
VOID(memmove (pos, pos + i, len - (row - pos)));
}
else if (*pos)
VOID(strmov(pos - 1, pos)); /* Remove '\' */
VOID(memmove (pos - 1, pos, len - (row - pos))); /* Remove '\' */
}
}
else
......
Makefile
Makefile.in
my_config.h
mysql_version.h
......@@ -459,16 +459,6 @@ unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
char *to,const char *from,
unsigned long length);
void STDCALL mysql_debug(const char *debug);
char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
char *to,
unsigned long to_length,
const char *from,
unsigned long from_length,
void *param,
char *
(*extend_buffer)
(void *, char *to,
unsigned long *length));
void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
unsigned int STDCALL mysql_thread_safe(void);
my_bool STDCALL mysql_embedded(void);
......
......@@ -474,16 +474,6 @@ unsigned long mysql_real_escape_string(MYSQL *mysql,
char *to,const char *from,
unsigned long length);
void mysql_debug(const char *debug);
char * mysql_odbc_escape_string(MYSQL *mysql,
char *to,
unsigned long to_length,
const char *from,
unsigned long from_length,
void *param,
char *
(*extend_buffer)
(void *, char *to,
unsigned long *length));
void myodbc_remove_escape(MYSQL *mysql,char *name);
unsigned int mysql_thread_safe(void);
my_bool mysql_embedded(void);
......
......@@ -224,8 +224,8 @@ struct st_vio
#endif /* HAVE_SMEM */
#ifdef _WIN32
OVERLAPPED pipe_overlapped;
DWORD read_timeout_millis;
DWORD write_timeout_millis;
DWORD read_timeout_ms;
DWORD write_timeout_ms;
#endif
};
#endif /* vio_violite_h_ */
*.lo
.deps
.libs
Makefile
Makefile.in
conf_to_src
config.status
configure
ctype_extra_sources.c
libmysqlclient.la
......@@ -1258,20 +1258,6 @@ mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
return (uint) escape_string_for_mysql(mysql->charset, to, 0, from, length);
}
char * STDCALL
mysql_odbc_escape_string(MYSQL *mysql __attribute__((unused)),
char *to __attribute__((unused)),
ulong to_length __attribute__((unused)),
const char *from __attribute__((unused)),
ulong from_length __attribute__((unused)),
void *param __attribute__((unused)),
char * (*extend_buffer)(void *, char *, ulong *)
__attribute__((unused)))
{
return NULL;
}
void STDCALL
myodbc_remove_escape(MYSQL *mysql,char *name)
{
......
......@@ -78,7 +78,6 @@ EXPORTS
mysql_next_result
mysql_num_fields
mysql_num_rows
mysql_odbc_escape_string
mysql_options
mysql_stmt_param_count
mysql_stmt_param_metadata
......
......@@ -48,7 +48,6 @@ EXPORTS
mysql_next_result
mysql_num_fields
mysql_num_rows
mysql_odbc_escape_string
mysql_options
mysql_ping
mysql_query
......
Makefile
Makefile.in
......@@ -8,24 +8,20 @@ funcs_1.charset_collation_1 # depends on compile-time decisions
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
main.information_schema # Bug#47449 2009-09-19 alik main.information_schema and innodb.innodb_information_schema fail sporadically
main.innodb-autoinc* # Bug#47809 2009-10-04 joro innodb-autoinc.test fails with valgrind errors with the innodb plugin
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10
main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
main.plugin # Bug#47146 Linking problem with example plugin when dtrace enabled
main.plugin_load # Bug#47146
rpl.rpl_cross_version* # Bug #43913 2009-10-26 joro rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm
rpl.rpl_cross_version* # Bug#48340 2009-12-01 Daogang rpl_cross_version: Found warnings/errors in server log file!
rpl.rpl_get_master_version_and_clock* # Bug#49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
rpl.rpl_innodb_bug28430* # Bug#46029
rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris
rpl.rpl_log_pos* # Bug#47743 2009-10-02 alik rpl.rpl_log_pos fails sporadically
rpl.rpl_plugin_load* @solaris # Bug#47146
rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2
rpl.rpl_timezone* # Bug#47017 2009-10-27 alik rpl_timezone fails on PB-2 with mismatch error
rpl.rpl_trigger* # Bug#46656 2009-09-25 alik InnoDB plugin: memory leaks (Valgrind)
rpl.rpl_heartbeat_basic # BUG#43828 2009-10-22 luis fails sporadically
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
# Declare all NDB-tests in ndb and rpl_ndb test suites experimental.
# Usually the test cases from ndb and rpl_ndb test suites are not run in PB,
......@@ -34,6 +30,7 @@ rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails spora
ndb.*
rpl_ndb.*
rpl_ndb.rpl_ndb_log # Bug#38998
# Declare all NDB-tests in other test suites experimental.
......@@ -67,18 +64,17 @@ funcs_1.ndb_cursors
funcs_2.ndb_charset
parts.partition_engine_ndb
parts.ndb_dd_backuprestore
parts.partition_value_ndb
parts.partition_mgm_lc2_ndb
parts.partition_alter1_2_ndb
parts.partition_alter1_1_ndb
parts.part_supported_sql_func_ndb
parts.partition_int_ndb
parts.partition_mgm_lc1_ndb
parts.partition_auto_increment_ndb
parts.partition_syntax_ndb
parts.partition_alter1_1_2_ndb
parts.partition_basic_ndb
parts.partition_mgm_lc0_ndb
parts.ndb_dd_backuprestore # joro : NDB tests marked as experimental as agreed with bochklin
parts.part_supported_sql_func_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_alter1_1_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_alter1_1_2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_alter1_2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_auto_increment_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_basic_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_engine_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_int_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_mgm_lc0_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
-- source include/have_binlog_format_mixed_or_statement.inc
# Requires binlog_format=statement format since query involving
# get_lock() is logged in row format if binlog_format=mixed or row.
-- source include/have_binlog_format_statement.inc
-- source include/master-slave.inc
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
# Load some data into t1
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
......@@ -10,9 +15,7 @@ select * from t1 limit 10;
#
# Test slave with wrong password
#
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
stop slave;
connection master;
set password for root@"localhost" = password('foo');
......@@ -29,16 +32,12 @@ sleep 2;
create table t3(n int);
insert into t3 values(1),(2);
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
select * from t3;
select sum(length(word)) from t1;
connection master;
drop table t1,t3;
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
# Test if the slave SQL thread can be more than 16K behind the slave
# I/O thread (> IO_SIZE)
......@@ -77,12 +76,13 @@ unlock tables;
connection master;
create table t2(id int);
insert into t2 values(connection_id());
save_master_pos;
connection master1;
# Avoid generating result
create temporary table t3(n int);
--disable_warnings
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
--enable_warnings
connection master;
send update t1 set n = n + get_lock('crash_lock%20C', 2);
......@@ -93,8 +93,11 @@ kill @id;
# We don't drop t3 as this is a temporary table
drop table t2;
connection master;
# The get_lock function causes warning for unsafe statement.
--disable_warnings
--error 1317,2013
reap;
--enable_warnings
connection slave;
# The SQL slave thread should now have stopped because the query was killed on
# the master (so it has a non-zero error code in the binlog).
......@@ -117,16 +120,12 @@ insert into mysql.user (Host, User, Password)
select select_priv,user from mysql.user where user = _binary'blafasel2';
update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
select select_priv,user from mysql.user where user = _binary'blafasel2';
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
select n from t1;
select select_priv,user from mysql.user where user = _binary'blafasel2';
connection master1;
drop table t1;
delete from mysql.user where user="blafasel2";
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
# End of 4.1 tests
......@@ -185,6 +185,14 @@ INSERT INTO global_suppressions VALUES
("Master server does not support or not configured semi-sync replication, fallback to asynchronous"),
(": The MySQL server is running with the --secure-backup-file-priv option so it cannot execute this statement"),
("Slave: Unknown table 't1' Error_code: 1051"),
/*
Transient network failures that cause warnings on reconnect.
BUG#47743 and BUG#47983.
*/
("Slave I/O: Get master SERVER_ID failed with error:.*"),
("Slave I/O: Get master clock failed with error:.*"),
("Slave I/O: Get master COLLATION_SERVER failed with error:.*"),
("Slave I/O: Get master TIME_ZONE failed with error:.*"),
("THE_LAST_SUPPRESSION")||
......
......@@ -358,11 +358,14 @@ sub post_check_client_group {
if (IS_WINDOWS)
{
# Shared memory base may or may not be defined (e.g not defined in embedded)
my $shm = $group_to_copy_from->option("shared-memory-base-name");
if (defined $shm)
if (! $self->{ARGS}->{embedded})
{
$config->insert($client_group_name,"shared-memory-base-name", $shm->value());
# Shared memory base may or may not be defined (e.g not defined in embedded)
my $shm = $group_to_copy_from->option("shared-memory-base-name");
if (defined $shm)
{
$config->insert($client_group_name,"shared-memory-base-name", $shm->value());
}
}
}
}
......
......@@ -12717,3 +12717,14 @@ COUNT(t1.a)
729
DROP TABLE t1;
SET @@join_buffer_size= @save_join_buffer_size;
SHOW CREATE TABLE t1;
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
SELECT * FROM t1;
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
INSERT INTO t1 (col1, col2) VALUES (1, "value");
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair Error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
test.t1 repair error Corrupt
DROP TABLE t1;
#
# Bug#47671 - wrong character-set after upgrade from 5.1.34 to 5.1.39
#
# Extract only charset information from 'status' command output using regex
--------------
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
--------------
......@@ -310,6 +310,18 @@ a b
2 2
drop table t1;
set global low_priority_updates = @old_delayed_updates;
#
# Bug #47682 strange behaviour of INSERT DELAYED
#
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (f1 integer);
CREATE TABLE t2 (f1 integer);
FLUSH TABLES WITH READ LOCK;
LOCK TABLES t1 READ;
INSERT DELAYED INTO t2 VALUES (1);
Got one of the listed errors
UNLOCK TABLES;
DROP TABLE t1, t2;
End of 5.1 tests
#
# Bug #47274 assert in open_table on CREATE TABLE <already existing>
......
......@@ -324,3 +324,16 @@ a
1
2
DROP TABLE t1, t2, t3;
#
# Bug #46425 crash in Diagnostics_area::set_ok_status,
# empty statement, DELETE IGNORE
#
CREATE table t1 (i INTEGER);
INSERT INTO t1 VALUES (1);
CREATE TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
BEGIN
INSERT INTO t1 SELECT * FROM t1 AS A;
END |
DELETE IGNORE FROM t1;
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
DROP TABLE t1;
......@@ -559,3 +559,42 @@ EXECUTE s;
MATCH (col) AGAINST('findme')
DEALLOCATE PREPARE s;
DROP TABLE t1;
#
# Bug #47930: MATCH IN BOOLEAN MODE returns too many results
# inside subquery
#
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1), (2);
CREATE TABLE t2 (a int, b2 char(10), FULLTEXT KEY b2 (b2));
INSERT INTO t2 VALUES (1,'Scargill');
CREATE TABLE t3 (a int, b int);
INSERT INTO t3 VALUES (1,1), (2,1);
# t2 should use full text index
EXPLAIN
SELECT count(*) FROM t1 WHERE
not exists(
SELECT 1 FROM t2, t3
WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE)
);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY t2 fulltext b2 b2 0 1 Using where
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where
# should return 0
SELECT count(*) FROM t1 WHERE
not exists(
SELECT 1 FROM t2, t3
WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE)
);
count(*)
0
# should return 0
SELECT count(*) FROM t1 WHERE
not exists(
SELECT 1 FROM t2 IGNORE INDEX (b2), t3
WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE)
);
count(*)
0
DROP TABLE t1,t2,t3;
End of 5.1 tests
......@@ -885,7 +885,7 @@ cast(sum(distinct df) as signed)
3
select cast(min(df) as signed) from t1;
cast(min(df) as signed)
0
1
select 1e8 * sum(distinct df) from t1;
1e8 * sum(distinct df)
330000000
......@@ -1520,4 +1520,197 @@ max i
# Cleanup
#
DROP TABLE t1;
#
# Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
#
create table t1 (f1 year(2), f2 year(4), f3 date, f4 datetime);
insert into t1 values
(98,1998,19980101,"1998-01-01 00:00:00"),
(00,2000,20000101,"2000-01-01 00:00:01"),
(02,2002,20020101,"2002-01-01 23:59:59"),
(60,2060,20600101,"2060-01-01 11:11:11"),
(70,1970,19700101,"1970-11-11 22:22:22"),
(NULL,NULL,NULL,NULL);
select min(f1),max(f1) from t1;
min(f1) max(f1)
70 60
select min(f2),max(f2) from t1;
min(f2) max(f2)
1970 2060
select min(f3),max(f3) from t1;
min(f3) max(f3)
1970-01-01 2060-01-01
select min(f4),max(f4) from t1;
min(f4) max(f4)
1970-11-11 22:22:22 2060-01-01 11:11:11
select a.f1 as a, b.f1 as b, a.f1 > b.f1 as gt,
a.f1 < b.f1 as lt, a.f1<=>b.f1 as eq
from t1 a, t1 b;
a b gt lt eq
98 98 0 0 1
00 98 1 0 0
02 98 1 0 0
60 98 1 0 0
70 98 0 1 0
NULL 98 NULL NULL 0
98 00 0 1 0
00 00 0 0 1
02 00 1 0 0
60 00 1 0 0
70 00 0 1 0
NULL 00 NULL NULL 0
98 02 0 1 0
00 02 0 1 0
02 02 0 0 1
60 02 1 0 0
70 02 0 1 0
NULL 02 NULL NULL 0
98 60 0 1 0
00 60 0 1 0
02 60 0 1 0
60 60 0 0 1
70 60 0 1 0
NULL 60 NULL NULL 0
98 70 1 0 0
00 70 1 0 0
02 70 1 0 0
60 70 1 0 0
70 70 0 0 1
NULL 70 NULL NULL 0
98 NULL NULL NULL 0
00 NULL NULL NULL 0
02 NULL NULL NULL 0
60 NULL NULL NULL 0
70 NULL NULL NULL 0
NULL NULL NULL NULL 1
select a.f1 as a, b.f2 as b, a.f1 > b.f2 as gt,
a.f1 < b.f2 as lt, a.f1<=>b.f2 as eq
from t1 a, t1 b;
a b gt lt eq
98 1998 0 0 1
00 1998 1 0 0
02 1998 1 0 0
60 1998 1 0 0
70 1998 0 1 0
NULL 1998 NULL NULL 0
98 2000 0 1 0
00 2000 0 0 1
02 2000 1 0 0
60 2000 1 0 0
70 2000 0 1 0
NULL 2000 NULL NULL 0
98 2002 0 1 0
00 2002 0 1 0
02 2002 0 0 1
60 2002 1 0 0
70 2002 0 1 0
NULL 2002 NULL NULL 0
98 2060 0 1 0
00 2060 0 1 0
02 2060 0 1 0
60 2060 0 0 1
70 2060 0 1 0
NULL 2060 NULL NULL 0
98 1970 1 0 0
00 1970 1 0 0
02 1970 1 0 0
60 1970 1 0 0
70 1970 0 0 1
NULL 1970 NULL NULL 0
98 NULL NULL NULL 0
00 NULL NULL NULL 0
02 NULL NULL NULL 0
60 NULL NULL NULL 0
70 NULL NULL NULL 0
NULL NULL NULL NULL 1
select a.f1 as a, b.f3 as b, a.f1 > b.f3 as gt,
a.f1 < b.f3 as lt, a.f1<=>b.f3 as eq
from t1 a, t1 b;
a b gt lt eq
98 1998-01-01 0 1 0
00 1998-01-01 1 0 0
02 1998-01-01 1 0 0
60 1998-01-01 1 0 0
70 1998-01-01 0 1 0
NULL 1998-01-01 NULL NULL 0
98 2000-01-01 0 1 0
00 2000-01-01 0 1 0
02 2000-01-01 1 0 0
60 2000-01-01 1 0 0
70 2000-01-01 0 1 0
NULL 2000-01-01 NULL NULL 0
98 2002-01-01 0 1 0
00 2002-01-01 0 1 0
02 2002-01-01 0 1 0
60 2002-01-01 1 0 0
70 2002-01-01 0 1 0
NULL 2002-01-01 NULL NULL 0
98 2060-01-01 0 1 0
00 2060-01-01 0 1 0
02 2060-01-01 0 1 0
60 2060-01-01 0 1 0
70 2060-01-01 0 1 0
NULL 2060-01-01 NULL NULL 0
98 1970-01-01 1 0 0
00 1970-01-01 1 0 0
02 1970-01-01 1 0 0
60 1970-01-01 1 0 0
70 1970-01-01 0 1 0
NULL 1970-01-01 NULL NULL 0
98 NULL NULL NULL 0
00 NULL NULL NULL 0
02 NULL NULL NULL 0
60 NULL NULL NULL 0
70 NULL NULL NULL 0
NULL NULL NULL NULL 1
select a.f1 as a, b.f4 as b, a.f1 > b.f4 as gt,
a.f1 < b.f4 as lt, a.f1<=>b.f4 as eq
from t1 a, t1 b;
a b gt lt eq
98 1998-01-01 00:00:00 0 1 0
00 1998-01-01 00:00:00 1 0 0
02 1998-01-01 00:00:00 1 0 0
60 1998-01-01 00:00:00 1 0 0
70 1998-01-01 00:00:00 0 1 0
NULL 1998-01-01 00:00:00 NULL NULL 0
98 2000-01-01 00:00:01 0 1 0
00 2000-01-01 00:00:01 0 1 0
02 2000-01-01 00:00:01 1 0 0
60 2000-01-01 00:00:01 1 0 0
70 2000-01-01 00:00:01 0 1 0
NULL 2000-01-01 00:00:01 NULL NULL 0
98 2002-01-01 23:59:59 0 1 0
00 2002-01-01 23:59:59 0 1 0
02 2002-01-01 23:59:59 0 1 0
60 2002-01-01 23:59:59 1 0 0
70 2002-01-01 23:59:59 0 1 0
NULL 2002-01-01 23:59:59 NULL NULL 0
98 2060-01-01 11:11:11 0 1 0
00 2060-01-01 11:11:11 0 1 0
02 2060-01-01 11:11:11 0 1 0
60 2060-01-01 11:11:11 0 1 0
70 2060-01-01 11:11:11 0 1 0
NULL 2060-01-01 11:11:11 NULL NULL 0
98 1970-11-11 22:22:22 1 0 0
00 1970-11-11 22:22:22 1 0 0
02 1970-11-11 22:22:22 1 0 0
60 1970-11-11 22:22:22 1 0 0
70 1970-11-11 22:22:22 0 1 0
NULL 1970-11-11 22:22:22 NULL NULL 0
98 NULL NULL NULL 0
00 NULL NULL NULL 0
02 NULL NULL NULL 0
60 NULL NULL NULL 0
70 NULL NULL NULL 0
NULL NULL NULL NULL 1
select *, f1 = f2 from t1;
f1 f2 f3 f4 f1 = f2
98 1998 1998-01-01 1998-01-01 00:00:00 1
00 2000 2000-01-01 2000-01-01 00:00:01 1
02 2002 2002-01-01 2002-01-01 23:59:59 1
60 2060 2060-01-01 2060-01-01 11:11:11 1
70 1970 1970-01-01 1970-11-11 22:22:22 1
NULL NULL NULL NULL NULL
drop table t1;
#
End of 5.1 tests
......@@ -443,3 +443,30 @@ DROP TABLE db1.t1, db1.t2;
DROP USER mysqltest1@localhost;
DROP DATABASE db1;
End of 5.0 tests
USE mysql;
SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u;
SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
SELECT password FROM user WHERE user=@u AND host=@h INTO @pwd;
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost Y
UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost N
GRANT INSERT ON *.* TO CURRENT_USER();
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost Y
UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose';
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y
UPDATE user SET password=@pwd WHERE user=@u AND host=@h;
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost Y
FLUSH PRIVILEGES;
USE test;
End of 5.1 tests
......@@ -2501,6 +2501,17 @@ SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
a MAX(b)
2 1
DROP TABLE t;
#
# Bug #48472: Loose index scan inappropriately chosen for some WHERE
# conditions
#
CREATE TABLE t (a INT, b INT, INDEX (a,b));
INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
INSERT INTO t SELECT * FROM t;
SELECT a, MAX(b) FROM t WHERE 0=b+0 GROUP BY a;
a MAX(b)
2 0
DROP TABLE t;
End of 5.0 tests
#
# Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in
......
......@@ -1783,7 +1783,6 @@ show variables like "innodb_sync_spin_loops";
Variable_name Value
innodb_sync_spin_loops 20
set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig;
SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency;
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 0
......@@ -1801,7 +1800,6 @@ set global innodb_thread_concurrency=16;
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 16
SET @@global.innodb_thread_concurrency= @old_innodb_thread_concurrency;
show variables like "innodb_concurrency_tickets";
Variable_name Value
innodb_concurrency_tickets 500
......@@ -3090,7 +3088,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
commit;
drop table t1, t2, t3, t5, t6, t8, t9;
CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
ERROR HY000: Can't create table 'test.t1' (errno: -1)
ERROR 42000: Incorrect column name 'DB_ROW_ID'
CREATE TABLE t1 (
a BIGINT(20) NOT NULL,
PRIMARY KEY (a)
......
SELECT f4, f8 FROM bug34300;
f4 f8
xxx zzz
ALTER TABLE bug34300 ADD COLUMN (f10 INT);
SELECT f4, f8 FROM bug34300;
f4 f8
xxx zzz
DROP TABLE bug34300;
SET @@global.max_allowed_packet=1048576;
SET @@global.max_allowed_packet=default;
create table bug44369 (DB_ROW_ID int) engine=innodb;
ERROR HY000: Can't create table 'test.bug44369' (errno: -1)
ERROR 42000: Incorrect column name 'DB_ROW_ID'
create table bug44369 (db_row_id int) engine=innodb;
ERROR HY000: Can't create table 'test.bug44369' (errno: -1)
show warnings;
Level Code Message
Warning 1005 Error creating table 'test/bug44369' with column name 'db_row_id'. 'db_row_id' is a reserved name. Please try to re-create the table with a different column name.
Error 1005 Can't create table 'test.bug44369' (errno: -1)
ERROR 42000: Incorrect column name 'db_row_id'
create table bug44369 (db_TRX_Id int) engine=innodb;
ERROR HY000: Can't create table 'test.bug44369' (errno: -1)
show warnings;
Level Code Message
Warning 1005 Error creating table 'test/bug44369' with column name 'db_TRX_Id'. 'db_TRX_Id' is a reserved name. Please try to re-create the table with a different column name.
Error 1005 Can't create table 'test.bug44369' (errno: -1)
ERROR 42000: Incorrect column name 'db_TRX_Id'
......@@ -48,6 +48,24 @@ commit;
set autocommit=default;
drop table t1;
#
# Bug #37183 insert ignore into .. select ... hangs
# after deadlock was encountered
#
create table t1(id int primary key,v int)engine=innodb;
insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
create table t2 like t1;
begin;
update t1 set v=id*2 where id=1;
begin;
update t1 set v=id*2 where id=2;
update t1 set v=id*2 where id=2;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
insert ignore into t2 select * from t1 where id=1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
rollback;
drop table t1, t2;
#
# Bug#41756 Strange error messages about locks from InnoDB
#
drop table if exists t1;
......
......@@ -2251,6 +2251,28 @@ c >= '2009-10-09 00:00:00.001' AND c <= '2009-10-09 00:00:00.00';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
DROP TABLE t1;
#
# Bug #46175: NULL read_view and consistent read assertion
#
CREATE TABLE t1(a CHAR(13),KEY(a)) ENGINE=innodb;
CREATE TABLE t2(b DATETIME,KEY(b)) ENGINE=innodb;
INSERT INTO t1 VALUES (),();
INSERT INTO t2 VALUES (),();
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
WHERE b =(SELECT a FROM t1 LIMIT 1);
CREATE PROCEDURE p1(num INT)
BEGIN
DECLARE i INT DEFAULT 0;
REPEAT
SHOW CREATE VIEW v1;
SET i:=i+1;
UNTIL i>num END REPEAT;
END|
# Should not crash
# Should not crash
DROP PROCEDURE p1;
DROP VIEW v1;
DROP TABLE t1,t2;
End of 5.1 tests
#
# Test for bug #39932 "create table fails if column for FK is in different
......
......@@ -231,5 +231,4 @@ a: b
</row>
</resultset>
drop table t1;
End of tests
End of 5.0 tests
......@@ -753,4 +753,16 @@ b
100
NULL
DROP TABLE t1, t2;
#
# Bug #48475: DISTINCT is ignored with GROUP BY WITH ROLLUP
# and only const tables
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT DISTINCT b FROM t1, t2 GROUP BY a, b WITH ROLLUP;
b
1
NULL
DROP TABLE t1, t2;
End of 5.0 tests
......@@ -1444,6 +1444,27 @@ FROM t3;
2
NULL
DROP TABLE t1, t2, t3;
#
# Bug #42760: Select doesn't return desired results when we have null
# values
#
CREATE TABLE t1 (
a INT,
c INT,
UNIQUE KEY a_c (a,c),
KEY (a));
INSERT INTO t1 VALUES (1, 10), (2, NULL);
# Must use ref-or-null on the a_c index
EXPLAIN
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null a_c,a a_c 10 const,const 1 Using where
# Must return 1 row
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c;
col
1
DROP TABLE t1;
End of 5.0 tests
CREATE TABLE t2 (a varchar(32), b int(11), c float, d double,
UNIQUE KEY a (a,b,c), KEY b (b), KEY c (c));
CREATE TABLE t1 (a varchar(32), b char(3), UNIQUE KEY a (a,b), KEY b (b));
......
drop table if exists t1, t2;
CREATE TABLE t1 (a INT, b INT)
PARTITION BY LIST (a)
SUBPARTITION BY HASH (b)
(PARTITION p1 VALUES IN (1));
ALTER TABLE t1 ADD COLUMN c INT;
DROP TABLE t1;
CREATE TABLE t1 (
a int NOT NULL,
b int NOT NULL);
......@@ -50,6 +56,13 @@ t1 CREATE TABLE `t1` (
PARTITION p3 VALUES LESS THAN (733969) ENGINE = MyISAM,
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
DROP TABLE t1;
create table t1 (a int NOT NULL, b varchar(5) NOT NULL)
default charset=utf8
partition by list (a)
subpartition by key (b)
(partition p0 values in (1),
partition p1 values in (2));
drop table t1;
create table t1 (a int, b int, key(a))
partition by list (a)
( partition p0 values in (1),
......@@ -2042,10 +2055,15 @@ DROP TABLE t1;
#
# Bug #45807: crash accessing partitioned table and sql_mode
# contains ONLY_FULL_GROUP_BY
# Bug#46923: select count(*) from partitioned table fails with
# ONLY_FULL_GROUP_BY
#
SET SESSION SQL_MODE='ONLY_FULL_GROUP_BY';
CREATE TABLE t1(id INT,KEY(id)) ENGINE=MYISAM
PARTITION BY HASH(id) PARTITIONS 2;
SELECT COUNT(*) FROM t1;
COUNT(*)
0
DROP TABLE t1;
SET SESSION SQL_MODE=DEFAULT;
#
......
drop table if exists t1;
create table t1 (a int, b int)
partition by range columns (a,b)
( partition p0 values less than (maxvalue, 10),
partition p1 values less than (maxvalue, maxvalue));
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
create table t1 (a int, b int, c int)
partition by range columns (a,b,c)
( partition p0 values less than (1, maxvalue, 10),
partition p1 values less than (1, maxvalue, maxvalue));
ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition
create table t1 (a varchar(1) character set latin1 collate latin1_general_ci)
partition by range columns(a)
( partition p0 values less than ('a'),
......@@ -89,7 +99,7 @@ subpartition by hash (to_seconds(d))
subpartitions 4
( partition p0 values less than (1, '0', MAXVALUE, '1900-01-01'),
partition p1 values less than (1, 'a', MAXVALUE, '1999-01-01'),
partition p2 values less than (1, 'a', MAXVALUE, MAXVALUE),
partition p2 values less than (1, 'b', MAXVALUE, MAXVALUE),
partition p3 values less than (1, MAXVALUE, MAXVALUE, MAXVALUE));
select partition_method, partition_expression, partition_description
from information_schema.partitions where table_name = "t1";
......@@ -102,10 +112,10 @@ RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,'1999-01-01'
RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,'a',MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,'b',MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,'b',MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,'b',MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,'b',MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
RANGE COLUMNS a,b,c,d 1,MAXVALUE,MAXVALUE,MAXVALUE
......@@ -123,7 +133,7 @@ SUBPARTITION BY HASH (to_seconds(d))
SUBPARTITIONS 4
(PARTITION p0 VALUES LESS THAN (1,'0',MAXVALUE,'1900-01-01') ENGINE = MyISAM,
PARTITION p1 VALUES LESS THAN (1,'a',MAXVALUE,'1999-01-01') ENGINE = MyISAM,
PARTITION p2 VALUES LESS THAN (1,'a',MAXVALUE,MAXVALUE) ENGINE = MyISAM,
PARTITION p2 VALUES LESS THAN (1,'b',MAXVALUE,MAXVALUE) ENGINE = MyISAM,
PARTITION p3 VALUES LESS THAN (1,MAXVALUE,MAXVALUE,MAXVALUE) ENGINE = MyISAM) */
drop table t1;
create table t1 (a int, b int)
......
SET NAMES utf8;
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
ENGINE=InnoDB
PARTITION BY RANGE (a)
SUBPARTITION BY HASH (a)
(PARTITION `p0``\""e` VALUES LESS THAN (100)
(SUBPARTITION `sp0``\""e`,
SUBPARTITION `sp1``\""e`),
PARTITION `p1``\""e` VALUES LESS THAN (MAXVALUE)
(SUBPARTITION `sp2``\""e`,
SUBPARTITION `sp3``\""e`));
INSERT INTO `t``\""e` VALUES (0), (2), (6), (10), (14), (18), (22);
START TRANSACTION;
# con1
SET NAMES utf8;
START TRANSACTION;
# default connection
UPDATE `t``\""e` SET a = 16 WHERE a = 0;
# con1
UPDATE `t``\""e` SET a = 8 WHERE a = 22;
UPDATE `t``\""e` SET a = 12 WHERE a = 0;
# default connection
UPDATE `t``\""e` SET a = 4 WHERE a = 22;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
# First table reported in 'SHOW ENGINE InnoDB STATUS'
SHOW ENGINE InnoDB STATUS;
Type Name Status
InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
set @old_sql_mode = @@sql_mode;
set sql_mode = 'ANSI_QUOTES';
SHOW ENGINE InnoDB STATUS;
Type Name Status
InnoDB index `PRIMARY` of table `test`.`t``\""e` /* Partition `p0``\""e`, Subpartition `sp0``\""e` */
set @@sql_mode = @old_sql_mode;
# con1
ROLLBACK;
# default connection
DROP TABLE `t``\""e`;
SET NAMES DEFAULT;
......@@ -1603,4 +1603,54 @@ SELECT str_to_date('', '%Y-%m-%d');
str_to_date('', '%Y-%m-%d')
0000-00-00
DROP TABLE t1, t2;
#
# Bug#48459: valgrind errors with query using 'Range checked for each
# record'
#
CREATE TABLE t1 (
a INT,
b CHAR(2),
c INT,
d INT,
KEY ( c ),
KEY ( d, a, b ( 2 ) ),
KEY ( b ( 1 ) )
);
INSERT INTO t1 VALUES ( NULL, 'a', 1, 2 ), ( NULL, 'a', 1, 2 ),
( 1, 'a', 1, 2 ), ( 1, 'a', 1, 2 );
CREATE TABLE t2 (
a INT,
c INT,
e INT,
KEY ( e )
);
INSERT INTO t2 VALUES ( 1, 1, NULL ), ( 1, 1, NULL );
# Should not give Valgrind warnings
SELECT 1
FROM t1, t2
WHERE t1.d <> '1' AND t1.b > '1'
AND t1.a = t2.a AND t1.c = t2.c;
1
1
1
1
1
DROP TABLE t1, t2;
#
# Bug #48665: sql-bench's insert test fails due to wrong result
#
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a));
INSERT INTO t1 VALUES (0,0), (1,1);
EXPLAIN
SELECT * FROM t1 FORCE INDEX (PRIMARY)
WHERE (a>=1 AND a<=2) OR (a>=4 AND a<=5) OR (a>=0 AND a <=10);
id select_type table type possible_keys key key_len ref rows Extra
@ @ @ range @ @ @ @ @ @
# Should return 2 rows
SELECT * FROM t1 FORCE INDEX (PRIMARY)
WHERE (a>=1 AND a<=2) OR (a>=4 AND a<=5) OR (a>=0 AND a <=10);
a b
0 0
1 1
DROP TABLE t1;
End of 5.1 tests
......@@ -4427,6 +4427,20 @@ ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1))
INTO @var0;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1;
#
# Bug #48458: simple query tries to allocate enormous amount of
# memory
#
CREATE TABLE t1(a INT NOT NULL, b YEAR);
INSERT INTO t1 VALUES ();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
CREATE TABLE t2(c INT);
# Should not err out because of out-of-memory
SELECT 1 FROM t2 JOIN t1 ON 1=1
WHERE a != '1' AND NOT a >= b OR NOT ROW(b,a )<> ROW(a,a);
1
DROP TABLE t1,t2;
End of 5.0 tests
create table t1(a INT, KEY (a));
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
......@@ -4577,4 +4591,22 @@ field2
15:13:38
drop table A,AA,B,BB;
#end of test for bug#45266
#
# BUG#48052: Valgrind warning - uninitialized value in init_read_record()
#
CREATE TABLE t1 (
pk int(11) NOT NULL,
i int(11) DEFAULT NULL,
v varchar(1) DEFAULT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t1 VALUES (2,7,'m');
INSERT INTO t1 VALUES (3,9,'m');
SELECT v
FROM t1
WHERE NOT pk > 0
HAVING v <= 't'
ORDER BY pk;
v
DROP TABLE t1;
End of 5.1 tests
call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted");
use test;
drop procedure if exists bug14233;
drop function if exists bug14233;
......@@ -11,11 +12,13 @@ create table t1 (id int);
create trigger t1_ai after insert on t1 for each row call bug14233();
alter table mysql.proc drop type;
call bug14233();
ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
create view v1 as select bug14233_f();
ERROR HY000: Failed to load routine test.bug14233_f. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
insert into t1 values (0);
ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
show procedure status;
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
flush table mysql.proc;
call bug14233();
ERROR HY000: Incorrect information in file: './mysql/proc.frm'
......@@ -88,3 +91,28 @@ show procedure status where db=DATABASE();
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
show function status where db=DATABASE();
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
DROP TABLE IF EXISTS proc_backup;
DROP PROCEDURE IF EXISTS p1;
# Backup the proc table
RENAME TABLE mysql.proc TO proc_backup;
CREATE TABLE mysql.proc LIKE proc_backup;
FLUSH TABLE mysql.proc;
# Test with a valid table.
CREATE PROCEDURE p1()
SET @foo = 10;
CALL p1();
SHOW PROCEDURE STATUS;
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
test p1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
# Modify a field of the table.
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
CREATE PROCEDURE p2()
SET @foo = 10;
ERROR HY000: Cannot load from mysql.proc. The table is probably corrupted
# Procedure loaded from the cache
CALL p1();
SHOW PROCEDURE STATUS;
ERROR HY000: Cannot load from mysql.proc. The table is probably corrupted
DROP TABLE mysql.proc;
RENAME TABLE proc_backup TO mysql.proc;
FLUSH TABLE mysql.proc;
......@@ -510,4 +510,60 @@ DROP USER mysqltest_u1@localhost;
DROP PROCEDURE p_suid;
DROP FUNCTION f_suid;
DROP TABLE t1;
#
# Bug #48872 : Privileges for stored functions ignored if function name
# is mixed case
#
CREATE DATABASE B48872;
USE B48872;
CREATE TABLE `TestTab` (id INT);
INSERT INTO `TestTab` VALUES (1),(2);
CREATE FUNCTION `f_Test`() RETURNS INT RETURN 123;
CREATE FUNCTION `f_Test_denied`() RETURNS INT RETURN 123;
CREATE USER 'tester';
CREATE USER 'Tester';
GRANT SELECT ON TABLE `TestTab` TO 'tester';
GRANT EXECUTE ON FUNCTION `f_Test` TO 'tester';
GRANT EXECUTE ON FUNCTION `f_Test_denied` TO 'Tester';
SELECT f_Test();
f_Test()
123
SELECT * FROM TestTab;
id
1
2
SELECT * FROM TestTab;
id
1
2
SELECT `f_Test`();
`f_Test`()
123
SELECT `F_TEST`();
`F_TEST`()
123
SELECT f_Test();
f_Test()
123
SELECT F_TEST();
F_TEST()
123
SELECT * FROM TestTab;
SELECT `f_Test`();
SELECT `F_TEST`();
SELECT f_Test();
SELECT F_TEST();
SELECT `f_Test_denied`();
`f_Test_denied`()
123
SELECT `F_TEST_DENIED`();
`F_TEST_DENIED`()
123
DROP TABLE `TestTab`;
DROP FUNCTION `f_Test`;
DROP FUNCTION `f_Test_denied`;
USE test;
DROP USER 'tester';
DROP USER 'Tester';
DROP DATABASE B48872;
End of 5.0 tests.
......@@ -6923,6 +6923,64 @@ CALL p1;
ERROR 42S22: Unknown column 'A.b' in 'IN/ALL/ANY subquery'
DROP PROCEDURE p1;
DROP TABLE t1, t2;
#
# Bug#47627: SET @@{global.session}.local_variable in stored routine causes crash
# Bug#48626: Crash or lost connection using SET for declared variables with @@
#
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP PROCEDURE IF EXISTS p3;
CREATE PROCEDURE p1()
BEGIN
DECLARE v INT DEFAULT 0;
SET @@SESSION.v= 10;
END//
ERROR HY000: Unknown system variable 'v'
CREATE PROCEDURE p2()
BEGIN
DECLARE v INT DEFAULT 0;
SET v= 10;
END//
call p2()//
CREATE PROCEDURE p3()
BEGIN
DECLARE v INT DEFAULT 0;
SELECT @@SESSION.v;
END//
ERROR HY000: Unknown system variable 'v'
CREATE PROCEDURE p4()
BEGIN
DECLARE v INT DEFAULT 0;
SET @@GLOBAL.v= 10;
END//
ERROR HY000: Unknown system variable 'v'
CREATE PROCEDURE p5()
BEGIN
DECLARE init_connect INT DEFAULT 0;
SET init_connect= 10;
SET @@GLOBAL.init_connect= 'SELECT 1';
SET @@SESSION.IDENTITY= 1;
SELECT @@SESSION.IDENTITY;
SELECT @@GLOBAL.init_connect;
SELECT init_connect;
END//
CREATE PROCEDURE p6()
BEGIN
DECLARE v INT DEFAULT 0;
SET @@v= 0;
END//
ERROR HY000: Unknown system variable 'v'
SET @old_init_connect= @@GLOBAL.init_connect;
CALL p5();
@@SESSION.IDENTITY
1
@@GLOBAL.init_connect
SELECT 1
init_connect
10
SET @@GLOBAL.init_connect= @old_init_connect;
DROP PROCEDURE p2;
DROP PROCEDURE p5;
# ------------------------------------------------------------------
# -- End of 5.1 tests
# ------------------------------------------------------------------
......
......@@ -1630,3 +1630,287 @@ SELECT my_col FROM t1;
my_col
0.012345687012345687012345687012
DROP TABLE t1;
#
# Bug#45261: Crash, stored procedure + decimal
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 SELECT
/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,0) NO 0
SELECT * FROM t1;
c1
99999999999999999999999999999999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001.
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,0) NO 0
SELECT * FROM t1;
c1
99999999999999999999999999999999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001.1 /* 1 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,0) NO 0
SELECT * FROM t1;
c1
99999999999999999999999999999999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 82 */ 1000000000000000000000000000000000000000000000000000000000000000000000000000000001
AS c1;
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: ''
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,0) NO 0
SELECT * FROM t1;
c1
99999999999999999999999999999999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 40 */ 1000000000000000000000000000000000000001.1000000000000000000000000000000000000001 /* 40 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
99999999999999999999999999999999999.999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 1 */ 1.10000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 80 */
AS c1;
DESC t1;
Field Type Null Key Default Extra
c1 decimal(31,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
1.100000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 1 */ 1.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
AS c1;
DESC t1;
Field Type Null Key Default Extra
c1 decimal(31,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
1.100000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
AS c1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(30,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
0.100000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 45 */ 123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345 /* 45 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
99999999999999999999999999999999999.999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 65 */ 12345678901234567890123456789012345678901234567890123456789012345.1 /* 1 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,1) NO 0.0
SELECT * FROM t1;
c1
9999999999999999999999999999999999999999999999999999999999999999.9
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 66 */ 123456789012345678901234567890123456789012345678901234567890123456.1 /* 1 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,1) NO 0.0
SELECT * FROM t1;
c1
9999999999999999999999999999999999999999999999999999999999999999.9
DROP TABLE t1;
CREATE TABLE t1 SELECT
.123456789012345678901234567890123456789012345678901234567890123456 /* 66 */
AS c1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(30,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
0.123456789012345678901234567890
DROP TABLE t1;
CREATE TABLE t1 AS SELECT 123.1234567890123456789012345678901 /* 31 */ AS c1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(33,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
123.123456789012345678901234567890
DROP TABLE t1;
CREATE TABLE t1 SELECT 1.1 + CAST(1 AS DECIMAL(65,30)) AS c1;
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
2.100000000000000000000000000000
DROP TABLE t1;
#
# Test that the integer and decimal parts are properly calculated.
#
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
CREATE TABLE t2 SELECT MIN(a + 0.0000000000000000000000000000001) AS c1 FROM t1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 4
DESC t2;
Field Type Null Key Default Extra
c1 decimal(32,30) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
CREATE TABLE t2 SELECT IFNULL(a + 0.0000000000000000000000000000001, NULL) AS c1 FROM t1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
Note 1265 Data truncated for column 'c1' at row 2
Note 1265 Data truncated for column 'c1' at row 3
DESC t2;
Field Type Null Key Default Extra
c1 decimal(34,0) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
CREATE TABLE t2 SELECT CASE a WHEN 0.1 THEN 0.0000000000000000000000000000000000000000000000000000000000000000001 END AS c1 FROM t1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t2;
Field Type Null Key Default Extra
c1 decimal(65,30) YES NULL
DROP TABLE t1,t2;
#
# Test that variables get maximum precision.
#
SET @decimal= 1.1;
CREATE TABLE t1 SELECT @decimal AS c1;
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,30) YES NULL
SELECT * FROM t1;
c1
1.100000000000000000000000000000
DROP TABLE t1;
#
# Bug #45261 : Crash, stored procedure + decimal
# Original test by the reporter.
#
# should not crash
CREATE TABLE t1
SELECT .123456789012345678901234567890123456789012345678901234567890123456 AS a;
Warnings:
Note 1265 Data truncated for column 'a' at row 1
DROP TABLE t1;
CREATE PROCEDURE test_proc()
BEGIN
# The las non critical CUSER definition is:
# DECLARE mycursor CURSOR FOR SELECT 1 %
# .12345678912345678912345678912345678912345678912345678912345678912 AS my_col;
DECLARE mycursor CURSOR FOR
SELECT 1 %
.123456789123456789123456789123456789123456789123456789123456789123456789123456789
AS my_col;
OPEN mycursor;
CLOSE mycursor;
END|
# should not crash
CALL test_proc();
DROP PROCEDURE test_proc;
#
# Bug #48370 Absolutely wrong calculations with GROUP BY and
# decimal fields when using IF
#
CREATE TABLE currencies (id int, rate decimal(16,4),
PRIMARY KEY (id), KEY (rate));
INSERT INTO currencies VALUES (11,0.7028);
INSERT INTO currencies VALUES (1,1);
CREATE TABLE payments (
id int,
supplier_id int,
status int,
currency_id int,
vat decimal(7,4),
PRIMARY KEY (id),
KEY currency_id (currency_id),
KEY supplier_id (supplier_id)
);
INSERT INTO payments (id,status,vat,supplier_id,currency_id) VALUES
(3001,2,0.0000,344,11), (1,2,0.0000,1,1);
CREATE TABLE sub_tasks (
id int,
currency_id int,
price decimal(16,4),
discount decimal(10,4),
payment_id int,
PRIMARY KEY (id),
KEY currency_id (currency_id),
KEY payment_id (payment_id)
) ;
INSERT INTO sub_tasks (id, price, discount, payment_id, currency_id) VALUES
(52, 12.60, 0, 3001, 11), (56, 14.58, 0, 3001, 11);
# should return 1 and the same values in col 2 and 3
select STRAIGHT_JOIN
(1 + PAY.vat) AS mult,
SUM(ROUND((SUB.price - ROUND(ROUND(SUB.price, 2) * SUB.discount, 2)) *
CUR.rate / CUR.rate, 2)
) v_net_with_discount,
SUM(ROUND((SUB.price - ROUND(ROUND(SUB.price, 2) * SUB.discount, 1)) *
CUR.rate / CUR.rate , 2)
* (1 + PAY.vat)
) v_total
from
currencies CUR, payments PAY, sub_tasks SUB
where
SUB.payment_id = PAY.id and
PAY.currency_id = CUR.id and
PAY.id > 2
group by PAY.id + 1;
mult v_net_with_discount v_total
1.0000 27.18 27.180000
DROP TABLE currencies, payments, sub_tasks;
End of 5.1 tests
This diff was suppressed by a .gitattributes entry.
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
drop table if exists t1, t2;
create table t1 (a int) engine=innodb;
create table t2 (a int) engine=myisam;
......@@ -224,6 +225,8 @@ create table t0 (n int);
insert t0 select * from t1;
set autocommit=1;
insert into t0 select GET_LOCK("lock1",null);
Warnings:
Note 1592 Statement may not be safe to log in statement format.
set autocommit=0;
create table t2 (n int) engine=innodb;
insert into t2 values (3);
......
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
set @saved_global_binlog_format = @@global.binlog_format;
......@@ -29,6 +30,8 @@ SELECT RELEASE_LOCK('Bug#34306');
RELEASE_LOCK('Bug#34306')
1
# con2
Warnings:
Note 1592 Statement may not be safe to log in statement format.
SELECT RELEASE_LOCK('Bug#34306');
RELEASE_LOCK('Bug#34306')
1
......
......@@ -300,4 +300,86 @@ Warnings:
Note 1592 Statement may not be safe to log in statement format.
DROP TABLE t1, t2;
SET @@SESSION.SQL_MODE = @save_sql_mode;
CREATE TABLE t1 (a VARCHAR(1000));
INSERT INTO t1 VALUES (CURRENT_USER());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (FOUND_ROWS());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (GET_LOCK('tmp', 1));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp'));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (IS_USED_LOCK('tmp'));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat'));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (MASTER_POS_WAIT('dummy arg', 4711, 1));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (RELEASE_LOCK('tmp'));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (ROW_COUNT());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (SESSION_USER());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (SLEEP(1));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (SYSDATE());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (SYSTEM_USER());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (USER());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (UUID());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (UUID_SHORT());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (VERSION());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
DELETE FROM t1;
SET TIMESTAMP=1000000;
INSERT INTO t1 VALUES
(CURDATE()),
(CURRENT_DATE()),
(CURRENT_TIME()),
(CURRENT_TIMESTAMP()),
(CURTIME()),
(LOCALTIME()),
(LOCALTIMESTAMP()),
(NOW()),
(UNIX_TIMESTAMP()),
(UTC_DATE()),
(UTC_TIME()),
(UTC_TIMESTAMP());
SELECT * FROM t1;
a
1970-01-12
1970-01-12
16:46:40
1970-01-12 16:46:40
16:46:40
1970-01-12 16:46:40
1970-01-12 16:46:40
1970-01-12 16:46:40
1000000
1970-01-12
13:46:40
1970-01-12 13:46:40
DROP TABLE t1;
"End of tests"
-- source include/have_innodb.inc
-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/have_binlog_format_statement.inc
# You cannot use `KILL' with the Embedded MySQL Server library,
# because the embedded server merely runs inside the threads of the host
......
......@@ -2,6 +2,9 @@
# For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/have_binlog_format_statement.inc
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
-- source extra/binlog_tests/mix_innodb_myisam_binlog.test
set @@session.binlog_format=statement;
......
--source include/have_log_bin.inc
--source include/have_binlog_format_row_or_statement.inc
# Test sets its own binlog_format, so we restrict it to run only once
--source include/have_binlog_format_row.inc
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
# Get rid of previous tests binlog
--disable_query_log
......
......@@ -388,4 +388,56 @@ DELETE FROM t1 LIMIT 1;
DROP TABLE t1, t2;
SET @@SESSION.SQL_MODE = @save_sql_mode;
#
# BUG#47995: Mark user functions as unsafe
#
# Test that the system functions that are supposed to be marked unsafe
# generate a warning. Each INSERT statement below should generate a
# warning.
#
CREATE TABLE t1 (a VARCHAR(1000));
INSERT INTO t1 VALUES (CURRENT_USER()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (FOUND_ROWS()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (GET_LOCK('tmp', 1));
INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp'));
INSERT INTO t1 VALUES (IS_USED_LOCK('tmp'));
INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat')); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (MASTER_POS_WAIT('dummy arg', 4711, 1));
INSERT INTO t1 VALUES (RELEASE_LOCK('tmp'));
INSERT INTO t1 VALUES (ROW_COUNT()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (SESSION_USER()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (SLEEP(1));
INSERT INTO t1 VALUES (SYSDATE());
INSERT INTO t1 VALUES (SYSTEM_USER()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (USER()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (UUID()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (UUID_SHORT()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (VERSION());
DELETE FROM t1;
# Since we replicate the TIMESTAMP variable, functions affected by the
# TIMESTAMP variable are safe to replicate. So we check that the
# following following functions depend on the TIMESTAMP variable and
# don't generate a warning.
SET TIMESTAMP=1000000;
INSERT INTO t1 VALUES
(CURDATE()),
(CURRENT_DATE()),
(CURRENT_TIME()),
(CURRENT_TIMESTAMP()),
(CURTIME()),
(LOCALTIME()),
(LOCALTIMESTAMP()),
(NOW()),
(UNIX_TIMESTAMP()),
(UTC_DATE()),
(UTC_TIME()),
(UTC_TIMESTAMP());
SELECT * FROM t1;
DROP TABLE t1;
--echo "End of tests"
......@@ -968,6 +968,7 @@ create index t1u on t1 (u(1));
drop table t1;
set global innodb_file_per_table=0;
set global innodb_file_format=Antelope;
set global innodb_file_format_check=Antelope;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
CREATE TABLE t1(
......
SET foreign_key_checks=0;
CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB;
CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB;
SET foreign_key_checks=1;
SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2');
COUNT(*)
2
SET foreign_key_checks=0;
DROP TABLE t1, t2;
set @old_innodb_file_format_check=@@innodb_file_format_check;
select @old_innodb_file_format_check;
@old_innodb_file_format_check
Antelope
set global innodb_file_format_check = Barracuda;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check = DEFAULT;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check = @old_innodb_file_format_check;
select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
set global innodb_file_format_check = cheetah;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = Bear;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = off;
ERROR HY000: Incorrect arguments to SET
......@@ -31,8 +31,6 @@ select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check=default;
Warnings:
Warning 1210 Ignoring SET innodb_file_format=on
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
......
innodb-index : Bug#47563 2009-06-11 svoj InnoDB: Error: table `test`.`t1#1` already exists in InnoDB internal
innodb-index : Bug#49396 2009-12-03 test fails in embedded mode
-- source include/have_innodb.inc
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
commit;
......@@ -398,6 +400,7 @@ create index t1u on t1 (u(1));
drop table t1;
eval set global innodb_file_per_table=$per_table;
eval set global innodb_file_format=$format;
eval set global innodb_file_format_check=$format;
#
# Test to check whether CREATE INDEX handles implicit foreign key
......@@ -532,3 +535,10 @@ disconnect a;
disconnect b;
DROP TABLE t1;
#
# restore environment to the state it was before this test execution
#
-- disable_query_log
eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig;
# This is the test for bug 46676: mysqld got exception 0xc0000005
# It is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37.
# But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5).
--source include/have_innodb.inc
SET foreign_key_checks=0;
CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB;
CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB;
SET foreign_key_checks=1;
# Server crashes
SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2');
SET foreign_key_checks=0;
DROP TABLE t1, t2;
# This is the unit test for bug *47167.
# It tests setting the global variable
# "innodb_file_format_check" with a
# user-Defined Variable.
--source include/have_innodb.inc
# Save the value (Antelope) in 'innodb_file_format_check' to
# 'old_innodb_file_format_check'
set @old_innodb_file_format_check=@@innodb_file_format_check;
# @old_innodb_file_format_check shall have the value of 'Antelope'
select @old_innodb_file_format_check;
# Reset the value in 'innodb_file_format_check' to 'Barracuda'
set global innodb_file_format_check = Barracuda;
select @@innodb_file_format_check;
# Set 'innodb_file_format_check' to its default value, which
# is the latest file format supported in the current release.
set global innodb_file_format_check = DEFAULT;
select @@innodb_file_format_check;
# Put the saved value back to 'innodb_file_format_check'
set global innodb_file_format_check = @old_innodb_file_format_check;
# Check whether 'innodb_file_format_check' get its original value.
select @@innodb_file_format_check;
# Following are negative tests, all should fail.
--disable_warnings
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check = cheetah;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check = Bear;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check = on;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check = off;
--enable_warnings
......@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
create table t1 (a int primary key);
create table t4 (a int primary key);
insert into t1 values (1),(1);
......
......@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
create table t1(n int);
insert into t1 values(get_lock("lock",2));
select get_lock("lock",2);
......
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
select * from t1;
a b
1 10
2 15
select * from t1;
a b
1 10
2 15
drop table t1;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (a VARCHAR(1000));
INSERT INTO t1 VALUES (CONNECTION_ID());
INSERT INTO t1 VALUES (CONNECTION_ID());
INSERT INTO t1 VALUES
(CURDATE()),
(CURRENT_DATE()),
(CURRENT_TIME()),
(CURRENT_TIMESTAMP()),
(CURTIME()),
(LOCALTIME()),
(LOCALTIMESTAMP()),
(NOW()),
(UNIX_TIMESTAMP()),
(UTC_DATE()),
(UTC_TIME()),
(UTC_TIMESTAMP());
INSERT INTO t1 VALUES (RAND());
INSERT INTO t1 VALUES (LAST_INSERT_ID());
Comparing tables master:test.t1 and slave:test.t1
DROP TABLE t1;
......@@ -476,4 +476,30 @@ master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
DROP DATABASE mysqltest1;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TEMPORARY TABLE t7(c1 INT);
CREATE TABLE t5(c1 INT);
CREATE TABLE t4(c1 INT);
CREATE VIEW bug48506_t1 AS SELECT 1;
CREATE VIEW bug48506_t2 AS SELECT * FROM t4;
CREATE VIEW bug48506_t3 AS SELECT t5.c1 AS A, t4.c1 AS B FROM t5, t4;
CREATE TABLE bug48506_t4(c1 INT);
DROP VIEW bug48506_t1, bug48506_t2, bug48506_t3;
DROP TABLE bug48506_t4;
CREATE TABLE IF NOT EXISTS bug48506_t1 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t2 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t3 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t4 LIKE t7;
SHOW TABLES LIKE 'bug48506%';
Tables_in_test (bug48506%)
bug48506_t4
DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3;
DROP TEMPORARY TABLES t7;
DROP TABLES t4, t5;
DROP TABLES IF EXISTS bug48506_t4;
end of the tests
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TEMPORARY TABLE t1(c1 INTEGER);
CREATE TABLE t2(c1 INTEGER);
CREATE TABLE t1(c1 INTEGER);
INSERT INTO t1 VALUES(1), (2);
INSERT INTO t2 VALUES(1), (2);
SELECT * FROM t1;
c1
1
2
SELECT * FROM t2;
c1
1
2
TRUNCATE t1;
TRUNCATE t2;
SELECT * FROM t1;
c1
1
2
SELECT * FROM t2;
c1
DROP TABLE t1;
DROP TABLE t2;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
include/stop_slave.inc
include/start_slave.inc
SET GLOBAL event_scheduler = ON;
CREATE TABLE t1 (i INT NOT NULL AUTO_INCREMENT PRIMARY KEY, f varchar(8)) ENGINE=ENGINE_TYPE;
INSERT INTO t1 (f) VALUES ('a'),('a'),('a'),('a'),('a');
INSERT INTO t1 SELECT i+5, f FROM t1;
INSERT INTO t1 SELECT i+10, f FROM t1;
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
DO INSERT INTO t1 VALUES (SLEEP(5),CONCAT('ev1_',CONNECTION_ID()));
CREATE EVENT ev2 ON SCHEDULE EVERY 1 SECOND
DO INSERT INTO t1 VALUES (SLEEP(5),CONCAT('ev2_',CONNECTION_ID()));
STOP SLAVE IO_THREAD;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 20;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 19;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 18;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 17;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 16;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 15;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 14;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 13;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 12;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 11;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 10;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 9;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 8;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 7;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 6;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 5;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 4;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 3;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 2;
UPDATE t1 SET f = CONCAT('up_',CONNECTION_ID()) WHERE i = 1;
SET GLOBAL event_scheduler = OFF;
include/stop_slave.inc
UNINSTALL PLUGIN rpl_semi_sync_slave;
UNINSTALL PLUGIN rpl_semi_sync_master;
include/start_slave.inc
DROP EVENT ev1;
DROP EVENT ev2;
DROP TABLE t1;
......@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1;
......
......@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
......
......@@ -11,5 +11,6 @@
##############################################################################
rpl_get_master_version_and_clock: # Bug#46931 2009-10-17 joro rpl.rpl_get_master_version_and_clock fails
rpl_row_create_table : Bug#45576 2009-12-01 joro rpl_row_create_table fails on PB2
rpl_cross_version : BUG#43913 2009-10-22 luis rpl_cross_version fails with symptom in described in bug report
rpl_spec_variables : BUG#47661 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
......@@ -7,6 +7,8 @@
-- source include/master-slave.inc
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
connection master;
create table t1 (a int primary key);
create table t4 (a int primary key);
......@@ -14,19 +16,15 @@ create table t4 (a int primary key);
--error 1022, ER_DUP_ENTRY
insert into t1 values (1),(1);
insert into t4 values (1),(2);
save_master_pos;
connection slave;
# as the t1 table is ignored on the slave, the slave should be able to sync
sync_with_master;
sync_slave_with_master;
# check that the table has been ignored, because otherwise the test is nonsense
show tables like 't1';
show tables like 't4';
SELECT * FROM test.t4 ORDER BY a;
connection master;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
# Now test that even critical errors (connection killed)
# are ignored if rules allow it.
......@@ -50,18 +48,17 @@ kill @id;
drop table t2,t3;
insert into t4 values (3),(4);
connection master;
# The get_lock function causes warning for unsafe statement.
--disable_warnings
--error 0,1317,2013
reap;
--enable_warnings
connection master1;
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
SELECT * FROM test.t4 ORDER BY a;
connection master1;
DROP TABLE test.t4;
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
# End of 4.1 tests
# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed
source include/master-slave.inc;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
create table t1(n int);
# Use of get_lock gives a warning for unsafeness if binlog_format=statement
--disable_warnings
insert into t1 values(get_lock("lock",2));
--enable_warnings
dirty_close master;
connection master1;
select get_lock("lock",2);
......
--secure-file-priv=$MYSQLTEST_VARDIR/std_data_master_link
ln -s $MYSQLTEST_VARDIR/std_data $MYSQLTEST_VARDIR/std_data_master_link
--slave-load-tmpdir=$MYSQLTEST_VARDIR/std_data_slave_link
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment