Вы находитесь на странице: 1из 47

common_schema 2.

2
D B A ' s f r a me wo r k f o r My S Q L
S h l o mi No a c h
h t t p : / / o p e n a r k . o r g
Copyright 2013, Shlomi Noach
common_schema
D B A ' s f r a me wo r k f o r My S Q L
common_schema 2.2
D B A ' s f r a me wo r k f o r My S Q L

About

ie!" # e$al%&

'outine"

(ueryScript

)ntro*ucing r*ebug

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
About myself

Shlomi Noach, geek

So+t!are engineer, ,-A

Author o+ open "ource tool"


common_schema, oenark kit,
mycheckoint, other".

-log on all thing" .yS(/


http://openark.org

0mploye* by

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
About common_schema

common1"chema i" an open "ource


pro2ect, licen"e* un*er the 34/ /icen"e.

Authore* by Shlomi Noach


http://openark.org

.a2or contribution" by 'olan* -ouman


http://rpbouman.blog"pot.com

Se$eral contribution" # "ugge"tion" by the


community
%5hank"6&

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
About common_schema

common1"chema i" a +rame!ork !hich


inclu*e":

ie!": analytic", "ecurity, action7taking, ...

'outine": te8t, temporal, proce"", "ecurity, ...

QueryScrit: an S(/ oriente* "cripting


language # interpreter

r!ebu": *ebugger an* *ebugging A4) +or


.yS(/ "tore* routine" %alpha&.

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
About common_schema

)t i" a "chema that lie" ne8t to


#N$%&MA'#%N_S()*MA.

)t lie" completely !ithin the .yS(/ "er$er,


an* *oe" not re9uire e8ternal package" or
*epen*encie". No 4erl "cript" nor :,;" or
plugin".

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
+ettin" , #nstallin"

common1"chema *i"tribution i" a S(/ +ile.

Currently ho"te* on 3oogle Co*e:


http://co*e.google.com/p/common7"chema/

)n"tall by importing S(/ +ile into .yS(/:


bash$ mysql < /tmp/common_schema-2.2.sql
complete
- Base components: installed
- InnoDB Plugin components: installed
- Pecona !e"e components: not installed
- #o$uDB components: patial install: %/2
Installation complete. #han$ you &o using
common_schema'

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews

ie!" pro$i*ing non7tri$ial in+ormation


about your table *e"ign, key", grant",
proce""e", tran"action", lock", ...

<hile #N$%&MA'#%N_S()*MA pro$i*e"


!ith complete in+o, it i" o+ter *i++icult to
aggregate. )t i" "ometime" too normali=e*,
an* at other time" too *e7normali=e*.

Some meta*ata i" "imply not a$ailable in


)N;>'.A5)>N1SC?0.A.

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews

common1"chema@" $ie!" !ill pre"ent !ith


$aluable kno!le*ge

An* !ill typically o++er recommen*ation"


or po""ible action" ba"e* on that
kno!le*ge.

common1"chema al"o pro$i*e" the


mechani"m to apply tho"e
recommen*ation".

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews. re!un!ant_keys

;in* *uplicate/re*un*ant key" in your


"chema. 'ecommen* D&%/ "tatement".
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/re*un*ant1key".html

Similar to pt7*uplicate7key7checker
mysql( select ) &om edundant_$eys
*hee table_schema+,sa$ila,-.
table_schema: sa$ila
table_name: ental
edundant_inde/_name: ental_date_2
edundant_inde/_columns: ental_date
edundant_inde/_non_unique: %
dominant_inde/_name: ental_date
dominant_inde/_columns: ental_date0 in"entoy_id0
custome_id
dominant_inde/_non_unique: 1
sql_dop_inde/: 23#45 #2B34 6sa$ila6.6ental6
D57P I8D49 6ental_date_26

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews. s0l_ran"e_artitions

Analy=e your range partitione* table".


