Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#mysql

04 November 2007


Total 16 pages. You are browsing page 3/16.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

05:01 <****> i cannot connect to mysql and want to back up my dbs. What are the /var/lib/mysql-bin.* files and do i need those too?
05:02 <****> Bearcat: if nothing is corrupt you do not need those
05:02 <****> Bearcat: they are the binary log files
05:02 <****> i have an (INSERT INTO X from X as X1, X as X2) which I want to reverse with a delete
05:02 <****> chemisus: cool
05:02 <****> : (
05:03 <****> i don't know how to provide constraints to a delete when the constraints come from a select
05:03 <****> chemisus: if i tar my dir and then expand it will it be alright? I know a mysqldump is the best option.
05:03 <****> the insert is: INSERT IGNORE INTO _trans_hierarchy (sub, super, _g)SELECT low.sub, high.super, low._g + high._g + 1 FROM _trans_hierarchy AS low INNER JOIN _trans_hierarchy AS high ON high.sub=NEW.super WHERE low.super=NEW.sub;
05:03 <****> a nice way to delete would be: DELETE FROM _trans_hierarchy (sub, super, _g)SELECT low.sub, high.super, low._g + high._g + 1 FROM _trans_hierarchy AS low INNER JOIN _trans_hierarchy AS high ON high.sub=3 WHERE low.super=2;
05:03 <****> Bearcat: as long as you shutdown the mysql server first or lock the tables
05:03 <****> but that doesn't exist in the SQL syntax
05:03 <****> man this svn client needs to hurry up and download
05:04 <****> ericP: you can join in delete
05:04 <****> maybe it needs a tickle
05:04 <****> chemisus: oh, it's shut down alright :( Thanks
05:04 <****> chadmaynard, i thought so, but i'm too ignorant to know how
05:04 * chadmaynard wonders who Bearcat is talking to
05:05 <****> er.. chadmaynard..
05:05 <****> heh.
05:05 <****> chadmaynard, can you point me at an example? maybe pastebin?
05:05 <****> chadmaynard: thanks
05:05 <****> chadmaynard, the rest of my triggers are in http://pastebin.com/d1187e377
05:06 <****> DELETE FROM table t1 JOIN table t2 ON (t1.id = t2.id) USING (t1) ....... where. .. whatever..... fooo.......bar;
05:06 <****> i'm not sure what the triggers are for
05:06 <****> and the delete hits only the matching tuple in relation t1?
05:07 <****> thats what USING (t1) means
05:07 <****> triggers are just to maintain an transitive closure of a hierarchy table
05:07 <****> aka ye
05:07 <****> s
05:07 <****> blobaugh is sort of an expert on triggers
05:07 <****> and transitive closures
05:07 <****> chadmaynard, tx kindly. never used "using" so i gotta go read a little.
05:07 <****> !rtfm delete syn
05:07 <****> (DELETE Syntax) : http://dev.mysql.com/doc/mysql/en/delete.html
05:07 <****> ^^^ syntax examples
05:08 <****> blobaugh, maybe you already have a recipe for triggers maintaining a transitive closure a couple fields in a table ..?
05:08 <****> ericP: DELETE t1.* FROM table t1 JOIN table t2 ON (t1.id = t2.id) ..... where ...foo, etc does the same thing
05:08 <****> though i expect that this hook will get me started. pp tx
05:08 <****> heya brian
05:09 <****> hey now. chadmaynard you're evil
05:09 <****> hehe
05:09 <****> chadmaynard, cool -- that syntax is more intuitive to me
05:09 <****> ericP: ive never used triggers actually
05:09 <****> blobaugh, chadmaynard says you're going to do all my work for me...
05:10 <****> blobaugh just doesn't want to help you so he plays dumb
05:10 <****> he is a SQL master
05:11 <****> of course i have no way to evaluate (withing searching logs) so i'll take no position here
05:11 <****> s/withing/without/ # my fingers are pwned
05:11 <****> i just started working with triggers
05:11 <****> immediately found something i didnt like
05:12 <****> i have user ratings on one table-- i wrote a trigger to, on update, compute the average and update a row in another table
05:12 <****> triggers don't kill tables, people kill tables ?
05:12 <****> kpdvx, sounds cool so far...
05:12 <****> but i'm using AVG(), and when the trigger attempts to run, i'm told that i'm improperly using a GROUP BY
05:13 <****> it has no GROUP BY... when I add a GROUP BY, it again tells me that I'm improperly using it
05:13 <****> seems that I cant do aggregate functions in triggers
05:13 <****> that has nothing to do with the trigger and everything to do with your SQL.
05:13 <****> said blobaugh
05:13 <****> blobaugh again, huh?
05:14 <****> you must tell me your secret
05:14 <****> hrm, if i could connect to the office vpn, i could grab that from svn and post it here if you want to look at it
05:14 <****> blobaugh is an expery
05:14 <****> blobaugh is an expert too
05:14 <****> kpdvx, when i'm debugging triggers, i eval the insert or update, subst'ing NEW.x with values from the insert that triggered the trigger
05:14 <****> blobaugh might
05:14 <****> while I'm at it, GROUP BYs in views can absolutely kill performance
05:15 <****> you have to ask yourself "what would blobaugh do?"
05:15 <****> ericP: thats what i do
05:15 <****> sure. ill hack into your vpn. just give me an ip
05:15 <****> i wondered if blobaugh was going to answer us
05:16 <****> i thought i was going to have to take action against him
05:16 <****> huh?
05:16 <****> let me put my hearing aid back in
05:16 <****> ...
05:16 <****> ok, you said something?
05:16 <****> You want me to repeat all of that?
05:17 <****> : (
05:17 <****> you might want me to check the volume of my hearing aid first
05:17 <****> hehe
05:17 <****> test
05:17 * Simetrical has everyone be really quiet so blobaugh turns his hearing aid all the way up, then sets off a firecracker
05:17 <****> a day is coming chadmaynard ....a day is coming
05:17 <****> k, let me see if i can find that
05:18 <****> blobaugh: what day?
05:18 <****> a day
05:18 <****> Simetrical|away: where are you going?
05:18 <****> chadmaynard, sleep.
05:18 <****> away from you!
05:18 <****> blobaugh: no hearing aids in #mysql. sorry.
05:18 <****> Simetrical|away: why?
05:18 * blobaugh takes out hearing aids
05:18 <****> you kick someone and all of the regulars start showing up
05:19 <****> don't forget to change yer clocks tonight!
05:19 <****> oh yea.
05:19 <****> another use for triggers
05:19 <****> (if you're in the US)
05:19 <****> ToeBee: are you gonna hang out in #pgd forever?
05:19 <****> so yeah, the update itself is busted
05:19 <****> UPDATE Songs S


Total 16 pages. You are browsing page 3/16.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo