mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge
This commit is contained in:
37
.cvsignore
37
.cvsignore
@ -1,37 +0,0 @@
|
||||
.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
|
@ -1,62 +0,0 @@
|
||||
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
|
@ -1,80 +0,0 @@
|
||||
# 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
|
2344
BitKeeper/etc/gone
2344
BitKeeper/etc/gone
File diff suppressed because it is too large
Load Diff
@ -1,314 +0,0 @@
|
||||
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
|
@ -1 +0,0 @@
|
||||
dev@mysql.com
|
@ -1,7 +0,0 @@
|
||||
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
|
@ -1,14 +0,0 @@
|
||||
#!/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
|
@ -1,134 +0,0 @@
|
||||
#!/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
|
@ -1,22 +0,0 @@
|
||||
#! /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;
|
@ -1,30 +0,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);
|
@ -1,22 +0,0 @@
|
||||
#!/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
|
@ -1,26 +0,0 @@
|
||||
#!/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;
|
@ -1,21 +0,0 @@
|
||||
#! /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;
|
@ -1,22 +0,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
|
||||
|
@ -1,82 +0,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;
|
@ -1,82 +0,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;
|
@ -1,356 +0,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;
|
@ -39,6 +39,9 @@ ADD_DEFINITIONS(-DDEFAULT_CHARSET_HOME="c:/Program Files/MySQL/MySQL Server ${MY
|
||||
ADD_DEFINITIONS(-DPACKAGE=mysql)
|
||||
ADD_DEFINITIONS(-DSHAREDIR="share")
|
||||
|
||||
# Enable IPv6 handling code
|
||||
ADD_DEFINITIONS(-DHAVE_IPV6)
|
||||
|
||||
# Set debug options
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DFORCE_INIT_OF_VARS")
|
||||
|
||||
|
@ -269,11 +269,12 @@ test-full-qa:
|
||||
#
|
||||
|
||||
API_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
|
||||
$(top_srcdir)/include/mysql.h
|
||||
$(top_srcdir)/include/mysql.h \
|
||||
$(top_srcdir)/include/mysql/psi/psi_abi_v1.h \
|
||||
$(top_srcdir)/include/mysql/psi/psi_abi_v2.h
|
||||
|
||||
TEST_PREPROCESSOR_HEADER = $(top_srcdir)/include/mysql/plugin.h \
|
||||
$(top_srcdir)/sql/mysql_priv.h \
|
||||
$(top_srcdir)/include/mysql.h
|
||||
TEST_PREPROCESSOR_HEADER = $(API_PREPROCESSOR_HEADER) \
|
||||
$(top_srcdir)/sql/mysql_priv.h
|
||||
|
||||
#
|
||||
# Rules for checking that the abi/api has not changed.
|
||||
|
@ -1122,7 +1122,11 @@ int main(int argc,char *argv[])
|
||||
close(stdout_fileno_copy); /* Clean up dup(). */
|
||||
}
|
||||
|
||||
load_defaults("my",load_default_groups,&argc,&argv);
|
||||
if (load_defaults("my",load_default_groups,&argc,&argv))
|
||||
{
|
||||
my_end(0);
|
||||
exit(1);
|
||||
}
|
||||
defaults_argv=argv;
|
||||
if (get_options(argc, (char **) argv))
|
||||
{
|
||||
|
@ -819,7 +819,8 @@ int main(int argc, char **argv)
|
||||
init_dynamic_string(&conn_args, "", 512, 256))
|
||||
die("Out of memory");
|
||||
|
||||
load_defaults("my", load_default_groups, &argc, &argv);
|
||||
if (load_defaults("my", load_default_groups, &argc, &argv))
|
||||
die(NULL);
|
||||
defaults_argv= argv; /* Must be freed by 'free_defaults' */
|
||||
|
||||
if (handle_options(&argc, &argv, my_long_options, get_one_option))
|
||||
|
@ -304,7 +304,8 @@ int main(int argc,char *argv[])
|
||||
|
||||
MY_INIT(argv[0]);
|
||||
mysql_init(&mysql);
|
||||
load_defaults("my",load_default_groups,&argc,&argv);
|
||||
if (load_defaults("my",load_default_groups,&argc,&argv))
|
||||
exit(1);
|
||||
save_argv = argv; /* Save for free_defaults */
|
||||
if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
|
||||
{
|
||||
|
@ -442,6 +442,7 @@ Exit_status Load_log_processor::process_first_event(const char *bname,
|
||||
{
|
||||
error("Could not construct local filename %s%s.",
|
||||
target_dir_name,bname);
|
||||
my_free(fname, MYF(0));
|
||||
delete ce;
|
||||
DBUG_RETURN(ERROR_STOP);
|
||||
}
|
||||
@ -449,9 +450,15 @@ Exit_status Load_log_processor::process_first_event(const char *bname,
|
||||
rec.fname= fname;
|
||||
rec.event= ce;
|
||||
|
||||
/*
|
||||
fname is freed in process_event()
|
||||
after Execute_load_query_log_event or Execute_load_log_event
|
||||
will have been processed, otherwise in Load_log_processor::destroy()
|
||||
*/
|
||||
if (set_dynamic(&file_names, (uchar*)&rec, file_id))
|
||||
{
|
||||
error("Out of memory.");
|
||||
my_free(fname, MYF(0));
|
||||
delete ce;
|
||||
DBUG_RETURN(ERROR_STOP);
|
||||
}
|
||||
@ -831,7 +838,17 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
print_event_info->common_header_len=
|
||||
glob_description_event->common_header_len;
|
||||
ev->print(result_file, print_event_info);
|
||||
ev->temp_buf= 0; // as the event ref is zeroed
|
||||
if (!remote_opt)
|
||||
{
|
||||
ev->free_temp_buf(); // free memory allocated in dump_local_log_entries
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
disassociate but not free dump_remote_log_entries time memory
|
||||
*/
|
||||
ev->temp_buf= 0;
|
||||
}
|
||||
/*
|
||||
We don't want this event to be deleted now, so let's hide it (I
|
||||
(Guilhem) should later see if this triggers a non-serious Valgrind
|
||||
@ -2014,7 +2031,8 @@ int main(int argc, char** argv)
|
||||
|
||||
my_init_time(); // for time functions
|
||||
|
||||
load_defaults("my", load_default_groups, &argc, &argv);
|
||||
if (load_defaults("my", load_default_groups, &argc, &argv))
|
||||
exit(1);
|
||||
defaults_argv= argv;
|
||||
parse_args(&argc, (char***)&argv);
|
||||
|
||||
|
@ -344,9 +344,8 @@ static int get_options(int *argc, char ***argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
load_defaults("my", load_default_groups, argc, argv);
|
||||
|
||||
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
||||
if ((ho_error= load_defaults("my", load_default_groups, argc, argv)) ||
|
||||
(ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
|
||||
exit(ho_error);
|
||||
|
||||
if (!what_to_do)
|
||||
|
@ -890,7 +890,8 @@ static int get_options(int *argc, char ***argv)
|
||||
opt_net_buffer_length= *mysql_params->p_net_buffer_length;
|
||||
|
||||
md_result_file= stdout;
|
||||
load_defaults("my",load_default_groups,argc,argv);
|
||||
if (load_defaults("my",load_default_groups,argc,argv))
|
||||
return 1;
|
||||
defaults_argv= *argv;
|
||||
|
||||
if (my_hash_init(&ignore_table, charset_info, 16, 0, 0,
|
||||
|
@ -592,7 +592,8 @@ int main(int argc, char **argv)
|
||||
char **argv_to_free;
|
||||
MY_INIT(argv[0]);
|
||||
|
||||
load_defaults("my",load_default_groups,&argc,&argv);
|
||||
if (load_defaults("my",load_default_groups,&argc,&argv))
|
||||
return 1;
|
||||
/* argv is changed in the program */
|
||||
argv_to_free= argv;
|
||||
if (get_options(&argc, &argv))
|
||||
|
@ -63,7 +63,9 @@ int main(int argc, char **argv)
|
||||
char *wild;
|
||||
MYSQL mysql;
|
||||
MY_INIT(argv[0]);
|
||||
load_defaults("my",load_default_groups,&argc,&argv);
|
||||
if (load_defaults("my",load_default_groups,&argc,&argv))
|
||||
exit(1);
|
||||
|
||||
get_options(&argc,&argv);
|
||||
|
||||
wild=0;
|
||||
|
@ -299,7 +299,11 @@ int main(int argc, char **argv)
|
||||
|
||||
MY_INIT(argv[0]);
|
||||
|
||||
load_defaults("my",load_default_groups,&argc,&argv);
|
||||
if (load_defaults("my",load_default_groups,&argc,&argv))
|
||||
{
|
||||
my_end(0);
|
||||
exit(1);
|
||||
}
|
||||
defaults_argv=argv;
|
||||
if (get_options(&argc,&argv))
|
||||
{
|
||||
|
@ -6038,7 +6038,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
|
||||
int parse_args(int argc, char **argv)
|
||||
{
|
||||
load_defaults("my",load_default_groups,&argc,&argv);
|
||||
if (load_defaults("my",load_default_groups,&argc,&argv))
|
||||
exit(1);
|
||||
|
||||
default_argv= argv;
|
||||
|
||||
if ((handle_options(&argc, &argv, my_long_options, get_one_option)))
|
||||
|
42
configure.in
42
configure.in
@ -942,6 +942,42 @@ if test "$use_alarm" = no ; then
|
||||
fi
|
||||
AC_MSG_RESULT($use_alarm)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for IPv6 support
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
AC_CHECK_HEADERS(netinet/in6.h)
|
||||
|
||||
AC_CHECK_TYPES([struct sockaddr_in6, struct in6_addr],
|
||||
[have_in6_types=yes],
|
||||
[have_in6_types=no],
|
||||
[[
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN6_H
|
||||
#include <netinet/in6.h>
|
||||
#endif
|
||||
]])
|
||||
|
||||
AC_MSG_CHECKING([for IPv6 support])
|
||||
|
||||
AC_ARG_ENABLE(ipv6,
|
||||
AS_HELP_STRING([--disable-ipv6], [Disable support for IPv6 networking]),
|
||||
[disable_ipv6=yes], [disable_ipv6=no])
|
||||
|
||||
if test x"$disable_ipv6" = xyes -o x"$have_in6_types" = xno; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_DEFINE([HAVE_IPV6], [1], [Define if IPv6 networking support is present])
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for TCP wrapper support
|
||||
#--------------------------------------------------------------------
|
||||
@ -1040,12 +1076,6 @@ AC_CHECK_TYPES([int8, uint8, int16, uint16, int32, uint32, int64, uint64,
|
||||
uchar, uint, ulong],[],[], [
|
||||
#include <sys/types.h>
|
||||
])
|
||||
AC_CHECK_TYPES([in_addr_t], [], [], [
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
])
|
||||
AC_CHECK_TYPES([fp_except], [], [], [
|
||||
#include <sys/types.h>
|
||||
#include <ieeefp.h>
|
||||
|
@ -1355,14 +1355,18 @@ void _db_doprnt_(const char *format,...)
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is intended as a
|
||||
* vfprintf clone with consistent, platform independent output for
|
||||
* problematic formats like %p, %zd and %lld.
|
||||
* However: full functionality for my_vsnprintf has not been backported yet,
|
||||
* so code using "%g" or "%f" will have undefined behaviour.
|
||||
*/
|
||||
static void DbugVfprintf(FILE *stream, const char* format, va_list args)
|
||||
{
|
||||
char cvtbuf[1024];
|
||||
size_t len;
|
||||
len = my_vsnprintf(cvtbuf, sizeof(cvtbuf), format, args);
|
||||
// Do not use my_vsnprintf, it does not support "%g".
|
||||
len = vsnprintf(cvtbuf, sizeof(cvtbuf), format, args);
|
||||
(void) fprintf(stream, "%s\n", cvtbuf);
|
||||
}
|
||||
|
||||
|
@ -189,6 +189,7 @@ int main(int argc, char **argv)
|
||||
config_file);
|
||||
}
|
||||
error= 2;
|
||||
exit(error);
|
||||
}
|
||||
|
||||
for (argument= arguments+1 ; *argument ; argument++)
|
||||
@ -197,5 +198,5 @@ int main(int argc, char **argv)
|
||||
my_free((char*) load_default_groups,MYF(0));
|
||||
free_defaults(arguments);
|
||||
|
||||
exit(error);
|
||||
exit(0);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2000-2006 MySQL AB
|
||||
# Copyright (C) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
@ -24,6 +24,8 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
|
||||
my_xml.h mysql_embed.h mysql/services.h \
|
||||
mysql/service_my_snprintf.h mysql/service_thd_alloc.h \
|
||||
my_pthread.h my_no_pthread.h \
|
||||
mysql/psi/psi.h mysql/psi/mysql_thread.h \
|
||||
mysql/psi/mysql_file.h \
|
||||
decimal.h errmsg.h my_global.h my_net.h \
|
||||
my_getopt.h sslopt-longopts.h my_dir.h \
|
||||
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
|
||||
@ -38,13 +40,15 @@ noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \
|
||||
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
|
||||
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
|
||||
my_handler.h my_time.h service_versions.h \
|
||||
my_rdtsc.h \
|
||||
my_rdtsc.h mysql/psi/psi_abi_v1.h mysql/psi/psi_abi_v2.h \
|
||||
my_vle.h my_user.h my_atomic.h atomic/nolock.h \
|
||||
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
|
||||
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
|
||||
atomic/solaris.h
|
||||
|
||||
EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp probes_mysql.d.base
|
||||
EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp probes_mysql.d.base \
|
||||
mysql/psi/psi_abi_v1.h.pp \
|
||||
mysql/psi/psi_abi_v2.h.pp
|
||||
|
||||
# Remove built files and the symlinked directories
|
||||
CLEANFILES = $(BUILT_SOURCES) readline openssl probes_mysql.d probes_mysql_nodtrace.h
|
||||
|
@ -20,6 +20,13 @@
|
||||
|
||||
#define BIG_TABLES
|
||||
|
||||
/*
|
||||
Minimal version of Windows we should be able to run on.
|
||||
Currently Windows XP.
|
||||
*/
|
||||
#define _WIN32_WINNT 0x0501
|
||||
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
/* Avoid endless warnings about sprintf() etc. being unsafe. */
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
@ -27,6 +34,7 @@
|
||||
|
||||
#include <sys/locking.h>
|
||||
#include <winsock2.h>
|
||||
#include <Ws2tcpip.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include <malloc.h>
|
||||
@ -88,6 +96,12 @@
|
||||
|
||||
#define S_IROTH S_IREAD /* for my_lib */
|
||||
|
||||
/* Winsock2 constant (Vista SDK and later)*/
|
||||
#define IPPROTO_IPV6 41
|
||||
#ifndef IPV6_V6ONLY
|
||||
#define IPV6_V6ONLY 27
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#define FILE_BINARY O_BINARY /* my_fopen in binary mode */
|
||||
#define O_TEMPORARY 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000,2004 MySQL AB
|
||||
/* Copyright (C) 2000-2004 MySQL AB, 2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -148,7 +148,7 @@ typedef struct st_heap_share
|
||||
char * name; /* Name of "memory-file" */
|
||||
#ifdef THREAD
|
||||
THR_LOCK lock;
|
||||
pthread_mutex_t intern_lock; /* Locking for use with _locking */
|
||||
mysql_mutex_t intern_lock; /* Locking for use with _locking */
|
||||
#endif
|
||||
my_bool delete_on_close;
|
||||
LIST open_list;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000-2003 MySQL AB
|
||||
/* Copyright (C) 2000-2003 MySQL AB, 2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -83,6 +83,16 @@
|
||||
#endif
|
||||
#endif /* _WIN32... */
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
|
||||
#undef WITH_PERFSCHEMA_STORAGE_ENGINE
|
||||
#endif
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
|
||||
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
|
||||
#define HAVE_PSI_INTERFACE
|
||||
#endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
|
||||
|
||||
/* Make it easier to add conditionl code for windows */
|
||||
#ifdef __WIN__
|
||||
#define IF_WIN(A,B) (A)
|
||||
|
@ -43,7 +43,7 @@ C_MODE_START
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__NETWARE__)
|
||||
#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__NETWARE__)
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/ip.h>
|
||||
@ -73,11 +73,6 @@ C_MODE_START
|
||||
#define in_addr_t uint32
|
||||
#endif
|
||||
|
||||
/* On some operating systems (e.g. Solaris) INADDR_NONE is not defined */
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE -1 /* Error value from inet_addr */
|
||||
#endif
|
||||
|
||||
/* Thread safe or portable version of some functions */
|
||||
|
||||
void my_inet_ntoa(struct in_addr in, char *buf);
|
||||
@ -86,9 +81,6 @@ void my_inet_ntoa(struct in_addr in, char *buf);
|
||||
Handling of gethostbyname_r()
|
||||
*/
|
||||
|
||||
#if !defined(HPUX10)
|
||||
struct hostent;
|
||||
#endif /* HPUX */
|
||||
#if !defined(HAVE_GETHOSTBYNAME_R)
|
||||
struct hostent *my_gethostbyname_r(const char *name,
|
||||
struct hostent *result, char *buffer,
|
||||
@ -118,11 +110,5 @@ struct hostent *my_gethostbyname_r(const char *name,
|
||||
#define GETHOSTBYNAME_BUFF_SIZE 2048
|
||||
#endif
|
||||
|
||||
/* On SCO you get a link error when refering to h_errno */
|
||||
#ifdef SCO
|
||||
#undef h_errno
|
||||
#define h_errno errno
|
||||
#endif
|
||||
|
||||
C_MODE_END
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef MY_NO_PTHREAD_INCLUDED
|
||||
#define MY_NO_PTHREAD_INCLUDED
|
||||
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -48,5 +48,16 @@
|
||||
#define rw_unlock(A)
|
||||
#define rwlock_destroy(A)
|
||||
|
||||
#define mysql_mutex_init(A, B, C) do {} while (0)
|
||||
#define mysql_mutex_lock(A) do {} while (0)
|
||||
#define mysql_mutex_unlock(A) do {} while (0)
|
||||
#define mysql_mutex_destroy(A) do {} while (0)
|
||||
|
||||
#define mysql_rwlock_init(A, B, C) do {} while (0)
|
||||
#define mysql_rwlock_rdlock(A) do {} while (0)
|
||||
#define mysql_rwlock_wrlock(A) do {} while (0)
|
||||
#define mysql_rwlock_unlock(A) do {} while (0)
|
||||
#define mysql_rwlock_destroy(A) do {} while (0)
|
||||
|
||||
#endif
|
||||
#endif /* MY_NO_PTHREAD_INCLUDED */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -99,7 +99,7 @@ struct timespec {
|
||||
|
||||
|
||||
int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
|
||||
int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
|
||||
int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *);
|
||||
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
|
||||
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
|
||||
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
|
||||
@ -137,8 +137,8 @@ int pthread_join(pthread_t thread, void **value_ptr);
|
||||
#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
|
||||
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
|
||||
#define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A))
|
||||
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)
|
||||
#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
|
||||
#define pthread_mutex_unlock(A) (LeaveCriticalSection(A), 0)
|
||||
#define pthread_mutex_destroy(A) (DeleteCriticalSection(A), 0)
|
||||
#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH)
|
||||
|
||||
|
||||
@ -630,6 +630,10 @@ extern int pthread_dummy(int);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <mysql/psi/mysql_thread.h>
|
||||
|
||||
#define INSTRUMENT_ME 0
|
||||
|
||||
struct st_my_thread_var
|
||||
{
|
||||
int thr_errno;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000-2003 MySQL AB
|
||||
/* Copyright (C) 2000-2003 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -60,7 +60,7 @@ extern int NEAR my_errno; /* Last error in mysys */
|
||||
#define MY_WME 16 /* Write message on error */
|
||||
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
|
||||
#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
|
||||
#define MY_SYNC_DIR 1024 /* my_create/delete/rename: sync directory */
|
||||
#define MY_SYNC_DIR 8192 /* my_create/delete/rename: sync directory */
|
||||
#define MY_RAID 64 /* Support for RAID */
|
||||
#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
|
||||
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
|
||||
@ -1018,5 +1018,15 @@ void netware_reg_user(const char *ip, const char *user,
|
||||
const char *application);
|
||||
#endif
|
||||
|
||||
#include <mysql/psi/psi.h>
|
||||
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
extern MYSQL_PLUGIN_IMPORT struct PSI_bootstrap *PSI_hook;
|
||||
void my_init_mysys_psi_keys(void);
|
||||
#endif
|
||||
|
||||
struct st_mysql_file;
|
||||
extern struct st_mysql_file *mysql_stdin;
|
||||
|
||||
C_MODE_END
|
||||
#endif /* _my_sys_h */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -433,7 +433,7 @@ typedef struct st_mi_check_param
|
||||
const char *op_name;
|
||||
enum_mi_stats_method stats_method;
|
||||
#ifdef THREAD
|
||||
pthread_mutex_t print_msg_mutex;
|
||||
mysql_mutex_t print_msg_mutex;
|
||||
my_bool need_print_msg_lock;
|
||||
#endif
|
||||
} MI_CHECK;
|
||||
@ -460,8 +460,8 @@ typedef struct st_sort_info
|
||||
/* sync things */
|
||||
uint got_error, threads_running;
|
||||
#ifdef THREAD
|
||||
pthread_mutex_t mutex;
|
||||
pthread_cond_t cond;
|
||||
mysql_mutex_t mutex;
|
||||
mysql_cond_t cond;
|
||||
#endif
|
||||
} SORT_INFO;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -75,7 +75,7 @@ typedef struct st_myrg_info
|
||||
LIST open_list;
|
||||
QUEUE by_key;
|
||||
ulong *rec_per_key_part; /* for sql optimizing */
|
||||
pthread_mutex_t mutex;
|
||||
mysql_mutex_t mutex;
|
||||
} MYRG_INFO;
|
||||
|
||||
|
||||
|
1398
include/mysql/psi/mysql_file.h
Normal file
1398
include/mysql/psi/mysql_file.h
Normal file
File diff suppressed because it is too large
Load Diff
884
include/mysql/psi/mysql_thread.h
Normal file
884
include/mysql/psi/mysql_thread.h
Normal file
@ -0,0 +1,884 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef MYSQL_THREAD_H
|
||||
#define MYSQL_THREAD_H
|
||||
|
||||
/**
|
||||
@file mysql/psi/mysql_thread.h
|
||||
Instrumentation helpers for mysys threads, mutexes,
|
||||
read write locks and conditions.
|
||||
This header file provides the necessary declarations
|
||||
to use the mysys thread API with the performance schema instrumentation.
|
||||
In some compilers (SunStudio), 'static inline' functions, when declared
|
||||
but not used, are not optimized away (because they are unused) by default,
|
||||
so that including a static inline function from a header file does
|
||||
create unwanted dependencies, causing unresolved symbols at link time.
|
||||
Other compilers, like gcc, optimize these dependencies by default.
|
||||
|
||||
Since the instrumented APIs declared here are wrapper on top
|
||||
of my_pthread / safemutex / etc APIs,
|
||||
including mysql/psi/mysql_thread.h assumes that
|
||||
the dependency on my_pthread and safemutex already exists.
|
||||
*/
|
||||
/*
|
||||
Note: there are several orthogonal dimensions here.
|
||||
|
||||
Dimension 1: Instrumentation
|
||||
HAVE_PSI_INTERFACE is defined when the instrumentation is compiled in.
|
||||
This may happen both in debug or production builds.
|
||||
|
||||
Dimension 2: Debug
|
||||
SAFE_MUTEX is defined when debug is compiled in.
|
||||
This may happen both with and without instrumentation.
|
||||
|
||||
Dimension 3: Platform
|
||||
Mutexes are implemented with one of:
|
||||
- the pthread library
|
||||
- fast mutexes
|
||||
- window apis
|
||||
This is implemented by various macro definitions in my_pthread.h
|
||||
|
||||
This causes complexity with '#ifdef'-ery that can't be avoided.
|
||||
*/
|
||||
|
||||
#include "mysql/psi/psi.h"
|
||||
|
||||
/**
|
||||
@defgroup Thread_instrumentation Thread Instrumentation
|
||||
@ingroup Instrumentation_interface
|
||||
@{
|
||||
*/
|
||||
|
||||
/**
|
||||
An instrumented mutex structure.
|
||||
@sa mysql_mutex_t
|
||||
*/
|
||||
struct st_mysql_mutex
|
||||
{
|
||||
/** The real mutex. */
|
||||
pthread_mutex_t m_mutex;
|
||||
/**
|
||||
The instrumentation hook.
|
||||
Note that this hook is not conditionally defined,
|
||||
for binary compatibility of the @c mysql_mutex_t interface.
|
||||
*/
|
||||
struct PSI_mutex *m_psi;
|
||||
};
|
||||
|
||||
/**
|
||||
Type of an instrumented mutex.
|
||||
@c mysql_mutex_t is a drop-in replacement for @c pthread_mutex_t.
|
||||
@sa mysql_mutex_assert_owner
|
||||
@sa mysql_mutex_assert_not_owner
|
||||
@sa mysql_mutex_init
|
||||
@sa mysql_mutex_lock
|
||||
@sa mysql_mutex_unlock
|
||||
@sa mysql_mutex_destroy
|
||||
*/
|
||||
typedef struct st_mysql_mutex mysql_mutex_t;
|
||||
|
||||
/**
|
||||
An instrumented rwlock structure.
|
||||
@sa mysql_rwlock_t
|
||||
*/
|
||||
struct st_mysql_rwlock
|
||||
{
|
||||
/** The real rwlock */
|
||||
rw_lock_t m_rwlock;
|
||||
/**
|
||||
The instrumentation hook.
|
||||
Note that this hook is not conditionally defined,
|
||||
for binary compatibility of the @c mysql_rwlock_t interface.
|
||||
*/
|
||||
struct PSI_rwlock *m_psi;
|
||||
};
|
||||
|
||||
/**
|
||||
Type of an instrumented rwlock.
|
||||
@c mysql_rwlock_t is a drop-in replacement for @c pthread_rwlock_t.
|
||||
@sa mysql_rwlock_init
|
||||
@sa mysql_rwlock_rdlock
|
||||
@sa mysql_rwlock_tryrdlock
|
||||
@sa mysql_rwlock_wrlock
|
||||
@sa mysql_rwlock_trywrlock
|
||||
@sa mysql_rwlock_unlock
|
||||
@sa mysql_rwlock_destroy
|
||||
*/
|
||||
typedef struct st_mysql_rwlock mysql_rwlock_t;
|
||||
|
||||
/**
|
||||
An instrumented cond structure.
|
||||
@sa mysql_cond_t
|
||||
*/
|
||||
struct st_mysql_cond
|
||||
{
|
||||
/** The real condition */
|
||||
pthread_cond_t m_cond;
|
||||
/**
|
||||
The instrumentation hook.
|
||||
Note that this hook is not conditionally defined,
|
||||
for binary compatibility of the @c mysql_cond_t interface.
|
||||
*/
|
||||
struct PSI_cond *m_psi;
|
||||
};
|
||||
|
||||
/**
|
||||
Type of an instrumented condition.
|
||||
@c mysql_cond_t is a drop-in replacement for @c pthread_cond_t.
|
||||
@sa mysql_cond_init
|
||||
@sa mysql_cond_wait
|
||||
@sa mysql_cond_timedwait
|
||||
@sa mysql_cond_signal
|
||||
@sa mysql_cond_broadcast
|
||||
@sa mysql_cond_destroy
|
||||
*/
|
||||
typedef struct st_mysql_cond mysql_cond_t;
|
||||
|
||||
/*
|
||||
Consider the following code:
|
||||
static inline void foo() { bar(); }
|
||||
when foo() is never called.
|
||||
|
||||
With gcc, foo() is a local static function, so the dependencies
|
||||
are optimized away at compile time, and there is no dependency on bar().
|
||||
With other compilers (HP, Sun Studio), the function foo() implementation
|
||||
is compiled, and bar() needs to be present to link.
|
||||
|
||||
Due to the existing header dependencies in MySQL code, this header file
|
||||
is sometime used when it is not needed, which in turn cause link failures
|
||||
on some platforms.
|
||||
The proper fix would be to cut these extra dependencies in the calling code.
|
||||
DISABLE_MYSQL_THREAD_H is a work around to limit dependencies.
|
||||
*/
|
||||
#ifndef DISABLE_MYSQL_THREAD_H
|
||||
|
||||
/**
|
||||
@def mysql_mutex_assert_owner(M)
|
||||
Wrapper, to use safe_mutex_assert_owner with instrumented mutexes.
|
||||
@c mysql_mutex_assert_owner is a drop-in replacement
|
||||
for @c safe_mutex_assert_owner.
|
||||
*/
|
||||
#define mysql_mutex_assert_owner(M) \
|
||||
safe_mutex_assert_owner(&(M)->m_mutex)
|
||||
|
||||
/**
|
||||
@def mysql_mutex_assert_not_owner(M)
|
||||
Wrapper, to use safe_mutex_assert_not_owner with instrumented mutexes.
|
||||
@c mysql_mutex_assert_not_owner is a drop-in replacement
|
||||
for @c safe_mutex_assert_not_owner.
|
||||
*/
|
||||
#define mysql_mutex_assert_not_owner(M) \
|
||||
safe_mutex_assert_not_owner(&(M)->m_mutex)
|
||||
|
||||
/**
|
||||
@def mysql_mutex_init(K, M, A)
|
||||
Instrumented mutex_init.
|
||||
@c mysql_mutex_init is a replacement for @c pthread_mutex_init.
|
||||
@param K The PSI_mutex_key for this instrumented mutex
|
||||
@param M The mutex to initialize
|
||||
@param A Mutex attributes
|
||||
*/
|
||||
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#ifdef SAFE_MUTEX
|
||||
#define mysql_mutex_init(K, M, A) \
|
||||
inline_mysql_mutex_init(K, M, A, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_mutex_init(K, M, A) \
|
||||
inline_mysql_mutex_init(K, M, A)
|
||||
#endif
|
||||
#else
|
||||
#ifdef SAFE_MUTEX
|
||||
#define mysql_mutex_init(K, M, A) \
|
||||
inline_mysql_mutex_init(M, A, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_mutex_init(K, M, A) \
|
||||
inline_mysql_mutex_init(M, A)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_mutex_destroy(M)
|
||||
Instrumented mutex_destroy.
|
||||
@c mysql_mutex_destroy is a drop-in replacement
|
||||
for @c pthread_mutex_destroy.
|
||||
*/
|
||||
#ifdef SAFE_MUTEX
|
||||
#define mysql_mutex_destroy(M) \
|
||||
inline_mysql_mutex_destroy(M, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_mutex_destroy(M) \
|
||||
inline_mysql_mutex_destroy(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_mutex_lock(M)
|
||||
Instrumented mutex_lock.
|
||||
@c mysql_mutex_lock is a drop-in replacement for @c pthread_mutex_lock.
|
||||
@param M The mutex to lock
|
||||
*/
|
||||
|
||||
#if defined(SAFE_MUTEX) || defined (HAVE_PSI_INTERFACE)
|
||||
#define mysql_mutex_lock(M) \
|
||||
inline_mysql_mutex_lock(M, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_mutex_lock(M) \
|
||||
inline_mysql_mutex_lock(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_mutex_trylock(M)
|
||||
Instrumented mutex_lock.
|
||||
@c mysql_mutex_trylock is a drop-in replacement
|
||||
for @c pthread_mutex_trylock.
|
||||
*/
|
||||
|
||||
#if defined(SAFE_MUTEX) || defined (HAVE_PSI_INTERFACE)
|
||||
#define mysql_mutex_trylock(M) \
|
||||
inline_mysql_mutex_trylock(M, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_mutex_trylock(M) \
|
||||
inline_mysql_mutex_trylock(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_mutex_unlock(M)
|
||||
Instrumented mutex_unlock.
|
||||
@c mysql_mutex_unlock is a drop-in replacement for @c pthread_mutex_unlock.
|
||||
*/
|
||||
#ifdef SAFE_MUTEX
|
||||
#define mysql_mutex_unlock(M) \
|
||||
inline_mysql_mutex_unlock(M, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_mutex_unlock(M) \
|
||||
inline_mysql_mutex_unlock(M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_rwlock_init(K, RW)
|
||||
Instrumented rwlock_init.
|
||||
@c mysql_rwlock_init is a replacement for @c pthread_rwlock_init.
|
||||
Note that pthread_rwlockattr_t is not supported in MySQL.
|
||||
@param K The PSI_rwlock_key for this instrumented rwlock
|
||||
@param RW The rwlock to initialize
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_rwlock_init(K, RW) inline_mysql_rwlock_init(K, RW)
|
||||
#else
|
||||
#define mysql_rwlock_init(K, RW) inline_mysql_rwlock_init(RW)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_rwlock_destroy(RW)
|
||||
Instrumented rwlock_destroy.
|
||||
@c mysql_rwlock_destroy is a drop-in replacement
|
||||
for @c pthread_rwlock_destroy.
|
||||
*/
|
||||
#define mysql_rwlock_destroy(RW) inline_mysql_rwlock_destroy(RW)
|
||||
|
||||
/**
|
||||
@def mysql_rwlock_rdlock(RW)
|
||||
Instrumented rwlock_rdlock.
|
||||
@c mysql_rwlock_rdlock is a drop-in replacement
|
||||
for @c pthread_rwlock_rdlock.
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_rwlock_rdlock(RW) \
|
||||
inline_mysql_rwlock_rdlock(RW, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_rwlock_rdlock(RW) \
|
||||
inline_mysql_rwlock_rdlock(RW)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_rwlock_wrlock(RW)
|
||||
Instrumented rwlock_wrlock.
|
||||
@c mysql_rwlock_wrlock is a drop-in replacement
|
||||
for @c pthread_rwlock_wrlock.
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_rwlock_wrlock(RW) \
|
||||
inline_mysql_rwlock_wrlock(RW, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_rwlock_wrlock(RW) \
|
||||
inline_mysql_rwlock_wrlock(RW)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_rwlock_tryrdlock(RW)
|
||||
Instrumented rwlock_tryrdlock.
|
||||
@c mysql_rwlock_tryrdlock is a drop-in replacement
|
||||
for @c pthread_rwlock_tryrdlock.
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_rwlock_tryrdlock(RW) \
|
||||
inline_mysql_rwlock_tryrdlock(RW, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_rwlock_tryrdlock(RW) \
|
||||
inline_mysql_rwlock_tryrdlock(RW)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_rwlock_trywrlock(RW)
|
||||
Instrumented rwlock_trywrlock.
|
||||
@c mysql_rwlock_trywrlock is a drop-in replacement
|
||||
for @c pthread_rwlock_trywrlock.
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_rwlock_trywrlock(RW) \
|
||||
inline_mysql_rwlock_trywrlock(RW, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_rwlock_trywrlock(RW) \
|
||||
inline_mysql_rwlock_trywrlock(RW)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_rwlock_unlock(RW)
|
||||
Instrumented rwlock_unlock.
|
||||
@c mysql_rwlock_unlock is a drop-in replacement
|
||||
for @c pthread_rwlock_unlock.
|
||||
*/
|
||||
#define mysql_rwlock_unlock(RW) inline_mysql_rwlock_unlock(RW)
|
||||
|
||||
/**
|
||||
@def mysql_cond_init(K, C, A)
|
||||
Instrumented rwlock_init.
|
||||
@c mysql_cond_init is a replacement for @c pthread_cond_init.
|
||||
@param C The cond to initialize
|
||||
@param K The PSI_cond_key for this instrumented cond
|
||||
@param A Condition attributes
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_cond_init(K, C, A) inline_mysql_cond_init(K, C, A)
|
||||
#else
|
||||
#define mysql_cond_init(K, C, A) inline_mysql_cond_init(C, A)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_cond_destroy(C)
|
||||
Instrumented cond_destroy.
|
||||
@c mysql_cond_destroy is a drop-in replacement for @c pthread_cond_destroy.
|
||||
*/
|
||||
#define mysql_cond_destroy(C) inline_mysql_cond_destroy(C)
|
||||
|
||||
/**
|
||||
@def mysql_cond_wait(C)
|
||||
Instrumented cond_wait.
|
||||
@c mysql_cond_wait is a drop-in replacement for @c pthread_cond_wait.
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_cond_wait(C, M) \
|
||||
inline_mysql_cond_wait(C, M, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_cond_wait(C, M) \
|
||||
inline_mysql_cond_wait(C, M)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_cond_timedwait(C, M, W)
|
||||
Instrumented cond_timedwait.
|
||||
@c mysql_cond_timedwait is a drop-in replacement
|
||||
for @c pthread_cond_timedwait.
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_cond_timedwait(C, M, W) \
|
||||
inline_mysql_cond_timedwait(C, M, W, __FILE__, __LINE__)
|
||||
#else
|
||||
#define mysql_cond_timedwait(C, M, W) \
|
||||
inline_mysql_cond_timedwait(C, M, W)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_cond_signal(C)
|
||||
Instrumented cond_signal.
|
||||
@c mysql_cond_signal is a drop-in replacement for @c pthread_cond_signal.
|
||||
*/
|
||||
#define mysql_cond_signal(C) inline_mysql_cond_signal(C)
|
||||
|
||||
/**
|
||||
@def mysql_cond_broadcast(C)
|
||||
Instrumented cond_broadcast.
|
||||
@c mysql_cond_broadcast is a drop-in replacement
|
||||
for @c pthread_cond_broadcast.
|
||||
*/
|
||||
#define mysql_cond_broadcast(C) inline_mysql_cond_broadcast(C)
|
||||
|
||||
|
||||
/**
|
||||
@def mysql_thread_create(K, P1, P2, P3, P4)
|
||||
Instrumented pthread_create.
|
||||
This function creates both the thread instrumentation and a thread.
|
||||
@c mysql_thread_create is a replacement for @c pthread_create.
|
||||
The parameter P4 (or, if it is NULL, P1) will be used as the
|
||||
instrumented thread "indentity".
|
||||
Providing a P1 / P4 parameter with a different value for each call
|
||||
will on average improve performances, since this thread identity value
|
||||
is used internally to randomize access to data and prevent contention.
|
||||
This is optional, and the improvement is not guaranteed, only statistical.
|
||||
@param K The PSI_thread_key for this instrumented thread
|
||||
@param P1 pthread_create parameter 1
|
||||
@param P2 pthread_create parameter 2
|
||||
@param P3 pthread_create parameter 3
|
||||
@param P4 pthread_create parameter 4
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_thread_create(K, P1, P2, P3, P4) \
|
||||
inline_mysql_thread_create(K, P1, P2, P3, P4)
|
||||
#else
|
||||
#define mysql_thread_create(K, P1, P2, P3, P4) \
|
||||
pthread_create(P1, P2, P3, P4)
|
||||
#endif
|
||||
|
||||
/**
|
||||
@def mysql_thread_set_psi_id(I)
|
||||
Set the thread indentifier for the instrumentation.
|
||||
@param I The thread identifier
|
||||
*/
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
#define mysql_thread_set_psi_id(I) inline_mysql_thread_set_psi_id(I)
|
||||
#else
|
||||
#define mysql_thread_set_psi_id(I) do {} while (0)
|
||||
#endif
|
||||
|
||||
static inline int inline_mysql_mutex_init(
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
PSI_mutex_key key,
|
||||
#endif
|
||||
mysql_mutex_t *that,
|
||||
const pthread_mutexattr_t *attr
|
||||
#ifdef SAFE_MUTEX
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
that->m_psi= PSI_server ? PSI_server->init_mutex(key, &that->m_mutex)
|
||||
: NULL;
|
||||
#else
|
||||
that->m_psi= NULL;
|
||||
#endif
|
||||
#ifdef SAFE_MUTEX
|
||||
return safe_mutex_init(&that->m_mutex, attr, src_file, src_line);
|
||||
#else
|
||||
return pthread_mutex_init(&that->m_mutex, attr);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int inline_mysql_mutex_destroy(
|
||||
mysql_mutex_t *that
|
||||
#ifdef SAFE_MUTEX
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
PSI_server->destroy_mutex(that->m_psi);
|
||||
that->m_psi= NULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef SAFE_MUTEX
|
||||
return safe_mutex_destroy(&that->m_mutex, src_file, src_line);
|
||||
#else
|
||||
return pthread_mutex_destroy(&that->m_mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int inline_mysql_mutex_lock(
|
||||
mysql_mutex_t *that
|
||||
#if defined(SAFE_MUTEX) || defined (HAVE_PSI_INTERFACE)
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_mutex_locker *locker= NULL;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_mutex_locker(that->m_psi, PSI_MUTEX_LOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_mutex_wait(locker, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_lock(&that->m_mutex, FALSE, src_file, src_line);
|
||||
#else
|
||||
result= pthread_mutex_lock(&that->m_mutex);
|
||||
#endif
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_mutex_wait(locker, result);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_mutex_trylock(
|
||||
mysql_mutex_t *that
|
||||
#if defined(SAFE_MUTEX) || defined (HAVE_PSI_INTERFACE)
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_mutex_locker *locker= NULL;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_mutex_locker(that->m_psi, PSI_MUTEX_TRYLOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_mutex_wait(locker, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_lock(&that->m_mutex, TRUE, src_file, src_line);
|
||||
#else
|
||||
result= pthread_mutex_trylock(&that->m_mutex);
|
||||
#endif
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_mutex_wait(locker, result);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_mutex_unlock(
|
||||
mysql_mutex_t *that
|
||||
#ifdef SAFE_MUTEX
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->unlock_mutex(thread, that->m_psi);
|
||||
}
|
||||
#endif
|
||||
#ifdef SAFE_MUTEX
|
||||
result= safe_mutex_unlock(&that->m_mutex, src_file, src_line);
|
||||
#else
|
||||
result= pthread_mutex_unlock(&that->m_mutex);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_rwlock_init(
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
PSI_rwlock_key key,
|
||||
#endif
|
||||
mysql_rwlock_t *that)
|
||||
{
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
that->m_psi= (PSI_server ? PSI_server->init_rwlock(key, &that->m_rwlock)
|
||||
: NULL);
|
||||
#else
|
||||
that->m_psi= NULL;
|
||||
#endif
|
||||
/*
|
||||
pthread_rwlockattr_t is not used in MySQL.
|
||||
*/
|
||||
return my_rwlock_init(&that->m_rwlock, NULL);
|
||||
}
|
||||
|
||||
static inline int inline_mysql_rwlock_destroy(
|
||||
mysql_rwlock_t *that)
|
||||
{
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
PSI_server->destroy_rwlock(that->m_psi);
|
||||
that->m_psi= NULL;
|
||||
}
|
||||
#endif
|
||||
return rwlock_destroy(&that->m_rwlock);
|
||||
}
|
||||
|
||||
static inline int inline_mysql_rwlock_rdlock(
|
||||
mysql_rwlock_t *that
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
PSI_RWLOCK_READLOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_rdwait(locker, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
result= rw_rdlock(&that->m_rwlock);
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_rwlock_rdwait(locker, result);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_rwlock_wrlock(
|
||||
mysql_rwlock_t *that
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
PSI_RWLOCK_WRITELOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_wrwait(locker, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
result= rw_wrlock(&that->m_rwlock);
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_rwlock_wrwait(locker, result);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_rwlock_tryrdlock(
|
||||
mysql_rwlock_t *that
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
PSI_RWLOCK_TRYREADLOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_rdwait(locker, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
result= rw_tryrdlock(&that->m_rwlock);
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_rwlock_rdwait(locker, result);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_rwlock_trywrlock(
|
||||
mysql_rwlock_t *that
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_rwlock_locker *locker= NULL;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_rwlock_locker(that->m_psi,
|
||||
PSI_RWLOCK_TRYWRITELOCK);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_rwlock_wrwait(locker, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
result= rw_trywrlock(&that->m_rwlock);
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_rwlock_wrwait(locker, result);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_rwlock_unlock(
|
||||
mysql_rwlock_t *that)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->unlock_rwlock(thread, that->m_psi);
|
||||
}
|
||||
#endif
|
||||
result= rw_unlock(&that->m_rwlock);
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_cond_init(
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
PSI_cond_key key,
|
||||
#endif
|
||||
mysql_cond_t *that,
|
||||
const pthread_condattr_t *attr)
|
||||
{
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
that->m_psi= (PSI_server ? PSI_server->init_cond(key, &that->m_cond)
|
||||
: NULL);
|
||||
#else
|
||||
that->m_psi= NULL;
|
||||
#endif
|
||||
return pthread_cond_init(&that->m_cond, attr);
|
||||
}
|
||||
|
||||
static inline int inline_mysql_cond_destroy(
|
||||
mysql_cond_t *that)
|
||||
{
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
PSI_server->destroy_cond(that->m_psi);
|
||||
that->m_psi= NULL;
|
||||
}
|
||||
#endif
|
||||
return pthread_cond_destroy(&that->m_cond);
|
||||
}
|
||||
|
||||
static inline int inline_mysql_cond_wait(
|
||||
mysql_cond_t *that,
|
||||
mysql_mutex_t *mutex
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_cond_locker *locker= NULL;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_cond_locker(that->m_psi, mutex->m_psi,
|
||||
PSI_COND_WAIT);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_cond_wait(locker, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
result= pthread_cond_wait(&that->m_cond, &mutex->m_mutex);
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_cond_wait(locker, result);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_cond_timedwait(
|
||||
mysql_cond_t *that,
|
||||
mysql_mutex_t *mutex,
|
||||
struct timespec *abstime
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
, const char *src_file, uint src_line
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_cond_locker *locker= NULL;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
locker= PSI_server->get_thread_cond_locker(that->m_psi, mutex->m_psi,
|
||||
PSI_COND_TIMEDWAIT);
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->start_cond_wait(locker, src_file, src_line);
|
||||
}
|
||||
#endif
|
||||
result= pthread_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
if (likely(locker != NULL))
|
||||
PSI_server->end_cond_wait(locker, result);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_cond_signal(
|
||||
mysql_cond_t *that)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->signal_cond(thread, that->m_psi);
|
||||
}
|
||||
#endif
|
||||
result= pthread_cond_signal(&that->m_cond);
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline int inline_mysql_cond_broadcast(
|
||||
mysql_cond_t *that)
|
||||
{
|
||||
int result;
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
struct PSI_thread *thread;
|
||||
if (likely(PSI_server && that->m_psi))
|
||||
{
|
||||
thread= PSI_server->get_thread();
|
||||
if (likely(thread != NULL))
|
||||
PSI_server->broadcast_cond(thread, that->m_psi);
|
||||
}
|
||||
#endif
|
||||
result= pthread_cond_broadcast(&that->m_cond);
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef HAVE_PSI_INTERFACE
|
||||
static inline int inline_mysql_thread_create(
|
||||
PSI_thread_key key,
|
||||
pthread_t *thread, const pthread_attr_t *attr,
|
||||
void *(*start_routine)(void*), void *arg)
|
||||
{
|
||||
int result;
|
||||
if (likely(PSI_server != NULL))
|
||||
result= PSI_server->spawn_thread(key, thread, attr, start_routine, arg);
|
||||
else
|
||||
result= pthread_create(thread, attr, start_routine, arg);
|
||||
return result;
|
||||
}
|
||||
|
||||
static inline void inline_mysql_thread_set_psi_id(ulong id)
|
||||
{
|
||||
if (likely(PSI_server != NULL))
|
||||
{
|
||||
struct PSI_thread *psi= PSI_server->get_thread();
|
||||
if (likely(psi != NULL))
|
||||
PSI_server->set_thread_id(psi, id);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DISABLE_MYSQL_THREAD_H */
|
||||
|
||||
/** @} (end of group Thread_instrumentation) */
|
||||
|
||||
#endif
|
||||
|
1086
include/mysql/psi/psi.h
Normal file
1086
include/mysql/psi/psi.h
Normal file
File diff suppressed because it is too large
Load Diff
26
include/mysql/psi/psi_abi_v1.h
Normal file
26
include/mysql/psi/psi_abi_v1.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file mysql/psi/psi_abi_v1.h
|
||||
ABI check for mysql/psi/psi.h, when using PSI_VERSION_1.
|
||||
This file is only used to automate detection of changes between versions.
|
||||
Do not include this file, include mysql/psi/psi.h instead.
|
||||
*/
|
||||
#define USE_PSI_1
|
||||
#define HAVE_PSI_INTERFACE
|
||||
#define _global_h
|
||||
#include "mysql/psi/psi.h"
|
||||
|
242
include/mysql/psi/psi_abi_v1.h.pp
Normal file
242
include/mysql/psi/psi_abi_v1.h.pp
Normal file
@ -0,0 +1,242 @@
|
||||
#include "mysql/psi/psi.h"
|
||||
C_MODE_START
|
||||
struct PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
struct PSI_cond;
|
||||
struct PSI_table_share;
|
||||
struct PSI_table;
|
||||
struct PSI_thread;
|
||||
struct PSI_file;
|
||||
struct PSI_bootstrap
|
||||
{
|
||||
void* (*get_interface)(int version);
|
||||
};
|
||||
struct PSI_mutex_locker;
|
||||
struct PSI_rwlock_locker;
|
||||
struct PSI_cond_locker;
|
||||
struct PSI_file_locker;
|
||||
enum PSI_mutex_operation
|
||||
{
|
||||
PSI_MUTEX_LOCK= 0,
|
||||
PSI_MUTEX_TRYLOCK= 1
|
||||
};
|
||||
enum PSI_rwlock_operation
|
||||
{
|
||||
PSI_RWLOCK_READLOCK= 0,
|
||||
PSI_RWLOCK_WRITELOCK= 1,
|
||||
PSI_RWLOCK_TRYREADLOCK= 2,
|
||||
PSI_RWLOCK_TRYWRITELOCK= 3
|
||||
};
|
||||
enum PSI_cond_operation
|
||||
{
|
||||
PSI_COND_WAIT= 0,
|
||||
PSI_COND_TIMEDWAIT= 1
|
||||
};
|
||||
enum PSI_file_operation
|
||||
{
|
||||
PSI_FILE_CREATE= 0,
|
||||
PSI_FILE_CREATE_TMP= 1,
|
||||
PSI_FILE_OPEN= 2,
|
||||
PSI_FILE_STREAM_OPEN= 3,
|
||||
PSI_FILE_CLOSE= 4,
|
||||
PSI_FILE_STREAM_CLOSE= 5,
|
||||
PSI_FILE_READ= 6,
|
||||
PSI_FILE_WRITE= 7,
|
||||
PSI_FILE_SEEK= 8,
|
||||
PSI_FILE_TELL= 9,
|
||||
PSI_FILE_FLUSH= 10,
|
||||
PSI_FILE_STAT= 11,
|
||||
PSI_FILE_FSTAT= 12,
|
||||
PSI_FILE_CHSIZE= 13,
|
||||
PSI_FILE_DELETE= 14,
|
||||
PSI_FILE_RENAME= 15,
|
||||
PSI_FILE_SYNC= 16
|
||||
};
|
||||
struct PSI_table_locker;
|
||||
typedef unsigned int PSI_mutex_key;
|
||||
typedef unsigned int PSI_rwlock_key;
|
||||
typedef unsigned int PSI_cond_key;
|
||||
typedef unsigned int PSI_thread_key;
|
||||
typedef unsigned int PSI_file_key;
|
||||
struct PSI_mutex_info_v1
|
||||
{
|
||||
PSI_mutex_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_rwlock_info_v1
|
||||
{
|
||||
PSI_rwlock_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_cond_info_v1
|
||||
{
|
||||
PSI_cond_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_thread_info_v1
|
||||
{
|
||||
PSI_thread_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_file_info_v1
|
||||
{
|
||||
PSI_file_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef void (*register_mutex_v1_t)
|
||||
(const char *category, struct PSI_mutex_info_v1 *info, int count);
|
||||
typedef void (*register_rwlock_v1_t)
|
||||
(const char *category, struct PSI_rwlock_info_v1 *info, int count);
|
||||
typedef void (*register_cond_v1_t)
|
||||
(const char *category, struct PSI_cond_info_v1 *info, int count);
|
||||
typedef void (*register_thread_v1_t)
|
||||
(const char *category, struct PSI_thread_info_v1 *info, int count);
|
||||
typedef void (*register_file_v1_t)
|
||||
(const char *category, struct PSI_file_info_v1 *info, int count);
|
||||
typedef struct PSI_mutex* (*init_mutex_v1_t)
|
||||
(PSI_mutex_key key, const void *identity);
|
||||
typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
|
||||
typedef struct PSI_rwlock* (*init_rwlock_v1_t)
|
||||
(PSI_rwlock_key key, const void *identity);
|
||||
typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
|
||||
typedef struct PSI_cond* (*init_cond_v1_t)
|
||||
(PSI_cond_key key, const void *identity);
|
||||
typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
|
||||
typedef struct PSI_table_share* (*get_table_share_v1_t)
|
||||
(const char *schema_name, int schema_name_length, const char *table_name,
|
||||
int table_name_length, const void *identity);
|
||||
typedef void (*release_table_share_v1_t)(struct PSI_table_share *share);
|
||||
typedef struct PSI_table* (*open_table_v1_t)
|
||||
(struct PSI_table_share *share, const void *identity);
|
||||
typedef void (*close_table_v1_t)(struct PSI_table *table);
|
||||
typedef void (*create_file_v1_t)(PSI_file_key key, const char *name,
|
||||
File file);
|
||||
typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
|
||||
pthread_t *thread,
|
||||
const pthread_attr_t *attr,
|
||||
void *(*start_routine)(void*), void *arg);
|
||||
typedef struct PSI_thread* (*new_thread_v1_t)
|
||||
(PSI_thread_key key, const void *identity, ulong thread_id);
|
||||
typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
|
||||
unsigned long id);
|
||||
typedef struct PSI_thread* (*get_thread_v1_t)(void);
|
||||
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
|
||||
typedef void (*delete_current_thread_v1_t)(void);
|
||||
typedef struct PSI_mutex_locker* (*get_thread_mutex_locker_v1_t)
|
||||
(struct PSI_mutex *mutex, enum PSI_mutex_operation op);
|
||||
typedef struct PSI_rwlock_locker* (*get_thread_rwlock_locker_v1_t)
|
||||
(struct PSI_rwlock *rwlock, enum PSI_rwlock_operation op);
|
||||
typedef struct PSI_cond_locker* (*get_thread_cond_locker_v1_t)
|
||||
(struct PSI_cond *cond, struct PSI_mutex *mutex,
|
||||
enum PSI_cond_operation op);
|
||||
typedef struct PSI_table_locker* (*get_thread_table_locker_v1_t)
|
||||
(struct PSI_table *table);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
|
||||
(PSI_file_key key, enum PSI_file_operation op, const char *name,
|
||||
const void *identity);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
|
||||
(struct PSI_file *file, enum PSI_file_operation op);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
|
||||
(File file, enum PSI_file_operation op);
|
||||
typedef void (*unlock_mutex_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_mutex *mutex);
|
||||
typedef void (*unlock_rwlock_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_rwlock *rwlock);
|
||||
typedef void (*signal_cond_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_cond *cond);
|
||||
typedef void (*broadcast_cond_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_cond *cond);
|
||||
typedef void (*start_mutex_wait_v1_t)
|
||||
(struct PSI_mutex_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_mutex_wait_v1_t)
|
||||
(struct PSI_mutex_locker *locker, int rc);
|
||||
typedef void (*start_rwlock_rdwait_v1_t)
|
||||
(struct PSI_rwlock_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_rwlock_rdwait_v1_t)
|
||||
(struct PSI_rwlock_locker *locker, int rc);
|
||||
typedef void (*start_rwlock_wrwait_v1_t)
|
||||
(struct PSI_rwlock_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_rwlock_wrwait_v1_t)
|
||||
(struct PSI_rwlock_locker *locker, int rc);
|
||||
typedef void (*start_cond_wait_v1_t)
|
||||
(struct PSI_cond_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_cond_wait_v1_t)
|
||||
(struct PSI_cond_locker *locker, int rc);
|
||||
typedef void (*start_table_wait_v1_t)
|
||||
(struct PSI_table_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_table_wait_v1_t)(struct PSI_table_locker *locker);
|
||||
typedef struct PSI_file* (*start_file_open_wait_v1_t)
|
||||
(struct PSI_file_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_file_open_wait_v1_t)(struct PSI_file_locker *locker);
|
||||
typedef void (*end_file_open_wait_and_bind_to_descriptor_v1_t)
|
||||
(struct PSI_file_locker *locker, File file);
|
||||
typedef void (*start_file_wait_v1_t)
|
||||
(struct PSI_file_locker *locker, size_t count,
|
||||
const char *src_file, uint src_line);
|
||||
typedef void (*end_file_wait_v1_t)
|
||||
(struct PSI_file_locker *locker, size_t count);
|
||||
struct PSI_v1
|
||||
{
|
||||
register_mutex_v1_t register_mutex;
|
||||
register_rwlock_v1_t register_rwlock;
|
||||
register_cond_v1_t register_cond;
|
||||
register_thread_v1_t register_thread;
|
||||
register_file_v1_t register_file;
|
||||
init_mutex_v1_t init_mutex;
|
||||
destroy_mutex_v1_t destroy_mutex;
|
||||
init_rwlock_v1_t init_rwlock;
|
||||
destroy_rwlock_v1_t destroy_rwlock;
|
||||
init_cond_v1_t init_cond;
|
||||
destroy_cond_v1_t destroy_cond;
|
||||
get_table_share_v1_t get_table_share;
|
||||
release_table_share_v1_t release_table_share;
|
||||
open_table_v1_t open_table;
|
||||
close_table_v1_t close_table;
|
||||
create_file_v1_t create_file;
|
||||
spawn_thread_v1_t spawn_thread;
|
||||
new_thread_v1_t new_thread;
|
||||
set_thread_id_v1_t set_thread_id;
|
||||
get_thread_v1_t get_thread;
|
||||
set_thread_v1_t set_thread;
|
||||
delete_current_thread_v1_t delete_current_thread;
|
||||
get_thread_mutex_locker_v1_t get_thread_mutex_locker;
|
||||
get_thread_rwlock_locker_v1_t get_thread_rwlock_locker;
|
||||
get_thread_cond_locker_v1_t get_thread_cond_locker;
|
||||
get_thread_table_locker_v1_t get_thread_table_locker;
|
||||
get_thread_file_name_locker_v1_t get_thread_file_name_locker;
|
||||
get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
|
||||
get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
|
||||
unlock_mutex_v1_t unlock_mutex;
|
||||
unlock_rwlock_v1_t unlock_rwlock;
|
||||
signal_cond_v1_t signal_cond;
|
||||
broadcast_cond_v1_t broadcast_cond;
|
||||
start_mutex_wait_v1_t start_mutex_wait;
|
||||
end_mutex_wait_v1_t end_mutex_wait;
|
||||
start_rwlock_rdwait_v1_t start_rwlock_rdwait;
|
||||
end_rwlock_rdwait_v1_t end_rwlock_rdwait;
|
||||
start_rwlock_wrwait_v1_t start_rwlock_wrwait;
|
||||
end_rwlock_wrwait_v1_t end_rwlock_wrwait;
|
||||
start_cond_wait_v1_t start_cond_wait;
|
||||
end_cond_wait_v1_t end_cond_wait;
|
||||
start_table_wait_v1_t start_table_wait;
|
||||
end_table_wait_v1_t end_table_wait;
|
||||
start_file_open_wait_v1_t start_file_open_wait;
|
||||
end_file_open_wait_v1_t end_file_open_wait;
|
||||
end_file_open_wait_and_bind_to_descriptor_v1_t
|
||||
end_file_open_wait_and_bind_to_descriptor;
|
||||
start_file_wait_v1_t start_file_wait;
|
||||
end_file_wait_v1_t end_file_wait;
|
||||
};
|
||||
typedef struct PSI_v1 PSI;
|
||||
typedef struct PSI_mutex_info_v1 PSI_mutex_info;
|
||||
typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
|
||||
typedef struct PSI_cond_info_v1 PSI_cond_info;
|
||||
typedef struct PSI_thread_info_v1 PSI_thread_info;
|
||||
typedef struct PSI_file_info_v1 PSI_file_info;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
26
include/mysql/psi/psi_abi_v2.h
Normal file
26
include/mysql/psi/psi_abi_v2.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file mysql/psi/psi_abi_v1.h
|
||||
ABI check for mysql/psi/psi.h, when using PSI_VERSION_2.
|
||||
This file is only used to automate detection of changes between versions.
|
||||
Do not include this file, include mysql/psi/psi.h instead.
|
||||
*/
|
||||
#define USE_PSI_2
|
||||
#define HAVE_PSI_INTERFACE
|
||||
#define _global_h
|
||||
#include "mysql/psi/psi.h"
|
||||
|
92
include/mysql/psi/psi_abi_v2.h.pp
Normal file
92
include/mysql/psi/psi_abi_v2.h.pp
Normal file
@ -0,0 +1,92 @@
|
||||
#include "mysql/psi/psi.h"
|
||||
C_MODE_START
|
||||
struct PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
struct PSI_cond;
|
||||
struct PSI_table_share;
|
||||
struct PSI_table;
|
||||
struct PSI_thread;
|
||||
struct PSI_file;
|
||||
struct PSI_bootstrap
|
||||
{
|
||||
void* (*get_interface)(int version);
|
||||
};
|
||||
struct PSI_mutex_locker;
|
||||
struct PSI_rwlock_locker;
|
||||
struct PSI_cond_locker;
|
||||
struct PSI_file_locker;
|
||||
enum PSI_mutex_operation
|
||||
{
|
||||
PSI_MUTEX_LOCK= 0,
|
||||
PSI_MUTEX_TRYLOCK= 1
|
||||
};
|
||||
enum PSI_rwlock_operation
|
||||
{
|
||||
PSI_RWLOCK_READLOCK= 0,
|
||||
PSI_RWLOCK_WRITELOCK= 1,
|
||||
PSI_RWLOCK_TRYREADLOCK= 2,
|
||||
PSI_RWLOCK_TRYWRITELOCK= 3
|
||||
};
|
||||
enum PSI_cond_operation
|
||||
{
|
||||
PSI_COND_WAIT= 0,
|
||||
PSI_COND_TIMEDWAIT= 1
|
||||
};
|
||||
enum PSI_file_operation
|
||||
{
|
||||
PSI_FILE_CREATE= 0,
|
||||
PSI_FILE_CREATE_TMP= 1,
|
||||
PSI_FILE_OPEN= 2,
|
||||
PSI_FILE_STREAM_OPEN= 3,
|
||||
PSI_FILE_CLOSE= 4,
|
||||
PSI_FILE_STREAM_CLOSE= 5,
|
||||
PSI_FILE_READ= 6,
|
||||
PSI_FILE_WRITE= 7,
|
||||
PSI_FILE_SEEK= 8,
|
||||
PSI_FILE_TELL= 9,
|
||||
PSI_FILE_FLUSH= 10,
|
||||
PSI_FILE_STAT= 11,
|
||||
PSI_FILE_FSTAT= 12,
|
||||
PSI_FILE_CHSIZE= 13,
|
||||
PSI_FILE_DELETE= 14,
|
||||
PSI_FILE_RENAME= 15,
|
||||
PSI_FILE_SYNC= 16
|
||||
};
|
||||
struct PSI_table_locker;
|
||||
typedef unsigned int PSI_mutex_key;
|
||||
typedef unsigned int PSI_rwlock_key;
|
||||
typedef unsigned int PSI_cond_key;
|
||||
typedef unsigned int PSI_thread_key;
|
||||
typedef unsigned int PSI_file_key;
|
||||
struct PSI_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_mutex_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_rwlock_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_cond_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_thread_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_file_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
typedef struct PSI_v2 PSI;
|
||||
typedef struct PSI_mutex_info_v2 PSI_mutex_info;
|
||||
typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
|
||||
typedef struct PSI_cond_info_v2 PSI_cond_info;
|
||||
typedef struct PSI_thread_info_v2 PSI_thread_info;
|
||||
typedef struct PSI_file_info_v2 PSI_file_info;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
@ -81,13 +81,19 @@ int vio_errno(Vio*vio);
|
||||
/* Get socket number */
|
||||
my_socket vio_fd(Vio*vio);
|
||||
/* Remote peer's address and name in text form */
|
||||
my_bool vio_peer_addr(Vio* vio, char *buf, uint16 *port);
|
||||
/* Remotes in_addr */
|
||||
void vio_in_addr(Vio *vio, struct in_addr *in);
|
||||
my_bool vio_peer_addr(Vio *vio, char *buf, uint16 *port, size_t buflen);
|
||||
my_bool vio_poll_read(Vio *vio, uint timeout);
|
||||
my_bool vio_is_connected(Vio *vio);
|
||||
ssize_t vio_pending(Vio *vio);
|
||||
|
||||
my_bool vio_get_normalized_ip_string(const struct sockaddr *addr, int addr_length,
|
||||
char *ip_string, size_t ip_string_size);
|
||||
|
||||
int vio_getnameinfo(const struct sockaddr *sa,
|
||||
char *hostname, size_t hostname_size,
|
||||
char *port, size_t port_size,
|
||||
int flags);
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER < 0x0090700f
|
||||
@ -154,8 +160,7 @@ void vio_end(void);
|
||||
#define vio_should_retry(vio) (vio)->should_retry(vio)
|
||||
#define vio_was_interrupted(vio) (vio)->was_interrupted(vio)
|
||||
#define vio_close(vio) ((vio)->vioclose)(vio)
|
||||
#define vio_peer_addr(vio, buf, prt) (vio)->peer_addr(vio, buf, prt)
|
||||
#define vio_in_addr(vio, in) (vio)->in_addr(vio, in)
|
||||
#define vio_peer_addr(vio, buf, prt, buflen) (vio)->peer_addr(vio, buf, prt, buflen)
|
||||
#define vio_timeout(vio, which, seconds) (vio)->timeout(vio, which, seconds)
|
||||
#define vio_poll_read(vio, timeout) (vio)->poll_read(vio, timeout)
|
||||
#define vio_is_connected(vio) (vio)->is_connected(vio)
|
||||
@ -180,8 +185,9 @@ struct st_vio
|
||||
HANDLE hPipe;
|
||||
my_bool localhost; /* Are we from localhost? */
|
||||
int fcntl_mode; /* Buffered fcntl(sd,F_GETFL) */
|
||||
struct sockaddr_in local; /* Local internet address */
|
||||
struct sockaddr_in remote; /* Remote internet address */
|
||||
struct sockaddr_storage local; /* Local internet address */
|
||||
struct sockaddr_storage remote; /* Remote internet address */
|
||||
int addrLen; /* Length of remote address */
|
||||
enum enum_vio_type type; /* Type of connection */
|
||||
char desc[30]; /* String description */
|
||||
char *read_buffer; /* buffer for vio_read_buff */
|
||||
@ -197,8 +203,8 @@ struct st_vio
|
||||
my_bool (*is_blocking)(Vio*);
|
||||
int (*viokeepalive)(Vio*, my_bool);
|
||||
int (*fastsend)(Vio*);
|
||||
my_bool (*peer_addr)(Vio*, char *, uint16*);
|
||||
void (*in_addr)(Vio*, struct in_addr*);
|
||||
my_bool (*peer_addr)(Vio*, char *, uint16*, size_t);
|
||||
void (*in_addr)(Vio*, struct sockaddr_storage*);
|
||||
my_bool (*should_retry)(Vio*);
|
||||
my_bool (*was_interrupted)(Vio*);
|
||||
int (*vioclose)(Vio*);
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2000-2004 MySQL AB
|
||||
# Copyright (C) 2000-2004 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of version 2 GNU General Public License as
|
||||
@ -21,7 +21,9 @@
|
||||
# This file is public domain and comes with NO WARRANTY of any kind
|
||||
|
||||
target = libmysqlclient.la
|
||||
target_defs = -DMYSQL_CLIENT_NO_THREADS -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
|
||||
target_defs = -DMYSQL_CLIENT_NO_THREADS -DDONT_USE_RAID \
|
||||
-DDISABLE_MYSQL_THREAD_H @LIB_EXTRA_CCFLAGS@
|
||||
|
||||
LIBS = @CLIENT_LIBS@
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
$(openssl_includes) @ZLIB_INCLUDES@
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2000-2004 MySQL AB
|
||||
# Copyright (C) 2000-2004 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of version 2 GNU General Public License as
|
||||
@ -68,7 +68,8 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
|
||||
mf_iocache2.lo my_seek.lo my_sleep.lo \
|
||||
my_pread.lo mf_cache.lo md5.lo sha1.lo \
|
||||
my_getopt.lo my_gethostbyname.lo my_port.lo \
|
||||
my_rename.lo my_chsize.lo my_sync.lo my_getsystime.lo
|
||||
my_rename.lo my_chsize.lo my_sync.lo \
|
||||
my_getsystime.lo my_symlink2.lo mf_same.lo
|
||||
sqlobjects = net.lo
|
||||
sql_cmn_objects = pack.lo client.lo my_time.lo
|
||||
|
||||
|
@ -119,7 +119,6 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
||||
thd->current_stmt= stmt;
|
||||
|
||||
thd->store_globals(); // Fix if more than one connect
|
||||
lex_start(thd);
|
||||
/*
|
||||
We have to call free_old_query before we start to fill mysql->fields
|
||||
for new query. In the case of embedded server we collect field data
|
||||
|
@ -81,4 +81,3 @@ parts.partition_syntax_ndb
|
||||
parts.partition_alter1_1_2_ndb
|
||||
parts.partition_basic_ndb
|
||||
parts.partition_mgm_lc0_ndb
|
||||
|
||||
|
@ -117,6 +117,7 @@ sync_slave_with_master;
|
||||
--echo #
|
||||
|
||||
connection master;
|
||||
set @@session.sql_auto_is_null=1;
|
||||
eval create table t1(a int auto_increment, key(a)) engine=$engine_type;
|
||||
eval create table t2(a int) engine=$engine_type;
|
||||
insert into t1 (a) values (null);
|
||||
@ -179,7 +180,9 @@ begin
|
||||
end|
|
||||
delimiter ;|
|
||||
|
||||
--disable_warnings
|
||||
insert into t1 (last_id) values (0);
|
||||
--enable_warnings
|
||||
|
||||
drop trigger t1_bi;
|
||||
|
||||
@ -512,7 +515,9 @@ set sql_log_bin=0;
|
||||
insert into t2 (id) values(5),(6),(7);
|
||||
delete from t2 where id>=5;
|
||||
set sql_log_bin=1;
|
||||
--disable_warnings
|
||||
insert into t1 select insid();
|
||||
--enable_warnings
|
||||
select * from t1 order by id;
|
||||
select * from t2 order by id;
|
||||
|
||||
@ -548,4 +553,5 @@ connection master;
|
||||
drop table t1, t2;
|
||||
drop procedure foo;
|
||||
SET @@global.concurrent_insert= @old_concurrent_insert;
|
||||
set @@session.sql_auto_is_null=default;
|
||||
sync_slave_with_master;
|
||||
|
@ -22,6 +22,7 @@ source include/show_slave_status2.inc;
|
||||
reset slave;
|
||||
source include/show_slave_status2.inc;
|
||||
|
||||
change master to master_user='root';
|
||||
start slave;
|
||||
sync_with_master;
|
||||
source include/show_slave_status2.inc;
|
||||
|
@ -36,7 +36,7 @@ SELECT LENGTH(data) FROM test.t1 WHERE c1 = 3;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
sleep 5;
|
||||
--source include/wait_for_ndb_to_binlog.inc
|
||||
--echo
|
||||
--echo **** Data Insert Validation Slave Section test.t1 ****
|
||||
--echo
|
||||
@ -56,12 +56,10 @@ UPDATE t1 set data=repeat('c',17*1024) where c1 = 2;
|
||||
--echo
|
||||
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1;
|
||||
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2;
|
||||
# Sleep is needed for NDB to allow time for
|
||||
# Injector thread to populate the bin log.
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
sleep 5;
|
||||
--source include/wait_for_ndb_to_binlog.inc
|
||||
--echo
|
||||
--echo **** Data Update Validation Slave Section test.t1 ****
|
||||
--echo
|
||||
@ -132,7 +130,7 @@ FROM test.t2 WHERE c1=2;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
sleep 5;
|
||||
--source include/wait_for_ndb_to_binlog.inc
|
||||
--echo
|
||||
--echo **** Data Insert Validation Slave Section test.t2 ****
|
||||
--echo
|
||||
@ -155,12 +153,10 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
|
||||
FROM test.t2 WHERE c1=1;
|
||||
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
|
||||
FROM test.t2 WHERE c1=2;
|
||||
# Sleep is needed for NDB to allow time for
|
||||
# Injector thread to populate the bin log.
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
sleep 5;
|
||||
--source include/wait_for_ndb_to_binlog.inc
|
||||
--echo
|
||||
--echo **** Data Update Validation Slave Section test.t2 ****
|
||||
--echo
|
||||
|
@ -3,10 +3,7 @@
|
||||
# Original Date: Aug/15/2005 #
|
||||
# Update: 08/29/2005 Comment out sleep. Only needed for debugging #
|
||||
#############################################################################
|
||||
# Note: Many lines are commented out in this test case. These were used for #
|
||||
# creating the test case and debugging and are being left for #
|
||||
# debugging, but they can not be used for the regular testing as the #
|
||||
# Time changes and is not deteministic, so instead we dump both the #
|
||||
# Note: Time changes and is not deteministic, so instead we dump both the #
|
||||
# master and slave and diff the dumps. If the dumps differ then the #
|
||||
# test case will fail. To run during diff failuers, comment out the #
|
||||
# diff. #
|
||||
@ -26,7 +23,6 @@ DROP TABLE IF EXISTS test.t1;
|
||||
|
||||
--enable_warnings
|
||||
|
||||
|
||||
eval CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=$engine_type;
|
||||
|
||||
delimiter |;
|
||||
@ -44,33 +40,24 @@ END|
|
||||
delimiter ;|
|
||||
|
||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||
sleep 6;
|
||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||
sleep 6;
|
||||
|
||||
#Select in this test are used for debugging
|
||||
#select * from test.t1;
|
||||
#connection slave;
|
||||
#select * from test.t1;
|
||||
|
||||
connection master;
|
||||
SET AUTOCOMMIT=0;
|
||||
START TRANSACTION;
|
||||
INSERT INTO test.t1 VALUES (null,test.f1());
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=1;
|
||||
#select * from test.t1;
|
||||
#sleep 6;
|
||||
|
||||
#connection slave;
|
||||
#select * from test.t1;
|
||||
# Sync master and slave for all engines except NDB
|
||||
if (`SELECT UPPER(LEFT('$engine_type', 3)) != 'NDB'`) {
|
||||
sync_slave_with_master;
|
||||
connection master;
|
||||
}
|
||||
# Sync master and slave for NDB engine
|
||||
let $wait_time= 6;
|
||||
--source include/wait_for_ndb_to_binlog.inc
|
||||
|
||||
#connection master;
|
||||
|
||||
#used for debugging
|
||||
#show binlog events;
|
||||
|
||||
# time to dump the databases and so we can see if they match
|
||||
# Time to dump the databases and so we can see if they match
|
||||
|
||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_master.sql
|
||||
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_slave.sql
|
||||
@ -87,5 +74,8 @@ DROP TABLE test.t1;
|
||||
|
||||
diff_files $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
|
||||
|
||||
# Clean up
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/func003_master.sql;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
|
||||
|
||||
# End of 5.0 test case
|
||||
|
@ -41,10 +41,7 @@ CALL test.p2();
|
||||
SELECT release_lock("test");
|
||||
SELECT * FROM test.t1;
|
||||
#show binlog events;
|
||||
# Added sleep for use with NDB to ensure that
|
||||
# the injector thread will populate log before
|
||||
# we switch to the slave.
|
||||
sleep 5;
|
||||
--source include/wait_for_ndb_to_binlog.inc
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
SELECT * FROM test.t1;
|
||||
|
@ -68,8 +68,8 @@ enable_query_log;
|
||||
connection slave;
|
||||
lock tables t1 read;
|
||||
start slave;
|
||||
#hope this is long enough for I/O thread to fetch over 16K relay log data
|
||||
sleep 3;
|
||||
connection master;
|
||||
--source include/sync_slave_io_with_master.inc
|
||||
unlock tables;
|
||||
|
||||
#test handling of aborted connection in the middle of update
|
||||
|
@ -35,9 +35,8 @@ INSERT INTO test.t2 VALUES (1, 0.0);
|
||||
#show binlog events;
|
||||
select * from test.t1;
|
||||
select * from test.t2;
|
||||
# Have to sleep for a few seconds to allow
|
||||
# NDB injector thread to populate binlog
|
||||
sleep 10;
|
||||
let $wait_time= 10;
|
||||
--source include/wait_for_ndb_to_binlog.inc
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
select * from test.t1;
|
||||
|
22
mysql-test/include/binlog_inject_error.inc
Normal file
22
mysql-test/include/binlog_inject_error.inc
Normal file
@ -0,0 +1,22 @@
|
||||
#
|
||||
# === Name
|
||||
#
|
||||
# binlog_inject_error.inc
|
||||
#
|
||||
# === Description
|
||||
#
|
||||
# Inject binlog write error when running the query, verifies that the
|
||||
# query is ended with the proper error (ER_ERROR_ON_WRITE).
|
||||
#
|
||||
# === Usage
|
||||
#
|
||||
# let query= 'CREATE TABLE t1 (a INT)';
|
||||
# source include/binlog_inject_error.inc;
|
||||
#
|
||||
|
||||
SET GLOBAL debug='d,injecting_fault_writing';
|
||||
--echo $query;
|
||||
--replace_regex /(errno: .*)/(errno: #)/
|
||||
--error ER_ERROR_ON_WRITE
|
||||
--eval $query
|
||||
SET GLOBAL debug='';
|
14
mysql-test/include/check_ipv6.inc
Normal file
14
mysql-test/include/check_ipv6.inc
Normal file
@ -0,0 +1,14 @@
|
||||
# Check if ipv6 is available. If not, server is crashing (see BUG#48915).
|
||||
--disable_query_log
|
||||
--disable_abort_on_error
|
||||
connect (checkcon123456789,::1,root,,test);
|
||||
if($mysql_errno)
|
||||
{
|
||||
skip wrong IP;
|
||||
}
|
||||
connection default;
|
||||
disconnect checkcon123456789;
|
||||
--enable_abort_on_error
|
||||
--enable_query_log
|
||||
# end check
|
||||
|
22
mysql-test/include/ipv6.inc
Normal file
22
mysql-test/include/ipv6.inc
Normal file
@ -0,0 +1,22 @@
|
||||
eval CREATE USER testuser@'$IPv6' identified by '1234';
|
||||
eval GRANT ALL ON test.* TO testuser@'$IPv6';
|
||||
eval SHOW GRANTS FOR testuser@'$IPv6';
|
||||
# deliver NULL instead of a valid number, see bug#34037
|
||||
eval SET @nip= inet_aton('$IPv6');
|
||||
SELECT @nip;
|
||||
SELECT inet_ntoa(@nip);
|
||||
# delivers a wrong value, see bug#34037
|
||||
SELECT USER();
|
||||
SELECT current_user();
|
||||
--disable_result_log
|
||||
SHOW PROCESSLIST;
|
||||
--enable_result_log
|
||||
connect (con1, $IPv6, root, , test, $MASTER_MYPORT);
|
||||
connection default;
|
||||
disconnect con1;
|
||||
eval REVOKE ALL ON test.* FROM testuser@'$IPv6';
|
||||
eval RENAME USER testuser@'$IPv6' to testuser1@'$IPv6';
|
||||
eval SET PASSWORD FOR testuser1@'$IPv6' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
eval DROP USER testuser1@'$IPv6';
|
||||
|
7
mysql-test/include/ipv6_clients.inc
Normal file
7
mysql-test/include/ipv6_clients.inc
Normal file
@ -0,0 +1,7 @@
|
||||
--exec $MYSQLADMIN --no-defaults --default-character-set=latin1 -h $IPv6 -P $MASTER_MYPORT -u root ping
|
||||
--disable_result_log
|
||||
--exec $MYSQL_CHECK -h $IPv6 -P $MASTER_MYPORT -u root test
|
||||
--exec $MYSQL_DUMP -h $IPv6 -P $MASTER_MYPORT -u root test
|
||||
--exec $MYSQL_SHOW -h $IPv6 -P $MASTER_MYPORT -u root
|
||||
--exec $MYSQL --host=$IPv6 --port=$MASTER_MYPORT --user=root test -e "SELECT current_user();SELECT user();"
|
||||
--enable_result_log
|
@ -6,12 +6,29 @@
|
||||
# Since we expect STOP SLAVE to produce a warning as the slave is
|
||||
# stopped (the server was started with skip-slave-start), we disable
|
||||
# warnings when doing STOP SLAVE.
|
||||
#
|
||||
# $no_change_master If true, no change master will be done nor any reset slave.
|
||||
# This is to avoid touching the relay-log.info file allowing
|
||||
# the test to create one itself.
|
||||
# $skip_slave_start If true, the slave will not be started
|
||||
|
||||
connection slave;
|
||||
|
||||
#we expect STOP SLAVE to produce a warning as the slave is stopped
|
||||
#(the server was started with skip-slave-start)
|
||||
--disable_warnings
|
||||
stop slave;
|
||||
--disable_query_log
|
||||
if (!$no_change_master) {
|
||||
eval CHANGE MASTER TO MASTER_USER='root',
|
||||
MASTER_CONNECT_RETRY=1,
|
||||
MASTER_HOST='127.0.0.1',
|
||||
MASTER_PORT=$MASTER_MYPORT;
|
||||
}
|
||||
--enable_query_log
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
--enable_warnings
|
||||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
@ -20,17 +37,39 @@ use test;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
--enable_warnings
|
||||
reset master;
|
||||
|
||||
--disable_query_log
|
||||
reset slave;
|
||||
if (!$no_change_master) {
|
||||
reset slave;
|
||||
}
|
||||
--enable_query_log
|
||||
connection slave;
|
||||
reset slave;
|
||||
|
||||
--disable_warnings
|
||||
# the first RESET SLAVE may produce a warning about non-existent
|
||||
# 'ndb_apply_status' table, because this table is created
|
||||
# asynchronously at the server startup and may not exist yet
|
||||
# if RESET SLAVE comes too soon after the server startup
|
||||
if (!$no_change_master) {
|
||||
reset slave;
|
||||
}
|
||||
--enable_warnings
|
||||
|
||||
# Clean up old test tables
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
--enable_warnings
|
||||
|
||||
--disable_query_log
|
||||
#eval CHANGE MASTER TO MASTER_USER='root',
|
||||
# MASTER_CONNECT_RETRY=1,
|
||||
# MASTER_HOST='127.0.0.1',
|
||||
# MASTER_PORT=$MASTER_MYPORT;
|
||||
reset master;
|
||||
--enable_query_log
|
||||
start slave;
|
||||
source include/wait_for_slave_to_start.inc;
|
||||
|
||||
if (!$skip_slave_start) {
|
||||
start slave;
|
||||
source include/wait_for_slave_to_start.inc;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
# Replication tests need binlog
|
||||
#
|
||||
# $skip_slave_start If true, the slave will not be started
|
||||
source include/have_log_bin.inc;
|
||||
|
||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||
@ -8,7 +10,10 @@ connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,);
|
||||
|
||||
-- source include/master-slave-reset.inc
|
||||
|
||||
connection master;
|
||||
sync_slave_with_master;
|
||||
if (!$skip_slave_start) {
|
||||
connection master;
|
||||
sync_slave_with_master;
|
||||
}
|
||||
|
||||
# Set the default connection to 'master'
|
||||
connection master;
|
||||
|
@ -1,4 +1,4 @@
|
||||
--require r/not_ndb_default.require
|
||||
disable_query_log;
|
||||
select convert(@@table_type using latin1) NOT IN ("ndbcluster","NDBCLUSTER") as "TRUE";
|
||||
select convert(@@storage_engine using latin1) NOT IN ("ndbcluster","NDBCLUSTER") as "TRUE";
|
||||
enable_query_log;
|
||||
|
24
mysql-test/include/rpl_ip_mix.inc
Normal file
24
mysql-test/include/rpl_ip_mix.inc
Normal file
@ -0,0 +1,24 @@
|
||||
--echo connect (master,$IPv6,root,,test,MASTER_MYPORT);
|
||||
connect (master,$IPv6,root,,test,$MASTER_MYPORT);
|
||||
--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
|
||||
connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
|
||||
--echo connection master;
|
||||
connection master;
|
||||
reset master;
|
||||
source include/show_master_status.inc;
|
||||
save_master_pos;
|
||||
--echo connection slave;
|
||||
connection slave;
|
||||
reset slave;
|
||||
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
|
||||
--echo Master-Host: $master_host
|
||||
eval change master to master_host='$IPv6';
|
||||
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
|
||||
--echo Master-Host: $master_host
|
||||
--echo disconnect slave;
|
||||
disconnect slave;
|
||||
--echo disconnect master;
|
||||
disconnect master;
|
||||
--echo connection default;
|
||||
connection default;
|
||||
|
24
mysql-test/include/rpl_ip_mix2.inc
Normal file
24
mysql-test/include/rpl_ip_mix2.inc
Normal file
@ -0,0 +1,24 @@
|
||||
--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
|
||||
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
|
||||
--echo connect (slave,$IPv6,root,,test,SLAVE_MYPORT);
|
||||
connect (slave,$IPv6,root,,test,$SLAVE_MYPORT);
|
||||
--echo connection master;
|
||||
connection master;
|
||||
reset master;
|
||||
source include/show_master_status.inc;
|
||||
save_master_pos;
|
||||
--echo connection slave;
|
||||
connection slave;
|
||||
reset slave;
|
||||
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
|
||||
--echo Master-Host: $master_host
|
||||
eval change master to master_host='$IPv6';
|
||||
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
|
||||
--echo Master-Host: $master_host
|
||||
--echo disconnect slave;
|
||||
disconnect slave;
|
||||
--echo disconnect master;
|
||||
disconnect master;
|
||||
--echo connection default;
|
||||
connection default;
|
||||
|
22
mysql-test/include/rpl_ipv6.inc
Normal file
22
mysql-test/include/rpl_ipv6.inc
Normal file
@ -0,0 +1,22 @@
|
||||
--echo connect (master,$IPv6,root,,test,MASTER_MYPORT);
|
||||
connect (master,$IPv6,root,,test,$MASTER_MYPORT);
|
||||
--echo connect (slave,$IPv6,root,,test,SLAVE_MYPORT);
|
||||
connect (slave,$IPv6,root,,test,$SLAVE_MYPORT);
|
||||
--echo connection master;
|
||||
connection master;
|
||||
reset master;
|
||||
source include/show_master_status.inc;
|
||||
save_master_pos;
|
||||
--echo connection slave;
|
||||
connection slave;
|
||||
reset slave;
|
||||
eval change master to master_host='$IPv6';
|
||||
let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
|
||||
--echo Master-Host: $master_host
|
||||
--echo disconnect slave;
|
||||
disconnect slave;
|
||||
--echo disconnect master;
|
||||
disconnect master;
|
||||
--echo connection default;
|
||||
connection default;
|
||||
|
41
mysql-test/include/wait_for_ndb_to_binlog.inc
Normal file
41
mysql-test/include/wait_for_ndb_to_binlog.inc
Normal file
@ -0,0 +1,41 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Several test primitives from mysql-test/extra/rpl_tests
|
||||
# shared for test cases for MyISAM, InnoDB, NDB and other
|
||||
# engines. But for NDB all events will be added by NDB
|
||||
# injector and now there are no way to detect the state of
|
||||
# NDB injector therefore this primitive waits 5 sec
|
||||
# if engine type is NDB.
|
||||
# In future that should be fixed by waiting of proper
|
||||
# state of NDB injector.
|
||||
#
|
||||
# ==== Usage ====
|
||||
#
|
||||
# let $engine_type= NDB;
|
||||
# --source include/wait_for_ndb_to_binlog.inc
|
||||
#
|
||||
# ==== Parameters =====
|
||||
#
|
||||
# $engine_type
|
||||
# Type of engine. If type is NDB then it waits $wait_time sec
|
||||
#
|
||||
# $wait_time
|
||||
# Test will wait $wait_time seconds
|
||||
|
||||
let $_wait_time= 5;
|
||||
|
||||
if (!$wait_time) {
|
||||
let $_wait_time= $wait_time;
|
||||
}
|
||||
|
||||
if (`SELECT UPPER(LEFT('$engine_type',3)) = 'NDB'`) {
|
||||
while (!$_wait_time) {
|
||||
let $_wait_time_internal= 10;
|
||||
while (!$_wait_time_internal) {
|
||||
sleep 0.1;
|
||||
dec $_wait_time_internal;
|
||||
}
|
||||
dec $_wait_time;
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,16 @@
|
||||
#
|
||||
# SUMMARY
|
||||
#
|
||||
# Waits until the show statement ($show_statement) has at least within one of
|
||||
# the rows of the result set for the field ($field) a value which fulfils
|
||||
# Waits until the show statement ($show_statement) has one or all of the
|
||||
# rows of the result set for the field ($field) a value which fulfils
|
||||
# a condition ($condition), or the operation times out.
|
||||
#
|
||||
#
|
||||
# USAGE
|
||||
#
|
||||
# All rows of the result must fulfil the condition if $all_rows_fulfil is 1
|
||||
# else at least one of the result must fulfil the condition.
|
||||
# let $wait_for_all= 1;
|
||||
# let $show_statement= SHOW PROCESSLIST;
|
||||
# let $field= State;
|
||||
# let $condition= = 'Updating';
|
||||
@ -46,8 +49,11 @@ inc $max_run_time;
|
||||
|
||||
let $found= 0;
|
||||
let $max_end_time= `SELECT UNIX_TIMESTAMP() + $max_run_time`;
|
||||
while (`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`)
|
||||
|
||||
if (`SELECT '$wait_for_all' != '1'`)
|
||||
{
|
||||
while (`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`)
|
||||
{
|
||||
# Sleep a bit to avoid too heavy load.
|
||||
real_sleep 0.2;
|
||||
let $rowno= 1;
|
||||
@ -66,7 +72,33 @@ while (`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`)
|
||||
}
|
||||
inc $rowno;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (`SELECT '$wait_for_all' = '1'`)
|
||||
{
|
||||
while (`SELECT UNIX_TIMESTAMP() <= $max_end_time AND $found = 0`)
|
||||
{
|
||||
# Sleep a bit to avoid too heavy load.
|
||||
real_sleep 0.2;
|
||||
let $rowno= 1;
|
||||
let $process_result= 1;
|
||||
while (`SELECT $process_result = 1 AND $found = 0`)
|
||||
{
|
||||
let $field_value= query_get_value($show_statement, $field, $rowno);
|
||||
if (`SELECT '$field_value' = 'No such row'`)
|
||||
{
|
||||
let $found= 1;
|
||||
}
|
||||
if (`SELECT $found = 0 AND NOT '$field_value' $condition`)
|
||||
{
|
||||
let process_result= 0;
|
||||
}
|
||||
inc $rowno;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found)
|
||||
{
|
||||
echo # Timeout in include/wait_show_condition.inc for $wait_condition;
|
||||
|
@ -357,6 +357,8 @@ sub post_check_client_group {
|
||||
}
|
||||
|
||||
if (IS_WINDOWS)
|
||||
{
|
||||
if (! $self->{ARGS}->{embedded})
|
||||
{
|
||||
# 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");
|
||||
@ -365,6 +367,7 @@ sub post_check_client_group {
|
||||
$config->insert($client_group_name,"shared-memory-base-name", $shm->value());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -4024,15 +4024,26 @@ sub mysqld_arguments ($$$$) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($mysql_version_id < 50200)
|
||||
{
|
||||
mtr_add_arg($args, "%s--master-user=root", $prefix);
|
||||
mtr_add_arg($args, "%s--master-connect-retry=1", $prefix);
|
||||
mtr_add_arg($args, "%s--master-host=127.0.0.1", $prefix);
|
||||
mtr_add_arg($args, "%s--master-password=", $prefix);
|
||||
mtr_add_arg($args, "%s--master-port=%d", $prefix,
|
||||
$master->[0]->{'port'}); # First master
|
||||
}
|
||||
# NOTE: the backport (see BUG#48048) originally removed the
|
||||
# commented out lines below. However, given that they are
|
||||
# protected with a version check (< 50200) now, it should be
|
||||
# safe to keep them. The problem is that the backported patch
|
||||
# was into a 5.1 GA codebase - mysql-5.1-rep+2 tree - so
|
||||
# version is 501XX, consequently check becomes worthless. It
|
||||
# should be safe to uncomment them when merging up to 5.5.
|
||||
#
|
||||
# RQG semisync test runs on the 5.1 GA tree and needs MTR v1.
|
||||
# This was causing the test to fail (slave would not start
|
||||
# due to unrecognized option(s)).
|
||||
# if ($mysql_version_id < 50200)
|
||||
# {
|
||||
# mtr_add_arg($args, "%s--master-user=root", $prefix);
|
||||
# mtr_add_arg($args, "%s--master-connect-retry=1", $prefix);
|
||||
# mtr_add_arg($args, "%s--master-host=127.0.0.1", $prefix);
|
||||
# mtr_add_arg($args, "%s--master-password=", $prefix);
|
||||
# mtr_add_arg($args, "%s--master-port=%d", $prefix,
|
||||
# $master->[0]->{'port'}); # First master
|
||||
# }
|
||||
my $slave_server_id= 2 + $idx;
|
||||
my $slave_rpl_rank= $slave_server_id;
|
||||
mtr_add_arg($args, "%s--server-id=%d", $prefix, $slave_server_id);
|
||||
|
@ -68,7 +68,7 @@ use My::File::Path; # Patched version of File::Path
|
||||
use File::Basename;
|
||||
use File::Copy;
|
||||
use File::Find;
|
||||
use File::Temp qw / tempdir /;
|
||||
use File::Temp qw /tempdir/;
|
||||
use File::Spec::Functions qw / splitdir /;
|
||||
use My::Platform;
|
||||
use My::SafeProcess;
|
||||
@ -1843,17 +1843,19 @@ sub environment_setup {
|
||||
}
|
||||
else
|
||||
{
|
||||
$semisync_master_filename = "libsemisync_master.so";
|
||||
$semisync_slave_filename = "libsemisync_slave.so";
|
||||
$semisync_master_filename = "semisync_master.so";
|
||||
$semisync_slave_filename = "semisync_slave.so";
|
||||
}
|
||||
my $lib_semisync_master_plugin=
|
||||
mtr_file_exists(vs_config_dirs('plugin/semisync',$semisync_master_filename),
|
||||
"$basedir/plugin/semisync/.libs/" . $semisync_master_filename,
|
||||
"$basedir/lib/mysql/plugin/" . $semisync_master_filename);
|
||||
"$basedir/lib/mysql/plugin/" . $semisync_master_filename,
|
||||
"$basedir/lib/plugin/" . $semisync_master_filename);
|
||||
my $lib_semisync_slave_plugin=
|
||||
mtr_file_exists(vs_config_dirs('plugin/semisync',$semisync_slave_filename),
|
||||
"$basedir/plugin/semisync/.libs/" . $semisync_slave_filename,
|
||||
"$basedir/lib/mysql/plugin/" . $semisync_slave_filename);
|
||||
"$basedir/lib/mysql/plugin/" . $semisync_slave_filename,
|
||||
"$basedir/lib/plugin/" . $semisync_slave_filename);
|
||||
if ($lib_semisync_master_plugin && $lib_semisync_slave_plugin)
|
||||
{
|
||||
$ENV{'SEMISYNC_MASTER_PLUGIN'}= basename($lib_semisync_master_plugin);
|
||||
|
@ -12717,3 +12717,13 @@ COUNT(t1.a)
|
||||
729
|
||||
DROP TABLE t1;
|
||||
SET @@join_buffer_size= @save_join_buffer_size;
|
||||
End of 5.1 tests
|
||||
CREATE TABLE t1(id INT NOT NULL AUTO_INCREMENT, name VARCHAR(128) NOT NULL, PRIMARY KEY(id)) ENGINE=archive;
|
||||
INSERT INTO t1 VALUES(NULL,'a'),(NULL,'a');
|
||||
CREATE TABLE t2(id INT NOT NULL AUTO_INCREMENT, name VARCHAR(128) NOT NULL, PRIMARY KEY(id)) ENGINE=archive;
|
||||
INSERT INTO t2 VALUES(NULL,'b'),(NULL,'b');
|
||||
SELECT t1.id, t2.id, t1.name, t2.name FROM t1,t2 WHERE t1.id = t2.id;
|
||||
id id name name
|
||||
1 1 a b
|
||||
2 2 a b
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -5407,4 +5407,60 @@ test.t1 repair status OK
|
||||
select * from t1 limit 1;
|
||||
a
|
||||
drop table t1;
|
||||
#
|
||||
# Test for the following cases
|
||||
# 1) integers and strings enclosed in quotes
|
||||
# 2) integers and strings not enclosed in quotes
|
||||
# 3) \X characters with quotes
|
||||
# 4) \X characters outside quotes
|
||||
#
|
||||
CREATE TABLE t1(c1 INT NOT NULL, c2 VARCHAR(50) NOT NULL) ENGINE=csv;
|
||||
# remove the already existing .CSV file if any
|
||||
# create the .CSV file that contains the hard-coded data used in
|
||||
# testing
|
||||
1,"integer sans quotes"
|
||||
1,string sans quotes
|
||||
1,quotes"in between" strings
|
||||
"1",Integer with quote and string with no quote
|
||||
1,"escape sequence \n \" \\ \r \a within quotes"
|
||||
1,escape sequence \n \" \\ \r \a without quotes
|
||||
# select from the table in which the data has been filled in using
|
||||
# the hard-coded .CSV file
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
1 integer sans quotes
|
||||
1 string sans quotes
|
||||
1 quotes"in between" strings
|
||||
1 Integer with quote and string with no quote
|
||||
1 escape sequence
|
||||
" \
|
||||
\a within quotes
|
||||
1 escape sequence
|
||||
" \
|
||||
\a without quotes
|
||||
DROP TABLE t1;
|
||||
# Test for the case when a field begins with a quote, but does not end in a
|
||||
# quote.
|
||||
# Note: This results in an error.
|
||||
CREATE TABLE t1(c1 INT NOT NULL, c2 VARCHAR(50) NOT NULL) ENGINE=csv;
|
||||
# remove the already existing .CSV file if any
|
||||
# create the .CSV file that contains the hard-coded data used in
|
||||
# testing
|
||||
1,"string only at the beginning quotes
|
||||
# select from the table in which the data has been filled in using
|
||||
# the hard-coded .CSV file
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Table 't1' is marked as crashed and should be repaired
|
||||
DROP TABLE t1;
|
||||
# Test for the case when a field ends with a quote, but does not begin in a
|
||||
# quote.
|
||||
# Note: This results in an error.
|
||||
CREATE TABLE t1(c1 INT NOT NULL, c2 VARCHAR(50) NOT NULL) ENGINE=csv;
|
||||
# remove the already existing .CSV file if any
|
||||
# create the .CSV file that contains the hard-coded data used in
|
||||
# testing
|
||||
1,string with only ending quotes"
|
||||
# select from the table in which the data has been filled in using
|
||||
# the hard-coded .CSV file
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Table 't1' is marked as crashed and should be repaired
|
||||
|
@ -70,3 +70,14 @@ we_ivo NULL
|
||||
we_martin NULL
|
||||
we_toshko NULL
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
e1 enum('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),
|
||||
e2 enum('<27><><EFBFBD><EFBFBD><EFBFBD>')
|
||||
) ENGINE=MYISAM character set cp1251;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`e1` enum('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>') DEFAULT NULL,
|
||||
`e2` enum('<27><><EFBFBD><EFBFBD><EFBFBD>') DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251
|
||||
DROP TABLE t1;
|
||||
|
@ -1,8 +1,40 @@
|
||||
drop table if exists t1;
|
||||
In the following tests we change the order of letter "b"
|
||||
making it equal to letter "a", and check that it works
|
||||
with all Unicode character sets
|
||||
set names utf8;
|
||||
show variables like 'character_sets_dir%';
|
||||
Variable_name Value
|
||||
character_sets_dir MYSQL_TEST_DIR/std_data/
|
||||
show collation like 'utf8_phone_ci';
|
||||
Collation Charset Id Default Compiled Sortlen
|
||||
utf8_phone_ci utf8 352 8
|
||||
CREATE TABLE t1 (
|
||||
name VARCHAR(64),
|
||||
phone VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_phone_ci
|
||||
);
|
||||
INSERT INTO t1 VALUES ('Svoj','+7 912 800 80 02');
|
||||
INSERT INTO t1 VALUES ('Hf','+7 (912) 800 80 04');
|
||||
INSERT INTO t1 VALUES ('Bar','+7-912-800-80-01');
|
||||
INSERT INTO t1 VALUES ('Ramil','(7912) 800 80 03');
|
||||
INSERT INTO t1 VALUES ('Sanja','+380 (912) 8008005');
|
||||
SELECT * FROM t1 ORDER BY phone;
|
||||
name phone
|
||||
Sanja +380 (912) 8008005
|
||||
Bar +7-912-800-80-01
|
||||
Svoj +7 912 800 80 02
|
||||
Ramil (7912) 800 80 03
|
||||
Hf +7 (912) 800 80 04
|
||||
SELECT * FROM t1 WHERE phone='+7(912)800-80-01';
|
||||
name phone
|
||||
Bar +7-912-800-80-01
|
||||
SELECT * FROM t1 WHERE phone='79128008001';
|
||||
name phone
|
||||
Bar +7-912-800-80-01
|
||||
SELECT * FROM t1 WHERE phone='7 9 1 2 8 0 0 8 0 0 1';
|
||||
name phone
|
||||
Bar +7-912-800-80-01
|
||||
DROP TABLE t1;
|
||||
show collation like 'utf8_test_ci';
|
||||
Collation Charset Id Default Compiled Sortlen
|
||||
utf8_test_ci utf8 353 8
|
||||
@ -341,6 +373,7 @@ select "foo" = "foo " collate latin1_test;
|
||||
The following tests check that two-byte collation IDs work
|
||||
select * from information_schema.collations where id>256 order by id;
|
||||
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
|
||||
utf8_phone_ci utf8 352 8
|
||||
utf8_test_ci utf8 353 8
|
||||
ucs2_test_ci ucs2 358 8
|
||||
ucs2_vn_ci ucs2 359 8
|
||||
@ -369,3 +402,8 @@ s1
|
||||
a
|
||||
b
|
||||
DROP TABLE t1;
|
||||
SET NAMES utf8 COLLATE utf8_phone_ci;
|
||||
SHOW COLLATION LIKE 'utf8_phone_ci';
|
||||
Collation Charset Id Default Compiled Sortlen
|
||||
utf8_phone_ci utf8 352 8
|
||||
SET NAMES utf8;
|
||||
|
@ -1881,6 +1881,23 @@ CONVERT(a, CHAR) CONVERT(b, CHAR)
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
Start of 5.4 tests
|
||||
CREATE TABLE t1 (
|
||||
clipid INT NOT NULL,
|
||||
Tape TINYTEXT,
|
||||
PRIMARY KEY (clipid),
|
||||
KEY tape(Tape(255))
|
||||
) CHARACTER SET=utf8;
|
||||
ALTER TABLE t1 ADD mos TINYINT DEFAULT 0 AFTER clipid;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`clipid` int(11) NOT NULL,
|
||||
`mos` tinyint(4) DEFAULT '0',
|
||||
`Tape` tinytext,
|
||||
PRIMARY KEY (`clipid`),
|
||||
KEY `tape` (`Tape`(255))
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8
|
||||
DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (
|
||||
predicted_order int NOT NULL,
|
||||
|
26
mysql-test/r/deprecated_features.result
Normal file
26
mysql-test/r/deprecated_features.result
Normal file
@ -0,0 +1,26 @@
|
||||
set global log_bin_trust_routine_creators=1;
|
||||
ERROR HY000: Unknown system variable 'log_bin_trust_routine_creators'
|
||||
set table_type='MyISAM';
|
||||
ERROR HY000: Unknown system variable 'table_type'
|
||||
select @@table_type='MyISAM';
|
||||
ERROR HY000: Unknown system variable 'table_type'
|
||||
backup table t1 to 'data.txt';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'backup table t1 to 'data.txt'' at line 1
|
||||
restore table t1 from 'data.txt';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'restore table t1 from 'data.txt'' at line 1
|
||||
show plugin;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'plugin' at line 1
|
||||
load table t1 from master;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table t1 from master' at line 1
|
||||
load data from master;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from master' at line 1
|
||||
SHOW INNODB STATUS;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNODB STATUS' at line 1
|
||||
create table t1 (t6 timestamp(6));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6))' at line 1
|
||||
create table t1 (t6 timestamp) type=myisam;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=myisam' at line 1
|
||||
show table types;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'types' at line 1
|
||||
show mutex status;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mutex status' at line 1
|
@ -4,11 +4,9 @@ show variables like 'log_bin%';
|
||||
Variable_name Value
|
||||
log_bin OFF
|
||||
log_bin_trust_function_creators ON
|
||||
log_bin_trust_routine_creators ON
|
||||
flush logs;
|
||||
show variables like 'log_bin%';
|
||||
Variable_name Value
|
||||
log_bin OFF
|
||||
log_bin_trust_function_creators ON
|
||||
log_bin_trust_routine_creators ON
|
||||
set global expire_logs_days = 0;
|
||||
|
@ -49,7 +49,7 @@ a b
|
||||
Full-text indexes are called collections
|
||||
Only MyISAM tables support collections
|
||||
select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH QUERY EXPANSION)' at line 1
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'QUERY EXPANSION)' at line 1
|
||||
explain select * from t1 where MATCH(a,b) AGAINST ("collections");
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 fulltext a a 0 1 Using where
|
||||
|
@ -5,3 +5,8 @@ flush tables;
|
||||
select * from t1 where isnull(to_days(mydate));
|
||||
id mydate
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY(id));
|
||||
INSERT INTO t1( id ) VALUES ( NULL );
|
||||
SELECT t1.id FROM t1 WHERE (id is not null and id is null );
|
||||
id
|
||||
DROP TABLE t1;
|
||||
|
@ -10,7 +10,7 @@ explain extended select * from t1 where a like concat('abc','%');
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 index a a 13 NULL 5 20.00 Using where; Using index
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` like concat('abc','%'))
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` like <cache>(concat('abc','%')))
|
||||
select * from t1 where a like "abc%";
|
||||
a
|
||||
abc
|
||||
|
@ -383,8 +383,10 @@ SELECT b DIV 900 y FROM t1 GROUP BY y;
|
||||
y
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'str1'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'str2'
|
||||
Warning 1366 Incorrect decimal value: '' for column '' at row -1
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'str1'
|
||||
Warning 1366 Incorrect decimal value: '' for column '' at row -1
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'str2'
|
||||
SELECT c DIV 900 y FROM t1 GROUP BY y;
|
||||
y
|
||||
0
|
||||
@ -485,4 +487,12 @@ RAND(i)
|
||||
0.155220427694936
|
||||
DROP TABLE t1;
|
||||
#
|
||||
select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x;
|
||||
ERROR 22003: Out of range value for column 'x' at row 1
|
||||
select "123456789012345678901234567890.123456789012345678901234567890" div 1 as x;
|
||||
ERROR 22003: Out of range value for column 'x' at row 1
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect DECIMAL value: ''
|
||||
Error 1264 Out of range value for column 'x' at row 1
|
||||
End of 5.1 tests
|
||||
|
@ -928,7 +928,6 @@ select f1 from t1 where cast("2006-1-1" as date) between f1 and cast('zzz' as da
|
||||
f1
|
||||
Warnings:
|
||||
Warning 1292 Incorrect datetime value: 'zzz'
|
||||
Warning 1292 Incorrect datetime value: 'zzz'
|
||||
select f1 from t1 where makedate(2006,1) between date(f1) and date(f3);
|
||||
f1
|
||||
2006-01-01
|
||||
|
@ -65,6 +65,7 @@ SESSION_STATUS
|
||||
SESSION_VARIABLES
|
||||
STATISTICS
|
||||
TABLES
|
||||
TABLESPACES
|
||||
TABLE_CONSTRAINTS
|
||||
TABLE_PRIVILEGES
|
||||
TRIGGERS
|
||||
@ -103,6 +104,7 @@ inner join information_schema.TABLES v2 on (v1.c=v2.table_name)
|
||||
where v1.c like "t%";
|
||||
c table_name
|
||||
TABLES TABLES
|
||||
TABLESPACES TABLESPACES
|
||||
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
|
||||
TABLE_PRIVILEGES TABLE_PRIVILEGES
|
||||
TRIGGERS TRIGGERS
|
||||
@ -122,6 +124,7 @@ left join information_schema.TABLES v2 on (v1.c=v2.table_name)
|
||||
where v1.c like "t%";
|
||||
c table_name
|
||||
TABLES TABLES
|
||||
TABLESPACES TABLESPACES
|
||||
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
|
||||
TABLE_PRIVILEGES TABLE_PRIVILEGES
|
||||
TRIGGERS TRIGGERS
|
||||
@ -141,6 +144,7 @@ right join information_schema.TABLES v2 on (v1.c=v2.table_name)
|
||||
where v1.c like "t%";
|
||||
c table_name
|
||||
TABLES TABLES
|
||||
TABLESPACES TABLESPACES
|
||||
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
|
||||
TABLE_PRIVILEGES TABLE_PRIVILEGES
|
||||
TRIGGERS TRIGGERS
|
||||
@ -628,6 +632,7 @@ COLLATIONS SYSTEM VIEW MEMORY
|
||||
show tables from information_schema like "T%";
|
||||
Tables_in_information_schema (T%)
|
||||
TABLES
|
||||
TABLESPACES
|
||||
TABLE_CONSTRAINTS
|
||||
TABLE_PRIVILEGES
|
||||
TRIGGERS
|
||||
@ -637,6 +642,7 @@ use information_schema;
|
||||
show full tables like "T%";
|
||||
Tables_in_information_schema (T%) Table_type
|
||||
TABLES SYSTEM VIEW
|
||||
TABLESPACES SYSTEM VIEW
|
||||
TABLE_CONSTRAINTS SYSTEM VIEW
|
||||
TABLE_PRIVILEGES SYSTEM VIEW
|
||||
TRIGGERS SYSTEM VIEW
|
||||
@ -649,6 +655,7 @@ use information_schema;
|
||||
show tables like "T%";
|
||||
Tables_in_information_schema (T%)
|
||||
TABLES
|
||||
TABLESPACES
|
||||
TABLE_CONSTRAINTS
|
||||
TABLE_PRIVILEGES
|
||||
TRIGGERS
|
||||
@ -855,7 +862,7 @@ table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest')
|
||||
AND table_name not like 'ndb%' AND table_name not like 'innodb_%'
|
||||
GROUP BY TABLE_SCHEMA;
|
||||
table_schema count(*)
|
||||
information_schema 28
|
||||
information_schema 29
|
||||
mysql 22
|
||||
create table t1 (i int, j int);
|
||||
create trigger trg1 before insert on t1 for each row
|
||||
@ -1317,6 +1324,7 @@ SESSION_STATUS information_schema.SESSION_STATUS 1
|
||||
SESSION_VARIABLES information_schema.SESSION_VARIABLES 1
|
||||
STATISTICS information_schema.STATISTICS 1
|
||||
TABLES information_schema.TABLES 1
|
||||
TABLESPACES information_schema.TABLESPACES 1
|
||||
TABLE_CONSTRAINTS information_schema.TABLE_CONSTRAINTS 1
|
||||
TABLE_PRIVILEGES information_schema.TABLE_PRIVILEGES 1
|
||||
TRIGGERS information_schema.TRIGGERS 1
|
||||
|
@ -28,6 +28,7 @@ SESSION_STATUS
|
||||
SESSION_VARIABLES
|
||||
STATISTICS
|
||||
TABLES
|
||||
TABLESPACES
|
||||
TABLE_CONSTRAINTS
|
||||
TABLE_PRIVILEGES
|
||||
TRIGGERS
|
||||
@ -36,6 +37,7 @@ VIEWS
|
||||
show tables from INFORMATION_SCHEMA like 'T%';
|
||||
Tables_in_information_schema (T%)
|
||||
TABLES
|
||||
TABLESPACES
|
||||
TABLE_CONSTRAINTS
|
||||
TABLE_PRIVILEGES
|
||||
TRIGGERS
|
||||
|
179
mysql-test/r/ipv4_as_ipv6.result
Normal file
179
mysql-test/r/ipv4_as_ipv6.result
Normal file
@ -0,0 +1,179 @@
|
||||
=============Test of '127.0.0.1' (IPv4) ===========================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'127.0.0.1';
|
||||
Grants for testuser@127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1'
|
||||
SET @nip= inet_aton('127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
2130706433
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
127.0.0.1
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'127.0.0.1';
|
||||
RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'127.0.0.1';
|
||||
=============Test of '0:0:0:0:0:FFFF:127.0.0.1' ===================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
Grants for testuser@0:0:0:0:0:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0:0:0:0:0:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' to testuser1@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0:0:0:0:0:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
=============Test of '0000:0000:0000:0000:0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0000:0000:0000:0000:0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0000:0000:0000:0000:0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' to testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
=============Test of '0:0000:0000:0:0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0:0000:0000:0:0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0:0000:0000:0:0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' to testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
=============Test of '0::0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0::0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0::0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0::0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0::0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0::0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0::0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0::0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0::0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0::0000:FFFF:127.0.0.1' to testuser1@'0::0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0::0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0::0000:FFFF:127.0.0.1';
|
||||
=============Test of '0:0:0:0:0:FFFF:127.0.0.1/96' ================
|
||||
=============Test of '::FFFF:127.0.0.1' ===========================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'::FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'::FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'::FFFF:127.0.0.1';
|
||||
Grants for testuser@::FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'::FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('::FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'::FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'::FFFF:127.0.0.1' to testuser1@'::FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'::FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'::FFFF:127.0.0.1';
|
||||
=============Test of '::FFFF:127.0.0.1/96' ========================
|
||||
=============Test of '::1' ========================
|
||||
connect (con1, ::1, root, , test, MASTER_MYPORT,);
|
||||
Got one of the listed errors
|
32
mysql-test/r/ipv4_as_ipv6_win.result
Normal file
32
mysql-test/r/ipv4_as_ipv6_win.result
Normal file
@ -0,0 +1,32 @@
|
||||
=============Test of '127.0.0.1' (IPv4) ===========================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'127.0.0.1';
|
||||
Grants for testuser@127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1'
|
||||
SET @nip= inet_aton('127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
2130706433
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
127.0.0.1
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@127.0.0.1
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@127.0.0.1
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'127.0.0.1';
|
||||
RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@127.0.0.1
|
||||
DROP USER testuser1@'127.0.0.1';
|
||||
=============Test of '::1' ========================
|
||||
connect (con1, ::1, root, , test, MASTER_MYPORT);
|
||||
Got one of the listed errors
|
264
mysql-test/r/ipv6.result
Normal file
264
mysql-test/r/ipv6.result
Normal file
@ -0,0 +1,264 @@
|
||||
=============Test of '::1' ========================================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'::1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'::1';
|
||||
SHOW GRANTS FOR testuser@'::1';
|
||||
Grants for testuser@::1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1'
|
||||
SET @nip= inet_aton('::1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'::1';
|
||||
RENAME USER testuser@'::1' to testuser1@'::1';
|
||||
SET PASSWORD FOR testuser1@'::1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'::1';
|
||||
=============Test of '::1/128' ====================================
|
||||
=============Test of '0000:0000:0000:0000:0000:0000:0000:0001' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
Grants for testuser@0000:0000:0000:0000:0000:0000:0000:0001
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001'
|
||||
SET @nip= inet_aton('0000:0000:0000:0000:0000:0000:0000:0001');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
RENAME USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' to testuser1@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:0000:0000:0001' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
=============Test of '0:0:0:0:0:0:0:1' ============================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0:0:0:0:0:0:1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0:0:0:0:0:0:1';
|
||||
SHOW GRANTS FOR testuser@'0:0:0:0:0:0:0:1';
|
||||
Grants for testuser@0:0:0:0:0:0:0:1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:0:0:1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:0:0:1'
|
||||
SET @nip= inet_aton('0:0:0:0:0:0:0:1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:0:0:1';
|
||||
RENAME USER testuser@'0:0:0:0:0:0:0:1' to testuser1@'0:0:0:0:0:0:0:1';
|
||||
SET PASSWORD FOR testuser1@'0:0:0:0:0:0:0:1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0:0:0:0:0:0:0:1';
|
||||
=============Test of '127.0.0.1' (IPv4) ===========================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'127.0.0.1';
|
||||
Grants for testuser@127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1'
|
||||
SET @nip= inet_aton('127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
2130706433
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
127.0.0.1
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'127.0.0.1';
|
||||
RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'127.0.0.1';
|
||||
=============Test of '0:0:0:0:0:FFFF:127.0.0.1' ===================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
Grants for testuser@0:0:0:0:0:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0:0:0:0:0:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' to testuser1@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0:0:0:0:0:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0:0:0:0:0:FFFF:127.0.0.1';
|
||||
=============Test of '0000:0000:0000:0000:0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0000:0000:0000:0000:0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0000:0000:0000:0000:0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' to testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0000:0000:0000:0000:0000:FFFF:127.0.0.1';
|
||||
=============Test of '0:0000:0000:0:0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0:0000:0000:0:0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0000:0000:0:0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0:0000:0000:0:0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' to testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0:0000:0000:0:0000:FFFF:127.0.0.1';
|
||||
=============Test of '0::0000:FFFF:127.0.0.1' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0::0000:FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0::0000:FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'0::0000:FFFF:127.0.0.1';
|
||||
Grants for testuser@0::0000:FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0::0000:FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0::0000:FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('0::0000:FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0::0000:FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'0::0000:FFFF:127.0.0.1' to testuser1@'0::0000:FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'0::0000:FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'0::0000:FFFF:127.0.0.1';
|
||||
=============Test of '0:0:0:0:0:FFFF:127.0.0.1/96' ================
|
||||
=============Test of '::FFFF:127.0.0.1' ===========================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'::FFFF:127.0.0.1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'::FFFF:127.0.0.1';
|
||||
SHOW GRANTS FOR testuser@'::FFFF:127.0.0.1';
|
||||
Grants for testuser@::FFFF:127.0.0.1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'::FFFF:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::FFFF:127.0.0.1'
|
||||
SET @nip= inet_aton('::FFFF:127.0.0.1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@localhost
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'::FFFF:127.0.0.1';
|
||||
RENAME USER testuser@'::FFFF:127.0.0.1' to testuser1@'::FFFF:127.0.0.1';
|
||||
SET PASSWORD FOR testuser1@'::FFFF:127.0.0.1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@localhost
|
||||
DROP USER testuser1@'::FFFF:127.0.0.1';
|
||||
=============Test of '::FFFF:127.0.0.1/96' ========================
|
88
mysql-test/r/ipv6_win.result
Normal file
88
mysql-test/r/ipv6_win.result
Normal file
@ -0,0 +1,88 @@
|
||||
=============Test of '::1' ========================================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'::1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'::1';
|
||||
SHOW GRANTS FOR testuser@'::1';
|
||||
Grants for testuser@::1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1'
|
||||
SET @nip= inet_aton('::1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@::1
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'::1';
|
||||
RENAME USER testuser@'::1' to testuser1@'::1';
|
||||
SET PASSWORD FOR testuser1@'::1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
DROP USER testuser1@'::1';
|
||||
=============Test of '::1/128' ====================================
|
||||
=============Test of '0000:0000:0000:0000:0000:0000:0000:0001' ====
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
Grants for testuser@0000:0000:0000:0000:0000:0000:0000:0001
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001'
|
||||
SET @nip= inet_aton('0000:0000:0000:0000:0000:0000:0000:0001');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@::1
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
RENAME USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' to testuser1@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
SET PASSWORD FOR testuser1@'0000:0000:0000:0000:0000:0000:0000:0001' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
DROP USER testuser1@'0000:0000:0000:0000:0000:0000:0000:0001';
|
||||
=============Test of '0:0:0:0:0:0:0:1' ============================
|
||||
mysqld is alive
|
||||
CREATE USER testuser@'0:0:0:0:0:0:0:1' identified by '1234';
|
||||
GRANT ALL ON test.* TO testuser@'0:0:0:0:0:0:0:1';
|
||||
SHOW GRANTS FOR testuser@'0:0:0:0:0:0:0:1';
|
||||
Grants for testuser@0:0:0:0:0:0:0:1
|
||||
GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:0:0:1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:0:0:1'
|
||||
SET @nip= inet_aton('0:0:0:0:0:0:0:1');
|
||||
SELECT @nip;
|
||||
@nip
|
||||
NULL
|
||||
SELECT inet_ntoa(@nip);
|
||||
inet_ntoa(@nip)
|
||||
NULL
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
SELECT current_user();
|
||||
current_user()
|
||||
root@::1
|
||||
SHOW PROCESSLIST;
|
||||
REVOKE ALL ON test.* FROM testuser@'0:0:0:0:0:0:0:1';
|
||||
RENAME USER testuser@'0:0:0:0:0:0:0:1' to testuser1@'0:0:0:0:0:0:0:1';
|
||||
SET PASSWORD FOR testuser1@'0:0:0:0:0:0:0:1' = PASSWORD ('9876');
|
||||
SELECT USER();
|
||||
USER()
|
||||
root@::1
|
||||
DROP USER testuser1@'0:0:0:0:0:0:0:1';
|
@ -247,13 +247,10 @@ set global general_log='OFF';
|
||||
set global slow_query_log='OFF';
|
||||
set @save_storage_engine= @@session.storage_engine;
|
||||
set storage_engine= MEMORY;
|
||||
alter table mysql.slow_log engine=ndb;
|
||||
ERROR HY000: This storage engine cannot be used for log tables"
|
||||
alter table mysql.slow_log engine=innodb;
|
||||
ERROR HY000: This storage engine cannot be used for log tables"
|
||||
alter table mysql.slow_log engine=archive;
|
||||
ERROR HY000: This storage engine cannot be used for log tables"
|
||||
alter table mysql.slow_log engine=blackhole;
|
||||
alter table mysql.slow_log engine=NonExistentEngine;
|
||||
Warnings:
|
||||
Warning 1286 Unknown table engine 'NonExistentEngine'
|
||||
alter table mysql.slow_log engine=memory;
|
||||
ERROR HY000: This storage engine cannot be used for log tables"
|
||||
set storage_engine= @save_storage_engine;
|
||||
drop table mysql.slow_log;
|
||||
|
@ -3,6 +3,8 @@
|
||||
#
|
||||
# Don't test this under valgrind, memory leaks will occur
|
||||
# Binary must be compiled with debug for crash to occur
|
||||
call mtr.add_suppression("Got an error from thread_id=.*ha_myisam.cc:");
|
||||
call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table");
|
||||
SET GLOBAL delay_key_write=ALL;
|
||||
CREATE TABLE t1(a INT,
|
||||
b INT,
|
||||
|
@ -1,3 +1,4 @@
|
||||
DROP TABLE IF EXISTS t1,t2,t3;
|
||||
CREATE TABLE t1(c1 DOUBLE, c2 DOUBLE, c3 DOUBLE, c4 DOUBLE, c5 DOUBLE,
|
||||
c6 DOUBLE, c7 DOUBLE, c8 DOUBLE, c9 DOUBLE, a INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES
|
||||
@ -85,5 +86,37 @@ FLUSH TABLE mysql_db1.t1;
|
||||
SELECT COUNT(*) FROM mysql_db1.t1 WHERE c2 < 5;
|
||||
COUNT(*)
|
||||
128
|
||||
# ===== myisampack.1 =====
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES(20);
|
||||
CREATE TABLE t2(a INT);
|
||||
INSERT INTO t2 VALUES(40);
|
||||
FLUSH TABLE t1,t2;
|
||||
#If the myisampack --join operation is successful, we have table t3(.frm)
|
||||
#so we should be able to query about the table from server.
|
||||
SELECT COUNT(a) FROM t3;
|
||||
COUNT(a)
|
||||
1024
|
||||
# ===== myisampack.2 =====
|
||||
FLUSH TABLE t3;
|
||||
#Tests the myisampack join operation with an existing destination .frm file,
|
||||
#the command should return correct exit status(0) and
|
||||
#we should be able to query the table.
|
||||
SELECT COUNT(a) FROM t3;
|
||||
COUNT(a)
|
||||
1024
|
||||
# ===== myisampack.3 =====
|
||||
DROP TABLE t3;
|
||||
#Tests the myisampack join operation without frm file for the first and second table
|
||||
#No frm file is generated in this and we shouldn't be able to access the newly
|
||||
#created table
|
||||
SELECT COUNT(a) FROM t3;
|
||||
ERROR 42S02: Table 'test.t3' doesn't exist
|
||||
# ===== myisampack.4 =====
|
||||
#Tests the myisampack join operation with an existing destination .frm,.MYI,.MDI
|
||||
#the command should fail with exit status 2
|
||||
myisampack: Can't create/write to file (Errcode: 17)
|
||||
Aborted: file is not compressed
|
||||
DROP TABLE t1,t2,t3;
|
||||
DROP TABLE mysql_db1.t1;
|
||||
DROP DATABASE mysql_db1;
|
||||
|
@ -21,7 +21,7 @@ ROLLBACK/*!*/;
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
@ -67,7 +67,7 @@ DELIMITER /*!*/;
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
@ -99,7 +99,7 @@ DELIMITER /*!*/;
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
@ -121,7 +121,7 @@ ROLLBACK/*!*/;
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
@ -167,7 +167,7 @@ DELIMITER /*!*/;
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
@ -199,7 +199,7 @@ DELIMITER /*!*/;
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
@ -299,7 +299,7 @@ DELIMITER /*!*/;
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
@ -349,7 +349,7 @@ DELIMITER /*!*/;
|
||||
use test/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.pseudo_thread_id=999999999/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
|
||||
SET @@session.sql_mode=0/*!*/;
|
||||
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
|
||||
/*!\C latin1 *//*!*/;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user