>++er" the ADD1&*%&+AN#2* /A&'#'#%N
"tatement" to roll partition":
mysql( ceate table test.epot : patition by ange ;:< =
mysql( select ) &om sql_ange_patitions *hee
table_name+,epot, -.
table_schema: test
table_name: epot
count_patitions: >
sql_dop_&ist_patition: alte table 6test6.6epot6
dop patition 6p16
sql_add_ne/t_patition: alte table 6test6.6epot6
eogani?e patition 6p@6 into ;
patition 6p_211A1>1%1111116 "alues less than
;%2B@CAD@11< /) 211A-1>-1% 11:11:11 )/ 0
patition p_ma/"alue "alues less than E29F23G4
<

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews. s0l "rants

4ro$i*e S(/ ba"e* acce"" to u"er account"


an* their grant".

>++er" the rele$ant +&AN', &*-%3* an*


D&%/ "tatement" +or "uch grant":
.528#44: ,*old_use,H,localhost,
use: *old_use
host: localhost
pi"_le"el: 6*old6.)
pi"_le"el_name: schema
cuent_pi"ileges: I8!45#0 !434I#0 GPD2#4
sql_gant: .528# I8!45#0 !434I#0 GPD2#4 78
6*old6.) #7 ,*old_use,H,J,
sql_e"o$e: 54F7K4 I8!45#0 !434I#0 GPD2#4 78
6*old6.) L57E ,*old_use,H,J,

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
SQL "eneration , e4al56

ie!" abo$e pre"ent !ith AS(/ column"B,


o++ering a "tatement to e8ecute.

5hi" i" at the heart o+ common1"chema@"


$ie!", an* i" part o+ the "er$er7"i*e
mechani"m the +rame!ork "trongly
"upport".

5he e$al%& routine accept" "uch S(/


column" an* e8ecute" %e$aluate"& them.

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
e4al56

Accept" a 9uery returning a te8t column.


Column *ata i" e8pecte* to be S(/
"tatement" to be e8ecute*.
mysql( call e"al;M
!434I# sql_add_ne/t_patition
L57E sql_ange_patitions
NO454 table_schema+,*ebpod,M<=
Puey 7K0 1 o*s a&&ected
-- 2 ne* patition has Qust been added on
-- all ange-patitioned tables in 6*ebpod6

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
e4al56
C)// (:0'D 123
C)// (:0'D 12E
C)// (:0'D FEG
C)// (:0'D H20
C)// (:0'D I02
Query
e4al56
Execute query
Execute statements

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews. inno!b_transactions

<hich tran"action" are runningJ

;or ho! longJ

?o! long are they being i*leJ /ocke*J

<hat 9uerie" are they i""uingJ

'ecommen* C)//, apply !ith e$al%&


mysql( call e"al;M
!434I# sql_$ill_quey
L57E innodb_tansactions
NO454 t/_idle_seconds (+ C1
M<=
-- 2ll idle tansactions ha"e Qust been $illed

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews. others

proce""li"t1grantee": i*enti+ie" the u"er


connection !ith it" a""ociate* account
%mi""ing in+o in .yS(/&

auto1increment1column": +in* A+ree "paceB


or Au"ageB +or A:5>1)NC'0.0N5 $alue"

"la$e1"tatu": get Secon*"1behin*1ma"ter


$ia real S(/ 9uery

la"t19uery1pro+iling :aggregate* pro+ile +or


la"t e8ecute* 9uery

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews. rocesslist_"rantees
mysql( select ) &om pocesslist_gantees-.
ID: B%%@DBA%
G!45: dbuser
O7!#: web00.myapp:40049
DB: po&ile
I7EE28D: Puey
#IE4: 1
!#2#4: updating
I8L7: D434#4 L57E loc$s NO454 id +
,helpe, 28D dt < ,21%C-1B-%> %D:1A:D1,
.528#44: 'dbuser'@'%.myapp'
gantee_use: dbuser
gantee_host: %.myapp
is_supe: 1
is_epl: 1
is_cuent: 1
sql_$ill_quey: KI33 PG45R B%%@DBA%
sql_$ill_connection: KI33 B%%@DBA%

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
-iews. others

"9l1account": block/relea"e account"

"imilar1grant": *etect "ecurity role"

global1"tatu"1*i++1non=ero: *etect "tatu"


change

inno*b1locke*1tran"action": !ho lock"


!ho, on !hich 9ueryJ 'ecommen* C)//

more...
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/proce""1$ie!".html
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/inno*b1plugin1$ie!".html
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/"ecurity1$ie!".html
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/"chema1analy"i"1$ie!".html

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
&outines

common1"chema o++er" more than H0


u"e+ul "tore* routine", part o+ the
+rame!ork@" +unction library.

;rom te8t par"ing # manipulation,


through proce"" *iagno"tic", 9uery
analy"i" # *ynamic e8ecution, to "ecurity
routine", the +unction library e8ten*" an*
complement" .yS(/@" o!n +unction".
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/e8ecution1routine".html
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/te8t1routine".html
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/"ecurity1routine".html
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/proce""1routine".html

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
&outines. security

killall%& kill" connection" by matching te8t


!ith u"er, ho"t or grantee.

"ecurity1au*it%& au*it" "er$er@" pri$ilege"


table" an* con+iguration to *etect "uch
threat" a" empty or *uplicate pa""!or*",
e8ce""i$e pri$ilege", permi""i$e ho"t" etc.

*uplicate1grantee%&: *uplicate" an account


mysql( call $illall;,analytics,<=
mysql( call $illall;,localhost,<=

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
&outines. te7t

e8tract12"on1$alue%&: 08tract $alue +rom


KS>N notation $ia Lpath.

replace1"ection"%&: Search an* replace te8t


appearing bet!een "ection.

get1num1token"%&: 'eturn number o+


token" in *elimite* te8t.
mysql( select common_schema.get_num_to$ens;
,the quic$ bo*n &o/,0 , ,<=
+( B
mysql( select common_schema.split_to$en;
,the quic$ bo*n &o/,0 , ,0 C<=
+( ,bo*n,

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
&outines. te7t
mysql( set HQson :+ ,S
MmenuM: S
MidM: M&ileM0
M"alueM: MLileM0
MpopupM: S
MmenuitemM: T
SM"alueM: M8e*M0 Monclic$M: Mceate;<MU0
SM"alueM: M7penM0 Monclic$M: Mopen;<MU0
SM"alueM: MIloseM0 Monclic$M: Mclose;<MU
V
U
U
U,=
mysql( select e/tact_Qson_"alue;HQson0 ,//id,< 2! esult=
W--------W
X esult X
W--------W
X &ile X
W--------W

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
&outines. "eneral

9uery1check"um%&: Check"um the re"ult


"et o+ a 9uery.

crcHM%&: 'eturn a HM bit C'C o+ gi$en input,


a" un"igne* big integer.

ran*om1ha"h%&: 'eturn a HM bit C'C o+


gi$en input, a" un"igne* big integer.
mysql( call quey_chec$sum;
,select code0 name &om *old.Iounty ode by code,<=
W----------------------------------W
X chec$sum X
W----------------------------------W
X >A22%eYd1B1eCCcdC2@2&%@Y1bBcYeDB X
W----------------------------------W

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
&outines. SQL , e7ecution

e$al%& e$aluate" the 9uerie" generate* by a


gi$en 9uery.

e8ec%&, e8ec1+ile%& *ynamically e8ecute" a


gi$en 9uery or "emicolon *elimite* li"t o+
9uerie".

run%&, run1+ile%& e8ecute (ueryScript co*e.


mysql( call e/ec;,
I542#4 #2B34 test.t;id I8#<=
I8!45# I8#7 test.t F23G4! ;2<0;C<0;D<=
,<=

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit

A S(/ oriente* "cripting language, o++ering


tight integration !ith S(/ comman*", ea"y
an* +amiliar control +lo! "ynta8 an* high
le$el ab"traction o+ comple8 ta"k".

common1"chema implement" (ueryScript


$ia interpreter, ba"e* on "tore* routine".

5hi" make" (ueryScript "uitable +or


a*mini"tration an* bulk ta"k", not +or
>/54 ta"k".
http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/9uery1"cript.html

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
8hy QueryScrit9

Store* routine programming i" a pain:

'e9uire" one to actually "tore the routine


!ithin the "chema: can@t 2u"t run "omething.

Synta8 i" cumber"ome %ANS):S(/&.

,oe" not o++er *eeper in"ight into .yS(/@"


limitation" an* bottleneck".

,oe" not pro$i*e !ith "ynta8 +or oh7"o7


common ta"k"

erbo"e. Can@t "ee the +ore"t +or the tree".



DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
(omare. store! routine
D43IEI#45 $$
D57P P57I4DG54 IL 49I!#! some_poc $$
I542#4 P57I4DG54 some_poc;<
542D! !P3 D2#2
!P3 !4IG5I#R I8F7K45
begin
declae some_id bigint unsigned de&ault null=
declae done tinyint de&ault 1=
declae my_cuso cuso &o !434I# some_id L57E some_table=
declae continue handle &o 87# L7G8D set done + %=
open my_cuso=
ead_loop: loop
&etch my_cuso into some_id=
i& done then
lea"e ead_loop=
end i&=
-- do something *ith some_id
end loop=
close my_cuso=
end $$
D43IEI#45 =

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
(omare. QueryScrit
set Hscipt :+ ,
&oeach ;$some_id: select some_id &om some_table<
S
-- do something *ith $some_id
U
,=
call un;Hscipt<=

Signi+icantly le"" o$erhea*

;amiliar C7+amily "ynta8

No nee* to "tore the co*e in "chema

Can e8ecute "cript *irectly +rom +ile


call un;,/path/to/scipt.qs,<=

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. 4ariables

Create $ariable" !hich are kno!n to


initiali=e a" N:// an* are kno!n to clean
up a" they e8it "cope.

Can be e8pan*e* an* u"e* !here .yS(/


*oe" not allo! $ariable".
"a $count :+ 21=
"a $pop :+ %111111=
"a $tbl :+ ,Iity,=
select ) &om *old.:$StblU
*hee population (+ $pop limit :$ScountU=

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. con!itions

;amiliar i+, !hile or loop7!hile "tatement".

-ut con*ition" are al"o tightly integrate*


!ith S(/, an* "o 9uerie" make +or $ali*
con*ition".
i& ;H"al ( C< S
pass=
U
*hile ;delete &om *old.Iounty
*hee Iontinent + ,2sia, limit %1<
S
thottle 2=
U

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. foreach

A "ophi"ticate* looping *e$ice, allo!ing


iteration o$er 9uerie", "et", number"
range, *ataba"e", table"...

-ut al"o ackno!le*ge" .yS(/ limitation"


an* pro$i*e" !ith a "a+er acce"" metho*.

5able iteration u"e" #N$%&MA'#%N_S()*MA


optimi=ation" to a$oi* e8ce""i$e lock":
&oeach;$tbl0 $scm: table li$e *p_posts<
alte table :$SscmU.:$StblU add column
post_geo_location F25IO25;%2Y<=

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. foreach
&oeach;$yea: 211%:211A<
delete &om sa$ila.ental *hee
ental_date (+ I78I2#;$yea0 ,-1>-1%,<
and ental_date < I78I2#;$yea0 ,-1A-1%,<=
&oeach;$shad: SG!0 .B0 Zapan0 L52U<
ceate database dbshad_:$SshadU=
&oeach;$scm: schema li$e *pJ< S
ceate table :$scm.*p_li$es;
id int0 data F25IO25;%2Y<<=
U
&oeach ;$some_id: select some_id
&om some_table< S...
U

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. slit

Automagically break" a bulk operation into


"maller chunk".

Support" D*L*'*, :/DA'*,


#NS*&'...S*L*(', &*/LA(*...S*L*('

Support" "ingle an* multi table "tatement"


split ;delete &om sa$ila.ental *hee
ental_date < 87N;< - inte"al D yea<=
split ;inset into *old.Iity_duplicate
select ) &om *old.Iity< S
thottle %=
U

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. slit
split;update sa$ila.&ilm_acto
set last_update+no*;< *hee acto_id '+ B<
S select $split_columns as columns0
$split_ange_stat as ange_stat0
$split_ange_end as ange_end0
$split_total_o*count as total=
U
W----------------------W-------------W------------W-------W
X columns X ange_stat X ange_end X total X
W----------------------W-------------W------------W-------W
X 6acto_id606&ilm_id6 X ,%,0,%, X ,CA,0,2AC, X A>Y X
W----------------------W-------------W------------W-------W
W----------------------W-------------W------------W-------W
X columns X ange_stat X ange_end X total X
W----------------------W-------------W------------W-------W
X 6acto_id606&ilm_id6 X ,CA,0,2AC, X ,>@,0,2CB, X %A>Y X
W----------------------W-------------W------------W-------W
W----------------------W-------------W-------------W-------W
X columns X ange_stat X ange_end X total X
W----------------------W-------------W-------------W-------W
X 6acto_id606&ilm_id6 X ,>@,0,2CB, X ,%%1,0,D%C, X 2A>Y X
W----------------------W-------------W-------------W-------W

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. slit; e7amle

'eal !orl* u"e ca"e: nee* to copy


<2=;===;=== ro!" belonging to a "peci+ic
partition +rom range7partitione* table
2013702
2013703
201370M
201370F
201370H
2013-05

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. slit; e7amle
split ;
S inde/: P5IE25R0 stat: ,21%C-1D-1%,0
step: 21111 U :
inset into one_month_sample
select ) &om
table_*ith_many_month_patitions
*hee enty_date < D2#4;,21%C-1D-1%,<
< S
i& ;$split_ange_stat (+ D2#4;,21%C-1D-1%,<<
Bea$=
thottle %=
U

<e pro$i*e hint" to the slit "tatement:


choo"ing in*e8, "tart po"ition, chunk "i=e.

5erminate !hen out o+ range.



DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. e7amle

Create "har*" # table", an* copy ro! *ata:


-- iteate shads
&oeach ;$shad: SG!0 .B0 Zapan0 L52U< S
ceate database dbshad_:$SshadU=
-- iteate tables
&oeach ;$tbl: table in oiginal_shad< S
ceate table dbshad_:$SshadU.:$StblU
li$e oiginal_shad.:$tbl=
-- copy table data
split ;inset into dbshad_:$SshadU.:$StblU
select ) &om oiginal_shad.:$tbl< S
-- sho* pogess
select $shad0 $tbl0 $split_total_o*count=
thottle %=
U
U
U

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
QueryScrit. more "oo!ies

throttle "tatement control" "cript


e8ecution time, re*uce" "er$er loa*

/ocal $ariable" auto7cleanup, can be u"e*


%e8pan*e*& in "tatement" !here $ariable"
not allo!e* %table name", /).)5 $alue etc.&

try7catch "tatement i" a$ailable: ea"y error


han*ling mechani"m

echo, e$al, thro! "tatement" make +or


ea"y *e$elopment

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
r!ebu"

common1"chema intro*uce" r*ebug:


*ebugger an* *ebugging A4) +or .yS(/
"tore* routine".

A "er$er "i*e "olution, ba"e* in it"el+ on


"tore* routine".

4ro$i*e" routine A4) call" to manage


*ebugging "e""ion" o+ other routine".

At thi" time %April 2013& in alpha "tage


http://common7"chema.googleco*e.com/"$n/trunk/common1"chema/*oc/html/r*ebug.html

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
r!ebu"

:"e" co*e in2ectionN one mu"t AcompileB


her routine !ith/out *ebug co*e.

,oe" not emulate co*eN retain" logic o+ one@"


routine", !ith "ome limitation".

Support":

Step into/o$er/out

<atch $ariable", mo*i+y $ariable"

Set breakpoint, run to breakpoint

<atch "tack "tate, "tatement"



DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
r!ebu"

common1"chema pro$i*e" !ith "tore*


routine A4).

>ne may *ebug on comman* line u"ing


my"9l client

>r one may !rap !ith 3:) tool to call upon


routine A4)

A!aiting 3:) client implementation"6



DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
r!ebu"
mysql TdebuggeV( call debug_step_into;<=
W-------------W----------------W---------------W--------------W---------------------W
X stac$_le"el X outine_schema X outine_name X statement_id X enty_time X
W-------------W----------------W---------------W--------------W---------------------W
X % X test X e"ie*_colos X %BD X 21%C-1B-1Y %D:B%:2Y X
W-------------W----------------W---------------W--------------W---------------------W
W----------------W---------------W---------------W---------------W----------------W
X outine_schema X outine_name X "aiable_name X "aiable_type X "aiable_"alue X
W----------------W---------------W---------------W---------------W----------------W
X test X e"ie*_colos X cuent_colo X local X *hite X
X test X e"ie*_colos X cuent_count X local X %1 X
X test X e"ie*_colos X done X local X 1 X
W----------------W---------------W---------------W---------------W----------------W
W----------------W---------------W--------------W-----------------------------------------W
X outine_schema X outine_name X statement_id X statement X
W----------------W---------------W--------------W-----------------------------------------W
X test X e"ie*_colos X %BD X call e"ie*_single_colo;cuent_colo< X
W----------------W---------------W--------------W-----------------------------------------W
mysql TdebuggeV( call debug_set_"aiable;,cuent_colo,0 ,oange,<=
mysql TdebuggeV( call debug_step_o"e;<=

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
call for hel56

common1"chema *ocumentation i"


a$ailable in the"e +ormat":

>nline *ocumentation %*irectly in co*e


repo"itory&

-un*le* ?5./ *o!nloa*

)nline: Ku"t call +or help%&:


call help;,split,<=
W--------------------------------------------------------------------------------W
X help X
W--------------------------------------------------------------------------------W
X Puey!cipt Llo* Iontol: split statement X
X X
X !R87P!I! X
X X
X !ingle table opeations0 autodetect mode:

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
&oa!ma , future lans

0$erything i" *e$elope* by *eman*. 5here


are a lot o+ pen*ing i*ea".

4riority gi$en to "olution" ) nee* to*ay.

Ne$erthele"":

(ueryScript !ill e$ol$e. Alrea*y pen*ing


relea"e are +unction"%&

(ueryScript *ebugging on roa*map

>ther i*ea"

DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
Suort common_schema

,o!nloa* an* try it out

'eport i""ue"
http://co*e.google.com/p/common7"chema/i""ue"/li"t

?appy to recei$e i*ea" an* contribution"


http://bit.ly/:4C3$h
http://co*e.google.com/p/common7"chema/i""ue"/entryJ
templateO'e9ue"tP20+orP20ne!P20component

Abo$e all el"e: "prea* the !or*6



DBA' s f r amewor k f or My S QL
common_schema
Copyright 2013, Shlomi Noach
'hank you>

i"it http://openark.org +or ne!" #


up*ate".

>ther open "ource pro2ect":

openark kit
http://openarkkit.googleco*e.com/"$n/trunk/openarkkit/*oc/html/intro*uction.html

mycheckpoint
http://co*e.openark.org/+orge/mycheckpoint

Вам также может понравиться